Deferredly disable colliders for AI characters (as a precaution)

This commit is contained in:
Raxki 2024-11-01 16:51:17 -04:00
parent 01530d9b3e
commit e84a33c03b

View file

@ -117,7 +117,7 @@ func set_ai_enabled(enabled: bool):
set_ai_process_mode(Node.PROCESS_MODE_INHERIT if enabled else Node.PROCESS_MODE_DISABLED)
func set_melee_box_enabled(enabled: bool):
melee_hitbox_collider.disabled = !enabled
melee_hitbox_collider.set_deferred("disabled", !enabled)
func _on_ai_got_hurt(attack_power: int, attack_direction: Vector2):
attacked_from = attack_direction