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

#include <EventGate.h>

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

Public 멤버 함수

 AEventGate ()
 
FName GetId () const
 
virtual UStageEventListenerComponent * GetEventListenerComponent () const
 
- AInteractableActor(으)로부터 상속된 Public 멤버 함수
 AInteractableActor ()
 
virtual UInteractionChannel * Interact (AActor *Caller) override
 
void ForceStopInteraction () const
 
- IInteractableInterface(으)로부터 상속된 Public 멤버 함수
void OnInteractionFocusEntered (AActor *Caller)
 
void OnInteractionFocusExited (AActor *Caller)
 
- IStageEventBehaviorInterface(으)로부터 상속된 Public 멤버 함수
void HandleStageEvent (const FStageEventMessage &Message, const FInstancedStruct &ListenerContext)
 
bool ShouldReceiveStageEvent (const FStageEventMessage &Message, const FInstancedStruct &ListenerContext)
 
virtual void HandleStageEvent_Implementation (const FStageEventMessage &Message, const FInstancedStruct &ListenerContext)
 
virtual bool ShouldReceiveStageEvent_Implementation (const FStageEventMessage &Message, const FInstancedStruct &ListenerContext)
 

Protected 멤버 함수

virtual void BeginPlay () override
 
virtual void EndPlay (const EEndPlayReason::Type EndPlayReason) override
 
virtual void OnBeginInteraction (const AActor *Caller) override
 
virtual void OnEndInteraction (const AActor *Caller) override
 
void HandleBoxBeginOverlap (UPrimitiveComponent *OverlappedComp, AActor *OtherActor, UPrimitiveComponent *OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult &SweepResult)
 
void HandleBoxEndOverlap (UPrimitiveComponent *OverlappedComp, AActor *OtherActor, UPrimitiveComponent *OtherComp, int32 OtherBodyIndex)
 
void OnBeginInteraction_Internal (const AActor *Caller)
 
void OnEndInteraction_Internal (const AActor *Caller)
 
void OnGateOverlapEnter (AActor *OtherActor, UPrimitiveComponent *OtherComp)
 
void OnGateOverlapExit (AActor *OtherActor, UPrimitiveComponent *OtherComp)
 

Protected 속성

bool bIgnoreOverlap = false
 
EGateDetectionTiming DetectionTiming = EGateDetectionTiming::OnBeginOverlap
 
TObjectPtr< UStageEventListenerComponent > EventListenerComponent
 
TObjectPtr< UStageEventSenderComponent > GateEventSender
 
TObjectPtr< UBoxComponent > BoxComponent
 
- AInteractableActor(으)로부터 상속된 Protected 속성
TObjectPtr< UInteractionRule > InteractionRule
 
TObjectPtr< UInteractabilityComponent > InteractabilityComp
 

Private 멤버 함수

void TryFireGateEvent (AActor *OtherActor)
 

Private 속성

FName StageEventID_DEPRECATED = NAME_None
 

생성자 & 소멸자 문서화

◆ AEventGate()

AEventGate::AEventGate ( )
15{
16 BoxComponent = CreateDefaultSubobject<UBoxComponent>(TEXT("BoxComponent"));
17 BoxComponent->SetCollisionEnabled(ECollisionEnabled::QueryOnly);
18
19 EventListenerComponent = CreateDefaultSubobject<UStageEventListenerComponent>(TEXT("EventListenerComponent"));
20 GateEventSender = CreateDefaultSubobject<UStageEventSenderComponent>(TEXT("GateEventSender"));
21
22 // 플레이어 캡슐만 오버랩 시키고 적/투사체/월드는 콜리전 응답 매트릭스 단계에서 모두 차단.
23 // EnemyAction 채널은 CKPlayerCapsule = Overlap(기본값) / CKEnemyCapsule = Ignore(명시) 로
24 // 설정되어 있어 ObjectType 으로 두면 Pawn 중 플레이어만 통과시킬 수 있음.
25 BoxComponent->SetCollisionObjectType(CCHANNEL_ENEMYACTION);
26 BoxComponent->SetCollisionResponseToAllChannels(ECR_Ignore);
27 BoxComponent->SetCollisionResponseToChannel(ECC_Pawn, ECR_Overlap);
28}
#define CCHANNEL_ENEMYACTION
Definition CK_Collision.h:8
TObjectPtr< UStageEventListenerComponent > EventListenerComponent
Definition EventGate.h:84
TObjectPtr< UBoxComponent > BoxComponent
Definition EventGate.h:90
TObjectPtr< UStageEventSenderComponent > GateEventSender
Definition EventGate.h:87

다음을 참조함 : BoxComponent, CCHANNEL_ENEMYACTION, EventListenerComponent, GateEventSender.

멤버 함수 문서화

◆ BeginPlay()

void AEventGate::BeginPlay ( )
overrideprotectedvirtual

AInteractableActor(으)로부터 재구현되었습니다.

94{
95 Super::BeginPlay();
96
97 if (BoxComponent)
98 {
99 BoxComponent->OnComponentBeginOverlap.AddDynamic(this, &AEventGate::HandleBoxBeginOverlap);
100 BoxComponent->OnComponentEndOverlap.AddDynamic(this, &AEventGate::HandleBoxEndOverlap);
101 }
102 else
103 {
104 LOG_ERROR(LogCK, "%s 를 찾을 수 없습니다. ", NAMEOF(UBoxComponent));
105 }
106
107 if (GateEventSender && GateEventSender->GetEventIDToSend().IsNone() && StageEventID_DEPRECATED.IsNone() == false)
108 {
109 GateEventSender->SetEventIDToSend(StageEventID_DEPRECATED);
110 }
111}
#define LOG_ERROR(Category, Format,...)
Definition CK_UE.h:41
#define NAMEOF(Type)
Definition CK_UE.h:31
void HandleBoxBeginOverlap(UPrimitiveComponent *OverlappedComp, AActor *OtherActor, UPrimitiveComponent *OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult &SweepResult)
Definition EventGate.cpp:37
FName StageEventID_DEPRECATED
Definition EventGate.h:94
void HandleBoxEndOverlap(UPrimitiveComponent *OverlappedComp, AActor *OtherActor, UPrimitiveComponent *OtherComp, int32 OtherBodyIndex)
Definition EventGate.cpp:58

다음을 참조함 : BoxComponent, GateEventSender, HandleBoxBeginOverlap(), HandleBoxEndOverlap(), LOG_ERROR, NAMEOF, StageEventID_DEPRECATED.

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ EndPlay()

void AEventGate::EndPlay ( const EEndPlayReason::Type  EndPlayReason)
overrideprotectedvirtual

AInteractableActor(으)로부터 재구현되었습니다.

115{
116 if (BoxComponent)
117 {
118 BoxComponent->OnComponentBeginOverlap.RemoveDynamic(this, &AEventGate::HandleBoxBeginOverlap);
119 BoxComponent->OnComponentEndOverlap.RemoveDynamic(this, &AEventGate::HandleBoxEndOverlap);
120 }
121 else
122 {
123 LOG_ERROR(LogCK, "%s 를 찾을 수 없습니다. ", NAMEOF(UBoxComponent));
124 }
125
126 Super::EndPlay(EndPlayReason);
127}

다음을 참조함 : BoxComponent, HandleBoxBeginOverlap(), HandleBoxEndOverlap(), LOG_ERROR, NAMEOF.

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ GetEventListenerComponent()

virtual UStageEventListenerComponent * AEventGate::GetEventListenerComponent ( ) const
inlinevirtual
43 {
45 }

◆ GetId()

FName AEventGate::GetId ( ) const
32{
33 return GateEventSender ? GateEventSender->GetEventIDToSend() : NAME_None;
34}

다음을 참조함 : GateEventSender.

◆ HandleBoxBeginOverlap()

void AEventGate::HandleBoxBeginOverlap ( UPrimitiveComponent *  OverlappedComp,
AActor *  OtherActor,
UPrimitiveComponent *  OtherComp,
int32  OtherBodyIndex,
bool  bFromSweep,
const FHitResult &  SweepResult 
)
protected
38{
40 {
41 return;
42 }
43
44 // BP 측 시각/사운드 피드백 훅.
45 OnGateOverlapEnter(OtherActor, OtherComp);
46
47 // 이탈로 설정된 경우는 EndOverlap 에서 처리.
49 {
50 return;
51 }
52
53 //즉, 발화 타이밍이 진입일 때만 이벤트 디스패치.
54 TryFireGateEvent(OtherActor);
55}
void TryFireGateEvent(AActor *OtherActor)
Definition EventGate.cpp:82
bool bIgnoreOverlap
Definition EventGate.h:78
void OnGateOverlapEnter(AActor *OtherActor, UPrimitiveComponent *OtherComp)
EGateDetectionTiming DetectionTiming
Definition EventGate.h:81

다음을 참조함 : bIgnoreOverlap, DetectionTiming, OnEndOverlap, OnGateOverlapEnter(), TryFireGateEvent().

다음에 의해서 참조됨 : BeginPlay(), EndPlay().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ HandleBoxEndOverlap()

void AEventGate::HandleBoxEndOverlap ( UPrimitiveComponent *  OverlappedComp,
AActor *  OtherActor,
UPrimitiveComponent *  OtherComp,
int32  OtherBodyIndex 
)
protected
59{
61 {
62 return;
63 }
64
65 // BP 측 시각/사운드 피드백 훅.
66 OnGateOverlapExit(OtherActor, OtherComp);
67
68 // 발화 타이밍이 이탈인 경우 디스패치 후 종료.
70 {
71 TryFireGateEvent(OtherActor);
72 return;
73 }
74
75 // OnBeginOverlap 모드의 lifecycle 정리.
77}
void OnGateOverlapExit(AActor *OtherActor, UPrimitiveComponent *OtherComp)
void ForceStopInteraction() const
Definition InteractableActor.cpp:18

다음을 참조함 : bIgnoreOverlap, DetectionTiming, AInteractableActor::ForceStopInteraction(), OnEndOverlap, OnGateOverlapExit(), TryFireGateEvent().

다음에 의해서 참조됨 : BeginPlay(), EndPlay().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ OnBeginInteraction()

void AEventGate::OnBeginInteraction ( const AActor *  Caller)
overrideprotectedvirtual

AInteractableActor(으)로부터 재구현되었습니다.

131{
132 Super::OnBeginInteraction(Caller);
134
135 if (GateEventSender == nullptr)
136 {
137 LOG_WARNING(LogCKLevel, "%s 를 찾지 못해 이벤트 디스패치를 건너뜁니다.", NAMEOF(UStageEventSenderComponent));
138 return;
139 }
140
141 if (GateEventSender->GetEventIDToSend().IsNone())
142 {
143 LOG_WARNING(LogCK, "%s의 Storyboard 이벤트 ID가 설정되어 있지 않습니다. ", *GetName());
144 return;
145 }
146
147 GateEventSender->Send(Caller);
148}
#define LOG_WARNING(Category, Format,...)
Definition CK_UE.h:40
void OnBeginInteraction_Internal(const AActor *Caller)
Definition StageEventSenderComponent.h:9

다음을 참조함 : GateEventSender, LOG_WARNING, NAMEOF, OnBeginInteraction_Internal().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ OnBeginInteraction_Internal()

void AEventGate::OnBeginInteraction_Internal ( const AActor *  Caller)
protected

다음에 의해서 참조됨 : OnBeginInteraction().

이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ OnEndInteraction()

void AEventGate::OnEndInteraction ( const AActor *  Caller)
overrideprotectedvirtual

AInteractableActor(으)로부터 재구현되었습니다.

152{
153 Super::OnEndInteraction(Caller);
155}
void OnEndInteraction_Internal(const AActor *Caller)

다음을 참조함 : OnEndInteraction_Internal().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ OnEndInteraction_Internal()

void AEventGate::OnEndInteraction_Internal ( const AActor *  Caller)
protected

다음에 의해서 참조됨 : OnEndInteraction().

이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ OnGateOverlapEnter()

void AEventGate::OnGateOverlapEnter ( AActor *  OtherActor,
UPrimitiveComponent *  OtherComp 
)
protected

다음에 의해서 참조됨 : HandleBoxBeginOverlap().

이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ OnGateOverlapExit()

void AEventGate::OnGateOverlapExit ( AActor *  OtherActor,
UPrimitiveComponent *  OtherComp 
)
protected

다음에 의해서 참조됨 : HandleBoxEndOverlap().

이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ TryFireGateEvent()

void AEventGate::TryFireGateEvent ( AActor *  OtherActor)
private
83{
84 if (Interact(OtherActor))
85 {
86 return;
87 }
88
89 LOG_WARNING(LogCK, "상호작용에 실패했습니다. (%s)", *GetName());
90}
virtual UInteractionChannel * Interact(AActor *Caller) override
Definition InteractableActor.cpp:43

다음을 참조함 : AInteractableActor::Interact(), LOG_WARNING.

다음에 의해서 참조됨 : HandleBoxBeginOverlap(), HandleBoxEndOverlap().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

멤버 데이터 문서화

◆ bIgnoreOverlap

bool AEventGate::bIgnoreOverlap = false
protected

다음에 의해서 참조됨 : HandleBoxBeginOverlap(), HandleBoxEndOverlap().

◆ BoxComponent

TObjectPtr<UBoxComponent> AEventGate::BoxComponent
protected

다음에 의해서 참조됨 : AEventGate(), BeginPlay(), EndPlay().

◆ DetectionTiming

EGateDetectionTiming AEventGate::DetectionTiming = EGateDetectionTiming::OnBeginOverlap
protected

다음에 의해서 참조됨 : HandleBoxBeginOverlap(), HandleBoxEndOverlap().

◆ EventListenerComponent

TObjectPtr<UStageEventListenerComponent> AEventGate::EventListenerComponent
protected

다음에 의해서 참조됨 : AEventGate().

◆ GateEventSender

TObjectPtr<UStageEventSenderComponent> AEventGate::GateEventSender
protected

다음에 의해서 참조됨 : AEventGate(), BeginPlay(), GetId(), OnBeginInteraction().

◆ StageEventID_DEPRECATED

FName AEventGate::StageEventID_DEPRECATED = NAME_None
private

다음에 의해서 참조됨 : BeginPlay().


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