Example #1
0
 protected void RegisterEvents(ushort[] msgIds)
 {
     mEventIds.AddRange(msgIds);
     for (int i = 0; i < msgIds.Length; i++)
     {
         mCurMgr.RegisterEvent(msgIds[i], Process);
     }
 }
Example #2
0
 static int RegisterEvent(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         QFramework.QMgrBehaviour obj = (QFramework.QMgrBehaviour)ToLua.CheckObject <QFramework.QMgrBehaviour>(L, 1);
         object             arg0      = ToLua.ToVarObject(L, 2);
         QFramework.OnEvent arg1      = (QFramework.OnEvent)ToLua.CheckDelegate <QFramework.OnEvent>(L, 3);
         obj.RegisterEvent((IConvertible)arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Example #3
0
 protected void RegisterEvent <T>(T eventId) where T : IConvertible
 {
     mEventIds.Add(eventId.ToUInt16(null));
     mCurMgr.RegisterEvent(eventId, this.Process);
 }