|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object android.world.BigBang
public class BigBang
A Class representing a World of some type, and the related methods and Function Objects (call-backs) for drawing the world and handling various events. As handlers are installed, each is checked for a corresponding apply method with the appropriate signature.
The initial value of the World assigns a (minimum) type, which is
used to search/check all of the handlers. Functions that produce a world
deserve special attention, since they may return a super-type of the
initial World (e.g., initial EmptyScene, with an tick handler that
returns a Scene). The name and types of handlers are given in the
table below:
Event Name | BigBang Method | Handler Signature | Required? |
---|---|---|---|
OnDraw | onDraw(handler) | Scene apply(World w) | yes |
OnTick | onTick(handler) or ontick(handler, double) | World apply(World w) | no |
OnMouse | onMouse(handler) | World apply(World w, int x, int y, String what) | no |
OnKey | onKey(handler) | World apply(World w, String key) | no |
OnRelease | onRelease(handler) | World apply(World w, String key) | no |
StopWhen | stopWhen(handler) | boolean apply(World w) | no |
LastScene | lastScene(handler) | Scene apply(World w) | no |
Event Name | BigBang Method | Handler Signature | Required? |
---|---|---|---|
Orientation | orientation(handler) | World apply(World w, float x, float y, float z) | no |
Field Summary | |
---|---|
static java.lang.String |
KEY_ARROW_DOWN
Key arrow-down event String |
static java.lang.String |
KEY_ARROW_LEFT
Key arrow-left event String |
static java.lang.String |
KEY_ARROW_RIGHT
Key arrow-right event String |
static java.lang.String |
KEY_ARROW_UP
Key arrow-up event String |
static java.lang.String |
KEY_MENU
Menu Key event String. |
static java.lang.String |
KEY_SEARCH
Search Key event String |
static java.lang.String |
LONG_MOUSE_DOWN
Mouse down (button-down) event String |
static java.lang.String |
MOUSE_DOWN
Mouse down (button-down) event String |
static java.lang.String |
MOUSE_DRAG
Mouse down & move (drag) event String |
static java.lang.String |
MOUSE_MOVE
Mouse motion (move) event String |
static java.lang.String |
MOUSE_UP
Mouse up (button-up) event String |
Constructor Summary | |
---|---|
BigBang(java.lang.Object initial)
Create a new BigBang with a value of the initial World |
Method Summary | |
---|---|
java.lang.Object |
bigBang(android.app.Activity act)
Construct and start the animation/interaction system. |
java.lang.Object |
bigBangFullscreen(android.app.Activity act)
Construct and start the animation/interaction system with the Android device in FULLSCREEN mode. |
java.lang.Object |
bigBangLandscape(android.app.Activity act)
Construct and start the animation/interaction system with the Android device in LANDSCAPE mode. |
java.lang.Object |
bigBangLandscapeFullscreen(android.app.Activity act)
Construct and start the animation/interaction system with the Android device in LANDSCAPE mode. |
BigBang |
lastScene(java.lang.Object lastscene)
Install a LastScene Handler into this BigBang. |
BigBang |
onDraw(java.lang.Object ondraw)
Install a Draw Handler into this BigBang. |
BigBang |
onKey(java.lang.Object onkey)
Install a Key Handler into this BigBang. |
BigBang |
onMouse(java.lang.Object onmouse)
Install a Mouse Handler into this BigBang. |
BigBang |
onRelease(java.lang.Object onrelease)
Install a Key Release Handler into this BigBang. |
BigBang |
onTick(java.lang.Object ontick)
Install a Tick Handler at a tick rate of 1/20th of a second. |
BigBang |
onTick(java.lang.Object ontick,
double time)
Install a Tick Handler into this BigBang at the given tick rate (per-seconds). |
BigBang |
orientation(java.lang.Object orientation)
Install an Orientation Handler into this BigBang. |
BigBang |
stopWhen(java.lang.Object stopwhen)
Install a StopWhen Handler into this BigBang. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String MOUSE_DOWN
public static java.lang.String LONG_MOUSE_DOWN
public static java.lang.String MOUSE_UP
public static java.lang.String MOUSE_MOVE
public static java.lang.String MOUSE_DRAG
public static java.lang.String KEY_ARROW_UP
public static java.lang.String KEY_ARROW_DOWN
public static java.lang.String KEY_ARROW_LEFT
public static java.lang.String KEY_ARROW_RIGHT
public static java.lang.String KEY_MENU
public static java.lang.String KEY_SEARCH
Constructor Detail |
---|
public BigBang(java.lang.Object initial)
Method Detail |
---|
public BigBang onDraw(java.lang.Object ondraw)
public BigBang onTick(java.lang.Object ontick)
public BigBang onTick(java.lang.Object ontick, double time)
public BigBang onMouse(java.lang.Object onmouse)
public BigBang onKey(java.lang.Object onkey)
public BigBang onRelease(java.lang.Object onrelease)
public BigBang stopWhen(java.lang.Object stopwhen)
public BigBang lastScene(java.lang.Object lastscene)
public BigBang orientation(java.lang.Object orientation)
The three dimensional vector represents the direction of gravitational force (i.e., the ground) as compared to the device at rest (e.g., flat on a level table) where Z points directly at the ground. The X and Y vectors are in the device's screen coordinates, and Z typically points out the back of the device.
public java.lang.Object bigBang(android.app.Activity act)
public java.lang.Object bigBangLandscape(android.app.Activity act)
public java.lang.Object bigBangFullscreen(android.app.Activity act)
public java.lang.Object bigBangLandscapeFullscreen(android.app.Activity act)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |