ENGINE_METHOD = "change_scene"
+class Actors:
+ """ A list of actors. """
+
+ def __init__(self):
+ self._actors = []
+
+ def add(self, actor):
+ self._actors.append(actor)
+ return actor
+
+ def remove(self, actor):
+ self._actors.remove(actor)
+ return actor
+
+ def draw(self, screen):
+ for actor in self._actors:
+ actor.draw() # TODO: allow an option screen to be passed in
+
+
class Scene:
""" Base class for scenes. """
+ def __init__(self):
+ self.actors = Actors()
+
def enter(self):
pass
pass
def draw(self, screen):
- pass
+ screen.clear()
+ self.actors.draw(screen)
def on_mouse_down(self, pos, button):
pass