本文整理汇总了Python中Camera.camera方法的典型用法代码示例。如果您正苦于以下问题:Python Camera.camera方法的具体用法?Python Camera.camera怎么用?Python Camera.camera使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Camera
的用法示例。
在下文中一共展示了Camera.camera方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import Camera [as 别名]
# 或者: from Camera import camera [as 别名]
def __init__(self):
self.player = PlayerClass.Player()
self.mainCamera = Camera.camera()
self.mainCamera.setCamera(self.player)
self.MapRenderer = MapRender.mapRender(40,800,600)
self.MapRenderer.changeLevel(Level1)
示例2: loadPictures
# 需要导入模块: import Camera [as 别名]
# 或者: from Camera import camera [as 别名]
pygame.mouse.set_visible(1) # makes mouse visible
# pygame.key.set_repeat(1,10)#allows keys to be held down
font = pygame.font.Font(pygame.font.match_font("bitstreamverasans"), 24) # creates a default font
buttonFont = pygame.font.Font(pygame.font.match_font("bitstreamverasans"), 36) # creates a button font
clock = pygame.time.Clock() # creates a game clock
background = pygame.Surface(screen.get_size()) # creates a background
background = background.convert()
tileCracks = []
tileCracks.append(loadPic("data/images/Effects/Crack1.gif"))
tileCracks.append(loadPic("data/images/Effects/Crack2.gif"))
tileCracks.append(loadPic("data/images/Effects/Crack3.gif"))
mainCamera = Camera.camera(
screen, screenSize[0] // 2, screenSize[1] // 2, screenSize
) # creates a camera for viewing the menu
background.fill((150, 150, 150)) # gray background
menBack = World.world(
screenSize,
mainCamera,
loadPictures("data/images/tiles/"),
itemList,
tileCracks,
weaponPics,
armorPics,
None,
32,
False,
special=False,
) # creates a mini world for the menu