觉醒时刻
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
juexingshike/assets/Scripts/SCommon/SpecialTipsView.ts

31 lines
546 B

1 week ago
const {ccclass, property} = cc._decorator;
@ccclass
export default class SpecialTipsView extends cc.Component {
@property(cc.Node)
contentStr: cc.Node = null;
callBack = null
onLoad () {
}
start () {
}
initView(contentStr, callBack=null){
this.callBack = callBack
this.contentStr.getComponent(cc.Label).string = contentStr
}
onClose(){
if(this.callBack){
this.callBack()
}
this.node.removeFromParent()
this.node.destroy()
}
}