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()
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)
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)