Package gaiasky.scene.system
Class ParallelSystem
java.lang.Object
com.badlogic.ashley.core.EntitySystem
gaiasky.scene.system.ParallelSystem
public abstract class ParallelSystem
extends com.badlogic.ashley.core.EntitySystem
-
Field Summary
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ParallelSystem
(com.badlogic.ashley.core.Family family) Instantiates a system that will iterate over the entities described by the Family.protected
ParallelSystem
(com.badlogic.ashley.core.Family family, int priority) Instantiates a system that will iterate over the entities described by the Family, with a specific priority. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addedToEngine
(com.badlogic.ashley.core.Engine engine) com.badlogic.ashley.utils.ImmutableArray
<com.badlogic.ashley.core.Entity> com.badlogic.ashley.core.Family
protected abstract void
processEntity
(com.badlogic.ashley.core.Entity entity, float deltaTime) This method is called on every entity on every update call of the EntitySystem.void
removedFromEngine
(com.badlogic.ashley.core.Engine engine) void
update
(float deltaTime)
-
Constructor Details
-
ParallelSystem
protected ParallelSystem(com.badlogic.ashley.core.Family family) Instantiates a system that will iterate over the entities described by the Family.- Parameters:
family
- The family of entities iterated over in this System
-
ParallelSystem
protected ParallelSystem(com.badlogic.ashley.core.Family family, int priority) Instantiates a system that will iterate over the entities described by the Family, with a specific priority.- Parameters:
family
- The family of entities iterated over in this Systempriority
- The priority to execute this system with (lower means higher priority)
-
-
Method Details
-
addedToEngine
public void addedToEngine(com.badlogic.ashley.core.Engine engine) - Overrides:
addedToEngine
in classcom.badlogic.ashley.core.EntitySystem
-
removedFromEngine
public void removedFromEngine(com.badlogic.ashley.core.Engine engine) - Overrides:
removedFromEngine
in classcom.badlogic.ashley.core.EntitySystem
-
update
public void update(float deltaTime) - Overrides:
update
in classcom.badlogic.ashley.core.EntitySystem
-
getEntities
public com.badlogic.ashley.utils.ImmutableArray<com.badlogic.ashley.core.Entity> getEntities()- Returns:
- set of entities processed by the system
-
getFamily
public com.badlogic.ashley.core.Family getFamily()- Returns:
- the Family used when the system was created
-
processEntity
protected abstract void processEntity(com.badlogic.ashley.core.Entity entity, float deltaTime) This method is called on every entity on every update call of the EntitySystem. Override this to implement your system's specific processing.- Parameters:
entity
- The current Entity being processeddeltaTime
- The delta time between the last and current frame
-