Shkyera Engine
Easy to use, game engine for Python
Component.hpp
Go to the documentation of this file.
1 
7 #pragma once
8 
9 #include <memory>
10 
11 #include "game/GameObject.hpp"
12 
13 namespace shkyera {
14 
20 class Component {
21  public:
27  Component(std::shared_ptr<GameObject> object);
28 
34  std::shared_ptr<GameObject> getObject();
35 
36  protected:
37  std::shared_ptr<GameObject> _object;
38 };
39 
40 } // namespace shkyera
Contains the declaration of the GameObject class, representing a game object in the system.
A base class representing a component attached to a game object.
Definition: Component.hpp:20
Component(std::shared_ptr< GameObject > object)
Constructor to initialize a component with a shared pointer to a game object.
Definition: Component.cpp:5
std::shared_ptr< GameObject > _object
The game object to which this component is attached.
Definition: Component.hpp:37
std::shared_ptr< GameObject > getObject()
Get the shared pointer to the game object to which this component is attached.
Definition: Component.cpp:7
Definition: Entity.cpp:3