Platformer
Platformer
|
Class representing a component of a GameObject. More...
#include <Component.hpp>
Public Member Functions | |
void | SetParentGameObject (std::weak_ptr< GameObject > g) |
Sets the given GameObject as this component's parent. More... | |
virtual void | Init () |
Initializes this component. | |
virtual void | Update ()=0 |
Updates this component. | |
std::shared_ptr< GameObject > | GetGameObject () |
Gets a shared ptr reference to this component's GameObject. More... | |
Protected Attributes | |
std::weak_ptr< GameObject > | gameObject |
This component's parent GameObject. | |
Class representing a component of a GameObject.
std::shared_ptr< GameObject > Component::GetGameObject | ( | ) |
Gets a shared ptr reference to this component's GameObject.
void Component::SetParentGameObject | ( | std::weak_ptr< GameObject > | g | ) |
Sets the given GameObject as this component's parent.
g | The GameObject to be assigned as this component's parent |