dwie przykładowe paczki

This commit is contained in:
s473561 2023-05-29 08:31:08 +02:00
parent 230b94064b
commit 7495d47f7f
3 changed files with 4 additions and 3 deletions

Binary file not shown.

View File

@ -15,7 +15,8 @@ pygame.init()
def main():
wozek = Wozek()
paczka = Paczka('duzy', 10, 'narzedzia', False, True, False, any, any, any, any, any)
#paczka = Paczka('duzy', 12, 'narzedzia', False, True, False, any, any, any, any, any)
paczka = Paczka('maly', 1, 'ogród', False, True, False, any, any, any, any, any)
ekran.lista_paczek.add(paczka)
paczka.update_position(a_pix, b_pix)

View File

@ -80,9 +80,9 @@ class Paczka(pygame.sprite.Sprite):
else: tablica.append(2)
# waga
if self.waga == 'maly':
if self.waga <= 2:
tablica.append(0)
elif self.waga == 'sredni':
elif self.waga <= 10:
tablica.append(1)
else: tablica.append(2)