programing client

This commit is contained in:
wzdwc
2020-04-27 22:14:05 +08:00
parent 9aedbd3532
commit 2481f5f2d3
15 changed files with 1422 additions and 152 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ export default class BaseSocketController extends Controller {
async updateGameInfo() {
const roomInfo = await this.getRoomInfo();
this.nsp.adapter.clients([ this.roomNumber ], (err: any, clients: any) => {
if (roomInfo.game) {
if (roomInfo.game && roomInfo.game.status < 6) {
roomInfo.players.forEach(p => {
const currPlayer = roomInfo.game &&
roomInfo.game.allPlayer.find(player => player.userId === p.userId);