netmasked/scripts/start_menu.gd

28 lines
636 B
GDScript

extends Node2D
@export var settings : Control
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
SoundManager.play_music("title")
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func _on_start_button_pressed() -> void:
if !WorldState.done_tuto:
WorldState.done_tuto = true
SceneTransition.change_scene("res://scenes/tutorial.tscn")
else:
SceneTransition.change_scene("res://scenes/stage1.tscn")
func _on_settings_pressed() -> void:
settings.visible = true
func _on_exit_pressed() -> void:
get_tree().quit()