Ejemplo n.º 1
0
def main():
    from utils import FakeDirector

    window = arcade.Window(settings.WIDTH, settings.HEIGHT)
    game = Chapter3View()
    game.director = FakeDirector(close_on_next_view=True)
    window.show_view(game)
    arcade.run()
Ejemplo n.º 2
0
    def on_draw(self):
        arcade.start_render()
        arcade.draw_text("Chapter 1",
                         settings.WIDTH / 2,
                         settings.HEIGHT / 2,
                         arcade.color.BLACK,
                         font_size=30,
                         anchor_x="center")

    def on_key_press(self, key, modifiers):
        self.director.next_view()


if __name__ == "__main__":
    """This section of code will allow you to run your View
    independently from the main.py file and its Director.

    You can ignore this whole section. Keep it at the bottom
    of your code.

    It is advised you do not modify it unless you really know
    what you are doing.
    """
    from utils import FakeDirector
    window = arcade.Window(settings.WIDTH, settings.HEIGHT)
    my_view = Chapter1View()
    my_view.director = FakeDirector(close_on_next_view=True)
    window.show_view(my_view)
    arcade.run()