Mercurial > touhou
comparison pytouhou/game/enemy.py @ 181:184196480f59
Don’t use the useless eff00.anm and implement particles (grazing, death, and more).
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sun, 23 Oct 2011 14:50:44 -0700 |
parents | 6e8653ff2b23 |
children | 20843875ad8f |
comparison
equal
deleted
inserted
replaced
180:5a1533677a9a | 181:184196480f59 |
---|---|
154 def on_collide(self): | 154 def on_collide(self): |
155 self.life -= 80 # found experimentally | 155 self.life -= 80 # found experimentally |
156 | 156 |
157 | 157 |
158 def die_anim(self): | 158 def die_anim(self): |
159 self._game.new_effect((self.x, self.y), self.death_anim) | 159 self._game.new_death((self.x, self.y), self.death_anim) |
160 #TODO: 8 white particles are used only in stage 3 to 6, | |
161 # in other stages they are 2 red and 6 blue. | |
162 for i in range(8): | |
163 self._game.new_particle((self.x, self.y), 0, 3., 192) | |
160 | 164 |
161 | 165 |
162 def set_pos(self, x, y, z): | 166 def set_pos(self, x, y, z): |
163 self.x, self.y = x, y | 167 self.x, self.y = x, y |
164 self.interpolator = Interpolator((x, y)) | 168 self.interpolator = Interpolator((x, y)) |