Esempio n. 1
0
    // Update is called once per frame

    public void ExitGame()
    {
        playButton.enabled     = false;
        continueButton.enabled = true;
        continueText.enabled   = true;
        playText.enabled       = false;
        startMenuScript.swithMusic();

        gamePausedCanvas.enabled = false;
        snakeScript.setPause(true);
        snakeScript.setInMenu(true);
        addPortalScript.setPause(true);
        addPortalScript.setInMenu(true);
        menuCanvas.enabled = true;
        uiCanvas.enabled   = false;
        snakeScript.setInMenu(true);
        snakeScript.setPause(true);
        addPortalScript.setInMenu(true);
        addPortalScript.setPause(true);
    }
Esempio n. 2
0
 public void StartLevel()
 {
     menuCanvas.enabled = false;
     uiCanvas.enabled   = true;
     snakeScript.setInMenu(false);
     snakeScript.setPause(snakeScript.isPaused());
     addPortalScript.setInMenu(false);
     addPortalScript.setPause(snakeScript.isPaused());
     audioSource[0].Stop();
     audioSource[1].Play();
 }
Esempio n. 3
0
 /*TODO: implement game over screen here*/
 void gameOver()
 {
     pause  = true;
     inMenu = true;
     AddPortalSript.setPause(true);
     AddPortalSript.setInMenu(true);
     gameOverScoreText.text = score.ToString();
     gameOverScreen.enabled = true;
     //this.GetComponent<Animator>().animation;
     ToggleAnimation(false);
     //forgetObstacles();
 }