提交完美的无头模式

This commit is contained in:
PC-20230316NUNE\Administrator
2023-11-22 17:46:08 +08:00
parent 7389f6d716
commit f890be0728
17 changed files with 975 additions and 175 deletions

View File

@@ -214,10 +214,14 @@ export default class GPVPMode extends GBaseMode<{},GPVPStart>{
//判断是否有队伍都死亡
if(this.getOnesRoleAlive(GPVPModePlayerEnum.PLAYER).length == 0 || this.getOnesRoleAlive(GPVPModePlayerEnum.ENEMY).length == 0){
this.isEndGame = true;
let winner = this.data.leftPlayerId;
if(this.getOnesRoleAlive(GPVPModePlayerEnum.ENEMY).length){
winner = this.data.rightPlayerId;
}
//结束游戏
JNFrameTime.getInstance().setTimeout(() => {
console.log(this.getOnesRoleAlive(GPVPModePlayerEnum.PLAYER).length,this.getOnesRoleAlive(GPVPModePlayerEnum.ENEMY).length)
this.Close();
this.Close(winner);
},3000)
}