public class EntitySubscription extends Object
World.process()
.
Any listeners
are informed when entities are added or removed.Modifier and Type | Class and Description |
---|---|
static class |
EntitySubscription.SubscriptionExtra |
static interface |
EntitySubscription.SubscriptionListener
This interfaces reports entities inserted or
removed when matched against their
EntitySubscription |
Modifier and Type | Method and Description |
---|---|
void |
addSubscriptionListener(EntitySubscription.SubscriptionListener listener)
Add listener interested in changes to the subscription.
|
BitVector |
getActiveEntityIds()
Returns the bitset tracking all matched entities.
|
Aspect |
getAspect() |
Aspect.Builder |
getAspectBuilder() |
IntBag |
getEntities()
Returns a reference to the bag holding all matched
entities.
|
String |
toString() |
public IntBag getEntities()
Warning: Never remove elements from the bag, as this will lead to undefined behavior.
public BitVector getActiveEntityIds()
Warning: Never toggle bits in the bitset, as this may lead to erroneously added or removed entities.
public Aspect getAspect()
public Aspect.Builder getAspectBuilder()
public void addSubscriptionListener(EntitySubscription.SubscriptionListener listener)
listener
- listener to add.Copyright © 2016. All rights reserved.