setup damage types and modifiers as resources
This commit is contained in:
@@ -5,5 +5,5 @@ namespace Movementtests.interfaces;
|
||||
public interface IDamageMaker
|
||||
{
|
||||
[Export]
|
||||
public RDamage GetDamageDealt { get; set; }
|
||||
RDamage GetDamageDealt { get; set; }
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
using Godot;
|
||||
|
||||
namespace Movementtests.interfaces;
|
||||
|
||||
public interface IDamageable
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
1
interfaces/NodeExtensions.cs.uid
Normal file
1
interfaces/NodeExtensions.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bgnncty7axdwd
|
||||
Reference in New Issue
Block a user