Table of Contents

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>

Fields

Size

public static readonly int Size

Field Value

int

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

bool

true if the current object is equal to the other parameter; otherwise, false.

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

bool

true if the current object is equal to the other parameter; otherwise, false.

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.

SetValueWithoutOnSyncNotification(T)

Set value without triggering local OnSync notifications if there is any

public void SetValueWithoutOnSyncNotification(T value)

Parameters

value T

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

a SyncVar<T>
b SyncVar<T>

Returns

bool

operator ==(SyncVar<T>, T)

public static bool operator ==(SyncVar<T> a, T b)

Parameters

a SyncVar<T>
b T

Returns

bool

operator ==(T, SyncVar<T>)

public static bool operator ==(T a, SyncVar<T> b)

Parameters

a T
b SyncVar<T>

Returns

bool

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

a SyncVar<T>
b SyncVar<T>

Returns

bool

operator !=(SyncVar<T>, T)

public static bool operator !=(SyncVar<T> a, T b)

Parameters

a SyncVar<T>
b T

Returns

bool

operator !=(T, SyncVar<T>)

public static bool operator !=(T a, SyncVar<T> b)

Parameters

a T
b SyncVar<T>

Returns

bool