Created
August 30, 2010 21:27
-
-
Save d33tah/558083 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 drawProfiles(self,task): | |
r=14 | |
i = 0 | |
n = len(self.my_friends) | |
for i in range(n): | |
x=math.sin(i*(360/n))*r | |
y=math.cos(i*(360/n))*r | |
profile_obj = loadObject(pos=Point2(x,y)) | |
profile_obj.node().setIntoCollideMask(BitMask32.bit(1)) | |
profile_obj.node().setTag('number', str(i)) | |
profile = self.my_friends[i] | |
url = profile.get_details().avatar_thumb_url | |
photo_to_tex(self.nk,profile_obj,url) | |
self.images[i] = profile_obj | |
self.profiles[i] = self.my_friends[i] | |
i+=1 | |
yield task.cont | |
return task.done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment