Game Engine 2D Platformer
|
InputComponent class used to change velocity due to keyboard input. More...
#include <InputComponent.hpp>
Public Member Functions | |
InputComponent () | |
Constuctor for InputComponent. More... | |
~InputComponent () | |
Destructor for InputComponent. More... | |
void | StartUp () |
Initializes attributes for InputComponent. More... | |
void | Update (GameEntity &entity) |
Updates the GameEntity upon keypress. More... | |
void | HandleEvent (GameEntity &entity) |
Handles the event for GameEntity. More... | |
Public Member Functions inherited from Component | |
Component ()=default | |
Constuctor for Component class. More... | |
virtual void | ShutDown () |
To destroy and free attributes for children classes. More... | |
virtual void | Render (GameEntity &entity) |
To render objects for children classes. More... | |
virtual void | LoadImage (std::string filepath, SDL_Renderer *ren) |
To initalize loadImages for children classes. More... | |
InputComponent class used to change velocity due to keyboard input.
InputComponent::InputComponent | ( | ) |
Constuctor for InputComponent.
InputComponent::~InputComponent | ( | ) |
Destructor for InputComponent.
|
virtual |
Handles the event for GameEntity.
Changes GameEntity's velocity depending on key hit.
entity | GameEntity object |
GameEntity | &entity |
Reimplemented from Component.
|
virtual |
Initializes attributes for InputComponent.
Reimplemented from Component.
|
virtual |