Mercurial > touhou
comparison pytouhou/ui/gamerunner.pyx @ 428:f41a26971a19
Remove all Loader uses from outside pytouhou.games, and add a --no-music option to disable bgm.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Tue, 16 Jul 2013 21:17:22 +0200 |
parents | 0604f4fbbe3c |
children | 878273a984c4 |
comparison
equal
deleted
inserted
replaced
427:0604f4fbbe3c | 428:f41a26971a19 |
---|---|
69 game.players[0].state.bombs = self.replay_level.bombs | 69 game.players[0].state.bombs = self.replay_level.bombs |
70 game.difficulty = self.replay_level.difficulty | 70 game.difficulty = self.replay_level.difficulty |
71 | 71 |
72 self.save_keystates = save_keystates | 72 self.save_keystates = save_keystates |
73 | 73 |
74 game.music = MusicPlayer(game.resource_loader, bgms) | 74 null_player = NullPlayer() |
75 game.music.play(0) | 75 if bgms: |
76 game.sfx_player = SFXPlayer(game.resource_loader) if not self.skip else NullPlayer() | 76 game.music = MusicPlayer(game.resource_loader, bgms) |
77 game.music.play(0) | |
78 else: | |
79 game.music = null_player | |
80 | |
81 game.sfx_player = SFXPlayer(game.resource_loader) if not self.skip else null_player | |
77 | 82 |
78 | 83 |
79 def set_input(self, replay=None): | 84 def set_input(self, replay=None): |
80 if not replay or not replay.levels[self.game.stage-1]: | 85 if not replay or not replay.levels[self.game.stage-1]: |
81 self.replay_level = None | 86 self.replay_level = None |