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
T
Variable 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
tv
SyncVar<T>
Returns
Equals(object)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object o)
Parameters
o
object
Returns
- bool
true if
obj
and 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
v
T
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
a
SyncVar<T>b
T
Returns
operator ==(T, SyncVar<T>)
public static bool operator ==(T a, SyncVar<T> b)
Parameters
a
Tb
SyncVar<T>
Returns
implicit operator T(SyncVar<T>)
public static implicit operator T(SyncVar<T> sv)
Parameters
sv
SyncVar<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
a
SyncVar<T>b
T
Returns
operator !=(T, SyncVar<T>)
public static bool operator !=(T a, SyncVar<T> b)
Parameters
a
Tb
SyncVar<T>