KLingo Project Documentation 1.0.0
Unreal Engine 5.6 C++ Project Documentation
로딩중...
검색중...
일치하는것 없음
AEvaluationTrigger 클래스 참조

#include <AEvaluationTrigger.h>

+ AEvaluationTrigger에 대한 상속 다이어그램 :
+ AEvaluationTrigger에 대한 협력 다이어그램:

Public 멤버 함수

 AEvaluationTrigger ()
 
ECompassMarkerType GetCompassMarkerType ()
 
void OnActivate ()
 
virtual void OnActivate_Implementation ()
 
void OnResponseEvaluationResult (FResponseEvaluationResult &ResponseData, bool bWasSuccessful)
 
virtual void SetCompassMarkerInto (ECompassMarkerType InMarkerType)
 
virtual void SetShowOnCompass (bool bShow)
 
virtual bool ShouldShowOnCompass () const
 
virtual void Tick (float DeltaTime) override
 

Public 속성

bool bShowOnCompass = true
 
ECompassMarkerType MarkerType
 

Protected 멤버 함수

virtual void BeginPlay () override
 
void OnTriggerBeginOverlap (UPrimitiveComponent *OverlappedComponent, AActor *OtherActor, UPrimitiveComponent *OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult &SweepResult)
 트리거 박스 Overlap 시작 이벤트 핸들러
 

Protected 속성

bool bIsTriggered
 트리거 활성화 상태 (false = 활성화, true = 비활성화)
 
bool bShowDebugBox
 디버그 드로우 표시 여부
 
FColor DebugBoxColor
 디버그 박스 색상
 
TObjectPtr< class UBoxComponent > TriggerBox
 트리거 영역을 정의하는 박스 컴포넌트
 

상세한 설명

AEvaluationTrigger.h 파일의 12 번째 라인에서 정의되었습니다.

생성자 & 소멸자 문서화

◆ AEvaluationTrigger()

AEvaluationTrigger::AEvaluationTrigger ( )

AEvaluationTrigger.cpp 파일의 15 번째 라인에서 정의되었습니다.

16{
17 PrimaryActorTick.bCanEverTick = true;
18 bReplicates = true;
19
20 // 루트 컴포넌트로 BoxComponent 생성
21 TriggerBox = CreateDefaultSubobject<UBoxComponent>(TEXT("TriggerBox"));
22 RootComponent = TriggerBox;
23
24 // 박스 크기 기본값 설정
25 TriggerBox->SetBoxExtent(FVector(100.0f, 100.0f, 100.0f));
26
27 // Overlap 이벤트 활성화
28 TriggerBox->SetGenerateOverlapEvents(true);
29 TriggerBox->SetCollisionEnabled(ECollisionEnabled::QueryOnly);
30 TriggerBox->SetCollisionResponseToAllChannels(ECR_Ignore);
31 TriggerBox->SetCollisionResponseToChannel(ECC_Pawn, ECR_Overlap);
32
33 // 초기값 설정
34 bIsTriggered = false;
35 bShowDebugBox = true;
36 DebugBoxColor = FColor::Green;
38
39}
FColor DebugBoxColor
디버그 박스 색상
bool bShowDebugBox
디버그 드로우 표시 여부
TObjectPtr< class UBoxComponent > TriggerBox
트리거 영역을 정의하는 박스 컴포넌트
bool bIsTriggered
트리거 활성화 상태 (false = 활성화, true = 비활성화)

다음을 참조함 : bIsTriggered, bShowDebugBox, DebugBoxColor, FinalResult, ICompassTargetInterface::MarkerType, TriggerBox.

멤버 함수 문서화

◆ BeginPlay()

void AEvaluationTrigger::BeginPlay ( )
overrideprotectedvirtual

AEvaluationTrigger.cpp 파일의 41 번째 라인에서 정의되었습니다.

