Mercurial > touhou
diff pytouhou/ui/gamerunner.py @ 331:1b4f04b08729
Add the story mode.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sat, 30 Jun 2012 19:37:21 +0200 |
parents | 16ed1ab1e14b |
children | 4eca6130f118 |
line wrap: on
line diff
--- a/pytouhou/ui/gamerunner.py +++ b/pytouhou/ui/gamerunner.py @@ -44,7 +44,9 @@ class GameRunner(pyglet.window.Window, G caption='PyTouhou', resizable=False) self.replay_level = None - self.load_game(game, background, replay) + + if game: + self.load_game(game, background, replay) self.clock = pyglet.clock.get_default() @@ -142,7 +144,6 @@ class GameRunner(pyglet.window.Window, G keystate |= 128 if self.keys[pyglet.window.key.LCTRL]: keystate |= 256 - self.game.run_iter(keystate) else: keystate = 0 for frame, _keystate, unknown in self.replay_level.keys: @@ -151,7 +152,7 @@ class GameRunner(pyglet.window.Window, G else: keystate = _keystate - self.game.run_iter(keystate) + self.game.run_iter(keystate) def render_game(self):