var t = require; var e = module; var i = exports; Object.defineProperty(i, "__esModule", {value: !0}); const s = t("App"), o = t("LabelTip"), a = t("SoundEffectConst"), n = t("GlobalAttr"), r = t("MyBigLong"), l = t("CurrencyService"), h = t("MapService"); i.default = class { constructor(t) { (this.value = 0), (this.ani = null), (this.effect = null), (this.isPlaying = !1), (this.goldLab = null), (this.deskNode = null), (this.pos = t); } addValue(t) { if (!this.ani) { const t = s.default.NodePoolMsr.tipAniPool.pop(); this.deskNode.addChild(t), (t.position = this.pos), (t.y = this.pos.y + 10 - this.deskNode.y), (t.x -= this.deskNode.x), (this.ani = t.getComponent(cc.Animation)), t.on(cc.Node.EventType.TOUCH_END, this.onTouchTap, this), (this.goldLab = t.getComponentInChildren(cc.Label)); } this.isPlaying || 0 !== this.value || this.ani.play("idle"), (this.ani.node.active = !0), (this.value += t), (this.goldLab.string = r.default.toString(this.value)); } onPlayFinish() { this.ani.play("idle"); } onTouchTap() { s.default.SoundManager.playEffect(a.SoundsDefine.GET_COIN2), this.ani.stop(), (this.ani.node.active = !1); let t = this.value, e = r.default.toString(this.value); 1 < n.default.ins.moneyRate && ((t = Math.floor(t * n.default.ins.moneyRate)), (e = r.default.toString(t))), l.default.ins.moneyChange(t), s.default.NodePoolMsr.flyLabel .pop() .getComponent(o.default) .init(h.default.ins.uiLayer, e, 35) .flyUp(this.pos.x, this.pos.y + 100, !0), (this.value = 0); const i = s.default.NodePoolMsr.getCoinEffect.pop(); (i.position = this.pos), h.default.ins.uiLayer.addChild(i); } };