Пример #1
0
    public static void SendUserLogout()
    {
        CG_ASK_QUIT_GAME packet = (CG_ASK_QUIT_GAME)PacketDistributed.CreatePacket(MessageID.PACKET_CG_ASK_QUIT_GAME);

        packet.Type = (int)CG_ASK_QUIT_GAME.GameSelecTType.GAMESELECTTYPE_ACCOUNT;
        packet.SendPacket();
    }
Пример #2
0
    public void OnPlayerOK()
    {
        CG_ASK_QUIT_GAME packet = (CG_ASK_QUIT_GAME)PacketDistributed.CreatePacket(MessageID.PACKET_CG_ASK_QUIT_GAME);

        packet.Type = (int)CG_ASK_QUIT_GAME.GameSelecTType.GAMESELECTTYPE_ROLE;
        packet.SendPacket();
        UIManager.CloseUI(UIInfo.SystemAndAutoFight);
    }
Пример #3
0
    //退出完成逻辑处理//
    private void onLogout(string jsonLogoutMsg)
    {
        //返回登录界面,释放清除相关资源等//
        // LogModule.DebugLog("----logout");

        CG_ASK_QUIT_GAME packet = (CG_ASK_QUIT_GAME)PacketDistributed.CreatePacket(MessageID.PACKET_CG_ASK_QUIT_GAME);

        packet.Type = (int)CG_ASK_QUIT_GAME.GameSelecTType.GAMESELECTTYPE_QUIT;
        packet.SendPacket();
        Application.Quit();
    }
Пример #4
0
    //退出游戏
    public void OnQuitClick()
    {
#if UNITY_ANDROID && !UNITY_EDITOR
        if (PlatformHelper.GetChannelType() != PlatformHelper.ChannelType.TEST)
        {
            PlatformHelper.UserLogout();
        }
        else
        {
            CG_ASK_QUIT_GAME packet = (CG_ASK_QUIT_GAME)PacketDistributed.CreatePacket(MessageID.PACKET_CG_ASK_QUIT_GAME);
            packet.Type = (int)CG_ASK_QUIT_GAME.GameSelecTType.GAMESELECTTYPE_QUIT;
            packet.SendPacket();
            UIManager.CloseUI(UIInfo.SystemAndAutoFight);
            Application.Quit();
        }
#else
        CG_ASK_QUIT_GAME packet = (CG_ASK_QUIT_GAME)PacketDistributed.CreatePacket(MessageID.PACKET_CG_ASK_QUIT_GAME);
        packet.Type = (int)CG_ASK_QUIT_GAME.GameSelecTType.GAMESELECTTYPE_QUIT;
        packet.SendPacket();
        UIManager.CloseUI(UIInfo.SystemAndAutoFight);
        Application.Quit();
#endif
    }