Skip to content

Instantly share code, notes, and snippets.

@d33tah
Created September 1, 2010 21:02
Show Gist options
  • Save d33tah/561365 to your computer and use it in GitHub Desktop.
Save d33tah/561365 to your computer and use it in GitHub Desktop.
def drawObjectsTask(self,param,task):
n = len(param)
for i in range(n):
x=math.sin(i*(360/n))*self.r
y=math.cos(i*(360/n))*self.r
self.objects[i]=self.drawObject(x,y,i,param[i])
yield task.cont
def drawObjects(self,param):
self.task = taskMgr.doMethodLater(0.1, self.drawObjectsTask, 'drawObjectsTask', extraArgs=[param], appendTask=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment