private static void LoadCreep() { creepDBPrefab = CreepDB.LoadDB(); creepList = creepDBPrefab.creepList; for (int i = 0; i < creepList.Count; i++) { //creepList[i].prefabID=i; if (creepList[i] != null) { creepIDList.Add(creepList[i].prefabID); if (creepList[i].stats.Count == 0) { creepList[i].stats.Add(new UnitStat()); } } else { creepList.RemoveAt(i); i -= 1; } } UpdateCreepNameList(); }
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); }