Working via NetworkManager
This commit is contained in:
@@ -22,8 +22,6 @@ public class TestBall : SyncedObject
|
||||
|
||||
[SerializeField] private TestBallMode mode;
|
||||
|
||||
private NetworkManager networkManager;
|
||||
|
||||
private const float LoopTime = 1f;
|
||||
private const float MaxUp = 0.7f;
|
||||
private const float UpPerPress = 0.4f;
|
||||
@@ -54,7 +52,7 @@ public class TestBall : SyncedObject
|
||||
{
|
||||
SetProgress(GetProgress()); // A quick test that these methods work correctly
|
||||
|
||||
DeltaUp(-DownPerSecond * networkManager.Dt);
|
||||
DeltaUp(-DownPerSecond * networkManager.SyncedDeltaTime);
|
||||
|
||||
UpdateProgress();
|
||||
|
||||
@@ -113,7 +111,7 @@ public class TestBall : SyncedObject
|
||||
switch (mode)
|
||||
{
|
||||
case TestBallMode.UseNetworkDt:
|
||||
sumOfDt += networkManager.Dt;
|
||||
sumOfDt += networkManager.SyncedDeltaTime;
|
||||
break;
|
||||
case TestBallMode.UseUnityDt:
|
||||
if (!networkManager.IsEventUpdate)
|
||||
|
||||
Reference in New Issue
Block a user