mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
提交完美的无头模式
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user