Class NetworkTimeSpanPropertySync<K>
Provides an abstraction to track changes on a TimeSpan property contained on a NetworkPropertiesTable. A NetworkPropertiesTable component is needed in the same entity or any of its parents.
Inheritance
Implements
Inherited Members
Namespace: Evergine.Networking.Components
Assembly: Evergine.Networking.dll
Syntax
public abstract class NetworkTimeSpanPropertySync<K> : NetworkPropertySync<K, TimeSpan>, IDependencyObject where K : struct, IConvertible
Type Parameters
Name | Description |
---|---|
K |
Properties
HighPrecision
Gets or sets a value indicating whether the TimeSpan will be stored using high precision (ticks) or not (milliseconds).
Declaration
[RenderProperty(Tooltip = "Indicates whether the TimeSpan will be stored using high precision (ticks) or not (milliseconds)")]
public bool HighPrecision { get; set; }
Property Value
Type | Description |
---|---|
bool |
Remarks
High precision allows full TimeSpan range, otherwise it will be limited to "+-24.20:31:23.647" (+-24 days, 20 hours, 31 minutes, 23 seconds and 647 milliseconds).
Methods
ReadValue(NetworkPropertiesTable)
Defines a delegate to read the value from the player NetworkPropertiesTable.
Declaration
protected override TimeSpan ReadValue(NetworkPropertiesTable propertiesTable)
Parameters
Type | Name | Description |
---|---|---|
NetworkPropertiesTable | propertiesTable | The properties table that contains the player custom properties. |
Returns
Type | Description |
---|---|
TimeSpan | The property value. |
Overrides
WriteValue(NetworkPropertiesTable, TimeSpan)
Defines a delegate to write the value in the player NetworkPropertiesTable.
Declaration
protected override void WriteValue(NetworkPropertiesTable propertiesTable, TimeSpan value)
Parameters
Type | Name | Description |
---|---|---|
NetworkPropertiesTable | propertiesTable | The properties table that contains the player custom properties. |
TimeSpan | value | The value to write. |