Ejemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        switch (gameState)
        {
        case GameState.waitingToStart:
            StartGameWithClick();
            break;

        case GameState.running:
            obstacleSpawner.CreateObstacle();
            obstacleSpawner.CreateSideObstacle();
            CountScore();
            break;

        case GameState.paused:
            break;

        case GameState.gameOver:
            break;
        }
    }