|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object physics.IMotion physics.NullMotion
public class NullMotion
NullMotion.java Created: Saturday September 18 11:45:51 2004
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 |
---|
public NullMotion(CollisionObject colOb)
NullMotion
instance. Sets the speed to 0
colOb
- a CollisionObject
valueMethod Detail |
---|
public void setVelocity(int dx, int dy, int speed)
IMotion
setVelocity
in class IMotion
dy
- - change in the y directionspeed
- - the timer delaypublic void timerReact()
IMotion
timerReact
in class IMotion
public void start()
IMotion
start
in class IMotion
public void stop()
IMotion
stop
in class IMotion
public void bounce(CollisionObject c)
IMotion
bounce
in class IMotion
c
- a CollisionObject
valuepublic int getSpeed()
IMotion
getSpeed
in class IMotion
public int getDY()
IMotion
getDY
in class IMotion
public int getDX()
IMotion
getDX
in class IMotion
public void setDX(int dx)
IMotion
setDX
in class IMotion
public void setDY(int dy)
IMotion
setDY
in class IMotion
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |