Beispiel #1
0
 void OnCollisionEnter2D(Collision2D other)
 {
     if (other.gameObject.tag == "killbox")
     {
         Debug.Log("Player dead");                                                                   //Console shows Player dead
         gamemanag.RestartGame();
     }
     if (other.gameObject.tag == "WinBox")
     {
         Debug.Log("Player wins");                                                                   //Console shows Player dead
         gamemanag.RestartGameWin();
     }
 }