summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSophia Pearson <codergal89@gmail.com>2022-05-28 00:02:23 +0200
committerSophia Pearson <codergal89@gmail.com>2022-05-28 00:02:23 +0200
commite104e418eba1f2c26d68a48d55937b820265c36e (patch)
tree7bfe601f3d68500db28af18ed3fde4244a2a1508
parent17e64ee8bd296cf003e5e71ff24a929b5974ad5b (diff)
downloadtexty-e104e418eba1f2c26d68a48d55937b820265c36e.tar.xz
texty-e104e418eba1f2c26d68a48d55937b820265c36e.zip
texty: handle start game signal
-rw-r--r--Scenes/Texty.tscn1
-rw-r--r--Scripts/Texty.cs6
2 files changed, 7 insertions, 0 deletions
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;
+ }
}
}