This repository has been archived on 2019-12-09. You can view files and clone it, but cannot push or open issues or pull requests.
pacman2/engine/scene.py
2019-12-09 20:51:45 +01:00

18 lines
406 B
Python

class Scene:
def __init__(self):
self.entities = {}
def add(self, entity):
self.entities[entity.name] = entity
entity.scene = self
entity.load()
return entity
def unload(self):
for entity in self.entities.values():
entity.unregister()
def load(self):
for entity in self.entities.values():
entity.register()