game
Class MovingPicture
java.lang.Object
game.MovingBody
game.MovingGraphics
game.MovingPicture
- All Implemented Interfaces:
- Animated
public class MovingPicture
- extends MovingGraphics
Allows one or more pictures to move with the supplied Trackable
|
Method Summary |
void |
addPicture(java.lang.String name,
int width,
int height,
Vector offset)
Add a picture to the collection of moving objects. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MovingPicture
public MovingPicture(Controller controller,
Trackable trajectory,
Point ul,
Point lr)
- The constructor sets up this object, but no pictures are loaded yet.
- Parameters:
controller - trajectory - ul - lr -
addPicture
public void addPicture(java.lang.String name,
int width,
int height,
Vector offset)
- Add a picture to the collection of moving objects.
- Parameters:
name - File name of the image, such as "ken.jpg"width - Width in which the picture should be made to fit.height - Heigth in which the picture should be made to fit.offset - Relative distance from the main Trackable path for this picture.
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object