コード例 #1
0
ファイル: _TDEditor.cs プロジェクト: ledotrong/tower-defense
        public static void UpdateLabel_DamageTable()
        {
            damageTypeLabel = new string[damageTableDB.damageTypeList.Count];
            for (int i = 0; i < damageTableDB.damageTypeList.Count; i++)
            {
                damageTypeLabel[i] = damageTableDB.damageTypeList[i].name;
                if (damageTypeLabel[i] == "")
                {
                    damageTypeLabel[i] = "unnamed";
                }
            }

            armorTypeLabel = new string[damageTableDB.armorTypeList.Count];
            for (int i = 0; i < damageTableDB.armorTypeList.Count; i++)
            {
                armorTypeLabel[i] = damageTableDB.armorTypeList[i].name;
                if (armorTypeLabel[i] == "")
                {
                    armorTypeLabel[i] = "unnamed";
                }
            }

            TDEditorWindow.SetDamageDB(damageTableDB, damageTypeLabel, armorTypeLabel);
            TDEditorInspector.SetDamageDB(damageTableDB, damageTypeLabel, armorTypeLabel);

            dirty = !dirty;
        }
コード例 #2
0
ファイル: _TDEditor.cs プロジェクト: ledotrong/tower-defense
        public static void LoadRsc()
        {
            rscDB = ResourceDB.LoadDB();

            TDEditorWindow.SetResourceDB(rscDB);
            TDEditorInspector.SetResourceDB(rscDB);
        }
コード例 #3
0
ファイル: _TDEditor.cs プロジェクト: ledotrong/tower-defense
        public static void LoadDamageTable()
        {
            damageTableDB = DamageTableDB.LoadDB();
            UpdateLabel_DamageTable();

            TDEditorWindow.SetDamageDB(damageTableDB, damageTypeLabel, armorTypeLabel);
            TDEditorInspector.SetDamageDB(damageTableDB, damageTypeLabel, armorTypeLabel);
        }
コード例 #4
0
ファイル: _TDEditor.cs プロジェクト: ledotrong/tower-defense
        public static void LoadPerk()
        {
            perkDB = PerkDB.LoadDB();

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

            UpdateLabel_Perk();

            TDEditorWindow.SetPerkDB(perkDB, perkIDList, perkLabel);
            TDEditorInspector.SetPerkDB(perkDB, perkIDList, perkLabel);
        }
コード例 #5
0
ファイル: _TDEditor.cs プロジェクト: ledotrong/tower-defense
        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);
        }
コード例 #6
0
ファイル: _TDEditor.cs プロジェクト: ledotrong/tower-defense
        public static void LoadFPSWeapon()
        {
            fpsWeaponDB = FPSWeaponDB.LoadDB();

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

            UpdateLabel_FPSWeapon();

            TDEditorWindow.SetFPSWeaponDB(fpsWeaponDB, fpsWeaponIDList, fpsWeaponLabel);
            TDEditorInspector.SetFPSWeaponDB(fpsWeaponDB, fpsWeaponIDList, fpsWeaponLabel);
        }
コード例 #7
0
ファイル: _TDEditor.cs プロジェクト: ledotrong/tower-defense
        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);
        }
コード例 #8
0
ファイル: _TDEditor.cs プロジェクト: ledotrong/tower-defense
        public static void LoadTower()
        {
            towerDB = TowerDB.LoadDB();

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

            UpdateLabel_Tower();

            TDEditorWindow.SetTowerDB(towerDB, towerIDList, towerLabel);
            TDEditorInspector.SetTowerDB(towerDB, towerIDList, towerLabel);
        }
コード例 #9
0
ファイル: _TDEditor.cs プロジェクト: ledotrong/tower-defense
        public static void UpdateLabel_Perk()
        {
            perkLabel    = new string[perkDB.perkList.Count + 1];
            perkLabel[0] = "Unassigned";
            for (int i = 0; i < perkDB.perkList.Count; i++)
            {
                string name = perkDB.perkList[i].name;
                if (name == "")
                {
                    name = "unnamed";
                }
                while (Array.IndexOf(perkLabel, name) >= 0)
                {
                    name += "_";
                }
                perkLabel[i + 1] = name;
            }

            TDEditorWindow.SetPerkDB(perkDB, perkIDList, perkLabel);
            TDEditorInspector.SetPerkDB(perkDB, perkIDList, perkLabel);

            dirty = !dirty;
        }
コード例 #10
0
ファイル: _TDEditor.cs プロジェクト: ledotrong/tower-defense
        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;
            }

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

            dirty = !dirty;
        }
コード例 #11
0
ファイル: _TDEditor.cs プロジェクト: ledotrong/tower-defense
        public static void UpdateLabel_FPSWeapon()
        {
            fpsWeaponLabel    = new string[fpsWeaponDB.weaponList.Count + 1];
            fpsWeaponLabel[0] = "Unassigned";
            for (int i = 0; i < fpsWeaponDB.weaponList.Count; i++)
            {
                string name = fpsWeaponDB.weaponList[i].name;
                if (name == "")
                {
                    name = "unnamed";
                }
                while (Array.IndexOf(fpsWeaponLabel, name) >= 0)
                {
                    name += "_";
                }
                fpsWeaponLabel[i + 1] = name;
            }

            TDEditorWindow.SetFPSWeaponDB(fpsWeaponDB, fpsWeaponIDList, fpsWeaponLabel);
            TDEditorInspector.SetFPSWeaponDB(fpsWeaponDB, fpsWeaponIDList, fpsWeaponLabel);

            dirty = !dirty;
        }
コード例 #12
0
ファイル: _TDEditor.cs プロジェクト: ledotrong/tower-defense
        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;
        }
コード例 #13
0
ファイル: _TDEditor.cs プロジェクト: ledotrong/tower-defense
        public static void UpdateLabel_Tower()
        {
            towerLabel    = new string[towerDB.towerList.Count + 1];
            towerLabel[0] = "Unassigned";
            for (int i = 0; i < towerDB.towerList.Count; i++)
            {
                string name = towerDB.towerList[i].name;
                if (name == "")
                {
                    name = "unnamed";
                }
                while (Array.IndexOf(towerLabel, name) >= 0)
                {
                    name += "_";
                }
                towerLabel[i + 1] = name;
            }

            TDEditorWindow.SetTowerDB(towerDB, towerIDList, towerLabel);
            TDEditorInspector.SetTowerDB(towerDB, towerIDList, towerLabel);

            dirty = !dirty;
        }