feat: implemented enemy wretched attack animation and damage boxes

This commit is contained in:
Sara 2025-07-22 14:40:57 +02:00
parent a0c143d3b5
commit fb9417a1d8
6 changed files with 108 additions and 85 deletions

View file

@ -13,7 +13,7 @@ void DamageBox::attack_motion_begin() {
void DamageBox::attack_motion_end() {
this->already_hit.clear();
set_monitoring(true);
set_monitoring(false);
}
void DamageBox::on_body_entered(Node3D *node) {
@ -34,6 +34,8 @@ void DamageBox::_notification(int what) {
return;
case NOTIFICATION_ENTER_TREE:
connect("body_entered", callable_mp(this, &self_type::on_body_entered));
connect("area_entered", callable_mp(this, &self_type::on_body_entered));
set_monitoring(false);
return;
}
}