Package nl.colorize.multimedialib.scene
Interface Scene
-
- All Known Implementing Classes:
Demo2D,Demo3D,MenuScene,SceneWrapper
public interface SceneRepresents a discrete part or phase of an application, that is active for some period of time. Simple applications might consist of a single scene, complex applications can have dozens. Scenes can contain logic, rendering, though they will typically do both.Scenes will receive updates at various points throughout their life cycle: when the scene is started (which can occur multiple times depending on the application flow), and then frame updates and rendering when the scene is active.
Scenes contain methods that are similar to
UpdatableandDrawable, for performing frame updates and drawing graphics respectively. The main difference is that the scene gets full access to the application. Larger scenes can divide their logic and graphics into separate parts using the aforementioned interfaces.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidend(Application app)Clean-up logic that is performed every time the scene ends.voidrender(Application app, GraphicsContext2D graphics)voidstart(Application app)Initiallization logic that should be performed every time the scene is started.voidupdate(Application app, float deltaTime)
-
-
-
Method Detail
-
start
void start(Application app)
Initiallization logic that should be performed every time the scene is started. This method is called by the application that contains the scene.
-
update
void update(Application app, float deltaTime)
-
render
void render(Application app, GraphicsContext2D graphics)
-
end
default void end(Application app)
Clean-up logic that is performed every time the scene ends. Implementing this method is optional, the default implementation does nothing.
-
-