QDManagerInit.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using UnityEngine;
  2. using UniFramework.Event;
  3. namespace GFGGame.Launcher
  4. {
  5. public class QDManagerInit
  6. {
  7. public static void InitPlatform()
  8. {
  9. switch (LauncherConfig.ChannelId)
  10. {
  11. case (int)ChannelID.AppStore:
  12. QDAppStoreManagerInit.InitPlatform();
  13. break;
  14. default:
  15. UniEvent.SendMessage(new LauncherEvent.InitPlatformResult() { success = true});
  16. break;
  17. }
  18. }
  19. public static void UpdateApp()
  20. {
  21. switch(LauncherConfig.ChannelId)
  22. {
  23. case (int)ChannelID.AppStore:
  24. QDAppStoreManagerInit.UpdateApp();
  25. break;
  26. default:
  27. if (string.IsNullOrEmpty(LauncherConfig.updateAppPrompt))
  28. {
  29. LauncherConfig.updateAppPrompt = "需要安装新的安装包,请联系研发获取。";
  30. }
  31. Alert.Show(LauncherConfig.updateAppPrompt)
  32. .SetLeftButton(true, "知道了", (data) =>
  33. {
  34. Application.Quit();
  35. });
  36. break;
  37. }
  38. }
  39. }
  40. }