/** * tips提示 */ const {ccclass, property} = cc._decorator; /** * * 获得道具服饰卡*1: */ @ccclass export default class Tips extends cc.Component { @property(cc.RichText) label: cc.RichText = null; start () { cc.tween(this.node).sequence( cc.delayTime(0.3), cc.spawn( cc.moveBy(2,cc.v2(0,60)).easing(cc.easeSineOut()), cc.fadeOut(2), ), cc.callFunc(()=>{ this.node.destroy(); }) ).start() } public setLabel(str){ this.label.string = str; } }