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
def velocity_y(self, direction: int): direction = sign(direction) self.velocity.y = direction * self.move_speed.y
def velocity_y(self, direction: int): direction = sign(direction) self.velocity.y = direction * self.MOVEMENT_SPD