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

상호작용 가능한 수하물 액터 더 자세히 ...

#include <luggage.h>

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

Public 멤버 함수

 Aluggage ()
 
void ApplyColorToMesh (int32 InColorIdx)
 
void ApplyPatternToMesh (int32 InPatternIdx)
 
virtual void BeginPlay () override
 
FORCEINLINE FString GetColor ()
 
virtual void GetLifetimeReplicatedProps (TArray< class FLifetimeProperty > &OutLifetimeProps) const override
 
FORCEINLINE FString GetPattern ()
 
FORCEINLINE int32 GetSpawnIdx ()
 
void OnInteract (AActor *Interactor)
 플레이어가 캐리어를 선택했을 때 호출됩니다.
 
void OnOutlineStateChanged (bool bShouldShowOutline)
 InteractableComponent의 아웃라인 상태 변경 이벤트 핸들러
 
void OnRep_ColorIdx ()
 
void OnRep_IsBeingHooked ()
 bIsBeingHooked 복제 시 호출되는 콜백
 
void OnRep_PatternIdx ()
 
void PlayTTSAudio ()
 
void ServerNotifySelection (class APlayerState *Player)
 서버에 캐리어 선택을 알립니다.
 
void SetAllCollision (bool bEnable)
 모든 컴포넌트의 충돌과 물리를 설정합니다.
 
void SetLuggageInfo (int32 InIdx, FString InColor, FString InPattern)
 
virtual void Tick (float DeltaTime) override
 
bool UpdateDissolve ()
 

Public 속성

bool bIsBeingHooked = false
 훅 중 플래그 (복제됨)
 
TObjectPtr< class UBoxComponent > BoxComp
 
int32 ColorIdx = -1
 
TObjectPtr< class UHookComponent > HookComp
 
TObjectPtr< AActor > HookedBy = nullptr
 현재 이 Luggage를 훅하고 있는 플레이어
 
TObjectPtr< class UInteractableComponent > InteractableComp
 
TObjectPtr< class UStaticMeshComponent > Mesh1Comp
 
TObjectPtr< class UStaticMeshComponent > Mesh2Comp
 
TObjectPtr< class UStaticMeshComponent > Mesh3Comp
 
int32 PatternIdx = -1
 
FString Target1
 캐리어의 심볼 (문제1 정답)
 
FString Target2
 캐리어의 색상 (문제2 정답)
 
TObjectPtr< class UWidgetComponent > WidgetComp
 

Protected 멤버 함수

void ApplyCollisionState (bool bEnable)
 
void OnRep_CollisionEnabled ()
 

Protected 속성

bool bCollisionEnabled = true
 
FString Color = ""
 
TObjectPtr< class UMaterialInterface > cubeBodyMaterial
 
TObjectPtr< class UMaterialInstanceDynamic > cubeBodyMID
 
TObjectPtr< class UMaterialInterface > cubeCoverMaterial
 
TObjectPtr< class UMaterialInstanceDynamic > cubeCoverMID
 
TObjectPtr< class UMaterialInterface > cubeStickerMaterial
 
TObjectPtr< class UMaterialInstanceDynamic > cubeStickerMID
 
const float dissolveMaxVal = 3.2f
 
float dissolveSpeed = 0.08f
 
float dissolveVal = -1.2f
 
FString Pattern = ""
 
int32 SpawnIdx = -1
 

Private 멤버 함수

void OnResponseListenAudio (FResponseListenAudio &ResponseData, bool bWasSuccessful)
 
void RequestListenAudio (const FString &AudioText)
 
void UpdateWidget ()
 

Private 속성

bool bIsRequest
 
bool bWidgetInitialized = false
 

상세한 설명

상호작용 가능한 수하물 액터

플레이어가 선택할 수 있는 수하물 오브젝트입니다. Read 퀘스트에서는 Symbol과 Color 정보를 추가로 가지며, 정답 판정에 사용됩니다.

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

생성자 & 소멸자 문서화

◆ Aluggage()

Aluggage::Aluggage ( )

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

