QDManagerInit.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using UnityEngine;
  2. namespace GFGGame.Launcher
  3. {
  4. public class QDManagerInit
  5. {
  6. public static void InitPlatform()
  7. {
  8. switch (LauncherConfig.ChannelId)
  9. {
  10. default:
  11. QDDouYouManagerInit.Instance.InitSDK(QDDouYouManagerInit.Instance.GetAdId());
  12. QDShareManagerInit.Instance.InitSDK();
  13. break;
  14. }
  15. }
  16. public static void UpdateApp()
  17. {
  18. switch (LauncherConfig.ChannelId)
  19. {
  20. default:
  21. if (!string.IsNullOrEmpty(LauncherConfig.updateUrl))
  22. {
  23. if (string.IsNullOrEmpty(LauncherConfig.updateAppPrompt))
  24. {
  25. LauncherConfig.updateAppPrompt = "需要安装新的安装包。";
  26. }
  27. Alert.Show(LauncherConfig.updateAppPrompt)
  28. .SetLeftButton(true, "前往更新", (data) => { Application.OpenURL(LauncherConfig.updateUrl); });
  29. }
  30. else
  31. {
  32. if (string.IsNullOrEmpty(LauncherConfig.updateAppPrompt))
  33. {
  34. LauncherConfig.updateAppPrompt = "需要安装新的安装包,请联系研发获取。";
  35. }
  36. Alert.Show(LauncherConfig.updateAppPrompt)
  37. .SetLeftButton(true, "知道了", (data) => { Application.Quit(); });
  38. }
  39. break;
  40. }
  41. }
  42. }
  43. }