setup damage types and modifiers as resources
This commit is contained in:
12
interfaces/NodeExtensions.cs
Normal file
12
interfaces/NodeExtensions.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using Godot;
|
||||
using System.Linq;
|
||||
|
||||
namespace Movementtests.interfaces;
|
||||
|
||||
public static class NodeExtensions
|
||||
{
|
||||
public static IDamageable[] ToIDamageables(this GodotObject[] nodes)
|
||||
{
|
||||
return nodes == null ? System.Array.Empty<IDamageable>() : nodes.OfType<IDamageable>().ToArray();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user