Inheritance: GameStateBase
コード例 #1
0
    // Use this for initialization
    void Start()
    {
        FSM = new StateMachine(this);
        GameStateManager.Instance().FSM = FSM;

        FSM.ChangeState(GameStateMenu.Instance());
//		FSM.GlobalState = GameGlobalState.Instance ();
//		FSM.GlobalState.Enter (FSM.Owner);
        CursorManager.SetCursor(CursorManager.CursorState.DEFAULT);
    }
コード例 #2
0
 public static GameStateMenu Instance()
 {
     if (null == m_instance)
     {
         lock (m_lockHelper) {
             if (null == m_instance)
             {
                 m_instance = new GameStateMenu();
             }
         }
     }
     return(m_instance);
 }
コード例 #3
0
ファイル: GameState.cs プロジェクト: carlplaylab/CBlocker
    public static Dictionary <State, GameState> CreateStates()
    {
        // Create basic states for the game.
        Dictionary <State, GameState> stateList = new Dictionary <State, GameState> ();

        GameStateMenu           menuState      = new GameStateMenu();
        GameStatePlay           playState      = new GameStatePlay();
        GameStateResult         resultState    = new GameStateResult();
        GameStateHighScore      highScoreState = new GameStateHighScore();
        GameStateHighScoreInput highScoreInput = new GameStateHighScoreInput();

        stateList.Add(menuState.GetStateType(), menuState);
        stateList.Add(playState.GetStateType(), playState);
        stateList.Add(resultState.GetStateType(), resultState);
        stateList.Add(highScoreInput.GetStateType(), highScoreInput);
        stateList.Add(highScoreState.GetStateType(), highScoreState);

        return(stateList);
    }