aboutsummaryrefslogtreecommitdiff
path: root/src/splitscreen_duo/games/breakout.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/splitscreen_duo/games/breakout.py')
-rw-r--r--src/splitscreen_duo/games/breakout.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/splitscreen_duo/games/breakout.py b/src/splitscreen_duo/games/breakout.py
index 950adf5..734b394 100644
--- a/src/splitscreen_duo/games/breakout.py
+++ b/src/splitscreen_duo/games/breakout.py
@@ -117,13 +117,14 @@ class Breakout(GameBase):
if not (self.waiting or self.score_display_time):
for event in pygame.event.get():
result = self.handle_common_events(event)
+ action = self.input_handler.get_input(event)
if result is not None:
return result
elif event.type == pygame.KEYDOWN:
- if event.key == pygame.K_LEFT:
+ if action == "LEFT":
self.move_paddle(-20)
- elif event.key == pygame.K_RIGHT:
+ elif action == "RIGHT":
self.move_paddle(20)
self.paddle[0] = pygame.mouse.get_pos()[0] - PADDLE_WIDTH // 2