diff options
author | Gary Martin <gary@garycmartin.com> | 2010-10-03 18:01:28 (GMT) |
---|---|---|
committer | Gary Martin <gary@garycmartin.com> | 2010-10-03 18:01:28 (GMT) |
commit | d01737d10b0ed38182c805cc7db7f7b2c180f6f6 (patch) | |
tree | 86cf21f2b9e81dfe6e25ba6ffc53b13747d36074 | |
parent | b125364dfa6cca1511e2e2b31a6c50fb72d0076a (diff) |
Small tidy-up trying to minimize time spent between screen clear and redraw.
-rw-r--r-- | physics.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -82,8 +82,8 @@ class PhysicsGame: while self.running: for event in pygame.event.get(): self.currentTool.handleEvents(event) - # Clear Display - self.screen.fill((255,255,255)) #255 for white + + # Drive motors if self.world.run_physics: for body in self.world.world.GetBodyList(): if type(body.userData) == type({}): @@ -93,6 +93,7 @@ class PhysicsGame: # Update & Draw World self.world.update() + self.screen.fill((255,255,255)) #255 for white self.world.draw() # draw output from tools |