← Back to team overview

ragetrack-team team mailing list archive

[Branch ~ragetrack-team/ragetracks/trunk] Rev 7: set up the main-method

 

------------------------------------------------------------
revno: 7
committer: Jannik <blazingsun@blazingsun-laptop>
branch nick: trunk
timestamp: Thu 2010-08-26 15:17:01 +0200
message:
  set up the main-method
modified:
  main.py


--
lp:ragetracks
https://code.launchpad.net/~ragetrack-team/ragetracks/trunk

Your team RageTrack-Team is subscribed to branch lp:ragetracks.
To unsubscribe from this branch go to https://code.launchpad.net/~ragetrack-team/ragetracks/trunk/+edit-subscription
=== modified file 'main.py'
--- main.py	2010-08-25 18:40:07 +0000
+++ main.py	2010-08-26 13:17:01 +0000
@@ -1,1 +1,20 @@
+from direct.showbase.ShowBase import ShowBase
+from pandac.PandaModules import *
  
+
+class RageTracks(ShowBase):
+    def __init__(self):
+        ShowBase.__init__(self)
+        #Initialise the Ode world
+        world = OdeWorld()
+        world.setGravity(0, 0, -9.81)
+         
+        # The task for our simulation
+
+    def physicsTask(task):
+      # Step the simulation and set the new positions
+      world.quickStep(globalClock.getDt())
+      return task.cont
+
+game = RageTracks() 
+game.run()
\ No newline at end of file