This commit is contained in:
PC-20230316NUNE\Administrator
2023-10-27 19:17:47 +08:00
parent 7e402432dd
commit c4e6d02388
20 changed files with 163 additions and 28 deletions

View File

@@ -24,6 +24,7 @@ import { TableGRoleAttack } from "../resources/config/ts/TableGRoleAttack";
import { SpriteFrame } from "cc";
import { TableGRoleAttackBullet } from "../resources/config/ts/TableGRoleAttackBullet";
let IP = "localhost";
//重写UI
class JNGLayer extends JNLayer{
@@ -34,7 +35,7 @@ class JNGLayer extends JNLayer{
//重写Socket
class JNGSocket extends JNSocket{
public url() {
return "ws://localhost:8080/websocket";
return `ws://${IP}:8080/websocket`;
}
}
@@ -160,7 +161,7 @@ export const app = {
event : EventDispatcher.getIns(), //通知
proto : NGameMessage.getIns(), //消息
api : axios.create({
baseURL: "http://localhost:8080",
baseURL: `http://${IP}:8080`,
}), //请求
battle : GBattleModeManager.getIns(), //战斗
config : new JNGConfig(),