From 569128763b502d891af9d05cfb288b4ff0d7c984 Mon Sep 17 00:00:00 2001 From: Marcin Kostrzewski Date: Thu, 14 May 2020 16:33:35 +0200 Subject: [PATCH] Entities list is now a pygame.sprite.Group --- src/game/Map.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game/Map.py b/src/game/Map.py index e890725..73b04ec 100644 --- a/src/game/Map.py +++ b/src/game/Map.py @@ -28,7 +28,7 @@ class Map: # grupa objektów kolizyjnych (tereny kolizyjne i entities) self.collidables = pygame.sprite.Group() # lista wszystkich entity - self.entities = [] + self.entities = pygame.sprite.Group() with open(filename, 'rt') as f: for line in f: @@ -170,7 +170,7 @@ class Map: # dodajemy bo wszystkie entity są kolizyjne self.collidables.add(entity) if not DONTADD: - self.entities.append(entity) + self.entities.add(entity) def collision(self, x, y, screenRelative=False): """