Esempio n. 1
0
 private void CheckTransitions(PluggableStateMachine pluggableStateMachine)
 {
     foreach (var transition in _Transitions)
     {
         transition.CheckAndTransition(pluggableStateMachine);
     }
 }
Esempio n. 2
0
 private void DoActions(SO_AAction[] actionsToDo, PluggableStateMachine pluggableStateMachine)
 {
     foreach (SO_AAction action in actionsToDo)
     {
         action.Act(pluggableStateMachine);
     }
 }
Esempio n. 3
0
        public void CheckAndTransition(PluggableStateMachine pluggableStateMachine)
        {
            foreach (var decision in _Decisions)
            {
                if (decision.Decide(pluggableStateMachine) == false)
                {
                    pluggableStateMachine.ChangeState(_FalseState);
                    return;
                }

                pluggableStateMachine.ChangeState(_TrueState);
            }
        }
Esempio n. 4
0
 public void ExitState(PluggableStateMachine pluggableStateMachine)
 {
     DoActions(ExitActions, pluggableStateMachine);
 }
Esempio n. 5
0
 public void UpdateState(PluggableStateMachine pluggableStateMachine)
 {
     DoActions(UpdateActions, pluggableStateMachine);
     CheckTransitions(pluggableStateMachine);
 }
Esempio n. 6
0
 public void EnterState(PluggableStateMachine pluggableStateMachine)
 {
     DoActions(EnterActions, pluggableStateMachine);
 }
Esempio n. 7
0
 public abstract void Act(PluggableStateMachine pluggableStateMachine);
Esempio n. 8
0
 public abstract bool Decide(PluggableStateMachine pluggableStateMachine);