/// <summary> /// 添加成员 /// </summary> /// <param name="char_idx">角色id</param> /// <returns></returns> public void AddMember(long char_idx) { m_event_members.Remove(char_idx); DBEvent db_evt = new DBEvent(); m_event_members.Add(char_idx, db_evt); db_evt.Setup(char_idx); }
public void Tick() { int update_count = 0; DBEvent member = null; foreach (var obj in m_event_members) { member = obj.Value; if (member.NeedLoad()) { member.Load(); if (++update_count > 60) { break; //当次循环最大更新数量 } } } }