var t = require; var e = module; var i = exports; var s, 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}); t("LayerManager"); const o = t("App"), {ccclass: a, property: n} = cc._decorator; t = s = class extends cc.Component { constructor() { super(...arguments), (this.bgSp = null), (this.msgLab = null), (this.msgList = []); } static launch(t, e = 1e3) { this.instance.launch(t, e); } onLoad() { (this.node.zIndex = 200), ((s.instance = this).node.active = !1), this.node.removeFromParent(!1); } launch(t, e = 1e3) { this.showMsg({msg: t, waitTime: e}); } checkMsg(e) { if (!this.curMsg || this.curMsg.msg != e.msg) { var i = this.msgList.length; for (let t = 0; t < i; t++) { var s = this.msgList[t].msg; if (e.msg === s) return; } this.msgList.push(e); } } showMsg(t) { this.isShow && this.node.removeFromParent(!0), t && ((this.isShow = !0), (this.msgLab.string = t.msg), this.node.parent || o.default.ViewManager.uiRoot.addChild(this.node), (this.node.active = !0), (this.node.opacity = 0), (this.tw = cc .tween(this.node) .to(0.7, {opacity: 255}, {easing: cc.easing.quadOut}) .delay(t.waitTime / 1e3) .to(0.8, {opacity: 0}, {easing: cc.easing.circIn}) .call(() => { (this.node.active = !1), (this.isShow = !1), this.node.removeFromParent(!0); }) .start())); } }; e([n(cc.Sprite)], t.prototype, "bgSp", void 0), e([n(cc.Label)], t.prototype, "msgLab", void 0), (t = s = e([a], t)), (i.default = t = s);