X-Git-Url: https://git.ctpug.org.za/?a=blobdiff_plain;f=naja%2Fengine.py;h=32c139f8a56f17427b0a426bdb3b1e2fe3ec338d;hb=7ce9a5e2cbdc5a2dbdea5d000cad3e59628e9720;hp=1c6b70ac8a7917871edae10512acfc90e11b80d2;hpb=e1ba8711540872d716090a91e459f8e5309d1ccc;p=naja.git diff --git a/naja/engine.py b/naja/engine.py index 1c6b70a..32c139f 100644 --- a/naja/engine.py +++ b/naja/engine.py @@ -6,13 +6,15 @@ from naja.events import SceneChangeEvent, QuitGameEvent class Engine(object): - def __init__(self, surface, scene): + def __init__(self, surface, scene, state): self._surface = surface self._scene = scene + self._state = state def run(self): clock = pygame.time.Clock() while True: + self._surface.fill((0, 0, 0)) for ev in pygame.event.get(): if ev.type == pgl.QUIT or QuitGameEvent.matches(ev): self.quit_game()