Updated Combat to Hide Gold & Health Text

This commit is contained in:
Philip W 2023-03-06 05:25:36 +00:00
parent 0a0c5ed017
commit b16f632537
3 changed files with 8 additions and 2 deletions

Binary file not shown.

View File

@ -99,4 +99,7 @@ public:
float ReactionSpeed = 100.0f;
bool isInStealth = false;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Widgets")
UUserWidget* ImportantStats;
};

View File

@ -53,6 +53,8 @@ void ATurnBaseCombatV2::StartCombat(AActor* Enemy)
HUD->AddToViewport();
EnemyActor = Enemy;
Cast<ATempCharacter>(PlayerActor)->ImportantStats->SetVisibility(ESlateVisibility::Hidden);
ProbertiumResource = 10;
EisResource = 10;
AzosResource = 10;
@ -92,6 +94,7 @@ void ATurnBaseCombatV2::EndCombat()
{
StatusEffect->OnExpiry(PlayerActor);
}
Cast<ATempCharacter>(PlayerActor)->ImportantStats->SetVisibility(ESlateVisibility::Visible);
HUD->RemoveFromParent();
APawn* PlayerPawn = Cast<APawn>(GetWorld()->GetFirstPlayerController()->GetPawn());