FemtoIDE Java API  v0.0.18b
femto.Sprite Class Reference
Inheritance diagram for femto.Sprite:

Public Member Functions

int getCurrentFrame ()
 
int getStartFrame ()
 
int getEndFrame ()
 
abstract int width ()
 
abstract int height ()
 
boolean isStatic ()
 Returns whether or not the Sprite is static. More...
 
boolean isMirrored ()
 
boolean isFlipped ()
 
void setStatic (boolean s)
 Sets whether or not the Sprite is static. More...
 
void setMirrored (boolean s)
 If set to true, the sprite will appear mirrored.
 
void setFlipped (boolean s)
 
void setPosition (float x, float y)
 Sets the position of the Sprite.
 
void draw (HiRes16Color screen)
 Updates the animation and draws onto the screen.
 
void draw (HiRes16Color screen, float x, float y)
 
pointer getFrameDataForScreen (uint number, HiRes16Color screen)
 
void updateAnimation ()
 

Public Attributes

ubyte currentFrame
 
uint frameTime
 
float x
 

Static Protected Member Functions

static void __blit_4bpp (pointer src, int x, int y, pointer out, boolean flip, boolean mirror)
 

Member Function Documentation

◆ isStatic()

boolean femto.Sprite.isStatic ( )

Returns whether or not the Sprite is static.

If a Sprite is static, the sprite's position will not be affected by the screen's camera offset.

See also
Sprite::setStatic()

◆ setStatic()

void femto.Sprite.setStatic ( boolean  s)

Sets whether or not the Sprite is static.

If a Sprite is static, the sprite's position will not be affected by the screen's camera offset.

Note
This functionality is intended to be used for implementing HUD elements.
See also
Sprite::isStatic()

The documentation for this class was generated from the following file: