Пример #1
0
    public void Start()
    {
        GameLogicOpitions.ResetGameLogicOptions();

        if (PlayerPrefs.GetInt("HasHacked", 0) == 1)
        {
            menu.ToggleMenu(false);
        }
        Screen.orientation = ScreenOrientation.Portrait;

        menu.ToggleMenu(true);
        cameraController = Camera.main.GetComponent <CameraController>();
        cameraController.SetPosition(Vector2.zero);
        highScore = PlayerPrefs.GetInt(highscoreSave, 0);
        menu.textHighScore.text = "" + highScore;
        gameScore.SetScore(0);

        if (useScreenSize)
        {
            SetUpOptions();
        }

        menuStart = Time.time;

        SetupBalls();

        //Score
        gameScore.gameObject.SetActive(false);
    }
Пример #2
0
    public void SetFinalScore(int score)    //When you die
    {
        menuScore.SetScore(0);
        menuScore.SetGoalScore(score);

        if (score > highScore)
        {
            SetHighscore(score);
        }
        else
        {
            SetNormalScore(score);
        }
    }