移除一些编译时的错误
This commit is contained in:
parent
3de7c13212
commit
1a735bca6d
2
src/global.d.ts
vendored
2
src/global.d.ts
vendored
@ -169,7 +169,7 @@ declare module "colyseus" {
|
||||
* @param source 0: 正常抽卡, 1: 技能
|
||||
* @param fromplayer
|
||||
*/
|
||||
addCard(dstplayer: string, count: number, max_count: number, source: number = 0, fromplayer?: string): boolean;
|
||||
addCard(dstplayer: string, count: number, max_count: number, source?: number, fromplayer?: string): boolean;
|
||||
|
||||
/**
|
||||
* 更新玩家血量
|
||||
|
@ -13,7 +13,7 @@ import {GameEnv} from "../../cfg/GameEnv";
|
||||
*/
|
||||
export class NextTurnCommand extends Command<CardGameState, {}> {
|
||||
|
||||
async execute() {
|
||||
async execute(){
|
||||
this.state.gameState = GameStateConst.STATE_BEGIN_DRAW;
|
||||
const sessionIds = [...this.state.players.keys()];
|
||||
if (!this.state.currentTurn) {
|
||||
|
@ -91,7 +91,7 @@ const comparePlayer = function (room: Room, p0: Player, p1: Player): CompareResu
|
||||
}
|
||||
export class PartResultCommand extends Command<CardGameState, {}> {
|
||||
|
||||
execute() {
|
||||
execute() : Array<Command> | void {
|
||||
this.state.gameState = GameStateConst.STATE_ROUND_RESULT;
|
||||
const time = singleton(GameEnv).resultShowTime || 1;
|
||||
|
||||
|
@ -11,7 +11,7 @@ import {GameResultCommand} from "./GameResultCommand";
|
||||
*/
|
||||
export class TurnEndCommand extends Command<CardGameState, {}> {
|
||||
|
||||
execute() {
|
||||
execute() : Array<Command> | void{
|
||||
// @ts-ignore
|
||||
const sessionIds = [...this.state.players.keys()];
|
||||
if (this.state.currentTurn) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user