简单PVP

This commit is contained in:
PC-20230316NUNE\Administrator
2023-11-20 18:25:50 +08:00
parent 98b7a52b45
commit 74aabac454
36 changed files with 2972 additions and 261 deletions

View File

@@ -5,6 +5,7 @@ import PlayerData from '../../data/PlayerData';
import GBattleModeManager, { BattleMode } from '../../battle/GBattleModeManager';
import { JNGLayerBase } from '../../components/JNComponent';
import { app } from '../../App';
import { GAction } from '../../consts/GAction';
const { ccclass, property } = _decorator;
@ccclass('MainView')
@@ -47,6 +48,11 @@ export class MainView extends JNGLayerBase {
GBattleModeManager.getIns().Open(BattleMode.OnHook,true);
}
//点击PVP模式
onOpenPVP(){
app.socket.Send(GAction.S_MODE_PVP_JOIN);
}
}