Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 4.3 KB

EntitySortedSet_TComponent_.md

File metadata and controls

40 lines (29 loc) · 4.3 KB

EntitySortedSet Class

Represents a sub-selection of Entity instances from a World sorted by a specific component.

public sealed class EntitySortedSet<TComponent> :
System.IDisposable

Type parameters

TComponent

The type of the component to sort Entity by.

Inheritance System.Object 🡒 EntitySortedSet

Implements System.IDisposable

Properties
Count Gets the number of Entity in the current EntitySortedSet<TComponent>.
World Gets the World instance from which current DefaultEcs.IEntityContainer originate.
Methods
Complete() Clears current instance of its entities if it was created with some reactive filter (WhenAdded<T>(), WhenChanged<T>() or WhenRemoved<T>()).
Does nothing if it was created from a static filter.
This method need to be called after current instance content has been processed in a update cycle.
Contains(Entity) Determines whether the DefaultEcs.IEntityContainer contains a specific Entity.
Dispose() Releases current EntitySortedSet<TComponent> of its subscriptions, stopping it to get modifications on the World's Entity.
GetEntities() Gets the Entity contained in the current EntitySortedSet<TComponent>.
TrimExcess() Resizes inner storage to exactly the number of Entity this DefaultEcs.IEntityContainer contains.
Events
EntityAdded Occurs when an Entity is added in the current DefaultEcs.IEntityContainer.
EntityRemoved Occurs when an Entity is removed from the current DefaultEcs.IEntityContainer.