Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tools.py
diff options
context:
space:
mode:
authorAlex Levenson <alexlevenson@laptop.org>2008-07-10 21:06:08 (GMT)
committer Alex Levenson <alexlevenson@laptop.org>2008-07-10 21:06:08 (GMT)
commit1d706c551bc68b771ac612e986f0ac31849b83a4 (patch)
tree6347c321ca99ed9793c154e53b2d19f64068a4cc /tools.py
parent3ea4657c9fdeb57cac1d29c1c7e9d88fef93fca0 (diff)
Added some joints (not fully functional)
Diffstat (limited to 'tools.py')
-rw-r--r--tools.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools.py b/tools.py
index 125d033..e629202 100644
--- a/tools.py
+++ b/tools.py
@@ -36,6 +36,10 @@ class Tool(object):
self.game.setTool("destroy")
elif event.key == K_m:
self.game.setTool("magicpen")
+ elif event.key == K_z:
+ b1 = self.game.world.world.GetBodyList()
+ b2 = b1.GetNext()
+ self.game.world.add.pully(b1,b2,b1.GetWorldCenter(),b2.GetWorldCenter(),(100,100),(400,100))
elif event.type == USEREVENT:
if hasattr(event,"action"):
if self.game.tools.has_key(event.action): self.game.setTool(event.action)
@@ -260,10 +264,6 @@ class JointTool(Tool):
self.jb1pos = event.pos
self.jb1 = self.game.world.get_bodies_at_pos(event.pos)
self.jb2 = self.jb2pos = None
- if event.button == 2:
- bodies = self.game.world.get_bodies_at_pos(event.pos)
- if len(bodies) >=2:
- self.game.world.add.revoluteJoint(bodies[0],bodies[1],event.pos)
elif event.type == MOUSEBUTTONUP:
if event.button == 1:
# grab the second body