-
Notifications
You must be signed in to change notification settings - Fork 0
/
FootStepNotify.h
52 lines (39 loc) · 1.46 KB
/
FootStepNotify.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// Bu Notify sınıfı, animasyon blueprint'inde ayak sesi ve parçacık efekti oluşturmak için kullanılır.
/**
@ Thyke
*/
#pragma once
#include "CoreMinimal.h"
#include "Animation/AnimNotifies/AnimNotify.h"
#include "NiagaraFunctionLibrary.h"
#include "NiagaraComponent.h"
#include "EternityGameInstance.h"
#include "FootStepNotify.generated.h"
USTRUCT(BlueprintType)
struct FSurfaceData
{
GENERATED_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Surface Data")
TEnumAsByte<EPhysicalSurface> SurfaceType;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Surface Data")
USoundBase* SoundCue;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Surface Data")
UNiagaraSystem* NiagaraSystem;
};
UCLASS()
class ETERNITY_API UFootStepNotify : public UAnimNotify
{
GENERATED_BODY()
public:
UFootStepNotify();
virtual void Notify(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation) override;
protected:
UFUNCTION(BlueprintCallable)
void PlaySoundAndSpawnParticles(USkeletalMeshComponent* MeshComp, USoundBase* SoundCue, UNiagaraSystem* NiagaraSystem, FVector Location);
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Surface Data")
TArray<FSurfaceData> SurfaceDataTable;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Footstep Settings")
FName FootSocketName;
UFUNCTION()
void LineTraceFootstepSoundAndParticles(USkeletalMeshComponent* MeshComp);
};