import { Command } from '@colyseus/command' import { CardGameState } from '../schema/CardGameState' import { Client } from 'colyseus' import { ClockNameConst } from '../../constants/ClockNameConst' export class ResumeCommand extends Command { execute({client} = this.payload) { if (this.state.mode !== 3) { client.send('resume_s2c', { errcode: 1, errmsg: '当前模式不能暂停'}) return } this.room.stopSchedule(ClockNameConst.CLIENT_PAUSE) this.room.resumeAllSchedule() client.send('resume_s2c', {}) } }