Payback 0.0.1
CK Graduation Project
로딩중...
검색중...
일치하는것 없음
UAnimNotifyState_RotateToTarget 클래스 참조

#include <AnimNotifyState_RotateToTarget.h>

UAnimNotifyState_RotateToTarget에 대한 상속 다이어그램 :
Inheritance graph
UAnimNotifyState_RotateToTarget에 대한 협력 다이어그램:
Collaboration graph

Public 멤버 함수

virtual void NotifyBegin (USkeletalMeshComponent *MeshComp, UAnimSequenceBase *Animation, float TotalDuration, const FAnimNotifyEventReference &EventReference) override
 
virtual void NotifyTick (USkeletalMeshComponent *MeshComp, UAnimSequenceBase *Animation, float FrameDeltaTime, const FAnimNotifyEventReference &EventReference) override
 
virtual void NotifyEnd (USkeletalMeshComponent *MeshComp, UAnimSequenceBase *Animation, const FAnimNotifyEventReference &EventReference) override
 
virtual FString GetNotifyName_Implementation () const override
 

Protected 속성

float TurnSpeed = 10.0f
 
float Tolerance = 5.0f
 

Private 멤버 함수

AActor * ResolveRotationTarget (AActor *OwnerActor, UWorld *World) const
 

멤버 함수 문서화

◆ GetNotifyName_Implementation()

FString UAnimNotifyState_RotateToTarget::GetNotifyName_Implementation ( ) const
overridevirtual
108{
109 return TEXT("Rotate To Target");
110}

◆ NotifyBegin()

void UAnimNotifyState_RotateToTarget::NotifyBegin ( USkeletalMeshComponent *  MeshComp,
UAnimSequenceBase *  Animation,
float  TotalDuration,
const FAnimNotifyEventReference &  EventReference 
)
overridevirtual
15{
16 Super::NotifyBegin(MeshComp, Animation, TotalDuration, EventReference);
17
18 if (MeshComp == nullptr || MeshComp->GetWorld() == nullptr || MeshComp->GetWorld()->IsGameWorld() == false)
19 {
20 return;
21 }
22
23 AActor* OwnerActor = MeshComp->GetOwner();
24
25 if (IsValid(OwnerActor) == false)
26 {
27 return;
28 }
29
30 UCharacterMovementComponentBase* RotationComponent = OwnerActor->FindComponentByClass<UCharacterMovementComponentBase>();
31
32 if (IsValid(RotationComponent) == false)
33 {
34 return;
35 }
36
37 RotationComponent->BeginManualRotation();
38}

◆ NotifyEnd()

void UAnimNotifyState_RotateToTarget::NotifyEnd ( USkeletalMeshComponent *  MeshComp,
UAnimSequenceBase *  Animation,
const FAnimNotifyEventReference &  EventReference 
)
overridevirtual
83{
84 Super::NotifyEnd(MeshComp, Animation, EventReference);
85
86 if (MeshComp == nullptr || MeshComp->GetWorld() == nullptr || MeshComp->GetWorld()->IsGameWorld() == false)
87 {
88 return;
89 }
90
91 AActor* OwnerActor = MeshComp->GetOwner();
92 if (IsValid(OwnerActor) == false)
93 {
94 return;
95 }
96
97 UCharacterMovementComponentBase* RotationComponent = OwnerActor->FindComponentByClass<UCharacterMovementComponentBase>();
98 if (IsValid(RotationComponent) == false)
99 {
100 return;
101 }
102
103 RotationComponent->EndManualRotation();
104}

◆ NotifyTick()

void UAnimNotifyState_RotateToTarget::NotifyTick ( USkeletalMeshComponent *  MeshComp,
UAnimSequenceBase *  Animation,
float  FrameDeltaTime,
const FAnimNotifyEventReference &  EventReference 
)
overridevirtual
42{
43 Super::NotifyTick(MeshComp, Animation, FrameDeltaTime, EventReference);
44
45 if (MeshComp == nullptr)
46 {
47 return;
48 }
49
50 UWorld* World = MeshComp->GetWorld();
51
52 if (World == nullptr || World->IsGameWorld() == false)
53 {
54 return;
55 }
56
57 AActor* OwnerActor = MeshComp->GetOwner();
58
59 if (IsValid(OwnerActor) == false)
60 {
61 return;
62 }
63
64 UCharacterMovementComponentBase* RotationComponent = OwnerActor->FindComponentByClass<UCharacterMovementComponentBase>();
65
66 if (IsValid(RotationComponent) == false)
67 {
68 return;
69 }
70
71 AActor* TargetActor = ResolveRotationTarget(OwnerActor, World);
72
73 if (IsValid(TargetActor) == false)
74 {
75 return;
76 }
77
78 RotationComponent->RotateToActor(TargetActor, FrameDeltaTime, TurnSpeed, Tolerance, true);
79}
float Tolerance
Definition AnimNotifyState_RotateToTarget.h:32
float TurnSpeed
Definition AnimNotifyState_RotateToTarget.h:29
AActor * ResolveRotationTarget(AActor *OwnerActor, UWorld *World) const
Definition AnimNotifyState_RotateToTarget.cpp:113
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ ResolveRotationTarget()

AActor * UAnimNotifyState_RotateToTarget::ResolveRotationTarget ( AActor *  OwnerActor,
UWorld *  World 
) const
private
114{
115 if (AMainPlayerCharacter* Player = Cast<AMainPlayerCharacter>(OwnerActor))
116 {
117 UTargetingComponent* TargetingComponent = Player->GetTargetingComponent();
118 return TargetingComponent ? TargetingComponent->GetCurrentMonsterTarget() : nullptr;
119 }
120 else
121 {
122 return UGameplayStatics::GetPlayerPawn(World, 0);
123 }
124}
Definition MainPlayerCharacter.h:39
이 함수를 호출하는 함수들에 대한 그래프입니다.:

멤버 데이터 문서화

◆ Tolerance

float UAnimNotifyState_RotateToTarget::Tolerance = 5.0f
protected

◆ TurnSpeed

float UAnimNotifyState_RotateToTarget::TurnSpeed = 10.0f
protected

이 클래스에 대한 문서화 페이지는 다음의 파일들로부터 생성되었습니다.: