Esempio n. 1
0
    def move_y(self, amount):
        self.remain.y += amount

        move = round(self.remain.y)
        if move == 0:
            return

        self.remain.y -= move

        sgn = sign(move)

        while move != 0:
            self.position.y += sgn

            move -= sgn
Esempio n. 2
0
    def velocity_y(self, direction: int):
        direction = sign(direction)

        self.velocity.y = direction * self.move_speed.y
Esempio n. 3
0
    def velocity_y(self, direction: int):
        direction = sign(direction)

        self.velocity.y = direction * self.MOVEMENT_SPD