com.WorldLibAndroid.Demo
Class ShapeObj

java.lang.Object
  extended by com.WorldLibAndroid.Demo.ShapeObj

public class ShapeObj
extends java.lang.Object

The class that will hold the type of figure.

Since:
April 21, 2011
Author:
Christian Herrera

Method Summary
 void draw(ICanvas c)
          is the blob near the center of area given by the WIDTH and HEIGHT
 void moveAtOrient(int x, int y)
          Moves the blob using the orientation sensor.
 void moveAtTilt(int x, int y)
          Moves the blob using the acceleration sensor (when tilting the device).
 void moveAtTouch(int x, int y)
          Moves the blob when touching the screen.
 void moveBlob(int ke)
          Places the blob certain amount of pixels to the left, right, up or down.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

moveBlob

public void moveBlob(int ke)
Places the blob certain amount of pixels to the left, right, up or down. Changes the color of the blob.

Parameters:
ke - the integer representing the key pressed.

moveAtTouch

public void moveAtTouch(int x,
                        int y)
Moves the blob when touching the screen.

Parameters:
x - coordinate to move the object to.
y - coordinate to move the object to.

moveAtTilt

public void moveAtTilt(int x,
                       int y)
Moves the blob using the acceleration sensor (when tilting the device).

Parameters:
x - coordinate to move the object to.
y - coordinate to move the object to.

moveAtOrient

public void moveAtOrient(int x,
                         int y)
Moves the blob using the orientation sensor.

Parameters:
x - coordinate to move the object to.
y - coordinate to move the object to.

draw

public void draw(ICanvas c)
is the blob near the center of area given by the WIDTH and HEIGHT

Parameters:
c - object canvas.