#include <Transform.hpp>
|
void | Input () override |
| Called once per frame to handle any new input.
|
|
void | Update (float dt) override |
|
void | Render () override |
|
void | SetWidth (float w) |
| Sets the width of this GameObject.
|
|
void | SetHeight (float h) |
| Sets the height of this GameObject.
|
|
Vector2 | GetPosition () |
| Retrieves the position of this GameObject's top left corner.
|
|
bool | ContainsPoint (float x, float y) |
| Checks if the coordinates specified are contained inside this GameObject.
|
|
void | MoveTo (float x, float y) |
| Moves this GameObject's top left corner to the specified coordinates.
|
|
SDL_FRect | GetRect () const |
| Returns the underlying rectangle for this GameObject's Transform.
|
|
void | SetGameObject (std::weak_ptr< GameObject > ent) |
| Sets the GameObject this component is attached to.
|
|
std::shared_ptr< GameObject > | GetGameObject () |
| Retrieves the GameObject this component is attached to, behind a shared pointer.
|
|
template<typename T > |
std::shared_ptr< T > | GetComponent () |
| Alias for GetGameObject()->GetComponent<T>() , for easier scripting.
|
|
|
static ComponentType | GetType () |
| Returns the type of this component to make querying GetComponent easier.
|
|
static ComponentType | GetType () |
| Returns the type of this component to make querying GetComponent easier.
|
|
Component representing the position and size of a GameObject. This component is automatically attached to any constructed GameObject
◆ GetType()
ComponentType Transform::GetType |
( |
| ) |
|
|
static |
Returns the type of this component to make querying GetComponent
easier.
◆ Input()
void Transform::Input |
( |
| ) |
|
|
overridevirtual |
Called once per frame to handle any new input.
Reimplemented from Component.
◆ Render()
void Transform::Render |
( |
| ) |
|
|
overridevirtual |
Called once per frame to render any necessary parts of this component to the screen
Reimplemented from Component.
◆ Update()
void Transform::Update |
( |
float | dt | ) |
|
|
overridevirtual |
Called once per frame for any timing specific logic
- Parameters
-
deltaTime | The tick rate of the game, in seconds. Useful for things like velocity calculations |
Reimplemented from Component.
The documentation for this struct was generated from the following files: