|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.WorldLibAndroid.Demo.BlobWorld
public class BlobWorld
BlobWorld Class
Constructor Summary | |
---|---|
BlobWorld()
Contructor |
Method Summary | |
---|---|
void |
draw(ICanvas c)
With this method the user can draw on the canvas. |
void |
onGyroscopeEvent(float x,
float y,
float z)
Performs an action when tilting the device by using the gyroscope. |
void |
onInit(IInit ii)
With this method the user establish the initial values at bigBang. |
void |
onKeyEvent(int s)
Move the Blob when the player presses a key |
void |
onOrientationEvent(float x,
float y,
float z)
Performs an action when tilting the device by using the gyroscope. |
void |
onTick()
On tick check whether the Blob is out of bounds, or fell into the black hole in the middle. |
void |
onTiltEvent(float x,
float y,
float z)
Performs an action when tilting the device by using the accelerometer. |
void |
onTouchEvent(int x,
int y)
Performs an action when touching the screen of the device. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BlobWorld()
Method Detail |
---|
public void draw(ICanvas c)
IWorld
draw
in interface IWorld
c
- Canvas object to insert the figures to draw in.public void onKeyEvent(int s)
onKeyEvent
in interface IWorld
s
- the key pressedpublic void onTick()
onTick
in interface IWorld
public void onTouchEvent(int x, int y)
IWorld
onTouchEvent
in interface IWorld
x
- coordinate of the touched area.y
- coordinate of the touched area.public void onTiltEvent(float x, float y, float z)
IWorld
onTiltEvent
in interface IWorld
x
- Acceleration minus Gx on the x-axis.y
- Acceleration minus Gy on the y-axis.z
- Acceleration minus Gz on the z-axis. Note: Get more
information on Android's Sensorspublic void onGyroscopeEvent(float x, float y, float z)
IWorld
onGyroscopeEvent
in interface IWorld
x
- Angular speed around the x-axis.y
- Angular speed around the y-axis.z
- Angular speed around the z-axis. Note: Get more information on
Android's Sensorspublic void onOrientationEvent(float x, float y, float z)
IWorld
onOrientationEvent
in interface IWorld
x
- Azimuth, angle between the magnetic north direction and the y-axis, around the z-axis (0 to 359). 0=North, 90=East, 180=South, 270=West.y
- Pitch, rotation around x-axis (-180 to 180), with positive values when the z-axis moves toward the y-axis.z
- Roll, rotation around y-axis (-90 to 90), with positive values when the x-axis moves toward the z-axis.
Note: Get more information on Android's Sensorspublic void onInit(IInit ii)
IWorld
onInit
in interface IWorld
ii
- object where we can establish the initial values.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |