diff options
Diffstat (limited to 'ranger.py')
-rw-r--r-- | ranger.py | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -34,13 +34,13 @@ class Ranger: if event.key == pygame.K_DOWN: self.direction_y = 1 self.direction_x = 0 - if event.type == pygame.KEYUP: - if (event.key == pygame.K_LEFT and self.direction_x == -1 and self.direction_y == 0) or\ - (event.key == pygame.K_RIGHT and self.direction_x == 1 and self.direction_y == 0) or\ - (event.key == pygame.K_UP and self.direction_y == -1 and self.direction_x == 0) or\ - (event.key == pygame.K_DOWN and self.direction_y == 1 and self.direction_x == 0): - self.direction_x = 0 - self.direction_y = 0 + #if event.type == pygame.KEYUP: + # if (event.key == pygame.K_LEFT and self.direction_x == -1 and self.direction_y == 0) or\ + # (event.key == pygame.K_RIGHT and self.direction_x == 1 and self.direction_y == 0) or\ + # (event.key == pygame.K_UP and self.direction_y == -1 and self.direction_x == 0) or\ + # (event.key == pygame.K_DOWN and self.direction_y == 1 and self.direction_x == 0): + # self.direction_x = 0 + # self.direction_y = 0 # Handle Tree planting key if event.type == pygame.KEYDOWN: |