summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authoralex <[email protected]>2026-07-24 23:33:46 +0200
committeralex <[email protected]>2026-07-24 23:33:46 +0200
commit91fd5d80808fd177f97c4cc7e78b704efb5d6ce3 (patch)
treefc0dee06eae293afb5e429fa0956455aee585f01 /scripts
parent6b666c7f25121e61bf1c58ee65cb2cd0f254b887 (diff)
downloadgodot-testing-91fd5d80808fd177f97c4cc7e78b704efb5d6ce3.tar.xz
godot-testing-91fd5d80808fd177f97c4cc7e78b704efb5d6ce3.zip
improved stats resource, weapon now uses dmg from player stats
Diffstat (limited to 'scripts')
-rw-r--r--scripts/interfaces/IDamageable.cs6
-rw-r--r--scripts/interfaces/IDamageable.cs.uid1
-rw-r--r--scripts/resources/EntityStats.cs2
3 files changed, 9 insertions, 0 deletions
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;
+
}