Class GravityParticle

java.lang.Object
  extended by Particle
      extended by GravityParticle

public class GravityParticle
extends Particle

This particle obeys gravity

Author:
Tim

Field Summary
static double GRAVITY
          The acceleration (in pixels per frame) due to "Gravity"
 
Constructor Summary
GravityParticle(double hue, double startX, double startY)
          Constructor that lets you determine color and start position.
 
Method Summary
 void takeOneStep()
          Move this Particle one frame's worth of movement.
 
Methods inherited from class Particle
drawSelf, getColor, getTimesMoved, getXPosition, getXVelocity, getYPosition, getYVelocity, setXPosition, setXVelocity, setYPosition, setYVelocity
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GRAVITY

public static final double GRAVITY
The acceleration (in pixels per frame) due to "Gravity"

See Also:
Constant Field Values
Constructor Detail

GravityParticle

public GravityParticle(double hue,
                       double startX,
                       double startY)
Constructor that lets you determine color and start position.

Parameters:
hue - A number from 0 to 1 that specifies desired hue of the Particle
startX - The starting x coordinate
startY - The starting y coordinate
Method Detail

takeOneStep

public void takeOneStep()
Move this Particle one frame's worth of movement. It uses some gravity.

Overrides:
takeOneStep in class Particle