2023-05-27 23:23:02 +02:00
|
|
|
import pygame
|
|
|
|
|
2023-06-02 21:14:55 +02:00
|
|
|
class listOfItems:
|
2023-05-06 14:54:04 +02:00
|
|
|
list = []
|
2023-06-02 21:14:55 +02:00
|
|
|
item_group = pygame.sprite.Group()
|
2023-05-06 14:54:04 +02:00
|
|
|
|
|
|
|
def add(self, item):
|
|
|
|
self.list.append(item)
|
2023-06-02 21:14:55 +02:00
|
|
|
self.item_group.add(item)
|
2023-05-06 14:54:04 +02:00
|
|
|
|
|
|
|
def remove(self):
|
2023-06-02 21:14:55 +02:00
|
|
|
last_item = self.list.pop()
|
2023-06-18 13:07:05 +02:00
|
|
|
self.item_group.remove(last_item)
|