Table of Contents

Class SyncDict<TKey, TValue>

Namespace
LiteEntitySystem.Extensions
Assembly
LiteEntitySystem.dll
public class SyncDict<TKey, TValue> : SyncableFieldCustomRollback, IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable where TKey : unmanaged where TValue : unmanaged

Type Parameters

TKey
TValue
Inheritance
object
SyncDict<TKey, TValue>
Implements
IEnumerable<KeyValuePair<TKey, TValue>>
Inherited Members

Properties

Count

public int Count { get; }

Property Value

int

this[TKey]

public TValue this[TKey index] { get; set; }

Parameters

index TKey

Property Value

TValue

Keys

public Dictionary<TKey, TValue>.KeyCollection Keys { get; }

Property Value

Dictionary<TKey, TValue>.KeyCollection

Values

public Dictionary<TKey, TValue>.ValueCollection Values { get; }

Property Value

Dictionary<TKey, TValue>.ValueCollection

Methods

Add(TKey, TValue)

public void Add(TKey key, TValue value)

Parameters

key TKey
value TValue

AfterReadRPC()

protected override void AfterReadRPC()

BeforeReadRPC()

protected override void BeforeReadRPC()

Clear()

public void Clear()

ContainsKey(TKey)

public bool ContainsKey(TKey key)

Parameters

key TKey

Returns

bool

ContainsValue(TValue)

public bool ContainsValue(TValue value)

Parameters

value TValue

Returns

bool

GetEnumerator()

public Dictionary<TKey, TValue>.Enumerator GetEnumerator()

Returns

Dictionary<TKey, TValue>.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()

RegisterRPC(ref SyncableRPCRegistrator)

protected override void RegisterRPC(ref SyncableRPCRegistrator r)

Parameters

r SyncableRPCRegistrator

Remove(TKey)

public bool Remove(TKey key)

Parameters

key TKey

Returns

bool

TryGetValue(TKey, out TValue)

public bool TryGetValue(TKey key, out TValue value)

Parameters

key TKey
value TValue

Returns

bool