def ready(self):
if 'music' in self.arguments:
- return self.arguments['music'].loaded
+ return self.arguments['music'].check_is_loaded()
else:
return True
def run(self):
print(self.description())
getattr(self, self.action)(**self.arguments)
- #pygame.event.post(pygame.event.Event(pygame.USEREVENT))
def description(self):
return getattr(self, self.action + "_print")(**self.arguments)
if music is not None:
music.pause()
else:
- pygame.mixer.pause()
+ for music in self.key.parent.open_files.values():
+ if music.is_playing() and not music.is_paused():
+ music.pause()
def unpause(self, music = None, **kwargs):
if music is not None:
music.unpause()
else:
- pygame.mixer.unpause()
+ for music in self.key.parent.open_files.values():
+ if music.is_playing() and music.is_paused():
+ music.unpause()
def play(self, music = None, fade_in = 0, start_at = 0,
restart_if_running = False, volume = 100, **kwargs):