27{
28 PrimaryActorTick.bCanEverTick = true;
29
30
31 Mesh1Comp = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Mesh1Comp"));
32 SetRootComponent(Mesh1Comp);
33
34 BoxComp = CreateDefaultSubobject<UBoxComponent>(TEXT("BoxComp"));
35 BoxComp->SetupAttachment(GetRootComponent());
36 BoxComp->SetBoxExtent(FVector(55));
37
38 Mesh2Comp = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Mesh2Comp"));
39 Mesh2Comp->SetupAttachment(Mesh1Comp);
40
41 Mesh3Comp = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Mesh3Comp"));
42 Mesh3Comp->SetupAttachment(Mesh1Comp);
43
44 InteractableComp = CreateDefaultSubobject<UInteractableComponent>(TEXT("Interactable"));
45 InteractableComp->InteractionType = EInteractionType::PickUp;
46 InteractableComp->InteractionPrompt = TEXT("Pick Up");
47
48 HookComp = CreateDefaultSubobject<UHookComponent>(TEXT("Hook"));
49
50 // Initial settings (Physics 설정은 BeginPlay에서 수행)
51 Mesh1Comp->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics);
52 Mesh1Comp->SetCollisionProfileName(TEXT("PhysicsActor"));
53
54 // 물리 복제 설정
55 Mesh1Comp->SetIsReplicated(true);
56
57 // Replication
58 bReplicates = true;
59 SetNetUpdateFrequency(100.0f); // 높은 업데이트 빈도로 부드러운 네트워크 동기화
60 SetMinNetUpdateFrequency(33.0f); // 최소 30fps 업데이트 보장
61
62 WidgetComp = CreateDefaultSubobject<UWidgetComponent>(TEXT("WidgetComp"));
63 ConstructorHelpers::FClassFinder<ULuggageInfoWidget> boxWidgetRef(LUGGAGE_INTERACT_WIDGET_PATH);
64 if (boxWidgetRef.Succeeded())
65 {
66 WidgetComp->SetWidgetClass(boxWidgetRef.Class);
67 WidgetComp->SetupAttachment(GetRootComponent());
68 WidgetComp->SetWidgetSpace(EWidgetSpace::Screen);
69 WidgetComp->SetDrawSize(FVector2D(2048.0f, 1024.0f));
70 }
71
72 ConstructorHelpers::FObjectFinder<UMaterialInterface> cubeBodyMaterialRef(TEXT("/Script/Engine.MaterialInstanceConstant'/Game/CustomContents/Platfrom/Assets/portal_block/Materials/M_Cube_Body.M_Cube_Body'"));
73 if (cubeBodyMaterialRef.Succeeded())
74 {
75 cubeBodyMaterial = cubeBodyMaterialRef.Object;
76 }
77
78 ConstructorHelpers::FObjectFinder<UMaterialInterface> cubeStickerMaterialRef(TEXT("/Script/Engine.Material'/Game/CustomContents/Platfrom/Assets/portal_block/Materials/M_Cube_Sticker.M_Cube_Sticker'"));
79 if (cubeStickerMaterialRef.Succeeded())
80 {
81 cubeStickerMaterial = cubeStickerMaterialRef.Object;
82 }
83
84 ConstructorHelpers::FObjectFinder<UMaterialInterface> cubeCoverMaterialRef(TEXT("/Script/Engine.MaterialInstanceConstant'/Game/CustomContents/Platfrom/Assets/portal_block/Materials/M_Cube_Cover.M_Cube_Cover'"));
85 if (cubeCoverMaterialRef.Succeeded())
86 {
87 cubeCoverMaterial = cubeCoverMaterialRef.Object;
88 }
89}
TObjectPtr< class UStaticMeshComponent > Mesh1Comp
Definition luggage.h:31
TObjectPtr< class UStaticMeshComponent > Mesh2Comp
Definition luggage.h:33
TObjectPtr< class UWidgetComponent > WidgetComp
Definition luggage.h:40
TObjectPtr< class UMaterialInterface > cubeStickerMaterial
Definition luggage.h:167
TObjectPtr< class UHookComponent > HookComp
Definition luggage.h:43
TObjectPtr< class UInteractableComponent > InteractableComp
Definition luggage.h:38
TObjectPtr< class UStaticMeshComponent > Mesh3Comp
Definition luggage.h:35
TObjectPtr< class UBoxComponent > BoxComp
Definition luggage.h:28
TObjectPtr< class UMaterialInterface > cubeBodyMaterial
Definition luggage.h:164
TObjectPtr< class UMaterialInterface > cubeCoverMaterial
Definition luggage.h:170
#define LUGGAGE_INTERACT_WIDGET_PATH
Definition luggage.cpp:24

다음을 참조함 : BoxComp, cubeBodyMaterial, cubeCoverMaterial, cubeStickerMaterial, HookComp, InteractableComp, LUGGAGE_INTERACT_WIDGET_PATH, Mesh1Comp, Mesh2Comp, Mesh3Comp, WidgetComp.

멤버 함수 문서화

◆ ApplyCollisionState()

void Aluggage::ApplyCollisionState ( bool  bEnable)
protected

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

305{
306 if (bEnable)
307 {
308 // 충돌 활성화
309 if (BoxComp)
310 {
311 BoxComp->SetCollisionEnabled(ECollisionEnabled::QueryOnly);
312 }
313
314 if (Mesh1Comp)
315 {
316 Mesh1Comp->SetSimulatePhysics(true);
317 Mesh1Comp->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics);
318 }
319
320 if (Mesh2Comp)
321 {
322 Mesh2Comp->SetCollisionEnabled(ECollisionEnabled::NoCollision);
323 }
324
325 if (Mesh3Comp)
326 {
327 Mesh3Comp->SetCollisionEnabled(ECollisionEnabled::NoCollision);
328 }
329
330 // InteractableComp의 DetectionRange 활성화
331 if (InteractableComp && InteractableComp->DetectionRange)
332 {
333 InteractableComp->DetectionRange->SetCollisionEnabled(ECollisionEnabled::QueryOnly);
334 InteractableComp->DetectionRange->SetGenerateOverlapEvents(true);
335 }
336 }
337 else
338 {
339 // 충돌 비활성화
340 if (BoxComp)
341 {
342 BoxComp->SetSimulatePhysics(false);
343 BoxComp->SetCollisionEnabled(ECollisionEnabled::NoCollision);
344 }
345
346 if (Mesh1Comp)
347 {
348 Mesh1Comp->SetSimulatePhysics(false);
349 Mesh1Comp->SetCollisionEnabled(ECollisionEnabled::NoCollision);
350 }
351
352 if (Mesh2Comp)
353 {
354 Mesh2Comp->SetCollisionEnabled(ECollisionEnabled::NoCollision);
355 }
356
357 if (Mesh3Comp)
358 {
359 Mesh3Comp->SetCollisionEnabled(ECollisionEnabled::NoCollision);
360 }
361
362 // InteractableComp의 DetectionRange 비활성화 (위젯 노출 방지)
363 if (InteractableComp && InteractableComp->DetectionRange)
364 {
365 InteractableComp->DetectionRange->SetCollisionEnabled(ECollisionEnabled::NoCollision);
366 InteractableComp->DetectionRange->SetGenerateOverlapEvents(false);
367 }
368
369 PRINTLOG(TEXT("Aluggage::SetAllCollision - Collisions disabled for %s"), *GetName());
370 }
371}
#define PRINTLOG(fmt,...)
Definition GameLogging.h:30

다음을 참조함 : BoxComp, InteractableComp, Mesh1Comp, Mesh2Comp, Mesh3Comp, PRINTLOG.

다음에 의해서 참조됨 : OnRep_CollisionEnabled(), SetAllCollision().

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

◆ ApplyColorToMesh()

void Aluggage::ApplyColorToMesh ( int32  InColorIdx)

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

200{
201 // 게임 스레드가 아니면 게임 스레드로 dispatch
202 if (!IsInGameThread())
203 {
204 AsyncTask(ENamedThreads::GameThread, [this, InColorIdx]()
205 {
206 ApplyColorToMesh(InColorIdx);
207 });
208 return;
209 }
210
211 ColorIdx = InColorIdx;
212
213 FColorData ColorData;
214 if (UGameDataManager::Get(GetWorld())->GetColorData(InColorIdx, ColorData))
215 {
216 // Color 변수 설정 (모든 클라이언트에서 데이터 테이블에서 가져옴)
217 Color = ColorData.Desc;
218
219 // if ( auto InfoWidget = Cast<ULuggageInfoWidget>(WidgetComp->GetWidget()))
220 // InfoWidget->UpdateType1Data(ColorData.Desc);
221
222 cubeCoverMID = UMaterialInstanceDynamic::Create(cubeCoverMaterial, this);
223 if (cubeCoverMID && Mesh3Comp)
224 {
225 // BaseColorFactor로 변경
226 cubeCoverMID->SetVectorParameterValue(FName("BaseColorFactor"), ColorData.GetLinearColor());
227 Mesh3Comp->SetMaterial(0, cubeCoverMID);
228 }
229 }
230}
TObjectPtr< class UMaterialInstanceDynamic > cubeCoverMID
Definition luggage.h:179
FString Color
Definition luggage.h:88
int32 ColorIdx
Definition luggage.h:103
void ApplyColorToMesh(int32 InColorIdx)
Definition luggage.cpp:199
색상 데이터를 정의하는 구조체
Definition FColorData.h:19
FString Desc
색상 설명 (한글명)
Definition FColorData.h:32
FLinearColor GetLinearColor() const
HexColor 문자열을 FLinearColor로 변환하여 반환
Definition FColorData.h:43

