Esempio n. 1
0
    def render(self, screen):
        screen.fill(WHITE)
        screen.blit(background, (0, 0))

        textbox_gunnar = TextBox((0.5, 0.2), "RobotoSlab-Medium.ttf", 25,
                                 False, YELLOW, self.text_gunnar)
        textbox_gunnar.render(screen)

        textbox_ada = TextBox((0.5, 0.2), "RobotoSlab-Medium.ttf", 25, False,
                              RED, self.text_ada)
        textbox_ada.render(screen)

        x_off, y_off = periodic_movement(1, 5)
        if self.turn == "user":
            glada_gunnar(24, 144 + y_off, 122, 45)
            aggressive_ada(504, 156, 650, 550)
        else:
            glada_gunnar(24, 144, 122, 45)
            aggressive_ada(504, 156 + y_off, 650, 550)

        quit_button()
        # back_button()

        # Rotate sword depending on whose turn it is
        sword(self.turn)
Esempio n. 2
0
def sword(turn):
    sword = pg.image.load("images/sword_resized.png")
    x_off, y_off = periodic_movement(1, 5)
    if turn == "user":
        rotate_image = pg.transform.rotozoom(sword, 0 + x_off, 1)
    else:
        rotate_image = pg.transform.rotozoom(sword, 70 + x_off, 1)
    new_rect = rotate_image.get_rect(center=(400, 300))
    screen.blit(rotate_image, new_rect)
Esempio n. 3
0
def crossed_sword():
    double_sword = pg.image.load("images/Sword_crossed_01.PNG")
    double_sword = pg.transform.smoothscale(double_sword, (230, 230))

    x_off, y_off = periodic_movement(1, 7)
    rect = double_sword.get_rect()
    shield = pg.transform.smoothscale(
        double_sword, (rect.width + int(x_off), rect.height + int(x_off)))
    blit_rect = shield.get_rect()
    blit_rect.center = (420, 280)
    screen.blit(shield, blit_rect)
Esempio n. 4
0
    def render(self, screen):
        screen.fill(WHITE)
        screen.blit(background, (0, 0))

        x_off, y_off = periodic_movement(1, 5)
        aggressive_ada(504, 156, 650, 550)
        glada_gunnar(24, 144 + y_off, 122, 45)

        screen.blit(vs_sign1, (300, 225))
        quit_button()
        block_button()
        attack_button()
        special_attack_button()
        quiz_button()
        textbox_gunnar = TextBox((0.5, 0.2), "RobotoSlab-Medium.ttf", 30,
                                 False, WHITE, "It's your turn!")
        textbox_gunnar.render(screen)
Esempio n. 5
0
 def render(self, screen):
     screen.fill(WHITE)
     screen.blit(background_win, (0, 0))
     x_off, y_off = periodic_movement(1, 5)  #CL
     gunnar_bigger = pg.transform.scale(gunnar.image, (350, 350))
     screen.blit(gunnar_bigger, (220, 235 + y_off))
     winning_crown_hasse_moving()
     pink_dragon_sad = pg.image.load("images/Pink_dragon_05.png")
     pink_dragon_sad = pg.transform.scale(pink_dragon_sad, (204, 235))
     screen.blit(pink_dragon_sad, (25, 340))
     screen.blit(logo, (213, -55))
     tear_drop = pg.image.load("images/tear-png-20.png")
     tear_drop = pg.transform.scale(tear_drop, (25, 25))
     screen.blit(tear_drop, (120, 410))
     text_speech(screen, "RobotoSlab-Medium.ttf", 30, "Congratulations,",
                 YELLOW_LIGHT, 389, 150, True)
     text_speech(screen, "RobotoSlab-Medium.ttf", 30, f"{gunnar.name} won!",
                 YELLOW_LIGHT, 388, 200, True)
     quit_button()
Esempio n. 6
0
def winning_crown_ada_moving():
    winning_crown = pg.image.load("images/crown.png")
    winning_crown = pg.transform.scale(winning_crown, (151, 124))
    x_off, y_off = periodic_movement(1, 5)
    screen.blit(winning_crown, (340, 245 + y_off))
Esempio n. 7
0
def winning_crown_hasse_moving():
    winning_crown = pg.image.load("images/crown.png")
    winning_crown = pg.transform.scale(winning_crown, (170, 140))
    x_off, y_off = periodic_movement(1, 5)
    screen.blit(winning_crown, (270, 180 + y_off))
Esempio n. 8
0
def shield():
    shield_pic = pg.image.load("images/shield_white.png")
    x_off, y_off = periodic_movement(1, 5)
    rotate_image = pg.transform.rotozoom(shield_pic, 0 + x_off, 1)
    new_rect = rotate_image.get_rect(center=(400, 300))
    screen.blit(rotate_image, new_rect)