Beispiel #1
0
 public void ThrowBall()
 {
     if (_currentState.GetType().Name == "ThrowState")
     {
         ThrowState state = (ThrowState)_currentState;
         state.SpawnBall(this);
     }
 }
Beispiel #2
0
 /// <summary>
 /// ステートの登録
 /// </summary>
 /// <param name="state">登録するステート</param>
 public void Register(State state)
 {
     _stateMap.Add(state.GetType(), state);
     state.StateMachine = this;
 }