From d01737d10b0ed38182c805cc7db7f7b2c180f6f6 Mon Sep 17 00:00:00 2001 From: Gary Martin Date: Sun, 03 Oct 2010 18:01:28 +0000 Subject: Small tidy-up trying to minimize time spent between screen clear and redraw. --- (limited to 'physics.py') diff --git a/physics.py b/physics.py index 704a62d..4156171 100644 --- a/physics.py +++ b/physics.py @@ -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 -- cgit v0.9.1