Table of Contents

Class SyncQueue<T>

Namespace
LiteEntitySystem.Extensions
Assembly
LiteEntitySystem.dll
public class SyncQueue<T> : SyncableFieldCustomRollback, IReadOnlyCollection<T>, IEnumerable<T>, ICollection, IEnumerable where T : unmanaged

Type Parameters

T
Inheritance
object
SyncQueue<T>
Implements
Inherited Members

Properties

Count

Gets the number of elements in the collection.

public int Count { get; }

Property Value

int

The number of elements in the collection.

IsSynchronized

Gets a value indicating whether access to the ICollection is synchronized (thread safe).

public bool IsSynchronized { get; }

Property Value

bool

true if access to the ICollection is synchronized (thread safe); otherwise, false.

SyncRoot

Gets an object that can be used to synchronize access to the ICollection.

public object SyncRoot { get; }

Property Value

object

An object that can be used to synchronize access to the ICollection.

Methods

AfterReadRPC()

protected override void AfterReadRPC()

BeforeReadRPC()

protected override void BeforeReadRPC()

Clear()

public void Clear()

Contains(T)

public bool Contains(T item)

Parameters

item T

Returns

bool

CopyTo(Array, int)

Copies the elements of the ICollection to an Array, starting at a particular Array index.

public void CopyTo(Array array, int index)

Parameters

array Array

The one-dimensional Array that is the destination of the elements copied from ICollection. The Array must have zero-based indexing.

index int

The zero-based index in array at which copying begins.

Exceptions

ArgumentNullException

array is null.

ArgumentOutOfRangeException

index is less than zero.

ArgumentException
    <code class="paramref">array</code> is multidimensional.  

-or-
The number of elements in the source ICollection is greater than the available space from index to the end of the destination array.
-or-
The type of the source ICollection cannot be cast automatically to the type of the destination array.

Dequeue()

public T Dequeue()

Returns

T

Enqueue(T)

public void Enqueue(T item)

Parameters

item T

GetEnumerator()

public Queue<T>.Enumerator GetEnumerator()

Returns

Queue<T>.Enumerator

OnRollback()

protected override void OnRollback()

OnSyncRequested()

Method for executing RPCs containing initial sync data that need to be sent after entity creation to existing players or when new player connected

protected override void OnSyncRequested()

Peek()

public T Peek()

Returns

T

RegisterRPC(ref SyncableRPCRegistrator)

protected override void RegisterRPC(ref SyncableRPCRegistrator r)

Parameters

r SyncableRPCRegistrator

TryDequeue(out T)

public bool TryDequeue(out T item)

Parameters

item T

Returns

bool

TryPeek(out T)

public bool TryPeek(out T item)

Parameters

item T

Returns

bool