Platformer
Platformer
Public Member Functions | Private Attributes | List of all members
RectRenderComponent Class Reference

A component class for rendering rects as solid colors. More...

#include <RectRenderComponent.hpp>

Inheritance diagram for RectRenderComponent:
Inheritance graph
Collaboration diagram for RectRenderComponent:
Collaboration graph

Public Member Functions

 RectRenderComponent (SDL_Color color)
 Constructs a new RectRenderComponent of the given color. More...
 
virtual void Render () override
 Renders this component based on the given camera.
 
- Public Member Functions inherited from RenderComponent
 RenderComponent ()
 Constructs a new RenderComponent.
 
virtual void Update () override
 Updates this component.
 
- 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< GameObjectGetGameObject ()
 Gets a shared ptr reference to this component's GameObject. More...
 

Private Attributes

SDL_Color color
 The color of this RectRenderComponent.
 

Additional Inherited Members

- Public Attributes inherited from RenderComponent
SDL_RendererFlip renderFlip = SDL_FLIP_NONE
 Whether the renderer should be flipped.
 
- Protected Attributes inherited from RenderComponent
std::shared_ptr< SDLTextureWrappertexture
 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< GameObjectgameObject
 This component's parent GameObject.
 

Detailed Description

A component class for rendering rects as solid colors.

Constructor & Destructor Documentation

◆ RectRenderComponent()

RectRenderComponent::RectRenderComponent ( SDL_Color  color)

Constructs a new RectRenderComponent of the given color.

Parameters
colorThe color of the component

The documentation for this class was generated from the following files: