Mercurial > touhou
diff pytouhou/ui/gamerunner.pyx @ 528:7c3c90468996
Inherit music players from a base class.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Wed, 18 Dec 2013 22:36:23 +0100 |
parents | 2e8ceaa85d5c |
children | 1abb6f7db8cc |
line wrap: on
line diff
--- a/pytouhou/ui/gamerunner.pyx +++ b/pytouhou/ui/gamerunner.pyx @@ -17,8 +17,9 @@ cimport cython from pytouhou.lib cimport sdl from .window cimport Window, Runner -from .music import MusicPlayer, SFXPlayer, NullPlayer +from .music import BGMPlayer, SFXPlayer from pytouhou.game.game cimport Game +from pytouhou.game.music cimport MusicPlayer cdef class GameRunner(Runner): @@ -65,9 +66,9 @@ cdef class GameRunner(Runner): self.save_keystates = save_keystates - null_player = NullPlayer() + null_player = MusicPlayer() if bgms is not None: - game.music = MusicPlayer(self.resource_loader, bgms) + game.music = BGMPlayer(self.resource_loader, bgms) game.music.play(0) else: game.music = null_player