Example #1
0
        public static void UpdateLabel_Ability()
        {
            abilityLabel    = new string[abilityDB.abilityList.Count + 1];
            abilityLabel[0] = "Unassigned";
            for (int i = 0; i < abilityDB.abilityList.Count; i++)
            {
                string name = abilityDB.abilityList[i].name;
                if (name == "")
                {
                    name = "unnamed";
                }
                while (Array.IndexOf(abilityLabel, name) >= 0)
                {
                    name += "_";
                }
                abilityLabel[i + 1] = name;
            }

            TDSEditorWindow.SetAbilityDB(abilityDB, abilityIDList, abilityLabel);
            TDSEditorInspector.SetAbilityDB(abilityDB, abilityIDList, abilityLabel);

            dirty = !dirty;
        }
Example #2
0
        public static void LoadAbility()
        {
            abilityDB = AbilityDB.LoadDB();

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

            UpdateLabel_Ability();

            TDSEditorWindow.SetAbilityDB(abilityDB, abilityIDList, abilityLabel);
            TDSEditorInspector.SetAbilityDB(abilityDB, abilityIDList, abilityLabel);
        }