guodong 2 lat temu
rodzic
commit
ab1e2ca796

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

@@ -63,6 +63,11 @@
             }
         }
 
+        public static void Pay(int buyID, int count)
+        {
+
+        }
+
         public static void Logout()
         {
             switch (LauncherConfig.ChannelId)
@@ -96,5 +101,13 @@
                 return LauncherConfig.ChannelId == ChannelID.BiliBili;
             }
         }
+
+        public static bool IsHuaWei
+        {
+            get
+            {
+                return LauncherConfig.ChannelId == ChannelID.HUAWEI;
+            }
+        }
     }
 }

+ 1 - 10
GameClient/Assets/Game/Launcher/LauncherConfig.cs

@@ -24,7 +24,7 @@ namespace GFGGame
         //平台id
         public static int platformId = 1;
         //渠道id
-        public static int ChannelId = 1;
+        public static int ChannelId = 101;
         public static string logApiRootUrl;
         public static string logApiReportLauncherUrl;
         public static string apkVersion;
@@ -62,15 +62,6 @@ namespace GFGGame
 #endif
 
 
-#if QD_TAPTAP
-            ChannelId = 1;
-#elif QD_HYKB
-            ChannelId = 2;
-#elif QD_BILIBILI
-            ChannelId = 3;
-#else
-            ChannelId = 101;
-#endif
             if (cfgName == "cfg_local")
             {
                 cfgUrl = "http://10.108.64.189:81/platform/{cfgName}.json";

+ 35 - 0
GameClient/Assets/Game/Launcher/Platform/ChannelID.cs

@@ -5,6 +5,41 @@
         public const int TapTap = 1;
         public const int HYKB = 2;
         public const int BiliBili = 3;
+        public const int HUAWEI = 4;
         public const int Test = 101;
+
+        public static int GetQuickChannelID(int gameChannelID)
+        {
+            switch(gameChannelID)
+            {
+                case HYKB:
+                    return QuickChannelID.HYKB;
+                case BiliBili:
+                    return QuickChannelID.BiliBili;
+                case HUAWEI:
+                    return QuickChannelID.HUAWEI;
+            }
+            return 0;
+        }
+
+        public static int GetGameChannelID(int quickChannelID)
+        {
+            switch (quickChannelID)
+            {
+                case QuickChannelID.HYKB:
+                    return HYKB;
+                case QuickChannelID.BiliBili:
+                    return BiliBili;
+                case QuickChannelID.HUAWEI:
+                    return HUAWEI;
+            }
+            return 0;
+        }
+    }
+    public class QuickChannelID
+    {
+        public const int HYKB = 2258;
+        public const int BiliBili = 114;
+        public const int HUAWEI = 24;
     }
 }