using UnityEngine; using UniFramework.Event; namespace GFGGame.Launcher { public class QDManagerInit { public static void InitPlatform() { switch (LauncherConfig.ChannelId) { case (int)ChannelID.DouYouTest: QDDouYouManagerInit.Instance.InitSDK(QDDouYouManagerInit.Instance.GetAdId()); QDShareManagerInit.Instance.InitSDK(); break; default: UniEvent.SendMessage(new LauncherEvent.InitPlatformResult() { success = true }); QDShareManagerInit.Instance.InitSDK(); break; } } public static void UpdateApp() { switch (LauncherConfig.ChannelId) { default: if (!string.IsNullOrEmpty(LauncherConfig.updateUrl)) { if (string.IsNullOrEmpty(LauncherConfig.updateAppPrompt)) { LauncherConfig.updateAppPrompt = "需要安装新的安装包。"; } Alert.Show(LauncherConfig.updateAppPrompt) .SetLeftButton(true, "前往更新", (data) => { Application.OpenURL(LauncherConfig.updateUrl); }); } else { if (string.IsNullOrEmpty(LauncherConfig.updateAppPrompt)) { LauncherConfig.updateAppPrompt = "需要安装新的安装包,请联系研发获取。"; } Alert.Show(LauncherConfig.updateAppPrompt) .SetLeftButton(true, "知道了", (data) => { Application.Quit(); }); } break; } } } }