mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-06-26 03:14:47 +00:00
提交
This commit is contained in:
parent
e99fc3929c
commit
f129aed752
@ -26,12 +26,12 @@ import { JAPI, JAPIConfig } from "../../extensions/ngame/assets/ngame/util/JAPI"
|
||||
import { AppData } from "./AppData";
|
||||
import AppAction from "./AppAction";
|
||||
|
||||
let APIPath = `http://localhost:8080`
|
||||
let WsPath = `ws://localhost:8080/websocket`
|
||||
// let APIPath = `http://localhost:8080`
|
||||
// let WsPath = `ws://localhost:8080/websocket`
|
||||
// let APIPath = `http://192.168.1.23:8080`
|
||||
// let WsPath = `ws://192.168.1.23:8080/websocket`
|
||||
// let APIPath = `http://192.168.0.123:8080`
|
||||
// let WsPath = `ws://192.168.0.123:8080/websocket`
|
||||
let APIPath = `http://192.168.0.170:8080`
|
||||
let WsPath = `ws://192.168.0.170:8080/websocket`
|
||||
// let APIPath = `https://api.pet.jisol.cn`
|
||||
// let WsPath = `wss://api.pet.jisol.cn/websocket`
|
||||
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit e527d34fb68064a47d20d21764044c7cda2ed719
|
||||
Subproject commit 0ac0cc67b0cd8bd70fa3c9ead11fee366a6d7d68
|
@ -77,13 +77,13 @@ public class GRefereeAction {
|
||||
//生成客户端Id
|
||||
String uuid = IdUtil.simpleUUID();
|
||||
//创建日志类
|
||||
Logger log = JLoggerUtil.file(uuid, "D:\\Jisol\\JisolGame\\headless\\logger", uuid + ".log");
|
||||
Logger log = JLoggerUtil.file(uuid, "D:\\myproject\\JisolGame\\headless\\logger", uuid + ".log");
|
||||
|
||||
if(Objects.isNull(log)) return;
|
||||
|
||||
Thread thread = new Thread(() -> {
|
||||
try {
|
||||
Process process = Runtime.getRuntime().exec("cmd /c npm run main", null, new File("D:\\Jisol\\JisolGame\\headless"));
|
||||
Process process = Runtime.getRuntime().exec("cmd /c npm run main", null, new File("D:\\myproject\\JisolGame\\headless"));
|
||||
InputStream is = process.getInputStream();
|
||||
InputStreamReader isr = new InputStreamReader(is);
|
||||
BufferedReader br = new BufferedReader(isr);
|
||||
|
@ -11,12 +11,12 @@ import cn.jisol.game.entity.game.PlayerTactical;
|
||||
import cn.jisol.game.network.client.GClient;
|
||||
import cn.jisol.game.network.client.GRefereeClient;
|
||||
import cn.jisol.game.proto.GPVPMessage;
|
||||
import cn.jisol.game.proto.GUIMessage;
|
||||
import cn.jisol.game.service.PlayerTacticalService;
|
||||
import cn.jisol.ngame.actions.core.NAction;
|
||||
import cn.jisol.ngame.actions.core.NActionMethod;
|
||||
import cn.jisol.ngame.util.EventDispatcher;
|
||||
import cn.jisol.ngame.util.spring.SpringBeanUtils;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
//PVP 模式
|
||||
@ -177,12 +177,18 @@ public class GPVPAction {
|
||||
|
||||
//裁决结束返回
|
||||
@NActionMethod(GActionEnum.CR_REFEREE_PVP_END)
|
||||
public static void onPVPRefereeEnd(GPVPMessage.GPVPRefereeInfo info,GRefereeClient referee){
|
||||
public static void onPVPRefereeEnd(GPVPMessage.GPVPRefereeInfo info,GRefereeClient referee,Map<String, GClient> clients){
|
||||
|
||||
System.out.println("获胜的玩家是:"+info.getWinnerId());
|
||||
//裁决结束 等待下次裁决
|
||||
GRefereeAction.addFreeReferee(referee);
|
||||
|
||||
|
||||
clients.values().forEach(client -> {
|
||||
client.invoke(GActionEnum.C_MODE_PVP_MESSAGE, GPVPMessage.GPVPText.newBuilder().setText("服务器裁决胜利者"+info.getWinnerId()).build());
|
||||
client.invoke(GActionEnum.CHAT_RECEIVE_MESSAGE, GUIMessage.GUIChatMessage.newBuilder().setMessage("获胜的玩家是:"+info.getWinnerId()).build());
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
//通知玩家等待定时器
|
||||
|
@ -1,7 +1,7 @@
|
||||
// const URL = "http://192.168.0.174:7457/web-desktop/web-desktop/index.html"
|
||||
// const express = require("express");
|
||||
// const app = express();
|
||||
const URL = "http://192.168.1.23:7456/web-desktop/web-desktop-001/index.html"
|
||||
const URL = "http://192.168.0.170:7457/web-desktop/web-desktop-001/index.html"
|
||||
|
||||
// const runCocos = () => {
|
||||
const { JSDOM,ResourceLoader } = require('jsdom')
|
||||
|
Loading…
x
Reference in New Issue
Block a user