game
Class CurveTracer

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

public class CurveTracer
extends MovingBody

A MovingBody that responds to ticks by drawing more of a curve. The curve is drawn using straight lines between the evaluated points.

Author:
cytron

Field Summary
protected  Point lastPoint
           
protected  VirtualImagePainter painter
           
 
Fields inherited from class game.MovingBody
lr, outOfBounds, start, ul
 
Constructor Summary
CurveTracer(Trajectory t, Point ul, Point lr, VirtualImagePainter painter)
           
 
Method Summary
 void respondAfterTick()
          Give subclasses a chance to respond to each tick
 void respondToDeath()
          Give subclasses a chance to respond to their death
 java.lang.String toString()
           
 
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
 

Field Detail

lastPoint

protected Point lastPoint

painter

protected VirtualImagePainter painter
Constructor Detail

CurveTracer

public CurveTracer(Trajectory t,
                   Point ul,
                   Point lr,
                   VirtualImagePainter painter)
Method Detail

respondAfterTick

public void respondAfterTick()
Description copied from class: MovingBody
Give subclasses a chance to respond to each tick

Specified by:
respondAfterTick in class MovingBody

respondToDeath

public void respondToDeath()
Description copied from class: MovingBody
Give subclasses a chance to respond to their death

Specified by:
respondToDeath in class MovingBody

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object