public void ChangeActionState(AbstractActionState newState) { if (newState is MarioJumpingState && !(CurrentActionState is MarioFallingState)) { PlaySFX("jump"); } CurrentActionState = newState; }
public void Enter(AbstractActionState state) { PlayerChar.ChangeActionState(state); PlayerChar.Acceleration = state.stateAccel; PlayerChar.Animation = state.Animation; }