diff --git a/Content/Blueprints/Combat_UI/BP_TurnBaseCombatV2.uasset b/Content/Blueprints/Combat_UI/BP_TurnBaseCombatV2.uasset new file mode 100644 index 0000000..fc8c04d --- /dev/null +++ b/Content/Blueprints/Combat_UI/BP_TurnBaseCombatV2.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:24c95fe7e7607ae47a17cd32db55c6169323a9bae5fc7cd908e27a75b4ad1a4d +size 19741 diff --git a/Content/Blueprints/Combat_UI/CombatCharacter.uasset b/Content/Blueprints/Combat_UI/CombatCharacter.uasset index 66ed08e..65fa458 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:49367510cb75e6da1b10a2d0cbb9d6d1fb5a47a181b56681d029298e779bd7d6 -size 63861 +oid sha256:cae70d5a0c8ce3e94a52fdbbab8194adaf2b154fdc89c6107922ea1b61d0574a +size 63940 diff --git a/Content/Blueprints/Combat_UI/NS_GunEffect.uasset b/Content/Blueprints/Combat_UI/NS_GunEffect.uasset new file mode 100644 index 0000000..e292ef2 --- /dev/null +++ b/Content/Blueprints/Combat_UI/NS_GunEffect.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c9fc38d027997c9ba3242176a5af9b5a3f46ebf3337ec4802cbca2cb065a12d9 +size 1195419 diff --git a/Content/Merchant/BP_MerchantGameMode.uasset b/Content/Merchant/BP_MerchantGameMode.uasset index 9f43ae4..283c991 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:9157759da20ddd86c680d971dba72a37891d77b5600d5d5002af726931f60af1 -size 36641 +oid sha256:d940b475e6be75f5270d92b3b8a3d1d6ba48035329560f1b2bbb2a02b9e711e2 +size 36670 diff --git a/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp b/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp index aa2a25c..12fd087 100644 --- a/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp +++ b/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp @@ -126,6 +126,14 @@ void ATurnBaseCombatV2::ExecuteCast(FString Combo) return; } + if (GunEffect) + { + //Get Static Mesh Location on the player actor + const UStaticMeshComponent* GunComponent = Cast(PlayerActor->GetComponentsByTag(UPrimitiveComponent::StaticClass(), FName("Gun"))[0]); + const FVector GunLocationOffset = GunComponent->GetSocketTransform("Muzzle").TransformPosition(FVector(-100, 0, 0)); + UNiagaraFunctionLibrary::SpawnSystemAtLocation(GetWorld(), GunEffect, GunLocationOffset, PlayerActor->GetActorRotation()); + } + CurrentComboString = ""; UpdateComboString(CurrentComboString); RevertActionPoints(); diff --git a/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.h b/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.h index ad63f52..9260d84 100644 --- a/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.h +++ b/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.h @@ -6,9 +6,13 @@ #include "Components/Button.h" #include "Components/ProgressBar.h" #include "Components/TextBlock.h" +#include "NiagaraComponent.h" +#include "NiagaraFunctionLibrary.h" #include "GameFramework/GameStateBase.h" #include "TurnBaseCombatV2.generated.h" +class UNiagaraSystem; + UCLASS() class THE_TWILIGHT_ABYSS_API ATurnBaseCombatV2 : public AGameStateBase { @@ -30,6 +34,9 @@ public: UPROPERTY(EditDefaultsOnly) int SulfurResource = 10; // W + UPROPERTY(EditDefaultsOnly) + UNiagaraSystem* GunEffect; + UPROPERTY(VisibleAnywhere) AActor* PlayerActor; UPROPERTY(VisibleAnywhere) diff --git a/Source/the_twilight_abyss/the_twilight_abyss.Build.cs b/Source/the_twilight_abyss/the_twilight_abyss.Build.cs index b6dac8e..4656471 100644 --- a/Source/the_twilight_abyss/the_twilight_abyss.Build.cs +++ b/Source/the_twilight_abyss/the_twilight_abyss.Build.cs @@ -8,7 +8,7 @@ public class the_twilight_abyss : ModuleRules { PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; - PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "UMG" }); + PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "UMG", "Niagara" }); PrivateDependencyModuleNames.AddRange(new string[] { });