EasyEcs
API reference

ValueIndex<T, TKey>.Ordered

Enumerates entities in key order (foreach): every entity of a key, then the next key.

public ref struct Ordered

Nested in ValueIndex.

Enumerates entities in key order (foreach): every entity of a key, then the next key. O(log keys) to start, O(1) per entity and per key. Destroying entities during the loop is allowed, changing T is not.

Properties

Current

public readonly Entity Current { get; }

The current entity.

Key

public readonly TKey Key { get; }

Methods

GetEnumerator

public readonly ValueIndex<T, TKey>.Ordered GetEnumerator();

The enumerator itself (foreach support, no allocation).

MoveNext

public bool MoveNext();

Move to the next entity, in key order.

Edit on GitHub

Last updated on

How is this guide?

On this page