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}), (i.MoneyAni = void 0); const a = t("App"), s = t("SwitchFrame"), n = t("MyBigLong"), r = t("SoundEffectConst"), {ccclass: o, property: l} = cc._decorator; t = class extends cc.Component { constructor() { super(...arguments), (this.moneyAni = null), (this.lightAni = null), (this.switchFrame = null), (this.numLab = null), (this.pos = null), (this.callBack = null), (this.moveTime = 0.5); } onLoad() { this.moneyAni.on(cc.Animation.EventType.FINISHED, this.onMoneyAniFinish, this), this.lightAni.on(cc.Animation.EventType.FINISHED, this.onLightAniFinish, this); } playAni(t, e, i, s, o = 0) { a.default.SoundManager.playEffect(1 === e ? r.SoundsDefine.GET_COIN1 : r.SoundsDefine.GET_COIN2), (this.moneyAni.node.active = !0), (this.node.scale = 1), (this.switchFrame.frameIndex = e), (this.callBack = s), (this.pos = t), (this.moveTime = i), o ? ((this.numLab.node.active = !0), (this.numLab.string = n.default.toString(o))) : (this.numLab.node.active = !1), this.moneyAni.play("work"); } onMoneyAniFinish() { cc.tween(this.node) .delay(0.5) .call(() => { this.numLab.node.active = !1; }) .to(this.moveTime, {position: this.pos, scale: 0.2}) .call(() => { (this.node.scale = 1), (this.moneyAni.node.active = !1), (this.lightAni.node.active = !0), this.lightAni.play("work"); }) .start(); } onLightAniFinish() { (this.moneyAni.node.active = !1), this.callBack && this.callBack(), (this.callBack = null); } }; e([l(cc.Animation)], t.prototype, "moneyAni", void 0), e([l(cc.Animation)], t.prototype, "lightAni", void 0), e([l(s.default)], t.prototype, "switchFrame", void 0), e([l(cc.Label)], t.prototype, "numLab", void 0), (t = e([o], t)), (i.MoneyAni = t);