1 #ifndef COMPONENT_MANAGER_H
2 #define COMPONENT_MANAGER_H
16 std::multimap<unsigned long long, std::shared_ptr<Component>> components;
17 std::weak_ptr<Graphics::Camera> camera;
32 void addComponents(std::vector<std::shared_ptr<Component>> components);
38 void addComponents(std::list<std::shared_ptr<Component>> components);
56 unsigned int count()
const noexcept;
64 void addComponent(std::shared_ptr<Graphics::Camera> component);
Class for component manager.
Definition: component_manager.h:14
void addComponents(std::vector< std::shared_ptr< Component >> components)
Adds components.
Definition: component_manager.cpp:19
unsigned int count() const noexcept
Gets the number of components.
Definition: component_manager.cpp:45
void onStart()
Calls onStart on each component.
Definition: component_manager.cpp:49
void destroy()
Calls onDestroy on each component.
Definition: component_manager.cpp:69
void removeComponents(std::vector< std::shared_ptr< Component >> components)
Removes components.
Definition: component_manager.cpp:40
void removeComponent(std::shared_ptr< Component > component)
Removes a component.
Definition: component_manager.cpp:31
void onUpdate(const float delta)
Calls onUpdate on each component, once per frame.
Definition: component_manager.cpp:57
void addComponent(std::shared_ptr< Component > component)
Adds a component.
Definition: component_manager.cpp:10