4#define _CMPS_LIST_ TRANSFORM, MESH_RENDERER, NUM_COMPONENTS
5#define _GRPS_LIST_ TRANSPARENT, NUM_GROUP
11 using entity_t = std::shared_ptr<Entity>;
14 using cmpID_t = uint8_t;
22 constexpr cmpID_t maxComponentId = NUM_COMPONENTS;
29 constexpr cmpID_t getComponentID = T::id;
32 using groupID_t = uint8_t;
35 enum groupID : groupID_t
40 constexpr groupID_t maxGroupLayer = NUM_GROUP;
48 if constexpr (std::is_base_of_v<RenderComponent, T>)
55 if constexpr (std::is_base_of_v<UpdateComponent, T>)
61#define __CMPID_DECL__(cId) constexpr static ec::cmpID_t id = cId; \
62 ec::cmpID_t getID() const override { return id; } \
63 ec::RenderComponent* getAsRender() override { return ec::tryGetAsRender(this); } \
64 ec::UpdateComponent* getAsUpdate() override { return ec::tryGetAsUpdate(this); }
Declaracion adelantada, para evitar dependencia circular.
Definition component.h:20
Componente de render.
Definition component.h:64
Componente de update.
Definition component.h:74