public static void CopyFromOldDB() { Init(); if (instance.copiedFromOldDB) { return; } instance.copiedFromOldDB = true; instance.unitList = new List <UnitAI>(UnitAIDB.Load1()); }
public static List <UnitAI> Load() { GameObject obj = Resources.Load("DB_TDSTK/DB_UnitAI", typeof(GameObject)) as GameObject; #if UNITY_EDITOR if (obj == null) { obj = CreatePrefab(); } #endif UnitAIDB instance = obj.GetComponent <UnitAIDB>(); return(instance.unitList); }
public static void LoadUnitAI() { unitAIDB = UnitAIDB.LoadDB(); for (int i = 0; i < unitAIDB.unitList.Count; i++) { if (unitAIDB.unitList[i] != null) { //unitAIDB.unitList[i].prefabID=i; unitAIIDList.Add(unitAIDB.unitList[i].prefabID); } else { unitAIDB.unitList.RemoveAt(i); i -= 1; } } UpdateLabel_UnitAI(); TDSEditorWindow.SetUnitAIDB(unitAIDB, unitAIIDList, unitAILabel); TDSEditorInspector.SetUnitAIDB(unitAIDB, unitAIIDList, unitAILabel); }
public static void SetUnitAIDB(UnitAIDB db, List <int> IDList, string[] label) { unitAIDB = db; unitAIIDList = IDList; unitAILabel = label; }
public static void SetUnitAIDB(UnitAIDB db, List<int> IDList, string[] label) { unitAIDB=db; unitAIIDList=IDList; unitAILabel=label; }
public static void LoadUnitAI() { unitAIDB=UnitAIDB.LoadDB(); for(int i=0; i<unitAIDB.unitList.Count; i++){ if(unitAIDB.unitList[i]!=null){ //unitAIDB.unitList[i].prefabID=i; unitAIIDList.Add(unitAIDB.unitList[i].prefabID); } else{ unitAIDB.unitList.RemoveAt(i); i-=1; } } UpdateLabel_UnitAI(); TDSEditorWindow.SetUnitAIDB(unitAIDB, unitAIIDList, unitAILabel); TDSEditorInspector.SetUnitAIDB(unitAIDB, unitAIIDList, unitAILabel); }