java.lang.Object
technology.sola.ecs.SolaEcs
SolaEcs is a wrapper for a collection of
EcsSystem.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds anEcsSystemto the collection.voidaddSystems(EcsSystem... ecsSystems) AddsEcsSystems to the collection.<T extends EcsSystem>
TReturns theEcsSystemcorresponding to the passed class.getWorld()voidremoveSystem(EcsSystem ecsSystem) Removed anEcsSystemfrom the collection.voidvoidupdateWorld(float deltaTime) Called when theWorldshould be updated.
-
Constructor Details
-
SolaEcs
public SolaEcs()Creates an emptySolaEcs. -
SolaEcs
- Parameters:
initialWorld- theWorldto initialize withinitialSystems- theEcsSystems to initialize with
-
-
Method Details
-
getWorld
- Returns:
- the
Worldthat will be updated
-
setWorld
- Parameters:
world- theWorldto update
-
updateWorld
public void updateWorld(float deltaTime) Called when theWorldshould be updated. All activeEcsSystem.update(technology.sola.ecs.World, float)methods will be called. After these updates anyEntitythat were mutated will be updated.- Parameters:
deltaTime- the delta time between updates
-
addSystems
AddsEcsSystems to the collection.- Parameters:
ecsSystems- theEcsSystems to add
-
addSystem
Adds anEcsSystemto the collection.- Parameters:
ecsSystem- theEcsSystemto add
-
removeSystem
Removed anEcsSystemfrom the collection.- Parameters:
ecsSystem- theEcsSystemto remove
-
getSystem
Returns theEcsSystemcorresponding 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
-