Ejemplo n.º 1
0
    void EnterName()
    {
        if (enterName.text != string.Empty)
        {
            int    score    = inGameScore;
            string username = "";

            username = enterName.text;

            Highscores.AddNewHighscore(username, score);

            EnterNameObj.SetActive(false);
            LeaderboardEnding.SetActive(false);
        }
    }
Ejemplo n.º 2
0
    public void OnButtonClicks(string incomingName)
    {
        //	Debug.Log ("clicked on " + incomingName);
        SoundController.Static.PlayClickSound();

        switch (incomingName)
        {
        case "Play":
            MainMenuContainer.SetActive(false);
            Tutorial.SetActive(true);
            readyToPlay = true;
            playerController.currentState = playerController.playerStates.alive;

            hudmenu.SetActive(true);
            Invoke("lateDeactivateTutorial", 3);
            break;

        case "Home":

            restart();
            break;

        case "Restart":
            isRestartPressed = true;

            hudmenu.SetActive(true);
            restart();

            break;

        case "Setting":
            Setting.SetActive(true);
            break;

        case "BackSetting":
            Setting.SetActive(false);
            break;

        case "Leaderboards":

            Leaderboards.SetActive(true);
            break;

        case "Back":
            Leaderboards.SetActive(false);

            break;

        case "LeaderboardSubmit":
            LeaderboardSubmit.SetActive(true);

            break;

        case "BackSubmit":
            LeaderboardSubmit.SetActive(false);
            ScoreBoard.SetActive(true);

            break;

        case "LeaderboardEnding":
            LeaderboardEnding.SetActive(true);
            break;

        case "BackLeaderboardEnding":
            LeaderboardEnding.SetActive(false);
            break;

        case "Quit":

            Application.Quit();

            break;
        }
    }