mirror of
https://github.com/robmcmullen/fujirun.git
synced 2024-06-07 11:29:30 +00:00
Rearranged game loop so erase and draw are happening in the same timestep
This commit is contained in:
parent
0738436902
commit
6ea88566fd
|
@ -952,13 +952,6 @@ def game_loop():
|
|||
num_sprites_drawn = 0
|
||||
while True:
|
||||
game_log.debug("Turn %d" % count)
|
||||
erase_sprites()
|
||||
check_boxes()
|
||||
update_background()
|
||||
draw_enemies()
|
||||
draw_players()
|
||||
show_screen()
|
||||
time.sleep(.02)
|
||||
read_user_input()
|
||||
if config_quit:
|
||||
return
|
||||
|
@ -972,6 +965,15 @@ def game_loop():
|
|||
move_player(i)
|
||||
check_dots(i)
|
||||
|
||||
check_boxes()
|
||||
|
||||
erase_sprites()
|
||||
update_background()
|
||||
draw_enemies()
|
||||
draw_players()
|
||||
show_screen()
|
||||
time.sleep(.02)
|
||||
|
||||
count += 1
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user