This commit is contained in:
Twirpytherobot
2026-02-17 22:51:38 +00:00
parent 7629342540
commit 7fa2efabaf
7 changed files with 193 additions and 15 deletions
+20
View File
@@ -263,6 +263,16 @@ func _on_enemy_died(killer_id: int):
if _mesh:
_mesh.visible = false
# Disable collision so players can walk through
var collision_shape = get_node_or_null("CollisionShape3D")
if collision_shape:
collision_shape.disabled = true
# Disable hurtbox
var hurtbox = get_node_or_null("HurtBox")
if hurtbox:
hurtbox.monitorable = false
# Deactivate hitbox
if _hitbox:
_hitbox.deactivate()
@@ -278,6 +288,16 @@ func _on_enemy_respawned():
_mesh.visible = true
_reset_material()
# Re-enable collision
var collision_shape = get_node_or_null("CollisionShape3D")
if collision_shape:
collision_shape.disabled = false
# Re-enable hurtbox
var hurtbox = get_node_or_null("HurtBox")
if hurtbox:
hurtbox.monitorable = true
# Reset state
_attack_timer = 0.0
_is_attacking = false