From b62d5d40e4493491a6a2a245395e61a7062a16da Mon Sep 17 00:00:00 2001 From: Karrar Date: Sun, 25 Aug 2024 02:09:27 +0300 Subject: [PATCH] Changed the variables used for icon offsets in `NetworkInfo` to have meaningful names. --- Netick/Editor/Netick.Unity.Editor.dll | Bin 61952 -> 61952 bytes Netick/Editor/Netick.Unity.Pro.Editor.dll | Bin 8192 -> 8192 bytes Netick/Editor/Unity.Netick.CodeGen.dll | Bin 22528 -> 22528 bytes Netick/Runtime/Netick.Unity.Pro.dll | Bin 16896 -> 16896 bytes Netick/Runtime/Netick.Unity.dll | Bin 132608 -> 132608 bytes Scripts/GameStarter.cs | 2 +- Scripts/NetworkInfo.cs | 12 ++++++------ package.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Netick/Editor/Netick.Unity.Editor.dll b/Netick/Editor/Netick.Unity.Editor.dll index 3f2a461a9252394f785beb68b633070aaa89eafd..319e7ecc42518ac512a68b7190f2ffbd9c7ea9d1 100644 GIT binary patch delta 121 zcmZp8!rbtLc|r$^dsa~M#-8v!j7FQE?Agi$q-O13$0YEWhyTH&z?D85cE|HMF@??9 z9C1iRk>!Yj{_4pMj{^jP;}kNte|X@%Z=rNA2ZP1p$qycvDnJE)|APvGR7ZEN_|s5g P(D(Cv*{sc_Pr7*l>7F=t delta 121 zcmZp8!rbtLc|r%vrKf3AH}-_@VKm(QWY1P6AT?|MIwpaZbBFrUtQ;Ly-)RY(vpwhi z=7>WoiYzMn{QD<2JPr^DdoSzW-g4b#=?RfPCtG(-n*88#sRC4RNh(wjqBE)QN$PQKJ9hB}?Av6qX0nG^r2u8+(LNq`? zbB`N4XTwa-i3fKixUz4^o9rQ0sQ?xH83+{ws%GRdw@LTBGXK1nQxwnUhhp-a0K~m1 A)Bpeg diff --git a/Netick/Editor/Unity.Netick.CodeGen.dll b/Netick/Editor/Unity.Netick.CodeGen.dll index b587ac270fa505460a480bcd49226a2350766aa6..4f1c23097d2d7e22538911cfd5f6273b66cd6bef 100644 GIT binary patch delta 107 zcmZqJz}T>XaY6@6sMxD{8+&401wJfU`Ka~CPp`E#&F^@oC$8K4!*vEb%buxo4^N)r z8z9hr&%fSP)Xb|#!ed8+ms;WEFTQ08P(djks31tSjD-nfCu8Q+8rwgXo4fqVI01xa BF9!es delta 107 zcmZqJz}T>XaY6@6*_Fo^H}=H13S^sZ-qNt_h3nKp?;YmRLNc3wxXxf_`L@sd&EzS* z0RjcDMVytixA`|PF3YoZUg$LWi*K0%RIvX5R1l<^O?LlQLAKZ8>bs<#Ztn6c;{*UU C@-IgK diff --git a/Netick/Runtime/Netick.Unity.Pro.dll b/Netick/Runtime/Netick.Unity.Pro.dll index 97fa88113611550c3e4d1d4ce5916d716fc6883b..7b8fa4a32405da6ea98bd3bec139f256c7f5dec3 100644 GIT binary patch delta 107 zcmZo@VQgq&oY28?sY`#}#-1Za0+V$EPWExna_d|bn8+5!;jlTuxPg^re!#2Glb=`w z2uQU(a4vmu)o0sWzALQf3$IUhu`E)63d($g3W8Mce)H^I@Vu^^D&h7@qL? R{H~{@vi8h&yVs0|qyVTUIIREx delta 122 zcmZqZ;b`dLn9#v;YeDtR#-6P`j6T~0;-|exbed@9-Z1Tu$=c>CdfQ)YW9$%NG~8Zz zn(?+AOPq?#f$0IS7y|^{jvcUw?SJVv%ZYhzSXW_1v=i+g QhslTsKi+Qln(>en0QHbGd;kCd diff --git a/Scripts/GameStarter.cs b/Scripts/GameStarter.cs index 7128cfb..57e1327 100644 --- a/Scripts/GameStarter.cs +++ b/Scripts/GameStarter.cs @@ -24,7 +24,7 @@ namespace Netick.Samples public string ServerIPAddress = "127.0.0.1"; [Header("Headless Server FPS")] - public bool Cap = true; + public bool Cap = true; public int FPS = 450; [Header("UI")] diff --git a/Scripts/NetworkInfo.cs b/Scripts/NetworkInfo.cs index 00c81d9..c5494e5 100644 --- a/Scripts/NetworkInfo.cs +++ b/Scripts/NetworkInfo.cs @@ -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. diff --git a/package.json b/package.json index 3707f32..cfc1bc5 100644 --- a/package.json +++ b/package.json @@ -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",