35 Tile(
int x,
int y,
int w,
int h,
int id);
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
Defines the component for rendering a static or animated sprite.
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
A component that represents one square in a tilemap.
Definition Tile.h:18
void resizeTile(int w, int h, float scale=0.64f)
Resizes the tile's underlying components.
Definition Tile.cpp:41
void init() override
Initializes the tile by adding Transform and Sprite components to its entity.
Definition Tile.cpp:34
SDL_Rect tileRect
The rectangle defining the tile's position and size.
Definition Tile.h:23
Transform * transform
Pointer to the tile's Transform component.
Definition Tile.h:20
Sprites * sprite
Pointer to the tile's Sprite component.
Definition Tile.h:21
const char * path
The file path to the tile's texture.
Definition Tile.h:25
int tileID
The identifier for the type of tile (e.g., wall, path).
Definition Tile.h:24