feat: add tower ticks
This commit is contained in:
@@ -124,6 +124,8 @@ protected:
|
||||
|
||||
MobList m_Mobs;
|
||||
|
||||
std::vector<Tower> m_Towers;
|
||||
|
||||
Game* m_Game;
|
||||
public:
|
||||
World(Game* game);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user