spritesheet.py 文件源码

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

项目:Pacbot 作者: HarvardURC 项目源码 文件源码
def image_at(self, rectangle, colorkey = None):
        "Loads image from x,y,x+offset,y+offset"
        rect = pygame.Rect(rectangle)
        image = pygame.Surface(rect.size).convert()
        image.blit(self.sheet, (0, 0), rect)
        if colorkey is not None:
            if colorkey is -1:
                colorkey = image.get_at((0,0))
            image.set_colorkey(colorkey, pygame.RLEACCEL)
        return image
    # Load a whole bunch of images and return them as a list
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号