38 void setRenderer(std::shared_ptr<Renderer> renderer);
53 static void addShape(std::shared_ptr<ShapeComponent> shape);
60 static void removeShape(std::shared_ptr<ShapeComponent> shape);
67 static std::vector<std::shared_ptr<ShapeComponent>>
getShapes();
73 static std::vector<std::shared_ptr<ShapeComponent>>
_shapes;
Contains the declaration of the Component class, a base class for game components.
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
A base component for handling shapes within a game or application.
Definition: ShapeComponent.hpp:24
static void removeShape(std::shared_ptr< ShapeComponent > shape)
Remove a shape component from the list of managed shapes.
Definition: ShapeComponent.cpp:7
std::shared_ptr< Renderer > _renderer
Definition: ShapeComponent.hpp:70
static std::vector< std::shared_ptr< ShapeComponent > > _shapes
Definition: ShapeComponent.hpp:73
static void addShape(std::shared_ptr< ShapeComponent > shape)
Add a shape component to the list of managed shapes.
Definition: ShapeComponent.cpp:6
static std::vector< std::shared_ptr< ShapeComponent > > getShapes()
Get the list of managed shape components.
Definition: ShapeComponent.cpp:8
virtual void drawShape()=0
Draw the shape.
void setRenderer(std::shared_ptr< Renderer > renderer)
Set the renderer for this shape component.
Definition: ShapeComponent.cpp:5