game
Class MovingGraphic

java.lang.Object
  extended by game.MovingBody
      extended by game.MovingGraphic
All Implemented Interfaces:
Animated
Direct Known Subclasses:
Dart, SimpleBalloon

public class MovingGraphic
extends MovingBody

A MovingBody in the form of a single Shape that responds to ticks by setting its location

Author:
cytron

Field Summary
 
Fields inherited from class game.MovingBody
lr, outOfBounds, start, ul
 
Constructor Summary
MovingGraphic(Controller controller, Trackable t, Graphic s, Point ul, Point lr)
          Manage an animated Shape.
 
Method Summary
 Graphic getShape()
           
 void respondAfterTick()
          Responds to a tick by updating the location of this shape.
 void respondToDeath()
          Responds to death by removing the same from the controller.
 
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, toString, wait, wait, wait
 

Constructor Detail

MovingGraphic

public MovingGraphic(Controller controller,
                     Trackable t,
                     Graphic s,
                     Point ul,
                     Point lr)
Manage an animated Shape.

Parameters:
controller - Shape will be added to the controller's displayed shapes
t - The trajectory tracking
s - The shape
ul - Upper left corner of visible box
lr - Lower right corner of visible box
Method Detail

respondAfterTick

public void respondAfterTick()
Responds to a tick by updating the location of this shape.

Specified by:
respondAfterTick in class MovingBody

respondToDeath

public void respondToDeath()
Responds to death by removing the same from the controller.

Specified by:
respondToDeath in class MovingBody

getShape

public Graphic getShape()