def update(self, dt):
pos = self.visible_position
if pos[0] == -1:
return
player_surface = pygame.Surface(self.rect.size).convert_alpha()
for i in range(220,0,-10):
pygame.draw.circle(player_surface,(0,0,0,i),(int(pos[0]),int(pos[1])),int(i/220.0*10+90))
pygame.draw.circle(player_surface,(0,0,0,0),(int(pos[0]),int(pos[1])),90)
self.image.blit(player_surface,(0,0),special_flags=pygame.BLEND_RGBA_MIN)
pygame.draw.circle(self.visible_area, (255, 0, 0), (int(pos[0]), int(pos[1])), 80)
self.mask = pygame.mask.from_surface(self.visible_area)
评论列表
文章目录