import UserManager from "../Manager/UserManager"; const {ccclass, property} = cc._decorator; @ccclass export default class CaiShangTip extends cc.Component { data_ = null destroyNode = null addMoney = 0 start () { } setTipView(destroyNode, addMoney){ this.destroyNode = destroyNode this.addMoney = addMoney } sureClickEvent(){ UserManager.addMoney(this.addMoney) this.destroyNode.removeFromParent() this.destroyNode.destroy() this.node.removeFromParent() } cancleClickEvent(){ this.node.removeFromParent() } // update (dt) {} }