from naja.engine import Engine
from naja.sound import sound
from naja.options import parse_args
+from naja.scenes.menu import MenuScene
def main():
sound.init()
screen = pygame.display.get_surface()
- engine = Engine(screen)
+ scene = MenuScene()
+ engine = Engine(screen, scene)
engine.run()
class Engine(object):
- def __init__(self, surface):
+ def __init__(self, surface, scene):
self._surface = surface
+ self._scene = scene
def run(self):
while True:
for ev in pygame.event.get():
if ev.type == pgl.QUIT:
return
+ self._scene.handle_event()
# TODO: work
pygame.display.flip()