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

#include <ALingoGameState.h>

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

Public 멤버 함수

 ALingoGameState ()
 
void AddWrongListenAnswer (int32 Value)
 
void AddWrongReadAnswer (int32 Value)
 
void DecreaseMissionTimer (const float InValue)
 
FORCEINLINE const FResponseUserMeGetBotInfo () const
 
FORCEINLINE EQuestType GetCurrentQuestType () const
 
FORCEINLINE const FResponseListenScenarioGetListenScenarioData () const
 
FORCEINLINE const FResponseReadScenarioGetReadScenarioData () const
 
FORCEINLINE float GetRemainMissionTime ()
 
FORCEINLINE int64 GetRoomId ()
 
FORCEINLINE int32 GetRoomLevel ()
 
FORCEINLINE float GetTimeTaken ()
 
FORCEINLINE int GetWrongListenAnswerNum ()
 
FORCEINLINE int GetWrongReadAnswerNum ()
 
FORCEINLINE bool IsQuestIng ()
 
void Multicast_SetAllCompassVisibility (bool bVisible)
 
void Multicast_SetCompassVisibilityByClass (TSubclassOf< AActor > ActorClass, bool bVisible)
 
void Multicast_SetCompassVisibilityByTag (FName Tag, bool bVisible)
 
void MulticastRPC_SendChat (FResponseUserMe sendUser, const FText &inMessage, int32 PlayerIndex)
 
void SetAllCompassVisibility (bool bVisible)
 
void SetCompassVisibilityByClass (TSubclassOf< AActor > ActorClass, bool bVisible)
 
void SetCompassVisibilityByTag (FName Tag, bool bVisible)
 
void SetListenScenarioData (const FResponseListenScenario &InResponseData)
 
void SetReadScenarioData (const FResponseReadScenario &InResponseData)
 
void SetRoomLevel (int32 InRoomLevel)
 방 레벨 설정 (서버 전용)
 
void StartMissionTimer (float TimeLimit)
 미션 타이머를 시작합니다 (서버에서만 호출)
 
void StopMissionTimer ()
 미션 타이머를 중지합니다
 
virtual void Tick (float DeltaSeconds) override
 
void UpdateRemainMissionTime (const float InTimeLimit)
 

Public 속성

FResponseListenResult ListenResult
 
FResponseListenScenario ListenScenarioData
 
FOnListenResultUpdated OnListenResultUpdated
 
FOnQuestScenarioDataUpdated OnQuestScenarioDataUpdated
 
FOnReadResultUpdated OnReadResultUpdated
 
FOnRoomIdUpdated OnRoomIdUpdated
 
FOnRoomLevelUpdated OnRoomLevelUpdated
 
FResponseReadResult ReadResult
 
FResponseReadScenario ReadScenarioData
 
FResponseListenResult ReqListenResult
 
FResponseReadResult ReqReadResult
 
FResponseListenScenario TryListenAnswerData
 
TArray< int32 > WrongListenAnswerList
 
TArray< int32 > WrongReadAnswerList
 

Protected 멤버 함수

virtual void BeginPlay () override
 
virtual void GetLifetimeReplicatedProps (TArray< FLifetimeProperty > &OutLifetimeProps) const override
 
void Multicast_ShowListenQuestPopup (const FResponseListenScenario &InScenarioData)
 
void Multicast_ShowReadQuestPopup (const FResponseReadScenario &InScenarioData)
 
void Multicast_UpdateQuestType (const EQuestType InQuestType)
 
void OnRep_ListenResult ()
 
void OnRep_ListenScenarioData ()
 
void OnRep_ReadResult ()
 
void OnRep_ReadScenarioData ()
 
void OnRep_RoomId ()
 
void OnRep_RoomLevel ()
 

Protected 속성

bool bIsTimerActive = false
 타이머 활성화 상태
 
EQuestType QuestType
 
float RemainMissionTime = 0.f
 
int64 RoomId = 0
 방 ID (Host가 생성하고 Guest들과 공유)
 
int32 RoomLevel = 1
 

Private 멤버 함수

void OnMissionTimerEnd ()
 타이머 종료 시 호출됩니다 (서버에서만 실행)
 

Private 속성

FResponseUserMe Bot
 
float TimeLimit = 0
 

상세한 설명

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

생성자 & 소멸자 문서화

◆ ALingoGameState()

ALingoGameState::ALingoGameState ( )

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

23{
25 bIsTimerActive = false;
26
27 PrimaryActorTick.bCanEverTick = true;
28
29 // RoomId, RoomLevel은 Host가 생성합니다
30 RoomId = 0;
31 RoomLevel = 1;
32
36 Bot.is_active = true;
37
38 Bot.my_avatar = TEXT("[BOT]");
39 Bot.my_color = TEXT("[BOT]");
40}
int64 RoomId
방 ID (Host가 생성하고 Guest들과 공유)
bool bIsTimerActive
타이머 활성화 상태
FResponseUserMe Bot
static const int32 BotID
Definition Onepiece.h:56
static const FString BotName
Definition Onepiece.h:57

다음을 참조함 : bIsTimerActive, Bot, DefineData::BotID, DefineData::BotName, FResponseUserMe::fullname, FResponseUserMe::id, FResponseUserMe::is_active, FResponseUserMe::my_avatar, FResponseUserMe::my_color, RemainMissionTime, RoomId, RoomLevel, FResponseUserMe::username.

멤버 함수 문서화

◆ AddWrongListenAnswer()

void ALingoGameState::AddWrongListenAnswer ( int32  Value)

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

106{
107 if (!WrongListenAnswerList.Contains(InValue))
108 {
109 WrongListenAnswerList.Add(InValue);
110 }
111}
TArray< int32 > WrongListenAnswerList

다음을 참조함 : WrongListenAnswerList.

◆ AddWrongReadAnswer()

void ALingoGameState::AddWrongReadAnswer ( int32  Value)

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

98{
99 if (!WrongReadAnswerList.Contains(InValue))
100 {
101 WrongReadAnswerList.Add(InValue);
102 }
103}
TArray< int32 > WrongReadAnswerList

다음을 참조함 : WrongReadAnswerList.

다음에 의해서 참조됨 : AWeightSwitch::OnBeginOverlap(), ALuggageHolder::OnBoxOverlapBegin().

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

◆ BeginPlay()

void ALingoGameState::BeginPlay ( )
overrideprotectedvirtual

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

65{
66 Super::BeginPlay();
67
68 // Host(서버)만 RoomId를 생성합니다
69 if (HasAuthority() && RoomId == 0)
70 {
72
73 // TODO임시
74 this->RoomLevel = 2;
75
76 PRINTLOG(TEXT("[LingoGameState] RoomId generated by Host: %lld"), RoomId);
77 }
78}
#define PRINTLOG(fmt,...)
Definition GameLogging.h:30
static int64 GetUnixTimestampInt64()

다음을 참조함 : ULingoGameHelper::GetUnixTimestampInt64(), PRINTLOG, RoomId, RoomLevel.

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

◆ DecreaseMissionTimer()

void ALingoGameState::DecreaseMissionTimer ( const float  InValue)

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

284{
285 this->RemainMissionTime = FMath::Max(0.f, RemainMissionTime - InValue);
286}

다음을 참조함 : RemainMissionTime.

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

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

◆ GetBotInfo()

FORCEINLINE const FResponseUserMe & ALingoGameState::GetBotInfo ( ) const
inline

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

50{ return Bot; }

다음을 참조함 : Bot.

◆ GetCurrentQuestType()

FORCEINLINE EQuestType ALingoGameState::GetCurrentQuestType ( ) const
inline

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

47{ return QuestType; }

◆ GetLifetimeReplicatedProps()

void ALingoGameState::GetLifetimeReplicatedProps ( TArray< FLifetimeProperty > &  OutLifetimeProps) const
overrideprotectedvirtual

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

43{
44 Super::GetLifetimeReplicatedProps(OutLifetimeProps);
45
46 DOREPLIFETIME(ALingoGameState, RemainMissionTime);
47 DOREPLIFETIME(ALingoGameState, bIsTimerActive);
48 DOREPLIFETIME(ALingoGameState, QuestType);
49 DOREPLIFETIME(ALingoGameState, RoomId);
50 DOREPLIFETIME(ALingoGameState, RoomLevel);
51
52 DOREPLIFETIME(ALingoGameState, ReadScenarioData);
54 DOREPLIFETIME(ALingoGameState, ReqReadResult);
55 DOREPLIFETIME(ALingoGameState, ReadResult);
56
57 DOREPLIFETIME(ALingoGameState, ListenScenarioData);
59 DOREPLIFETIME(ALingoGameState, ReqListenResult);
60 DOREPLIFETIME(ALingoGameState, ListenResult);
62}
FResponseReadScenario ReadScenarioData
FResponseListenScenario TryListenAnswerData
FResponseListenResult ListenResult
FResponseReadResult ReqReadResult
FResponseReadResult ReadResult
FResponseListenScenario ListenScenarioData
FResponseListenResult ReqListenResult

다음을 참조함 : bIsTimerActive, ListenResult, ListenScenarioData, QuestType, ReadResult, ReadScenarioData, RemainMissionTime, ReqListenResult, ReqReadResult, RoomId, RoomLevel, TryListenAnswerData, WrongListenAnswerList, WrongReadAnswerList.

◆ GetListenScenarioData()

FORCEINLINE const FResponseListenScenario & ALingoGameState::GetListenScenarioData ( ) const
inline

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

49{return ListenScenarioData;}

다음에 의해서 참조됨 : AFoodHolder::CheckFood(), AFoodHolder::CheckPartialAnswer(), UPopup_Result::InitWrongList(), AFoodCourtManager::SpawnListenAnswer().

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

◆ GetReadScenarioData()

FORCEINLINE const FResponseReadScenario & ALingoGameState::GetReadScenarioData ( ) const
inline

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

48{return ReadScenarioData;}

다음에 의해서 참조됨 : UPopup_Result::InitWrongList(), AWeightSwitch::OnBeginOverlap(), ALuggageHolder::OnBoxOverlapBegin(), ALuggageManager::SpawnLuggage().

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

◆ GetRemainMissionTime()

FORCEINLINE float ALingoGameState::GetRemainMissionTime ( )
inline

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

44{ return RemainMissionTime; }

◆ GetRoomId()

FORCEINLINE int64 ALingoGameState::GetRoomId ( )
inline

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

42{ return RoomId; };

◆ GetRoomLevel()

FORCEINLINE int32 ALingoGameState::GetRoomLevel ( )
inline

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

43{ return RoomLevel; };

◆ GetTimeTaken()

FORCEINLINE float ALingoGameState::GetTimeTaken ( )
inline

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

◆ GetWrongListenAnswerNum()

FORCEINLINE int ALingoGameState::GetWrongListenAnswerNum ( )
inline

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

132{ return WrongListenAnswerList.Num(); }

◆ GetWrongReadAnswerNum()

FORCEINLINE int ALingoGameState::GetWrongReadAnswerNum ( )
inline

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

116{ return WrongReadAnswerList.Num(); }

◆ IsQuestIng()

FORCEINLINE bool ALingoGameState::IsQuestIng ( )
inline

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

다음을 참조함 : None.

◆ Multicast_SetAllCompassVisibility()

void ALingoGameState::Multicast_SetAllCompassVisibility ( bool  bVisible)

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

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

◆ Multicast_SetCompassVisibilityByClass()

void ALingoGameState::Multicast_SetCompassVisibilityByClass ( TSubclassOf< AActor >  ActorClass,
bool  bVisible 
)

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

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

◆ Multicast_SetCompassVisibilityByTag()

void ALingoGameState::Multicast_SetCompassVisibilityByTag ( FName  Tag,
bool  bVisible 
)

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

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

◆ Multicast_ShowListenQuestPopup()

void ALingoGameState::Multicast_ShowListenQuestPopup ( const FResponseListenScenario InScenarioData)
protected

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

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

◆ Multicast_ShowReadQuestPopup()

void ALingoGameState::Multicast_ShowReadQuestPopup ( const FResponseReadScenario InScenarioData)
protected

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

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

◆ Multicast_UpdateQuestType()

void ALingoGameState::Multicast_UpdateQuestType ( const EQuestType  InQuestType)
protected

다음에 의해서 참조됨 : SetListenScenarioData(), SetReadScenarioData().

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

◆ MulticastRPC_SendChat()

void ALingoGameState::MulticastRPC_SendChat ( FResponseUserMe  sendUser,
const FText &  inMessage,
int32  PlayerIndex 
)

◆ OnMissionTimerEnd()

void ALingoGameState::OnMissionTimerEnd ( )
private

타이머 종료 시 호출됩니다 (서버에서만 실행)

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

295{
296 if (!HasAuthority())
297 return;
298
299 bIsTimerActive = false;
300
301 // NetworkBroadcastActor를 통해 모든 클라이언트에 타이머 종료 알림
302 if (ANetworkBroadcastActor* BroadcastActor = ANetworkBroadcastActor::Get(this))
303 BroadcastActor->SendUpdateMissionTimerState(false, 0.0f, this);
304
306
307 PRINTLOG( TEXT("[GameState] Mission Timer Ended - Sending: %s"), *EndMessage);
308
309 // Read, Listen Quest일 때 자동으로 결과 팝업 표시
311 {
312 if (auto Popup = UPopupManager::ShowPopupAs<UPopup_Result>(GetWorld(), EPopupType::Result))
313 {
314 Popup->InitPopup(QuestType);
315 }
316 }
317
318 // 모든 플레이어에게 메시지 전송
319 if (UWorld* World = GetWorld())
320 {
321 for (FConstPlayerControllerIterator It = World->GetPlayerControllerIterator(); It; ++It)
322 {
323 if (APlayerController* PC = It->Get())
324 {
325 if (APlayerActor* PlayerActor = Cast<APlayerActor>(PC->GetPawn()))
326 {
327 PlayerActor->OnGameMessage(EndMessage);
328 }
329 }
330 }
331 }
332}
네트워크 복제를 위한 전역 브로드캐스트 Actor
static ANetworkBroadcastActor * Get(const UObject *WorldContextObject)
싱글톤 인스턴스 가져오기
Main character driven directly by the player.
static FString GetStageEndMessage(const EQuestType QuestType)

다음을 참조함 : bIsTimerActive, ANetworkBroadcastActor::Get(), ULingoGameHelper::GetStageEndMessage(), Listen, PRINTLOG, QuestType, Read.

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

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

◆ OnRep_ListenResult()

void ALingoGameState::OnRep_ListenResult ( )
protected

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

481{
483}
FOnListenResultUpdated OnListenResultUpdated

다음을 참조함 : ListenResult, OnListenResultUpdated.

◆ OnRep_ListenScenarioData()

void ALingoGameState::OnRep_ListenScenarioData ( )
protected

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

444{
445 OnQuestScenarioDataUpdated.Broadcast();
446
447 // 클라이언트에서 데이터가 복제된 후 팝업 표시
448 if (!HasAuthority())
449 {
450 // 데이터 유효성 확인
451 if (ListenScenarioData.full_data.Kor.IsEmpty() &&
452 ListenScenarioData.word_data1.Kor.IsEmpty() &&
454 {
455 PRINTLOG(TEXT("[OnRep_ListenScenarioData] Data is empty, skipping Cmd_Info"));
456 return;
457 }
458
459 // 1.0초 딜레이 후 Cmd_Info 호출 (플레이어 Role 동기화를 위함)
460 if (UWorld* World = GetWorld())
461 {
462 FTimerHandle TimerHandle;
463 World->GetTimerManager().SetTimer(TimerHandle, [this]()
464 {
465 for (FConstPlayerControllerIterator It = GetWorld()->GetPlayerControllerIterator(); It; ++It)
466 {
467 if (APlayerController* PC = It->Get())
468 {
469 if (APlayerActor* PlayerActor = Cast<APlayerActor>(PC->GetPawn()))
470 {
471 PlayerActor->Cmd_Info();
472 }
473 }
474 }
475 }, 1.0f, false);
476 }
477 }
478}
FOnQuestScenarioDataUpdated OnQuestScenarioDataUpdated
FString Kor

다음을 참조함 : FResponseListenScenario::full_data, FWordData::Kor, ListenScenarioData, OnQuestScenarioDataUpdated, PRINTLOG, FResponseListenScenario::word_data1, FResponseListenScenario::word_data2.

◆ OnRep_ReadResult()

void ALingoGameState::OnRep_ReadResult ( )
protected

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

439{
441}
FOnReadResultUpdated OnReadResultUpdated

다음을 참조함 : OnReadResultUpdated, ReadResult.

◆ OnRep_ReadScenarioData()

void ALingoGameState::OnRep_ReadScenarioData ( )
protected

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

404{
405 OnQuestScenarioDataUpdated.Broadcast();
406
407 // 클라이언트에서 데이터가 복제된 후 팝업 표시
408 if (!HasAuthority())
409 {
410 // 데이터 유효성 확인
411 if (ReadScenarioData.target_data.Num() == 0)
412 {
413 PRINTLOG(TEXT("[OnRep_ReadScenarioData] Data is empty, skipping Cmd_Info"));
414 return;
415 }
416
417 // 1.0초 딜레이 후 Cmd_Info 호출 (플레이어 Role 동기화를 위함)
418 if (UWorld* World = GetWorld())
419 {
420 FTimerHandle TimerHandle;
421 World->GetTimerManager().SetTimer(TimerHandle, [this]()
422 {
423 for (FConstPlayerControllerIterator It = GetWorld()->GetPlayerControllerIterator(); It; ++It)
424 {
425 if (APlayerController* PC = It->Get())
426 {
427 if (APlayerActor* PlayerActor = Cast<APlayerActor>(PC->GetPawn()))
428 {
429 PlayerActor->Cmd_Info();
430 }
431 }
432 }
433 }, 1.0f, false);
434 }
435 }
436}
TArray< FScenarioTargetData > target_data

다음을 참조함 : OnQuestScenarioDataUpdated, PRINTLOG, ReadScenarioData, FResponseReadScenario::target_data.

◆ OnRep_RoomId()

void ALingoGameState::OnRep_RoomId ( )
protected

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

486{
487 OnRoomIdUpdated.Broadcast(RoomId);
488}
FOnRoomIdUpdated OnRoomIdUpdated

다음을 참조함 : OnRoomIdUpdated, RoomId.

◆ OnRep_RoomLevel()

void ALingoGameState::OnRep_RoomLevel ( )
protected

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

491{
492 OnRoomLevelUpdated.Broadcast(RoomLevel);
493}
FOnRoomLevelUpdated OnRoomLevelUpdated

다음을 참조함 : OnRoomLevelUpdated, RoomLevel.

◆ SetAllCompassVisibility()

void ALingoGameState::SetAllCompassVisibility ( bool  bVisible)

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

128{
129 if (!HasAuthority()) return;
130
132}
void Multicast_SetAllCompassVisibility(bool bVisible)

다음을 참조함 : Multicast_SetAllCompassVisibility().

다음에 의해서 참조됨 : ALuggageHolder::OnBoxOverlapBegin(), AFoodHolder::OnFoodBoxOverlapBegin().

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

◆ SetCompassVisibilityByClass()

void ALingoGameState::SetCompassVisibilityByClass ( TSubclassOf< AActor >  ActorClass,
bool  bVisible 
)

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

121{
122 if (!HasAuthority()) return;
123
124 Multicast_SetCompassVisibilityByClass(ActorClass, bVisible);
125}
void Multicast_SetCompassVisibilityByClass(TSubclassOf< AActor > ActorClass, bool bVisible)

다음을 참조함 : Multicast_SetCompassVisibilityByClass().

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

◆ SetCompassVisibilityByTag()

void ALingoGameState::SetCompassVisibilityByTag ( FName  Tag,
bool  bVisible 
)

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

114{
115 if (!HasAuthority()) return;
116
118}
void Multicast_SetCompassVisibilityByTag(FName Tag, bool bVisible)

다음을 참조함 : Multicast_SetCompassVisibilityByTag().

다음에 의해서 참조됨 : ALuggageHolder::OnBoxOverlapBegin(), AFoodHolder::OnFoodBoxOverlapBegin().

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

◆ SetListenScenarioData()

void ALingoGameState::SetListenScenarioData ( const FResponseListenScenario InResponseData)

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

207{
208 // 반드시 서버 전용
209 if (!HasAuthority())
210 return;
211
213 this->ListenScenarioData = InResponseData;
214
215 // 미션 타이머 시작
217
218 // 모든 플레이어의 ListenQuest 진행 상태 설정
219 for (APlayerState* PS : PlayerArray)
220 {
221 if (ALingoPlayerState* LingoPS = Cast<ALingoPlayerState>(PS))
222 {
223 LingoPS->SetListenQuestIng(true);
224 }
225 }
226
227 if (HasAuthority())
228 {
231 }
232}
void Multicast_UpdateQuestType(const EQuestType InQuestType)
void Multicast_ShowListenQuestPopup(const FResponseListenScenario &InScenarioData)
void StartMissionTimer(float TimeLimit)
미션 타이머를 시작합니다 (서버에서만 호출)
static float GetMissionPlayTime()

다음을 참조함 : ULingoGameHelper::GetMissionPlayTime(), Listen, ListenScenarioData, Multicast_ShowListenQuestPopup(), Multicast_UpdateQuestType(), QuestType, StartMissionTimer().

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

◆ SetReadScenarioData()

void ALingoGameState::SetReadScenarioData ( const FResponseReadScenario InResponseData)

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

179{
180 // 반드시 서버 전용
181 if (!HasAuthority())
182 return;
183
185 this->ReadScenarioData = InResponseData;
186
187 // 미션 타이머 시작
189
190 // 모든 플레이어의 ReadQuest 진행 상태 설정
191 for (APlayerState* PS : PlayerArray)
192 {
193 if (ALingoPlayerState* LingoPS = Cast<ALingoPlayerState>(PS))
194 {
195 LingoPS->SetReadQuestIng(true);
196 }
197 }
198
199 if (HasAuthority())
200 {
203 }
204}
void Multicast_ShowReadQuestPopup(const FResponseReadScenario &InScenarioData)

다음을 참조함 : ULingoGameHelper::GetMissionPlayTime(), Multicast_ShowReadQuestPopup(), Multicast_UpdateQuestType(), QuestType, Read, ReadScenarioData, StartMissionTimer().

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

◆ SetRoomLevel()

void ALingoGameState::SetRoomLevel ( int32  InRoomLevel)

방 레벨 설정 (서버 전용)

매개변수
InRoomLevel설정할 레벨 (1~N)

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

235{
236 // 서버에서만 실행
237 if (!HasAuthority())
238 {
239 PRINTLOG(TEXT("[SetRoomLevel] Failed: Not authority"));
240 return;
241 }
242
243 RoomLevel = InRoomLevel;
244 PRINTLOG(TEXT("[SetRoomLevel] RoomLevel set to %d"), RoomLevel);
245
246 // 서버(Host)는 OnRep가 호출되지 않으므로 직접 델리게이트 브로드캐스트
247 // 클라이언트는 Replication으로 인해 OnRep_RoomLevel이 호출되어 델리게이트가 브로드캐스트됨
248 OnRoomLevelUpdated.Broadcast(RoomLevel);
249}

다음을 참조함 : OnRoomLevelUpdated, PRINTLOG, RoomLevel.

◆ StartMissionTimer()

void ALingoGameState::StartMissionTimer ( float  TimeLimit)

미션 타이머를 시작합니다 (서버에서만 호출)

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

252{
253 // 서버에서만 실행
254 if (!HasAuthority())
255 return;
256
257 this->TimeLimit = InTimeLimit;
258 this->RemainMissionTime = InTimeLimit;
259 this->bIsTimerActive = true;
260
261 if (ANetworkBroadcastActor* BroadcastActor = ANetworkBroadcastActor::Get(this))
262 BroadcastActor->SendUpdateMissionTimerState(true, InTimeLimit, this);
263}

다음을 참조함 : bIsTimerActive, ANetworkBroadcastActor::Get(), RemainMissionTime, TimeLimit.

다음에 의해서 참조됨 : SetListenScenarioData(), SetReadScenarioData().

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

◆ StopMissionTimer()

void ALingoGameState::StopMissionTimer ( )

미션 타이머를 중지합니다

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

266{
267 if (!HasAuthority())
268 return;
269
270 // 이미 타이머가 멈춰있으면 중복 호출 방지
271 if (!bIsTimerActive)
272 return;
273
274 bIsTimerActive = false;
275
276 // NetworkBroadcastActor를 통해 모든 클라이언트에 타이머 중지 알림
277 if (ANetworkBroadcastActor* BroadcastActor = ANetworkBroadcastActor::Get(this))
278 {
279 BroadcastActor->SendUpdateMissionTimerState(false, 0.0f, this);
280 }
281}

다음을 참조함 : bIsTimerActive, ANetworkBroadcastActor::Get().

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

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

◆ Tick()

void ALingoGameState::Tick ( float  DeltaSeconds)
overridevirtual

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

81{
82 Super::Tick(DeltaSeconds);
83
84 // 서버에서만 타이머 처리
85 if (!HasAuthority() || !bIsTimerActive)
86 return;
87
88 RemainMissionTime -= DeltaSeconds;
89
90 if (RemainMissionTime <= 0.f)
91 {
94 }
95}
void OnMissionTimerEnd()
타이머 종료 시 호출됩니다 (서버에서만 실행)

다음을 참조함 : bIsTimerActive, OnMissionTimerEnd(), RemainMissionTime.

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

◆ UpdateRemainMissionTime()

void ALingoGameState::UpdateRemainMissionTime ( const float  InTimeLimit)

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

289{
290 this->TimeLimit = InTimeLimit;
291 this->RemainMissionTime = InTimeLimit;
292}

다음을 참조함 : RemainMissionTime, TimeLimit.

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

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

멤버 데이터 문서화

◆ bIsTimerActive

bool ALingoGameState::bIsTimerActive = false
protected

타이머 활성화 상태

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

다음에 의해서 참조됨 : ALingoGameState(), GetLifetimeReplicatedProps(), OnMissionTimerEnd(), StartMissionTimer(), StopMissionTimer(), Tick().

◆ Bot

FResponseUserMe ALingoGameState::Bot
private

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

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

◆ ListenResult

FResponseListenResult ALingoGameState::ListenResult

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

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

◆ ListenScenarioData

FResponseListenScenario ALingoGameState::ListenScenarioData

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

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

◆ OnListenResultUpdated

FOnListenResultUpdated ALingoGameState::OnListenResultUpdated

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

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

◆ OnQuestScenarioDataUpdated

FOnQuestScenarioDataUpdated ALingoGameState::OnQuestScenarioDataUpdated

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

다음에 의해서 참조됨 : OnRep_ListenScenarioData(), OnRep_ReadScenarioData().

◆ OnReadResultUpdated

FOnReadResultUpdated ALingoGameState::OnReadResultUpdated

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

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

◆ OnRoomIdUpdated

FOnRoomIdUpdated ALingoGameState::OnRoomIdUpdated

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

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

◆ OnRoomLevelUpdated

FOnRoomLevelUpdated ALingoGameState::OnRoomLevelUpdated

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

다음에 의해서 참조됨 : OnRep_RoomLevel(), SetRoomLevel().

◆ QuestType

EQuestType ALingoGameState::QuestType
protected

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

다음에 의해서 참조됨 : GetLifetimeReplicatedProps(), OnMissionTimerEnd(), SetListenScenarioData(), SetReadScenarioData().

◆ ReadResult

FResponseReadResult ALingoGameState::ReadResult

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

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

◆ ReadScenarioData

FResponseReadScenario ALingoGameState::ReadScenarioData

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

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

◆ RemainMissionTime

float ALingoGameState::RemainMissionTime = 0.f
protected

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

다음에 의해서 참조됨 : ALingoGameState(), DecreaseMissionTimer(), GetLifetimeReplicatedProps(), StartMissionTimer(), Tick(), UpdateRemainMissionTime().

◆ ReqListenResult

FResponseListenResult ALingoGameState::ReqListenResult

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

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

◆ ReqReadResult

FResponseReadResult ALingoGameState::ReqReadResult

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

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

◆ RoomId

int64 ALingoGameState::RoomId = 0
protected

방 ID (Host가 생성하고 Guest들과 공유)

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

다음에 의해서 참조됨 : ALingoGameState(), BeginPlay(), GetLifetimeReplicatedProps(), OnRep_RoomId().

◆ RoomLevel

int32 ALingoGameState::RoomLevel = 1
protected

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

다음에 의해서 참조됨 : ALingoGameState(), BeginPlay(), GetLifetimeReplicatedProps(), OnRep_RoomLevel(), SetRoomLevel().

◆ TimeLimit

float ALingoGameState::TimeLimit = 0
private

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

다음에 의해서 참조됨 : StartMissionTimer(), UpdateRemainMissionTime().

◆ TryListenAnswerData

FResponseListenScenario ALingoGameState::TryListenAnswerData

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

다음에 의해서 참조됨 : GetLifetimeReplicatedProps(), UPopup_Result::InitWrongList(), AFoodHolder::OnFoodBoxOverlapBegin().

◆ WrongListenAnswerList

TArray<int32> ALingoGameState::WrongListenAnswerList

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

다음에 의해서 참조됨 : AddWrongListenAnswer(), GetLifetimeReplicatedProps(), UPopup_Result::InitWrongList(), AFoodHolder::OnFoodBoxOverlapBegin().

◆ WrongReadAnswerList

TArray<int32> ALingoGameState::WrongReadAnswerList

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

다음에 의해서 참조됨 : AddWrongReadAnswer(), GetLifetimeReplicatedProps(), UPopup_Result::InitWrongList(), AWeightSwitch::OnBeginOverlap().


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