commit
This commit is contained in:
@@ -524,70 +524,70 @@ HRESULT CBroomRaceManager::Load_RaceRing()
|
||||
|
||||
HRESULT CBroomRaceManager::Load_Balloons()
|
||||
{
|
||||
tinyxml2::XMLDocument xmlDoc;
|
||||
//tinyxml2::XMLDocument xmlDoc;
|
||||
|
||||
string strPath = "../Bin/Resources/Data/Map/Balloon/Ballon_Data.xml";
|
||||
//string strPath = "../Bin/Resources/Data/Map/Balloon/Ballon_Data.xml";
|
||||
|
||||
if ((tinyxml2::XML_SUCCESS != xmlDoc.LoadFile(strPath.c_str())))
|
||||
return E_FAIL;
|
||||
//if ((tinyxml2::XML_SUCCESS != xmlDoc.LoadFile(strPath.c_str())))
|
||||
// return E_FAIL;
|
||||
|
||||
Desc.pBroomRaceManager = this;
|
||||
// Desc.pBroomRaceManager = this;
|
||||
|
||||
/* Transform */
|
||||
auto* Rotation = Object->FirstChildElement("Scale");
|
||||
Rotation->QueryFloatAttribute("x", &Desc.vScale.x);
|
||||
Rotation->QueryFloatAttribute("y", &Desc.vScale.y);
|
||||
Rotation->QueryFloatAttribute("z", &Desc.vScale.z);
|
||||
// /* Transform */
|
||||
// auto* Rotation = Object->FirstChildElement("Scale");
|
||||
// Rotation->QueryFloatAttribute("x", &Desc.vScale.x);
|
||||
// Rotation->QueryFloatAttribute("y", &Desc.vScale.y);
|
||||
// Rotation->QueryFloatAttribute("z", &Desc.vScale.z);
|
||||
|
||||
auto* Scale = Object->FirstChildElement("Rotation");
|
||||
Scale->QueryFloatAttribute("x", &Desc.vRotation.x);
|
||||
Scale->QueryFloatAttribute("y", &Desc.vRotation.y);
|
||||
Scale->QueryFloatAttribute("z", &Desc.vRotation.z);
|
||||
// auto* Scale = Object->FirstChildElement("Rotation");
|
||||
// Scale->QueryFloatAttribute("x", &Desc.vRotation.x);
|
||||
// Scale->QueryFloatAttribute("y", &Desc.vRotation.y);
|
||||
// Scale->QueryFloatAttribute("z", &Desc.vRotation.z);
|
||||
|
||||
auto* Position = Object->FirstChildElement("Position");
|
||||
Position->QueryFloatAttribute("x", &Desc.vPosition.x);
|
||||
Position->QueryFloatAttribute("y", &Desc.vPosition.y);
|
||||
Position->QueryFloatAttribute("z", &Desc.vPosition.z);
|
||||
// auto* Position = Object->FirstChildElement("Position");
|
||||
// Position->QueryFloatAttribute("x", &Desc.vPosition.x);
|
||||
// Position->QueryFloatAttribute("y", &Desc.vPosition.y);
|
||||
// Position->QueryFloatAttribute("z", &Desc.vPosition.z);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRaceRing>(g_iStaticLevel, NEXT_LEVEL, LAYER_RING, &Desc)))
|
||||
return E_FAIL;
|
||||
}
|
||||
// if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRaceRing>(g_iStaticLevel, NEXT_LEVEL, LAYER_RING, &Desc)))
|
||||
// return E_FAIL;
|
||||
//}
|
||||
|
||||
tinyxml2::XMLElement* root = xmlDoc.FirstChildElement("Balloon");
|
||||
//tinyxml2::XMLElement* root = xmlDoc.FirstChildElement("Balloon");
|
||||
|
||||
if (nullptr == root)
|
||||
{
|
||||
MSG_BOX("Failed to Find root");
|
||||
return S_OK;
|
||||
}
|
||||
//if (nullptr == root)
|
||||
//{
|
||||
// MSG_BOX("Failed to Find root");
|
||||
// return S_OK;
|
||||
//}
|
||||
|
||||
for (auto* Object = root->FirstChildElement("Object"); Object; Object = Object->NextSiblingElement("Object"))
|
||||
{
|
||||
CMapElement_Balloon::BALLOON_DESC Desc = {};
|
||||
//for (auto* Object = root->FirstChildElement("Object"); Object; Object = Object->NextSiblingElement("Object"))
|
||||
//{
|
||||
// CMapElement_Balloon::BALLOON_DESC Desc = {};
|
||||
|
||||
auto* Value = Object->FirstChildElement("Value");
|
||||
Value->QueryBoolAttribute("isFloating", &Desc.isFloating);
|
||||
Value->QueryUnsignedAttribute("DiffuseIndex", &Desc.iDiffuseIndex);
|
||||
// auto* Value = Object->FirstChildElement("Value");
|
||||
// Value->QueryBoolAttribute("isFloating", &Desc.isFloating);
|
||||
// Value->QueryUnsignedAttribute("DiffuseIndex", &Desc.iDiffuseIndex);
|
||||
|
||||
/* Transform */
|
||||
auto* Rotation = Object->FirstChildElement("Scale");
|
||||
Rotation->QueryFloatAttribute("x", &Desc.vScale.x);
|
||||
Rotation->QueryFloatAttribute("y", &Desc.vScale.y);
|
||||
Rotation->QueryFloatAttribute("z", &Desc.vScale.z);
|
||||
// /* Transform */
|
||||
// auto* Rotation = Object->FirstChildElement("Scale");
|
||||
// Rotation->QueryFloatAttribute("x", &Desc.vScale.x);
|
||||
// Rotation->QueryFloatAttribute("y", &Desc.vScale.y);
|
||||
// Rotation->QueryFloatAttribute("z", &Desc.vScale.z);
|
||||
|
||||
auto* Scale = Object->FirstChildElement("Rotation");
|
||||
Scale->QueryFloatAttribute("x", &Desc.vRotation.x);
|
||||
Scale->QueryFloatAttribute("y", &Desc.vRotation.y);
|
||||
Scale->QueryFloatAttribute("z", &Desc.vRotation.z);
|
||||
// auto* Scale = Object->FirstChildElement("Rotation");
|
||||
// Scale->QueryFloatAttribute("x", &Desc.vRotation.x);
|
||||
// Scale->QueryFloatAttribute("y", &Desc.vRotation.y);
|
||||
// Scale->QueryFloatAttribute("z", &Desc.vRotation.z);
|
||||
|
||||
auto* Position = Object->FirstChildElement("Position");
|
||||
Position->QueryFloatAttribute("x", &Desc.vPosition.x);
|
||||
Position->QueryFloatAttribute("y", &Desc.vPosition.y);
|
||||
Position->QueryFloatAttribute("z", &Desc.vPosition.z);
|
||||
// auto* Position = Object->FirstChildElement("Position");
|
||||
// Position->QueryFloatAttribute("x", &Desc.vPosition.x);
|
||||
// Position->QueryFloatAttribute("y", &Desc.vPosition.y);
|
||||
// Position->QueryFloatAttribute("z", &Desc.vPosition.z);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMapElement_Balloon>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||
return E_FAIL;
|
||||
}
|
||||
// if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMapElement_Balloon>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||
// return E_FAIL;
|
||||
//}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user