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); }
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); }
public void Remove(SkillEffectTable et) { m_allEffectTableDict.Remove(et.Name); }