|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttesting.gameEngine.Demo
public class Demo
Demo showing a basic implementation of functional keyboard input and the event-based system.
Constructor Summary | |
---|---|
Demo()
|
Method Summary | |
---|---|
static void |
main(java.lang.String[] args)
Main method for the Demo . |
void |
moveDown(DownEvent down)
Moves the ship down five units. |
void |
moveLeft(LeftEvent left)
Moves the ship left five units. |
void |
moveRight(RightEvent right)
Moves the ship right five units. |
void |
moveUp(UpEvent up)
Moves the ship up five units. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Demo()
Method Detail |
---|
public void moveUp(UpEvent up)
UpEvent
has
been fired.
up
- the fired UpEvent
public void moveDown(DownEvent down)
DownEvent
has
been fired.
down
- the fired DownEvent
public void moveLeft(LeftEvent left)
LeftEvent
has
been fired.
left
- the fired LeftEvent
public void moveRight(RightEvent right)
RightEvent
has been fired.
right
- the fired RightEvent
public static void main(java.lang.String[] args)
Demo
. Adds a GameItem
to
the list of loaded items and assigns keyboard input for moving up, down,
left, and right.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |