コード例 #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 Loose()
    {
        GameLogicOpitions.ResetGameLogicOptions();
        SetFinalScore(score);

        menu.ToggleMenu(true);
        cameraController.SetPosition(Vector2.zero);

        if (score >= 5)
        {
            rewardManager.GenerateRewards();
            menu.ToggleReward();
        }

        menuStart = Time.time;

        //Score
        gameScore.gameObject.SetActive(false);
    }
コード例 #3
0
 public void Awake()
 {
     instance = this;
     ResetGameLogicOptions();
 }