public KingInfo GetKingInfo(int id) { if (Kings.ContainsKey(id)) { return(Kings[id]); } return(null); }
public void SetKingInfo(int id, KingInfo info) { if (Kings.ContainsKey(id)) { Kings[id] = info; } else { Kings.Add(id, info); } }
public void InitKingsInfo() { m_listKings = new Dictionary <int, KingInfo>(); IEnumerator enumerator = XMLManager.Kings.Data.Keys.GetEnumerator(); while (enumerator.MoveNext()) { int ID = (int)enumerator.Current; KingInfo info = new KingInfo(ID); Kings.Add(ID, info); } }