Exemplo n.º 1
0
 void OnTriggerEnter2D(Collider2D coll)
 {
     Debug.Log("Some object was reached");
     // Food?
     if (coll.name.StartsWith("FoodPrefab"))
     {
         Debug.Log("food was reached, eating...");
         foodWasEaten = true;
         foodController.DestroyFood(coll);
     }
     else
     {
         gameManager.ShowGameOverPanel();
     }
 }
Exemplo n.º 2
0
 void ClearWorld()
 {
     creatureController.UpdateCreatures();
     foodController.DestroyFood();
 }