From e104e418eba1f2c26d68a48d55937b820265c36e Mon Sep 17 00:00:00 2001 From: Sophia Pearson Date: Sat, 28 May 2022 00:02:23 +0200 Subject: texty: handle start game signal --- Scenes/Texty.tscn | 1 + Scripts/Texty.cs | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/Scenes/Texty.tscn b/Scenes/Texty.tscn index ae49f97..d3799a5 100644 --- a/Scenes/Texty.tscn +++ b/Scenes/Texty.tscn @@ -13,3 +13,4 @@ visible = false [node name="StartMenu" parent="." instance=ExtResource( 2 )] [connection signal="QuitGame" from="StartMenu" to="." method="OnQuitGame"] +[connection signal="StartGame" from="StartMenu" to="." method="OnStartGame"] diff --git a/Scripts/Texty.cs b/Scripts/Texty.cs index 0a72c70..0101183 100644 --- a/Scripts/Texty.cs +++ b/Scripts/Texty.cs @@ -18,6 +18,12 @@ namespace Texty.Scripts { GetTree().Notification(MainLoop.NotificationWmQuitRequest); } + + public void OnStartGame() + { + StartMenu.Visible = false; + Game.Visible = true; + } } } -- cgit v1.2.3