testing.gameEngine
Class Demo

java.lang.Object
  extended by testing.gameEngine.Demo
All Implemented Interfaces:
java.util.EventListener

public class Demo
extends java.lang.Object
implements java.util.EventListener

Demo showing a basic implementation of functional keyboard input and the event-based system.

Author:
Scott Brothers, Geoffrey Lawler

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

Demo

public Demo()
Method Detail

moveUp

public void moveUp(UpEvent up)
Moves the ship up five units. Called when an UpEvent has been fired.

Parameters:
up - the fired UpEvent

moveDown

public void moveDown(DownEvent down)
Moves the ship down five units. Called when a DownEvent has been fired.

Parameters:
down - the fired DownEvent

moveLeft

public void moveLeft(LeftEvent left)
Moves the ship left five units. Called when a LeftEvent has been fired.

Parameters:
left - the fired LeftEvent

moveRight

public void moveRight(RightEvent right)
Moves the ship right five units. Called when a RightEvent has been fired.

Parameters:
right - the fired RightEvent

main

public static void main(java.lang.String[] args)
Main method for the Demo. Adds a GameItem to the list of loaded items and assigns keyboard input for moving up, down, left, and right.