浏览代码

添加渠道退出

guodong 1 年之前
父节点
当前提交
a2002ac79b

+ 6 - 0
GameClient/Assets/Game/HotUpdate/Controller/GameController.cs

@@ -337,5 +337,11 @@ namespace GFGGame
             ViewManager.Show<MainUIView>(null, null, true);
         }
 
+        public static void ShowExitAlert()
+        {
+            AlertSystem.Show("我会想你的")
+                    .SetLeftButton(true, "继续游戏")
+                    .SetRightButton(true, "退出游戏", (object data) => { Application.Quit(); });
+        }
     }
 }

+ 13 - 0
GameClient/Assets/Game/HotUpdate/Platform/QDManager.cs

@@ -83,6 +83,19 @@
             }
         }
 
+        public static void Exit()
+        {
+            switch (LauncherConfig.ChannelId)
+            {
+                case (int)ChannelID.Test:
+                    GameController.ShowExitAlert();
+                    break;
+                default:
+
+                    break;
+            }
+        }
+
         public static bool IsTaptap
         {
             get

+ 1 - 3
GameClient/Assets/Game/HotUpdate/Views/MainUI/MainUIView.cs

@@ -697,9 +697,7 @@ namespace GFGGame
         {
             if (Input.GetKeyDown(KeyCode.Escape) || Input.GetKeyDown(KeyCode.Home))
             {
-                AlertSystem.Show("我会想你的")
-                    .SetLeftButton(true, "继续游戏")
-                    .SetRightButton(true, "退出游戏", (object data) => { Application.Quit(); });
+                QDManager.Exit();
             }
         }