50 std::unordered_map<SDL_Keycode, bool> KEY_STATES {
Defines a component for collision detection.
Defines the core classes for the Entity-Component-System (ECS) architecture.
Provides an entity with a physical bounding box for collision detection.
Definition Collider.h:22
The base class for all components in the ECS.
Definition ECS.h:53
Translates keyboard input (WASD) into entity movement.
Definition Controller.h:16
void updateKeyDown(SDL_Keycode key)
Updates the state when a key is pressed down.
Definition Controller.cpp:20
void update() override
Calculates and applies velocity to the Transform based on current key states.
Definition Controller.cpp:30
void reload() override
Resets the controller's state.
Definition Controller.cpp:66
void updateKeyUp(SDL_Keycode key)
Updates the state when a key is released.
Definition Controller.cpp:25
void init() override
Initializes the controller, grabbing the entity's Transform and Collider.
Definition Controller.cpp:10
A simple struct for 2D mathematics (points, vectors).
Definition Vector2D.h:15