다음을 참조함 : ApplyColorToMesh(), Color, ColorIdx, cubeCoverMaterial, cubeCoverMID, FColorData::Desc, FColorData::GetLinearColor(), Mesh3Comp.

다음에 의해서 참조됨 : ApplyColorToMesh(), OnRep_ColorIdx(), ALuggageManager::SpawnLuggage().

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

◆ ApplyPatternToMesh()

void Aluggage::ApplyPatternToMesh ( int32  InPatternIdx)

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

233{
234 // 게임 스레드가 아니면 게임 스레드로 dispatch
235 if (!IsInGameThread())
236 {
237 AsyncTask(ENamedThreads::GameThread, [this, InPatternIdx]()
238 {
239 ApplyPatternToMesh(InPatternIdx);
240 });
241 return;
242 }
243
244 PatternIdx = InPatternIdx;
245
246 // 데칼 바꾸기
247
248 FReadData ReadData;
249 UGameDataManager::Get(GetWorld())->GetReadData(InPatternIdx, ReadData);
250
251 // Pattern 변수 설정 (모든 클라이언트에서 데이터 테이블에서 가져옴)
252 Pattern = ReadData.Word;
253
254 // if ( auto InfoWidget = Cast<ULuggageInfoWidget>(WidgetComp->GetWidget()))
255 // InfoWidget->UpdateType2Data(ReadData.Word);
256
257 UTexture2D* LoadedTexture = nullptr;
258 if (ReadData.Texture.IsValid())
259 LoadedTexture = ReadData.Texture.Get();
260 else
261 LoadedTexture = ReadData.Texture.LoadSynchronous();
262
263 cubeStickerMID = UMaterialInstanceDynamic::Create(cubeStickerMaterial, this);
264 if (cubeStickerMID)
265 {
266 // BaseColorFactor로 변경
267 cubeStickerMID->SetTextureParameterValue(FName("TextureParam"), LoadedTexture);
268 Mesh2Comp->SetMaterial(0, cubeStickerMID);
269 }
270}
TObjectPtr< class UMaterialInstanceDynamic > cubeStickerMID
Definition luggage.h:176
void ApplyPatternToMesh(int32 InPatternIdx)
Definition luggage.cpp:232
int32 PatternIdx
Definition luggage.h:106
FString Pattern
Definition luggage.h:90
읽기 학습 데이터를 정의하는 구조체
Definition FReadData.h:19
FString Word
학습 단어
Definition FReadData.h:32
TSoftObjectPtr< UTexture2D > Texture
Definition FReadData.h:35

다음을 참조함 : ApplyPatternToMesh(), cubeStickerMaterial, cubeStickerMID, Mesh2Comp, Pattern, PatternIdx, FReadData::Texture, FReadData::Word.

다음에 의해서 참조됨 : ApplyPatternToMesh(), OnRep_PatternIdx(), ALuggageManager::SpawnLuggage().

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

◆ BeginPlay()

void Aluggage::BeginPlay ( )
overridevirtual

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

92{
93 Super::BeginPlay();
94
95 cubeBodyMID = UMaterialInstanceDynamic::Create(cubeBodyMaterial, this);
96 Mesh1Comp->SetMaterial(0, cubeBodyMID);
97
98 // Physics 설정 (생성자에서 이동)
99 if (Mesh1Comp)
100 {
101 Mesh1Comp->SetSimulatePhysics(true);
102 Mesh1Comp->SetEnableGravity(true);
103 Mesh1Comp->SetMassOverrideInKg(NAME_None, 5.f, true);
104 }
105
106 SetReplicateMovement(true);
107
108 // 위젯 초기화
109 InteractableComp->InitWidget(WidgetComp);
110 // 아웃라인 상태 변경 델리게이트 바인딩
111 InteractableComp->OnOutlineStateChanged.AddDynamic(this, &Aluggage::OnOutlineStateChanged);
112}
TObjectPtr< class UMaterialInstanceDynamic > cubeBodyMID
Definition luggage.h:173
void OnOutlineStateChanged(bool bShouldShowOutline)
InteractableComponent의 아웃라인 상태 변경 이벤트 핸들러
Definition luggage.cpp:283

다음을 참조함 : cubeBodyMaterial, cubeBodyMID, InteractableComp, Mesh1Comp, OnOutlineStateChanged(), WidgetComp.

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

◆ GetColor()

FORCEINLINE FString Aluggage::GetColor ( )
inline

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

97{return Color;}

다음을 참조함 : Color.

◆ GetLifetimeReplicatedProps()

void Aluggage::GetLifetimeReplicatedProps ( TArray< class FLifetimeProperty > &  OutLifetimeProps) const
overridevirtual

[문제] 기존에는 여러 플레이어가 동시에 같은 Luggage를 훅할 수 있었음 [해결] bIsBeingHooked와 HookedBy 복제로 중복 훅 방지

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

140{
141 Super::GetLifetimeReplicatedProps(OutLifetimeProps);
142
143 DOREPLIFETIME(Aluggage, ColorIdx);
144 DOREPLIFETIME(Aluggage, PatternIdx);
145
150 DOREPLIFETIME(Aluggage, bIsBeingHooked);
151 DOREPLIFETIME(Aluggage, HookedBy);
152 DOREPLIFETIME(Aluggage, bCollisionEnabled);
153}
상호작용 가능한 수하물 액터
Definition luggage.h:15
bool bIsBeingHooked
훅 중 플래그 (복제됨)
Definition luggage.h:55
TObjectPtr< AActor > HookedBy
현재 이 Luggage를 훅하고 있는 플레이어
Definition luggage.h:62
bool bCollisionEnabled
Definition luggage.h:74

다음을 참조함 : bCollisionEnabled, bIsBeingHooked, ColorIdx, HookedBy, PatternIdx.

◆ GetPattern()

FORCEINLINE FString Aluggage::GetPattern ( )
inline

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

98{return Pattern;}

◆ GetSpawnIdx()

FORCEINLINE int32 Aluggage::GetSpawnIdx ( )
inline

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

96{return SpawnIdx;}
int32 SpawnIdx
Definition luggage.h:86

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

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

◆ OnInteract()

void Aluggage::OnInteract ( AActor *  Interactor)

플레이어가 캐리어를 선택했을 때 호출됩니다.

매개변수
Interactor[in] 상호작용을 시도한 액터 (플레이어)

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

414{
415 if (!Interactor)
416 {
417 PRINTLOG(TEXT("[Luggage] OnInteract - Interactor is null"));
418 return;
419 }
420
421 // 플레이어 컨트롤러와 PlayerState 가져오기
422 APlayerController* PC = Cast<APlayerController>(Interactor->GetInstigatorController());
423 if (!PC)
424 {
425 PRINTLOG(TEXT("[Luggage] OnInteract - PlayerController is null"));
426 return;
427 }
428
429 APlayerState* PS = PC->GetPlayerState<APlayerState>();
430 if (!PS)
431 {
432 PRINTLOG(TEXT("[Luggage] OnInteract - PlayerState is null"));
433 return;
434 }
435
436 //PRINTLOG(TEXT("[Luggage] OnInteract - Player selected luggage with Target1: %s, Target2: %s"), *Target1, *Target2);
437
438 // 서버에 선택 알림
440}
void ServerNotifySelection(class APlayerState *Player)
서버에 캐리어 선택을 알립니다.

다음을 참조함 : PRINTLOG, ServerNotifySelection().

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

◆ OnOutlineStateChanged()

void Aluggage::OnOutlineStateChanged ( bool  bShouldShowOutline)

InteractableComponent의 아웃라인 상태 변경 이벤트 핸들러

매개변수
bShouldShowOutline[in] true면 아웃라인 표시, false면 숨김

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

284{
285 Mesh1Comp->SetRenderCustomDepth(bShouldShowOutline);
286 Mesh2Comp->SetRenderCustomDepth(bShouldShowOutline);
287 Mesh3Comp->SetRenderCustomDepth(bShouldShowOutline);
288}

다음을 참조함 : Mesh1Comp, Mesh2Comp, Mesh3Comp.

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

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

◆ OnRep_CollisionEnabled()

void Aluggage::OnRep_CollisionEnabled ( )
protected

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

195{
197}
void ApplyCollisionState(bool bEnable)
Definition luggage.cpp:304

다음을 참조함 : ApplyCollisionState(), bCollisionEnabled.

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

◆ OnRep_ColorIdx()

void Aluggage::OnRep_ColorIdx ( )

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

163{
165}

다음을 참조함 : ApplyColorToMesh(), ColorIdx.

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

◆ OnRep_IsBeingHooked()

void Aluggage::OnRep_IsBeingHooked ( )

bIsBeingHooked 복제 시 호출되는 콜백

훅 상태 변화 시 비주얼 피드백 (Outline 등)

[문제] 기존에는 훅 상태 변화 시 비주얼 피드백이 없었음 [해결] 훅 중일 때 Outline 표시로 시각적 피드백 제공

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

178{
179 if (bIsBeingHooked)
180 {
181 // 훅 중 - Outline 켜기
183 PRINTLOG(TEXT("OnRep_IsBeingHooked: %s is being hooked by %s"),
184 *GetName(), HookedBy ? *HookedBy->GetName() : TEXT("Unknown"));
185 }
186 else
187 {
188 // 훅 해제 - Outline 상태는 InteractableComponent나 다른 시스템이 관리
189 // 여기서는 명시적으로 끄지 않음 (픽업 상태 등을 고려)
190 PRINTLOG(TEXT("OnRep_IsBeingHooked: %s hook released"), *GetName());
191 }
192}

다음을 참조함 : bIsBeingHooked, HookedBy, OnOutlineStateChanged(), PRINTLOG.

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

◆ OnRep_PatternIdx()

void Aluggage::OnRep_PatternIdx ( )

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

168{
170}

다음을 참조함 : ApplyPatternToMesh(), PatternIdx.

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

◆ OnResponseListenAudio()

void Aluggage::OnResponseListenAudio ( FResponseListenAudio ResponseData,
bool  bWasSuccessful 
)
private

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

494{
495 bIsRequest = false;
496
497 if (bWasSuccessful)
498 {
499 if (auto PlayerActor = ULingoGameHelper::GetPlayerActor(this))
500 PlayerActor->PlayTTSAudio(ResponseData.audio_base64);
501 }
502}
bool bIsRequest
Definition luggage.h:189
static class APlayerActor * GetPlayerActor(const UObject *WorldContextObject)
첫 번째 플레이어의 PlayerActor를 가져옵니다.
TArray< uint8 > audio_base64

다음을 참조함 : FResponseListenAudio::audio_base64, bIsRequest, ULingoGameHelper::GetPlayerActor().

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

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

◆ PlayTTSAudio()

void Aluggage::PlayTTSAudio ( )

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

473{
474 RequestListenAudio( FString::Printf(TEXT("%s %s"), *Color, *Pattern) );
475}
void RequestListenAudio(const FString &AudioText)
Definition luggage.cpp:477

다음을 참조함 : Color, Pattern, RequestListenAudio().

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

◆ RequestListenAudio()

void Aluggage::RequestListenAudio ( const FString &  AudioText)
private

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

478{
479 if (bIsRequest)
480 return;
481
482 if (auto KLingoNetwork = UKLingoNetworkSystem::Get(GetWorld()))
483 {
484 bIsRequest = true;
485
486 KLingoNetwork->RequestListenAudio(
487 AudioText,
488 FResponseListenAudioDelegate::CreateUObject(this, &Aluggage::OnResponseListenAudio)
489 );
490 }
491}
void OnResponseListenAudio(FResponseListenAudio &ResponseData, bool bWasSuccessful)
Definition luggage.cpp:493

다음을 참조함 : bIsRequest, OnResponseListenAudio().

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

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

◆ ServerNotifySelection()

void Aluggage::ServerNotifySelection ( class APlayerState *  Player)

서버에 캐리어 선택을 알립니다.

매개변수
Player[in] 선택한 플레이어의 PlayerState

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

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

◆ SetAllCollision()

void Aluggage::SetAllCollision ( bool  bEnable)

모든 컴포넌트의 충돌과 물리를 설정합니다.

매개변수
bEnable[in] true면 충돌 활성화, false면 비활성화

Holder에서 Luggage의 상호작용을 제어하기 위해 사용됩니다.

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

374{
375 ApplyCollisionState(bEnable);
376
377 if (HasAuthority())
378 {
379 bCollisionEnabled = bEnable;
380 }
381}

다음을 참조함 : ApplyCollisionState(), bCollisionEnabled.

다음에 의해서 참조됨 : AHolder::CheckLuggage(), ALuggageHolder::CheckLuggage().

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

◆ SetLuggageInfo()

void Aluggage::SetLuggageInfo ( int32  InIdx,
FString  InColor,
FString  InPattern 
)

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

156{
157 SpawnIdx = InIdx;
158 Color = InColor;
159 Pattern = InPattern;
160}

다음을 참조함 : Color, Pattern, SpawnIdx.

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

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

◆ Tick()

void Aluggage::Tick ( float  DeltaTime)
overridevirtual

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

115{
116 Super::Tick(DeltaTime);
117
118 // 위젯이 아직 초기화되지 않았고, ColorIdx와 PatternIdx가 유효하다면
119 if (!bWidgetInitialized && ColorIdx >= 0 && PatternIdx >= 0)
120 {
121 if (auto InfoWidget = Cast<ULuggageInfoWidget>(WidgetComp->GetWidget()))
122 {
123 InfoWidget->InitLuggage(Pattern, Color);
124 bWidgetInitialized = true; // 한 번만 실행
125 }
126 }
127
128 // BillboardInfoWidget();
129
130 // Pattern 이름을 luggage 위에 표시
131
132 // if (!Pattern.IsEmpty())
133 // {
134 // FVector TextLocation = GetActorLocation() + FVector(0, 0, 100);
135 // DrawDebugString(GetWorld(), TextLocation, Pattern, nullptr, FColor::White, 0.f, true);
136 // }
137}
bool bWidgetInitialized
Definition luggage.h:128

다음을 참조함 : bWidgetInitialized, Color, ColorIdx, Pattern, PatternIdx, WidgetComp.

◆ UpdateDissolve()

bool Aluggage::UpdateDissolve ( )

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

291{
292 // visible value 높이기
294
295 cubeBodyMID->SetScalarParameterValue(FName("VisibleValue"), dissolveVal);
296 cubeStickerMID->SetScalarParameterValue(FName("VisibleValue"), dissolveVal);
297 cubeCoverMID->SetScalarParameterValue(FName("VisibleValue"), dissolveVal);
298
299 PRINTLOG(TEXT("UpdateDissolve: dissolveVal: %f"), dissolveVal);
300
301 return dissolveVal >= dissolveMaxVal;
302}
const float dissolveMaxVal
Definition luggage.h:181
float dissolveSpeed
Definition luggage.h:183
float dissolveVal
Definition luggage.h:182

다음을 참조함 : cubeBodyMID, cubeCoverMID, cubeStickerMID, dissolveMaxVal, dissolveSpeed, dissolveVal, PRINTLOG.

◆ UpdateWidget()

void Aluggage::UpdateWidget ( )
private

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

274{
275 // Tick에서 호출되는 지연 초기화 로직으로 대체됨
276 // 필요시 수동으로 위젯을 업데이트할 때만 사용
277 if (auto InfoWidget = Cast<ULuggageInfoWidget>(WidgetComp->GetWidget()))
278 {
279 InfoWidget->InitLuggage(Pattern, Color);
280 }
281}

다음을 참조함 : Color, Pattern, WidgetComp.

멤버 데이터 문서화

◆ bCollisionEnabled

bool Aluggage::bCollisionEnabled = true
protected

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

다음에 의해서 참조됨 : GetLifetimeReplicatedProps(), OnRep_CollisionEnabled(), SetAllCollision().

◆ bIsBeingHooked

bool Aluggage::bIsBeingHooked = false

훅 중 플래그 (복제됨)

[문제] 기존에는 여러 플레이어가 동시에 같은 Luggage를 훅할 수 있었음 [해결] bIsBeingHooked 플래그로 중복 훅 방지

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

다음에 의해서 참조됨 : GetLifetimeReplicatedProps(), AConveyorBelt::MoveOverlappedStatics(), OnRep_IsBeingHooked().

◆ bIsRequest

bool Aluggage::bIsRequest
private

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

다음에 의해서 참조됨 : OnResponseListenAudio(), RequestListenAudio().

◆ BoxComp

TObjectPtr<class UBoxComponent> Aluggage::BoxComp

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

다음에 의해서 참조됨 : Aluggage(), ApplyCollisionState().

◆ bWidgetInitialized

bool Aluggage::bWidgetInitialized = false
private

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

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

◆ Color

FString Aluggage::Color = ""
protected

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

다음에 의해서 참조됨 : ApplyColorToMesh(), PlayTTSAudio(), SetLuggageInfo(), Tick(), UpdateWidget().

◆ ColorIdx

int32 Aluggage::ColorIdx = -1

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

다음에 의해서 참조됨 : ApplyColorToMesh(), AHolder::CheckLuggage(), GetLifetimeReplicatedProps(), OnRep_ColorIdx(), Tick().

◆ cubeBodyMaterial

TObjectPtr<class UMaterialInterface> Aluggage::cubeBodyMaterial
protected

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

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

◆ cubeBodyMID

TObjectPtr<class UMaterialInstanceDynamic> Aluggage::cubeBodyMID
protected

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

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

◆ cubeCoverMaterial

TObjectPtr<class UMaterialInterface> Aluggage::cubeCoverMaterial
protected

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

다음에 의해서 참조됨 : Aluggage(), ApplyColorToMesh().

◆ cubeCoverMID

TObjectPtr<class UMaterialInstanceDynamic> Aluggage::cubeCoverMID
protected

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

다음에 의해서 참조됨 : ApplyColorToMesh(), UpdateDissolve().

◆ cubeStickerMaterial

TObjectPtr<class UMaterialInterface> Aluggage::cubeStickerMaterial
protected

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

다음에 의해서 참조됨 : Aluggage(), ApplyPatternToMesh().

◆ cubeStickerMID

TObjectPtr<class UMaterialInstanceDynamic> Aluggage::cubeStickerMID
protected

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

다음에 의해서 참조됨 : ApplyPatternToMesh(), UpdateDissolve().

◆ dissolveMaxVal

const float Aluggage::dissolveMaxVal = 3.2f
protected

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

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

◆ dissolveSpeed

float Aluggage::dissolveSpeed = 0.08f
protected

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

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

◆ dissolveVal

float Aluggage::dissolveVal = -1.2f
protected

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

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

◆ HookComp

TObjectPtr<class UHookComponent> Aluggage::HookComp

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

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

◆ HookedBy

TObjectPtr<AActor> Aluggage::HookedBy = nullptr

현재 이 Luggage를 훅하고 있는 플레이어

중복 훅 방지 및 디버깅용

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

다음에 의해서 참조됨 : GetLifetimeReplicatedProps(), OnRep_IsBeingHooked().

◆ InteractableComp

TObjectPtr<class UInteractableComponent> Aluggage::InteractableComp

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

다음에 의해서 참조됨 : Aluggage(), ApplyCollisionState(), BeginPlay(), AConveyorBelt::MoveOverlappedStatics().

◆ Mesh1Comp

TObjectPtr<class UStaticMeshComponent> Aluggage::Mesh1Comp

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

다음에 의해서 참조됨 : Aluggage(), ApplyCollisionState(), BeginPlay(), OnOutlineStateChanged().

◆ Mesh2Comp

TObjectPtr<class UStaticMeshComponent> Aluggage::Mesh2Comp

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

다음에 의해서 참조됨 : Aluggage(), ApplyCollisionState(), ApplyPatternToMesh(), OnOutlineStateChanged().

◆ Mesh3Comp

TObjectPtr<class UStaticMeshComponent> Aluggage::Mesh3Comp

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

다음에 의해서 참조됨 : Aluggage(), ApplyCollisionState(), ApplyColorToMesh(), OnOutlineStateChanged().

◆ Pattern

FString Aluggage::Pattern = ""
protected

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

다음에 의해서 참조됨 : ApplyPatternToMesh(), PlayTTSAudio(), SetLuggageInfo(), Tick(), UpdateWidget().

◆ PatternIdx

int32 Aluggage::PatternIdx = -1

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

다음에 의해서 참조됨 : ApplyPatternToMesh(), AHolder::CheckLuggage(), GetLifetimeReplicatedProps(), OnRep_PatternIdx(), Tick().

◆ SpawnIdx

int32 Aluggage::SpawnIdx = -1
protected

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

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

◆ Target1

FString Aluggage::Target1

캐리어의 심볼 (문제1 정답)

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

다음에 의해서 참조됨 : ALingoGameMode::HandleLuggageSelection(), ALingoGameMode::ValidateAnswer().

◆ Target2

FString Aluggage::Target2

캐리어의 색상 (문제2 정답)

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

다음에 의해서 참조됨 : ALingoGameMode::HandleLuggageSelection(), ALingoGameMode::ValidateAnswer().

◆ WidgetComp

TObjectPtr<class UWidgetComponent> Aluggage::WidgetComp

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

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


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