This commit is contained in:
DESKTOP-5RP3AKU\Jisol
2023-10-24 02:32:06 +08:00
parent 77d44ee300
commit 72f3d7e880
26 changed files with 545 additions and 285 deletions

View File

@@ -23,25 +23,13 @@ class JNGLayer extends JNLayer{
//重写Socket
class JNGSocket extends JNSocket{
public url() {
return "ws://192.168.0.127:8080/websocket";
return "ws://localhost:8080/websocket";
}
}
// 重写帧同步
class JNGSyncFrame extends JNSyncFrame{
//更新
protected onUpdate(): JNFrameInfo {
let info = super.onUpdate();
if(info){
//更新状态机
BehaviorManager.getInstance().tick(this.dt);
}
return info;
}
protected onResetValue(){
//重置状态机
BehaviorManager.deleteInstance();
@@ -106,7 +94,7 @@ export const app = {
event : EventDispatcher.getIns(), //通知
proto : NGameMessage.getIns(), //消息
api : axios.create({
baseURL: "http://192.168.0.127:8080",
baseURL: "http://localhost:8080",
}), //请求
battle : GBattleModeManager.getIns(), //战斗
}