Open tonywrzos opened 2 years ago
dx = abs(self.mpos[0] - x) dy = abs(self.mpos[1] - y)
x_dist = width - self.mpos[0] y_dist = height - self.mpos[1] new_x = self.mpos[0] new_y = self.mpos[0]
while x_dist < width: new_x += dx new_y += dy x_dist += dx
pygame.draw.line(self, white, (x,y), (new_x, new_y), 2)
dx = abs(self.mpos[0] - x) dy = abs(self.mpos[1] - y)
x_dist = width - self.mpos[0] y_dist = height - self.mpos[1] new_x = self.mpos[0] new_y = self.mpos[0]
while x_dist < width: new_x += dx new_y += dy x_dist += dx
pygame.draw.line(self, white, (x,y), (new_x, new_y), 2)