com.WorldLibAndroid
Class World

java.lang.Object
  extended by Activity
      extended by com.WorldLibAndroid.World
All Implemented Interfaces:
IInit
Direct Known Subclasses:
MainWorld

public class World
extends Activity
implements IInit

World for programming interactive games - with graphics, key events, mouse events and a timer. Designed to implement the same interface as DrScheme/ProfessorJ world teachpack library.

Since:
November 15, 2007
Author:
Viera K. Proulx

Constructor Summary
World()
           
 
Method Summary
 void bigBang(int width, int height, long mili, long interval)
          Start the world by creating a canvas of the given size, creating and adding the key and mouse adapters, and starting the timer at the given speed.
 ContextThemeWrapper context()
          Access to the application's environment.
 void endOfWorld()
          End the world interactions - leave the canvas open, write the end of world message onto the canvas
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

World

public World()
Method Detail

bigBang

public void bigBang(int width,
                    int height,
                    long mili,
                    long interval)
Start the world by creating a canvas of the given size, creating and adding the key and mouse adapters, and starting the timer at the given speed.

Specified by:
bigBang in interface IInit
Parameters:
width - the Canvas of the CanvasPanel
height - the Canvas of the CanvasPanel
mili - The number of millis in the future from the call to start() until the countdown is done and onFinish() is called.
interval - the The interval along the way to receive onTick(long) callbacks.

endOfWorld

public void endOfWorld()
End the world interactions - leave the canvas open, write the end of world message onto the canvas

Specified by:
endOfWorld in interface IInit

context

public ContextThemeWrapper context()
Description copied from interface: IInit
Access to the application's environment.

Specified by:
context in interface IInit
Returns:
the application context