diff --git a/Content/BlueprintAI/AI/BTT_ChaseBruh.uasset b/Content/BlueprintAI/AI/BTT_ChaseBruh.uasset index 5be2e6f..cacd89d 100644 --- a/Content/BlueprintAI/AI/BTT_ChaseBruh.uasset +++ b/Content/BlueprintAI/AI/BTT_ChaseBruh.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7a0e737908180c4749ef74a974ae3f2f2523cc31e70f32c22bddb9c57a84ca3f -size 39811 +oid sha256:da96ad8696b48b09139d79173aea8aea87bfb325c8f817e7ccf413d95f3f034f +size 39894 diff --git a/Content/Blueprints/Combat_UI/CombatCharacter.uasset b/Content/Blueprints/Combat_UI/CombatCharacter.uasset index c209ea0..847cd87 100644 --- a/Content/Blueprints/Combat_UI/CombatCharacter.uasset +++ b/Content/Blueprints/Combat_UI/CombatCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:26a01706eb411e9b04327c69c59a200a5c9d09c314ae69403543165fe67c731f -size 61987 +oid sha256:2d135211e30df2a5bf8e733f7579a67760ccd58c509cf62de841de69499250e5 +size 81312 diff --git a/Content/Blueprints/Combat_UI/CombatCharacterRT.uasset b/Content/Blueprints/Combat_UI/CombatCharacterRT.uasset index bd0eb2e..18ed00b 100644 --- a/Content/Blueprints/Combat_UI/CombatCharacterRT.uasset +++ b/Content/Blueprints/Combat_UI/CombatCharacterRT.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d4a26d2d9ff8145e416491010946f85fa4cdc6ca032b23d708863e252af4b1e0 -size 81418 +oid sha256:eb9e9774ca5001eacae0a2919ae15d6f4feffb15b01b76c4dd2dd413a74f104c +size 81249 diff --git a/Content/Blueprints/Combat_UI/Combat_UI.uasset b/Content/Blueprints/Combat_UI/Combat_UI.uasset index aae01ca..b98df6e 100644 --- a/Content/Blueprints/Combat_UI/Combat_UI.uasset +++ b/Content/Blueprints/Combat_UI/Combat_UI.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:545b239dc38454f274d0f4ff5310ec6655a045999eb17764ed0e9bf31e17fa42 +oid sha256:08b5f888ae7390e84c48c0f1a7052afafbc7307b430b2dd31a573786019be399 size 56768 diff --git a/Content/Merchant/BP_MerchantGameMode.uasset b/Content/Merchant/BP_MerchantGameMode.uasset index e1d0213..9f43ae4 100644 --- a/Content/Merchant/BP_MerchantGameMode.uasset +++ b/Content/Merchant/BP_MerchantGameMode.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c4bc0366b144515b186c0d62af42c54fe6752d83279c6f9f0d1780ba148f2e8d -size 36400 +oid sha256:9157759da20ddd86c680d971dba72a37891d77b5600d5d5002af726931f60af1 +size 36641 diff --git a/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp b/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp index 9c469f6..dc87f2c 100644 --- a/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp +++ b/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp @@ -38,6 +38,9 @@ void ATurnBaseCombatV2::EndCombat() { //Remove the HUD from the viewport HUD->RemoveFromViewport(); + APawn* PlayerPawn = Cast(GetWorld()->GetFirstPlayerController()->GetPawn()); + PlayerPawn->bUseControllerRotationYaw = true; + PlayerPawn->bUseControllerRotationPitch = true; } void ATurnBaseCombatV2::BeginPlay() @@ -45,7 +48,12 @@ void ATurnBaseCombatV2::BeginPlay() Super::BeginPlay(); TArray AllCharacterActorsInScene; - UGameplayStatics::GetAllActorsOfClassWithTag(GetWorld(), AActor::StaticClass(), FName("Character"), AllCharacterActorsInScene); + + UGameplayStatics::GetAllActorsOfClassWithTag(GetWorld(), AActor::StaticClass(), FName("Player"), AllCharacterActorsInScene); + for (AActor* Actor : AllCharacterActorsInScene) + { + PlayerActor = Cast(Actor); + } HUD = CreateWidget(GetWorld(), HUDWidget); diff --git a/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.h b/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.h index dbdc8c1..2ea2d96 100644 --- a/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.h +++ b/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.h @@ -30,11 +30,13 @@ public: UPROPERTY(EditDefaultsOnly) int SulfurResource = 10; // W - // AActor* PlayerActor; + UPROPERTY(VisibleAnywhere) + AActor* PlayerActor; UPROPERTY(VisibleAnywhere) AActor* EnemyActor; // AActor* ActiveActor; - + UPROPERTY(BlueprintReadWrite) + UUserWidget* HUD; /* TODO: Reference Player Inventory @@ -71,9 +73,6 @@ protected: private: bool IsValidCombo(FString Combo) const; - UPROPERTY() - UUserWidget* HUD; - UPROPERTY(VisibleAnywhere) bool bIsPlayerTurn = true;