From dd91a66238b1df039321c9a11e7c038e50b45c21 Mon Sep 17 00:00:00 2001 From: Logan Date: Wed, 1 Feb 2023 17:44:17 -0700 Subject: Added music scene singleton --- scripts/splashscreen.gd | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'scripts/splashscreen.gd') diff --git a/scripts/splashscreen.gd b/scripts/splashscreen.gd index a78d5f7..01291e9 100644 --- a/scripts/splashscreen.gd +++ b/scripts/splashscreen.gd @@ -1,7 +1,15 @@ extends Node func _ready(): + global_variables.startup = true $AnimationPlayer.play("splashscreen") func _on_AnimationPlayer_animation_finished(_splashscreen): + change_scene() + +func _input(event): + if event.is_action_pressed("escape"): + change_scene() + +func change_scene(): get_tree().change_scene("res://scenes/mainmenu.tscn") -- cgit v1.2.3