예제 #1
0
 def start(menu):
     Director.set_scene("engine")
예제 #2
0
    #        get_image_data())
    #game_window.set_icon(icon)


    class Score:
        def __init__(self):
            self.meters = 0
            self.top = 0

        def __iadd__(self, value):
            self.meters += value
            if self.meters > self.top:
                self.top = self.meters
            return self

    score = Score()

    title = Title(assets, score)
    engine = Engine(assets, score)
    director = Director(constants.VWIDTH * 2,
                        constants.VHEIGHT * 2,
                        caption="Fuel4TheLight",
                        vwidth=constants.VWIDTH,
                        vheight=constants.VHEIGHT)
    director.set_background_color(0., 0., 0.)
    Director.add_scene("title", title)
    Director.add_scene("engine", engine)
    Director.set_scene("title")

    pyglet.app.run()