64 void setTex(
const char*
tex);
Defines the core classes for the Entity-Component-System (ECS) architecture.
ComponentID getComponentTypeID() noexcept
Gets the unique ID for a given component type.
Definition ECS.h:39
A static utility class for loading and drawing textures.
Manages sprite sheet animations and transitions between them using a state machine.
Definition Animator.h:15
The base class for all components in the ECS.
Definition ECS.h:53
A component that gives an entity a visual representation using a texture.
Definition Sprites.h:18
void recalcSpriteDimensions()
Recalculates the sprite's on-screen dimensions based on texture size and transform scale.
Definition Sprites.cpp:32
void init() override
Initializes the sprite, getting the entity's transform and loading the texture.
Definition Sprites.cpp:14
void draw() override
Draws the sprite's current texture to the screen.
Definition Sprites.cpp:28
void update() override
Updates the destination rectangle for rendering based on the transform.
Definition Sprites.cpp:21
Sprites(const char *tex, int nFrames, int mSpeed, bool loop)
Constructs a sprite with simple, built-in animation capabilities.