feat 接入Prometheus

This commit is contained in:
2025-12-17 21:05:12 +08:00
parent efa9f50d3e
commit da91cff056
24 changed files with 289 additions and 60 deletions

View File

@@ -21,7 +21,8 @@ public class SocketManager : MonoBehaviour
public async void Connect()
{
_ws = new WebSocket($"wss://www.hlsq.asia/ws/?token={Random.Range(1, 1000)}");
// _ws = new WebSocket($"wss://www.hlsq.asia/ws/?token={Random.Range(1, 1000)}");
_ws = new WebSocket($"ws://127.0.0.1:8501/?token={Random.Range(1, 1000)}");
_ws.OnOpen += () =>
{

View File

@@ -17,7 +17,10 @@ public class PlayerControl : MonoBehaviour
if (Time.time >= _lastSendTime + 1f / SendRate)
{
SendMoveInput(currentDir);
if (currentDir != Vector2.zero)
{
SendMoveInput(currentDir);
}
}
else if (currentDir != _lastSentDirection)
{