public class GameEngine
extends processing.core.PApplet
Modifier and Type | Method and Description |
---|---|
static int |
getHeight()
This method retrieves the height in pixels of the game's window display.
|
static int |
getMouseX()
This method retrieves the x-position of the mouse in pixels within the
game window.
|
static int |
getMouseY()
This method retrieves the y-position of the mouse in pixels within the
game window.
|
static int |
getWidth()
This method retrieves the width in pixels of the game's window display.
|
static boolean |
isKeyHeld(java.lang.String key)
This method retrieves whether a key is currently being held by the user.
|
static boolean |
isKeyPressed(java.lang.String key)
This method retrieves whether a key has been just pressed by the user.
|
static void |
start(java.lang.Integer rngSeed,
java.lang.String[] levels)
This method creates a single Engine, and begins playing through the
specified sequence of levels.
|
public static void start(java.lang.Integer rngSeed, java.lang.String[] levels)
rngSeed
- - is an optional seed for a random number generator.
Passing null sets this seed to a value that is likely different upon each
invocation.levels
- - is the list of level file names that you would like the
player to progress through in this game.public static int getWidth()
public static int getHeight()
public static boolean isKeyPressed(java.lang.String key)
key
- - is the key (or mouse) that you would like to retrieve the
current status of. Most keys are retrieved by their face character:
"Q", "W', "1", "2", etc. Some other keys that can be detected by name
include: "TAB", "ENTER", "SHIFT", "SPACE", "LEFT", "UP", "RIGHT", "DOWN",
and "MOUSE" (where "MOUSE" represents the left mouse button).public static boolean isKeyHeld(java.lang.String key)
key
- - is the key (or mouse) that you would like to retrieve the
current status of. Most keys are retrieved by their face character:
"Q", "W', "1", "2", etc. Some other keys that can be detected by name
include: "TAB", "ENTER", "SHIFT", "SPACE", "LEFT", "UP", "RIGHT", "DOWN",
and "MOUSE" (where "MOUSE" represents the left mouse button).public static int getMouseX()
public static int getMouseY()