def killed(self, enemy):
if enemy in self._made_enemies:
self._made_enemies.remove(enemy)
+ # Delay next respawn so we don't flood the player with enemies
+ self._time_since_last_update = 0
def pause(self):
self.paused = True
def remove_enemy(self, enemy):
self.enemies.remove(enemy)
+ for generator in self.enemy_generators:
+ generator.killed(enemy)
def add_enemy(self, enemy, x, y):
"""Add an enemy to an empty floor space near x, y"""