mirror of
https://github.com/Nimac0/SDL_Minigame
synced 2026-01-12 10:13:42 +00:00
added documentation for manager
This commit is contained in:
parent
63644b4759
commit
162645ed1c
2
Doxyfile
2
Doxyfile
@ -396,7 +396,7 @@ AUTOLINK_SUPPORT = YES
|
|||||||
# diagrams that involve STL classes more complete and accurate.
|
# diagrams that involve STL classes more complete and accurate.
|
||||||
# The default value is: NO.
|
# The default value is: NO.
|
||||||
|
|
||||||
BUILTIN_STL_SUPPORT = NO
|
BUILTIN_STL_SUPPORT = YES
|
||||||
|
|
||||||
# If you use Microsoft's C++/CLI language, you should set this option to YES to
|
# If you use Microsoft's C++/CLI language, you should set this option to YES to
|
||||||
# enable parsing support.
|
# enable parsing support.
|
||||||
|
|||||||
@ -7,22 +7,33 @@
|
|||||||
#include "Constants.h"
|
#include "Constants.h"
|
||||||
#include "Entity.h"
|
#include "Entity.h"
|
||||||
|
|
||||||
|
/*!
|
||||||
|
*
|
||||||
|
* \brief Is responsible for managing all entities
|
||||||
|
* \details The manager class handles update and draw calls collectively for all entities, and provides functionality to get all or a subset of all entities
|
||||||
|
* \sa Entity
|
||||||
|
* \sa Entity::GroupLabel
|
||||||
|
* \sa Entity::TeamLabel
|
||||||
|
*
|
||||||
|
*/
|
||||||
class Manager
|
class Manager
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void update();
|
void update(); //!< \sa Entity::update()
|
||||||
void draw();
|
void draw(); //!< \sa Entity::draw()
|
||||||
|
//! Disables all functionality of entities marked for destruction
|
||||||
|
//! \sa Entity::destroy()
|
||||||
void refresh();
|
void refresh();
|
||||||
|
|
||||||
void addToGroup(Entity* mEntity, Group mGroup);
|
void addToGroup(Entity* mEntity, Group mGroup); //!< \todo `friend` to Entity
|
||||||
std::vector<Entity*>& getGroup(Group mGroup);
|
std::vector<Entity*>& getGroup(Group mGroup); //!< \returns std::vector containing all entities in group Entity::GroupLabel
|
||||||
|
|
||||||
void addToTeam(Entity* mEntity, Team mTeam);
|
void addToTeam(Entity* mEntity, Team mTeam); //!< \todo `friend` to Entity
|
||||||
std::vector<Entity*>& getTeam(Team mTeam);
|
std::vector<Entity*>& getTeam(Team mTeam); //!< \returns std::vector containing all entities in team Entity::TeamLabel
|
||||||
|
|
||||||
std::vector<Entity*> getAll();
|
std::vector<Entity*> getAll(); //!< \returns std::vector containing all entities
|
||||||
|
|
||||||
Entity& addEntity();
|
Entity& addEntity(); //!< Creates and returns a new, empty entity
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::vector<std::unique_ptr<Entity>> entities;
|
std::vector<std::unique_ptr<Entity>> entities;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user