poprawiony obrót smieciarki

This commit is contained in:
Adam Osiowy 2020-04-17 14:02:53 +02:00
parent 28c415bf6a
commit 122ef37fa7

View File

@ -26,7 +26,7 @@ class Smieciarka(pygame.sprite.Sprite):
self.y = y
self.image = pygame.image.load('resources/plansza/smieciarka.png')
self.obraz = None
self.ruch = 0
self.ruch = 1
self.plastik = []
self.szklo = []
self.papier = []
@ -62,6 +62,7 @@ class Smieciarka(pygame.sprite.Sprite):
if self.ruch == 2:
self.image = pygame.image.load(
'resources/plansza/smieciarka.png')
self.ruch = 1
for i in range((WIDTH + MARGIN) // 1):
self.rect.x -= 1
@ -70,7 +71,6 @@ class Smieciarka(pygame.sprite.Sprite):
self.x -= 1
game.plansza[self.x, self.y].setKolor(BLUE)
self.ruch = 1
def w_prawo(self):
if self.x < 14:
@ -81,6 +81,7 @@ class Smieciarka(pygame.sprite.Sprite):
self.zwiekszIloscOdwiedzonychDomow()
if self.ruch == 1:
self.image = pygame.transform.flip(self.image, True, False)
self.ruch = 2
for i in range((WIDTH + MARGIN) // 1):
self.rect.x += 1
@ -89,7 +90,6 @@ class Smieciarka(pygame.sprite.Sprite):
self.x += 1
game.plansza[self.x, self.y].setKolor(BLUE)
self.ruch = 2
def w_gore(self):
if self.y > 0: