class Scene:
def __init__(self):
self.entities = {}
def unload(self):
for entity in self.entities.values():
entity.unregister()
def load(self):
entity.register()