switch to ECS architecture
This commit is contained in:
@@ -1152,3 +1152,20 @@ void BuildingSystem::forEachBuilding(std::function<void(Building&)> fn)
|
||||
fn(b);
|
||||
}
|
||||
}
|
||||
|
||||
void BuildingSystem::registerTileOccupancy(const std::vector<QPoint>& cells,
|
||||
EntityId ownerPlaceholder)
|
||||
{
|
||||
for (const QPoint& cell : cells)
|
||||
{
|
||||
m_tileOccupancy[{cell.x(), cell.y()}] = ownerPlaceholder;
|
||||
}
|
||||
}
|
||||
|
||||
void BuildingSystem::unregisterTileOccupancy(const std::vector<QPoint>& cells)
|
||||
{
|
||||
for (const QPoint& cell : cells)
|
||||
{
|
||||
m_tileOccupancy.erase({cell.x(), cell.y()});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user