Update SJKScripts
This commit is contained in:
@@ -3,7 +3,7 @@ namespace GodotHelpers;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Godot;
|
||||
|
||||
using SJK.Functional;
|
||||
|
||||
public static class MyNodeExtensions
|
||||
{
|
||||
@@ -41,6 +41,7 @@ public static class MyNodeExtensions
|
||||
var result = self.GetNodeAndResource(path);
|
||||
return ((Node)(GodotObject)result[0], (Resource)(GodotObject)result[1], (NodePath)result[2]);
|
||||
}
|
||||
|
||||
public static void QueueFreeChildren(this Node node) => node.GetChildren().ToList().ForEach(item => item.QueueFree());
|
||||
public static void QueueFreeChildren(this Node node, Func<Node, bool> predicate) => node.GetChildren().Where(predicate).ToList().ForEach(item => item.QueueFree());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user