Mercurial > touhou
comparison pytouhou/game/game.py @ 328:56523a16db1d
Fix some replay synchronization issues and update the TODO.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Thu, 21 Jun 2012 19:59:41 +0200 |
parents | 13201d90bb22 |
children | 2350147cf043 |
comparison
equal
deleted
inserted
replaced
327:13201d90bb22 | 328:56523a16db1d |
---|---|
257 | 257 |
258 | 258 |
259 def update_players(self, keystate): | 259 def update_players(self, keystate): |
260 if self.time_stop: | 260 if self.time_stop: |
261 return None | 261 return None |
262 | |
263 for bullet in self.players_bullets: | |
264 bullet.update() | |
265 | |
262 for player in self.players: | 266 for player in self.players: |
263 player.update(keystate) #TODO: differentiate keystates (multiplayer mode) | 267 player.update(keystate) #TODO: differentiate keystates (multiplayer mode) |
264 if player.state.x < 8.: | 268 if player.state.x < 8.: |
265 player.state.x = 8. | 269 player.state.x = 8. |
266 if player.state.x > self.width - 8: | 270 if player.state.x > self.width - 8: |
267 player.state.x = self.width - 8 | 271 player.state.x = self.width - 8 |
268 if player.state.y < 16.: | 272 if player.state.y < 16.: |
269 player.state.y = 16. | 273 player.state.y = 16. |
270 if player.state.y > self.height - 16: | 274 if player.state.y > self.height - 16: |
271 player.state.y = self.height -16 | 275 player.state.y = self.height -16 |
272 | |
273 for bullet in self.players_bullets: | |
274 bullet.update() | |
275 | 276 |
276 #XXX: Why 78910? Is it really the right value? | 277 #XXX: Why 78910? Is it really the right value? |
277 player.state.effective_score = min(player.state.effective_score + 78910, | 278 player.state.effective_score = min(player.state.effective_score + 78910, |
278 player.state.score) | 279 player.state.score) |
279 #TODO: give extra lives to the player | 280 #TODO: give extra lives to the player |