Sprite

A drawable object attached to a transformation

Can be either static (Texture) or dynamic (Animation)

Constructors

this
this(Texture tex)

Create a static sprite

this
this(Animation anim)

Create a dynamic sprite

Members

Functions

update
void update()

Update the sprite (only affects dynamic sprites)

Properties

source
Texture source [@property setter]

Set the source of the sprite to a static texture

source
Animation source [@property setter]

Set the source of the sprite to a dynamic animation

texture
const(Texture) texture [@property getter]

Get the current texture of the sprite

Variables

color
Color color;
Undocumented in source.
flipX
bool flipX;
flipY
bool flipY;
height
float height;
originX
float originX;
originY
float originY;
rotation
float rotation;
scaleX
float scaleX;
scaleY
float scaleY;
width
float width;
Undocumented in source.
x
float x;
y
float y;
Undocumented in source.

Meta