Shkyera Engine
Easy to use, game engine for Python
shkyera::Component Class Reference

A base class representing a component attached to a game object. More...

#include <Component.hpp>

Inheritance diagram for shkyera::Component:
[legend]

Public Member Functions

 Component (std::shared_ptr< GameObject > object)
 Constructor to initialize a component with a shared pointer to a game object. More...
 
std::shared_ptr< GameObjectgetObject ()
 Get the shared pointer to the game object to which this component is attached. More...
 

Protected Attributes

std::shared_ptr< GameObject_object
 The game object to which this component is attached. More...
 

Detailed Description

A base class representing a component attached to a game object.

Components are building blocks for game objects and can be customized for various functionalities.

Constructor & Destructor Documentation

◆ Component()

shkyera::Component::Component ( std::shared_ptr< GameObject object)

Constructor to initialize a component with a shared pointer to a game object.

Parameters
objectA shared pointer to the game object to which this component is attached.

Member Function Documentation

◆ getObject()

std::shared_ptr< GameObject > shkyera::Component::getObject ( )

Get the shared pointer to the game object to which this component is attached.

Returns
A shared pointer to the game object.

Member Data Documentation

◆ _object

std::shared_ptr<GameObject> shkyera::Component::_object
protected

The game object to which this component is attached.


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