From 67729dc5eba7dfe9f386530e877f5d0f0cfd5e89 Mon Sep 17 00:00:00 2001 From: Daniel Drake Date: Sun, 31 Aug 2008 18:49:11 +0000 Subject: Detect when train falls off --- (limited to 'physics.py') diff --git a/physics.py b/physics.py index 3b0431e..8b827e8 100644 --- a/physics.py +++ b/physics.py @@ -87,6 +87,10 @@ class PhysicsGame: textpos = text.get_rect(left=700,top=25) self.screen.blit(text,textpos) + if self.bridge.train_off_screen: + text = self.font.render("Train fell off the screen, try again!", True, (0,0,0)) + textpos = text.get_rect(left=700,top=43) + self.screen.blit(text,textpos) # Flip Display pygame.display.flip() -- cgit v0.9.1