#include <Entity/EntityManager.h>

#include <Entity/Entity.h>

namespace Game
{
    namespace
    {
        EntityManager Manager;
    }

    EntityID EntityManager::ID = 0;

    void InitEntityManager(Juliet::NonNullPtr<Juliet::Arena> arena)
    {
        Manager.Arena = arena.Get();
        Manager.Entities.Create(arena JULIET_DEBUG_PARAM("Entities"));
    }

    void ShutdownEntityManager()
    {
        Manager.Entities.Destroy();
    }

    EntityManager& GetEntityManager()
    {
        return Manager;
    }

    void RegisterEntity(EntityManager& /*manager*/, Entity* entity)
    {
        entity->ID = EntityManager::ID++;
    }
} // namespace Game
