Exemplo n.º 1
0
 public bool IsGameEnded()
 {
     if (JumpsGT.GetJumpsLeft() < 0)
     {
         gameOverPanel.Display();
         EndGame();
         return(true);
     }
     return(false);
 }
Exemplo n.º 2
0
    //Makes the ship disappear, decreases the jump amount and starts the jump coroutine
    void Jump()
    {
        JumpsGT.DecrementJumpsLeft();

        if (!AODSG.IsGameEnded())
        {
            JumpsGT.Display();
            this.transform.SetPositionAndRotation(new Vector3(50f, 0f, 0f), this.transform.rotation);//Teleports the ship outside of borders
            StartCoroutine(WaitAndJump());
        }
    }