Payback 0.0.1
CK Graduation Project
로딩중...
검색중...
일치하는것 없음
AnimNotifyState_AttachedNiagaraEffect.h
이 파일의 문서화 페이지로 가기
1// Fill out your copyright notice in the Description page of Project Settings.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Curves/CurveFloat.h"
7#include "AnimNotifyState_TimedNiagaraEffect.h"
8#include "AnimNotifyState_AttachedNiagaraEffect.generated.h"
9
10class UFXSystemComponent;
11
17UCLASS(Blueprintable, meta = (DisplayName = "Attached Niagara Effect"))
18class CK_UE_API UAnimNotifyState_AttachedNiagaraEffect : public UAnimNotifyState_TimedNiagaraEffect
19{
20 GENERATED_BODY()
21
22public:
23 virtual void NotifyBegin(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, float TotalDuration, const FAnimNotifyEventReference& EventReference) override;
24 virtual void NotifyTick(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, float FrameDeltaTime, const FAnimNotifyEventReference& EventReference) override;
25 virtual void NotifyEnd(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference) override;
26
27private:
28 // 오프셋까지 적용된 소켓의 현재 월드 트랜스폼(동기화 목표 지점)을 반환한다.
29 FTransform GetSlotTransform(const USkeletalMeshComponent* MeshComp) const;
30
31 // 부모가 스폰한 이펙트 컴포넌트의 부착 트랜스폼 상속을 끊고 월드 트랜스폼을 직접 구동할 수 있게 만든다.
32 UFXSystemComponent* DetachEffectTransform(USkeletalMeshComponent* MeshComp);
33
34protected:
35 // 키가 하나도 없으면 1(완전 동기화)로 취급한다.
36 UPROPERTY(EditAnywhere, Category = "NiagaraSync", meta = (DisplayName = "Location Sync Curve", XAxisName = "Notify Progress", YAxisName = "Sync Alpha"))
37 FRuntimeFloatCurve LocationSyncCurve;
38
39 UPROPERTY(EditAnywhere, Category = "NiagaraSync", meta = (DisplayName = "Rotation Sync Curve", XAxisName = "Notify Progress", YAxisName = "Sync Alpha"))
40 FRuntimeFloatCurve RotationSyncCurve;
41
42protected:
43 // 노티파이 오브젝트는 여러 인스턴스가 공유하므로 진행 시간과 누적 트랜스폼을 메시별로 보관한다.
45 {
46 float Duration = 0.0f;
47 float Elapsed = 0.0f;
48 FVector Location = FVector::ZeroVector;
49 FQuat Rotation = FQuat::Identity;
50 };
51
52 TMap<TWeakObjectPtr<USkeletalMeshComponent>, FEffectSyncState> SyncStateMap;
53};
Definition AnimNotifyState_AttachedNiagaraEffect.h:19
TMap< TWeakObjectPtr< USkeletalMeshComponent >, FEffectSyncState > SyncStateMap
Definition AnimNotifyState_AttachedNiagaraEffect.h:52
Definition AnimNotifyState_AttachedNiagaraEffect.h:45