mirror of
https://github.com/Nimac0/SDL_Minigame
synced 2026-01-12 22:23:43 +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.
|
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**
|
||||||
|
|
||||||
|
|||||||
@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user