Package nl.colorize.multimedialib.tool
Class Demo2D
- java.lang.Object
-
- nl.colorize.multimedialib.tool.Demo2D
-
- All Implemented Interfaces:
Scene
public class Demo2D extends java.lang.Object implements Scene
Simple demo application that displays a number of animated Mario sprites on top of a black background.The demo application serves two purposes. First, it can be used as an example 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
Fields Modifier and Type Field Description static intDEFAULT_CANVAS_HEIGHTstatic intDEFAULT_CANVAS_WIDTHstatic intDEFAULT_FRAMERATE
-
Constructor Summary
Constructors Constructor Description Demo2D()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMarios(int amount)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)
-
-
-
Field Detail
-
DEFAULT_CANVAS_WIDTH
public static final int DEFAULT_CANVAS_WIDTH
- See Also:
- Constant Field Values
-
DEFAULT_CANVAS_HEIGHT
public static final int DEFAULT_CANVAS_HEIGHT
- See Also:
- Constant Field Values
-
DEFAULT_FRAMERATE
public static final int DEFAULT_FRAMERATE
- See Also:
- Constant Field Values
-
-
Method Detail
-
start
public void start(Application app)
Description copied from interface:SceneInitiallization logic that should be performed every time the scene is started. This method is called by the application that contains the scene.
-
update
public void update(Application app, float deltaTime)
-
render
public void render(Application app, GraphicsContext2D graphics)
-
addMarios
public void addMarios(int amount)
-
-