Mercurial > touhou
comparison pytouhou/game/game.py @ 184:54eb6b254b7b
When touched, drop the items at the right place, and add precisions about particles.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Wed, 26 Oct 2011 02:38:50 -0700 |
parents | 184196480f59 |
children | 008f90ebfdc0 |
comparison
equal
deleted
inserted
replaced
183:b6d7ce644f34 | 184:54eb6b254b7b |
---|---|
161 player.collide() | 161 player.collide() |
162 | 162 |
163 elif not bullet.grazed and not (bx2 < gx1 or bx1 > gx2 | 163 elif not bullet.grazed and not (bx2 < gx1 or bx1 > gx2 |
164 or by2 < gy1 or by1 > gy2): | 164 or by2 < gy1 or by1 > gy2): |
165 bullet.grazed = True | 165 bullet.grazed = True |
166 player.state.graze += 1 | |
166 player.state.score += 500 # found experimentally | 167 player.state.score += 500 # found experimentally |
167 self.new_particle((px, py), 0, .8, 192) | 168 self.new_particle((px, py), 0, .8, 192) #TODO: find the real size and range. |
168 #TODO: display a static particle during one frame at | 169 #TODO: display a static particle during one frame at |
169 # 12 pixels of the player, in the axis of the “collision”. | 170 # 12 pixels of the player, in the axis of the “collision”. |
170 | 171 |
171 for enemy in self.enemies: | 172 for enemy in self.enemies: |
172 half_size_x, half_size_y = enemy.hitbox_half_size | 173 half_size_x, half_size_y = enemy.hitbox_half_size |