diff --git a/mod_pygame/phantom_castle.py b/mod_pygame/phantom_castle.py index 73ffdb0..c1bb526 100644 --- a/mod_pygame/phantom_castle.py +++ b/mod_pygame/phantom_castle.py @@ -339,7 +339,7 @@ class Hero(GameObject): if not self.active: return - wide, short = 30, 5 + wide, short = 10, 2 if event.type == pygame.KEYDOWN: match event.key: case pygame.K_UP: @@ -646,11 +646,14 @@ class Scene(GameObject): self.end.handle_event(event) def event_loop(self): + clock = pygame.time.Clock() + pygame.key.set_repeat(50, 30) while not self.done: - event = pygame.event.wait() - self.handle_event(event) + for event in pygame.event.get(): + self.handle_event(event) self.draw() pygame.display.flip() + clock.tick(30) def game(assets):