add an ugly fix to force to draw the player all the time

This commit is contained in:
kleph 2009-08-17 00:47:59 +02:00
parent d8ce0f002c
commit 1a46e13708

View file

@ -234,7 +234,7 @@ pygame.display.flip()
globals.moving_objects.add(player)
while not globals.die:
# erase moving objects
# erase previously moved objects
globals.moving_objects.clear(globals.screen, globals.background)
globals.bullets_list.clear(globals.screen, globals.background)
@ -242,6 +242,9 @@ while not globals.die:
globals.moving_objects.update()
globals.bullets_list.update()
# add player (if it's not already in the group). ugly, but ok for now.
globals.moving_objects.add(player)
# drawing
rectlist = globals.moving_objects.draw(globals.screen)
rectlist.extend(globals.bullets_list.draw(globals.screen))