|
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.SpriteWrapper
com.genuts.gameui.MovingSpriteWrapper
com.genuts.gameui.MovingPrecisionSpriteWrapper
Sprite wrapper with the ability to move with precision positions. This sprite wrapper is an abstract class, it can only be extended directly to define its own behavior for moving.
The goal of this wrapper is to have a precision postion (int type) for x and y coordinates.
setPrecisionPosition(int, int),
getPrecisionX(),
getPrecisionY()| Constructor Summary | |
MovingPrecisionSpriteWrapper(Sprite sprite)
Initializes the moving precision sprite with an action sprite. |
|
| Method Summary | |
int |
getPrecision()
Gets the precision value of the object. |
int |
getPrecisionX()
Gets the X position of the action sprite in the playfield with int type value. |
int |
getPrecisionY()
Gets the Y position of the action sprite in the playfield with int type value. |
void |
setActionSprite(Sprite sprite)
Sets the action sprite. |
boolean |
setPosition(int x,
int y)
Sets the position of the action sprite in the playfield. |
void |
setPrecision(int p)
Sets the precision value of the object. |
boolean |
setPrecisionPosition(int x,
int y)
Sets the position of the action sprite in the playfield with int type values. |
| Methods inherited from class com.genuts.gameui.MovingSpriteWrapper |
move, tick |
| 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 MovingPrecisionSpriteWrapper(Sprite sprite)
sprite - Action sprite| Method Detail |
public void setActionSprite(Sprite sprite)
setActionSprite in class SpriteWrappersprite - Action sprite.
public boolean setPosition(int x,
int y)
setPosition in class SpriteWrapperx - X position of the sprite.y - Y position of the sprite.
true if the modification was done, false
otherwise.
public boolean setPrecisionPosition(int x,
int y)
int type values.
x - X position of the sprite.y - Y position of the sprite.
true if the modification was done, false
otherwise.public int getPrecisionX()
int type value.
int type value.public int getPrecisionY()
int type value.
int type value.public int getPrecision()
public void setPrecision(int p)
p - The precision value of the object
|
Genuts ME API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||