Esempio n. 1
0
    public FSM_GameFlow(int fsmID) : base(fsmID)
    {
        // create state

        //Init
        InitState state_Init = new InitState((int)GameFlowState_ID.Init);

        state_Init.Initialize(this, null, () => { });

        //MainMenu
        MainMenuState state_MainMenu = new MainMenuState((int)GameFlowState_ID.MainMenu);

        state_MainMenu.Initialize(this, null, () => { });

        //SelectDiff
        SelectDifficultyState state_SelectDiff = new SelectDifficultyState((int)GameFlowState_ID.SelectDiff);

        state_SelectDiff.Initialize(this, null, () => { });

        //GamePlaying
        GamePlayingState state_GamePlaying = new GamePlayingState((int)GameFlowState_ID.GamePlaying);

        state_GamePlaying.Initialize(this, null, () => { });

        //GameOver
        GameOverState state_GameOver = new GameOverState((int)GameFlowState_ID.GameOver);

        state_GameOver.Initialize(this, null, () => { });

        //ShowScore
        ShowScoreState state_ShowScore = new ShowScoreState((int)GameFlowState_ID.ShowScore);

        state_ShowScore.Initialize(this, null, () => { });
    }
Esempio n. 2
0
    public FSM_GameSystem(int fsmID) : base(fsmID)
    {
        //create State

        //Init
        InitState state_Init = new InitState((int)GameSystemState_ID.Init);

        state_Init.Initialize(this, null, () => { });

        //Ready
        ReadyState state_Ready = new ReadyState((int)GameSystemState_ID.Ready);

        state_Ready.Initialize(this, null, () => { });

        //SpawnNewBlock
        SpawnNewBlockState state_SpawnNewBlock = new SpawnNewBlockState((int)GameSystemState_ID.SpawnNewBlock);

        state_SpawnNewBlock.Initialize(this, null, () => { });

        //Wait
        WaitState state_Wait = new WaitState((int)GameSystemState_ID.Wait);

        state_Wait.Initialize(this, null, () => { });

        //JudgeEliminate
        JudgeEliminateState state_JudgeEliminate = new JudgeEliminateState((int)GameSystemState_ID.JudgeEliminate);

        state_JudgeEliminate.Initialize(this, null, () => { });

        //Eliminate
        EliminateState state_Eliminate = new EliminateState((int)GameSystemState_ID.Eliminate);

        state_Eliminate.Initialize(this, null, () => { });
    }