public virtual void OnCollisionExit2D(Collision2D coll) { if (coll.gameObject.tag == "Wall") { wallState = WallStatuses.OffWall; } }
public virtual void OnCollisionEnter2D(Collision2D coll) { if (coll.gameObject.tag == "Wall") { wallState = (transform.position.x - coll.transform.position.x) > 0f ? WallStatuses.WallOnLeft : WallStatuses.WallOnRight; } }