Пример #1
0
 private void CheckTransitions(IFiniteStateMachineContext <State> context) => transitions.ForEach(transition =>
 {
     if (transition.decision.Decide(context))
     {
         context.TransitionToState(transition.trueState);
     }
 });
Пример #2
0
 public override bool Decide(IFiniteStateMachineContext <State> context) => true;
Пример #3
0
 public override bool Decide(IFiniteStateMachineContext <State> context) => Input.GetKeyDown(keyCode);
Пример #4
0
 public override bool Decide(IFiniteStateMachineContext <State> context) => throw new NotImplementedException();
Пример #5
0
 public abstract bool Decide(IFiniteStateMachineContext <State> context);
Пример #6
0
 public abstract void Act(IFiniteStateMachineContext <State> context);
Пример #7
0
 public void UpdateState(IFiniteStateMachineContext <State> context)
 {
     updateActions.ForEach(action => action.Act(context));
     CheckTransitions(context);
 }
Пример #8
0
 public void LeaveState(IFiniteStateMachineContext <State> context) =>
 leaveActions.ForEach(action => action.Act(context));
Пример #9
0
 public void StartState(IFiniteStateMachineContext <State> context) =>
 startActions.ForEach(action => action.Act(context));
Пример #10
0
 public override void Act(IFiniteStateMachineContext <State> context) => gameEvent.Broadcast();
Пример #11
0
 public override void Act(IFiniteStateMachineContext <State> context) => targetBoolVar.value = boolRef.Value;
Пример #12
0
 public override void Act(IFiniteStateMachineContext <State> context) => gameObjectRuntimeSet.list.Clear();
Пример #13
0
 public override void Act(IFiniteStateMachineContext <State> context)
 {
 }