KLingo Project Documentation 1.0.0
Unreal Engine 5.6 C++ Project Documentation
로딩중...
검색중...
일치하는것 없음
UGameDataManager.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
7#pragma once
8
9#include "CoreMinimal.h"
10#include "Macro.h"
11
12#include "FHitStopData.h"
13#include "FKnockbackData.h"
14#include "FCharacterInfoData.h"
15#include "FCharacterAssetData.h"
16#include "FColorData.h"
17#include "FColorStyleData.h"
19#include "FLevelData.h"
20#include "FListenData.h"
21#include "FReadData.h"
22#include "FWordStudyData.h"
23#include "FHowToPlayPageData.h"
24
25#include "Subsystems/GameInstanceSubsystem.h"
26#include "UGameDataManager.generated.h"
27
32UCLASS()
33class LATTELIBRARY_API UGameDataManager : public UGameInstanceSubsystem
34{
35 GENERATED_BODY()
36
37public:
40
41public:
42 virtual void Initialize(FSubsystemCollectionBase& Collection) override;
43 virtual void Deinitialize() override;
44
45 UFUNCTION(Exec)
46 void ReloadMasterData();
47
48#pragma region HIT_STOP
49public:
50 UPROPERTY(EditAnywhere, Category="MasterData|HitStop")
51 TSoftObjectPtr<UDataTable> HitStopTable;
52
53 UFUNCTION(BlueprintCallable, Category="MasterData|HitStop")
54 bool GetHitStopData(EDamageType Type, UPARAM(ref) FHitStopData& Out) const;
55 UFUNCTION(BlueprintCallable, BlueprintPure, Category="MasterData|HitStop")
56 float GetHitStopDelayTime(EDamageType Type) const;
57
58private:
59 void Clear_HitStopTable();
60 void LoadData_HitStopTable();
61 bool bLoadHitStop = false;
62
63 UPROPERTY(VisibleAnywhere, Category = "Cache", meta = (AllowPrivateAccess = "true"))
64 TMap<EDamageType, FHitStopData> HitStopCache;
65#pragma endregion HIT_STOP
66
67#pragma region KNOCKBACK
68public:
69 UPROPERTY(EditAnywhere, Category="MasterData|Knockback")
70 TSoftObjectPtr<UDataTable> KnockbackTable;
71
72 UFUNCTION(BlueprintCallable, Category="MasterData|Knockback")
73 bool GetKnockbackData(EDamageType Type, FKnockbackData& Out) const;
74
75private:
76 void Clear_KnockbackTable();
77 void LoadData_KnockbackTable();
78 bool bLoadKnockback = false;
79
80 UPROPERTY(VisibleAnywhere, Category = "Cache", meta = (AllowPrivateAccess = "true"))
81 TMap<EDamageType, FKnockbackData> KnockbackCache;
82#pragma endregion KNOCKBACK
83
84#pragma region CHARACTER_INFO_DATA
85public:
86 UPROPERTY(EditAnywhere, Category="MasterData|CharacterInfo")
87 TSoftObjectPtr<UDataTable> CharacterInfoTable;
88
89 UFUNCTION(BlueprintCallable, Category="MasterData|CharacterInfo")
90 bool GetCharacterInfoData(ECharacterType Type, FCharacterInfoData& Out) const;
91
92private:
93 void Clear_CharacterInfoData();
94 void LoadData_CharacterInfoData();
95 bool bLoadCharacterInfo = false;
96
97 UPROPERTY(VisibleAnywhere, Category = "Cache", meta = (AllowPrivateAccess = "true"))
98 TMap<ECharacterType, FCharacterInfoData> CharacterInfoCache;
99#pragma endregion CHARACTER_INFO_DATA
100
101#pragma region CHARACTER_ASSET_DATA
102public:
103 UPROPERTY(EditAnywhere, Category="MasterData|CharacterAsset")
104 TSoftObjectPtr<UDataTable> CharacterAssetTable;
105
106 UFUNCTION(BlueprintCallable, Category="MasterData|CharacterAsset")
107 bool GetCharacterAssetData(ECharacterType Type, FCharacterAssetData& Out) const;
108
109private:
110 void Clear_CharacterAssetData();
111 void LoadData_CharacterAssetData();
112 bool bLoadCharacterAsset = false;
113
114 UPROPERTY(VisibleAnywhere, Category = "Cache", meta = (AllowPrivateAccess = "true"))
115 TMap<ECharacterType, FCharacterAssetData> CharacterAssetCache;
116#pragma endregion CHARACTER_ASSET_DATA
117
118#pragma region COLOR_DATA
119public:
120 UPROPERTY(EditAnywhere, Category="MasterData|Color")
121 TSoftObjectPtr<UDataTable> ColorDataTable;
122
123 UFUNCTION(BlueprintCallable, Category="MasterData|Color")
124 bool GetColorData(int32 Index, FColorData& Out) const;
125
126 UFUNCTION(BlueprintCallable, Category="MasterData|Color")
127 TArray<FColorData> GetColorDataByLevel(int32 Level) const;
128
129 UFUNCTION(BlueprintCallable, Category="MasterData|Color")
130 TArray<int32> GetAllColorDataKeys() const;
131
132private:
133 void Clear_ColorData();
134 void LoadData_ColorData();
135 bool bLoadColorData = false;
136
137 UPROPERTY(VisibleAnywhere, Category = "Cache", meta = (AllowPrivateAccess = "true"))
138 TMap<int32, FColorData> ColorDataCache;
139#pragma endregion COLOR_DATA
140
141#pragma region COLOR_STYLE_DATA
142public:
143 UPROPERTY(EditAnywhere, Category="MasterData|ColorStyle")
144 TSoftObjectPtr<UDataTable> ColorStyleDataTable;
145
146 UFUNCTION(BlueprintCallable, Category="MasterData|ColorStyle")
147 bool GetColorStyleData(EColorStyleType Type, FColorStyleData& Out) const;
148
149 UFUNCTION(BlueprintCallable, Category="MasterData|ColorStyle")
150 TMap<EColorStyleType, FColorStyleData> GetAllColorStyleData() const;
151
152private:
153 void Clear_ColorStyleData();
154 void LoadData_ColorStyleData();
155 bool bLoadColorStyleData = false;
156
157 UPROPERTY(VisibleAnywhere, Category = "Cache", meta = (AllowPrivateAccess = "true"))
158 TMap<EColorStyleType, FColorStyleData> ColorStyleDataCache;
159#pragma endregion COLOR_STYLE_DATA
160
161#pragma region RESOURCE_TEXTURE_DATA
162public:
163 UPROPERTY(EditAnywhere, Category="MasterData|ResourceTexture")
164 TSoftObjectPtr<UDataTable> ResourceTextureDataTable;
165
166 UFUNCTION(BlueprintCallable, Category="MasterData|ResourceTexture")
167 bool GetResourceTextureData(EResourceTextureType Type, FResourceTextureData& Out) const;
168
169 UFUNCTION(BlueprintCallable, Category="MasterData|ResourceTexture")
170 UTexture2D* GetTexture(EResourceTextureType Type) const;
171
172private:
173 void Clear_ResourceTextureData();
174 void LoadData_ResourceTextureData();
175 bool bLoadResourceTextureData = false;
176
177 UPROPERTY(VisibleAnywhere, Category = "Cache", meta = (AllowPrivateAccess = "true"))
178 TMap<EResourceTextureType, FResourceTextureData> ResourceTextureDataCache;
179#pragma endregion RESOURCE_TEXTURE_DATA
180
181#pragma region LEVEL_DATA
182public:
183 UPROPERTY(EditAnywhere, Category="MasterData|Level")
184 TSoftObjectPtr<UDataTable> LevelDataTable;
185
186 UFUNCTION(BlueprintCallable, Category="MasterData|Level")
187 bool GetLevelData(int32 Step, int32 Level, FLevelData& Out) const;
188
189private:
190 void Clear_LevelData();
191 void LoadData_LevelData();
192 bool bLoadLevelData = false;
193
194 UPROPERTY(VisibleAnywhere, Category = "Cache", meta = (AllowPrivateAccess = "true"))
195 TMap<int32, FLevelData> LevelDataCache;
196#pragma endregion LEVEL_DATA
197
198#pragma region LISTEN_DATA
199public:
200 UPROPERTY(EditAnywhere, Category="MasterData|Listen")
201 TSoftObjectPtr<UDataTable> ListenDataTable;
202
203 UFUNCTION(BlueprintCallable, Category="MasterData|Listen")
204 bool GetListenData(int32 Index, FListenData& Out) const;
205
206 UFUNCTION(BlueprintCallable, Category="MasterData|Listen")
207 TArray<FListenData> GetListenDataByStepAndLevel(int32 Step, int32 Level) const;
208
209 UFUNCTION(BlueprintCallable, Category="MasterData|Listen")
210 TArray<FListenData> GetListenDataByCategory(const FString& Category) const;
211
212 UFUNCTION(BlueprintCallable, Category="MasterData|Listen")
213 TArray<int32> GetAllListenDataKeys() const;
214
215private:
216 void Clear_ListenData();
217 void LoadData_ListenData();
218 bool bLoadListenData = false;
219
220 UPROPERTY(VisibleAnywhere, Category = "Cache", meta = (AllowPrivateAccess = "true"))
221 TMap<int32, FListenData> ListenDataCache;
222#pragma endregion LISTEN_DATA
223
224#pragma region READ_DATA
225public:
226 UPROPERTY(EditAnywhere, Category="MasterData|Read")
227 TSoftObjectPtr<UDataTable> ReadDataTable;
228
229 UFUNCTION(BlueprintCallable, Category="MasterData|Read")
230 bool GetReadData(int32 Index, FReadData& Out) const;
231
232 UFUNCTION(BlueprintCallable, Category="MasterData|Read")
233 TArray<FReadData> GetReadDataByLevel(int32 Level) const;
234
235 UFUNCTION(BlueprintCallable, Category="MasterData|Read")
236 TArray<int32> GetAllReadDataKeys() const;
237
238private:
239 void Clear_ReadData();
240 void LoadData_ReadData();
241 bool bLoadReadData = false;
242
243 UPROPERTY(VisibleAnywhere, Category = "Cache", meta = (AllowPrivateAccess = "true"))
244 TMap<int32, FReadData> ReadDataCache;
245#pragma endregion READ_DATA
246
247#pragma region WORD_DATA
248public:
249 UPROPERTY(EditAnywhere, Category="MasterData|Word")
250 TSoftObjectPtr<UDataTable> WordStudyDataTable;
251
252 UFUNCTION(BlueprintCallable, Category="MasterData|Word")
253 bool GetWordStudyData(int32 Index, FWordStudyData& Out) const;
254
255 UFUNCTION(BlueprintCallable, Category="MasterData|Word")
256 TArray<FWordStudyData> GetAllWordStudyData() const;
257
258private:
259 void Clear_WordStudyData();
260 void LoadData_WordStudyData();
261 bool bLoadWordStudyData = false;
262
263 UPROPERTY(VisibleAnywhere, Category = "Cache", meta = (AllowPrivateAccess = "true"))
264 TMap<int32, FWordStudyData> WordStudyDataCache;
265#pragma endregion WORD_DATA
266
267#pragma region HOW_TO_PLAY_DATA
268public:
269 UPROPERTY(EditAnywhere, Category="MasterData|HowToPlay")
270 TSoftObjectPtr<UDataTable> HowToPlayPageDataTable;
271
272 UFUNCTION(BlueprintCallable, Category="MasterData|HowToPlay")
273 bool GetHowToPlayPageData(EHowToPlayPageType Type, FHowToPlayPageData& Out) const;
274
275 UFUNCTION(BlueprintCallable, Category="MasterData|HowToPlay")
276 TArray<FHowToPlayPageData> GetAllHowToPlayPageData() const;
277
278private:
279 void Clear_HowToPlayPageData();
280 void LoadData_HowToPlayPageData();
281 bool bLoadHowToPlayPageData = false;
282
283 UPROPERTY(VisibleAnywhere, Category = "Cache", meta = (AllowPrivateAccess = "true"))
284 TMap<EHowToPlayPageType, FHowToPlayPageData> HowToPlayPageDataCache;
285#pragma endregion HOW_TO_PLAY_DATA
286};
ECharacterType
EDamageType
Definition EDamageType.h:9
UCharacterData 클래스를 선언합니다.
FCharacterInfoData 구조체를 선언합니다.
FColorData 구조체를 선언합니다.
EColorStyleType
FHitStopData 구조체를 선언합니다.
EHowToPlayPageType
HowToPlay 페이지 타입
FKnockbackData 구조체를 선언합니다.
FLevelData 구조체를 선언합니다.
FListenData 구조체를 선언합니다.
FReadData 구조체를 선언합니다.
EResourceTextureType
FWordStudyData 구조체를 선언합니다.
YiSan 전반에서 사용하는 공용 인터페이스를 선언합니다.
데이터 테이블(.csv)에서 게임 데이터를 로드하고 캐시하여 런타임에 빠르게 접근할 수 있도록 제공하는 데이터 관리 서브시스템입니다.
DEFINE_SUBSYSTEM_GETTER_INLINE(UGameDataManager)
색상 데이터를 정의하는 구조체
Definition FColorData.h:19
HowToPlay 페이지 데이터
레벨 데이터를 정의하는 구조체
Definition FLevelData.h:19
듣기 학습 데이터를 정의하는 구조체
Definition FListenData.h:19
읽기 학습 데이터를 정의하는 구조체
Definition FReadData.h:19
단어 학습 데이터를 정의하는 구조체