diff options
| author | Sophia Pearson <codergal89@gmail.com> | 2022-09-07 11:22:35 +0200 |
|---|---|---|
| committer | Sophia Pearson <codergal89@gmail.com> | 2022-09-07 11:22:35 +0200 |
| commit | ccd374cbedd87528c85d497fa7bef9b0c90815e9 (patch) | |
| tree | d146de06e0d91a30d37b6d8ccb4d6e5b7dceda03 /Scripts/GodotExtensions/ArrayExtensions.cs | |
| parent | 23a3b14f4d3662f20d7202aeb569b789b520ba57 (diff) | |
| download | texty-ccd374cbedd87528c85d497fa7bef9b0c90815e9.tar.xz texty-ccd374cbedd87528c85d497fa7bef9b0c90815e9.zip | |
menus: implement main menu and building blocks
Diffstat (limited to 'Scripts/GodotExtensions/ArrayExtensions.cs')
| -rw-r--r-- | Scripts/GodotExtensions/ArrayExtensions.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Scripts/GodotExtensions/ArrayExtensions.cs b/Scripts/GodotExtensions/ArrayExtensions.cs new file mode 100644 index 0000000..aa3a9c4 --- /dev/null +++ b/Scripts/GodotExtensions/ArrayExtensions.cs @@ -0,0 +1,13 @@ +using System; +using Godot.Collections; + +namespace Texty.Scripts.GodotExtensions +{ + public static class ArrayExtensions + { + public static void ForEach<T>(this Array<T> array, Action<T> action) + { + foreach (var element in array) action.Invoke(element); + } + } +}
\ No newline at end of file |
