public bool onGround()
{
foreach (Transform t in GroundedEnds)
{
if(Physics2D.Linecast(this.transform.position, t.position, whatIsGrounded))
return true;
}
return false;
// foreach(Transform t in groundChecks)
// {
// Collider2D[] colliders = Physics2D.OverlapCircleAll(t.position,groundRadius,whatIsGrounded);
// for(int i =0;i<colliders.Length;i++)
// {
// if(colliders[i].gameObject!=gameObject)
// {
// return true;
// }
// }
// }
// return false;
}