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