Package com.tenio.engine.ecs.system
Class Systems
- java.lang.Object
-
- com.tenio.engine.ecs.system.Systems
-
- All Implemented Interfaces:
IExecuteSystem
,IInitializeSystem
,IRenderSystem
,ISystem
,ITearDownSystem
public final class Systems extends java.lang.Object implements IInitializeSystem, IExecuteSystem, IRenderSystem, ITearDownSystem
Systems provide a convenient way to group systems. You can addIInitializeSystem
,IExecuteSystem
,IRenderSystem
,ITearDownSystem
, initialized and executed based on the order you added them.- Author:
- kong
-
-
Constructor Summary
Constructors Constructor Description Systems()
Creates a new systems instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Systems
add(ISystem system)
Adds the system instance to the systems list.void
clearSystems()
Remove all systemsvoid
execute(float deltaTime)
Callsexecute()
on allIExecuteSystem
and other nested systems instances in the order you added them.void
initialize()
Callsinitialize()
on allIInitializeSystem
and other nested systems instances in the order you added them.boolean
isRunning()
Retrieves the systems statusvoid
paused(boolean flagPause)
Pause the systems runningvoid
render(Paint paint)
Callsrender()
on allIRenderSystem
and other nested systems instances in the order you added them.void
tearDown()
CallstearDown()
on allITearDownSystem
and other nested Systems instances in the order you added them.
-
-
-
Method Detail
-
add
public Systems add(ISystem system)
Adds the system instance to the systems list.- Parameters:
system
- new adding system- Returns:
- the current system instance
-
initialize
public void initialize()
Callsinitialize()
on allIInitializeSystem
and other nested systems instances in the order you added them.- Specified by:
initialize
in interfaceIInitializeSystem
- See Also:
IInitializeSystem.initialize()
-
execute
public void execute(float deltaTime)
Callsexecute()
on allIExecuteSystem
and other nested systems instances in the order you added them.- Specified by:
execute
in interfaceIExecuteSystem
- Parameters:
deltaTime
- the delta time- See Also:
IExecuteSystem.execute(float)
-
render
public void render(Paint paint)
Callsrender()
on allIRenderSystem
and other nested systems instances in the order you added them.- Specified by:
render
in interfaceIRenderSystem
- Parameters:
paint
- the renderer object- See Also:
IRenderSystem.render(Paint)
-
tearDown
public void tearDown()
CallstearDown()
on allITearDownSystem
and other nested Systems instances in the order you added them.- Specified by:
tearDown
in interfaceITearDownSystem
- See Also:
ITearDownSystem.tearDown()
-
clearSystems
public void clearSystems()
Remove all systems
-
paused
public void paused(boolean flagPause)
Pause the systems running- Parameters:
flagPause
- true for pausing, false otherwise- See Also:
__executeSystems
,__renderSystems
-
isRunning
public boolean isRunning()
Retrieves the systems status- Returns:
- true if systems are running, false otherwise
-
-