refactor gold rewards and tower cost; fix wave test leak

This commit is contained in:
2026-06-29 00:31:34 -07:00
parent 6f30cd5ff2
commit be9fc24cd9
5 changed files with 9 additions and 11 deletions
+1 -6
View File
@@ -102,13 +102,8 @@ update_homing_projectile :: proc(world: ^World, p: ^Projectile, dt: f32) {
move_toward(&p.position, target.position, p.speed, dt)
if distance(p.position, target.position) <= PROJECTILE_HIT_RADIUS {
target.health -= p.damage
p.active = false
if target.health <= 0 {
target.active = false
push_event(world, .Enemy_Killed, gold_reward = 5)
}
apply_tower_hit(world, target, p.damage)
}
}