PointClickEngine::Graphics::Sprites::Sprite
Inherits Reference < Object
Base sprite class for rendering static images
Sprite provides the foundation for all image rendering in the engine. It handles texture loading, positioning, scaling, rotation, and tinting.
Example
sprite = Sprite.new("assets/item.png")
sprite.position = Vector2.new(100, 200)
sprite.scale = 2.0
sprite.tint = Color::RED
Constructors
new(x : Float32, y : Float32, texture_path : String)
Initialize with position and texture path
Instance methods
draw_with_context(context : PointClickEngine::Graphics::RenderContext, position : RL::Vector2 | Nil = nil, tint : RL::Color | Nil = nil)
Draw with render context (for camera-aware rendering)
origin
Sourceorigin=(origin : RL::Vector2)
Sourcerotation
Sourcerotation=(rotation : Float32)
Sourcescale
Sourcescale=(scale : Float32)
Sourcetexture_path
Sourcetint
Sourcetint=(tint : RL::Color)
Sourcevisible
Sourcevisible=(visible : Bool)
Source