game
Class MovingPicture

java.lang.Object
  extended by game.MovingBody
      extended by game.MovingGraphics
          extended by game.MovingPicture
All Implemented Interfaces:
Animated

public class MovingPicture
extends MovingGraphics

Allows one or more pictures to move with the supplied Trackable


Field Summary
 
Fields inherited from class game.MovingBody
lr, outOfBounds, start, ul
 
Constructor Summary
MovingPicture(Controller controller, Trackable trajectory, Point ul, Point lr)
          The constructor sets up this object, but no pictures are loaded yet.
 
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 game.MovingGraphics
addGraphic, respondAfterTick, respondToDeath
 
Methods inherited from class game.MovingBody
die, getLocation, getStart, inBounds, isDone, setTrajectory, tick
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 -
Method Detail

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