Package nl.colorize.multimedialib.scene
Class ComplexScene
- java.lang.Object
-
- nl.colorize.multimedialib.scene.ComplexScene
-
- All Implemented Interfaces:
Renderable,Updatable,Scene
public abstract class ComplexScene extends java.lang.Object implements Scene
Scene that is split into a number of subsystems, which are also represented by scenes. This is typically needed for scenes that contain a significant amount of functionality, in which case the scene can be split into subsystems, with each subsystem corresponding to a functional area, to manage the scene's complexity.
-
-
Constructor Summary
Constructors Constructor Description ComplexScene(Application app)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected ApplicationgetApp()ColorRGBgetBackgroundColor()protected CanvasgetCanvas()EffectManagergetEffectManager()protected abstract voidinitScene()Initializes the scene itself, before any of its subsystems are started.protected abstract java.util.List<Scene>initSubSystems()Initializes the list of subsystems that will be used within this scene.voidrender(GraphicsContext graphics)voidsetBackgroundColor(ColorRGB backgroundColor)protected booleanshouldRender(Scene subSystem)voidstart()Initiallization logic that is performed every time the scene is started.voidupdate(float deltaTime)Updates this object for the current frame.
-
-
-
Constructor Detail
-
ComplexScene
public ComplexScene(Application app)
-
-
Method Detail
-
start
public final void start()
Description copied from interface:SceneInitiallization logic that is performed every time the scene is started. Implementing this method is optional, the default implementation does nothing.
-
initScene
protected abstract void initScene()
Initializes the scene itself, before any of its subsystems are started. This method is called every time the scene is started.
-
initSubSystems
protected abstract java.util.List<Scene> initSubSystems()
Initializes the list of subsystems that will be used within this scene. This method is called every time the scene is started.
-
update
public void update(float deltaTime)
Description copied from interface:UpdatableUpdates this object for the current frame.
-
render
public void render(GraphicsContext graphics)
- Specified by:
renderin interfaceRenderable
-
shouldRender
protected boolean shouldRender(Scene subSystem)
-
getApp
protected Application getApp()
-
getCanvas
protected Canvas getCanvas()
-
getEffectManager
public EffectManager getEffectManager()
-
setBackgroundColor
public void setBackgroundColor(ColorRGB backgroundColor)
-
getBackgroundColor
public ColorRGB getBackgroundColor()
-
-