ca28dc3f-4245-4ff4-8a64-35120da35f83.js 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472
  1. "use strict";
  2. cc._RF.push(module, 'ca28dw/QkVP9IpkNRINo1+D', 'YZ_Constant');
  3. // common-plugin/Scripts/YZ_Constant.ts
  4. "use strict";
  5. var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
  6. var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  7. if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  8. else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  9. return c > 3 && r && Object.defineProperty(target, key, r), r;
  10. };
  11. Object.defineProperty(exports, "__esModule", { value: true });
  12. exports.BannerLocationToEnum = exports.BannerLocationToString = exports.AttributedValue = exports.AttributedKey = exports.AttributedType = exports.AldEventType = exports.AldStageType = exports.ViewLocation = exports.BannerLocation = exports.VibrateType = exports.SubLocation = exports.LevelStatus = exports.YZ_Reward = exports.RewardType = exports.BeForGameOverAdId = void 0;
  13. var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
  14. /**
  15. * banner 的位置
  16. */
  17. var BeForGameOverAdId;
  18. (function (BeForGameOverAdId) {
  19. BeForGameOverAdId["None"] = "none";
  20. /**
  21. * 分享
  22. */
  23. BeForGameOverAdId["SharePanel"] = "share_panel";
  24. /**
  25. * 宝箱
  26. */
  27. BeForGameOverAdId["GoldBox"] = "gold_box";
  28. /**
  29. * 抽奖
  30. */
  31. BeForGameOverAdId["Turntable"] = "turntable";
  32. /**
  33. * 创建快捷桌面
  34. */
  35. BeForGameOverAdId["CreateShortCut"] = "create_short_cut";
  36. /**
  37. * 更多游戏推荐
  38. */
  39. BeForGameOverAdId["RecGame"] = "rec_game";
  40. /**
  41. * 幸运宝箱
  42. */
  43. BeForGameOverAdId["LuckBox"] = "luck_box";
  44. /**
  45. * 同步显示
  46. */
  47. BeForGameOverAdId["SyncShow"] = "sync_show";
  48. /**
  49. * 模版广告
  50. */
  51. BeForGameOverAdId["CustomAd"] = "custom_ad";
  52. })(BeForGameOverAdId = exports.BeForGameOverAdId || (exports.BeForGameOverAdId = {}));
  53. ;
  54. /**
  55. * banner 的位置
  56. */
  57. var RewardType;
  58. (function (RewardType) {
  59. /**
  60. * 金币
  61. */
  62. RewardType["Gold"] = "gold";
  63. /**
  64. * 皮肤
  65. */
  66. RewardType["Skin"] = "Skin";
  67. })(RewardType = exports.RewardType || (exports.RewardType = {}));
  68. ;
  69. var YZ_Reward = /** @class */ (function () {
  70. function YZ_Reward() {
  71. /**
  72. * 奖励类型
  73. */
  74. this.rewardType = RewardType.Gold;
  75. /**
  76. * 奖励值
  77. */
  78. this.rewardValue = 0;
  79. }
  80. YZ_Reward = __decorate([
  81. ccclass("YZ_Reward")
  82. ], YZ_Reward);
  83. return YZ_Reward;
  84. }());
  85. exports.YZ_Reward = YZ_Reward;
  86. /**
  87. * 上报关卡的类型
  88. * start、complete、fail 、skip
  89. */
  90. var LevelStatus;
  91. (function (LevelStatus) {
  92. /**
  93. * 游戏开始
  94. */
  95. LevelStatus["GameStart"] = "start";
  96. /**
  97. * 游戏胜利
  98. */
  99. LevelStatus["GameWin"] = "complete";
  100. /**
  101. * 游戏失败
  102. */
  103. LevelStatus["GameFail"] = "fail";
  104. /**
  105. * 跳过关卡
  106. */
  107. LevelStatus["GameSkip"] = "skip";
  108. })(LevelStatus = exports.LevelStatus || (exports.LevelStatus = {}));
  109. /**
  110. * 组件类型
  111. */
  112. var SubLocation;
  113. (function (SubLocation) {
  114. /**
  115. * 当前显示的位置
  116. * isReward //激励插屏
  117. * isQCross //6个互推组件
  118. * isMoreGame //更多游戏
  119. * isStatement //结算组件
  120. * isTryGame //试玩组件
  121. * isYzBanner //自定义banner
  122. * isScrollbar //自定义滚动条
  123. * isVerticalPanel //竖状互推
  124. */
  125. /**
  126. * 激励插屏
  127. */
  128. SubLocation["isReward"] = "isReward";
  129. /**
  130. * 6个互推组件
  131. */
  132. SubLocation["isQCross"] = "isQCross";
  133. /**
  134. * 更多游戏
  135. */
  136. SubLocation["isMoreGame"] = "isMoreGame";
  137. /**
  138. * 结算组件
  139. */
  140. SubLocation["isStatement"] = "isStatement";
  141. /**
  142. * 试玩组件
  143. */
  144. SubLocation["isTryGame"] = "isTryGame";
  145. /**
  146. * 自定义banner
  147. */
  148. SubLocation["isYzBanner"] = "isYzBanner";
  149. /**
  150. * 自定义滚动条
  151. */
  152. SubLocation["isScrollbar"] = "isScrollbar";
  153. /**
  154. * 退出弹窗
  155. */
  156. SubLocation["isGameExitDialog"] = "isGameExitDialog";
  157. /**
  158. * 盒子插屏
  159. */
  160. SubLocation["isBoxInsertAd"] = "isBoxInsertAd";
  161. /**
  162. * 结算前广告
  163. */
  164. SubLocation["isBeforGameOverAd"] = "isBeforGameOverAd";
  165. /**
  166. * 竖状互推
  167. */
  168. SubLocation["isVerticalPanel"] = "isVerticalPanel";
  169. })(SubLocation = exports.SubLocation || (exports.SubLocation = {}));
  170. /**
  171. * 震动类型
  172. */
  173. var VibrateType;
  174. (function (VibrateType) {
  175. /**
  176. * 短振
  177. */
  178. VibrateType["Short"] = "short";
  179. /**
  180. * 长振
  181. */
  182. VibrateType["Long"] = "long";
  183. })(VibrateType = exports.VibrateType || (exports.VibrateType = {}));
  184. /**
  185. * banner 的位置
  186. */
  187. var BannerLocation;
  188. (function (BannerLocation) {
  189. BannerLocation[BannerLocation["None"] = 0] = "None";
  190. BannerLocation[BannerLocation["Home"] = 1] = "Home";
  191. BannerLocation[BannerLocation["Level"] = 2] = "Level";
  192. BannerLocation[BannerLocation["Skin"] = 3] = "Skin";
  193. BannerLocation[BannerLocation["Game"] = 4] = "Game";
  194. BannerLocation[BannerLocation["Pause"] = 5] = "Pause";
  195. BannerLocation[BannerLocation["Over"] = 6] = "Over";
  196. })(BannerLocation = exports.BannerLocation || (exports.BannerLocation = {}));
  197. ;
  198. /**
  199. * 视窗 的位置
  200. */
  201. var ViewLocation;
  202. (function (ViewLocation) {
  203. ViewLocation[ViewLocation["None"] = 0] = "None";
  204. ViewLocation[ViewLocation["sign"] = 1] = "sign";
  205. ViewLocation[ViewLocation["trySkin"] = 2] = "trySkin";
  206. ViewLocation[ViewLocation["box"] = 3] = "box";
  207. ViewLocation[ViewLocation["over"] = 4] = "over";
  208. ViewLocation[ViewLocation["failBox"] = 5] = "failBox";
  209. ViewLocation[ViewLocation["successBox"] = 6] = "successBox";
  210. ViewLocation[ViewLocation["winPanel"] = 7] = "winPanel";
  211. ViewLocation[ViewLocation["turntable"] = 8] = "turntable";
  212. })(ViewLocation = exports.ViewLocation || (exports.ViewLocation = {}));
  213. ;
  214. /**
  215. * 阿拉丁关卡上报类型
  216. */
  217. var AldStageType;
  218. (function (AldStageType) {
  219. /**
  220. * 游戏开始
  221. */
  222. AldStageType["Start"] = "StartGame";
  223. /**
  224. * 游戏进行中
  225. */
  226. AldStageType["Running"] = "Running";
  227. /**
  228. * 游戏胜利
  229. */
  230. AldStageType["GameWin"] = "GameWin";
  231. /**
  232. * 游戏失败
  233. */
  234. AldStageType["GameFail"] = "GameFail";
  235. })(AldStageType = exports.AldStageType || (exports.AldStageType = {}));
  236. /**
  237. * 阿拉丁事件上报的类型
  238. */
  239. var AldEventType;
  240. (function (AldEventType) {
  241. /**
  242. * 点击皮肤试用
  243. */
  244. AldEventType["TrailSkinClick"] = "\u76AE\u80A4\u8BD5\u7528\u70B9\u51FB";
  245. /**
  246. * 皮肤试用成功
  247. */
  248. AldEventType["TrailSkinSuccess"] = "\u76AE\u80A4\u8BD5\u7528\u6210\u529F";
  249. /**
  250. * 皮肤试用失败
  251. */
  252. AldEventType["TrailSkinFail"] = "\u76AE\u80A4\u8BD5\u7528\u5931\u8D25";
  253. /**
  254. * 点击跳过关卡
  255. */
  256. AldEventType["SkipLevelClick"] = "\u70B9\u51FB\u8DF3\u8FC7\u5173\u5361";
  257. /**
  258. * 跳过关卡成功
  259. */
  260. AldEventType["SkipLevelSuccess"] = "\u8DF3\u8FC7\u5173\u5361\u6210\u529F";
  261. /**
  262. * 跳过关卡
  263. */
  264. AldEventType["SkipLevelFail"] = "\u8DF3\u8FC7\u5173\u5361\u5931\u8D25";
  265. /**
  266. * 点击游戏结束双倍获取金币
  267. */
  268. AldEventType["GameOverDoubleGoldClick"] = "\u70B9\u51FB\u6E38\u620F\u7ED3\u675F\u53CC\u500D\u83B7\u53D6\u91D1\u5E01";
  269. /**
  270. * 游戏结束双倍获取金币成功
  271. */
  272. AldEventType["GameOverDoubleGoldSuccess"] = "\u6E38\u620F\u7ED3\u675F\u53CC\u500D\u83B7\u53D6\u91D1\u5E01\u6210\u529F";
  273. /**
  274. * 游戏结束双倍获取金币失败
  275. */
  276. AldEventType["GameOverDoubleGoldFail"] = "\u6E38\u620F\u7ED3\u675F\u53CC\u500D\u83B7\u53D6\u91D1\u5E01\u5931\u8D25";
  277. /**
  278. * 点击签到获取双倍金币
  279. */
  280. AldEventType["SignDoubleGoldClick"] = "\u70B9\u51FB\u7B7E\u5230\u53CC\u500D\u9886\u53D6";
  281. /**
  282. * 签到获取双倍金币成功
  283. */
  284. AldEventType["SignDoubleGoldSuccess"] = "\u7B7E\u5230\u53CC\u500D\u9886\u53D6\u6210\u529F";
  285. /**
  286. * 签到获取双倍金币失败
  287. */
  288. AldEventType["SignDoubleGoldFail"] = "\u7B7E\u5230\u53CC\u500D\u9886\u53D6\u5931\u8D25";
  289. /**
  290. * 游戏结束晋级三星
  291. */
  292. AldEventType["GameOverDoubleStarClick"] = "\u70B9\u51FB\u6E38\u620F\u7ED3\u675F\u664B\u7EA7\u4E09\u661F";
  293. /**
  294. * 游戏结束晋级三星
  295. */
  296. AldEventType["GameOverDoubleStarSuccess"] = "\u6E38\u620F\u7ED3\u675F\u664B\u7EA7\u4E09\u661F\u6210\u529F";
  297. /**
  298. * 游戏结束晋级三星
  299. */
  300. AldEventType["GameOverDoubleStarFail"] = "\u6E38\u620F\u7ED3\u675F\u664B\u7EA7\u4E09\u661F\u5931\u8D25";
  301. /**
  302. * 游戏版本
  303. * 游戏加载成功后上报
  304. */
  305. AldEventType["GameVersion"] = "\u6E38\u620F\u7248\u672C";
  306. /**
  307. * 进入皮肤场景
  308. */
  309. AldEventType["LoadSkinScene"] = "\u8FDB\u5165\u76AE\u80A4\u573A\u666F";
  310. /**
  311. * 购买皮肤成功
  312. */
  313. AldEventType["PaySkin"] = "\u8D2D\u4E70\u76AE\u80A4\u6210\u529F";
  314. })(AldEventType = exports.AldEventType || (exports.AldEventType = {}));
  315. ;
  316. /**
  317. * 归因事件类型
  318. */
  319. var AttributedType;
  320. (function (AttributedType) {
  321. /**
  322. * 激活
  323. */
  324. AttributedType[AttributedType["Active"] = 0] = "Active";
  325. /**
  326. * 关键行为
  327. */
  328. AttributedType[AttributedType["GameAddiction"] = 25] = "GameAddiction";
  329. })(AttributedType = exports.AttributedType || (exports.AttributedType = {}));
  330. ;
  331. /**
  332. * 归因事件Key
  333. */
  334. var AttributedKey;
  335. (function (AttributedKey) {
  336. /**
  337. * 激活
  338. */
  339. AttributedKey["Active"] = "active";
  340. /**
  341. * 关键行为
  342. */
  343. AttributedKey["GameAddiction"] = "game_addiction";
  344. })(AttributedKey = exports.AttributedKey || (exports.AttributedKey = {}));
  345. ;
  346. /**
  347. * 归因事件Key
  348. *
  349. * user_click_insert_ad_active:"true" //用户点击插屏之后上报激活
  350. play_level_count_active:5 //验证当前闯关次数是否达到激活用户的条件
  351. pass_level_count_active:5 //验证当前通关次数是否达到激活用户的条件
  352. insert_ad_first_show_active: "true" //插屏首次展示成功是否上报激活事件
  353. */
  354. var AttributedValue;
  355. (function (AttributedValue) {
  356. /**
  357. * 激活
  358. */
  359. AttributedValue["Active"] = "active";
  360. /**
  361. * 关键行为-用户点击插屏之后上报激活
  362. */
  363. AttributedValue["UserClickInsertAdAction"] = "user_click_insert_ad_action";
  364. /**
  365. * 关键行为-当前闯关次数行为
  366. */
  367. AttributedValue["PlayLevelCountAction"] = "play_level_count_action";
  368. /**
  369. * 关键行为-当前通过关卡次数行为
  370. */
  371. AttributedValue["PassLevelCountAction"] = "pass_level_count_action";
  372. /**
  373. * 关键行为-插屏首次展示成功行为
  374. */
  375. AttributedValue["InsertAdFirstShowAction"] = "insert_ad_first_show_action";
  376. /**
  377. * 关键行为-游戏时长行为
  378. */
  379. AttributedValue["GameTimeAction"] = "game_time_action";
  380. })(AttributedValue = exports.AttributedValue || (exports.AttributedValue = {}));
  381. ;
  382. /**
  383. * BannerLocation 转换成对应的字符串
  384. * @param location
  385. */
  386. exports.BannerLocationToString = function (location) {
  387. var str = ["none", "home", "level", "skin", "game", "pause", "over"];
  388. return str[location];
  389. };
  390. /**
  391. * Location字符串转换成对应的BannerLocation
  392. * @param locationString
  393. */
  394. exports.BannerLocationToEnum = function (locationString) {
  395. var str = ["none", "home", "level", "skin", "game", "pause", "over"];
  396. for (var i = 0; i < str.length; i++) {
  397. if (str[i] == locationString) {
  398. return i;
  399. }
  400. }
  401. return BannerLocation.None;
  402. };
  403. var YZ_Constant = /** @class */ (function () {
  404. function YZ_Constant() {
  405. }
  406. // 接口版本号
  407. YZ_Constant.SERVER_VERSION = "v1";
  408. // 常量定义
  409. // 设备UID
  410. YZ_Constant.ST_UID = "UID";
  411. // 服务器UID
  412. YZ_Constant.ST_SERVICE_UID = "SERVICE_UID";
  413. // 用户来源
  414. YZ_Constant.ST_SOURCE = "SOURCE";
  415. // 红包当前进度
  416. YZ_Constant.ST_RED_BAG_PROGRESS = "YZ_RED_BAG_PROGRESS";
  417. // 红包总进度
  418. YZ_Constant.ST_RED_BAG_TOTAL_PROGRESS = "YZ_RED_BAG_TOTAL_PROGRESS";
  419. // 红包余额
  420. YZ_Constant.ST_RED_BAG_BALANCE = "YZ_RED_BAG_BALANCE";
  421. // 红包总金额
  422. YZ_Constant.ST_RED_BAG_TOTAL_MONEY = "YZ_RED_BAG_TOTAL_MONEY";
  423. // 免费红包领取时间
  424. YZ_Constant.ST_FREE_RED_BAG_TIME = "YZ_ST_FREE_RED_BAG_TIME";
  425. // 最后领取红包的关卡
  426. YZ_Constant.ST_LAST_OPEN_LEVEL = "YZ_ST_LAST_OPEN_LEVEL";
  427. // 宝箱获取奖励的次数
  428. YZ_Constant.ST_GET_BOX_REWARD_COUNT = "YZ_GET_BOX_REWARD_COUNT";
  429. // 红包进度
  430. // public static ST_RED_BAG_PROGRESS: string = "YZ_RED_BAG_PROGRESS";
  431. // 组件事件定义
  432. YZ_Constant.YZ_EventCommon = "YZ_EventCommon";
  433. YZ_Constant.YZ_PrivacyClose = "YZ_PrivacyClose";
  434. YZ_Constant.EC_ServerInit = "ServerInit";
  435. YZ_Constant.EC_RealNameAuthPanelClose = "RealNameAuthPanelClose";
  436. /**
  437. * 服务器数据拉取成功
  438. */
  439. YZ_Constant.EC_ServerDataLoadSuccess = "ServerDataLoadSuccess";
  440. YZ_Constant.YZ_NativeAdClick = "YZ_NativeAdClick";
  441. YZ_Constant.EC_OnHide = "EventOnHide";
  442. YZ_Constant.EC_OnShow = "EventOnShow";
  443. YZ_Constant.YZ_GAME_YSXY = "YZ_GAME_YSXY";
  444. // 是否上报激活
  445. YZ_Constant.ST_IS_REPORT_USER_ACTIVE = "ST_IS_REPORT_USER_ACTIVE";
  446. // 是否上报关键激活
  447. YZ_Constant.ST_IS_REPORT_GAME_ADDICTION = "ST_IS_REPORT_GAME_ADDICTION";
  448. // 启动类型
  449. YZ_Constant.ST_LUANCH_TYPE = "ST_LUANCH_TYPE";
  450. // 启动参数
  451. YZ_Constant.ST_LUANCH_DATA = "ST_LUANCH_DATA";
  452. // 登录成功
  453. YZ_Constant.ST_LOGIN_SUCCESS = "ST_LOGIN_SUCCESS";
  454. // 登录失败
  455. YZ_Constant.ST_LOGIN_FAIL = "ST_LOGIN_FAIL";
  456. // 设备ID
  457. YZ_Constant.ST_DEVICE_ID = "ST_DEVICE_ID";
  458. // 本地UUID
  459. YZ_Constant.ST_UUID = "ST_UUID";
  460. // 优玩UID
  461. YZ_Constant.ST_YOUWAN_UID = "ST_YOUWAN_UID";
  462. // 是否有获取过device_id
  463. YZ_Constant.ST_GET_DEVICE_ID = "ST_GET_DEVICE_ID";
  464. YZ_Constant = __decorate([
  465. ccclass
  466. ], YZ_Constant);
  467. return YZ_Constant;
  468. }());
  469. exports.default = YZ_Constant;
  470. cc._RF.pop();