Created
September 1, 2010 21:02
-
-
Save d33tah/561365 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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