Пример #1
0
 void OnTriggerEnter2D(Collider2D c)
 {
     if (c.gameObject.tag == "Key")
     {
         c.gameObject.GetComponent <KeyController> ().CollectKey();
         UpdateUI();
     }
     else if (c.gameObject.name == "Gate")
     {
         if (GateController.IsOpen())
         {
             LoadNextLevel();
         }
     }
 }