comparison pytouhou/game/player.py @ 335:2350147cf043

Fix bullet cancellation and removal
author Thibaut Girka <thib@sitedethib.com>
date Sun, 01 Jul 2012 11:43:38 +0200
parents 1b4f04b08729
children 7a05edbab88a
comparison
equal deleted inserted replaced
334:4eca6130f118 335:2350147cf043
254 self.state.invulnerable_time = 240 254 self.state.invulnerable_time = 240
255 self.sprite.blendfunc = 0 255 self.sprite.blendfunc = 0
256 self.sprite.changed = True 256 self.sprite.changed = True
257 257
258 if time > 30: 258 if time > 30:
259 for bullet in self._game.bullets: 259 self._game.cancel_bullets()
260 bullet.cancel()
261 for laser in self._game.lasers:
262 laser.cancel()
263 260
264 if time > 90: # start the bullet hell again 261 if time > 90: # start the bullet hell again
265 self.death_time = 0 262 self.death_time = 0
266 263
267 self.anmrunner.run_frame() 264 self.anmrunner.run_frame()