java.lang.Object
technology.sola.ecs.SolaEcs
SolaEcs is a wrapper for a collection of
EcsSystem
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds anEcsSystem
to the collection.void
addSystems
(EcsSystem... ecsSystems) AddsEcsSystem
s to the collection.<T extends EcsSystem>
TReturns theEcsSystem
corresponding to the passed class.getWorld()
void
removeSystem
(EcsSystem ecsSystem) Removed anEcsSystem
from the collection.void
void
updateWorld
(float deltaTime) Called when theWorld
should be updated.
-
Constructor Details
-
SolaEcs
public SolaEcs()Creates an emptySolaEcs
. -
SolaEcs
- Parameters:
initialWorld
- theWorld
to initialize withinitialSystems
- theEcsSystem
s to initialize with
-
-
Method Details
-
getWorld
- Returns:
- the
World
that will be updated
-
setWorld
- Parameters:
world
- theWorld
to update
-
updateWorld
public void updateWorld(float deltaTime) Called when theWorld
should be updated. All activeEcsSystem.update(technology.sola.ecs.World, float)
methods will be called. After these updates anyEntity
that were queued to be destroyed will be cleaned up.- Parameters:
deltaTime
- the delta time between updates
-
addSystems
AddsEcsSystem
s to the collection.- Parameters:
ecsSystems
- theEcsSystem
s to add
-
addSystem
Adds anEcsSystem
to the collection.- Parameters:
ecsSystem
- theEcsSystem
to add
-
removeSystem
Removed anEcsSystem
from the collection.- Parameters:
ecsSystem
- theEcsSystem
to remove
-
getSystem
Returns theEcsSystem
corresponding to the passed class.- Type Parameters:
T
- the type extendingEcsSystem
- Parameters:
ecsSystemClass
- the class for the desiredEcsSystem
- Returns:
- the
EcsSystem
- Throws:
EcsSystemNotFoundException
- when not found
-
getSystems
-
systemIterator
-
activeSystemIterator
-