poprawiony obrót smieciarki
This commit is contained in:
parent
28c415bf6a
commit
122ef37fa7
@ -26,7 +26,7 @@ class Smieciarka(pygame.sprite.Sprite):
|
|||||||
self.y = y
|
self.y = y
|
||||||
self.image = pygame.image.load('resources/plansza/smieciarka.png')
|
self.image = pygame.image.load('resources/plansza/smieciarka.png')
|
||||||
self.obraz = None
|
self.obraz = None
|
||||||
self.ruch = 0
|
self.ruch = 1
|
||||||
self.plastik = []
|
self.plastik = []
|
||||||
self.szklo = []
|
self.szklo = []
|
||||||
self.papier = []
|
self.papier = []
|
||||||
@ -62,6 +62,7 @@ class Smieciarka(pygame.sprite.Sprite):
|
|||||||
if self.ruch == 2:
|
if self.ruch == 2:
|
||||||
self.image = pygame.image.load(
|
self.image = pygame.image.load(
|
||||||
'resources/plansza/smieciarka.png')
|
'resources/plansza/smieciarka.png')
|
||||||
|
self.ruch = 1
|
||||||
|
|
||||||
for i in range((WIDTH + MARGIN) // 1):
|
for i in range((WIDTH + MARGIN) // 1):
|
||||||
self.rect.x -= 1
|
self.rect.x -= 1
|
||||||
@ -70,7 +71,6 @@ class Smieciarka(pygame.sprite.Sprite):
|
|||||||
|
|
||||||
self.x -= 1
|
self.x -= 1
|
||||||
game.plansza[self.x, self.y].setKolor(BLUE)
|
game.plansza[self.x, self.y].setKolor(BLUE)
|
||||||
self.ruch = 1
|
|
||||||
|
|
||||||
def w_prawo(self):
|
def w_prawo(self):
|
||||||
if self.x < 14:
|
if self.x < 14:
|
||||||
@ -81,6 +81,7 @@ class Smieciarka(pygame.sprite.Sprite):
|
|||||||
self.zwiekszIloscOdwiedzonychDomow()
|
self.zwiekszIloscOdwiedzonychDomow()
|
||||||
if self.ruch == 1:
|
if self.ruch == 1:
|
||||||
self.image = pygame.transform.flip(self.image, True, False)
|
self.image = pygame.transform.flip(self.image, True, False)
|
||||||
|
self.ruch = 2
|
||||||
|
|
||||||
for i in range((WIDTH + MARGIN) // 1):
|
for i in range((WIDTH + MARGIN) // 1):
|
||||||
self.rect.x += 1
|
self.rect.x += 1
|
||||||
@ -89,7 +90,6 @@ class Smieciarka(pygame.sprite.Sprite):
|
|||||||
|
|
||||||
self.x += 1
|
self.x += 1
|
||||||
game.plansza[self.x, self.y].setKolor(BLUE)
|
game.plansza[self.x, self.y].setKolor(BLUE)
|
||||||
self.ruch = 2
|
|
||||||
|
|
||||||
def w_gore(self):
|
def w_gore(self):
|
||||||
if self.y > 0:
|
if self.y > 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user