def __init__(self, source_resolution, output_resolution,
view_resolution, behavior=None):
"""Create a Camera!
Arguments:
view_resolution (tuple[int, int]): used to create
view_rect attribute.
"""
super(Camera, self).__init__(output_resolution)
self.source_surface = pygame.surface.Surface(source_resolution,
pygame.SRCALPHA)
self.source_resolution = source_resolution
self.output_resolution = output_resolution
self.view_rect = pygame.Rect((0, 0), view_resolution)
self.behavior = behavior or CameraBehavior()
评论列表
文章目录