CocosCreator-Shader-Effect-.../assets/scripts/MainSceneCtrl.ts
2019-12-10 21:53:09 +08:00

17 lines
292 B
TypeScript

const {ccclass, property} = cc._decorator;
@ccclass
export default class MainSceneCtrl extends cc.Component {
@property(cc.Label)
label: cc.Label = null;
@property
text: string = 'hello';
start () {
// init logic
this.label.string = this.text;
}
}