|
Genuts ME API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.genuts.gameui.Sprite
com.genuts.gameui.ImageSequenceSprite
com.genuts.gameui.AnimatedSprite
com.genuts.gameui.SimpleAnimationSprite
A simple animation sprite provides a sprite for an animated picture with several cycles of animation. When the number of cycle is done, the animation stops.
AnimatedSprite
Constructor Summary | |
SimpleAnimationSprite(Image seq,
int nbh,
int nbv,
int frequence)
Initializes the sprite, with an animation image with one cycle of animation. |
|
SimpleAnimationSprite(Image seq,
int nbh,
int nbv,
int frequence,
int cycles)
Initializes the sprite, with an animation image with several animations cycles. |
Method Summary | |
int |
getCycles()
Gets the number of cycles of this animation. |
int |
getDoneCycles()
Gets the number of done cycles of this animation. |
boolean |
isSequenceEnded()
Indicates if the animation for this object has ended. |
void |
resetAnimation()
Reset the animation. |
protected void |
sequenceEnded()
Indicate that all cycles of the animation are ended. |
void |
setCycles(int cycles)
Sets the number of cycles for this animation. |
void |
setDoneCycles(int cycles)
Sets the number of done cycles for this animation. |
protected void |
setParent(PlayField parent)
Sets the parent playfield of this sprite. |
Methods inherited from class com.genuts.gameui.AnimatedSprite |
animate, getCurrentRemindTick, getFrequence, isPaused, setCurrentRemindTick, setFrequence, setPause, tick |
Methods inherited from class com.genuts.gameui.ImageSequenceSprite |
getCurrentPictureNumber, getHorizontalPicture, getHorizontalPicturesCount, getPicturesCount, getSequence, getVerticalPicture, getVerticalPicturesCount, isSequenceLoop, nextPicture, paint, previousPicture, setCurrentPictureNumber, setHorizontalPicture, setSequence, setSequenceEnded, setSequenceLoop, setVerticalPicture |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SimpleAnimationSprite(Image seq, int nbh, int nbv, int frequence)
seq
- An image containing all pictures of the animation.nbh
- Horizontally number of pictures in the image.nbv
- Vertically number of pictures in the image.frequence
- Number of ticks to wait between two pictures
of the animation.public SimpleAnimationSprite(Image seq, int nbh, int nbv, int frequence, int cycles)
seq
- An image containing all pictures of the animation.nbh
- Horizontally number of pictures in the image.nbv
- Vertically number of pictures in the image.frequence
- Number of ticks to wait between two pictures
of the animation.cycles
- Number of cycles for the animation.Method Detail |
public void setCycles(int cycles)
public int getCycles()
public void setDoneCycles(int cycles)
public int getDoneCycles()
public boolean isSequenceEnded()
isSequenceEnded
in class ImageSequenceSprite
true
if the animation has ended,
false
otherwise.protected void setParent(PlayField parent)
setParent
in class Sprite
parent
- Parent playfield of this spriteprotected void sequenceEnded()
sequenceEnded
in class ImageSequenceSprite
public void resetAnimation()
|
Genuts ME API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |