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);
        }
Exemplo n.º 3
0
 public override void AfterInit()
 {
     mNetModule.AddReceiveCallBack((int)NFMsg.EGameMsgID.AckGateLagTest, EGEC_ACK_GATE_LAG_TEST);
     mNetModule.AddReceiveCallBack((int)NFMsg.EGameMsgID.AckGameLagTest, EGEC_ACK_GAME_LAG_TEST);
 }
Exemplo n.º 4
0
        public override void Init()
        {
            mKernelModule.RegisterClassCallBack(NFrame.Player.ThisName, ClassEventHandler);
            mKernelModule.RegisterClassCallBack(NFrame.NPC.ThisName, ClassEventHandler);

            mNetModule.AddReceiveCallBack((int)NFMsg.EGameMsgID.EventResult, EGMI_EVENT_RESULT);

            mNetModule.AddReceiveCallBack((int)NFMsg.EGameMsgID.AckEnterGame, EGMI_ACK_ENTER_GAME);
            mNetModule.AddReceiveCallBack((int)NFMsg.EGameMsgID.AckSwapScene, EGMI_ACK_SWAP_SCENE);
            mNetModule.AddReceiveCallBack((int)NFMsg.EGameMsgID.AckEnterGameFinish, EGMI_ACK_ENTER_GAME_FINISH);


            mNetModule.AddReceiveCallBack((int)NFMsg.EGameMsgID.AckObjectEntry, EGMI_ACK_OBJECT_ENTRY);
            mNetModule.AddReceiveCallBack((int)NFMsg.EGameMsgID.AckObjectLeave, EGMI_ACK_OBJECT_LEAVE);
            mNetModule.AddReceiveCallBack((int)NFMsg.EGameMsgID.AckMove, EGMI_ACK_MOVE);
            mNetModule.AddReceiveCallBack((int)NFMsg.EGameMsgID.AckMoveImmune, EGMI_ACK_MOVE_IMMUNE);
            mNetModule.AddReceiveCallBack((int)NFMsg.EGameMsgID.AckPosSync, EGMI_ACK_POS_SYNC);

            mNetModule.AddReceiveCallBack((int)NFMsg.EGameMsgID.AckPropertyInt, EGMI_ACK_PROPERTY_INT);
            mNetModule.AddReceiveCallBack((int)NFMsg.EGameMsgID.AckPropertyFloat, EGMI_ACK_PROPERTY_FLOAT);
            mNetModule.AddReceiveCallBack((int)NFMsg.EGameMsgID.AckPropertyString, EGMI_ACK_PROPERTY_STRING);
            mNetModule.AddReceiveCallBack((int)NFMsg.EGameMsgID.AckPropertyObject, EGMI_ACK_PROPERTY_OBJECT);
            mNetModule.AddReceiveCallBack((int)NFMsg.EGameMsgID.AckPropertyVector2, EGMI_ACK_PROPERTY_VECTOR2);
            mNetModule.AddReceiveCallBack((int)NFMsg.EGameMsgID.AckPropertyVector3, EGMI_ACK_PROPERTY_VECTOR3);
            mNetModule.AddReceiveCallBack((int)NFMsg.EGameMsgID.AckPropertyClear, EGMI_ACK_PROPERTY_CLEAR);

            mNetModule.AddReceiveCallBack((int)NFMsg.EGameMsgID.AckRecordInt, EGMI_ACK_RECORD_INT);
            mNetModule.AddReceiveCallBack((int)NFMsg.EGameMsgID.AckRecordFloat, EGMI_ACK_RECORD_FLOAT);
            mNetModule.AddReceiveCallBack((int)NFMsg.EGameMsgID.AckRecordString, EGMI_ACK_RECORD_STRING);
            mNetModule.AddReceiveCallBack((int)NFMsg.EGameMsgID.AckRecordObject, EGMI_ACK_RECORD_OBJECT);
            mNetModule.AddReceiveCallBack((int)NFMsg.EGameMsgID.AckSwapRow, EGMI_ACK_SWAP_ROW);
            mNetModule.AddReceiveCallBack((int)NFMsg.EGameMsgID.AckAddRow, EGMI_ACK_ADD_ROW);
            mNetModule.AddReceiveCallBack((int)NFMsg.EGameMsgID.AckRemoveRow, EGMI_ACK_REMOVE_ROW);
            mNetModule.AddReceiveCallBack((int)NFMsg.EGameMsgID.AckRecordClear, EGMI_ACK_RECORD_CLEAR);

            mNetModule.AddReceiveCallBack((int)NFMsg.EGameMsgID.AckObjectRecordEntry, EGMI_ACK_OBJECT_RECORD_ENTRY);
            mNetModule.AddReceiveCallBack((int)NFMsg.EGameMsgID.AckObjectPropertyEntry, EGMI_ACK_OBJECT_PROPERTY_ENTRY);
            mNetModule.AddReceiveCallBack((int)NFMsg.EGameMsgID.AckDataFinished, EGMI_ACK_DATA_FINISHED);


            mNetModule.AddReceiveCallBack((int)NFMsg.EGameMsgID.AckSkillObjectx, EGMI_ACK_SKILL_OBJECTX);


            ////////////////////////////////////////////////////////////////////////
        }
