//
// Created by sebastian on 08.02.26.
//

#include "EntityManager.h"
#include <algorithm>
EntityID EntityManager::createEntity() {
    const EntityID id = nextID++;
    entities.push_back(id);
    return id;
}

void EntityManager::destroyEntity(EntityID entity) {
    entities.erase(std::remove(entities.begin(), entities.end(), entity), entities.end());
    transforms.erase(entity);
    models.erase(entity);
    tileRenderComponents.erase(entity);
    tileGameplayComponents.erase(entity);
    buildings.erase(entity);
}
