diff --git a/include/game/World.h b/include/game/World.h index 316afa9..d78503b 100644 --- a/include/game/World.h +++ b/include/game/World.h @@ -124,6 +124,8 @@ protected: MobList m_Mobs; + std::vector m_Towers; + Game* m_Game; public: World(Game* game); diff --git a/src/game/World.cpp b/src/game/World.cpp index d5b1d05..3938abe 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -321,6 +321,9 @@ bool World::saveMap(const std::string& fileName) const { void World::tick(std::uint64_t delta) { moveMobs(delta); + for(Tower& tower : m_Towers){ + tower.tick(delta); + } } void World::spawnMobAt(MobID id, MobType type, std::uint8_t level, PlayerID sender, float x, float y, Direction dir) {