Added NiagaraSystem for Gun Particle Effect
This commit is contained in:
parent
be0766cf0c
commit
07e7f8c70f
BIN
Content/Blueprints/Combat_UI/BP_TurnBaseCombatV2.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Blueprints/Combat_UI/BP_TurnBaseCombatV2.uasset
(Stored with Git LFS)
Normal file
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/NS_GunEffect.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Blueprints/Combat_UI/NS_GunEffect.uasset
(Stored with Git LFS)
Normal file
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.
@ -126,6 +126,14 @@ void ATurnBaseCombatV2::ExecuteCast(FString Combo)
|
||||
return;
|
||||
}
|
||||
|
||||
if (GunEffect)
|
||||
{
|
||||
//Get Static Mesh Location on the player actor
|
||||
const UStaticMeshComponent* GunComponent = Cast<UStaticMeshComponent>(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();
|
||||
|
@ -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)
|
||||
|
@ -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[] { });
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user