config.ts 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. import { _decorator, Component, Node } from 'cc';
  2. const { ccclass, property } = _decorator;
  3. @ccclass('config')
  4. export class config {
  5. static debug = true
  6. static gameName = "开局自行车";
  7. static websocket_domain = config.debug?'wss://snakews.xwrun.com':"wss://snakews.hainanmlwl.com"
  8. public static Platform_id = {
  9. browser: "browser",
  10. tt: "douyin",
  11. wx: "wx",
  12. ks: "ks",
  13. }
  14. public static API = {
  15. login : "/snake/user/login",
  16. info : "/snake/user/info",
  17. get_dyopen_id : "/snake/user/get_dyopen_id",
  18. get_wxopen_id : "/snake/user/get_wxopen_id",
  19. get_ksopen_id : "/snake/user/get_ksopen_id",
  20. sync_integral : "/snake/user/sync_integral",
  21. user_ranking : "/snake/user/user_ranking",
  22. user_car_list : "/snake/user/user_car_list",
  23. user_set_region: "/snake/user/set_region",
  24. user_set_default_car_id: "/snake/user/set_default_car_id",
  25. user_update_photo_frame_img: "/snake/user/update_photo_frame_img",
  26. user_quarter_rank: "/snake/user/quarter_rank",
  27. user_quarter_ranking: "/snake/user/quarter_ranking",
  28. unlock_number_status: "/snake/user/unlock_number_status",
  29. feedback: "/snake/user/feedback",
  30. up_feedback_img: "/tool/file/up_feedback_img",
  31. sync_free_number: "/snake/user/sync_free_number",
  32. msg: "/snakestatic/msg.json",
  33. rankings: (region_id)=>{
  34. return `/snakestatic/rankings/${region_id}.json`
  35. },
  36. mail_lists: "/snake/mail/lists",
  37. mail_retrieve: "/snake/mail/retrieve",
  38. mail_del: "/snake/mail/del",
  39. bag_type_list: "/snake/user/bag_type_list",
  40. bag_list: "/snake/user/bag_list",
  41. exchange_car: "/snake/user/exchange_car",
  42. sign_list:"/snake/user/sign_list", //签到列表
  43. user_sign:"/snake/user/sign", //用户签到
  44. user_total_receive:"/snake/user/total_receive", //用户累计签到领取
  45. }
  46. public static STATIC_API = {
  47. sysconfig : "/snakestatic/sysconfig.json",
  48. levels : "/snakestatic/levels.json",
  49. regions : "/snakestatic/regions.json",
  50. car_list : "/snakestatic/car_list.json",
  51. }
  52. public static status = {
  53. SUCCESS:10000
  54. }
  55. public static item_type = {
  56. box_blue:1,
  57. box_zise:2,
  58. box_yellow:3,
  59. box_green:4,
  60. box_red:5,
  61. wall:6,
  62. coin:7,
  63. scores:8,
  64. box_fenhong:9,
  65. box_huanglv:10,
  66. box_qing:11,
  67. box_zi:12,
  68. box_huang:13,
  69. }
  70. public static buff_type = {
  71. dun:1, //盾无敌时间
  72. xing:2, //获取积分翻倍
  73. xi:3 //吸收周边的积分
  74. }
  75. public static collider_dir = {
  76. top:1,
  77. left:2,
  78. right:3
  79. }
  80. public static PREFAB={
  81. game:"prefabs/game"
  82. }
  83. public static AUDIO={
  84. // loading_bgm:"bgm/loading_bgm",
  85. home_bgm:"audio/ad_bgm_home", //主页音效
  86. game_bgm:"audio/ad_bgm_game", //游戏音效
  87. btn:"audio/ad_btn",//按钮
  88. car_jia_su:"audio/ad_car_jia_su",//汽车加速
  89. car_qi_dong:"audio/ad_car_qi_dong", //汽车启动
  90. car_sha_che:"audio/ad_car_sha_che",//汽车刹车
  91. buff_xi:"audio/ad_ci_tie", //buff 吸
  92. buff_dun:"audio/ad_dun",//buff 盾
  93. buff_xing:"audio/ad_xing",//buff 星
  94. win:"audio/ad_win", //失败1
  95. qiyou:"audio/ad_qi_you",//汽油
  96. peng_zhuang:"audio/ad_peng_zhuang",//碰撞
  97. zi_xing_che_qi_bu:"audio/ad_zi_xing_che_qi_bu",
  98. zi_xing_che_sha_che:"audio/ad_zi_xing_che_sha_che",
  99. }
  100. public static UI = {
  101. ui_setting:"ui/setting",
  102. ui_announcement:"ui/announcement",
  103. ui_gameplay_view:"ui/gameplay_view",
  104. ui_select_area:"ui/select_area",
  105. ui_unLock_view:"ui/unLock_view",
  106. ui_user_info_view:"ui/user_info_view",
  107. ui_tips_view:"ui/tips_view",
  108. ui_feedback:"ui/feedback",
  109. ui_restart_view:"ui/restart_view",
  110. ui_car_info:"ui/car_info",
  111. ui_mailbox:"ui/mailbox",
  112. ui_sign_view:"ui/sign_view",
  113. ui_exchange_car_view:"ui/exchange_car_view",
  114. ui_bag_avatar_preview:"ui/bag_avatar_preview",
  115. ui_quarter_rank_view:"ui/quarter_rank_view",
  116. ui_reward_tips_view:"ui/reward_tips_view",
  117. loading_view:"ui/loading_view",
  118. home:"ui/home",
  119. rank:"ui/rank",
  120. car_lib: "ui/car_lib",
  121. bag: "ui/bag",
  122. }
  123. public static SHOW_BUFF_STATUS = {
  124. DUN:0,
  125. XING:1,
  126. XI:2
  127. }
  128. public static UI_EVENT ={
  129. GET_NEW_CAR:"get_new_car",
  130. UPDATE_USER_DEFAULT_CAR:"update_user_default_car",
  131. GAME_OVER_SETTLE_ACCOUNT:"game_over_settle_account",
  132. UPDATE_USER_INFO:"update_user_info",
  133. }
  134. public static EVENT_TYPE = {
  135. MSG_GUANGBO_RANK:"msg_guangbo_rank",
  136. }
  137. public static LOCAL_STORAGE = {
  138. SETTING_DATA: "SETTING_DATA",
  139. USER_FREE_ADS_DATA: 'USER_FREE_ADS_DATA'
  140. }
  141. public static ADS_TYPE = {
  142. UNKNOWN:"UNKNOWN",
  143. GAME_INFINITE_DEGREE_VIDEO:"GAME_INFINITE_DEGREE_VIDEO",
  144. GAME_RELIFE_VIDEO:"GAME_RELIFE_VIDEO",
  145. GAME_RESTART:"GAME_RESTART",
  146. GAME_SIGN_DOUBLE:"GAME_SIGN_DOUBLE",
  147. GAME_SIGN_BUQIAN:"GAME_SIGN_BUQIAN",
  148. }
  149. public static TT_CONFIG = {
  150. SHARE_RELIFE_TITLE:"分享游戏获得复活", //分享复活标题
  151. SHARE_RECORD_VIDEO_ID:"15nc5nd2apoh170on0", //分享录制视频ID
  152. ADS_ID_INFINITE_DEGREE_VIDEO:"c7lih7for4j2vjmllv", //无限次数
  153. ADS_ID_RELIFE_VIDEO:"129f13tkcgi1k9i38h", //游戏看视频复活
  154. ADS_ID_RESTART:"50u85j05scv25idia2", //在玩一局
  155. ADS_ID_SIGN_DOUBLE:"1in5bgcgg9np642ak6", //签到双倍
  156. ADS_ID_SIGN_BUQIAN:"ct7255k7es1w97svm4", //签到补签
  157. }
  158. public static WX_CONFIG = {
  159. SHARE_RELIFE_TITLE:"", //分享复活标题
  160. ADS_ID_INFINITE_DEGREE_VIDEO:"", //无限次数
  161. ADS_ID_RELIFE_VIDEO:"", //游戏看视频复活
  162. ADS_ID_RESTART:"", //在玩一局
  163. ADS_ID_SIGN_DOUBLE:"", //签到双倍
  164. ADS_ID_SIGN_BUQIAN:"", //签到补签
  165. }
  166. public static KS_CONFIG = {
  167. SHARE_RELIFE_TITLE:"", //分享复活标题
  168. ADS_ID_INFINITE_DEGREE_VIDEO:"", //无限次数
  169. ADS_ID_RELIFE_VIDEO:"", //游戏看视频复活
  170. ADS_ID_RESTART:"", //在玩一局
  171. ADS_ID_SIGN_DOUBLE:"", //签到双倍
  172. ADS_ID_SIGN_BUQIAN:"", //签到补签
  173. }
  174. public static USER_TT_SIDEBAR_REWARD = {
  175. GET: 0, //获取
  176. SYNC: 1, //同步
  177. }
  178. }