Exemple #1
0
 /// <summary>
 ///Enter GAMEPLAY State and show READY Text for notifying to the player game will start soon.
 /// </summary>
 public void StartGame()
 {
     gameState = GameState.GAMEPLAY;
     MainMemuCanvas.SetActive(false);
     ReadyText.SetActive(true);
     GameplayCanvas.SetActive(true);
     score               = 0;
     scoreText.text      = "0";
     hightScoreText.text = hightScore.ToString();
     liveCount           = startLives;
     livesDisplay.IncreasLive(liveCount); //display amount of player's lives on screen
     Invoke("StartGamePlay", waitTime);   //start game in waitTime secondes
 }
Exemple #2
0
    /// <summary>
    ///Show gameover scence
    /// </summary>
    public void ShowGameOverCanvas()
    {
        if (score > hightScore)
        {
            SaveHightScore(score);
            hightScore = score;
        }
        gameState = GameState.GAMEOVER;
        GameplayCanvas.SetActive(false);
        GameOverText.SetActive(false);
        GameOverCanvas.SetActive(true);

        GOVscoreText.text = score.ToString();
    }