|
@@ -41,6 +41,7 @@ export class TimerMgr {
|
|
|
this.upateLbTime();
|
|
|
}, 1000); // 每秒减少一次
|
|
|
|
|
|
+ Scheduler.enableForTarget(this);
|
|
|
director.getScheduler().schedule(this.update, this, 0);
|
|
|
}
|
|
|
|
|
@@ -72,9 +73,11 @@ export class TimerMgr {
|
|
|
// 销毁时清理
|
|
|
public reset(): void {
|
|
|
this.stopCountdown();
|
|
|
+ Scheduler.enableForTarget(this);
|
|
|
director.getScheduler().unscheduleAllForTarget(this);
|
|
|
|
|
|
const mapConfig = MapMgr.Instance.getMapConfig(1);
|
|
|
this.countDownTime = mapConfig.time;
|
|
|
+ this.countDownTime = 10; //测试
|
|
|
}
|
|
|
}
|