示例#1
0
        public IFSMStateMachine[] GetAllFSMStateMachines()
        {
            int index = 0;

            IFSMStateMachine[] results = new IFSMStateMachine[fsmStateMachines.Count];
            foreach (KeyValuePair <string, IFSMStateMachine> fsm in fsmStateMachines)
            {
                results[index++] = fsm.Value;
            }
            return(results);
        }
示例#2
0
 public IFSMStateMachine AddFSMStateMachine <T>(string name, IFSMState state) where T : IFSMStateMachine
 {
     if (HasFSMStateMachine <T>(Utility.StringUtility.GetFullName <T>(name)))
     {
         IFSMStateMachine machine = GetFSMStateMachine <T>(Utility.StringUtility.GetFullName <T>(name));
         if (machine != null)
         {
             machine.AddState(state);
             return(machine);
         }
         return(null);
     }
     return(null);
 }