Ejemplo n.º 1
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.tag == "Ladder")
     {
         m_IsTouchLadder = true;
     }
     else if (collision.tag == "Item")
     {
         ItemComponent item = collision.
                              GetComponent <ItemComponent>();
         if (item != null)
         {
             item.BeAte();
         }
     }
 }