22 lines
655 B
C#
22 lines
655 B
C#
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;
|
|
}
|
|
} |