Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/bridge.py
diff options
context:
space:
mode:
authorDaniel Drake <dsd@laptop.org>2008-08-31 19:38:30 (GMT)
committer Daniel Drake <dsd@laptop.org>2008-08-31 19:38:30 (GMT)
commit6631a25df226bea8e633b37ed4732d93c6dccfe9 (patch)
tree58c65d69ce2541b9b383e35c4a3e8362a460c9cd /bridge.py
parentbb13d19a05729a44a14bff6cd03f7fa66d2787eb (diff)
add restart functionality
Diffstat (limited to 'bridge.py')
-rw-r--r--bridge.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/bridge.py b/bridge.py
index 6b0cf28..ead0878 100644
--- a/bridge.py
+++ b/bridge.py
@@ -15,6 +15,12 @@ class Bridge:
self.level_completed = False
self.sounds = {"wooo":loadSound("sounds/wooo.wav"), "death":loadSound("sounds/death.wav"), "startup":loadSound("sounds/startup.wav")}
+ def restart(self):
+ self.world.run_physics = False
+ self.train_off_screen = False
+ self.level_completed = False
+ self.train_was_created = False
+
def create_world(self):
self.world.set_color((100,150,50))
rect = pygame.Rect((-400,800), (750, -250))