comparison pytouhou/game/enemy.py @ 248:77b83064b57e

Use the correct animation for player death.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sat, 21 Jan 2012 21:03:53 +0100
parents fb3a263213d1
children 4b549894ef6b
comparison
equal deleted inserted replaced
247:fb3a263213d1 248:77b83064b57e
173 self._anmrunner = ANMRunner(self._anm_wrapper, index, self._sprite) 173 self._anmrunner = ANMRunner(self._anm_wrapper, index, self._sprite)
174 self._anmrunner.run_frame() 174 self._anmrunner.run_frame()
175 175
176 176
177 def die_anim(self): 177 def die_anim(self):
178 self._game.new_death((self.x, self.y), self.death_anim) 178 anim = {0: 3, 1: 4, 2: 5}[self.death_anim % 256] # The TB is wanted, if index isn’t in these values the original game crashs.
179 self._game.new_effect((self.x, self.y), anim)
179 180
180 181
181 def drop_particles(self, number, color): 182 def drop_particles(self, number, color):
182 #TODO: white particles are only used in stage 3 to 6, 183 #TODO: white particles are only used in stage 3 to 6,
183 # in other stages they are blue. 184 # in other stages they are blue.