diff options
-rw-r--r-- | bridge.py | 14 | ||||
-rw-r--r-- | physics.py | 3 |
2 files changed, 17 insertions, 0 deletions
diff --git a/bridge.py b/bridge.py new file mode 100644 index 0000000..76daffc --- /dev/null +++ b/bridge.py @@ -0,0 +1,14 @@ +import pygame + +def create_world(game): + rect = pygame.Rect((0,800), (350, -250)) + rect.normalize() + pygame.draw.rect(game.screen, (100,180,255), rect, 3) + game.world.add.rect(rect.center, rect.width / 2, rect.height / 2, + dynamic=False) + rect = pygame.Rect((1200,800), (-350, -250)) + rect.normalize() + pygame.draw.rect(game.screen, (100,180,255), rect, 3) + game.world.add.rect(rect.center, rect.width / 2, rect.height / 2, + dynamic=False) + @@ -23,6 +23,7 @@ import olpcgames import elements from elements import Elements import tools +import bridge from helpers import * class PhysicsGame: @@ -46,6 +47,8 @@ class PhysicsGame: # set up static environment self.world.add.ground() + + bridge.create_world(self) def run(self): self.running = True |