Mercurial > touhou
diff pytouhou/game/game.py @ 358:488c094ed51d
Make bosses clean their mess when timeouting
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Sun, 08 Jul 2012 01:23:47 +0200 |
parents | 94fdb6c782c1 |
children | 704bea2e4360 |
line wrap: on
line diff
--- a/pytouhou/game/game.py +++ b/pytouhou/game/game.py @@ -175,6 +175,18 @@ class Game(object): #TODO: display the final bonus score. + def kill_enemies(self): + for enemy in self.enemies: + if enemy.boss: + pass # Bosses are immune to 96 + elif enemy.touchable: + enemy.life = 0 + elif enemy.death_callback > 0: + #TODO: check + enemy.process.switch_to_sub(enemy.death_callback) + enemy.death_callback = -1 + + def new_effect(self, pos, anim, anm_wrapper=None): self.effects.append(Effect(pos, anim, anm_wrapper or self.etama4))