Exemplo n.º 5
0
        public override void Init()
        {
            mKernelModule.RegisterClassCallBack(NFrame.Player.ThisName, ClassEventHandler);
            mKernelModule.RegisterClassCallBack(NFrame.NPC.ThisName, ClassEventHandler);

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

            mNetModule.AddReceiveCallBack(NFMsg.EGameMsgID.EGMI_ACK_ENTER_GAME, EGMI_ACK_ENTER_GAME);
            //mNetModule.AddReceiveCallBack(NFMsg.EGameMsgID.EGMI_ACK_SWAP_SCENE, EGMI_ACK_SWAP_SCENE);
            mNetModule.AddReceiveCallBack(NFMsg.EGameMsgID.EGMI_ACK_ENTER_GAME_FINISH, EGMI_ACK_ENTER_GAME_FINISH);


            mNetModule.AddReceiveCallBack(NFMsg.EGameMsgID.EGMI_ACK_OBJECT_ENTRY, EGMI_ACK_OBJECT_ENTRY);
            mNetModule.AddReceiveCallBack(NFMsg.EGameMsgID.EGMI_ACK_OBJECT_LEAVE, EGMI_ACK_OBJECT_LEAVE);

            /*
             * mNetModule.AddReceiveCallBack(NFMsg.EGameMsgID.EGMI_ACK_MOVE, EGMI_ACK_MOVE);
             * mNetModule.AddReceiveCallBack(NFMsg.EGameMsgID.EGMI_ACK_MOVE_IMMUNE, EGMI_ACK_MOVE_IMMUNE);
             * mNetModule.AddReceiveCallBack(NFMsg.EGameMsgID.EGMI_ACK_STATE_SYNC, EGMI_ACK_STATE_SYNC);
             * mNetModule.AddReceiveCallBack(NFMsg.EGameMsgID.EGMI_ACK_POS_SYNC, EGMI_ACK_POS_SYNC);
             */
            mNetModule.AddReceiveCallBack(NFMsg.EGameMsgID.EGMI_ACK_PROPERTY_INT, EGMI_ACK_PROPERTY_INT);
            mNetModule.AddReceiveCallBack(NFMsg.EGameMsgID.EGMI_ACK_PROPERTY_FLOAT, EGMI_ACK_PROPERTY_FLOAT);
            mNetModule.AddReceiveCallBack(NFMsg.EGameMsgID.EGMI_ACK_PROPERTY_STRING, EGMI_ACK_PROPERTY_STRING);
            mNetModule.AddReceiveCallBack(NFMsg.EGameMsgID.EGMI_ACK_PROPERTY_OBJECT, EGMI_ACK_PROPERTY_OBJECT);
            mNetModule.AddReceiveCallBack(NFMsg.EGameMsgID.EGMI_ACK_PROPERTY_VECTOR2, EGMI_ACK_PROPERTY_VECTOR2);
            mNetModule.AddReceiveCallBack(NFMsg.EGameMsgID.EGMI_ACK_PROPERTY_VECTOR3, EGMI_ACK_PROPERTY_VECTOR3);

            mNetModule.AddReceiveCallBack(NFMsg.EGameMsgID.EGMI_ACK_RECORD_INT, EGMI_ACK_RECORD_INT);
            mNetModule.AddReceiveCallBack(NFMsg.EGameMsgID.EGMI_ACK_RECORD_FLOAT, EGMI_ACK_RECORD_FLOAT);
            mNetModule.AddReceiveCallBack(NFMsg.EGameMsgID.EGMI_ACK_RECORD_STRING, EGMI_ACK_RECORD_STRING);
            mNetModule.AddReceiveCallBack(NFMsg.EGameMsgID.EGMI_ACK_RECORD_OBJECT, EGMI_ACK_RECORD_OBJECT);
            mNetModule.AddReceiveCallBack(NFMsg.EGameMsgID.EGMI_ACK_SWAP_ROW, EGMI_ACK_SWAP_ROW);
            mNetModule.AddReceiveCallBack(NFMsg.EGameMsgID.EGMI_ACK_ADD_ROW, EGMI_ACK_ADD_ROW);
            mNetModule.AddReceiveCallBack(NFMsg.EGameMsgID.EGMI_ACK_REMOVE_ROW, EGMI_ACK_REMOVE_ROW);

            mNetModule.AddReceiveCallBack(NFMsg.EGameMsgID.EGMI_ACK_OBJECT_RECORD_ENTRY, EGMI_ACK_OBJECT_RECORD_ENTRY);
            mNetModule.AddReceiveCallBack(NFMsg.EGameMsgID.EGMI_ACK_OBJECT_PROPERTY_ENTRY, EGMI_ACK_OBJECT_PROPERTY_ENTRY);
            mNetModule.AddReceiveCallBack(NFMsg.EGameMsgID.EGMI_ACK_DATA_FINISHED, EGMI_ACK_DATA_FINISHED);
        }