physics
Class NullMotion

java.lang.Object
  extended by physics.IMotion
      extended by physics.NullMotion

public class NullMotion
extends IMotion

NullMotion.java Created: Saturday September 18 11:45:51 2004

Version:
A motion that does nothing
Author:

Constructor Summary
NullMotion(CollisionObject colOb)
          Creates a new NullMotion instance.
 
Method Summary
 void bounce(CollisionObject c)
          Override to create a bounce for this motion when it collides with col
 int getDX()
          Should return the DX value
 int getDY()
          Should return the DY value
 int getSpeed()
          Should return the speed of this motion
 void setDX(int dx)
          Should change the DX value
 void setDY(int dy)
          Should change the DY value
 void setVelocity(int dx, int dy, int speed)
          Set the velocity of this motion
 void start()
          Should start the timer of this motion
 void stop()
          Should stop the timer of this motion
 void timerReact()
          Called when the timer reacts Should be overridden to do something useful
 
Methods inherited from class physics.IMotion
changeMomentum, getCollided, getVelocity, setCoefficient, setDX, setDY, setGravity, setLocation, switchMomentum
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullMotion

public NullMotion(CollisionObject colOb)
Creates a new NullMotion instance. Sets the speed to 0

Parameters:
colOb - a CollisionObject value
Method Detail

setVelocity

public void setVelocity(int dx,
                        int dy,
                        int speed)
Description copied from class: IMotion
Set the velocity of this motion

Specified by:
setVelocity in class IMotion
dy - - change in the y direction
speed - - the timer delay

timerReact

public void timerReact()
Description copied from class: IMotion
Called when the timer reacts Should be overridden to do something useful

Specified by:
timerReact in class IMotion

start

public void start()
Description copied from class: IMotion
Should start the timer of this motion

Specified by:
start in class IMotion

stop

public void stop()
Description copied from class: IMotion
Should stop the timer of this motion

Specified by:
stop in class IMotion

bounce

public void bounce(CollisionObject c)
Description copied from class: IMotion
Override to create a bounce for this motion when it collides with col

Specified by:
bounce in class IMotion
Parameters:
c - a CollisionObject value

getSpeed

public int getSpeed()
Description copied from class: IMotion
Should return the speed of this motion

Specified by:
getSpeed in class IMotion
Returns:
the timer delay

getDY

public int getDY()
Description copied from class: IMotion
Should return the DY value

Specified by:
getDY in class IMotion
Returns:
change in the y direction

getDX

public int getDX()
Description copied from class: IMotion
Should return the DX value

Specified by:
getDX in class IMotion
Returns:
change in the x direction

setDX

public void setDX(int dx)
Description copied from class: IMotion
Should change the DX value

Specified by:
setDX in class IMotion

setDY

public void setDY(int dy)
Description copied from class: IMotion
Should change the DY value

Specified by:
setDY in class IMotion