def __init__(self, attrs, pid, pos, time, note): pygame.sprite.Sprite.__init__(self) self.image = image.load(self.image_pth).convert(); self.note = note self.time = time self.radius = attrs[0] self.speed = attrs[1] self.pid = pid self.angle = attrs[2] self.rect = self.image.get_rect() self.lookUp = lookupCoord(pos[0], pos[1], self.radius, self.angle) self.set_startpos() self.load_sound() self.sound.play(-1) self.update(0.5, None)
#test get universe print "getUNI ", x.getUNI(0) resp = (Conf, StarId) = x.delStar(StarId) print "Del Star", resp #test get universe print "getUNI ", x.getUNI(0) ###----------------------------------------------------------- ###----------------------------------------------------------- ###----------------------------------------------------------- ###----------------------------------------------------------- #lookup(XCenter, YCenter, Radius, Angle) c = lookupCoord(0,0,10,270) #get the first arclength position based on the #planets startup angle #firstP = c.firstPosition #print firstP #getLocation(arclength location) #for i in range(int(firstP), 3): #print c.getLocation(i) #getList -- returns the coordinates dictionary #print c.getList()
#test add star print "Add Star", x.addStar(32,43,5) #test delete star print "Del Star", x.delStar(46) #test add planet print "Add Planet", x.addPlanet(23, 43, 23, 23, 2) #test delete planet print "Del Planet ", x.delPlanet(32, 43) #test get universe print "getUNI ", x.getUNI(1) #test location print "location ", x.location(32) #lookup(XCenter, YCenter, Radius) c = lookupCoord(0,0,10) #getLocation(arclength location) for i in range(163): print c.getLocation(i) #getList -- returns the coordinates dictionary #print c.getList()