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 override
 
virtual EStageEvent GetStageEvent () const override
 
- AInteractableActor(으)로부터 상속된 Public 멤버 함수
 AInteractableActor ()
 
virtual UInteractionChannelInteract (AActor *Caller) override
 
void ForceStopInteraction () const
 
- IStageEventListenerInterface(으)로부터 상속된 Public 멤버 함수
virtual EListenerSlot GetSlotForEvent (const FName EventID) const
 
virtual const TMap< FName, EListenerSlot > * GetListenEvents () const
 

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< UInteractabilityComponent > InteractabilityComp
 

Private 멤버 함수

void TryFireGateEvent (AActor *OtherActor)
 

Private 속성

FName StageEventID_DEPRECATED = NAME_None
 

생성자 & 소멸자 문서화

◆ AEventGate()

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

멤버 함수 문서화

◆ BeginPlay()

void AEventGate::BeginPlay ( )
overrideprotectedvirtual

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

93{
94 Super::BeginPlay();
95
96 if (BoxComponent)
97 {
98 BoxComponent->OnComponentBeginOverlap.AddDynamic(this, &AEventGate::HandleBoxBeginOverlap);
99 BoxComponent->OnComponentEndOverlap.AddDynamic(this, &AEventGate::HandleBoxEndOverlap);
100 }
101 else
102 {
103 LOG_ERROR(LogCK, "%s 를 찾을 수 없습니다. ", NAMEOF(UBoxComponent));
104 }
105
106 if (GateEventSender && GateEventSender->GetEventIDToSend().IsNone() && StageEventID_DEPRECATED.IsNone() == false)
107 {
108 GateEventSender->SetEventIDToSend(StageEventID_DEPRECATED);
109 }
110}
#define LOG_ERROR(Category, Format,...)
Definition CK_UE.h:40
#define NAMEOF(Type)
Definition CK_UE.h:30
void HandleBoxBeginOverlap(UPrimitiveComponent *OverlappedComp, AActor *OtherActor, UPrimitiveComponent *OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult &SweepResult)
Definition EventGate.cpp:36
FName StageEventID_DEPRECATED
Definition EventGate.h:99
void HandleBoxEndOverlap(UPrimitiveComponent *OverlappedComp, AActor *OtherActor, UPrimitiveComponent *OtherComp, int32 OtherBodyIndex)
Definition EventGate.cpp:57
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ EndPlay()

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

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

114{
115 if (BoxComponent)
116 {
117 BoxComponent->OnComponentBeginOverlap.RemoveDynamic(this, &AEventGate::HandleBoxBeginOverlap);
118 BoxComponent->OnComponentEndOverlap.RemoveDynamic(this, &AEventGate::HandleBoxEndOverlap);
119 }
120 else
121 {
122 LOG_ERROR(LogCK, "%s 를 찾을 수 없습니다. ", NAMEOF(UBoxComponent));
123 }
124
125 Super::EndPlay(EndPlayReason);
126}
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ GetEventListenerComponent()

virtual UStageEventListenerComponent * AEventGate::GetEventListenerComponent ( ) const
inlineoverridevirtual

IStageEventListenerInterface를 구현.

43 {
45 }

◆ GetId()

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

◆ GetStageEvent()

virtual EStageEvent AEventGate::GetStageEvent ( ) const
inlineoverridevirtual

◆ HandleBoxBeginOverlap()

void AEventGate::HandleBoxBeginOverlap ( UPrimitiveComponent *  OverlappedComp,
AActor *  OtherActor,
UPrimitiveComponent *  OtherComp,
int32  OtherBodyIndex,
bool  bFromSweep,
const FHitResult &  SweepResult 
)
protected
37{
39 {
40 return;
41 }
42
43 // BP 측 시각/사운드 피드백 훅.
44 OnGateOverlapEnter(OtherActor, OtherComp);
45
46 // 이탈로 설정된 경우는 EndOverlap 에서 처리.
47 if (DetectionTiming == EGateDetectionTiming::OnEndOverlap)
48 {
49 return;
50 }
51
52 //즉, 발화 타이밍이 진입일 때만 이벤트 디스패치.
53 TryFireGateEvent(OtherActor);
54}
void TryFireGateEvent(AActor *OtherActor)
Definition EventGate.cpp:81
bool bIgnoreOverlap
Definition EventGate.h:83
void OnGateOverlapEnter(AActor *OtherActor, UPrimitiveComponent *OtherComp)
EGateDetectionTiming DetectionTiming
Definition EventGate.h:86
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ HandleBoxEndOverlap()

