public static string FsmEventListPopup()
        {
            int indentLevel = EditorGUI.get_indentLevel();

            EditorGUI.set_indentLevel(0);
            List <string> list = new List <string>();

            using (List <SkillEvent> .Enumerator enumerator = SkillEvent.get_EventList().GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    SkillEvent current = enumerator.get_Current();
                    list.Add(current.get_Name());
                }
            }
            int num = EditorGUILayout.Popup(-1, list.ToArray(), new GUILayoutOption[]
            {
                GUILayout.MaxWidth(20f)
            });

            EditorGUI.set_indentLevel(indentLevel);
            if (num <= 0)
            {
                return("");
            }
            return(list.get_Item(num));
        }
Esempio n. 2
0
        private void BuildFilteredList()
        {
            SkillEvent.SanityCheckEventList();
            this.UpdateUseCount();
            List <SkillEvent> list;

            switch (this.searchBox.SearchMode)
            {
            case 0:
                list = new List <SkillEvent>(SkillEvent.get_EventList());
                break;

            case 1:
                list = Enumerable.ToList <SkillEvent>(Enumerable.Where <SkillEvent>(SkillEvent.get_EventList(), (SkillEvent p) => p.get_IsGlobal()));
                break;

            case 2:
                list = Enumerable.ToList <SkillEvent>(Enumerable.Where <SkillEvent>(SkillEvent.get_EventList(), (SkillEvent p) => !p.get_IsGlobal()));
                break;

            case 3:
                list = Enumerable.ToList <SkillEvent>(Enumerable.Where <SkillEvent>(SkillEvent.get_EventList(), (SkillEvent p) => p.get_IsSystemEvent()));
                break;

            default:
                list = new List <SkillEvent>(SkillEvent.get_EventList());
                break;
            }
            if (string.IsNullOrEmpty(this.searchString))
            {
                this.filteredEvents = new List <SkillEvent>(list);
                this.filteredEvents.Sort();
                return;
            }
            this.filteredEvents.Clear();
            string text = this.searchString.ToUpper();

            using (List <SkillEvent> .Enumerator enumerator = list.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    SkillEvent current = enumerator.get_Current();
                    if (current.get_Name().ToUpper().Contains(text))
                    {
                        this.filteredEvents.Add(current);
                    }
                }
            }
            this.filteredEvents.Sort();
        }
Esempio n. 3
0
        public static List <SkillEvent> GetGlobalEventList()
        {
            List <SkillEvent> list = new List <SkillEvent>();

            using (List <SkillEvent> .Enumerator enumerator = SkillEvent.get_EventList().GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    SkillEvent current = enumerator.get_Current();
                    if (current.get_IsGlobal())
                    {
                        list.Add(current);
                    }
                }
            }
            return(list);
        }
Esempio n. 4
0
 public void UpdateUseCount()
 {
     if (EditorApplication.get_isPlayingOrWillChangePlaymode())
     {
         return;
     }
     this.usageCount.Clear();
     this.unusedEvents.Clear();
     using (List <SkillEvent> .Enumerator enumerator = SkillEvent.get_EventList().GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             SkillEvent current = enumerator.get_Current();
             int        num     = GlobalEventsWindow.CountEventUsage(current);
             this.usageCount.Add(current, num);
             if (num == 0 && !current.get_IsSystemEvent())
             {
                 this.unusedEvents.Add(current);
             }
         }
     }
 }