示例#1
0
 public bool Add(SkillEffectTable et)
 {
     try
     {
         if (m_allEffectTableDict.ContainsKey(et.Name))
         {
             Log.LogGroup("ZDY", "has contain key " + et.Name);
         }
         else
         {
             m_allEffectTableDict.Add(et.Name, et);
             Dictionary <string, SkillEffectProp>             dic  = et.Get();
             Dictionary <string, SkillEffectProp> .Enumerator iter = dic.GetEnumerator();
             while (iter.MoveNext())
             {
                 if (!m_dicEffectProp.ContainsKey(iter.Current.Key))
                 {
                     m_dicEffectProp.Add(iter.Current.Key, iter.Current.Value);
                 }
             }
         }
     }
     catch (Exception e)
     {
         Debug.Log(e.ToString());
         return(false);
     }
     return(true);
 }
示例#2
0
        bool Load(JsonData json_root, bool clearAll)
        {
            if (clearAll)
            {
                m_allEffectTableDict.Clear();
            }

            for (int i = 0; i < json_root.Count; i++)
            {
                JsonData et_root = json_root[i];

                // SkillEffectTable et = new SkillEffectTable();
                SkillEffectTable et = ScriptableObject.CreateInstance <SkillEffectTable>();
                et.Load(et_root);

                Add(et);
            }

            return(true);
        }
示例#3
0
 public void Remove(SkillEffectTable et)
 {
     m_allEffectTableDict.Remove(et.Name);
 }