void AEventGate::HandleBoxEndOverlap ( UPrimitiveComponent *  OverlappedComp,
AActor *  OtherActor,
UPrimitiveComponent *  OtherComp,
int32  OtherBodyIndex 
)
protected
58{
60 {
61 return;
62 }
63
64 // BP 측 시각/사운드 피드백 훅.
65 OnGateOverlapExit(OtherActor, OtherComp);
66
67 // 발화 타이밍이 이탈인 경우 디스패치 후 종료.
68 if (DetectionTiming == EGateDetectionTiming::OnEndOverlap)
69 {
70 TryFireGateEvent(OtherActor);
71 return;
72 }
73
74 // OnBeginOverlap 모드의 lifecycle 정리.
76}
void OnGateOverlapExit(AActor *OtherActor, UPrimitiveComponent *OtherComp)
void ForceStopInteraction() const
Definition InteractableActor.cpp:18
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ OnBeginInteraction()

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

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

130{
131 Super::OnBeginInteraction(Caller);
133
134 if (GateEventSender == nullptr)
135 {
136 LOG_WARNING(LogCKLevel, "%s 를 찾지 못해 이벤트 디스패치를 건너뜁니다.", NAMEOF(UStageEventSenderComponent));
137 return;
138 }
139
140 if (GateEventSender->GetEventIDToSend().IsNone())
141 {
142 LOG_WARNING(LogCK, "%s의 스테이지 이벤트 ID가 설정되어 있지 않습니다. ", *GetName());
143 return;
144 }
145
146 GateEventSender->Send(Caller);
147}
#define LOG_WARNING(Category, Format,...)
Definition CK_UE.h:39
void OnBeginInteraction_Internal(const AActor *Caller)
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ OnBeginInteraction_Internal()

void AEventGate::OnBeginInteraction_Internal ( const AActor *  Caller)
protected
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ OnEndInteraction()

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

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

151{
152 Super::OnEndInteraction(Caller);
154}
void OnEndInteraction_Internal(const AActor *Caller)
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ OnEndInteraction_Internal()

void AEventGate::OnEndInteraction_Internal ( const AActor *  Caller)
protected
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ OnGateOverlapEnter()

void AEventGate::OnGateOverlapEnter ( AActor *  OtherActor,
UPrimitiveComponent *  OtherComp 
)
protected
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ OnGateOverlapExit()

void AEventGate::OnGateOverlapExit ( AActor *  OtherActor,
UPrimitiveComponent *  OtherComp 
)
protected
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ TryFireGateEvent()

void AEventGate::TryFireGateEvent ( AActor *  OtherActor)
private
82{
83 if (Interact(OtherActor))
84 {
85 return;
86 }
87
88 LOG_WARNING(LogCK, "상호작용에 실패했습니다. (%s)", *GetName());
89}
virtual UInteractionChannel * Interact(AActor *Caller) override
Definition InteractableActor.cpp:43
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

멤버 데이터 문서화

◆ bIgnoreOverlap

bool AEventGate::bIgnoreOverlap = false
protected

◆ BoxComponent

TObjectPtr<UBoxComponent> AEventGate::BoxComponent
protected

◆ DetectionTiming

EGateDetectionTiming AEventGate::DetectionTiming = EGateDetectionTiming::OnBeginOverlap
protected

◆ EventListenerComponent

TObjectPtr<UStageEventListenerComponent> AEventGate::EventListenerComponent
protected

◆ GateEventSender

TObjectPtr<UStageEventSenderComponent> AEventGate::GateEventSender
protected

◆ StageEventID_DEPRECATED

FName AEventGate::StageEventID_DEPRECATED = NAME_None
private

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