示例#1
0
文件: State.cs 项目: lcy03406/Candle
 public void RegisterConn <M>(ConnEvent i, ConnProc <M> func) where M : Manager
 {
     conn[(int)i] = (Manager manager, SID sid) => {
         M m = (M)manager;
         func(m, sid);
     };
 }
示例#2
0
文件: State.cs 项目: lcy03406/Candle
        internal void OnConnEvent(ConnEvent i, Manager manager, SID sid)
        {
            ConnProc <Manager> func = conn[(int)i];

            if (func != null)
            {
                func(manager, sid);
            }
        }