From b16f632537c0f37575dd81177eff6d55eb0aef75 Mon Sep 17 00:00:00 2001 From: PHILIP White Date: Mon, 6 Mar 2023 05:25:36 +0000 Subject: [PATCH] Updated Combat to Hide Gold & Health Text --- Content/Blueprints/Player/BP_MyTempCharacter.uasset | 4 ++-- Source/the_twilight_abyss/PlayerTemp/TempCharacter.h | 3 +++ .../the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Content/Blueprints/Player/BP_MyTempCharacter.uasset b/Content/Blueprints/Player/BP_MyTempCharacter.uasset index 450ac00..9abfef9 100644 --- a/Content/Blueprints/Player/BP_MyTempCharacter.uasset +++ b/Content/Blueprints/Player/BP_MyTempCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a4556a6513b22a1171ff6da3cafd1c299282ca69777c492a5e263986a2f6fa89 -size 67253 +oid sha256:2b8a423de163cd30386d8cecc8e73e6b05c03841f93bd7048d0b52f5339bbfb6 +size 70385 diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h index f56a83c..b27002d 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h @@ -99,4 +99,7 @@ public: float ReactionSpeed = 100.0f; bool isInStealth = false; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Widgets") + UUserWidget* ImportantStats; }; diff --git a/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp b/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp index dcc2547..d2b3fda 100644 --- a/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp +++ b/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp @@ -53,6 +53,8 @@ void ATurnBaseCombatV2::StartCombat(AActor* Enemy) HUD->AddToViewport(); EnemyActor = Enemy; + Cast(PlayerActor)->ImportantStats->SetVisibility(ESlateVisibility::Hidden); + ProbertiumResource = 10; EisResource = 10; AzosResource = 10; @@ -92,6 +94,7 @@ void ATurnBaseCombatV2::EndCombat() { StatusEffect->OnExpiry(PlayerActor); } + Cast(PlayerActor)->ImportantStats->SetVisibility(ESlateVisibility::Visible); HUD->RemoveFromParent(); APawn* PlayerPawn = Cast(GetWorld()->GetFirstPlayerController()->GetPawn());