fix Player.Stats being null
parent
87b189f779
commit
cc0f0c0dd8
|
@ -50,16 +50,12 @@ public sealed partial class Player : Character
|
||||||
public override void _Ready()
|
public override void _Ready()
|
||||||
{
|
{
|
||||||
InteractionRay = GetNode<InteractionRay>("Direction2D/InteractionRay");
|
InteractionRay = GetNode<InteractionRay>("Direction2D/InteractionRay");
|
||||||
|
|
||||||
_effects = GetNode<Node2D>("%Effects");
|
_effects = GetNode<Node2D>("%Effects");
|
||||||
|
|
||||||
_characterEffects = GetNode<Node2D>("%CharacterEffects");
|
_characterEffects = GetNode<Node2D>("%CharacterEffects");
|
||||||
|
|
||||||
_targetTracer = GetNode<TargetTracer>("%TargetTracer");
|
_targetTracer = GetNode<TargetTracer>("%TargetTracer");
|
||||||
|
|
||||||
base._Ready();
|
base._Ready();
|
||||||
|
Stats = GetNode<PlayerStats>("Stats");
|
||||||
Stats = base.Stats as PlayerStats;
|
|
||||||
|
|
||||||
Inventory.UsedItem += (Items.Item item) =>
|
Inventory.UsedItem += (Items.Item item) =>
|
||||||
{
|
{
|
||||||
|
@ -75,8 +71,6 @@ public sealed partial class Player : Character
|
||||||
this.GetEventBus().EmitSignal(signal, args);
|
this.GetEventBus().EmitSignal(signal, args);
|
||||||
};
|
};
|
||||||
|
|
||||||
//GD.Print("Inventory: " + Inventory.Items);
|
|
||||||
//Inventory.AddItemToHotbar(Inventory.Items[0]);
|
|
||||||
Inventory.SelectedIndex = 0;
|
Inventory.SelectedIndex = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue