Exemple #1
0
        public static void UpdateLabel_UnitPlayer()
        {
            unitPlayerLabel    = new string[unitPlayerDB.unitList.Count + 1];
            unitPlayerLabel[0] = "Unassigned";
            for (int i = 0; i < unitPlayerDB.unitList.Count; i++)
            {
                string name = unitPlayerDB.unitList[i].name;
                if (name == "")
                {
                    name = "unnamed";
                }
                while (Array.IndexOf(unitPlayerLabel, name) >= 0)
                {
                    name += "_";
                }
                unitPlayerLabel[i + 1] = name;
            }

            TDSEditorWindow.SetUnitPlayerDB(unitPlayerDB, unitPlayerIDList, unitPlayerLabel);
            TDSEditorInspector.SetUnitPlayerDB(unitPlayerDB, unitPlayerIDList, unitPlayerLabel);

            dirty = !dirty;
        }
Exemple #2
0
        public static void UpdateLabel_Collectible()
        {
            collectibleLabel    = new string[collectibleDB.collectibleList.Count + 1];
            collectibleLabel[0] = "Unassigned";
            for (int i = 0; i < collectibleDB.collectibleList.Count; i++)
            {
                string name = collectibleDB.collectibleList[i].name;
                if (name == "")
                {
                    name = "unnamed";
                }
                while (Array.IndexOf(collectibleLabel, name) >= 0)
                {
                    name += "_";
                }
                collectibleLabel[i + 1] = name;
            }

            TDSEditorWindow.SetCollectibleDB(collectibleDB, collectibleIDList, collectibleLabel);
            TDSEditorInspector.SetCollectibleDB(collectibleDB, collectibleIDList, collectibleLabel);

            dirty = !dirty;
        }
Exemple #3
0
        public static void LoadUnitPlayer()
        {
            unitPlayerDB = UnitPlayerDB.LoadDB();

            for (int i = 0; i < unitPlayerDB.unitList.Count; i++)
            {
                if (unitPlayerDB.unitList[i] != null)
                {
                    //unitPlayerDB.unitList[i].prefabID=i;
                    unitPlayerIDList.Add(unitPlayerDB.unitList[i].prefabID);
                }
                else
                {
                    unitPlayerDB.unitList.RemoveAt(i);
                    i -= 1;
                }
            }

            UpdateLabel_UnitPlayer();

            TDSEditorWindow.SetUnitPlayerDB(unitPlayerDB, unitPlayerIDList, unitPlayerLabel);
            TDSEditorInspector.SetUnitPlayerDB(unitPlayerDB, unitPlayerIDList, unitPlayerLabel);
        }
Exemple #4
0
        public static void UpdateLabel_Weapon()
        {
            weaponLabel    = new string[weaponDB.weaponList.Count + 1];
            weaponLabel[0] = "Unassigned";
            for (int i = 0; i < weaponDB.weaponList.Count; i++)
            {
                string name = weaponDB.weaponList[i].weaponName;
                if (name == "")
                {
                    name = "unnamed";
                }
                while (Array.IndexOf(weaponLabel, name) >= 0)
                {
                    name += "_";
                }
                weaponLabel[i + 1] = name;
            }

            TDSEditorWindow.SetWeaponDB(weaponDB, weaponIDList, weaponLabel);
            TDSEditorInspector.SetWeaponDB(weaponDB, weaponIDList, weaponLabel);

            dirty = !dirty;
        }
Exemple #5
0
        public static void LoadCollectible()
        {
            collectibleDB = CollectibleDB.LoadDB();

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

            UpdateLabel_Collectible();

            TDSEditorWindow.SetCollectibleDB(collectibleDB, collectibleIDList, collectibleLabel);
            TDSEditorInspector.SetCollectibleDB(collectibleDB, collectibleIDList, collectibleLabel);
        }
Exemple #6
0
        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;
            }

            TDSEditorWindow.SetPerkDB(perkDB, perkIDList, perkLabel);
            TDSEditorInspector.SetPerkDB(perkDB, perkIDList, perkLabel);

            dirty = !dirty;
        }
Exemple #7
0
        public static void LoadWeapon()
        {
            weaponDB = WeaponDB.LoadDB();

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

            UpdateLabel_Weapon();

            TDSEditorWindow.SetWeaponDB(weaponDB, weaponIDList, weaponLabel);
            TDSEditorInspector.SetWeaponDB(weaponDB, weaponIDList, weaponLabel);
        }
Exemple #8
0
        public static void LoadPerk()
        {
            perkDB = PerkDB.LoadDB();

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

            UpdateLabel_Perk();

            TDSEditorWindow.SetPerkDB(perkDB, perkIDList, perkLabel);
            TDSEditorInspector.SetPerkDB(perkDB, perkIDList, perkLabel);
        }
Exemple #9
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;
        }
Exemple #10
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);
        }
Exemple #11
0
        public static void UpdateLabel_Effect()
        {
            effectLabel    = new string[effectDB.effectList.Count + 1];
            effectLabel[0] = "Unassigned";
            for (int i = 0; i < effectDB.effectList.Count; i++)
            {
                string name = effectDB.effectList[i].name;
                if (name == "")
                {
                    name = "unnamed";
                }
                while (Array.IndexOf(effectLabel, name) >= 0)
                {
                    name += "_";
                }
                effectLabel[i + 1] = name;
            }

            TDSEditorWindow.SetEffectDB(effectDB, effectIDList, effectLabel);
            TDSEditorInspector.SetEffectDB(effectDB, effectIDList, effectLabel);

            dirty = !dirty;
        }
Exemple #12
0
        public static void LoadEffect()
        {
            effectDB = EffectDB.LoadDB();

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

            UpdateLabel_Effect();

            TDSEditorWindow.SetEffectDB(effectDB, effectIDList, effectLabel);
            TDSEditorInspector.SetEffectDB(effectDB, effectIDList, effectLabel);
        }