fog.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:DungeonTableMap 作者: ShadowApex 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号