Ejemplo n.º 1
0
 def draw(self, group):
     batch = Batch()
     ss = []
     for particle in group:
         s = Sprite(self.image, batch=batch)
         s.position = list(particle.position)[:2]
         s.color = [c * 255 for c in list(particle.color)[:3]]
         s.scale = particle.size[0] / 64.0
         s.rotation = particle.age * 720
         s.opacity = particle.color[3] * 255
         ss.append(s)
     batch.draw()