Esempio n. 1
0
 def createPolygon(self, points, static=True):
     obj = GameObject.GameObject(self)
     ((x, y), vectors) = Polygon.getPolygonFromPoints(points)
     obj.collider = Collider.PolygonCollider(obj, x, y, vectors)
     self.phyEng.add(obj.collider)
     obj.collider.static = static
     self.objects.append(obj)
     return obj
Esempio n. 2
0
 def makePolygon(self):
     points = [ (0,0),(0,-self.startHeight/2) , (self.widht,-self.height/2), (self.widht, self.height/2),(0, self.startHeight/2) ]
     ((x,y),pt) = Polygon.getPoligonFromPoints(points)
     return Polygon.Polygon( x,y, pt)