2023-05-27 23:23:02 +02:00
|
|
|
import pygame
|
|
|
|
|
|
|
|
from paczka import Paczka
|
|
|
|
|
2023-05-06 14:54:04 +02:00
|
|
|
class listOfPackages:
|
|
|
|
list = []
|
2023-05-27 23:23:02 +02:00
|
|
|
package_group = pygame.sprite.Group()
|
2023-05-06 14:54:04 +02:00
|
|
|
|
|
|
|
def add(self, item):
|
|
|
|
self.list.append(item)
|
2023-05-27 23:23:02 +02:00
|
|
|
self.package_group.add(item)
|
2023-05-06 14:54:04 +02:00
|
|
|
|
|
|
|
def remove(self):
|
2023-05-27 23:23:02 +02:00
|
|
|
last_package = self.list.pop()
|
|
|
|
self.package_group.remove(last_package)
|
2023-05-06 14:54:04 +02:00
|
|
|
|
|
|
|
|
2023-05-27 23:23:02 +02:00
|
|
|
def zainicjuj_liste_paczek(init_x, init_y):
|
2023-05-06 14:54:04 +02:00
|
|
|
packageList = listOfPackages()
|
2023-05-25 19:59:54 +02:00
|
|
|
demo_paczka = Paczka('duzy', 10, any, False, True, False, any, any, any, any, any)
|
2023-05-27 23:23:02 +02:00
|
|
|
demo_paczka.update_position(init_x, init_y)
|
2023-05-06 14:54:04 +02:00
|
|
|
packageList.add(demo_paczka)
|
|
|
|
return packageList
|