add an ugly fix to force to draw the player all the time
This commit is contained in:
parent
d8ce0f002c
commit
1a46e13708
1 changed files with 4 additions and 1 deletions
|
@ -234,13 +234,16 @@ pygame.display.flip()
|
||||||
globals.moving_objects.add(player)
|
globals.moving_objects.add(player)
|
||||||
while not globals.die:
|
while not globals.die:
|
||||||
|
|
||||||
# erase moving objects
|
# erase previously moved objects
|
||||||
globals.moving_objects.clear(globals.screen, globals.background)
|
globals.moving_objects.clear(globals.screen, globals.background)
|
||||||
globals.bullets_list.clear(globals.screen, globals.background)
|
globals.bullets_list.clear(globals.screen, globals.background)
|
||||||
|
|
||||||
# update game logic
|
# update game logic
|
||||||
globals.moving_objects.update()
|
globals.moving_objects.update()
|
||||||
globals.bullets_list.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
|
# drawing
|
||||||
rectlist = globals.moving_objects.draw(globals.screen)
|
rectlist = globals.moving_objects.draw(globals.screen)
|
||||||
|
|
Loading…
Reference in a new issue