mirror of
https://github.com/Kaveinator/NetickProForUnity.git
synced 2025-10-26 09:49:06 -07:00
Changed the variables used for icon offsets in NetworkInfo to have meaningful names.
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -17,9 +17,9 @@ namespace Netick.Samples
|
||||
public float MediumPacketLossThreshold = 1;
|
||||
public float HighPacketLossThreshold = 10;
|
||||
|
||||
public Vector2 Icon1Offset = new Vector2(-80, 30);
|
||||
public Vector2 Icon2Offset = new Vector2(-80, 70);
|
||||
public Vector2 Icon3Offset = new Vector2(-80, 110);
|
||||
public Vector2 PacketLossIconOffset = new Vector2(-80, 30);
|
||||
public Vector2 LatencyIconOffset = new Vector2(-80, 70);
|
||||
public Vector2 ServerLagIconOffset = new Vector2(-80, 110);
|
||||
public float IconSize = 30;
|
||||
|
||||
private Texture _packetLossIcon;
|
||||
@@ -62,9 +62,9 @@ namespace Netick.Samples
|
||||
|
||||
public void DrawIcons()
|
||||
{
|
||||
var pktLossIconPos = Icon1Offset + (Screen.width * Vector2.right);
|
||||
var latencyIconPos = Icon2Offset + (Screen.width * Vector2.right);
|
||||
var serverLagIconPos = Icon3Offset + (Screen.width * Vector2.right);
|
||||
var pktLossIconPos = PacketLossIconOffset + (Screen.width * Vector2.right);
|
||||
var latencyIconPos = LatencyIconOffset + (Screen.width * Vector2.right);
|
||||
var serverLagIconPos = ServerLagIconOffset + (Screen.width * Vector2.right);
|
||||
|
||||
var pktLoss = Mathf.Max(Sandbox.InPacketLoss, Sandbox.OutPacketLoss) * 100; // multiplying by 100 to convert from a decimal to a percentage.
|
||||
var rtt = Sandbox.RTT * 1000f; // multiplying by 1000 to convert from seconds to milliseconds.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "com.karrar.netick",
|
||||
"version": "0.12.21",
|
||||
"version": "0.12.22",
|
||||
"displayName": "Netick",
|
||||
"description": "A networking solution for Unity",
|
||||
"unity": "2021.3",
|
||||
|
||||
Reference in New Issue
Block a user