comparison pytouhou/game/game.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 5afc75f71fed
children a0d6b1915591
comparison
equal deleted inserted replaced
247:fb3a263213d1 248:77b83064b57e
114 item_type = self.item_types[6] 114 item_type = self.item_types[6]
115 self.items.extend(Item((bullet.x, bullet.y), 6, item_type, self, player=player) for bullet in self.bullets) 115 self.items.extend(Item((bullet.x, bullet.y), 6, item_type, self, player=player) for bullet in self.bullets)
116 self.bullets = [] 116 self.bullets = []
117 117
118 118
119 def new_death(self, pos, index): 119 def new_effect(self, pos, anim, anm_wrapper=None):
120 anim = {0: 3, 1: 4, 2: 5}[index % 256] # The TB is wanted, if index isn’t in these values the original game crashs. 120 self.effects.append(Effect(pos, anim, anm_wrapper or self.etama4))
121 self.effects.append(Effect(pos, anim, self.etama4))
122 121
123 122
124 def new_particle(self, pos, color, size, amp): 123 def new_particle(self, pos, color, size, amp):
125 self.effects.append(Particle(pos, 7 + 4 * color + self.prng.rand_uint16() % 4, self.etama4, size, amp, self)) 124 self.effects.append(Particle(pos, 7 + 4 * color + self.prng.rand_uint16() % 4, self.etama4, size, amp, self))
126 125