Esempio n. 1
0
        public Skill GetFsmSelection(GameObject go)
        {
            if (go == null)
            {
                return(null);
            }
            using (List <SkillSelectionHistory.HistoryItem> .Enumerator enumerator = this.recentlySelectedList.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    SkillSelectionHistory.HistoryItem current = enumerator.get_Current();
                    if (current.fsm != null && current.fsm.get_GameObject() == go)
                    {
                        Skill fsm = current.fsm;
                        return(fsm);
                    }
                }
            }
            PlayMakerFSM playMakerFSM = SkillSelection.FindFsmComponentOnGameObject(go);

            if (!(playMakerFSM != null))
            {
                return(null);
            }
            return(playMakerFSM.get_Fsm());
        }
Esempio n. 2
0
 public Skill MoveForward()
 {
     SkillSelectionHistory.HistoryItem historyItem = this.forwardList.get_Item(0);
     this.forwardList.RemoveAt(0);
     this.backList.Insert(0, historyItem);
     return(historyItem.fsm);
 }
Esempio n. 3
0
        public List <Skill> GetRecentlySelectedFSMs()
        {
            List <Skill> list = new List <Skill>();

            using (List <SkillSelectionHistory.HistoryItem> .Enumerator enumerator = this.recentlySelectedList.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    SkillSelectionHistory.HistoryItem current = enumerator.get_Current();
                    list.Add(current.fsm);
                }
            }
            return(list);
        }
Esempio n. 4
0
 public void DebugGUI()
 {
     GUILayout.Label("Back List: ", EditorStyles.get_boldLabel(), new GUILayoutOption[0]);
     using (List <SkillSelectionHistory.HistoryItem> .Enumerator enumerator = this.backList.GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             SkillSelectionHistory.HistoryItem current = enumerator.get_Current();
             GUILayout.Label(Labels.GetFullFsmLabelWithInstanceID(current.fsm), new GUILayoutOption[0]);
         }
     }
     GUILayout.Label("Forward List: ", EditorStyles.get_boldLabel(), new GUILayoutOption[0]);
     using (List <SkillSelectionHistory.HistoryItem> .Enumerator enumerator2 = this.forwardList.GetEnumerator())
     {
         while (enumerator2.MoveNext())
         {
             SkillSelectionHistory.HistoryItem current2 = enumerator2.get_Current();
             GUILayout.Label(Labels.GetFullFsmLabelWithInstanceID(current2.fsm), new GUILayoutOption[0]);
         }
     }
     GUILayout.Label("RecentlySelectedList: ", EditorStyles.get_boldLabel(), new GUILayoutOption[0]);
     using (List <SkillSelectionHistory.HistoryItem> .Enumerator enumerator3 = this.recentlySelectedList.GetEnumerator())
     {
         while (enumerator3.MoveNext())
         {
             SkillSelectionHistory.HistoryItem current3 = enumerator3.get_Current();
             GUILayout.Label(Labels.GetFullFsmLabelWithInstanceID(current3.fsm), new GUILayoutOption[0]);
         }
     }
     GUILayout.Label("SelectionCache: ", EditorStyles.get_boldLabel(), new GUILayoutOption[0]);
     using (List <SkillSelection> .Enumerator enumerator4 = this.selectionCache.GetEnumerator())
     {
         while (enumerator4.MoveNext())
         {
             SkillSelection current4 = enumerator4.get_Current();
             GUILayout.Label(Labels.GetFullFsmLabelWithInstanceID(current4.ActiveFsm), new GUILayoutOption[0]);
         }
     }
 }