12345678910111213141516171819202122232425262728293031323334 |
- // Learn TypeScript:
- // - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
- // Learn Attribute:
- // - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
- // Learn life-cycle callbacks:
- // - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
- const { ccclass, property } = cc._decorator;
- @ccclass
- export default class NewClass extends cc.Component {
- @property(cc.Label)
- label: cc.Label = null;
- @property
- text: string = 'hello';
- // LIFE-CYCLE CALLBACKS:
- // onLoad () {}
- start() {
- }
- clickmaks() {
- this.node.parent.active=false
- }
- // update (dt) {}
- }
|