From e14cac3a65ac535b959b6e110e8ed869a53c316c Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Thu, 7 May 2015 22:13:02 +0100 Subject: [PATCH] added speed code --- game.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/game.py b/game.py index ac3c9c1..6eab97f 100644 --- a/game.py +++ b/game.py @@ -101,10 +101,12 @@ def play(window): keys = pygame.key.get_pressed() if keys[pygame.K_RIGHT] or keys[pygame.K_d]: - player.move(player.speed) + if player.powerup == "SPEED": player.move(player.speed * 1.5) + else: player.move(player.speed) if keys[pygame.K_LEFT] or keys[pygame.K_a]: - player.move(-player.speed) + if player.powerup == "SPEED": player.move(-player.speed*1.5) + else: player.move(-player.speed) if keys[pygame.K_KP4] and keys[pygame.K_KP5] and keys[pygame.K_KP6] and player.OP: temp = Bullet(player)