Add Health Bar for Placeholder Information
This commit is contained in:
parent
f56aece550
commit
dac2f1f708
BIN
EndlessVendetta/Content/FirstPerson/Blueprints/RedFillUI.uasset
(Stored with Git LFS)
Normal file
BIN
EndlessVendetta/Content/FirstPerson/Blueprints/RedFillUI.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
EndlessVendetta/Content/FirstPerson/Blueprints/WBP_Crosshair.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/FirstPerson/Blueprints/WBP_Crosshair.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
EndlessVendetta/Content/StarterContent/Materials/M_Wood_Pine.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/StarterContent/Materials/M_Wood_Pine.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
EndlessVendetta/Content/StarterContent/Materials/M_Wood_Walnut.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/StarterContent/Materials/M_Wood_Walnut.uasset
(Stored with Git LFS)
Binary file not shown.
@ -198,8 +198,14 @@ float AEndlessVendettaCharacter::TakeDamage(const float DamageAmount, FDamageEve
|
||||
if (CurrentHealth <= 0)
|
||||
{
|
||||
CurrentHealth = 0;
|
||||
if (!GetWorld()->GetTimerManager().IsTimerActive(RegenHealthTimerHandle))
|
||||
{
|
||||
GetWorld()->GetTimerManager().ClearTimer(RegenHealthTimerHandle);
|
||||
}
|
||||
UE_LOG(LogTemp, Warning, TEXT("Player is dead"));
|
||||
UGameplayStatics::OpenLevel(this, FName(*GetWorld()->GetName()), false);
|
||||
|
||||
return Super::TakeDamage(DamageAmount, DamageEvent, EventInstigator, DamageCauser);
|
||||
}
|
||||
if (!GetWorld()->GetTimerManager().IsTimerActive(RegenHealthTimerHandle))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user