Struct SyncVar<T>
- Namespace
- LiteEntitySystem
- Assembly
- LiteEntitySystem.dll
Synchronized variable
public struct SyncVar<T> : ISyncVar<T>, IEquatable<T>, IEquatable<SyncVar<T>> where T : unmanaged
Type Parameters
TVariable type
- Implements
-
ISyncVar<T>IEquatable<T>IEquatable<SyncVar<T>>
Properties
InterpolatedValue
Interpolated value on client (on server equals to Value)
public T InterpolatedValue { get; }
Property Value
- T
Value
Actual logical value
public T Value { get; set; }
Property Value
- T
Methods
Equals(SyncVar<T>)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(SyncVar<T> tv)
Parameters
tvSyncVar<T>
Returns
Equals(object)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object o)
Parameters
oobject
Returns
- bool
true if
objand this instance are the same type and represent the same value; otherwise, false.
Equals(T)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(T v)
Parameters
vT
Returns
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
Operators
operator ==(SyncVar<T>, SyncVar<T>)
public static bool operator ==(SyncVar<T> a, SyncVar<T> b)
Parameters
Returns
operator ==(SyncVar<T>, T)
public static bool operator ==(SyncVar<T> a, T b)
Parameters
aSyncVar<T>bT
Returns
operator ==(T, SyncVar<T>)
public static bool operator ==(T a, SyncVar<T> b)
Parameters
aTbSyncVar<T>
Returns
implicit operator T(SyncVar<T>)
public static implicit operator T(SyncVar<T> sv)
Parameters
svSyncVar<T>
Returns
- T
operator !=(SyncVar<T>, SyncVar<T>)
public static bool operator !=(SyncVar<T> a, SyncVar<T> b)
Parameters
Returns
operator !=(SyncVar<T>, T)
public static bool operator !=(SyncVar<T> a, T b)
Parameters
aSyncVar<T>bT
Returns
operator !=(T, SyncVar<T>)
public static bool operator !=(T a, SyncVar<T> b)
Parameters
aTbSyncVar<T>