QDManagerInit.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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(LauncherConfig.douYouAdId);
  12. break;
  13. }
  14. }
  15. public static void UpdateApp()
  16. {
  17. switch (LauncherConfig.ChannelId)
  18. {
  19. default:
  20. if (!string.IsNullOrEmpty(LauncherConfig.updateUrl))
  21. {
  22. if (string.IsNullOrEmpty(LauncherConfig.updateAppPrompt))
  23. {
  24. LauncherConfig.updateAppPrompt = "需要安装新的安装包。";
  25. }
  26. Alert.Show(LauncherConfig.updateAppPrompt)
  27. .SetLeftButton(true, "前往更新", (data) => { Application.OpenURL(LauncherConfig.updateUrl); });
  28. }
  29. else
  30. {
  31. if (string.IsNullOrEmpty(LauncherConfig.updateAppPrompt))
  32. {
  33. LauncherConfig.updateAppPrompt = "需要安装新的安装包,请联系研发获取。";
  34. }
  35. Alert.Show(LauncherConfig.updateAppPrompt)
  36. .SetLeftButton(true, "知道了", (data) => { Application.Quit(); });
  37. }
  38. break;
  39. }
  40. }
  41. }
  42. }