Platformer
Platformer
|
A RenderComponent class. More...
#include <RenderComponent.hpp>
Public Member Functions | |
RenderComponent () | |
Constructs a new RenderComponent. | |
virtual void | Update () override |
Updates this component. | |
virtual void | Render () |
Renders this component based on the given camera. | |
Public Member Functions inherited from Component | |
void | SetParentGameObject (std::weak_ptr< GameObject > g) |
Sets the given GameObject as this component's parent. More... | |
virtual void | Init () |
Initializes this component. | |
std::shared_ptr< GameObject > | GetGameObject () |
Gets a shared ptr reference to this component's GameObject. More... | |
Public Attributes | |
SDL_RendererFlip | renderFlip = SDL_FLIP_NONE |
Whether the renderer should be flipped. | |
Protected Attributes | |
std::shared_ptr< SDLTextureWrapper > | texture |
The texture for this RenderComponent. | |
std::shared_ptr< SDL_Rect > | renderSrc |
The source rect to be used, null if the whole texture is used. | |
Protected Attributes inherited from Component | |
std::weak_ptr< GameObject > | gameObject |
This component's parent GameObject. | |
A RenderComponent class.
This represents a simple renderable component within our game, having a rect and texture.