本文整理汇总了Python中Character.Character.set_options方法的典型用法代码示例。如果您正苦于以下问题:Python Character.set_options方法的具体用法?Python Character.set_options怎么用?Python Character.set_options使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Character.Character
的用法示例。
在下文中一共展示了Character.set_options方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from Character import Character [as 别名]
# 或者: from Character.Character import set_options [as 别名]
def __init__(self):
""" Constructor function """
Character.__init__(self)
#Load images and rectangles
self.jump_l_image, self.jump_l_image_rect = routines.load_png('hero_3/jump_l.png')
self.jump_r_image, self.jump_r_image_rect = routines.load_png('hero_3/jump_r.png')
self.idle_l_image, self.idle_l_image_rect = routines.load_png('hero_3/idle_l.png')
self.idle_r_image, self.idle_r_image_rect = routines.load_png('hero_3/idle_r.png')
self.move_1_r_image, self.move_1_r_image_rect = routines.load_png('hero_3/move_1_r.png')
self.move_1_l_image, self.move_1_l_image_rect = routines.load_png('hero_3/move_1_l.png')
self.move_2_r_image, self.move_2_r_image_rect = routines.load_png('hero_3/move_2_r.png')
self.move_2_l_image, self.move_2_l_image_rect = routines.load_png('hero_3/move_2_l.png')
self.dead_image, self.dead_image_rect = routines.load_png('hero_3/death.png')
#load sounds
self.sounds={}
self.sounds['jump']=pygame.mixer.Sound('data/sound/jump.wav')
self.image = self.idle_l_image
self.rect = self.idle_l_image_rect
# Set a referance to the image rect.
#Setup status
self.status = 'idle_r' #idle,move,jump,
self.location = 'ground' #ground,air,block
Character.set_options(self, 13, 0, 1)