Example #1
0
        public static void Init()
        {
            // Get existing open window or if none, make a new one:
            window = (AbilityEditorWindow)EditorWindow.GetWindow(typeof(AbilityEditorWindow));
            //~ window.minSize=new Vector2(375, 449);
            //~ window.maxSize=new Vector2(375, 800);

            prefab      = AbilityDB.LoadDB();
            abilityList = prefab.abilityList;

            for (int i = 0; i < abilityList.Count; i++)
            {
                //towerList[i].prefabID=i;
                if (abilityList[i] != null)
                {
                    abilityIDList.Add(abilityList[i].ID);
                }
                else
                {
                    abilityList.RemoveAt(i);
                    i -= 1;
                }
            }

            InitLabel();
        }
Example #2
0
        private static void LoadAbility()
        {
            abilityPrefabDB = AbilityDB.LoadDB();
            abilityList     = abilityPrefabDB.abilityList;

            for (int i = 0; i < abilityList.Count; i++)
            {
                //abilityList[i].ID=i;
                if (abilityList[i] != null)
                {
                    abilityIDList.Add(abilityList[i].ID);
                }
                else
                {
                    abilityList.RemoveAt(i);
                    i -= 1;
                }
            }

            UpdateAbilityNameList();
        }
Example #3
0
        public static void LoadAbility()
        {
            abilityDB = AbilityDB.LoadDB();

            for (int i = 0; i < abilityDB.abilityList.Count; i++)
            {
                if (abilityDB.abilityList[i] != null)
                {
                    abilityIDList.Add(abilityDB.abilityList[i].ID);
                }
                else
                {
                    abilityDB.abilityList.RemoveAt(i);        i -= 1;
                }
            }

            UpdateLabel_Ability();

            TDEditorWindow.SetAbilityDB(abilityDB, abilityIDList, abilityLabel);
            TDEditorInspector.SetAbilityDB(abilityDB, abilityIDList, abilityLabel);
        }