mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-22 15:38:14 +00:00
Merge pull request #355 from KirbyKid256/pulls/timer-style-option
Slower Timer Difficulty Setting
This commit is contained in:
@@ -7,10 +7,17 @@ static var character_icons := [preload("res://Assets/Sprites/Players/Mario/LifeI
|
||||
|
||||
const RANK_COLOURS := {"F": Color.DIM_GRAY, "D": Color.WEB_MAROON, "C": Color.PALE_GREEN, "B": Color.DODGER_BLUE, "A": Color.RED, "S": Color.GOLD, "P": Color.PURPLE}
|
||||
|
||||
var delta_time := 0.0
|
||||
|
||||
func _ready() -> void:
|
||||
Global.level_theme_changed.connect(update_character_info)
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
func _process(delta: float) -> void:
|
||||
if not get_tree().paused and $Timer.paused:
|
||||
delta_time += delta
|
||||
if delta_time >= 1:
|
||||
delta_time -= 1
|
||||
on_timeout()
|
||||
handle_main_hud()
|
||||
handle_pausing()
|
||||
|
||||
@@ -20,7 +27,7 @@ func handle_main_hud() -> void:
|
||||
$Main/RedCoins.hide()
|
||||
$Main/CoinCount.show()
|
||||
%Combo.hide()
|
||||
|
||||
$Timer.paused = Settings.file.difficulty.time_limit == 2
|
||||
$%Time.show()
|
||||
%Stopwatch.hide()
|
||||
%PB.hide()
|
||||
@@ -173,7 +180,7 @@ func activate_pause_menu() -> void:
|
||||
const HURRY_UP = preload("res://Assets/Audio/BGM/HurryUp.mp3")
|
||||
|
||||
func on_timeout() -> void:
|
||||
if Global.can_time_tick and is_instance_valid(Global.current_level) and Settings.file.difficulty.time_limit == 1:
|
||||
if Global.can_time_tick and is_instance_valid(Global.current_level) and Settings.file.difficulty.time_limit > 0:
|
||||
if Global.level_editor != null:
|
||||
if Global.level_editor.current_state != LevelEditor.EditorState.PLAYTESTING:
|
||||
return
|
||||
|
Reference in New Issue
Block a user