summaryrefslogtreecommitdiff
path: root/StatsComponent.cs
diff options
context:
space:
mode:
authoralex <[email protected]>2026-07-24 21:15:53 +0200
committeralex <[email protected]>2026-07-24 21:15:53 +0200
commit6b666c7f25121e61bf1c58ee65cb2cd0f254b887 (patch)
treede012eb81e45de014bf451ab1e8e741ef5abf3c5 /StatsComponent.cs
parent7e0c071a0d86563f9d450bf9073e06006abfa86e (diff)
downloadgodot-testing-6b666c7f25121e61bf1c58ee65cb2cd0f254b887.tar.xz
godot-testing-6b666c7f25121e61bf1c58ee65cb2cd0f254b887.zip
replaced all the sprites added the tilemap and improved the stats system so it can be split into multiple scripts
Diffstat (limited to 'StatsComponent.cs')
-rw-r--r--StatsComponent.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/StatsComponent.cs b/StatsComponent.cs
new file mode 100644
index 0000000..67b21b8
--- /dev/null
+++ b/StatsComponent.cs
@@ -0,0 +1,20 @@
+using Godot;
+
+public partial class StatsComponent : Node
+{
+ // No longer exported here!
+ public EntityStats RuntimeStats { get; private set; }
+
+ // We call this manually from the Player script
+ public void Initialize(EntityStats baseStats)
+ {
+ if (baseStats != null)
+ {
+ RuntimeStats = (EntityStats)baseStats.Duplicate();
+ }
+ else
+ {
+ GD.PrintErr("CRITICAL: StatsComponent received null BaseStats!");
+ }
+ }
+} \ No newline at end of file