Go straight to game after loading.
authorSimon Cross <hodgestar@gmail.com>
Sat, 17 May 2014 10:26:51 +0000 (12:26 +0200)
committerSimon Cross <hodgestar@gmail.com>
Sat, 17 May 2014 10:27:55 +0000 (12:27 +0200)
naja/scenes/load_save.py

index 809adbdeb743d0dfe4886f63c0aa390af59906d4..4bdd71b2bf48f9ac717a9c16c05ea74d34faa46c 100644 (file)
@@ -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)