def __init__(self): pyglet.window.Window.__init__(self,resizable=True) self.init_opengl( ) # Ограничение частоты кадров pyglet.clock.set_fps_limit(60) pyglet.clock.schedule(self._update) Console.write('-- Starting --') self.cur_screen = None self.change_screen(Screen.new('STARTUP'))
def menu(self, *args): self.next = Screen.new('STARTUP')
def tutorial(self, *args): self.next = Screen.new('TUTORIAL')
def new_game(self, *args): self.next = Screen.new('GAME')
def new_game(self, *args): self.next = Screen.new('STARTUP')
def win(self): GAME_CONSOLE.write('you are won!') self.next = Screen.new('WIN') self.endOfGame()
def foo(self): GAME_CONSOLE.write('your died!') self.next = Screen.new('DEATHSCREEN') self.endOfGame()
def release_pause(self, *args): self.ignore('update') games_screen = self.screen games_screen.next = Screen.new("PAUSE")