Mercurial > touhou
comparison pytouhou/game/player.pyx @ 468:feecdb4a8928
Add “except *” to cdef void functions, and type some more.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Thu, 12 Sep 2013 15:47:08 +0200 |
parents | 5f5955635d2c |
children | 06f0eeb519bb |
comparison
equal
deleted
inserted
replaced
467:5bb7d2c0ff46 | 468:feecdb4a8928 |
---|---|
80 cdef void set_anim(self, index): | 80 cdef void set_anim(self, index): |
81 self.sprite = Sprite() | 81 self.sprite = Sprite() |
82 self.anmrunner = ANMRunner(self.anm, index, self.sprite) | 82 self.anmrunner = ANMRunner(self.anm, index, self.sprite) |
83 | 83 |
84 | 84 |
85 cpdef play_sound(self, str name): | 85 cdef void play_sound(self, str name): |
86 self._game.sfx_player.play('%s.wav' % name) | 86 self._game.sfx_player.play('%s.wav' % name) |
87 | 87 |
88 | 88 |
89 cpdef collide(self): | 89 cdef void collide(self): |
90 if not self.state.invulnerable_time and not self.death_time and self.state.touchable: # Border Between Life and Death | 90 if not self.state.invulnerable_time and not self.death_time and self.state.touchable: # Border Between Life and Death |
91 self.death_time = self._game.frame | 91 self.death_time = self._game.frame |
92 self._game.new_effect((self.state.x, self.state.y), 17) | 92 self._game.new_effect((self.state.x, self.state.y), 17) |
93 self._game.modify_difficulty(-1600) | 93 self._game.modify_difficulty(-1600) |
94 self.play_sound('pldead00') | 94 self.play_sound('pldead00') |