From 2e71f0473184f8fac6d9719cbbb04c34904b8fb5 Mon Sep 17 00:00:00 2001 From: Logan Date: Tue, 21 Jul 2020 15:02:07 -0500 Subject: [PATCH] Fixed bug with phase projectile --- levels/test.tscn | 11 ++++++++++- magic/Projectiles/PhantomProjectile.gd | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/levels/test.tscn b/levels/test.tscn index 544cf4d..ea69223 100644 --- a/levels/test.tscn +++ b/levels/test.tscn @@ -13,4 +13,13 @@ tile_data = PoolIntArray( 65536, 0, 8, 65537, 0, 10, 65538, 0, 10, 65539, 0, 10, position = Vector2( 60, 176 ) [node name="Ogre" parent="." instance=ExtResource( 3 )] -position = Vector2( 345, 153 ) +position = Vector2( 346, 167 ) + +[node name="Ogre2" parent="." instance=ExtResource( 3 )] +position = Vector2( 415, 164 ) + +[node name="Ogre" parent="Ogre2" instance=ExtResource( 3 )] +position = Vector2( 37, -1 ) + +[node name="Ogre2" parent="Ogre2" instance=ExtResource( 3 )] +position = Vector2( 67, -5 ) diff --git a/magic/Projectiles/PhantomProjectile.gd b/magic/Projectiles/PhantomProjectile.gd index 8c5eac1..d3ff145 100644 --- a/magic/Projectiles/PhantomProjectile.gd +++ b/magic/Projectiles/PhantomProjectile.gd @@ -9,5 +9,6 @@ func _ready(): func _on_body_entered(body): if body.get("health") != null: + body.play_hit() body.health -= damage * damage_mod