// Update is called once per frame void Update() { switch (currGameState) { case AllGameStates.WAITING: break; case AllGameStates.INGAME: score = (int)Time.timeSinceLevelLoad; UIManager.instance.UpdateScore(score); break; case AllGameStates.GAMEOVER: if (score > HighScore) { HighScore = score; } UIManager.instance.ShowGameOverScreen(); currGameState = AllGameStates.OTHER; break; case AllGameStates.OTHER: break; } }
// Use this for initialization void Start() { currGameState = AllGameStates.INGAME; }