blob: c36149650bc92e3c12128648cc193e5064ef1dcd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
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>());
}
}
}
|