无头模式测试

This commit is contained in:
DESKTOP-5RP3AKU\Jisol
2023-11-22 03:51:37 +08:00
parent 5ab90ea221
commit 7389f6d716
535 changed files with 991 additions and 162534 deletions

View File

@@ -1,4 +1,6 @@
import { JNSyncFrameEvent } from "../../../extensions/ngame/assets/ngame/sync/frame/JNSyncFrame";
import { app } from "../App";
import { Env, EnvCurrent } from "../Env";
import GBattleModeManager, { BattleMode } from "../battle/GBattleModeManager";
import { GAction } from "../consts/GAction";
import { GActionType } from "../consts/GActionType";
@@ -24,6 +26,10 @@ export default class PVPAction extends BaseAction {
app.socket.on(GAction.C_MODE_PVP_END_WAIT,this.onModePVPEndWait,this);
app.socket.on(GAction.C_MODE_PVP_START,this.onModePVPStart,this,GActionType.GPVPStart);
app.socket.on(GAction.C_MODE_PVP_MESSAGE,this.onModePVPMessage,this,GActionType.GPVPText);
if(EnvCurrent == Env.Server){
app.socket.on(GAction.CR_REFEREE_PVP_MODE,this.onCrReferee,this,GActionType.GPVPStart); //监听PVP裁决
}
}
//PVP开始等待
@@ -44,6 +50,13 @@ export default class PVPAction extends BaseAction {
GBattleModeManager.getIns().Open(BattleMode.PVP,true,info);
}
//裁决运行
onCrReferee(info:GPVPStart){
console.log("开始PVP裁决",info);
GBattleModeManager.getIns().Open(BattleMode.PVP,false,info);
GBattleModeManager.getIns().setAuto(true,true);
}
//提示
onModePVPMessage(info:GPVPText){
console.log("提示PVP",info);