日志增加房间id

This commit is contained in:
zhl 2021-04-30 16:40:38 +08:00
parent 49400c858f
commit 0a05ed9ba1

View File

@ -124,7 +124,7 @@ export class PuzzleMathRoom extends Room {
*
*/
beginGame() {
console.log(`admin send begin game cmd`)
console.log(`[${this.roomId}] admin send begin game cmd`)
this.dispatcher.dispatch(new BeginGameCommand() )
}
@ -132,12 +132,12 @@ export class PuzzleMathRoom extends Room {
*
*/
endGame() {
console.log(`admin send end game cmd`)
console.log(`[${this.roomId}] admin send end game cmd`)
this.dispatcher.dispatch(new EndGameCommand() )
}
updateScore(datas: any) {
console.log(`admin updateScore: ${JSON.stringify(datas)}`)
console.log(`[${this.roomId}] admin updateScore: ${JSON.stringify(datas)}`)
for (let data of datas) {
for (let [,player] of this.state.players) {
if (player.accountId == data.accountid) {
@ -153,6 +153,7 @@ export class PuzzleMathRoom extends Room {
* @param {number} round
*/
updateRound(round: number) {
console.log(`[${this.roomId}] admin update round: ${round}`)
this.state.round = round
}