Platformer
Platformer
Public Member Functions | Protected Attributes | List of all members
Component Class Referenceabstract

Class representing a component of a GameObject. More...

#include <Component.hpp>

Inheritance diagram for Component:
Inheritance graph
Collaboration diagram for Component:
Collaboration graph

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< GameObjectGetGameObject ()
 Gets a shared ptr reference to this component's GameObject. More...
 

Protected Attributes

std::weak_ptr< GameObjectgameObject
 This component's parent GameObject.
 

Detailed Description

Class representing a component of a GameObject.

Member Function Documentation

◆ GetGameObject()

std::shared_ptr< GameObject > Component::GetGameObject ( )

Gets a shared ptr reference to this component's GameObject.

Returns
A shared ptr reference to this component's GameObject

◆ SetParentGameObject()

void Component::SetParentGameObject ( std::weak_ptr< GameObject g)

Sets the given GameObject as this component's parent.

Parameters
gThe GameObject to be assigned as this component's parent

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