Mercurial > touhou
diff pytouhou/ui/gamerunner.py @ 379:e0e284fcb288
Make a sound when an enemy is hit.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Thu, 30 Aug 2012 11:34:56 +0200 |
parents | 11d895b6c0dc |
children | 690b5faaa0e6 |
line wrap: on
line diff
--- a/pytouhou/ui/gamerunner.py +++ b/pytouhou/ui/gamerunner.py @@ -29,7 +29,7 @@ from pytouhou.utils.helpers import get_l from pytouhou.utils.matrix import Matrix from .gamerenderer import GameRenderer -from .music import MusicPlayer, SFXPlayer +from .music import MusicPlayer, SFXPlayer, NullPlayer from .shaders.eosd import GameShader, BackgroundShader @@ -75,9 +75,7 @@ class GameRunner(pyglet.window.Window, G game.music = MusicPlayer(game.resource_loader, bgms) game.music.play(0) - - game.player_sfx = SFXPlayer(game.resource_loader) - game.enemy_sfx = SFXPlayer(game.resource_loader) + game.sfx_player = SFXPlayer(game.resource_loader) if not self.skip else NullPlayer() def set_input(self, replay=None): @@ -177,6 +175,7 @@ class GameRunner(pyglet.window.Window, G if self.skip: self.set_input() self.skip = False + self.game.sfx_player = SFXPlayer(self.game.resource_loader) if self.save_keystates is not None: self.save_keystates.append(keystate)