blob: 0acc012f31b26080c809fe30f4e38cfd493649cf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
using System.Linq;
using Godot;
using Godot.Collections;
namespace Texty.Scripts.GodotExtensions;
public static class NodeExtensions
{
public static Array<T> GetChildren<[MustBeVariant] T>(this Node node)
{
return new Array<T>(node.GetChildren().OfType<T>());
}
}
|