sprite.py 文件源码

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

项目:AIFun 作者: Plottel 项目源码 文件源码
def __init__(self, *sprites, **kwargs):
        """Same as for the pygame.sprite.Group.
        pygame.sprite.LayeredDirty(*spites, **kwargs): return LayeredDirty

        You can specify some additional attributes through kwargs:
        _use_update: True/False   default is False
        _default_layer: the default layer where the sprites without a layer are
                        added.
        _time_threshold: treshold time for switching between dirty rect mode and
                        fullscreen mode, defaults to 1000./80  == 1000./fps
        """
        LayeredUpdates.__init__(self, *sprites, **kwargs)
        self._clip = None

        self._use_update = False

        self._time_threshold = 1000./80. # 1000./ fps


        self._bgd = None
        for key, val in kwargs.items():
            if key in ['_use_update', '_time_threshold', '_default_layer']:
                if hasattr(self, key):
                    setattr(self, key, val)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号