Disabled image scaling because of low quality.

This commit is contained in:
The Wobbler 2023-07-19 16:31:22 +02:00
parent fe6775531b
commit 941cb16a87

View file

@ -28,8 +28,6 @@ running = True
class Wobbler:
def __init__(self, position: tuple=(100, 100), rotation: int=0):
self.size = 1
self.width = self.size
self.height = self.size
self.x, self.y = position
@ -43,6 +41,11 @@ class Wobbler:
self.image_original = random.choice(images)
self.max_width, self.max_height = self.image_original.get_size()
self.width = self.max_width * self.size / 100
self.height = self.max_height * self.size / 100
self.image = self.image_original
self.image = pygame.transform.scale(self.image, (self.width, self.height))
self.image_no_rot = self.image
@ -53,8 +56,8 @@ class Wobbler:
screen.blit(self.image, self.image_rect)
def update(self):
self.width = self.size
self.height = self.size
self.width = self.max_width * self.size / 100
self.height = self.max_height * self.size / 100
self.image = self.image_original
self.image = pygame.transform.scale(self.image, (self.width, self.height))