LauncherController.cs 872 B

123456789101112131415161718192021222324252627282930313233343536
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace GFGGame
  7. {
  8. public class LauncherController
  9. {
  10. public static void AfterVersion()
  11. {
  12. if (LocalCache.GetBool(LauncherConfig.LAST_LOGIN_IS_AGREE_KEY, false))
  13. {
  14. StartGame();
  15. }
  16. else
  17. {
  18. LauncherView.Instance.SetDesc("");
  19. LauncherAgreeView.Instance.Open(() => {
  20. StartGame();
  21. });
  22. }
  23. }
  24. public static void StartGame()
  25. {
  26. LauncherView.Instance.SetDesc($"正在启动游戏...");
  27. LauncherView.Instance.SetProgress(100, () =>
  28. {
  29. HotUpdateCodeLoader.Instance.StartLoad();
  30. });
  31. }
  32. }
  33. }