From f399ba0d53afae6221aa0b5b111cae0cc2863ac4 Mon Sep 17 00:00:00 2001 From: Wirus Date: Sun, 5 Apr 2020 20:24:28 +0200 Subject: [PATCH] add entity to collidables in Map method --- src/game/Map.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/game/Map.py b/src/game/Map.py index e5a1d27..82a498f 100644 --- a/src/game/Map.py +++ b/src/game/Map.py @@ -6,7 +6,6 @@ class Map: def __init__(self, filename, screen): self.screen = screen self.terrain = [] - self.entities = [] self.collidableTerrain = [] self.collidables = pygame.sprite.Group() @@ -36,8 +35,8 @@ class Map: self.screen.draw(TerrainTile(col, row, 'grass.png', self.tileSize), Locations.MAP, 0, 0) def addEntity(self, entity): - self.entities.append(entity) self.screen.draw(entity, Locations.MAP, 0, 0) + self.collidables.add(entity) # add object to map.collidables list to be collidable def collision(self, x, y):