19 lines
394 B
C++
19 lines
394 B
C++
#include "game/Towers.h"
|
|
#include "game/World.h"
|
|
|
|
namespace td {
|
|
namespace game {
|
|
|
|
void MageTower::Tick(std::uint64_t delta, World* world) {
|
|
if (m_Timer.Update(delta)) {
|
|
for (MobPtr mob : world->GetMobList()) {
|
|
if (IsMobInRange(mob)) {
|
|
mob->AddEffect(EffectType::Fire, GetLevel().GetLevel() * 3, this);
|
|
m_Timer.ApplyCooldown();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
} // namespace game
|
|
} // namespace td
|