public static void EnterStateLog(FSM FSM, FSMState NewState) { FormatAndWriteLine("Entering in state : " + NewState.name, FSM); }
public static void FSMTransitionSuccessful(FSM FSM, FSMTransition FSMTransition, string WorkflowCallname) { FormatAndWriteLine("The transition : " + FSMTransition.GetType().ToString() + " has responded positively when " + WorkflowCallname + " was called. Switching to state : " + FSMTransition.StateToMove.name, FSM); }
public void UpdateElligibleFSM(ref FSMState OldFSMState, ref FSMState NewFSMState, FSM FSM) { if (OldFSMState == null) { FSMUpdateElligible.Add(FSM.GetInstanceID(), FSM); FSMFixedUpdateElligible.Add(FSM.GetInstanceID(), FSM); FSMLateUpdateElligible.Add(FSM.GetInstanceID(), FSM); } else { if (NewFSMState.FSMUpdateActions.Length > 0) { if (OldFSMState.FSMUpdateActions.Length == 0) { FSMUpdateElligible.Add(FSM.GetInstanceID(), FSM); } } else { if (OldFSMState.FSMUpdateActions.Length > 0) { FSMUpdateElligible.Remove(FSM.GetInstanceID()); } } if (NewFSMState.FSMFixedActions.Length > 0) { if (OldFSMState.FSMFixedActions.Length == 0) { FSMFixedUpdateElligible.Add(FSM.GetInstanceID(), FSM); } } else { if (OldFSMState.FSMFixedActions.Length > 0) { FSMFixedUpdateElligible.Remove(FSM.GetInstanceID()); } } if (NewFSMState.FSMLateUpdateActions.Length > 0) { if (OldFSMState.FSMLateUpdateActions.Length == 0) { FSMLateUpdateElligible.Add(FSM.GetInstanceID(), FSM); } } else { if (OldFSMState.FSMLateUpdateActions.Length > 0) { FSMLateUpdateElligible.Remove(FSM.GetInstanceID()); } } } }
private void RemoveElligibleFSM(FSM FSM) { FSMUpdateElligible.Remove(FSM.GetInstanceID()); FSMFixedUpdateElligible.Remove(FSM.GetInstanceID()); FSMLateUpdateElligible.Remove(FSM.GetInstanceID()); }
public void RemoveFSM(FSM FSM) { FSMContainer.Remove(FSM.GetInstanceID()); RemoveElligibleFSM(FSM); }
public void AddFSM(FSM FSM) { FSMContainer.Add(FSM.GetInstanceID(), FSM); AddElligibleFSM(FSM); }