|
||||||||||
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.StaticMotion
public class StaticMotion
Title: StaticMotion
Description: The motion of the Actor doesn't change by direction. It looks the same for all directions.
Copyright: Copyright (c) Dec 23, 2010
Field Summary |
---|
Fields inherited from class org.deken.game.motion.BaseMotion |
---|
boundingBox, boundingBoxSet |
Constructor Summary | |
---|---|
protected |
StaticMotion()
Used by copy(). |
|
StaticMotion(Animation animation)
|
Method Summary | |
---|---|
StaticMotion |
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 method returns the current frame of the animation. |
java.lang.String |
getName()
The method returns the name of this Motion. |
void |
reset()
Resets the animation, setting it to begin a new. |
void |
setDirection(float direction)
Direction is not used in this class. |
void |
setName(java.lang.String name)
Sets the name for the Motion. |
void |
update(long elapseTime,
float direction)
This takes the elapse time and calls update() on 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 StaticMotion(Animation animation)
animation
- protected StaticMotion()
Method Detail |
---|
public StaticMotion 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()
Motion
public java.lang.String getName()
Motion
public void reset()
public void setDirection(float direction)
direction
- public void setName(java.lang.String name)
Motion
public void update(long elapseTime, float direction)
elapseTime
- direction
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |