Class EstimatedTick
Inheritance
Inherited Members
Namespace: FishNet.Managing.Timing
Assembly: FishNet.Runtime.dll
Syntax
public class EstimatedTick
Properties
IsLastRemoteTickOrdered
True if LastRemoteTick is equal to RemoteTick. This would indicate that the LastRemoteTick did not arrive out of order.
Declaration
public bool IsLastRemoteTickOrdered { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
IsUnset
True if value is unset.
Declaration
public bool IsUnset { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
LastRemoteTick
Last remote tick received regardless if it was out of order or a duplicate.
Declaration
public uint LastRemoteTick { get; }
Property Value
| Type | Description |
|---|---|
| System.UInt32 |
LocalTick
Local tick when this was last updated.
Declaration
public uint LocalTick { get; }
Property Value
| Type | Description |
|---|---|
| System.UInt32 |
RemoteTick
Last remote tick this was updated with that was not out of order or a duplicate.
Declaration
public uint RemoteTick { get; }
Property Value
| Type | Description |
|---|---|
| System.UInt32 |
Methods
Initialize(TimeManager, UInt32, UInt32, UInt32)
Initializes this EstimatedTick with values.
Declaration
public void Initialize(TimeManager tm, uint remoteTick = 0U, uint lastRemoteTick = 0U, uint localTick = 0U)
Parameters
| Type | Name | Description |
|---|---|---|
| TimeManager | tm | |
| System.UInt32 | remoteTick | |
| System.UInt32 | lastRemoteTick | |
| System.UInt32 | localTick |
IsCurrent(TimeManager)
True if values were updated this tick.
Declaration
public bool IsCurrent(TimeManager tm = null)
Parameters
| Type | Name | Description |
|---|---|---|
| TimeManager | tm |
Returns
| Type | Description |
|---|---|
| System.Boolean |
LocalTickDifference(TimeManager)
Number of ticks LocalTick is being current LocalTick.
Declaration
public uint LocalTickDifference(TimeManager tm = null)
Parameters
| Type | Name | Description |
|---|---|---|
| TimeManager | tm |
Returns
| Type | Description |
|---|---|
| System.UInt32 |
Reset()
Resets values to unset and clears the NetworkManager.
Declaration
public void Reset()
ResetTicks()
Resets only tick values, leaving type references.
Declaration
public void ResetTicks()
Update(TimeManager, UInt32, EstimatedTick.OldTickOption, Boolean)
Updates values.
Declaration
public bool Update(TimeManager tm, uint remoteTick, EstimatedTick.OldTickOption oldTickOption = EstimatedTick.OldTickOption.Discard, bool resetValue = true)
Parameters
| Type | Name | Description |
|---|---|---|
| TimeManager | tm | TimeManager to use. |
| System.UInt32 | remoteTick | Remote tick being updated. |
| EstimatedTick.OldTickOption | oldTickOption | How to handle remoteTick if it is old. |
| System.Boolean | resetValue | True to reset Value based on this information. False will allow Value to continue to to estimate tick based on the last reset. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if was able to update values. |
Update(UInt32, EstimatedTick.OldTickOption, Boolean)
Updates values.
Declaration
public bool Update(uint remoteTick, EstimatedTick.OldTickOption oldTickOption = EstimatedTick.OldTickOption.Discard, bool resetValue = true)
Parameters
| Type | Name | Description |
|---|---|---|
| System.UInt32 | remoteTick | Remote tick being updated. |
| EstimatedTick.OldTickOption | oldTickOption | How to handle remoteTick if it is old. |
| System.Boolean | resetValue | True to reset Value based on this information. False will allow Value to continue to to estimate tick based on the last reset. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if was able to update values. |
UpdateValue()
Updates Value based on current ticks. This is typically used when you want to control when Value is reset through the Update methods.
Declaration
public void UpdateValue()
Value(TimeManager)
Current estimated value.
Declaration
public uint Value(TimeManager tm = null)
Parameters
| Type | Name | Description |
|---|---|---|
| TimeManager | tm |
Returns
| Type | Description |
|---|---|
| System.UInt32 |
Value(out Boolean, TimeManager)
Current estimated value. Outputs if value is current.
Declaration
public uint Value(out bool isCurrent, TimeManager tm = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | isCurrent | True if the value was updated this local tick. |
| TimeManager | tm |
Returns
| Type | Description |
|---|---|
| System.UInt32 |