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); }
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); }