Commit a8822d9f authored by liujiangnan's avatar liujiangnan

debug

parent 228b26b3
...@@ -64,13 +64,13 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -64,13 +64,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
} }
onLoadEnd() { onLoadEnd() {
cc.macro.ENABLE_MULTI_TOUCH = false; // cc.macro.ENABLE_MULTI_TOUCH = false;
// TODO 加载完成后的逻辑写在这里, 下面的代码仅供参考 // // TODO 加载完成后的逻辑写在这里, 下面的代码仅供参考
this.initData(); // this.initData();
this.initView(); // this.initView();
this.initEvent(); // this.initEvent();
this.startTime(); // this.startTime();
this.updateTop(); // this.updateTop();
} }
protected onDestroy(): void { protected onDestroy(): void {
cc.Tween.stopAll(); cc.Tween.stopAll();
...@@ -233,12 +233,12 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -233,12 +233,12 @@ export default class SceneComponent extends MyCocosSceneComponent {
private startSecond: boolean; private startSecond: boolean;
update(dt) { update(dt) {
if (Game.getIns().state != GAME_STATE.RUNNING) return; // if (Game.getIns().state != GAME_STATE.RUNNING) return;
if (!this.startSecond) return; // if (!this.startSecond) return;
this.timeSecond = this.timeSecond + dt; // this.timeSecond = this.timeSecond + dt;
let count = Math.ceil(this.timeSecond); // let count = Math.ceil(this.timeSecond);
let str = this.formatSeconds(count); // let str = this.formatSeconds(count);
this.label_time.getComponent(cc.Label).string = str; // this.label_time.getComponent(cc.Label).string = str;
} }
private formatSeconds(value) { private formatSeconds(value) {
var secondTime = parseInt(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