A component that represents a texture.
More...
#include <TextureComponent.hpp>
|
|
void | CreateTextureComponent (SDL_Renderer *renderer) |
| |
| void | SetSpritePath (const std::string &filepath) |
| | Set the path to the sprite that will be set when the scene is loaded.
|
| |
| void | Input (float deltaTime) override |
| | Handle input.
|
| |
| void | Update (float deltaTime) override |
| | Update the game state.
|
| |
| void | Render (SDL_Renderer *renderer) override |
| | Render the game.
|
| |
| ComponentType | GetType () override |
| | Get the type of the component.
|
| |
| void | SetGameEntity (std::shared_ptr< GameEntity > gameEntity) |
| | Set the game entity that the component is attached to.
|
| |
| std::shared_ptr< GameEntity > | GetGameEntity () |
| | Get the game entity that the component is attached to.
|
| |
A component that represents a texture.
◆ GetType()
| ComponentType TextureComponent::GetType |
( |
| ) |
|
|
overridevirtual |
Get the type of the component.
- Returns
- ComponentType
Implements Component.
◆ Input()
| void TextureComponent::Input |
( |
float | deltaTime | ) |
|
|
overridevirtual |
Handle input.
- Parameters
-
| deltaTime | Time since last frame |
Reimplemented from Component.
◆ Render()
| void TextureComponent::Render |
( |
SDL_Renderer * | renderer | ) |
|
|
overridevirtual |
Render the game.
- Parameters
-
Reimplemented from Component.
◆ SetSpritePath()
| void TextureComponent::SetSpritePath |
( |
const std::string & | filepath | ) |
|
|
inline |
Set the path to the sprite that will be set when the scene is loaded.
- Parameters
-
| filepath | Path to the sprite |
◆ Update()
| void TextureComponent::Update |
( |
float | deltaTime | ) |
|
|
overridevirtual |
Update the game state.
- Parameters
-
| deltaTime | Time since last frame |
Reimplemented from Component.
The documentation for this struct was generated from the following file: