CS4850 Final Project
Loading...
Searching...
No Matches
Public Member Functions | List of all members
TextureComponent Struct Reference

A component that represents a texture. More...

#include <TextureComponent.hpp>

Inheritance diagram for TextureComponent:
Component

Public Member Functions

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.
 
- Public Member Functions inherited from Component
void SetGameEntity (std::shared_ptr< GameEntity > gameEntity)
 Set the game entity that the component is attached to.
 
std::shared_ptr< GameEntityGetGameEntity ()
 Get the game entity that the component is attached to.
 

Additional Inherited Members

- Protected Attributes inherited from Component
std::shared_ptr< GameEntitymGameEntity
 

Detailed Description

A component that represents a texture.

Member Function Documentation

◆ 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
deltaTimeTime since last frame

Reimplemented from Component.

◆ Render()

void TextureComponent::Render ( SDL_Renderer * renderer)
overridevirtual

Render the game.

Parameters
rendererSDL renderer

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
filepathPath to the sprite

◆ Update()

void TextureComponent::Update ( float deltaTime)
overridevirtual

Update the game state.

Parameters
deltaTimeTime since last frame

Reimplemented from Component.


The documentation for this struct was generated from the following file: