public void StartGame() { score = 0; gameState = GameState.play; currentTime = startTime; mainScoreDisplay.text = score.ToString(); mainTimerDisplay.text = score.ToString(); menuCanvas.SetActive(false); mainCanvas.SetActive(true); sp.Spawn(); #if UNITY_STANDALONE || UNITY_EDITOR || UNITY_WEBGL ml.LockCursor(true); #endif }
public void GameOver() { CurrentState = GameState.GameOver; ChangeMusic(GameOverMusic); //moram prikazati kursor jer mi treba if (_mouseLooker) { _mouseLooker.LockCursor(false); _mouseLooker.enabled = false; } ResumeGameButton.gameObject.SetActive(false); NextLevelButton.gameObject.SetActive(false); GamePlayCanvas.gameObject.SetActive(true); GameOverCanvas.gameObject.SetActive(true); }