QDManager.cs 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. namespace GFGGame
  2. {
  3. public class QDManager
  4. {
  5. public static bool isInited = false;
  6. public static void InitPlatform()
  7. {
  8. ViewManager.Show<ModalStatusView>("正在初始化...");
  9. switch (LauncherConfig.ChannelId)
  10. {
  11. default:
  12. EventAgent.DispatchEvent(ConstMessage.ON_PLATFORM_SDK_INITED, true);
  13. break;
  14. }
  15. }
  16. public static void Login()
  17. {
  18. ViewManager.Show<ModalStatusView>("登录中...");
  19. switch (LauncherConfig.ChannelId)
  20. {
  21. default:
  22. bool login = GameController.CheckLoginCache(true);
  23. if (!login)
  24. {
  25. ViewManager.Hide<ModalStatusView>();
  26. ViewManager.Show<LoginInputView>();
  27. }
  28. break;
  29. }
  30. }
  31. public static void OnCreateRole()
  32. {
  33. switch (LauncherConfig.ChannelId)
  34. {
  35. default:
  36. break;
  37. }
  38. }
  39. public static void OnEnterGame()
  40. {
  41. switch (LauncherConfig.ChannelId)
  42. {
  43. default:
  44. break;
  45. }
  46. }
  47. //回到登录界面,不退出账号
  48. public static void OnQuitToLoginView()
  49. {
  50. switch (LauncherConfig.ChannelId)
  51. {
  52. default:
  53. break;
  54. }
  55. }
  56. public static void Pay(int buyID, int count, string orderID, long Price)
  57. {
  58. switch (LauncherConfig.ChannelId)
  59. {
  60. default:
  61. break;
  62. }
  63. }
  64. public static void Logout()
  65. {
  66. switch (LauncherConfig.ChannelId)
  67. {
  68. default:
  69. break;
  70. }
  71. }
  72. public static void Exit()
  73. {
  74. switch (LauncherConfig.ChannelId)
  75. {
  76. case (int)ChannelID.Test:
  77. GameController.ShowExitAlert();
  78. break;
  79. default:
  80. break;
  81. }
  82. }
  83. public static bool IsTaptap
  84. {
  85. get
  86. {
  87. return LauncherConfig.ChannelId == (int)ChannelID.TapTap;
  88. }
  89. }
  90. public static bool IsHYKB
  91. {
  92. get
  93. {
  94. return LauncherConfig.ChannelId == (int)ChannelID.HYKB;
  95. }
  96. }
  97. public static bool IsBiliBili
  98. {
  99. get
  100. {
  101. return LauncherConfig.ChannelId == (int)ChannelID.BiliBili;
  102. }
  103. }
  104. public static bool IsHuaWei
  105. {
  106. get
  107. {
  108. return LauncherConfig.ChannelId == (int)ChannelID.HUAWEI;
  109. }
  110. }
  111. }
  112. }