diff pytouhou/ui/gamerunner.py @ 343:94fdb6c782c1

Implement sfx for player and enemies.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Wed, 04 Jul 2012 23:41:28 +0200
parents 61caded6b4f5
children 2c4589370cc6
line wrap: on
line diff
--- a/pytouhou/ui/gamerunner.py
+++ b/pytouhou/ui/gamerunner.py
@@ -28,7 +28,7 @@ from pyglet.gl import (glMatrixMode, glL
 from pytouhou.utils.helpers import get_logger
 
 from .gamerenderer import GameRenderer
-from .music import MusicPlayer
+from .music import MusicPlayer, SFXPlayer
 
 
 logger = get_logger(__name__)
@@ -70,6 +70,9 @@ 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)
+
 
     def start(self, width=None, height=None):
         width = width or (self.game.interface.width if self.game else 640)