コード例 #1
0
 public void ChangeActionState(AbstractActionState newState)
 {
     if (newState is MarioJumpingState && !(CurrentActionState is MarioFallingState))
     {
         PlaySFX("jump");
     }
     CurrentActionState = newState;
 }
コード例 #2
0
 public void Enter(AbstractActionState state)
 {
     PlayerChar.ChangeActionState(state);
     PlayerChar.Acceleration = state.stateAccel;
     PlayerChar.Animation    = state.Animation;
 }