feat: mob castle damage
This commit is contained in:
@@ -286,6 +286,13 @@ void World::OnExplosion(utils::shape::Circle explosion, float centerDamage, Towe
|
||||
}
|
||||
}
|
||||
|
||||
void World::OnMobCastleDamage(Mob* damager, TeamCastle* enemyCastle, float damage) {
|
||||
enemyCastle->damage(damage);
|
||||
if (enemyCastle->getLife() <= 0) {
|
||||
// TODO: a team has won
|
||||
}
|
||||
}
|
||||
|
||||
void World::OnMobDamage(Mob* target, float damage, Tower* source) {
|
||||
target->damage(damage, source);
|
||||
if (target->isDead()) {
|
||||
|
||||
Reference in New Issue
Block a user