本文整理汇总了Python中state.State._render方法的典型用法代码示例。如果您正苦于以下问题:Python State._render方法的具体用法?Python State._render怎么用?Python State._render使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类state.State
的用法示例。
在下文中一共展示了State._render方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _render
# 需要导入模块: from state import State [as 别名]
# 或者: from state.State import _render [as 别名]
def _render(self):
State._render(self)
#background
self.screen.fill(Consts.BLACK_COLOR)
self.screen.blit(self.background, self.background.get_rect())
#buttons
if(self.is_in_resolution):
self.continue_button._render(self.screen)
if(self.fight_ended):
self.font_object = pygame.font.Font('freesansbold.ttf', 30)
if(self.character.isDead()):
self.screen.blit(self.font_object.render("YOU LOST...", False, Consts.RED_COLOR), (270,520))
else:
self.screen.blit(self.font_object.render("YOU WON!!!!!", False, Consts.GOLD_COLOR), (270,520))
else:
message = "You"+self.text_character_attack
self.screen.blit(self.font_object.render(message, False, Consts.WHITE_COLOR), (50,510))
message = "Dragon"+self.text_dragon_attack
self.screen.blit(self.font_object.render(message, False, Consts.WHITE_COLOR), (50,550))
else:
self.attack_button._render(self.screen)
self.defense_button._render(self.screen)
self.spell_button._render(self.screen)
self.charge_button._render(self.screen)
self.run_button._render(self.screen)
#characters
self.dragon.render(self.screen)
self.character.render(self.screen)
self.print_level()
示例2: _render
# 需要导入模块: from state import State [as 别名]
# 或者: from state.State import _render [as 别名]
def _render(self):
State._render(self)
self.screen.fill(Consts.LIGHT_GOLD_COLOR)
self.display_welcome_feedback()
self.display_activity_description()
self.display_gold_description()
self.continue_button._render(self.screen)
示例3: _render
# 需要导入模块: from state import State [as 别名]
# 或者: from state.State import _render [as 别名]
def _render(self):
State._render(self)
#Draws the entire menu
self.draw_items_menu()
self.print_level()
#render buttons
self.play_button._render(self.screen)
self.buy_sword_button._render(self.screen)
self.buy_helmet_button._render(self.screen)
self.buy_armor_button._render(self.screen)
self.buy_spell_button._render(self.screen)