Added a strategic pygame.event.pump() in level.py. Levels 4-7 added, will probably need refining.
This commit is contained in:
@@ -268,6 +268,9 @@ class Level:
|
||||
|
||||
def handle_collisions(self):
|
||||
"""Handle all collision checks and return True if level is complete."""
|
||||
# Add a pump here so it gets called reasonably often.
|
||||
pygame.event.pump()
|
||||
|
||||
# First check if player is dead
|
||||
if self.player.get_health() <= 0:
|
||||
return False
|
||||
|
Reference in New Issue
Block a user