Exemplo n.º 1
0
    def run(self, time_delta):
        if Keyboard.just_pressed("escape"):
            self.parent.running = False

        if Keyboard.just_pressed("r"):
            self.t -= 10

        if Keyboard.pressed("r"):
            self.direction = -1
        else:
            self.direction = 1

        if Mouse.pressed("right"):
            self.direction *= 0.5

        if Mouse.pressed("left"):
            self.direction *= 2.0

        self.t += self.direction