Creates a pointer wrapper which extends capabilities of flecs::entity. More...
#include <game_object.hpp>
Public Member Functions | |
| game_object ()=delete | |
| Should not construct a scene object not created through flecs::world. | |
| game_object (flecs::world_t *p_registry, flecs::entity_t p_id) | |
| game_object (const flecs::entity &p_base) | |
| game_object (flecs::entity &p_base) | |
| void | child_of (const std::optional< game_object > &p_parent) |
| sets the entity to be a parent of the specified entity | |
| template<typename UFunction > | |
| void | children (UFunction &&p_callback) |
| iterates through all children entities if the given entity is a parent of any given entities | |
Creates a pointer wrapper which extends capabilities of flecs::entity.
Provides our own construct of API's that handles any workload around some of the raw flecs API's that can still be used by other flecs API's without completely interacting touching raw flecs API
| void atlas::game_object::child_of | ( | const std::optional< game_object > & | p_parent | ) |
sets the entity to be a parent of the specified entity
| p_entity | is the specified entity to specify as the parent. |
Example Usage:
|
inline |
iterates through all children entities if the given entity is a parent of any given entities
Example Usage: