Beispiel #1
0
    def draw_after_players(self, surface, level_place, zoom, levelmap=False):
        ''' draw everything that need to be drawn after players
        '''
        self.draw_foreground(surface, level_place, zoom)
        if levelmap or loaders.get_gconfig().get("game", "minimap") == "y":
            self.draw_minimap(surface)

        for block in self.moving_blocs + self.vector_blocs:
            block.draw_after(surface, level_place, zoom)

        for generator in self.particles_generators:
            generator.draw(surface, level_place, zoom)
    def draw_after_players(self, surface, level_place, zoom, levelmap=False):
        ''' draw everything that need to be drawn after players
        '''
        self.draw_foreground(surface, level_place, zoom)
        if levelmap or loaders.get_gconfig().get("game", "minimap") == "y":
            self.draw_minimap(surface)

        for block in self.moving_blocs + self.vector_blocs:
            block.draw_after(surface, level_place, zoom)

        for generator in self.particles_generators:
            generator.draw(surface, level_place, zoom)
    def draw_player_portrait(self, player):
        """ draw, like... the player portrait? :D
        """
        self.screen.blit(
            loaders.image(player.entity_skin.image, scale=(30, 30))[0],
            (-0.5 * self.icon_space + player.num * self.icon_space,
             self.size[1] * .9))

        if loaders.get_gconfig().get("game", "displaylives") == "y":
            self.screen.blit(
                GAME_FONT.render(
                    str(player.percents * 10)[:3] + "%", True,
                    pygame.color.Color("red")),
                (-0.5 * self.icon_space + player.num * self.icon_space,
                 self.size[1] * .9))

        elif loaders.get_gconfig().get(
                "game", "display_progress_bar_for_lives") == "y":
            self.draw_progress_bar_for_lives(player)

        self.draw_player_lives(player)
Beispiel #4
0
    def draw_player_portrait(self, player):
        """ draw, like... the player portrait? :D
        """
        self.screen.blit(
                 loaders.image(player.entity_skin.image, scale=(30, 30))[0],
                    (
                    -0.5 * self.icon_space + player.num * self.icon_space,
                    self.size[1] * .9))

        if loaders.get_gconfig().get("game", "displaylives") == "y":
            self.screen.blit(
                     GAME_FONT.render(str(player.percents * 10)[:3] + "%",
                     True,
                     pygame.color.Color("red")),
                        (
                        -0.5 * self.icon_space + player.num * self.icon_space,
                        self.size[1] * .9))

        elif loaders.get_gconfig().get("game",
                "display_progress_bar_for_lives") == "y":
            self.draw_progress_bar_for_lives(player)

        self.draw_player_lives(player)