world.test
Class StateExamples

java.lang.Object
  extended by world.VoidWorld
      extended by world.test.StateExamples

public class StateExamples
extends VoidWorld

World example with more complex States (Menus, Options, Etc.)


Field Summary
 
Fields inherited from class world.VoidWorld
DEFAULT_TICK_RATE, KEY_ARROW_DOWN, KEY_ARROW_LEFT, KEY_ARROW_RIGHT, KEY_ARROW_UP, MOUSE_DOWN, MOUSE_DRAG, MOUSE_ENTER, MOUSE_LEAVE, MOUSE_MOVE, MOUSE_UP
 
Method Summary
static void main(java.lang.String[] args)
          Run the application as an Example
 Scene onDraw()
          Draw the current State of the world
 void onKey(java.lang.String key)
          React to a Key in the current State of the world
 void onMouse(int x, int y, java.lang.String me)
          React to a Mouse Event in the current State of the world
 void onRelease(java.lang.String key)
          React to a KeyRelease in the current State of the world
 void onTick()
          Tick the current State of the world
 
Methods inherited from class world.VoidWorld
bigBang, equals, lastScene, stopWhen, tickRate
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

onDraw

public Scene onDraw()
Draw the current State of the world

Specified by:
onDraw in class VoidWorld

onTick

public void onTick()
Tick the current State of the world

Overrides:
onTick in class VoidWorld

onKey

public void onKey(java.lang.String key)
React to a Key in the current State of the world

Overrides:
onKey in class VoidWorld

onRelease

public void onRelease(java.lang.String key)
React to a KeyRelease in the current State of the world

Overrides:
onRelease in class VoidWorld

onMouse

public void onMouse(int x,
                    int y,
                    java.lang.String me)
React to a Mouse Event in the current State of the world

Overrides:
onMouse in class VoidWorld

main

public static void main(java.lang.String[] args)
Run the application as an Example