42{
43 Super::BeginPlay();
44
45 if (TriggerBox)
46 TriggerBox->OnComponentBeginOverlap.AddDynamic(this, &AEvaluationTrigger::OnTriggerBeginOverlap);
47}
void OnTriggerBeginOverlap(UPrimitiveComponent *OverlappedComponent, AActor *OtherActor, UPrimitiveComponent *OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult &SweepResult)
트리거 박스 Overlap 시작 이벤트 핸들러

다음을 참조함 : OnTriggerBeginOverlap(), TriggerBox.

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

◆ GetCompassMarkerType()

ECompassMarkerType ICompassTargetInterface::GetCompassMarkerType ( )
inlineinherited

CompassTargetInterface.h 파일의 29 번째 라인에서 정의되었습니다.

29{return MarkerType;}

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

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

◆ OnActivate()

void AEvaluationTrigger::OnActivate ( )

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

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

◆ OnActivate_Implementation()

void AEvaluationTrigger::OnActivate_Implementation ( )
virtual

AEvaluationTrigger.cpp 파일의 120 번째 라인에서 정의되었습니다.

121{
122 if (auto KLingoNetwork = UKLingoNetworkSystem::Get(GetWorld()))
123 {
124 if (auto GS = ULingoGameHelper::GetLingoGameState(GetWorld()))
125 {
126 KLingoNetwork->RequestEvaluationResult(
127 GS->GetRoomId(),
128 FResponseEvaluationResultDelegate::CreateUObject(this, &AEvaluationTrigger::OnResponseEvaluationResult)
129 );
130 }
131 }
132 else
133 {
134 PRINTLOG(TEXT("UKLingoNetworkSystem not found!"));
135 }
136}
#define PRINTLOG(fmt,...)
Definition GameLogging.h:30
void OnResponseEvaluationResult(FResponseEvaluationResult &ResponseData, bool bWasSuccessful)
static class ALingoGameState * GetLingoGameState(const UObject *WorldContextObject)

다음을 참조함 : ULingoGameHelper::GetLingoGameState(), OnResponseEvaluationResult(), PRINTLOG.

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

◆ OnResponseEvaluationResult()

void AEvaluationTrigger::OnResponseEvaluationResult ( FResponseEvaluationResult ResponseData,
bool  bWasSuccessful 
)

AEvaluationTrigger.cpp 파일의 138 번째 라인에서 정의되었습니다.

139{
140 if (bWasSuccessful)
141 {
142 PRINTLOG(TEXT("--- Evaluation Result SUCCESS ---"));
143
144 if (auto Popup = UPopupManager::ShowPopupAs<UPopup_Evaluation>( GetWorld(), EPopupType::Evaluation))
145 Popup->InitPopup(ResponseData);
146 }
147 else
148 {
149 PRINTLOG(TEXT("--- OCR Extract FAILED ---"));
150 }
151}

다음을 참조함 : PRINTLOG.

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

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

◆ OnTriggerBeginOverlap()

void AEvaluationTrigger::OnTriggerBeginOverlap ( UPrimitiveComponent *  OverlappedComponent,
AActor *  OtherActor,
UPrimitiveComponent *  OtherComp,
int32  OtherBodyIndex,
bool  bFromSweep,
const FHitResult &  SweepResult 
)
protected

트리거 박스 Overlap 시작 이벤트 핸들러

AEvaluationTrigger.cpp 파일의 95 번째 라인에서 정의되었습니다.

99{
100 // 원샷 모드이고 이미 트리거되었으면 무시
101 if ( bIsTriggered)
102 return;
103
104 // PlayerActor인지 확인
105 APlayerActor* PlayerActor = Cast<APlayerActor>(OtherActor);
106 if (PlayerActor)
107 {
108 // 로컬 플레이어만 처리 (각 클라이언트가 독립적으로 Evaluation 요청)
109 if (APlayerController* PC = Cast<APlayerController>(PlayerActor->GetController()))
110 {
111 if (PC->IsLocalPlayerController())
112 {
113 OnActivate();
114 bIsTriggered = true;
115 }
116 }
117 }
118}
Main character driven directly by the player.

