Bugfix Movement Enabled During Combat in TBCv2
This commit is contained in:
parent
6a041e4621
commit
22c13a8c25
BIN
Content/BlueprintAI/AI/BTT_ChaseBruh.uasset
(Stored with Git LFS)
BIN
Content/BlueprintAI/AI/BTT_ChaseBruh.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Blueprints/Combat_UI/CombatCharacter.uasset
(Stored with Git LFS)
BIN
Content/Blueprints/Combat_UI/CombatCharacter.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Blueprints/Combat_UI/CombatCharacterRT.uasset
(Stored with Git LFS)
BIN
Content/Blueprints/Combat_UI/CombatCharacterRT.uasset
(Stored with Git LFS)
Binary file not shown.
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.
BIN
Content/Merchant/BP_MerchantGameMode.uasset
(Stored with Git LFS)
BIN
Content/Merchant/BP_MerchantGameMode.uasset
(Stored with Git LFS)
Binary file not shown.
@ -38,6 +38,9 @@ void ATurnBaseCombatV2::EndCombat()
|
|||||||
{
|
{
|
||||||
//Remove the HUD from the viewport
|
//Remove the HUD from the viewport
|
||||||
HUD->RemoveFromViewport();
|
HUD->RemoveFromViewport();
|
||||||
|
APawn* PlayerPawn = Cast<APawn>(GetWorld()->GetFirstPlayerController()->GetPawn());
|
||||||
|
PlayerPawn->bUseControllerRotationYaw = true;
|
||||||
|
PlayerPawn->bUseControllerRotationPitch = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ATurnBaseCombatV2::BeginPlay()
|
void ATurnBaseCombatV2::BeginPlay()
|
||||||
@ -45,7 +48,12 @@ void ATurnBaseCombatV2::BeginPlay()
|
|||||||
Super::BeginPlay();
|
Super::BeginPlay();
|
||||||
|
|
||||||
TArray<AActor*> AllCharacterActorsInScene;
|
TArray<AActor*> AllCharacterActorsInScene;
|
||||||
UGameplayStatics::GetAllActorsOfClassWithTag(GetWorld(), AActor::StaticClass(), FName("Character"), AllCharacterActorsInScene);
|
|
||||||
|
UGameplayStatics::GetAllActorsOfClassWithTag(GetWorld(), AActor::StaticClass(), FName("Player"), AllCharacterActorsInScene);
|
||||||
|
for (AActor* Actor : AllCharacterActorsInScene)
|
||||||
|
{
|
||||||
|
PlayerActor = Cast<AActor>(Actor);
|
||||||
|
}
|
||||||
|
|
||||||
HUD = CreateWidget<UUserWidget>(GetWorld(), HUDWidget);
|
HUD = CreateWidget<UUserWidget>(GetWorld(), HUDWidget);
|
||||||
|
|
||||||
|
@ -30,11 +30,13 @@ public:
|
|||||||
UPROPERTY(EditDefaultsOnly)
|
UPROPERTY(EditDefaultsOnly)
|
||||||
int SulfurResource = 10; // W
|
int SulfurResource = 10; // W
|
||||||
|
|
||||||
// AActor* PlayerActor;
|
UPROPERTY(VisibleAnywhere)
|
||||||
|
AActor* PlayerActor;
|
||||||
UPROPERTY(VisibleAnywhere)
|
UPROPERTY(VisibleAnywhere)
|
||||||
AActor* EnemyActor;
|
AActor* EnemyActor;
|
||||||
// AActor* ActiveActor;
|
// AActor* ActiveActor;
|
||||||
|
UPROPERTY(BlueprintReadWrite)
|
||||||
|
UUserWidget* HUD;
|
||||||
/*
|
/*
|
||||||
TODO:
|
TODO:
|
||||||
Reference Player Inventory
|
Reference Player Inventory
|
||||||
@ -71,9 +73,6 @@ protected:
|
|||||||
private:
|
private:
|
||||||
bool IsValidCombo(FString Combo) const;
|
bool IsValidCombo(FString Combo) const;
|
||||||
|
|
||||||
UPROPERTY()
|
|
||||||
UUserWidget* HUD;
|
|
||||||
|
|
||||||
UPROPERTY(VisibleAnywhere)
|
UPROPERTY(VisibleAnywhere)
|
||||||
bool bIsPlayerTurn = true;
|
bool bIsPlayerTurn = true;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user