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