Hi!
I have a question on how we deal damage; in the " ToonTanks " lecture the way we managed dealing damage was through “Multi-cast Delegate” and we needed to write the correct function ourselves
UGameplayStatics::ApplyDamage(OtherActor, Damage, OwnerInstigator, this, UDamageType::StaticClass());
and
GetOwner()->OnTakeAnyDamage.AddDynamic(this, &UHealthComponent::TakeDamage);
whereas in the following lecture "Simple Shooter " we directly used the “Damage Event structure”
FPointDamageEvent DamageEvent(DamageAmount, L_HitResult, ShotDirection, UDamageType::StaticClass());
HitActor->TakeDamage(DamageAmount, DamageEvent, OwnerController, this);
I didn’t quite get the difference between these two, an explanation would be most helpful.
I appreciate any help you can provide.
Also, apologize for my bad English because English is not my native language.