Added __del__ method

This commit is contained in:
Marcin Kostrzewski 2020-05-16 16:23:31 +02:00
parent 052d8ca7ce
commit 05898f5b8b

View File

@ -240,3 +240,8 @@ class Map:
if b.rect.x == x and b.rect.y == y:
return True
return False
def __del__(self):
for entity in self.entities.sprites():
entity.kill()
del entity