heheh
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user