Esempio n. 1
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;
        }
Esempio n. 2
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);
        }