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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final ColorRGBprotected static final intprotected static final intstatic final intstatic final intprotected static final ColorRGBprotected static final nl.colorize.util.ResourceFileprotected static final ColorRGBprotected static final ColorRGBprotected static final ColorRGBFields inherited from interface nl.colorize.multimedialib.renderer.ErrorHandler
DEFAULT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidonError(SceneContext context, Exception cause) voidstart(SceneContext context) Initialization logic that should be performed when the scene is started.voidupdate(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, waitMethods inherited from interface nl.colorize.multimedialib.scene.Scene
end, isCompleted
-
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:
-
BUTTON_WIDTH
protected static final int BUTTON_WIDTH- See Also:
-
BUTTON_HEIGHT
protected static final int BUTTON_HEIGHT- See Also:
-
RED_BUTTON
-
GREEN_BUTTON
-
PINK_BUTTON
-
BLUE_BUTTON
-
ORANGE_BUTTON
-
MARIO_SPRITES_FILE
protected static final nl.colorize.util.ResourceFile MARIO_SPRITES_FILE
-
-
Constructor Details
-
Demo2D
public Demo2D()
-
-
Method Details
-
start
Description copied from interface:SceneInitialization 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:
onErrorin interfaceErrorHandler
-
update
Description copied from interface:SceneCalled during every frame update for as long as the scene is active.deltaTimeindicates the elapsed time since the last frame, in seconds. -
addMarios
public void addMarios()
-