UpdateHealthbar on BindOwner

This commit is contained in:
baz 2024-03-09 03:51:16 +00:00
parent ba0243bd65
commit fdfa37a346
1 changed files with 2 additions and 1 deletions

View File

@ -12,7 +12,8 @@ void UEnemyHealthbarUserWidget::BindOwner(AEnemyCharacter* NewOwner)
if (Owner)
{
auto healthComponent = Owner->GetHealthComponent();
healthComponent->OnDamaged.BindUFunction(this, "UpdateHealthbar");
healthComponent->OnDamaged.BindUFunction(this, "UpdateHealthbar");
UpdateHealthbar();
}
}