new forge entity node to benefit from autoinject
This commit is contained in:
22
tools/ForgeUtils.cs
Normal file
22
tools/ForgeUtils.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System.Collections.Generic;
|
||||
using Gamesmiths.Forge.Attributes;
|
||||
using Gamesmiths.Forge.Godot.Nodes;
|
||||
using Godot;
|
||||
|
||||
namespace Movementtests.tools;
|
||||
|
||||
public static class ForgeUtils
|
||||
{
|
||||
public static List<AttributeSet> CollectAttributeList(Node node)
|
||||
{
|
||||
List<AttributeSet> attributeSetList = [];
|
||||
foreach (var child in node.GetChildren())
|
||||
{
|
||||
if (child is not ForgeAttributeSet attributeSetNode) continue;
|
||||
var attributeSet = attributeSetNode.GetAttributeSet();
|
||||
if (attributeSet is not null)
|
||||
attributeSetList.Add(attributeSet);
|
||||
}
|
||||
return attributeSetList;
|
||||
}
|
||||
}
|
||||
1
tools/ForgeUtils.cs.uid
Normal file
1
tools/ForgeUtils.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://nxk6tvisusva
|
||||
Reference in New Issue
Block a user