private void CheckTransitions(PluggableStateMachine pluggableStateMachine) { foreach (var transition in _Transitions) { transition.CheckAndTransition(pluggableStateMachine); } }
private void DoActions(SO_AAction[] actionsToDo, PluggableStateMachine pluggableStateMachine) { foreach (SO_AAction action in actionsToDo) { action.Act(pluggableStateMachine); } }
public void CheckAndTransition(PluggableStateMachine pluggableStateMachine) { foreach (var decision in _Decisions) { if (decision.Decide(pluggableStateMachine) == false) { pluggableStateMachine.ChangeState(_FalseState); return; } pluggableStateMachine.ChangeState(_TrueState); } }
public void ExitState(PluggableStateMachine pluggableStateMachine) { DoActions(ExitActions, pluggableStateMachine); }
public void UpdateState(PluggableStateMachine pluggableStateMachine) { DoActions(UpdateActions, pluggableStateMachine); CheckTransitions(pluggableStateMachine); }
public void EnterState(PluggableStateMachine pluggableStateMachine) { DoActions(EnterActions, pluggableStateMachine); }
public abstract void Act(PluggableStateMachine pluggableStateMachine);
public abstract bool Decide(PluggableStateMachine pluggableStateMachine);