feat: add basic towers rendering

This commit is contained in:
2021-09-26 18:19:00 +02:00
parent 2ece5bc9b5
commit fe7cfdec72
22 changed files with 230 additions and 58 deletions

View File

@@ -334,9 +334,10 @@ void World::spawnMobAt(MobID id, MobType type, std::uint8_t level, PlayerID send
m_Mobs.push_back(mob);
}
void World::placeTowerAt(TowerType type, std::int32_t x, std::int32_t y, PlayerID builder) {
TowerPtr tower = TowerFactory::createTower(type, x, y, builder);
TowerPtr World::placeTowerAt(TowerID id, TowerType type, std::int32_t x, std::int32_t y, PlayerID builder) {
TowerPtr tower = TowerFactory::createTower(type, id, x, y, builder);
m_Towers.push_back(tower);
return tower;
}
void World::moveMobs(std::uint64_t delta) {