#include <TransformComponent.hpp>
|
|
Vec2D | position |
| |
|
std::vector< ComponentTag > | tags = {ComponentTag::Position} |
| |
|
|
std::vector< ComponentTag > | tags |
| |
|
std::vector< std::string > | previousBroadcasts |
| |
|
std::vector< std::string > | pendingBroadcasts |
| |
A Component implementation to hold the position of a GameObject. Used by every other Component that needs a position.
◆ TransformComponent()
| TransformComponent::TransformComponent |
( |
int |
_x, |
|
|
int |
_y |
|
) |
| |
Construct a new Transform Component object.
- Parameters
-
◆ ~TransformComponent()
| TransformComponent::~TransformComponent |
( |
| ) |
|
◆ ComponentTypeName()
| const char * TransformComponent::ComponentTypeName |
( |
| ) |
|
|
inlineoverridevirtual |
◆ getPos()
| Vec2D TransformComponent::getPos |
( |
| ) |
const |
◆ Render()
| void TransformComponent::Render |
( |
SDL_Renderer * |
ren | ) |
|
|
overridevirtual |
Renders the component (if it has anything to render)
- Parameters
-
| ren | the SDL renderer to be displayed upon |
- See also
- IGraphicsEngineRenderer
Reimplemented from Component.
◆ SetTransform() [1/2]
| void TransformComponent::SetTransform |
( |
int |
_x, |
|
|
int |
_y |
|
) |
| |
◆ SetTransform() [2/2]
| void TransformComponent::SetTransform |
( |
Vec2D |
_pos | ) |
|
◆ ShowComponentEditor()
| void TransformComponent::ShowComponentEditor |
( |
bool * |
showEditor | ) |
|
|
overridevirtual |
◆ Update()
| void TransformComponent::Update |
( |
SDL_Event |
e, |
|
|
int |
frame, |
|
|
std::vector< std::string > |
broadcastList |
|
) |
| |
|
overridevirtual |
Updates the state of the component object. Called by the Engine every tick
- Parameters
-
| e | any inputs given by the user |
| frame | what frame is the game currently displaying |
| broadcastList | a list to be used to send messages between components |
- See also
- ParseAndUpdateBroadcast()
Reimplemented from Component.
The documentation for this class was generated from the following files: