[add] BroomRace 오브젝트 추가 배치

[add] CLand에 위치하는 InstanceProp 은 Land가 업데이트 하도록 변경
This commit is contained in:
Chanbin Kim
2026-01-11 17:15:10 +09:00
parent db60b01912
commit 17696d73e6
47 changed files with 1380 additions and 164 deletions
@@ -3,11 +3,13 @@
#include "GameInstance.h"
#include "RaceRing.h"
#include "MapElement_Balloon.h"
#include "Layer.h"
#include "BroomRacerAI.h"
#include "Player.h"
#include "Broom.h"
#include "InfoInstance.h"
#include "InstancedProp.h"
CBroomRaceManager::CBroomRaceManager(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CGameObject(pDevice, pContext)
@@ -501,6 +503,26 @@ void CBroomRaceManager::RaceReady()
{
MSG_BOX("Failed Load RaceRing");
}
if (FAILED(Load_Balloons()))
{
MSG_BOX("Failed Load Balloons");
}
CInstancedProp::INSTANCE_PROP_DESC Instance_Desc = {};
/* InstanceProp RouteMarker*/
Instance_Desc.isShake = false;
Instance_Desc.eShaderPass = SHADER_PASS_WORLDMODLE_INSTANCE::NONCULL;
Instance_Desc.bEnableRigidbody = false;
Instance_Desc.vRadius = _float2(0.f, 0.f);
Instance_Desc.vSpeed = _float2(0.f, 0.f);
Instance_Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SK_BRR_RouteMarker";
Instance_Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/RouteMarker.bin";
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Instance_Desc))) {
return;
}
CBroomRacerAI::RacerDesc Desc = {};
for (_uint i = 1; i < 4; i++)
{
@@ -658,3 +680,51 @@ HRESULT CBroomRaceManager::Load_RaceRing()
return S_OK;
}
HRESULT CBroomRaceManager::Load_Balloons()
{
tinyxml2::XMLDocument xmlDoc;
string strPath = "../Bin/Resources/Data/Map/Balloon/Ballon_Data.xml";
if ((tinyxml2::XML_SUCCESS != xmlDoc.LoadFile(strPath.c_str())))
return E_FAIL;
tinyxml2::XMLElement* root = xmlDoc.FirstChildElement("Balloon");
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 = {};
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);
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);
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMapElement_Balloon>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
return E_FAIL;
}
return S_OK;
}