Mercurial > touhou
comparison 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 |
comparison
equal
deleted
inserted
replaced
342:83c9354ff3ef | 343:94fdb6c782c1 |
---|---|
26 GL_SCISSOR_TEST) | 26 GL_SCISSOR_TEST) |
27 | 27 |
28 from pytouhou.utils.helpers import get_logger | 28 from pytouhou.utils.helpers import get_logger |
29 | 29 |
30 from .gamerenderer import GameRenderer | 30 from .gamerenderer import GameRenderer |
31 from .music import MusicPlayer | 31 from .music import MusicPlayer, SFXPlayer |
32 | 32 |
33 | 33 |
34 logger = get_logger(__name__) | 34 logger = get_logger(__name__) |
35 | 35 |
36 | 36 |
67 game.players[0].state.bombs = self.replay_level.bombs | 67 game.players[0].state.bombs = self.replay_level.bombs |
68 game.difficulty = self.replay_level.difficulty | 68 game.difficulty = self.replay_level.difficulty |
69 | 69 |
70 game.music = MusicPlayer(game.resource_loader, bgms) | 70 game.music = MusicPlayer(game.resource_loader, bgms) |
71 game.music.play(0) | 71 game.music.play(0) |
72 | |
73 game.player_sfx = SFXPlayer(game.resource_loader) | |
74 game.enemy_sfx = SFXPlayer(game.resource_loader) | |
72 | 75 |
73 | 76 |
74 def start(self, width=None, height=None): | 77 def start(self, width=None, height=None): |
75 width = width or (self.game.interface.width if self.game else 640) | 78 width = width or (self.game.interface.width if self.game else 640) |
76 height = height or (self.game.interface.height if self.game else 480) | 79 height = height or (self.game.interface.height if self.game else 480) |