Updated Combat to Include Enemy UI
This commit is contained in:
parent
2df31aa719
commit
19fcc0c063
BIN
Content/Blueprints/Combat_UI/Combat_UI.uasset
(Stored with Git LFS)
BIN
Content/Blueprints/Combat_UI/Combat_UI.uasset
(Stored with Git LFS)
Binary file not shown.
@ -38,6 +38,7 @@ void ATurnBaseCombatV2::StartCombat(AActor* Enemy, bool bWasShot)
|
||||
EnemyActor = Enemy;
|
||||
if (bIsInCombat) return;
|
||||
BookHUD->SetVisibility(ESlateVisibility::SelfHitTestInvisible);
|
||||
HUD->AddToViewport(-1);
|
||||
EscapePercentage = CalculateEscapePercentage();
|
||||
EscapePercentageTextBlock->SetText(FText::Join(FText::FromString(""), FText::FromString(FString::FromInt(EscapePercentage * 100)), FText::FromString("%")));
|
||||
bIsInCombat = true;
|
||||
@ -110,6 +111,7 @@ void ATurnBaseCombatV2::CombatCheck(bool bWasShot)
|
||||
void ATurnBaseCombatV2::EndCombat()
|
||||
{
|
||||
BookHUD->SetVisibility(ESlateVisibility::Hidden);
|
||||
HUD->RemoveFromParent();
|
||||
Cast<ATempCharacter>(PlayerActor)->ResetWidgetPointer();
|
||||
TurnIndicatorTextBlock->SetText(FText::FromString(""));
|
||||
bEnemyHasExtraTurn = false;
|
||||
|
@ -52,7 +52,7 @@ public:
|
||||
UPROPERTY(EditDefaultsOnly)
|
||||
UNiagaraSystem* GunEffect;
|
||||
|
||||
UPROPERTY(VisibleAnywhere)
|
||||
UPROPERTY(VisibleAnywhere, BlueprintReadWrite)
|
||||
AActor* PlayerActor;
|
||||
UPROPERTY(VisibleAnywhere, BlueprintReadWrite)
|
||||
AActor* EnemyActor;
|
||||
|
Loading…
Reference in New Issue
Block a user