mirror of
https://github.com/Leo501/CocosCreatorTutorial.git
synced 2026-05-08 14:48:40 +08:00
39 lines
341 B
JavaScript
39 lines
341 B
JavaScript
cc.Class({
|
|
extends: cc.Component,
|
|
|
|
properties: {
|
|
|
|
},
|
|
|
|
onLoad() {
|
|
this.registerEvent();
|
|
},
|
|
|
|
registerEvent() {
|
|
|
|
},
|
|
|
|
init(data) {
|
|
|
|
},
|
|
|
|
update(dt) {
|
|
|
|
},
|
|
|
|
onEnable() {
|
|
this.registerEvent();
|
|
},
|
|
|
|
onDisable() {
|
|
this.offEvent();
|
|
},
|
|
|
|
offEvent() {
|
|
cc.emitter.offThis(this);
|
|
},
|
|
|
|
onDestroy() {
|
|
|
|
}
|
|
}); |