佛系的一天

This commit is contained in:
DESKTOP-5RP3AKU\Jisol 2023-11-24 01:38:58 +08:00
parent f129aed752
commit 8e644c583c
4 changed files with 15 additions and 7 deletions

View File

@ -26,12 +26,12 @@ import { JAPI, JAPIConfig } from "../../extensions/ngame/assets/ngame/util/JAPI"
import { AppData } from "./AppData"; import { AppData } from "./AppData";
import AppAction from "./AppAction"; import AppAction from "./AppAction";
// let APIPath = `http://localhost:8080` let APIPath = `http://localhost:8080`
// let WsPath = `ws://localhost:8080/websocket` let WsPath = `ws://localhost:8080/websocket`
// let APIPath = `http://192.168.1.23:8080` // let APIPath = `http://192.168.1.23:8080`
// let WsPath = `ws://192.168.1.23:8080/websocket` // let WsPath = `ws://192.168.1.23:8080/websocket`
let APIPath = `http://192.168.0.170:8080` // let APIPath = `http://192.168.0.170:8080`
let WsPath = `ws://192.168.0.170:8080/websocket` // let WsPath = `ws://192.168.0.170:8080/websocket`
// let APIPath = `https://api.pet.jisol.cn` // let APIPath = `https://api.pet.jisol.cn`
// let WsPath = `wss://api.pet.jisol.cn/websocket` // let WsPath = `wss://api.pet.jisol.cn/websocket`

View File

@ -51,6 +51,7 @@ export default class PVPAction extends BaseAction {
//开始PVP //开始PVP
onModePVPStart(info:GPVPStart){ onModePVPStart(info:GPVPStart){
console.log("开始PVP",info); console.log("开始PVP",info);
app.layer.Close(GUI.PVPModeMatchView);
GBattleModeManager.getIns().Open(BattleMode.PVP,true,info); GBattleModeManager.getIns().Open(BattleMode.PVP,true,info);
} }

View File

@ -32,6 +32,11 @@ public class GRefereeAction {
//最大裁决员数量 //最大裁决员数量
public static int MAX = 10; public static int MAX = 10;
//headless位置
// public static String Headless = "D:\\myproject\\JisolGame\\headless";
public static String Headless = "D:\\Jisol\\JisolGame\\headless";
// public static String Headless = "D:\\wwwroot\\pet.jisol.cn\\headless";
//获取一个空闲的裁决员 //获取一个空闲的裁决员
public static GRefereeClient getFreeReferee(){ public static GRefereeClient getFreeReferee(){
@ -77,13 +82,15 @@ public class GRefereeAction {
//生成客户端Id //生成客户端Id
String uuid = IdUtil.simpleUUID(); String uuid = IdUtil.simpleUUID();
//创建日志类 //创建日志类
Logger log = JLoggerUtil.file(uuid, "D:\\myproject\\JisolGame\\headless\\logger", uuid + ".log"); Logger log = JLoggerUtil.file(uuid, Headless+"\\logger", uuid + ".log");
if(Objects.isNull(log)) return; if(Objects.isNull(log)) return;
log.setUseParentHandlers(false);
Thread thread = new Thread(() -> { Thread thread = new Thread(() -> {
try { try {
Process process = Runtime.getRuntime().exec("cmd /c npm run main", null, new File("D:\\myproject\\JisolGame\\headless")); Process process = Runtime.getRuntime().exec("cmd /c npm run main", null, new File(Headless));
InputStream is = process.getInputStream(); InputStream is = process.getInputStream();
InputStreamReader isr = new InputStreamReader(is); InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr); BufferedReader br = new BufferedReader(isr);

View File

@ -1,7 +1,7 @@
// const URL = "http://192.168.0.174:7457/web-desktop/web-desktop/index.html" // const URL = "http://192.168.0.174:7457/web-desktop/web-desktop/index.html"
// const express = require("express"); // const express = require("express");
// const app = express(); // const app = express();
const URL = "http://192.168.0.170:7457/web-desktop/web-desktop-001/index.html" const URL = "http://192.168.1.23:7456/web-desktop/web-desktop-001/index.html"
// const runCocos = () => { // const runCocos = () => {
const { JSDOM,ResourceLoader } = require('jsdom') const { JSDOM,ResourceLoader } = require('jsdom')