feat: implemented enemy wretched attack animation and damage boxes
This commit is contained in:
parent
a0c143d3b5
commit
fb9417a1d8
6 changed files with 108 additions and 85 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue