From 91fd5d80808fd177f97c4cc7e78b704efb5d6ce3 Mon Sep 17 00:00:00 2001 From: alex Date: Fri, 24 Jul 2026 23:33:46 +0200 Subject: improved stats resource, weapon now uses dmg from player stats --- scripts/interfaces/IDamageable.cs | 6 ++++++ scripts/interfaces/IDamageable.cs.uid | 1 + scripts/resources/EntityStats.cs | 2 ++ 3 files changed, 9 insertions(+) create mode 100644 scripts/interfaces/IDamageable.cs create mode 100644 scripts/interfaces/IDamageable.cs.uid (limited to 'scripts') diff --git a/scripts/interfaces/IDamageable.cs b/scripts/interfaces/IDamageable.cs new file mode 100644 index 0000000..e7d6b99 --- /dev/null +++ b/scripts/interfaces/IDamageable.cs @@ -0,0 +1,6 @@ +namespace testing.interfaces; + +public interface IDamageable +{ + void TakeDamage(float amount); +} \ No newline at end of file diff --git a/scripts/interfaces/IDamageable.cs.uid b/scripts/interfaces/IDamageable.cs.uid new file mode 100644 index 0000000..eb1c706 --- /dev/null +++ b/scripts/interfaces/IDamageable.cs.uid @@ -0,0 +1 @@ +uid://behxnbuaav4s diff --git a/scripts/resources/EntityStats.cs b/scripts/resources/EntityStats.cs index 4eebcaf..b32c252 100644 --- a/scripts/resources/EntityStats.cs +++ b/scripts/resources/EntityStats.cs @@ -5,4 +5,6 @@ public partial class EntityStats : Resource { [Export] public float MaxHealth { get; set; } = 100.0f; [Export] public float MoveSpeed { get; set; } = 300.0f; + [Export] public float Damage { get; set; } = 10.0f; + } -- cgit v1.2.3