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