config.ts 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. import { _decorator } from 'cc';
  2. const { ccclass, property } = _decorator;
  3. export class config {
  4. static debug = true;
  5. static domain = config.debug ? "https://zcapi.xwrun.com" : "https://zcapi.hainanmlwl.com";
  6. static static_domain = config.debug ? "https://zcapi.xwrun.com" : "https://zaoca.oss-cn-beijing.aliyuncs.com";
  7. static statistics_domain = config.debug ? "http://logads.xwrun.com" : "https://logads.hainanmlwl.com";
  8. static version = "v1.0.0";
  9. static hav_no_allAd = false;
  10. static static_url = {
  11. category: "/zcstatic/category.json", //玩法静态接口
  12. user_test: "/zcstatic/user_test.json", //测试用户
  13. levels: (category_id, page) => {
  14. return `/zcstatic/levels/${category_id}_${page}.json`; //关卡列表-双图对比找不同
  15. },
  16. levels_info: (category_id, id) => {
  17. return `/zcstatic/levels_info/${category_id}_${id}.json`; //玩法详情
  18. }
  19. };
  20. static api_url = {
  21. login: "/user/login",
  22. get_open_id: "/dyin/get_open_id",
  23. sync_data: "/user/sync_data",
  24. can_ju: "/ending/index",
  25. sign_status: "/user/sign_status",
  26. }
  27. static statistics_url = {
  28. rewardVideo_data: '/zcadspush',
  29. }
  30. static EVENT_MSG = {
  31. ON_INIT_GAME_LIST: "ON_INIT_GAME_LIST",
  32. ON_CHANGE_COIN_NUMBER: "ON_CHANGE_COIN_NUMBER",
  33. ON_BACK_HOME_VIEW: "ON_BACK_HOME_VIEW",
  34. ON_UPDATE_HOME_VIEW: "ON_UPDATE_HOME_VIEW",
  35. ON_SHOW_REWARD_VIEW: "ON_SHOW_REWARD_VIEW",
  36. ON_USER_LOGIN_SUCCESS: "ON_USER_LOGIN_SUCCESS"
  37. }
  38. static PREFAB_PATH = {
  39. play_list_item: "prefabs/play_list_item",
  40. game_play_shuang_tu_zhao_bu_tong: "prefabs/game_play_shuang_tu_zhao_bu_tong",
  41. game_play_han_zi_zhao_bu_tong: "prefabs/game_play_han_zi_zhao_bu_tong",
  42. game_play_mei_nv_zhao_xi_jie: "prefabs/game_play_mei_nv_zhao_xi_jie",
  43. setting: "prefabs/setting",
  44. view_loading: "prefabs/view_loading",
  45. toast: "prefabs/toast",
  46. dialog: "prefabs/dialog",
  47. Lack: "prefabs/Lack",
  48. circle: "prefabs/circle",
  49. guid: "prefabs/guid",
  50. win: "prefabs/win",
  51. fail: "prefabs/fail",
  52. pause: "prefabs/pause",
  53. game_play_dou_di_zhu: "prefabs/game_play_dou_di_zhu",
  54. game_play_shuang_tu_zhao_xiang_tong: "prefabs/game_play_shuang_tu_zhao_xiang_tong",
  55. game_play_ji_yi_li: "prefabs/game_play_ji_yi_li",
  56. game_play_zhao_bu_tong: "prefabs/game_play_zhao_bu_tong",
  57. reward_box_page: "prefabs/reward_box_page",
  58. }
  59. static MSG_CODE = {
  60. SUCCESS: 10000,
  61. }
  62. static PLAY_TYPE = {
  63. YI_QI_ZHAO_CHA: 1,
  64. HAN_ZI_ZHAO_BU_TONG: 2,
  65. MEI_NV_ZHAO_XI_JIE: 3,
  66. ZHAO_XIANG_TONG: 6,
  67. ZHAO_BU_TONG: 7,
  68. DOU_DI_ZHU: 8,
  69. JI_YI_LI: 9,
  70. }
  71. static ABCD_LIST = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'];
  72. static USER_ID = "USER_ID"
  73. static POOL_KEY = "font_item"
  74. static MP3_PATH = {
  75. BGM_MUSIC: "bg_music",
  76. SOUND_BTN: "sound_btn",
  77. SOUND_ERR: "sound_err",
  78. SOUND_FAIL: "sound_fail",
  79. SOUND_RIGHT: "sound_right",
  80. SOUND_WIN: "sound_win",
  81. }
  82. static rewardVideoAdUnitId = {
  83. Earn_coins_AdUnitId: "5rl14207ajg50uh3mh", //赚金币-激励视频
  84. Tip_AdUnitId: "2ys751adu3106j544k", //提示-激励视频
  85. Prolong_AdUnitId: "562cehe6a7k24i74a7", //延长时间-激励视频
  86. Super_double_AdUnitId: "6g0edggi82lh3dk933", //超级加倍-激励视频
  87. Resume_AdUnitId: "8d19519ih5ab5msq6n",//重新开始-激励视频
  88. }
  89. static EnvCard2RealCard = {
  90. 3: '3', 4: '4', 5: '5', 6: '6', 7: '7',
  91. 8: '8', 9: '9', 10: 'T', 11: 'J', 12: 'Q',
  92. 13: 'K', 14: 'A', 17: '2', 20: 'X', 30: 'D'
  93. };
  94. static ddz_res_path = "ddz/"
  95. static fullDoudizhuDeckIndex = {
  96. X: 54,
  97. D: 53,
  98. S2: 52,
  99. C2: 51,
  100. H2: 50,
  101. D2: 49,
  102. SA: 48,
  103. CA: 47,
  104. HA: 46,
  105. DA: 45,
  106. SK: 44,
  107. CK: 43,
  108. HK: 42,
  109. DK: 41,
  110. SQ: 40,
  111. CQ: 39,
  112. HQ: 38,
  113. DQ: 37,
  114. SJ: 36,
  115. CJ: 35,
  116. HJ: 34,
  117. DJ: 33,
  118. ST: 32,
  119. CT: 31,
  120. HT: 30,
  121. DT: 29,
  122. S9: 28,
  123. C9: 27,
  124. H9: 26,
  125. D9: 25,
  126. S8: 24,
  127. C8: 23,
  128. H8: 22,
  129. D8: 21,
  130. S7: 20,
  131. C7: 19,
  132. H7: 18,
  133. D7: 17,
  134. S6: 16,
  135. C6: 15,
  136. H6: 14,
  137. D6: 13,
  138. S5: 12,
  139. C5: 11,
  140. H5: 10,
  141. D5: 9,
  142. S4: 8,
  143. C4: 7,
  144. H4: 6,
  145. D4: 5,
  146. S3: 4,
  147. C3: 3,
  148. H3: 2,
  149. D3: 1,
  150. };
  151. static MIN_SINGLE_CARDS = 5;// 最小的连组合
  152. static MIN_PAIRS = 3; // 最小的连队组合
  153. static MIN_TRIPLES = 2; // 最小的飞机组合
  154. //# action types
  155. static TYPE_0_PASS = 0
  156. static TYPE_1_SINGLE = 1
  157. static TYPE_2_PAIR = 2
  158. static TYPE_3_TRIPLE = 3
  159. static TYPE_4_BOMB = 4
  160. static TYPE_5_KING_BOMB = 5
  161. static TYPE_6_3_1 = 6
  162. static TYPE_7_3_2 = 7
  163. static TYPE_8_SERIAL_SINGLE = 8 //顺子
  164. static TYPE_9_SERIAL_PAIR = 9 // 2连对
  165. static TYPE_10_SERIAL_TRIPLE = 10 // 飞机
  166. static TYPE_11_SERIAL_3_1 = 11
  167. static TYPE_12_SERIAL_3_2 = 12
  168. static TYPE_13_4_2 = 13
  169. static TYPE_14_4_22 = 14
  170. static TYPE_15_WRONG = 15
  171. public static sync_data_type = {
  172. ALL: 0,
  173. COIN: 1,
  174. LEVELS: 2,
  175. }
  176. static STATISTICS_ACTION_TYPE = {
  177. UNKNOWN: 0, //未知
  178. ZHUAN_JIN_BI: 1, //赚金币
  179. JIE_SUO: 2, //解锁
  180. YAN_CHANG: 3, //延长
  181. CHONG_XIN_KAI_SHI: 4, //重新开始
  182. TI_SHI: 5, //提示
  183. CHAO_JI_JIA_BEI: 6, //超级加倍
  184. }
  185. static SIGN_STATUS_TYPE = {
  186. GET: 0,
  187. SYNC: 1,
  188. }
  189. }