Esempio n. 1
0
    private void Update()
    {
        if (gameState == null)
        {
            return;
        }

        switch (gameState.getState())
        {
        case State.BUILD_MENU_SCENE:
            setReferencesInMenuScene();
            menu.createAllCards();
            menu.deactivateAllCardOptions();
            gameState.setState(State.START_MENU);
            break;

        case State.START_MENU:
            displayScenarioOptions();
            break;

        case State.SCENARIO_SELECTED:
            placeScenarioInSelectionBar();
            menu.deactivateScenarioOptions();
            displayPersonaOptions();
            break;

        case State.CHARACTER_SELECTED:
            placePersonaInSelectionBar();
            menu.deactivatePersonaOptions();
            startScenarioFlowBasedOn(gameState.getSelectedScenario());
            break;

        case State.BAD_FLOW_ENDED:
            startScenarioHappyFlow();
            break;

        case State.RESET_MENU_OPTIONS:
            menu.deactivateAllCardOptions();
            gameState.setState(State.START_MENU);
            break;

        case State.HAPPY_FLOW_ENDED:
        case State.RESET_GAME_INTERRUPT:
            gameOver();
            break;
        }
    }