25 lines
382 B
JavaScript
25 lines
382 B
JavaScript
cc.Class({
|
|
extends: cc.Component,
|
|
|
|
properties: {
|
|
closeBtn: {
|
|
default: null,
|
|
type: cc.Node
|
|
}
|
|
},
|
|
|
|
// LIFE-CYCLE CALLBACKS:
|
|
|
|
onLoad () {
|
|
let self = this;
|
|
this.closeBtn.on('click', function () {
|
|
self.node.removeFromParent(true);
|
|
})
|
|
},
|
|
|
|
start () {
|
|
},
|
|
|
|
// update (dt) {},
|
|
});
|