Пример #1
0
 void OnCollisionEnter2D(Collision2D coll)
 {
     if (coll.collider.tag == "Enemy")
     {
         //Application.LoadLevel(Application.loadedLevel);
         GameLogicScript.restartGame();
     }
 }
Пример #2
0
 // Update is called once per frame
 void Update()
 {
     if (lives <= 0)
     {
         //Application.LoadLevel(Application.loadedLevel);
         GameLogicScript.restartGame();
     }
 }
Пример #3
0
 void OnTriggerEnter2D(Collider2D coll)
 {
     if (coll.tag == "Player")
     {
         //print("go");
         GameLogicScript.restartGame();
     }
 }