From 6b666c7f25121e61bf1c58ee65cb2cd0f254b887 Mon Sep 17 00:00:00 2001 From: alex Date: Fri, 24 Jul 2026 21:15:53 +0200 Subject: replaced all the sprites added the tilemap and improved the stats system so it can be split into multiple scripts --- StatsComponent.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 StatsComponent.cs (limited to 'StatsComponent.cs') 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 -- cgit v1.2.3