gameaction
Class RunAnimation
java.lang.Object
gameaction.AbstractGameAction
gameaction.RunAnimation
- All Implemented Interfaces:
- java.io.Serializable
public class RunAnimation
- extends AbstractGameAction
This game action can be used to run an animation sequence
specified by an image containing the sequence
- Author:
- Frank Bruns
- See Also:
- Serialized Form
Method Summary |
void |
update(long elapsedTime)
Updates the game action |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RunAnimation
public RunAnimation(AbstractCharacterSprite c,
java.lang.String animImgPath,
int rows,
int picsPerRow)
- Creates a new game action for running an animation
- Parameters:
c
- character to use the animation foranimImgPath
- path+filename to the anim sequence imagerows
- number of rows in the anim sequence imagepicsPerRow
- number of pics per row of the anim image
RunAnimation
public RunAnimation(AbstractCharacterSprite c,
java.lang.String animImgPath,
int rows,
int picsPerRow,
int numRepeats)
- Creates a new game action for running an animation
- Parameters:
c
- character to use the animation foranimImgPath
- path+filename to the anim sequence imagerows
- number of rows in the anim sequence imagepicsPerRow
- number of pics per row of the anim imagenumRepeats
- number of times the animation ought to be
played in immediate repetition
update
public void update(long elapsedTime)
- Description copied from class:
AbstractGameAction
- Updates the game action
- Specified by:
update
in class AbstractGameAction
- Parameters:
elapsedTime
- time between two frames