Пример #1
0
    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
Пример #2
0
    def show_about_stage(self):
        self.render_menu_basics()
        self.render_title("About this game", 2)
        options = pygame.sprite.RenderPlain()
        option = self.place_button_in_screen("back", 60, 120)
        option.add(options)

        y_offset = 160
        font = pygame.font.Font(None, 32)
        text = GameConfig.get_text('about')
        for line in text:
            data = font.render(line, 1, self.subtitle_font_color)
            self.background.blit(data, (155, y_offset))
            y_offset += 30

        return options