0
0
mirror of https://github.com/Nimac0/SDL_Minigame synced 2026-01-12 06:53:41 +00:00

Docs: add a few details
Some checks failed
/ deploy (push) Failing after 31s

This commit is contained in:
Nimac0 2025-05-14 18:25:07 +02:00
parent a46e6d8b71
commit 78f2ea7c00
2 changed files with 11 additions and 10 deletions

View File

@ -3,12 +3,12 @@
In the scope of this library entities essentially function like empty containers that you can add components or properties to. So an entity can be whatever you want it to be, give it a texture, make it pickupable, give it collision or all of the above and more. In the scope of this library entities essentially function like empty containers that you can add components or properties to. So an entity can be whatever you want it to be, give it a texture, make it pickupable, give it collision or all of the above and more.
Relevant functions for the creation and editing of Entities and Components: Relevant functions for the creation and editing of Entities and Components:
### Manager ### Manager
- [addEntity()] - [addEntity()](@ref Manager#addEntity())
- [getAll()] - [getAll()](@ref Manager#getAll())
### Entity ### Entity
- [addComponent()] - [addComponent()](@ref Entity#addComponent())
- [getComponent()] - [getComponent()](@ref Entity#getComponent())
- [destroy()] - [destroy()](@ref Entity#destroy())
**If you are ever lost when looking for related functionality via search or side bar remember it is all neatly organized on this page for better readability and a better overview** **If you are ever lost when looking for related functionality via search or side bar remember it is all neatly organized on this page for better readability and a better overview**

View File

@ -37,12 +37,12 @@ public:
//! \brief Some premade Entity groups used to avoid checking all entities for everything all of the time //! \brief Some premade Entity groups used to avoid checking all entities for everything all of the time
enum class GroupLabel enum class GroupLabel
{ {
MAPTILES, //!< Entity using TileComponent, internal use MAPTILES, //!< Entity using TileComponent, internal use only
PLAYERS, //!< Primary entity in player control, used to be able to interact with pickupables PLAYERS, //!< Primary entity in player control, used to be able to interact with pickupables
COLLIDERS, //!< Fixed collider entity, e.g. a wall COLLIDERS, //!< Fixed collider entity, e.g. a wall
PROJECTILE, //!< \todo Document PROJECTILE, //!< Not used
HEARTS, //!< \todo Document HEARTS, //!< Not used
POWERUPS //!< \todo Document POWERUPS //!< Not used
}; };
/*! /*!
@ -77,7 +77,8 @@ public:
return componentBitSet[getComponentTypeID<T>()]; return componentBitSet[getComponentTypeID<T>()];
} }
//! \brief Adds specified type as component and calls Component::init() //! \brief Adds specified type as component and calls its CONSTRUCTOR
//! \details e.g. addComponent<Type of component>(parameters of constructor)
//! \param mArgs Constructor arguments of component //! \param mArgs Constructor arguments of component
template <typename T, typename...TArgs> T& addComponent(TArgs&&...mArgs) template <typename T, typename...TArgs> T& addComponent(TArgs&&...mArgs)
{ {