public void MakeTransition(ShootingStates state) { if (currentState.CanTransitionTo(state)) { currentState.Exit(); currentState = statesMapping[state]; currentState.Enter(); } }
public override bool CanTransitionTo(ShootingStates state) { return(reloadingFinished && state == ShootingStates.Idle); }
public abstract bool CanTransitionTo(ShootingStates state);
public override bool CanTransitionTo(ShootingStates state) { return(state == ShootingStates.Reloading); }