Пример #1
0
def show_start_wave(user_info, surface):
    global WAVE_TIME, START_WAVE, CREATE_WAVE
    start_wave = Message(surface, (0, 10), ('Start Wave ' + str(user_info.wave + 1) + '/' + str(user_info.waves)),
                         font=pg.font.SysFont('comicsansms', 24, True), bg_color=BROWN)
    start_wave.rect.right = 48*TILE_SIZE - 10
    start_wave.blit()
    user_info.start_wave = start_wave
Пример #2
0
def congrats(surface):
    global RETRY_COUNTER
    draw_tint(GREEN, surface)
    c1 = Message(surface, (480, 220), 'You Completed ', font=pg.font.SysFont('comicsansms', 60, True),
                 bg_color=BROWN)
    c2 = Message(surface, (480, 300), 'All the Waves! ', font=pg.font.SysFont('comicsansms', 60, True),
                 bg_color=BROWN)
    c1.blit()
    c2.blit()
    RETRY_COUNTER += DT
    if RETRY_COUNTER >= 2:
        user.try_again = Message(surface, (560, 420), 'Play Again?', font=pg.font.SysFont('comicsansms', 58, True),
                                 bg_color=GREEN)
        user.try_again.blit()
Пример #3
0
def gg(surface):
    global RETRY_COUNTER
    draw_tint(RED, surface)
    gg1 = Message(surface, (480, 223), ' You Lost All      ', font=pg.font.SysFont('comicsansms', 56, True),
                  bg_color=BROWN)
    gg2 = Message(surface, (480, 300), '      Your Lives...', font=pg.font.SysFont('comicsansms', 56, True),
                  bg_color=BROWN)
    gg1.blit()
    gg2.blit()
    RETRY_COUNTER += DT
    if RETRY_COUNTER >= 2:
        user.try_again = Message(surface, (565, 420), 'Try Again?', font=pg.font.SysFont('comicsansms', 58, True),
                                 bg_color=GREEN)
        user.try_again.blit()
Пример #4
0
def show_user_info(surface, user_info):
    global RED_COINS, RED_COINS_TIME
    # Create Message instances to display user info
    wave = Message(surface, (5, 5), ('WAVE ' + str(user_info.wave) + '/' + str(user_info.waves)),
                   font=pg.font.SysFont('comicsansms', 24, True), bg_color=LIGHT_BLUE)
    lives = Message(surface, (5, 35), ('Lives: ' + str(user_info.lives)), bg_color=LIGHT_BLUE)
    if RED_COINS:
        RED_COINS_TIME += DT
        if RED_COINS_TIME <= 1:
            color = RED
        else:
            color = LIGHT_BLUE
            RED_COINS = False
            RED_COINS_TIME = 0
    else:
        color = LIGHT_BLUE

    coins = Message(surface, (5, 60), ('Coins: ' + str(user_info.coins)), bg_color=color)
    # Blit the info
    wave.blit()
    lives.blit()
    coins.blit()