import Common5 from "../../Platform/th/Common5"; const {ccclass, property} = cc._decorator; @ccclass export default class CommonTextTips extends cc.Component { @property(cc.Node) contentNode: cc.Node = null; @property(cc.Node) contentStr: cc.Node = null; onLoad () { } start () { } initView(contentStr){ this.contentStr.getComponent(cc.Label).string = contentStr this.contentNode.active = true this.contentNode.stopAllActions() cc.tween(this.contentNode) .set({y:0,opacity:255}) .delay(2.5).to(1, { y: 555, opacity: 0 }).call(() => { this.node.removeFromParent() Common5.commonTextTipNode = null }).start(); } }