def draw(self, gfx):
percent = 1.0 - (self.clocks / self.life)
c1 = (percent * 0.4 + 0.2) * 255
c2 = c1 / 4
color = (c1, c2, c2)
pygame.draw.line(gfx.surface, color, self.start, self.end, 3)
gfx.dirty(self.rect)
文章目录