summaryrefslogtreecommitdiff
path: root/Weapon.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Weapon.cs')
-rw-r--r--Weapon.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Weapon.cs b/Weapon.cs
index 6050cc7..194f907 100644
--- a/Weapon.cs
+++ b/Weapon.cs
@@ -17,7 +17,7 @@ public partial class Weapon : Node2D
// 1. The weapon itself looks up to find the player's stats component
// (Assuming the weapon is a child of the Player, GetParent() gets the Player)
- var statsComponent = GetParent().GetNodeOrNull<StatsComponent>("StatsComponent");
+ var statsComponent = GetParent().GetParent().GetNodeOrNull<StatsComponent>("StatsComponent");
float finalDamage = 10.0f; // Fallback default