RegisterCallback() public abstract method

public abstract RegisterCallback ( NFGUID self, int nEventID, NFIEvent handler, NFIDataList valueList ) : void
self NFGUID
nEventID int
handler NFIEvent
valueList NFIDataList
return void
Exemplo n.º 1
0
        public override void Init()
        {
            mNetModule.AddReceiveCallBack(NFMsg.EGameMsgID.EGMI_ACK_LOGIN, OnLoginProcess);
            mNetModule.AddReceiveCallBack(NFMsg.EGameMsgID.EGMI_ACK_WORLD_LIST, OnWorldList);
            mNetModule.AddReceiveCallBack(NFMsg.EGameMsgID.EGMI_ACK_CONNECT_WORLD, OnConnectWorld);
            mNetModule.AddReceiveCallBack(NFMsg.EGameMsgID.EGMI_ACK_CONNECT_KEY, OnConnectKey);
            mNetModule.AddReceiveCallBack(NFMsg.EGameMsgID.EGMI_ACK_SELECT_SERVER, OnSelectServer);

            mNetModule.AddReceiveCallBack(NFMsg.EGameMsgID.EGMI_ACK_ROLE_LIST, EGMI_ACK_ROLE_LIST);



            mEventModule.RegisterCallback((int)NFLoginModule.Event.Connected, OnConnected);
            mEventModule.RegisterCallback((int)NFLoginModule.Event.Disconnected, OnDisconnected);
        }
Exemplo n.º 2
0
        public override void Init()
        {
            mNetModule.AddReceiveCallBack((int)NFMsg.EGameMsgID.AckLogin, OnLoginProcess);
            mNetModule.AddReceiveCallBack((int)NFMsg.EGameMsgID.AckWorldList, OnWorldList);
            mNetModule.AddReceiveCallBack((int)NFMsg.EGameMsgID.AckConnectWorld, OnConnectWorld);
            mNetModule.AddReceiveCallBack((int)NFMsg.EGameMsgID.AckConnectKey, OnConnectKey);
            mNetModule.AddReceiveCallBack((int)NFMsg.EGameMsgID.AckSelectServer, OnSelectServer);

            mNetModule.AddReceiveCallBack((int)NFMsg.EGameMsgID.AckRoleList, EGMI_ACK_ROLE_LIST);


            mEventModule.RegisterCallback((int)NFLoginModule.Event.Connected, OnConnected);
            mEventModule.RegisterCallback((int)NFLoginModule.Event.Disconnected, OnDisconnected);

            mEventModule.RegisterCallback((int)NFLoginModule.Event.LoginSuccess, OnLoginSuccess);
            mEventModule.RegisterCallback((int)NFLoginModule.Event.WorldList, OnWorldList);
            mEventModule.RegisterCallback((int)NFLoginModule.Event.ServerList, OnServerList);
            mEventModule.RegisterCallback((int)NFLoginModule.Event.SelectServerSuccess, OnSelectServer);
            mEventModule.RegisterCallback((int)NFLoginModule.Event.RoleList, OnRoleList);
        }