1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- // Learn cc.Class:
- // - https://docs.cocos.com/creator/manual/en/scripting/class.html
- // Learn Attribute:
- // - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
- // Learn life-cycle callbacks:
- // - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
- cc.Class({
- extends: cc.Component,
- properties: {
- giveUp: cc.Node,
- addPrice: cc.Node,
- dialog:cc.Node,
- text:cc.Label,
- time:cc.Node,
- countdown:0,
-
- },
- // LIFE-CYCLE CALLBACKS:
- // onLoad () {},
- start () {
- // this.text.string = "起拍价5W" // 场景文本框为 显示5
- // this.countdown = 0;
- // if (this.countdown >= 0) {
- // this.schedule(function () { // 计时器将每隔 1s 执行一次。
-
- // this.textChane();
- // this.text.string = '现在拍卖开始!';
- // if(this.countdown==2){
- // this.node.destroy();
-
- // this.dialog.active = true
- // }
- // }, 2);
- // }
-
-
-
- },
- textChane(){
- this.countdown = this.countdown + 1;
- }
- // update (dt) {},
- });
|