From cc0f0c0dd8281fcf1f7ff048d477fcb39c450307 Mon Sep 17 00:00:00 2001 From: HumanoidSandvichDispenser Date: Tue, 26 Mar 2024 11:59:25 -0700 Subject: [PATCH] fix Player.Stats being null --- Characters/Player.cs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Characters/Player.cs b/Characters/Player.cs index e64e68d..8c987aa 100644 --- a/Characters/Player.cs +++ b/Characters/Player.cs @@ -50,16 +50,12 @@ public sealed partial class Player : Character public override void _Ready() { InteractionRay = GetNode("Direction2D/InteractionRay"); - _effects = GetNode("%Effects"); - _characterEffects = GetNode("%CharacterEffects"); - _targetTracer = GetNode("%TargetTracer"); base._Ready(); - - Stats = base.Stats as PlayerStats; + Stats = GetNode("Stats"); Inventory.UsedItem += (Items.Item item) => { @@ -75,8 +71,6 @@ public sealed partial class Player : Character this.GetEventBus().EmitSignal(signal, args); }; - //GD.Print("Inventory: " + Inventory.Items); - //Inventory.AddItemToHotbar(Inventory.Items[0]); Inventory.SelectedIndex = 0; }