Esempio n. 1
0
 public static void EnterStateLog(FSM FSM, FSMState NewState)
 {
     FormatAndWriteLine("Entering in state : " + NewState.name, FSM);
 }
Esempio n. 2
0
 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);
 }
Esempio n. 3
0
        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());
                    }
                }
            }
        }
Esempio n. 4
0
 private void RemoveElligibleFSM(FSM FSM)
 {
     FSMUpdateElligible.Remove(FSM.GetInstanceID());
     FSMFixedUpdateElligible.Remove(FSM.GetInstanceID());
     FSMLateUpdateElligible.Remove(FSM.GetInstanceID());
 }
Esempio n. 5
0
 public void RemoveFSM(FSM FSM)
 {
     FSMContainer.Remove(FSM.GetInstanceID());
     RemoveElligibleFSM(FSM);
 }
Esempio n. 6
0
 public void AddFSM(FSM FSM)
 {
     FSMContainer.Add(FSM.GetInstanceID(), FSM);
     AddElligibleFSM(FSM);
 }