feat 接入Prometheus
This commit is contained in:
@@ -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 += () =>
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user