|
Genuts 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.SpriteWrapper
com.genuts.gameui.MovingSpriteWrapper
Sprite wrapper with the ability to move.
This sprite wrapper is an abstract class, it can only be extended directly to define its own behavior for moving.
Constructor Summary | |
MovingSpriteWrapper(Sprite sprite)
Initializes the moving sprite with an action sprite. |
Method Summary | |
abstract void |
move(int ticks)
Moves the sprite as desired. |
void |
tick(int ticks)
Commands to delagate the moving action to move(int) . |
Methods inherited from class com.genuts.gameui.Sprite |
getFinalWrapper, getWrapper, setWrapper, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public MovingSpriteWrapper(Sprite sprite)
sprite
- Sprite for visualisation.Method Detail |
public abstract void move(int ticks)
ticks
- Number of ticks from the playfieldpublic void tick(int ticks)
move(int)
.
tick
in interface Tickable
tick
in class SpriteWrapper
ticks
- Number of ticks from the playfield
|
Genuts API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |