Esempio n. 1
0
        public static void LoadCreep()
        {
            creepDB = CreepDB.LoadDB();

            for (int i = 0; i < creepDB.creepList.Count; i++)
            {
                if (creepDB.creepList[i] != null)
                {
                    creepIDList.Add(creepDB.creepList[i].prefabID);
                }
                else
                {
                    creepDB.creepList.RemoveAt(i);    i -= 1;
                }
            }

            UpdateLabel_Creep();

            TDEditorWindow.SetCreepDB(creepDB, creepIDList, creepLabel);
            TDEditorInspector.SetCreepDB(creepDB, creepIDList, creepLabel);
        }
Esempio n. 2
0
        public static void UpdateLabel_Creep()
        {
            creepLabel    = new string[creepDB.creepList.Count + 1];
            creepLabel[0] = "Unassigned";
            for (int i = 0; i < creepDB.creepList.Count; i++)
            {
                string name = creepDB.creepList[i].name;
                if (name == "")
                {
                    name = "unnamed";
                }
                while (Array.IndexOf(creepLabel, name) >= 0)
                {
                    name += "_";
                }
                creepLabel[i + 1] = name;
            }

            TDEditorWindow.SetCreepDB(creepDB, creepIDList, creepLabel);
            TDEditorInspector.SetCreepDB(creepDB, creepIDList, creepLabel);

            dirty = !dirty;
        }