vid.py 文件源码

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

项目:CritterEvolution 作者: apockill 项目源码 文件源码
def __init__(self,ishape,pos):
        if not isinstance(ishape, tuple):
            ishape = ishape,None
        image,shape = ishape
        if shape == None:
            shape = pygame.Rect(0,0,image.get_width(),image.get_height())
        if isinstance(shape, tuple): shape = pygame.Rect(shape)
        self.image = image
        self._image = self.image
        self.shape = shape
        self.rect = pygame.Rect(pos[0],pos[1],shape.w,shape.h)
        self._rect = pygame.Rect(self.rect)
        self.irect = pygame.Rect(pos[0]-self.shape.x,pos[1]-self.shape.y,
            image.get_width(),image.get_height())
        self._irect = pygame.Rect(self.irect)
        self.groups = 0
        self.agroups = 0
        self.updated = 1
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号