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