mirror of
https://github.com/Nimac0/SDL_Minigame
synced 2026-01-12 04:43:41 +00:00
This commit is contained in:
parent
a46e6d8b71
commit
78f2ea7c00
@ -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.
|
||||
Relevant functions for the creation and editing of Entities and Components:
|
||||
### Manager
|
||||
- [addEntity()]
|
||||
- [getAll()]
|
||||
- [addEntity()](@ref Manager#addEntity())
|
||||
- [getAll()](@ref Manager#getAll())
|
||||
### Entity
|
||||
- [addComponent()]
|
||||
- [getComponent()]
|
||||
- [destroy()]
|
||||
- [addComponent()](@ref Entity#addComponent())
|
||||
- [getComponent()](@ref Entity#getComponent())
|
||||
- [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**
|
||||
|
||||
|
||||
@ -37,12 +37,12 @@ public:
|
||||
//! \brief Some premade Entity groups used to avoid checking all entities for everything all of the time
|
||||
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
|
||||
COLLIDERS, //!< Fixed collider entity, e.g. a wall
|
||||
PROJECTILE, //!< \todo Document
|
||||
HEARTS, //!< \todo Document
|
||||
POWERUPS //!< \todo Document
|
||||
PROJECTILE, //!< Not used
|
||||
HEARTS, //!< Not used
|
||||
POWERUPS //!< Not used
|
||||
};
|
||||
|
||||
/*!
|
||||
@ -77,7 +77,8 @@ public:
|
||||
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
|
||||
template <typename T, typename...TArgs> T& addComponent(TArgs&&...mArgs)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user