def __init__(self): super().__init__(600, 760, 'move') self.curtains = Curtains(self) self.curtains.add_scenes({ 'scene': AppScene(), }) self.curtains.set_scene('scene')
class Window(arcade.Window): def __init__(self): super().__init__(140, 140, name) self.curtains = Curtains(self) self.curtains.add_scene('scene1', Scene()) def setup(self): self.curtains.set_scene('scene1')
class Window(arcade.Window): def __init__(self): super().__init__(500, 500, 'Anchor') self.curtains = Curtains(self) self.curtains.add_scene('scene1', SmallScene()) def setup(self): self.curtains.set_scene('scene1')
def __init__(self): super().__init__(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_TITLE) self.curtains = Curtains(self) self.curtains.add_scenes({ 'scene1': CharacterDevelopment(), 'scene2': PlotTwist(), 'scene3': DeusExMachina() })
def __init__(self, debug: Optional[bool] = False): super().__init__() self.debug = debug if self.debug: POINTS_HINT.clear() self.curtains = Curtains(self) self.curtains.add_scene('swimming_scene', DuckScene(self.debug)) self.curtains.set_scene('swimming_scene') arcade.set_background_color(arcade.color.WARM_BLACK)
def __init__(self): super().__init__(500, 500, 'move') self.curtains = Curtains(self) self.dispatcher = get_state() self.curtains.add_scene('scene1', SmallScene()) self.curtains.add_scene( 'victory', ResultScene(message='You Win :)', color=arcade.color.GREEN)) self.curtains.add_scene( 'defeat', ResultScene(message='You Lose :(', color=arcade.color.RED))
class Window(arcade.Window): def __init__(self): super().__init__(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_TITLE) self.curtains = Curtains(self) self.curtains.add_scenes({ 'scene1': CharacterDevelopment(), 'scene2': PlotTwist(), 'scene3': DeusExMachina() }) def setup(self): self.curtains.set_scene('scene1')
class GameView(arcade.View): """Main application class.""" def __init__(self, debug: Optional[bool] = False): super().__init__() self.debug = debug if self.debug: POINTS_HINT.clear() self.curtains = Curtains(self) self.curtains.add_scene('swimming_scene', DuckScene(self.debug)) self.curtains.set_scene('swimming_scene') arcade.set_background_color(arcade.color.WARM_BLACK) def on_key_release(self, symbol: int, modifiers: int) -> None: """ For use only when debug=True. 'a' to add a duck 'p' to print the generated points_hint list 'x' to clear the points """ if not self.debug: return if symbol == ord('a'): if self.curtains.current_scene == self.curtains.scenes[ 'swimming_scene']: self.curtains.current_scene.add_a_ducky() elif symbol == ord('p'): print(POINTS_HINT) elif symbol == ord('x'): POINTS_HINT.clear() def on_mouse_release(self, x: float, y: float, button: int, modifiers: int) -> None: """Add clicked point to points_hint as % of width/height.""" POINTS_HINT.append((round(x / self.window.width, 3), round(y / self.window.height, 3)))
class Window(arcade.Window): def __init__(self): super().__init__(500, 500, 'move') self.curtains = Curtains(self) self.dispatcher = get_state() self.curtains.add_scene('scene1', SmallScene()) self.curtains.add_scene( 'victory', ResultScene(message='You Win :)', color=arcade.color.GREEN)) self.curtains.add_scene( 'defeat', ResultScene(message='You Lose :(', color=arcade.color.RED)) def setup(self): self.curtains.set_scene('scene1') def update(self, delta): self.dispatcher.update(delta)
def curtains(): window = Mock() curtains = Curtains(window) scene1 = Scene() scene2 = Scene() curtains.add_scenes({ 'scene1': scene1, 'scene2': scene2, }) curtains.set_scene('scene1') return curtains
def _curtains(**kwargs): window = Mock() curtains = Curtains(window, **kwargs) scene1 = Scene() scene2 = Scene() curtains.add_scenes({ 'scene1': scene1, 'scene2': scene2, }) curtains.set_scene('scene1') return curtains
def __init__(self): super().__init__(140, 140, name) self.curtains = Curtains(self) self.curtains.add_scene('scene1', Scene())
def __init__(self): super().__init__(500, 500, 'Anchor') self.curtains = Curtains(self) self.curtains.add_scene('scene1', SmallScene())
def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.curtains = Curtains(self) self.curtains.add_scene('single', SingleScene(self)) self.curtains.set_scene('single')
class RotatingArcsSaver(arcade.Window): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.curtains = Curtains(self) self.curtains.add_scene('single', SingleScene(self)) self.curtains.set_scene('single')