12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- var t = require;
- var e = module;
- var i = exports;
- e =
- (this && this.__decorate) ||
- function(t, e, i, s) {
- var o,
- a = arguments.length,
- n = a < 3 ? e : null === s ? (s = Object.getOwnPropertyDescriptor(e, i)) : s;
- if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) n = Reflect.decorate(t, e, i, s);
- else
- for (var r = t.length - 1; 0 <= r; r--)
- (o = t[r]) && (n = (a < 3 ? o(n) : 3 < a ? o(e, i, n) : o(e, i)) || n);
- return 3 < a && n && Object.defineProperty(e, i, n), n;
- };
- Object.defineProperty(i, "__esModule", { value: !0 });
- const s = t("App"),
- o = t("GameText"),
- a = t("BaseView"),
- n = t("GameConst"),
- { ccclass: r, property: l, menu: h } = cc._decorator;
- t = class extends a.default {
- constructor() {
- super(...arguments),
- (this.curIconSpr = null),
- (this.curNameLab = null),
- (this.nextNameLab = null),
- (this.nextIconSpr = null),
- (this.arrowNode = null),
- (this.arrowArray = []),
- (this.arrowTime = 0.5),
- (this.arrowIndex = 0),
- (this.bgType = 1),
- (this.closeType = 2);
- }
- open(t) {
- super.open();
- var e = s.default.ConfigManager.getConfig("StageSet")[t],
- t = s.default.ConfigManager.getConfig("StageSet")[t + 1];
- (this.curNameLab.string = o.GameText.getTextByStr(e.stage_name)),
- (this.nextNameLab.string = o.GameText.getTextByStr(t.stage_name)),
- s.default.CommonUtils.setSpriteFrameByBundle(
- n.BundleType.MAP_ICON,
- "stage/" + e.stage_icon,
- this.curIconSpr
- ),
- s.default.CommonUtils.setSpriteFrameByBundle(
- n.BundleType.MAP_ICON,
- "stage/" + t.stage_icon,
- this.nextIconSpr
- );
- }
- update(t) {
- (this.arrowTime -= t),
- this.arrowTime <= 0 &&
- ((this.arrowTime = 0.5),
- this.arrowIndex++,
- (t = this.arrowIndex % 3),
- (this.arrowNode.x = this.arrowArray[t].x),
- (this.arrowNode.y = this.arrowArray[t].y));
- }
- };
- e([l(cc.Sprite)], t.prototype, "curIconSpr", void 0),
- e([l(cc.Label)], t.prototype, "curNameLab", void 0),
- e([l(cc.Label)], t.prototype, "nextNameLab", void 0),
- e([l(cc.Sprite)], t.prototype, "nextIconSpr", void 0),
- e([l(cc.Node)], t.prototype, "arrowNode", void 0),
- e([l([cc.Node])], t.prototype, "arrowArray", void 0),
- (t = e([r], t)),
- (i.default = t);
|