Package nl.colorize.multimedialib.tool
Class Demo2D
java.lang.Object
nl.colorize.multimedialib.tool.Demo2D
- All Implemented Interfaces:
ErrorHandler
,Scene
Simple demo application that displays a number of animated Mario sprites on
top of a black background.
application when using the framework to implement an application. Second, it can be used for verification purposes to determine if a new platform is fully supported.
The demo application can be started from the command line using the
DemoLauncher
. It can also be embedded in applications by creating an
instance of this class from the application code.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
Fields inherited from interface nl.colorize.multimedialib.renderer.ErrorHandler
DEFAULT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
onError
(SceneContext context, Exception cause) void
start
(SceneContext context) Initialization logic that should be performed when the scene is started.void
update
(SceneContext context, float deltaTime) Called during every frame update for as long as the scene is active.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface nl.colorize.multimedialib.scene.Scene
end, isCompleted, resize
-
Field Details
-
DEFAULT_CANVAS_WIDTH
public static final int DEFAULT_CANVAS_WIDTH- See Also:
-
DEFAULT_CANVAS_HEIGHT
public static final int DEFAULT_CANVAS_HEIGHT- See Also:
-
-
Constructor Details
-
Demo2D
public Demo2D()
-
-
Method Details
-
start
Description copied from interface:Scene
Initialization logic that should be performed when the scene is started. Note that this method is called *every* time the scene is started, not just the first time.This method is optional, the default implementation does nothing.
-
onError
- Specified by:
onError
in interfaceErrorHandler
-
update
Description copied from interface:Scene
Called during every frame update for as long as the scene is active.deltaTime
indicates the elapsed time since the last frame, in seconds. -
addMarios
public void addMarios()
-