camera.py 文件源码

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

项目:project_xcape 作者: OthmanEmpire 项目源码 文件源码
def __init__(self, WIDTH, HEIGHT):
        """
        :param WIDTH: Integer, number of pixels the camera covers horizontally.
        :param HEIGHT: Integer, number of pixels the camera covers vertically.
        """
        self.WIDTH = WIDTH
        self.HEIGHT = HEIGHT
        self.HALF_WIDTH = WIDTH/2
        self.HALF_HEIGHT = HEIGHT/2

        self.physics = PhysicsComponent(self)
        self.physics.maxSpeed = 20

        self.origin = 0
        self.elapsed = 0
        self.duration = 0
        self.delay = 0

        self.brief = None
        self.following = None
        self.rect = pg.Rect(0, 0, self.WIDTH, self.HEIGHT)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号