KLingo Project Documentation 1.0.0
Unreal Engine 5.6 C++ Project Documentation
로딩중...
검색중...
일치하는것 없음
ALingoPlayerState.h
이 파일의 문서화 페이지로 가기
1// Copyright (c) 2025 Doppleddiggong. All rights reserved. Unauthorized copying, modification, or distribution of this file, via any medium is strictly prohibited. Proprietary and confidential.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "GameFramework/PlayerState.h"
7#include "EQuestRole.h"
8#include "NetworkData.h"
9#include "ALingoPlayerState.generated.h"
10
11UCLASS()
12class ONEPIECE_API ALingoPlayerState : public APlayerState
13{
14 GENERATED_BODY()
15
16public:
18
19protected:
20 virtual void GetLifetimeReplicatedProps(TArray<class FLifetimeProperty>& OutLifetimeProps) const override;
21
22public:
23 FString GetToken() { return AccessToken; }
24 void SetToken(FString InToken) { this->AccessToken = InToken; }
25
30 FString GetChatContext() const;
31
32 void RefreshQuestState();
33
34private:
35 FString AccessToken;
36
37public:
38 //--------------------------------------------------------------//
39 // Read Quest Functions
40 //--------------------------------------------------------------//
41
43 UFUNCTION(Server, Reliable, WithValidation)
44 void Server_SetSelectedWord1(const FString& Word1);
45
47 UFUNCTION(Server, Reliable, WithValidation)
48 void Server_SetSelectedWord2(const FString& Word2);
49
50 UFUNCTION()
51 void OnRep_QuestRole();
52
54 UFUNCTION()
55 void OnRep_SelectedWord1();
56
58 UFUNCTION()
59 void OnRep_SelectedWord2();
60
62 UFUNCTION()
63 void OnRep_WrongWord1();
64
66 UFUNCTION()
67 void OnRep_WrongWord2();
68
69 //--------------------------------------------------------------//
70 // Write Quest RPC Functions
71 //--------------------------------------------------------------//
72public:
73 UPROPERTY(Transient, BlueprintReadOnly, Category = "WriteQuest")
74 FQuestWriteInfo WriteQuestionData;
75
76 UPROPERTY(Transient, BlueprintReadOnly, Category = "WriteQuest")
77 FResponseWriteSubmit WriteSubmitResultData;
78
79 UPROPERTY(Transient, BlueprintReadOnly, Category = "WriteQuest")
80 FResponseWriteResult WriteWholeResultData;
81
82 //--------------------------------------------------------------//
83 // Speak Quest RPC Functions
84 //--------------------------------------------------------------//
85
87 UFUNCTION(Server, Reliable)
88 void Server_NotifySpeakDataReady();
89
92 void AddSpeakJudes(const FResponseSpeakingJudes& EvaluationResult);
93
95 UFUNCTION(BlueprintCallable, Category = "SpeakQuest")
96 void SetSpeakQuestCompleted();
97
99 UFUNCTION(BlueprintPure, Category = "SpeakQuest")
100 bool IsSpeakQuestCompleted() const { return bSpeakQuestCompleted; }
101
103 UFUNCTION(BlueprintCallable, Category = "ReadQuest")
104 void SetReadQuestCompleted();
105
107 UFUNCTION(BlueprintPure, Category = "ReadQuest")
108 bool IsReadQuestCompleted() const { return bReadQuestCompleted; }
109
111 UFUNCTION(BlueprintCallable, Category = "ListenQuest")
112 void SetListenQuestCompleted();
113
115 UFUNCTION(BlueprintPure, Category = "ListenQuest")
116 bool IsListenQuestCompleted() const { return bListenQuestCompleted; }
117
119 UFUNCTION(BlueprintCallable, Category = "WriteQuest")
120 void SetWriteQuestCompleted();
121
123 UFUNCTION(BlueprintPure, Category = "WriteQuest")
124 bool IsWriteQuestCompleted() const { return bWriteQuestCompleted; }
125
127 UFUNCTION(BlueprintCallable, Category = "ReadQuest")
128 void SetReadQuestIng(bool bInProgress);
129
131 UFUNCTION(BlueprintCallable, Category = "ListenQuest")
132 void SetListenQuestIng(bool bInProgress);
133
135 UFUNCTION(BlueprintCallable, Category = "SpeakQuest")
136 void SetSpeakQuestIng(bool bInProgress);
137
139 UFUNCTION(BlueprintCallable, Category = "WriteQuest")
140 void SetWriteQuestIng(bool bInProgress);
141
143 UFUNCTION()
144 void OnRep_SpeakScenarioData();
145
146public:
148 UPROPERTY(ReplicatedUsing = OnRep_QuestRole, BlueprintReadOnly, Category = "Quest")
149 EQuestRole QuestRole = EQuestRole::Both;
150
152 UPROPERTY(Replicated, BlueprintReadOnly, Category = "Quest")
153 int32 AttemptCount = 0;
154
156 UPROPERTY(ReplicatedUsing = OnRep_SelectedWord1, BlueprintReadOnly, Category = "Quest")
157 FString SelectedWord1;
159 UPROPERTY(ReplicatedUsing = OnRep_WrongWord1, BlueprintReadOnly, Category = "Quest")
160 bool bWrongWord1 = false;
161
163 UPROPERTY(ReplicatedUsing = OnRep_SelectedWord2, BlueprintReadOnly, Category = "Quest")
164 FString SelectedWord2;
166 UPROPERTY(ReplicatedUsing = OnRep_WrongWord2, BlueprintReadOnly, Category = "Quest")
167 bool bWrongWord2 = false;
168
169
170public:
171 //--------------------------------------------------------------//
172 // Speak Quest Functions
173 //--------------------------------------------------------------//
174
175 bool GetCurrentSpeakQuestion(int32 StepIndex, FSpeakStageQuestion& Out) const;
176
178 void OnUpdateSpeakScenarioData();
179
180 UPROPERTY(Transient, ReplicatedUsing = OnRep_SpeakScenarioData, BlueprintReadOnly, Category = "SpeakQuest")
181 FResponseSpeakScenario SpeakScenarioData;
182
184
187 UPROPERTY(Transient, Replicated, BlueprintReadOnly, Category = "SpeakQuest")
188 TArray<struct FResponseSpeakingJudes> SpeakJudesResults;
189
190
192 UFUNCTION()
193 void OnRep_QuestState();
194
196 UPROPERTY(ReplicatedUsing = OnRep_QuestState, BlueprintReadOnly, Category = "ReadQuest")
197 bool bReadQuestCompleted = false;
198
200 UPROPERTY(ReplicatedUsing = OnRep_QuestState, BlueprintReadOnly, Category = "ListenQuest")
201 bool bListenQuestCompleted = false;
202
204 UPROPERTY(ReplicatedUsing = OnRep_QuestState, BlueprintReadOnly, Category = "SpeakQuest")
205 bool bSpeakQuestCompleted = false;
206
208 UPROPERTY(ReplicatedUsing = OnRep_QuestState, BlueprintReadOnly, Category = "WriteQuest")
209 bool bWriteQuestCompleted = false;
210
211
213 UPROPERTY(ReplicatedUsing = OnRep_QuestState, BlueprintReadOnly, Category = "ReadQuest")
214 bool bReadQuestIng = false;
215
217 UPROPERTY(ReplicatedUsing = OnRep_QuestState, BlueprintReadOnly, Category = "ListenQuest")
218 bool bListenQuestIng = false;
219
221 UPROPERTY(ReplicatedUsing = OnRep_QuestState, BlueprintReadOnly, Category = "SpeakQuest")
222 bool bSpeakQuestIng = false;
223
225 UPROPERTY(ReplicatedUsing = OnRep_QuestState, BlueprintReadOnly, Category = "WriteQuest")
226 bool bWriteQuestIng = false;
227};
EQuestRole
Read 퀘스트에서 플레이어의 역할을 정의합니다.
Definition EQuestRole.h:6
네트워크 요청과 응답에 사용되는 구조체 및 설정을 정의합니다.
void SetToken(FString InToken)
Write 퀘스트 정보 구조체입니다.
Speak 시나리오 응답 구조체입니다.
Speaking Questions 응답 구조체입니다.
Write Submit 응답 구조체입니다.
SpeakQuest 오디오 질문 데이터 구조체입니다.