implement marathon start screen

This commit is contained in:
Haze Weathers 2023-12-30 21:02:39 -05:00
parent 048d63a353
commit db0a61e162
7 changed files with 267 additions and 53 deletions

View file

@ -4,11 +4,31 @@ extends Control
export var first_level: PackedScene
onready var difficulty_buttons := [
$"%BeginnerButton",
$"%AdvancedButton",
$"%AdvancedButton",
$"%ProfessionalButton",
]
func _ready() -> void:
yield(get_tree(), "idle_frame")
difficulty_buttons[Game.difficulty].grab_focus()
Fade.fade_in()
func _input(event: InputEvent) -> void:
if Input.is_action_just_pressed("ui_accept"):
Game.lives = Game.marathon_lives
Game.marathon_score = 0
Game.marathon_shards = 0
Game.change_map(first_level)
func _set_difficulty(difficulty: int) -> void:
Game.difficulty = difficulty
func _on_DifficultySelect_focus_entered() -> void:
difficulty_buttons[Game.difficulty].grab_focus()