Sprite
Stores data for a sprite to be rendered to the screen.
struct Sprite {
// from native code
id: SpriteID
visible: bool
flip_x: bool
flip_y: bool
order: u64
colour: Colour
offset: Vec2
}
Fields
id
id: SpriteID
visible
visible: bool
flip_x
flip_x: bool
flip_y
flip_y: bool
order
order: u64
colour
colour: Colour
offset
offset: Vec2
Methods
new
fn new() -> Sprite
id
fn id(self, id: SpriteID) -> Sprite
visible
fn visible(self, visible: bool) -> Sprite
order
fn order(self, order: u64) -> Sprite
colour
fn colour(self, colour: Colour) -> Sprite
flip
fn flip(self, flip_x: bool, flip_y: bool) -> Sprite
offset
fn offset(self, offset: Vec2) -> Sprite