QDManager.cs 3.2 KB

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