def key_commands(self): if PlayerInput.is_key_down(pygame.K_LEFT): self.set_location(self.x - self.speed, self.y) if PlayerInput.is_key_down(pygame.K_RIGHT): self.set_location(self.x + self.speed, self.y) if PlayerInput.is_key_pressed(pygame.K_SPACE): self.start_rising()
def key_commands(self): if PlayerInput.is_key_down(pygame.K_LEFT): self.set_location(self.x - 1, self.y) if PlayerInput.is_key_down(pygame.K_RIGHT): self.set_location(self.x + 1, self.y) if PlayerInput.is_key_down(pygame.K_UP): self.set_location(self.x, self.y - 1) if PlayerInput.is_key_down(pygame.K_DOWN): self.set_location(self.x, self.y + 1)