Update Character for Damage Vignette

This commit is contained in:
Philip W 2024-02-29 11:57:53 +00:00
parent 72251b6f0d
commit 07671f3c2a
4 changed files with 11 additions and 2 deletions

BIN
EndlessVendetta/Content/Vignette/DamageVig.uasset (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -324,6 +324,7 @@ float AEndlessVendettaCharacter::TakeDamage(const float DamageAmount, FDamageEve
UGameplayStatics::OpenLevel(this, FName(*GetWorld()->GetName()), false);
return Super::TakeDamage(DamageAmount, DamageEvent, EventInstigator, DamageCauser);
}
TookDamage.Broadcast();
GetWorld()->GetTimerManager().ClearTimer(RegenHealthTimerHandle);
GetWorld()->GetTimerManager().SetTimer(RegenHealthTimerHandle, this, &AEndlessVendettaCharacter::RegenHealth, 5.0f, true);

View File

@ -275,6 +275,11 @@ public:
UFUNCTION(BlueprintCallable, Category = "Damage Control")
virtual float TakeDamage(float DamageAmount, FDamageEvent const& DamageEvent, AController* EventInstigator, AActor* DamageCauser) override;
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FTookDamage);
UPROPERTY(BlueprintAssignable, Category = "Damage Control")
FTookDamage TookDamage;
void WeaponPickUpSystem();
void EquipPrimary();