增加一些游戏生命周期方法的调用
This commit is contained in:
parent
0cf8dd8284
commit
2ffbe2ee8a
@ -13,6 +13,7 @@ import {NextTurnCommand} from "./NextTurnCommand";
|
|||||||
export class BeginGameCommand extends Command<CardGameState, {}> {
|
export class BeginGameCommand extends Command<CardGameState, {}> {
|
||||||
|
|
||||||
async execute() {
|
async execute() {
|
||||||
|
this.room.battleMan.onGameStart();
|
||||||
this.state.maxCardId = 0;
|
this.state.maxCardId = 0;
|
||||||
let card0 = gameUtil.initCardQue();
|
let card0 = gameUtil.initCardQue();
|
||||||
let card1 = gameUtil.initCardQue();
|
let card1 = gameUtil.initCardQue();
|
||||||
|
@ -122,6 +122,7 @@ export class GameResultCommand extends Command<CardGameState, {}> {
|
|||||||
this.resetPet(pet);
|
this.resetPet(pet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.room.battleMan.onGameEnd();
|
||||||
}
|
}
|
||||||
resetPet(pet: Pet) {
|
resetPet(pet: Pet) {
|
||||||
pet.state = 0;
|
pet.state = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user