summaryrefslogtreecommitdiff
path: root/StatsComponent.cs
diff options
context:
space:
mode:
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