21 lines
503 B
C++
21 lines
503 B
C++
#include <components/GameComponentRegistry.h>
|
|
|
|
#include <destrum/Serialization/ComponentFactory.h>
|
|
|
|
#include <components/GameComponentList.h>
|
|
|
|
void RegisterGameComponents()
|
|
{
|
|
static bool registered = false;
|
|
if (registered) {
|
|
return;
|
|
}
|
|
|
|
registered = true;
|
|
|
|
#define LIGHTKEEPER_REGISTER_COMPONENT(ComponentType) \
|
|
ComponentFactory::Register<ComponentType>(#ComponentType);
|
|
LIGHTKEEPER_GAME_COMPONENTS(LIGHTKEEPER_REGISTER_COMPONENT)
|
|
#undef LIGHTKEEPER_REGISTER_COMPONENT
|
|
}
|