def make_app(num, **kwargs): name = 'app' + str(num) if name in state.states: State.restore(name) pygame.display.set_caption(State.caption+' (restored)') else: State.app = App(**kwargs) if num % 2: toolkit.make_tiles() else: toolkit.make_tiles2() State.camera.position = State.camera.screen_center State.caption = kwargs['caption'] State.save(name)
def __init__(self, **kwargs): super(App, self).__init__(**kwargs) toolkit.make_tiles2() self.speed = 3 self.movex = 0 self.movey = 0