Эх сурвалжийг харах

Merge remote-tracking branch 'origin/master' into ios

gfg 1 жил өмнө
parent
commit
1b766be930

+ 8 - 20
GameClient/Assets/Game/Launcher/LauncherConfig.cs

@@ -4,7 +4,7 @@ namespace GFGGame
 {
     public class LauncherConfig
     {
-        public enum EnumNetType { DEV, LOCAL, TEMP, TISHEN }
+        public enum EnumNetType { LOCAL, TEMP, TISHEN, PUBLIC }
         public static EnumNetType netType = EnumNetType.LOCAL;
         public static string cfgName;
 
@@ -39,30 +39,21 @@ namespace GFGGame
         public static string apkVersion;
         public static int serverStatus;
         public static int onDebug;
-        public static string manifest_v;
         public static string privacy_v;
 
-        public static string resKey
-        {
-            get
-            {
-#if PT_TEMP || PT_TISHEN || PT_DEV
-                return "dfs";
-#else
-                return null;
-#endif
-            }
-        }
-
         public static void InitScriptCompilation()
         {
 #if PT_DEV
             //外网dev版本
-            netType = EnumNetType.DEV;
+            netType = EnumNetType.TEMP;
             cfgName = "cfg_dev";
 #elif PT_TEMP
             netType = EnumNetType.TEMP;
             cfgName = "cfg_temp";
+#elif PT_IOS
+            netType == EnumNetType.TEMP;
+            cfgName = "cfg_ios";
+            platformId = 2;
 #elif PT_TISHEN
             netType = EnumNetType.TISHEN;
             cfgName = "cfg_ts";
@@ -71,15 +62,14 @@ namespace GFGGame
             cfgName = "cfg_local";
 #endif
 
-
-            if (cfgName == "cfg_local")
+            if (netType == EnumNetType.LOCAL)
             {
                 launcherRootUrl = "http://10.108.64.189:81/";
                 cfgUrl = launcherRootUrl + "platform/{cfgName}.json";
             }
             else
             {
-                launcherRootUrl = "http://gfg1.obs.cn-north-4.myhuaweicloud.com/14/";
+                launcherRootUrl = "http://gfg1.obs.cn-north-4.myhuaweicloud.com/gameRes/";
                 cfgUrl = launcherRootUrl + "platform/{cfgName}.json";
             }
         }
@@ -95,7 +85,6 @@ namespace GFGGame
             LauncherConfig.apkVersion = result.apkVersion;
             LauncherConfig.serverStatus = int.Parse(result.serverStatus);
             LauncherConfig.onDebug = int.Parse(result.onDebug);
-            LauncherConfig.manifest_v = result.manifest_v;
             LauncherConfig.privacy_v = result.privacy_v;
         }
 
@@ -106,7 +95,6 @@ namespace GFGGame
             public string apkVersion;
             public string serverStatus;
             public string onDebug;
-            public string manifest_v;
             public string privacy_v;
         }
 

+ 1 - 1
GameClient/Assets/Game/Launcher/Version/VersionController.cs

@@ -193,7 +193,7 @@ namespace GFGGame
 		if (Application.platform == RuntimePlatform.Android)
 			return $"{hostServerIP}/Android/{packageName}";
 		else if (Application.platform == RuntimePlatform.IPhonePlayer)
-			return $"{hostServerIP}/IPhone/{packageName}";
+			return $"{hostServerIP}/IOS/{packageName}";
 		else if (Application.platform == RuntimePlatform.WebGLPlayer)
 			return $"{hostServerIP}/WebGL/{packageName}";
 		else

+ 6 - 1
GameClient/Assets/Game/Launcher/Views/FullScreenTextView.cs

@@ -89,7 +89,12 @@ namespace GFGGame
                 default:
                     return;
             }
-            string url = LauncherConfig.launcherRootUrl + $"privacy/{fileName}.txt?v={LauncherConfig.privacy_v}";
+            string privacyDirName = "privacy";
+            if (LauncherConfig.platformId == 2)
+            {
+                privacyDirName += LauncherConfig.platformId;
+            }
+            string url = LauncherConfig.launcherRootUrl + $"{privacyDirName}/{fileName}.txt?v={LauncherConfig.privacy_v}";
             HttpTool.Instance.Get(url, (string content) =>
             {
                 _ui.m_txtComp.m_txtContent.text = content;