Commit 182fe4dc authored by 王勇霞's avatar 王勇霞

移除事件

parent dcb878ae
......@@ -733,5 +733,5 @@ export const ResJson = {
"name": "svga"
}
],
"path": "https://yun.duiba.com.cn/db_games/activity/template/1678772466/resource/"
"path": "https://yun.duiba.com.cn/db_games/activity/template/1678886131/resource/"
}
\ No newline at end of file
......@@ -114,6 +114,7 @@ export class GameScene extends Scene {
}
upDateInfo() {
this.time = Tools.configInfo.time;
this.cdUIRender(this.time)
this.startGame()
this.countDown(this.time)
......@@ -142,6 +143,9 @@ export class GameScene extends Scene {
timer = null;
countDown(time) {
if (this.timer) {
clearTimeout(this.timer);
}
this.timer = setTimeout(() => {
if (this.time <= 0) {
clearTimeout(this.timer);
......@@ -329,7 +333,8 @@ export class GameScene extends Scene {
}
removeEvents() {
super.removeEvents();
GDispatcher.addEventListener("closeGame", this.closeGame, this);
clearTimeout(this.timer);
GDispatcher.removeEventListener("closeGame", this.closeGame, this);
}
}
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