comparison pytouhou/game/game.pyx @ 487:711c75115675

Various netplay-related fixes.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sat, 28 Sep 2013 20:11:41 +0200
parents 2f53be1b2f60
children 887de1309491
comparison
equal deleted inserted replaced
486:2f53be1b2f60 487:711c75115675
177 177
178 cpdef change_bullets_into_bonus(self): 178 cpdef change_bullets_into_bonus(self):
179 cdef Player player 179 cdef Player player
180 cdef Bullet bullet 180 cdef Bullet bullet
181 181
182 player = self.players[0] #TODO
183 score = 0 182 score = 0
184 bonus = 2000 183 bonus = 2000
185 for bullet in self.bullets: 184 for bullet in self.bullets:
186 self.new_label((bullet.x, bullet.y), str(bonus)) 185 self.new_label((bullet.x, bullet.y), str(bonus))
187 score += bonus 186 score += bonus
188 bonus += 10 187 bonus += 10
189 self.bullets = [] 188 self.bullets = []
190 player.state.score += score
191 #TODO: display the final bonus score. 189 #TODO: display the final bonus score.
190
191 #TODO: do we really want to give it to each player?
192 for player in self.players:
193 player.state.score += score
192 194
193 195
194 cpdef kill_enemies(self): 196 cpdef kill_enemies(self):
195 cdef Enemy enemy 197 cdef Enemy enemy
196 198