Browse Source

弹窗优化

guodong 1 năm trước cách đây
mục cha
commit
9cfcffd9bb

+ 3 - 2
GameClient/Assets/Game/HotUpdate/HotUpdateDriver.cs

@@ -1,4 +1,5 @@
-using System.Collections;
+using GFGGame.Launcher;
+using System.Collections;
 using UniFramework.Pooling;
 using UniFramework.Pooling;
 using UnityEngine;
 using UnityEngine;
 using YooAsset;
 using YooAsset;
@@ -80,7 +81,7 @@ namespace GFGGame
                 LogUtil.LogDev($"版本对比: {oldVersion} {operation.PackageVersion}");
                 LogUtil.LogDev($"版本对比: {oldVersion} {operation.PackageVersion}");
                 if(!operation.PackageVersion.Equals(oldVersion))
                 if(!operation.PackageVersion.Equals(oldVersion))
                 {
                 {
-                    AlertSystem.Show("游戏已有更新,您可以立即重启游戏获取最佳游戏体验,也可以稍后重启更新。")
+                    Alert.Show("游戏已有更新,您可以立即重启游戏获取最佳游戏体验,也可以稍后重启更新。")
                         .SetLeftButton(true, "稍后更新")
                         .SetLeftButton(true, "稍后更新")
                         .SetRightButton(true, "重启游戏", (obj)=> 
                         .SetRightButton(true, "重启游戏", (obj)=> 
                         {
                         {

+ 14 - 0
GameClient/Assets/Game/HotUpdate/Views/Login/LoginView.cs

@@ -2,6 +2,7 @@ using UnityEngine;
 using FairyGUI;
 using FairyGUI;
 using UI.Login;
 using UI.Login;
 using ET;
 using ET;
+using GFGGame.Launcher;
 
 
 namespace GFGGame
 namespace GFGGame
 {
 {
@@ -194,6 +195,19 @@ namespace GFGGame
 
 
         private void TryLogin()
         private void TryLogin()
         {
         {
+            if (LauncherConfig.serverStatus == 1)
+            {
+                if (string.IsNullOrEmpty(LauncherConfig.statusPrompt))
+                {
+                    LauncherConfig.statusPrompt = "游戏正在维护中,请稍后再试。";
+                }
+                Alert.Show(LauncherConfig.statusPrompt)
+                    .SetLeftButton(true, "知道了", (data) =>
+                    {
+                        Application.Quit();
+                    });
+                return;
+            }
             var serverInfosComponent = GameGlobal.zoneScene.GetComponent<ServerInfosComponent>();
             var serverInfosComponent = GameGlobal.zoneScene.GetComponent<ServerInfosComponent>();
             if (serverInfosComponent.ServerInfoList.Count <= 0)
             if (serverInfosComponent.ServerInfoList.Count <= 0)
             {
             {