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.
30 lines
546 B
30 lines
546 B
|
|
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()
|
|
}
|
|
}
|
|
|