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(); }
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); }
//退出完成逻辑处理// 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(); }
//退出游戏 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 }