|
|
@@ -5,22 +5,19 @@
|
|
|
// Learn life-cycle callbacks:
|
|
|
// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
|
|
|
|
|
|
-const {ccclass, property} = cc._decorator;
|
|
|
+const { ccclass, property } = cc._decorator;
|
|
|
|
|
|
@ccclass
|
|
|
-export default class NewClass extends cc.Component {
|
|
|
+export default class reward extends cc.Component {
|
|
|
|
|
|
- @property(cc.Label)
|
|
|
- label: cc.Label = null;
|
|
|
+ @property({ displayName: '领取按钮', type: cc.Button })
|
|
|
+ private btn_receive: cc.Button = null;
|
|
|
|
|
|
- @property
|
|
|
- text: string = 'hello';
|
|
|
+ onLoad() {
|
|
|
|
|
|
- // LIFE-CYCLE CALLBACKS:
|
|
|
-
|
|
|
- // onLoad () {}
|
|
|
+ }
|
|
|
|
|
|
- start () {
|
|
|
+ start() {
|
|
|
|
|
|
}
|
|
|
|