Пример #1
0
    public void OnGameSessionReset(SessionObject obj)
    {
        m_pSession = obj;
        m_pSession.m_pfOnConnect.Add(OnConnect);
        m_pSession.m_pfOnError.Add(OnError);
        m_pSession.m_pfOnClose.Add(OnClose);

        m_pSession.RegistMessage("GameProto.PlayerRequestGameTest", OnPlayerRequestGameTest);
    }
Пример #2
0
    public void OnLoginSessionReset(SessionObject obj)
    {
        m_pSession = obj;
        m_pSession.m_pfOnConnect.Add(OnConnect);
        m_pSession.m_pfOnError.Add(OnError);
        m_pSession.m_pfOnClose.Add(OnClose);

        m_pSession.RegistMessage("GameProto.LoginAckPlayerServerId", OnLoginAckPlayerServerId);
        m_pSession.RegistMessage("GameProto.LoginAckPlayerLoginResult", OnLoginAckPlayerLoginResult);
        m_pSession.RegistMessage("GameProto.LoginAckPlayerMakeTeam", OnLoginAckPlayerMakeTeam);
        m_pSession.RegistMessage("GameProto.LoginAckPlayerInviteTeam", OnLoginAckPlayerInviteTeam);
        m_pSession.RegistMessage("GameProto.LoginAckPlayerGameStart", OnLoginAckPlayerGameStart);
        m_pSession.RegistMessage("GameProto.LoginNotifyPlayerGameKick", OnLoginNotifyPlayerGameKick);
        m_pSession.RegistMessage("GameProto.LoginAckPlayerOnLinePlayer", OnLoginAckPlayerOnLinePlayer);
        m_pSession.RegistMessage("GameProto.LoginNotifyPlayerInviteTeam", OnLoginNotifyPlayerInviteTeam);
        m_pSession.RegistMessage("GameProto.LoginNotifyPlayerTeamInfo", OnLoginNotifyPlayerTeamInfo);
        m_pSession.RegistMessage("GameProto.LoginAckPlayerEnterTeam", OnLoginAckPlayerEnterTeam);
    }
Пример #3
0
    public void OnGameSessionReset(SessionObject obj)
    {
        m_pSession = obj;
        m_pSession.pro_cbOnConnect.Add(OnConnect);
        m_pSession.pro_cbfOnError.Add(OnError);
        m_pSession.pro_cbOnClose.Add(OnClose);

        m_pSession.RegistMessage("GameProto.PlayerRequestGameTest", OnPlayerRequestGameTest);
        m_pSession.RegistMessage("GameProto.GameAckPlayerEnter", OnGameAckPlayerEnter);
        m_pSession.RegistMessage("GameProto.GameNotifyPlayerPrepareTime", OnGameNotifyPlayerPrepareTime);
        m_pSession.RegistMessage("GameProto.GameNotifyPlayerGameReadyTime", OnGameNotifyPlayerGameReadyTime);
        m_pSession.RegistMessage("GameProto.GameNotifyPlayerGameConfig", OnGameNotifyPlayerGameConfig);
        m_pSession.RegistMessage("GameProto.GameNotifyPlayerGameRoleData", OnGameNotifyPlayerGameRoleData);
        m_pSession.RegistMessage("GameProto.GameNotifyPlayerGameSceneInfo", OnGameNotifyPlayerGameSceneInfo);
        m_pSession.RegistMessage("GameProto.GameNotifyPlayerGameState", OnGameNotifyPlayerGameState);
        m_pSession.RegistMessage("GameProto.GameNotifyPlayerGameInitTetris", OnGameNotifyPlayerGameInitTetris);
        m_pSession.RegistMessage("GameProto.GameNotifyPlayerGameTetrisData", OnGameNotifyPlayerGameTetrisData);
        m_pSession.RegistMessage("GameProto.GameNotifyPlayeMove", OnGameNotifyPlayeMove);
        m_pSession.RegistMessage("GameProto.GameNotifyPlayeRotation", OnGameNotifyPlayeRotation);
        m_pSession.RegistMessage("GameProto.GameNotifyPlayerNextTetris", OnGameNotifyPlayerNextTetris);
        m_pSession.RegistMessage("GameProto.GameNotifyPlayerDead", OnGameNotifyPlayerDead);
        m_pSession.RegistMessage("GameProto.GameNotifyPlayeGameEnd", OnGameNotifyPlayeGameEnd);
    }