fix Player.Stats being null

issue-templates
John Montagu, the 4th Earl of Sandvich 2024-03-26 11:59:25 -07:00
parent 87b189f779
commit cc0f0c0dd8
Signed by: sandvich
GPG Key ID: 9A39BE37E602B22D
1 changed files with 1 additions and 7 deletions

View File

@ -50,16 +50,12 @@ public sealed partial class Player : Character
public override void _Ready()
{
InteractionRay = GetNode<InteractionRay>("Direction2D/InteractionRay");
_effects = GetNode<Node2D>("%Effects");
_characterEffects = GetNode<Node2D>("%CharacterEffects");
_targetTracer = GetNode<TargetTracer>("%TargetTracer");
base._Ready();
Stats = base.Stats as PlayerStats;
Stats = GetNode<PlayerStats>("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;
}