@SkipWire public class AspectSubscriptionManager extends BaseSystem
Manages all instances of EntitySubscription
.
Entity subscriptions are automatically updated during World.process()
.
Any listeners
are informed when entities are added or removed.
EntitySubscription
world
Modifier | Constructor and Description |
---|---|
protected |
AspectSubscriptionManager() |
Modifier and Type | Method and Description |
---|---|
EntitySubscription |
get(Aspect.Builder builder)
Gets the entity subscription for the
Aspect . |
ImmutableBag<EntitySubscription> |
getSubscriptions()
Gets the active list of all current entity subscriptions.
|
protected void |
processSystem()
Process the system.
|
protected void |
setWorld(World world)
Set the world this system works on.
|
begin, checkProcessing, dispose, end, getWorld, initialize, isEnabled, process, setEnabled
protected void processSystem()
BaseSystem
processSystem
in class BaseSystem
protected void setWorld(World world)
BaseSystem
setWorld
in class BaseSystem
world
- the world to setpublic EntitySubscription get(Aspect.Builder builder)
Gets the entity subscription for the Aspect
.
Subscriptions are only created once per aspect.
BaseSystem.processSystem()
.
If the subscription does not exist yet, the newly created subscription
will reflect all the chances made by the currently processing system,
NOT the state before the system started processing. This might cause
the system to behave differently when run the first time (as
subsequent calls won't have this issue).
See https://github.com/junkdog/artemis-odb/issues/551builder
- Aspect to match.EntitySubscription
for aspect.public ImmutableBag<EntitySubscription> getSubscriptions()
Copyright © 2019. All rights reserved.