예제 #1
0
 public UserManager(IRoom room)
 {
     mRoom = (Room)room;
     mSocketHander = mRoom.SocketHander;
     mSocketHander.AddListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, OnUserEnterEvent, (ushort)MAIN_CMD.MDM_GR_USER, (ushort)USER_SUB_CMD.SUB_GR_USER_ENTER, typeof(tagUserInfo));
     mSocketHander.AddListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, OnUserStatusEvent, (ushort)MAIN_CMD.MDM_GR_USER, (ushort)USER_SUB_CMD.SUB_GR_USER_STATUS, typeof(CMD_GR_UserStatus));
     mSocketHander.AddListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, OnUserScoreEvent, (ushort)MAIN_CMD.MDM_GR_USER, (ushort)USER_SUB_CMD.SUB_GR_USER_SCORE, typeof(CMD_GR_UserScore));
 }
예제 #2
0
        public TableManager(IRoom room)
        {
            mRoom = (Room)room;
            mSocketHander = mRoom.SocketHander;

            //桌子信息
            mSocketHander.AddListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, OnTableStatusEvent, (ushort)MAIN_CMD.MDM_GR_STATUS, (ushort)STATUS_SUB_CMD.SUB_GR_TABLE_STATUS, typeof(CMD_GR_TableStatus));
            mSocketHander.AddListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, OnTableInfoEvent, (ushort)MAIN_CMD.MDM_GR_STATUS, (ushort)STATUS_SUB_CMD.SUB_GR_TABLE_INFO, typeof(CMD_GR_TableInfo));
            mSocketHander.AddListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, OnSystemMessageEvent, (ushort)MAIN_CMD.MDM_CM_SYSTEM, (ushort)SYSTEM_SUB_CMD.SUB_CM_SYSTEM_MESSAGE, typeof(CMD_CM_SystemMessage));
        }
예제 #3
0
        private void Init()
        {
            mSocketHander = mRoom.SocketHander;

            //登录部分
            mSocketHander.AddListener(this, ENUM_SOCKET_EVENT.EVENT_CONNECT, OnConnectEvent);
            mSocketHander.AddListener(this, ENUM_SOCKET_EVENT.EVENT_CLOSE, OnCloseEvent);
            mSocketHander.AddListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, OnLogonSuccessEvent, (ushort)MAIN_CMD.MDM_GR_LOGON, (ushort)LOGON_SUB_CMD.SUB_GR_LOGON_SUCCESS, typeof(CMD_GR_LogonSuccess));
            mSocketHander.AddListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, OnLogonFailEvent, (ushort)MAIN_CMD.MDM_GR_LOGON, (ushort)LOGON_SUB_CMD.SUB_GR_LOGON_FAILURE, typeof(CMD_GR_LogonFailure));
            mSocketHander.AddListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, OnLogonFinishEvent, (ushort)MAIN_CMD.MDM_GR_LOGON, (ushort)LOGON_SUB_CMD.SUB_GR_LOGON_FINISH);
        }
예제 #4
0
 private void Init()
 {
     mSocketHander = mRoom.SocketHander;
     mSocketHander.AddListener(this, ENUM_SOCKET_EVENT.EVENT_CLOSE, OnCloseEvent);
 }