123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- System.register(["__unresolved_0", "cc", "__unresolved_1", "__unresolved_2", "__unresolved_3"], function (_export, _context) {
- "use strict";
- var _reporterNs, _cclegacy, __checkObsolete__, __checkObsoleteInNamespace__, _decorator, Sprite, Label, ListItem, ResUtil, i18n, _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor, _descriptor2, _descriptor3, _crd, ccclass, property, StoreItem;
- function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
- function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
- function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'transform-class-properties is enabled and runs after the decorators transform.'); }
- function _reportPossibleCrUseOfListItem(extras) {
- _reporterNs.report("ListItem", "../../third/ListItem", _context.meta, extras);
- }
- function _reportPossibleCrUseOfResUtil(extras) {
- _reporterNs.report("ResUtil", "../../utils/ResUtil", _context.meta, extras);
- }
- function _reportPossibleCrUseOfi18n(extras) {
- _reporterNs.report("i18n", "../../core/i18n/runtime-scripts/LanguageData", _context.meta, extras);
- }
- return {
- setters: [function (_unresolved_) {
- _reporterNs = _unresolved_;
- }, function (_cc) {
- _cclegacy = _cc.cclegacy;
- __checkObsolete__ = _cc.__checkObsolete__;
- __checkObsoleteInNamespace__ = _cc.__checkObsoleteInNamespace__;
- _decorator = _cc._decorator;
- Sprite = _cc.Sprite;
- Label = _cc.Label;
- }, function (_unresolved_2) {
- ListItem = _unresolved_2.default;
- }, function (_unresolved_3) {
- ResUtil = _unresolved_3.ResUtil;
- }, function (_unresolved_4) {
- i18n = _unresolved_4.default;
- }],
- execute: function () {
- _crd = true;
- _cclegacy._RF.push({}, "390ceHQHaxHOp6g08qalaRU", "StoreItem", undefined);
- __checkObsolete__(['_decorator', 'Sprite', 'Label']);
- ({
- ccclass,
- property
- } = _decorator); //商店数据
- _export("StoreItem", StoreItem = (_dec = ccclass('StoreItem'), _dec2 = property({
- type: Sprite,
- tooltip: "道具图标"
- }), _dec3 = property({
- type: Label,
- tooltip: "道具描述"
- }), _dec4 = property({
- type: Label,
- tooltip: "看广告的次数"
- }), _dec(_class = (_class2 = class StoreItem extends (_crd && ListItem === void 0 ? (_reportPossibleCrUseOfListItem({
- error: Error()
- }), ListItem) : ListItem) {
- constructor() {
- super(...arguments);
- _initializerDefineProperty(this, "s_icon", _descriptor, this);
- _initializerDefineProperty(this, "s_des_lable", _descriptor2, this);
- _initializerDefineProperty(this, "video_label", _descriptor3, this);
- this.data = null;
- this.cb = null;
- }
- /**
- * 看视频
- */
- clikItemVideo() {
- var _this$cb;
- if (!this.data) return;
- (_this$cb = this.cb) == null || _this$cb.call(this, this.data, this.s_icon.node);
- }
- /**
- * 数据填充
- * @param data 数据
- * @param cb 回调
- */
- init(data, cb) {
- if (!data) return;
- this.data = data;
- this.cb = cb; //敌人投降
- (_crd && ResUtil === void 0 ? (_reportPossibleCrUseOfResUtil({
- error: Error()
- }), ResUtil) : ResUtil).setSpriteFrame(data.icon, this.s_icon); //道具描述
- this.s_des_lable.string = (_crd && i18n === void 0 ? (_reportPossibleCrUseOfi18n({
- error: Error()
- }), i18n) : i18n).isZh ? data.des : data.des_lang; //看广告的次数
- this.video_label.string = data.price_2 + "/" + data.alreadyVideo;
- }
- }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "s_icon", [_dec2], {
- configurable: true,
- enumerable: true,
- writable: true,
- initializer: null
- }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "s_des_lable", [_dec3], {
- configurable: true,
- enumerable: true,
- writable: true,
- initializer: null
- }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "video_label", [_dec4], {
- configurable: true,
- enumerable: true,
- writable: true,
- initializer: null
- })), _class2)) || _class));
- _cclegacy._RF.pop();
- _crd = false;
- }
- };
- });
- //# sourceMappingURL=9de97b6b366ebccd18de90526f04c993513cf0d7.js.map
|