Exemplo n.º 1
0
 public void OnCollisionEnter2D(Collision2D collision)
 {
     CollisionsRemaining--;
     if (CollisionsRemaining <= 0)
     {
         if (!gameOver.IsGameOver)
         {
             gameOver.DoGameOver();
         }
     }
 }
Exemplo n.º 2
0
 void Update()
 {
     // check if the stack tipped
     {
         if (transform.position.y < (HeightLanded - 1f))
         {
             if (!GameOver.IsGameOver)
             {
                 GameOver.DoGameOver();
             }
         }
     }
 }