summaryrefslogtreecommitdiff
path: root/Scripts/GodotExtensions/NodeExtensions.cs
diff options
context:
space:
mode:
authorSophia Pearson <codergal89@gmail.com>2022-09-07 11:22:35 +0200
committerSophia Pearson <codergal89@gmail.com>2022-09-07 11:22:35 +0200
commitccd374cbedd87528c85d497fa7bef9b0c90815e9 (patch)
treed146de06e0d91a30d37b6d8ccb4d6e5b7dceda03 /Scripts/GodotExtensions/NodeExtensions.cs
parent23a3b14f4d3662f20d7202aeb569b789b520ba57 (diff)
downloadtexty-ccd374cbedd87528c85d497fa7bef9b0c90815e9.tar.xz
texty-ccd374cbedd87528c85d497fa7bef9b0c90815e9.zip
menus: implement main menu and building blocks
Diffstat (limited to 'Scripts/GodotExtensions/NodeExtensions.cs')
-rw-r--r--Scripts/GodotExtensions/NodeExtensions.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/Scripts/GodotExtensions/NodeExtensions.cs b/Scripts/GodotExtensions/NodeExtensions.cs
new file mode 100644
index 0000000..b398985
--- /dev/null
+++ b/Scripts/GodotExtensions/NodeExtensions.cs
@@ -0,0 +1,14 @@
+using System.Linq;
+using Godot;
+using Godot.Collections;
+
+namespace Texty.Scripts.GodotExtensions
+{
+ public static class NodeExtensions
+ {
+ public static Array<T> GetChildren<T>(this Node node)
+ {
+ return new Array<T>(node.GetChildren().OfType<T>());
+ }
+ }
+} \ No newline at end of file