Esempio n. 1
0
    void Awake()
    {
        db = GetComponent <EffectDB>();

        foreach (var effect in effectTypeList)
        {
            if (effect.type == PlayerManager.Instance.Data.Job)
            {
                for (int i = 0; i < createNum; i++)
                {
                    var obj = Instantiate(effect.strength);
                    obj.transform.SetParent(transform);
                    obj.gameObject.SetActive(false);
                    strengthEffectList.Add(obj.GetComponent <EffectMover>());
                }

                for (int i = 0; i < createNum; i++)
                {
                    var obj = Instantiate(effect.weak);
                    obj.transform.SetParent(transform);
                    obj.gameObject.SetActive(false);
                    weakEffectList.Add(obj.GetComponent <EffectMover>());
                }
            }
        }
    }
Esempio n. 2
0
    void Awake()
    {
        db = GetComponent<EffectDB>();

        foreach(var effect in effectTypeList)
        {
            if(effect.type == PlayerManager.Instance.Data.Job)
            {
                for (int i = 0; i < createNum; i++)
                {
                    var obj = Instantiate(effect.strength);
                    obj.transform.SetParent(transform);
                    obj.gameObject.SetActive(false);
                    strengthEffectList.Add(obj.GetComponent<EffectMover>());
                }

                for (int i = 0; i < createNum; i++)
                {
                    var obj = Instantiate(effect.weak);
                    obj.transform.SetParent(transform);
                    obj.gameObject.SetActive(false);
                    weakEffectList.Add(obj.GetComponent<EffectMover>());
                }
            }
        }

    }
Esempio n. 3
0
 public static void SetEffectDB(EffectDB db, List<int> IDList, string[] label)
 {
     effectDB=db;
     effectIDList=IDList;
     effectLabel=label;
 }
Esempio n. 4
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);
        }