다음을 참조함 : bIsTriggered, OnActivate().

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

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

◆ SetCompassMarkerInto()

virtual void ICompassTargetInterface::SetCompassMarkerInto ( ECompassMarkerType  InMarkerType)
inlinevirtualinherited

AWheatly, AContactTrigger, ATeleportTrigger, AOrderKiosk, ALuggageHolder에서 재구현되었습니다.

CompassTargetInterface.h 파일의 30 번째 라인에서 정의되었습니다.

30{MarkerType = InMarkerType;}

◆ SetShowOnCompass()

virtual void ICompassTargetInterface::SetShowOnCompass ( bool  bShow)
inlinevirtualinherited

CompassTargetInterface.h 파일의 33 번째 라인에서 정의되었습니다.

◆ ShouldShowOnCompass()

virtual bool ICompassTargetInterface::ShouldShowOnCompass ( ) const
inlinevirtualinherited

CompassTargetInterface.h 파일의 32 번째 라인에서 정의되었습니다.

32{return bShowOnCompass;}

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

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

◆ Tick()

void AEvaluationTrigger::Tick ( float  DeltaTime)
overridevirtual

AEvaluationTrigger.cpp 파일의 49 번째 라인에서 정의되었습니다.

50{
51 Super::Tick(DeltaTime);
52
54 {
55 FVector BoxCenter = TriggerBox->GetComponentLocation();
56 FVector BoxExtent = TriggerBox->GetScaledBoxExtent();
57 FRotator BoxRotation = TriggerBox->GetComponentRotation();
58
59 // 디버그 박스 표시 (트리거 활성화 상태일 때만)
60 if (!bIsTriggered)
61 {
62 DrawDebugBox(
63 GetWorld(),
64 BoxCenter,
65 BoxExtent,
66 BoxRotation.Quaternion(),
68 false,
69 -1.0f,
70 0,
71 2.0f
72 );
73 }
74
75 // 트리거 정보를 텍스트로 표시
76 FString StatusText = bIsTriggered ? TEXT("[TRIGGERED]") : TEXT("[ACTIVE]");
77 FColor TextColor = bIsTriggered ? FColor::Red : FColor::Green;
78
79 FVector TextLocation = BoxCenter + FVector(0.0f, 0.0f, BoxExtent.Z + 50.0f);
80
81 // 상태 표시
82 DrawDebugString(
83 GetWorld(),
84 TextLocation,
85 StatusText,
86 nullptr,
87 TextColor,
88 0.0f,
89 true,
90 1.2f
91 );
92 }
93}

다음을 참조함 : bIsTriggered, bShowDebugBox, DebugBoxColor, TriggerBox.

멤버 데이터 문서화

◆ bIsTriggered

bool AEvaluationTrigger::bIsTriggered
protected

트리거 활성화 상태 (false = 활성화, true = 비활성화)

AEvaluationTrigger.h 파일의 38 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : AEvaluationTrigger(), OnTriggerBeginOverlap(), Tick().

◆ bShowDebugBox

bool AEvaluationTrigger::bShowDebugBox
protected

디버그 드로우 표시 여부

AEvaluationTrigger.h 파일의 42 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : AEvaluationTrigger(), Tick().

◆ bShowOnCompass

bool ICompassTargetInterface::bShowOnCompass = true
inherited

CompassTargetInterface.h 파일의 27 번째 라인에서 정의되었습니다.

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

◆ DebugBoxColor

FColor AEvaluationTrigger::DebugBoxColor
protected

디버그 박스 색상

AEvaluationTrigger.h 파일의 46 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : AEvaluationTrigger(), Tick().

◆ MarkerType

◆ TriggerBox

TObjectPtr<class UBoxComponent> AEvaluationTrigger::TriggerBox
protected

트리거 영역을 정의하는 박스 컴포넌트

AEvaluationTrigger.h 파일의 34 번째 라인에서 정의되었습니다.

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


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