Example #1
0
    def render(self, screen):
        screen.fill(WHITE)
        screen.blit(background, (0, 0))
        self.text.render(screen)
        self.continue_button.render(screen)

        x_off, y_off = periodic_movement(1, 5)
        pixel_pos = rel_to_pix((0.5, 0.55))
        poketer_image_rect = self.poketer_image.get_rect()
        poketer_image_rect.center = pixel_pos[0], pixel_pos[1] + y_off
        screen.blit(self.poketer_image, poketer_image_rect)
Example #2
0
    def render(self, screen):
        screen.fill(BLACK)
        screen.blit(self.background_image, (0, 0))
        self.title.render(screen)
        self.info_text.render(screen)

        x_off, y_off = periodic_movement(1, 5)
        pixel_pos = rel_to_pix((0.5, 0.55))
        poketer_image_rect = self.poketer_image.get_rect()
        poketer_image_rect.center = pixel_pos[0], pixel_pos[1] + y_off
        screen.blit(self.poketer_image, poketer_image_rect)
        self.quiz_finished_button.render(screen)
Example #3
0
    def render(self, screen):
        screen.fill(WHITE)
        screen.blit(self.background_win, (0, 0))

        if self.won:
            x_off, y_off = periodic_movement(1, 5)
            gunnar_bigger = pygame.transform.scale(self.gunnar.image,
                                                   (350, 350))
            screen.blit(gunnar_bigger, (220, 235 + y_off))
            winning_crown_hasse_moving(screen)
            pink_dragon_sad = pygame.image.load(
                "media/images/Pink_dragon_05.png")
            pink_dragon_sad = pygame.transform.scale(pink_dragon_sad,
                                                     (204, 235))
            screen.blit(pink_dragon_sad, (25, 340))
            tear_drop = pygame.image.load("media/images/tear-png-20.png")
            tear_drop = pygame.transform.scale(tear_drop, (25, 25))
            screen.blit(tear_drop, (120, 410))
            game_won = TextBox((0.5, 0.2), 35, False, YELLOW_LIGHT,
                               f"Congratulations, {self.gunnar.name} won!")
            game_won.render(screen)
        else:
            ada_win_pic = pygame.image.load("media/images/Pink_dragon_08.png")
            ada_win_pic = pygame.transform.scale(ada_win_pic, (350, 350))
            screen.blit(ada_win_pic, (205, 285))
            winning_crown_ada_moving(screen)
            gunnar_lose = pygame.transform.scale(self.gunnar.image, (200, 200))
            screen.blit(gunnar_lose, (25, 355))
            tear_drop = pygame.image.load("media/images/tear-png-20.png")
            tear_drop = pygame.transform.scale(tear_drop, (25, 25))
            screen.blit(tear_drop, (90, 430))
            game_lost = TextBox((0.5, 0.2), 35, False, PINK,
                                "Better luck next time!")
            game_lost.render(screen)

        screen.blit(logo, (213, -55))
        self.quit_button.render(screen)
Example #4
0
def winning_crown_ada_moving(screen):
    winning_crown = pygame.image.load("media/images/crown.png")
    winning_crown = pygame.transform.scale(winning_crown, (151, 124))
    x_off, y_off = periodic_movement(1, 5)
    screen.blit(winning_crown, (340, 245 + y_off))
Example #5
0
def winning_crown_hasse_moving(screen):
    winning_crown = pygame.image.load("media/images/crown.png")
    winning_crown = pygame.transform.scale(winning_crown, (170, 140))
    x_off, y_off = periodic_movement(1, 5)
    screen.blit(winning_crown, (270, 180 + y_off))