Don't re-initialize when re-entering.
authorSimon Cross <hodgestar@gmail.com>
Sat, 5 Mar 2016 14:07:47 +0000 (16:07 +0200)
committerSimon Cross <hodgestar@gmail.com>
Sat, 5 Mar 2016 14:07:47 +0000 (16:07 +0200)
koperkapel/scenes/level.py

index fcf99951dee5dbaba0d8daa7fc85790934afadfc..0c57ae08d2c72614bdf03ec18e1d9cedc6640a2a 100644 (file)
@@ -81,6 +81,8 @@ class BaseLevelScene(Scene):
 class GameLevelScene(BaseLevelScene):
 
     def enter(self, world):
+        if self._level is not None:
+            return
         super().enter(world)
         self._roaches = self.actors.add_layer("roaches", level=10)
         self._vehicle = Vehicle.current(world)