日志增加房间id
This commit is contained in:
parent
49400c858f
commit
0a05ed9ba1
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user