New transition screen + no lives in modern hud for challenge mode

This commit is contained in:
kittenchilly
2025-10-09 16:20:34 -05:00
parent e771443a4c
commit 897625c19d
3 changed files with 124 additions and 2 deletions

View File

@@ -42,6 +42,8 @@ func handle_main_hud() -> void:
update_character_info()
%CharacterIcon.get_node("Shadow").texture = %CharacterIcon.texture
%ModernLifeCount.text = "*" + (str(Global.lives).pad_zeros(2) if Settings.file.difficulty.inf_lives == 0 else "")
%CharacterIcon.visible = Global.current_game_mode != Global.GameMode.BOO_RACE
%ModernLifeCount.visible = Global.current_game_mode != Global.GameMode.BOO_RACE
var world_num := str(Global.world_num)
if int(world_num) >= 10:
world_num = ["A", "B", "C", "D"][int(world_num) % 10]
@@ -95,6 +97,8 @@ func handle_challenge_mode_hud() -> void:
$ModernHUD/TopLeft/RedCoins.show()
$ModernHUD/TopLeft/CoinCount.hide()
$Main/CoinCount.hide()
%ModernLifeCount.hide()
%CharacterIcon.hide()
var red_coins_collected = ChallengeModeHandler.current_run_red_coins_collected
var idx := 0
if Global.world_num > 8:

View File

@@ -84,7 +84,9 @@ func _ready() -> void:
elif Global.lives < 100:
$BG/Control/LivesCount.text = "* " + (str(Global.lives).lpad(2, " "))
else:
$BG/Control/LivesCount.text = "* ♕"
$BG/Control/LivesCount.text = "* ♕"
if Global.current_game_mode == Global.GameMode.CHALLENGE:
handle_challenge_mode_transition()
if Global.current_game_mode == Global.GameMode.CUSTOM_LEVEL:
$BG/Control/World.hide()
$BG/Control/WorldNum.hide()
@@ -92,9 +94,29 @@ func _ready() -> void:
%CustomLevelName.show()
%CustomLevelAuthor.text = "By " + LevelEditor.level_author
%CustomLevelName.text = LevelEditor.level_name
await get_tree().create_timer(0.1, false).timeout
can_transition = true
func handle_challenge_mode_transition() -> void:
$BG/Control/LivesCount.hide()
$BG/Control/Sprite.hide()
%ChallengeScore.show()
%ChallengeScoreText.show()
%ChallengeScoreText/Target.show()
%ChallengeCoins2.show()
%ChallengeCoins.show()
%ChallengeScoreText.text = str(Global.score)
var idx = 0
for i in %ChallengeCoins.get_children():
if ChallengeModeHandler.is_coin_collected(idx, ChallengeModeHandler.red_coins_collected[Global.world_num - 1][Global.level_num - 1]):
i.frame = 1
else:
i.frame = 0
idx += 1
%ChallengeScoreText/Target.text = "/ " + str(ChallengeModeHandler.CHALLENGE_TARGETS[Global.current_campaign][Global.world_num - 1][Global.level_num - 1])
func transition() -> void:
Global.can_time_tick = true
if PIPE_CUTSCENE_LEVELS[Global.current_campaign].has([Global.world_num, Global.level_num]) and not PipeCutscene.seen_cutscene and Global.current_game_mode != Global.GameMode.MARATHON_PRACTICE and Global.current_game_mode !=Global.GameMode.BOO_RACE: