Пример #1
0
        public static List <SkillState> FindStatesUsingEvent(Skill fsm, string eventName)
        {
            List <SkillInfo> list = new List <SkillInfo>();

            list.AddRange(SkillInfo.FindTransitionsUsingEvent(fsm, eventName));
            list.AddRange(SkillInfo.FindActionsUsingEvent(fsm, eventName));
            return(SkillInfo.GetStateList(list));
        }
Пример #2
0
        public static List <SkillInfo> FindActionsUsingEvent(Skill fsm, string eventName)
        {
            List <SkillInfo> list = new List <SkillInfo>();

            SkillState[] states = fsm.get_States();
            for (int i = 0; i < states.Length; i++)
            {
                SkillState fsmState = states[i];
                fsmState.set_Fsm(fsm);
                list.AddRange(SkillInfo.FindActionsUsingEvent(fsmState, eventName));
            }
            return(list);
        }
Пример #3
0
        public static List <SkillInfo> FindActionsUsingEvent(List <Skill> fsmSelection, string eventName)
        {
            List <SkillInfo> list = new List <SkillInfo>();

            using (List <Skill> .Enumerator enumerator = fsmSelection.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    Skill current = enumerator.get_Current();
                    list.AddRange(SkillInfo.FindActionsUsingEvent(current, eventName));
                }
            }
            return(list);
        }
Пример #4
0
        public static List <SkillInfo> FindActionsTargetingGlobalTransition(Skill fsm, string eventName)
        {
            SkillInfo.currentEventTarget = new SkillEventTarget();
            List <SkillInfo> list  = SkillInfo.FindActionsUsingEvent(eventName);
            List <SkillInfo> list2 = new List <SkillInfo>();

            using (List <SkillInfo> .Enumerator enumerator = list.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    SkillInfo current = enumerator.get_Current();
                    if (SkillInfo.DoesActionEventTargetGlobalTransition(current, fsm))
                    {
                        list2.Add(current);
                    }
                }
            }
            return(list2);
        }
Пример #5
0
 public static List <SkillInfo> FindActionsUsingEvent(string eventName)
 {
     return(SkillInfo.FindActionsUsingEvent(SkillEditor.FsmList, eventName));
 }