|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectphysics.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 value| Method Detail |
|---|
public void setVelocity(int dx,
int dy,
int speed)
IMotion
setVelocity in class IMotiondy - - change in the y directionspeed - - the timer delaypublic void timerReact()
IMotion
timerReact in class IMotionpublic void start()
IMotion
start in class IMotionpublic void stop()
IMotion
stop in class IMotionpublic void bounce(CollisionObject c)
IMotion
bounce in class IMotionc - a CollisionObject valuepublic int getSpeed()
IMotion
getSpeed in class IMotionpublic int getDY()
IMotion
getDY in class IMotionpublic int getDX()
IMotion
getDX in class IMotionpublic void setDX(int dx)
IMotion
setDX in class IMotionpublic 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 | |||||||||