def start(self): # Change the current screen self.current_screen = self.screen_play # Change the background music SoundManager.load_music('bgm_stage' + str(random.randint(2, 6)) + '.ogg')
def __init__(self): super().__init__() # Load the screen for the current stage state = Config.state() entities = (Player(Colors.VIR), Enemy(state['color'], state['shoot_delay'])) self.screen_intro = ScreenIntro(entities, state['balls']) if Config.level == 4: self.screen_play = ScreenHardcore(entities, state['balls'], state['max_balls'], state['max_score']) else: self.screen_play = ScreenNormal(entities, state['balls'], state['max_balls'], state['max_score']) # Set the current screen self.current_screen = self.screen_intro # Pause sound self.snd_click = SoundManager.load_sound('snd_click.wav') # Play the background music SoundManager.load_music('bgm_stage1.ogg')
def __init__(self, update=True): super().__init__() # Repeat cutscene if not update: Cutscene.current_cutscene -= 1 ScreenDialog.current_dialog -= 1 SoundManager.load_music('bgm_dialog.ogg') # Change level if Cutscene.current_cutscene in (4, 6, 8, 11, 14, 17): Config.level += 1 # Background state = Config.state() self.background = ScreenBackground( (Player(Colors.VIR), Enemy(state['color'], state['shoot_delay']))) # Transition self.transition = False self.transition_delay = 50 self.snd_transition = SoundManager.load_sound('snd_transition1.wav') # Set the current screen if Cutscene.current_cutscene in (1, 4, 8, 11, 14, 17): self.current_screen = ScreenNarrator() elif Cutscene.current_cutscene in (3, 6, 7, 10, 13, 16, 19): self.current_screen = ScreenDialog() SoundManager.load_music('bgm_dialog.ogg') else: self.current_screen = ScreenDialog()
def __init__(self): super().__init__() # Load the screen for the multiplayer stage entities = (Player1(Colors.VIR), Player2(Config.state()['color'])) balls = [(65, 175, 10), (185, 175, 10)] self.current_screen = ScreenIntro(entities, balls) self.screen_play = ScreenInfinite(entities, balls, 10) # Pause sound self.snd_click = SoundManager.load_sound('snd_click.wav') # Play the background music SoundManager.load_music('bgm_stage1.ogg')
def __init__(self, victory=False): super().__init__() # Background state = Config.state() self.background = ScreenBackground( (Player(Colors.VIR), Enemy(state['color'], state['shoot_delay']))) # Screens self.screen_menu = ScreenMenu(self) self.screen_options = ScreenOptions(self) # Set the current screen self.current_screen = self.screen_menu # Play the background music if victory: SoundManager.load_music('bgm_victory.ogg') else: SoundManager.load_music('bgm_menu.ogg')
def execute_async(self, scene): SoundManager.load_music('bgm_dialog.ogg') scene.exec_play()
def start(self): # Change the current screen self.current_screen = self.screen_play # Change the background music for the current stage SoundManager.load_music(Config.state()['music'])