comparison pytouhou/game/player.py @ 379:e0e284fcb288

Make a sound when an enemy is hit.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Thu, 30 Aug 2012 11:34:56 +0200
parents 94fdb6c782c1
children c25530efea3b
comparison
equal deleted inserted replaced
378:11d895b6c0dc 379:e0e284fcb288
96 self.anmrunner = ANMRunner(self.anm_wrapper, index, self.sprite) 96 self.anmrunner = ANMRunner(self.anm_wrapper, index, self.sprite)
97 self.anmrunner.run_frame() 97 self.anmrunner.run_frame()
98 98
99 99
100 def play_sound(self, name): 100 def play_sound(self, name):
101 self._game.player_sfx.play('%s.wav' % name) 101 self._game.sfx_player.play('%s.wav' % name)
102 102
103 103
104 def collide(self): 104 def collide(self):
105 if not self.state.invulnerable_time and not self.death_time and self.state.touchable: # Border Between Life and Death 105 if not self.state.invulnerable_time and not self.death_time and self.state.touchable: # Border Between Life and Death
106 self.death_time = self._game.frame 106 self.death_time = self._game.frame