Commit a8822d9f authored by liujiangnan's avatar liujiangnan

debug

parent 228b26b3
......@@ -64,13 +64,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
onLoadEnd() {
cc.macro.ENABLE_MULTI_TOUCH = false;
// TODO 加载完成后的逻辑写在这里, 下面的代码仅供参考
this.initData();
this.initView();
this.initEvent();
this.startTime();
this.updateTop();
// cc.macro.ENABLE_MULTI_TOUCH = false;
// // TODO 加载完成后的逻辑写在这里, 下面的代码仅供参考
// this.initData();
// this.initView();
// this.initEvent();
// this.startTime();
// this.updateTop();
}
protected onDestroy(): void {
cc.Tween.stopAll();
......@@ -233,12 +233,12 @@ export default class SceneComponent extends MyCocosSceneComponent {
private startSecond: boolean;
update(dt) {
if (Game.getIns().state != GAME_STATE.RUNNING) return;
if (!this.startSecond) return;
this.timeSecond = this.timeSecond + dt;
let count = Math.ceil(this.timeSecond);
let str = this.formatSeconds(count);
this.label_time.getComponent(cc.Label).string = str;
// if (Game.getIns().state != GAME_STATE.RUNNING) return;
// if (!this.startSecond) return;
// this.timeSecond = this.timeSecond + dt;
// let count = Math.ceil(this.timeSecond);
// let str = this.formatSeconds(count);
// this.label_time.getComponent(cc.Label).string = str;
}
private formatSeconds(value) {
var secondTime = parseInt(value);// 秒
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment