comparison pytouhou/game/player.py @ 193:9f58e2a6e950

Fix particles, fix "random" item popping, change update order to match the original game's more closely.
author Thibaut Girka <thib@sitedethib.com>
date Fri, 28 Oct 2011 12:38:26 +0200
parents d2b58a26c908
children 1e501e3b6645
comparison
equal deleted inserted replaced
192:5e84dfd153ab 193:9f58e2a6e950
77 def collide(self): 77 def collide(self):
78 if not self.state.invulnerable_time and not self.death_time and self.state.touchable: # Border Between Life and Death 78 if not self.state.invulnerable_time and not self.death_time and self.state.touchable: # Border Between Life and Death
79 self.death_time = self._game.frame 79 self.death_time = self._game.frame
80 self._game.new_death((self.state.x, self.state.y), 2) 80 self._game.new_death((self.state.x, self.state.y), 2)
81 for i in range(16): 81 for i in range(16):
82 self._game.new_particle((self.state.x, self.state.y), 2, 4., 256, delay=True) #TODO: find the real size and range. 82 self._game.new_particle((self.state.x, self.state.y), 2, 4., 256) #TODO: find the real size and range.
83 83
84 84
85 def collect(self, item): 85 def collect(self, item):
86 #TODO 86 #TODO
87 self.state.score += item._item_type.score 87 self.state.score += item._item_type.score