本文整理汇总了Python中enemy.Enemy.get_image方法的典型用法代码示例。如果您正苦于以下问题:Python Enemy.get_image方法的具体用法?Python Enemy.get_image怎么用?Python Enemy.get_image使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类enemy.Enemy
的用法示例。
在下文中一共展示了Enemy.get_image方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: show_rules_stage
# 需要导入模块: from enemy import Enemy [as 别名]
# 或者: from enemy.Enemy import get_image [as 别名]
def show_rules_stage(self):
self.render_menu_basics()
self.render_title("Rules", 2)
options = pygame.sprite.RenderPlain()
option = self.place_button_in_screen("back", 60, 120)
option.add(options)
fontsubtitle = pygame.font.Font(None, 40)
#Enemigos
text = fontsubtitle.render("Enemies", 1, (180, 180, 180))
self.background.blit(text, (180, 150))
font = pygame.font.Font(None, 32)
y_offset = 200
index = 0
for e in GameConfig.get_enemy_types():
image = Enemy.get_image(index)
self.background.blit(image, (180, y_offset))
data = font.render(str(e['score']) + " pts", 1, self.subtitle_font_color)
self.background.blit(data, (250, y_offset + 20))
y_offset += 80
index += 1
#Friends
text = fontsubtitle.render("Friends", 1, (180, 180, 180))
self.background.blit(text, (500, 150))
image = Prisoner.get_image()
self.background.blit(image, (500, 200))
text = GameConfig.get_text('prisoner')
y_offset = 200
for line in text:
data = font.render(line, 1, self.subtitle_font_color)
self.background.blit(data, (550, y_offset))
y_offset += 30
image = SpecialItem.get_image('extra_life')
self.background.blit(image, (430, 420))
data = font.render("Extra life", 1, self.subtitle_font_color)
self.background.blit(data, (470, 420))
image = SpecialItem.get_image('invincible')
self.background.blit(image, (570, 420))
data = font.render("Invincible", 1, self.subtitle_font_color)
self.background.blit(data, (610, 420))
image = SpecialItem.get_image('super_shoot')
self.background.blit(image, (500, 470))
data = font.render("Super shoot", 1, self.subtitle_font_color)
self.background.blit(data, (540, 470))
return options