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); }
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); }