From: Simon Cross Date: Sat, 17 May 2014 10:26:51 +0000 (+0200) Subject: Go straight to game after loading. X-Git-Tag: 0.1~130 X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=e67cf376ffdb8ad889f688a044668024ca8fcc8a;p=naja.git Go straight to game after loading. --- diff --git a/naja/scenes/load_save.py b/naja/scenes/load_save.py index 809adbd..4bdd71b 100644 --- a/naja/scenes/load_save.py +++ b/naja/scenes/load_save.py @@ -71,6 +71,7 @@ class LoadSaveGameBase(Scene): InvalidateTheWorld.post() def succeed(self): + raise NotImplementedError("Success not implemented.") from naja.scenes.menu import MenuScene sound.play_sound('chirp.ogg', volume=0.5) SceneChangeEvent.post(MenuScene) @@ -95,6 +96,11 @@ class SaveGameScene(LoadSaveGameBase): else: self.succeed() + def succeed(self): + from naja.scenes.menu import MenuScene + sound.play_sound('chirp.ogg', volume=0.5) + SceneChangeEvent.post(MenuScene) + class LoadGameScene(LoadSaveGameBase): def perform_action(self, slot_num): @@ -105,3 +111,8 @@ class LoadGameScene(LoadSaveGameBase): self.succeed() else: self.fail() + + def succeed(self): + from naja.scenes.game import GameScene + sound.play_sound('chirp.ogg', volume=0.5) + SceneChangeEvent.post(GameScene)