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_manager.py
2019-12-09 09:57:53 +01:00

19 lines
465 B
Python

from .singleton import Singleton
class SceneManager(metaclass=Singleton):
def __init__(self, scene):
super().__init__()
self.scene = scene
self.scene.load()
def change_scene(self, new_scene):
self.scene.unload()
self.scene = new_scene
self.scene.load()
def step(self):
for entity in self.scene.entities.values():
if entity.script is not None:
entity.script(entity)