From f2afa98f51af8ea2482bec376f60dabb34461d35 Mon Sep 17 00:00:00 2001 From: zhl Date: Wed, 2 Dec 2020 20:05:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86OnJoinCommand=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E9=AD=94=E6=B3=95=E6=95=B0=E5=AD=97=E6=94=B9=E4=B8=BA=E5=B8=B8?= =?UTF-8?q?=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/rooms/commands/OnJoinCommand.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rooms/commands/OnJoinCommand.ts b/src/rooms/commands/OnJoinCommand.ts index a841d0e..cf7fb86 100644 --- a/src/rooms/commands/OnJoinCommand.ts +++ b/src/rooms/commands/OnJoinCommand.ts @@ -2,6 +2,7 @@ import {Command} from "@colyseus/command"; import {CardGameState} from "../schema/CardGameState"; import {Player} from "../schema/Player"; import {Client} from "colyseus"; +import {GameStateConst} from "../../constants/GameStateConst"; /** * 玩家成功加入房间 @@ -15,7 +16,7 @@ export class OnJoinCommand extends Command= this.room.maxClients) { this.room.lock(); - this.state.gameState = 1; + this.state.gameState = GameStateConst.STATE_WAIT_PREPARE; } this.room.broadcast("player_join", `${client.sessionId}`, {except: client}); }