This commit is contained in:
yuexin 2020-12-14 11:52:58 +08:00
commit c2a96ed840

View File

@ -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);
}
}