summaryrefslogtreecommitdiff
path: root/StatsComponent.cs
blob: 67b21b89f2dc6ebd4919b14a86f174c79aab495b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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!");
        }
    }
}