class

GSDL::Sprite

Inherits GSDL::SpriteBase < GSDL::Directionable < GSDL::Area < GSDL::Collidable < GSDL::Centerable < GSDL::Entity < GSDL::Saveable < GSDL::Tweenable < Reference < Object

Constructors

new(key : Symbol, x : Num = 0, y : Num = 0, origin = {0_f32, 0_f32}, scale = {1_f32, 1_f32}, tint : Color | Nil = nil, source_rect : GSDL::FRect | Nil = nil)
Source

Instance methods

draw(draw : Draw)
Source
height
Source
update(dt : Float32)

Base update logic for all sprites. Returns true if the sprite is on-screen and should continue updating, or false if the subclass should abort its update.

ALWAYS call return unless super(dt) at the top of your custom update methods.

Source
width
Source