Bugfix Combat Initialisation Calculation Failure on Tutorial
This commit is contained in:
parent
69dd199ad3
commit
99f88bb31c
BIN
Content/Blueprints/Combat_UI/CombatTutorial.uasset
(Stored with Git LFS)
BIN
Content/Blueprints/Combat_UI/CombatTutorial.uasset
(Stored with Git LFS)
Binary file not shown.
@ -8,7 +8,6 @@
|
|||||||
#include "BehaviorTree/BlackboardComponent.h"
|
#include "BehaviorTree/BlackboardComponent.h"
|
||||||
#include "Blueprint/UserWidget.h"
|
#include "Blueprint/UserWidget.h"
|
||||||
#include "Camera/CameraComponent.h"
|
#include "Camera/CameraComponent.h"
|
||||||
#include "Kismet/GameplayStatics.h"
|
|
||||||
#include "Misc/OutputDeviceNull.h"
|
#include "Misc/OutputDeviceNull.h"
|
||||||
|
|
||||||
|
|
||||||
@ -61,11 +60,6 @@ void UHoldToInitCombat::TickComponent(float DeltaTime, ELevelTick TickType, FAct
|
|||||||
{
|
{
|
||||||
CombatSystem->RedVignetteMaterialInstance->SetScalarParameterValue(FName("BlendWeight"), RedVignetteIntensity - DeltaTime * 2.0f);
|
CombatSystem->RedVignetteMaterialInstance->SetScalarParameterValue(FName("BlendWeight"), RedVignetteIntensity - DeltaTime * 2.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bClickDown && TargetEnemy != nullptr)
|
|
||||||
{
|
|
||||||
Cast<ATurnBaseCombatV2>(GetWorld()->GetGameState())->StartCombat(TargetEnemy);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UHoldToInitCombat::OnClickDown()
|
void UHoldToInitCombat::OnClickDown()
|
||||||
|
@ -72,6 +72,9 @@ void ATurnBaseCombatV2::StartCombat(AActor* Enemy, bool bWasShot)
|
|||||||
{
|
{
|
||||||
DisableButtons();
|
DisableButtons();
|
||||||
CombatTutorialWidgetInstance->AddToViewport();
|
CombatTutorialWidgetInstance->AddToViewport();
|
||||||
|
FProperty* Property = FindFieldChecked<FProperty>(CombatTutorialWidgetInstance->GetClass(), "WasShot");
|
||||||
|
const FBoolProperty* WasShotProperty = CastFieldChecked<FBoolProperty>(Property);
|
||||||
|
WasShotProperty->SetPropertyValue_InContainer(CombatTutorialWidgetInstance, bWasShot);
|
||||||
HasSeenTutorial = true;
|
HasSeenTutorial = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -7,12 +7,10 @@
|
|||||||
#include "Components/ProgressBar.h"
|
#include "Components/ProgressBar.h"
|
||||||
#include "Components/TextBlock.h"
|
#include "Components/TextBlock.h"
|
||||||
#include "StatusEffect.h"
|
#include "StatusEffect.h"
|
||||||
#include "NiagaraComponent.h"
|
|
||||||
#include "NiagaraFunctionLibrary.h"
|
#include "NiagaraFunctionLibrary.h"
|
||||||
#include "GameFramework/GameStateBase.h"
|
#include "GameFramework/GameStateBase.h"
|
||||||
#include "Components/WidgetComponent.h"
|
#include "Components/WidgetComponent.h"
|
||||||
#include "Engine/PostProcessVolume.h"
|
#include "Engine/PostProcessVolume.h"
|
||||||
#include "StatusEffects/Thorns.h"
|
|
||||||
#include "TurnBaseCombatV2.generated.h"
|
#include "TurnBaseCombatV2.generated.h"
|
||||||
|
|
||||||
class UNiagaraSystem;
|
class UNiagaraSystem;
|
||||||
|
Loading…
Reference in New Issue
Block a user