Fix bomb explosions not killing rats and remove tracked pycache

- Move Timer explosion from move() to collisions() so all units are
  registered in the collision system before the kill query runs.
- Explosion units now set a bbox and kill rats that touch them.
- Guard Rat.draw() so dead rats are not drawn.
- Remove units/__pycache__ files from tracking.
This commit is contained in:
2026-06-16 19:15:35 +02:00
parent c7ed24483d
commit 3e8cd97fda
4 changed files with 41 additions and 24 deletions
+2
View File
@@ -171,6 +171,8 @@ class Rat(Unit):
def draw(self):
"""Optimized draw using pre-calculated positions from move()"""
if self.id not in self.game.units:
return
sex = self.sex if self.age > AGE_THRESHOLD else "BABY"
image = self.game.graphics.rat_assets_textures[sex][self.direction]
image_size = self.game.graphics.rat_image_sizes[sex][self.direction]