예제 #1
0
    // 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;
        }
    }
예제 #2
0
 // Use this for initialization
 void Start()
 {
     currGameState = AllGameStates.INGAME;
 }