Skip to content

Commit

Permalink
Pauline announces when prize is won
Browse files Browse the repository at this point in the history
  • Loading branch information
10yard committed May 11, 2021
1 parent 9354644 commit 98c0ea5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,7 @@ def launch_rom(info):
elif "-record" in launch_command:
flash_message("R E C O R D I N G", x=40, y=120) # Gameplay recording (i.e. Wolfmame)

clear_awarded_coin_status(_g.coins)
reset_all_inputs()
if os.path.exists(launch_directory):
os.chdir(launch_directory)
Expand Down Expand Up @@ -644,6 +645,12 @@ def drop_coin(x=67, y=73, rotate=2, movement=1, use_ladders=True, coin_type=1, a
_g.coins.append((x, y, rotate, movement, use_ladders, coin_type, awarded))


def clear_awarded_coin_status(coins):
_g.coins = []
for coin in coins:
_g.coins.append(coin[:6] + (False,))


def show_timeup_animation(sprite_number, loss=0):
# Show coins during the out of time animation
display_icons(with_background=True)
Expand Down Expand Up @@ -744,6 +751,8 @@ def animate_rolling_coins(out_of_time=False):
for i, coin in enumerate(_g.coins):
co_x, co_y, co_rot, co_dir, co_ladder, co_type, co_awarded = coin
if co_awarded:
write_text(("YOU WON A PRIZE !", "COLLECT THE COINS")[pygame.time.get_ticks() % 3000 > 1500], x=108, y=37,
fg=WHITE, bg=MAGENTA, bubble=True)
_g.awarded = True
_g.screen.blit(get_image(f"artwork/sprite/coin{str(co_type)}{str(int(co_rot % 4))}.png"), (int(co_x), int(co_y)))

Expand Down

0 comments on commit 98c0ea5

Please sign in to comment.