コード例 #1
0
        public void changeState(GameState state)
        {
            if (curStateType == state && curState != null)
            {
                return;
            }

            if (curState != null)
            {
                curState.exit();
            }
            curState = getState(state);
            curState.enter();
            curStateType = state;
        }
コード例 #2
0
 public void clear()
 {
     curState = null;
 }