Added __del__ method
This commit is contained in:
parent
052d8ca7ce
commit
05898f5b8b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user