From 8fe6eddfb73503d80871def0448a132b144bb309 Mon Sep 17 00:00:00 2001 From: zhl Date: Fri, 11 Dec 2020 21:41:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E9=87=8D=E6=96=B0=E5=BC=80?= =?UTF-8?q?=E5=A7=8B=E6=97=A0=E6=B3=95=E6=AD=A3=E5=B8=B8=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/rooms/GeneralRoom.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/rooms/GeneralRoom.ts b/src/rooms/GeneralRoom.ts index bf7c565..a3511cd 100644 --- a/src/rooms/GeneralRoom.ts +++ b/src/rooms/GeneralRoom.ts @@ -39,7 +39,7 @@ export class GeneralRoom extends Room { this.setState(cs); this.battleMan.init(cs, this); this.clock.start(); - this.state.gameSate = 0; + this.state.gameState = GameStateConst.STATE_WAIT_JOIN; this.beginSchedule(1, function (){ debugRoom('init main clock'); }, 'init') @@ -115,7 +115,8 @@ export class GeneralRoom extends Room { // } catch (e) { // this.state.players.delete(client.sessionId); // } - if (this.state.gameSate === GameStateConst.STATE_GAME_OVER) { + //TODO: 检查重新开始后, gameState + if (this.state.gameState === GameStateConst.STATE_GAME_OVER) { this.state.players.delete(client.id); } }