|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deken.game.motion.BaseMotion
org.deken.game.motion.SingleMotion
public class SingleMotion
Title: SingleMotion
Description: This animates a game piece with a single motion. The motion is the same, regardless of the direction of the game piece.
Copyright: Copyright (c) 2005
Field Summary |
---|
Fields inherited from class org.deken.game.motion.BaseMotion |
---|
boundingBox, boundingBoxSet |
Constructor Summary | |
---|---|
protected |
SingleMotion()
Used by copy(). |
|
SingleMotion(Animation animation)
SingleMotion |
Method Summary | |
---|---|
SingleMotion |
copy()
Copies the Motion. |
void |
draw(java.awt.Graphics2D graphics,
int x,
int y)
This method gets the current animation and draws it. |
Animation[] |
getAnimations()
Returns the Animations that make up this Motion |
float |
getDirection()
Returns the direction of the Motion. |
java.awt.Image |
getImage()
This returns the current Image of the Animation for this motion. |
java.lang.String |
getName()
The method returns the name of this Motion. |
void |
reset()
This reset the Animation, setting it to begin a new. |
void |
setDirection(float direction)
This method is not used. |
void |
setName(java.lang.String name)
Sets the name for the Motion. |
void |
update(long elapseTime,
float direction)
This takes the elapse time and GameVector, by calling setGameVector() and the update() of the Animation. |
Methods inherited from class org.deken.game.motion.BaseMotion |
---|
getBounds, isBoundsSet, setBoundingBox, setBoundingBox |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SingleMotion(Animation animation)
animation
- Animationprotected SingleMotion()
Method Detail |
---|
public SingleMotion copy()
public void draw(java.awt.Graphics2D graphics, int x, int y)
Motion
graphics
- x
- y
- public Animation[] getAnimations()
Motion
public float getDirection()
Motion
public java.awt.Image getImage()
public java.lang.String getName()
Motion
public void reset()
public void setDirection(float direction)
direction
- floatpublic void setName(java.lang.String name)
Motion
public void update(long elapseTime, float direction)
elapseTime
- longdirection
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |