[add] StatSystem

This commit is contained in:
kimnuri
2025-12-07 17:15:44 +09:00
parent cf8ea71f85
commit 0581b41b6b
25 changed files with 502 additions and 57 deletions
+33
View File
@@ -1704,6 +1704,11 @@ HRESULT CLoader::Loading_For_GamePlay()
if (FAILED(m_pGameInstance->Add_Prototype<CTroll>(g_iStaticLevel, CTroll::Create(m_pDevice, m_pContext))))
return E_FAIL;
#pragma endregion
#pragma region STAT PROTOTYPE
if (FAILED(Stat_FileLoad("../Bin/Resources/Data/Stat/Stat.xml"))) {
return E_FAIL;
}
#pragma endregion
@@ -1866,6 +1871,34 @@ HRESULT CLoader::Asset_FileLoad(const _char* pDirectoryPath, const _tchar* pPreN
return S_OK;
}
HRESULT CLoader::Stat_FileLoad(const _char* pDirectoryPath)
{
filesystem::path pathStatFile = pDirectoryPath;
tinyxml2::XMLDocument doc;
tinyxml2::XMLError Error = doc.LoadFile(pathStatFile.string().c_str());
if (Error != tinyxml2::XML_SUCCESS) {
return E_FAIL;
}
tinyxml2::XMLElement* pStatInfo = doc.FirstChildElement("StatInfo");
if (!pStatInfo) {
return E_FAIL;
}
_uint iNumChild = pStatInfo->ChildElementCount();
tinyxml2::XMLNode* pChild = pStatInfo->FirstChildElement();
for (_uint i = 0; i < iNumChild; ++i) {
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, CMyTools::ToWstring(pChild->Value()),
CStat::Create(m_pDevice, m_pContext, pChild)))) {
return E_FAIL;
}
pChild = pChild->NextSiblingElement();
}
return S_OK;
}
vector<FOLDER_LOAD*>* APIENTRY Deferred_FolderLoad_Main(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const _char* pDirectoryPath, const _char* pFileExt, _bool bUseTag)
{
if (FAILED(CoInitializeEx(nullptr, 0))) {