Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bridge.py14
-rw-r--r--physics.py3
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)
+
diff --git a/physics.py b/physics.py
index 4b2bbdc..6d9fb78 100644
--- a/physics.py
+++ b/physics.py
@@ -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