[Modify] NPC들 Ray로 감지

This commit is contained in:
qordlsgur
2026-01-04 22:05:16 +09:00
parent 108df7e84f
commit 972d1743e7
15 changed files with 211 additions and 94 deletions
+11 -5
View File
@@ -40,6 +40,7 @@ HRESULT CRandomNpc::Initialize(void* pArg)
m_pTransformCom->Rotation(XMLoadFloat4(&pDesc->vRotQ));
m_pModelCom->Set_AnimationIndex(0, true);
m_bNpc = true;
return S_OK;
}
@@ -62,7 +63,7 @@ void CRandomNpc::Update(_float fTimeDelta)
Describe_Entity();
#endif // _DEBUG
m_pNPCInteraction->Set_Visible(0 < m_iEntered);
/*m_pNPCInteraction->Set_Visible(0 < m_iEntered);*/
m_pRigidBody->Set_Position(m_pTransformCom->Get_State(STATE::POSITION), true);
}
@@ -161,6 +162,11 @@ void CRandomNpc::OnRayCollision(CGameObject* pCaster, _uint iCastedOrder, _float
}
}
_wstring CRandomNpc::Get_Name()
{
return m_pNpcStat->Get_Stat().pNpc_Name;
}
HRESULT CRandomNpc::Bind_ShaderResources()
{
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
@@ -266,11 +272,11 @@ HRESULT CRandomNpc::Ready_Components(void* pArg)
}
}
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CNPCInteraction>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, &m_pNPCInteraction))) {
return E_FAIL;
}
//if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CNPCInteraction>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, &m_pNPCInteraction))) {
// return E_FAIL;
//}
m_pNPCInteraction->NpcInfo(m_pNpcStat->Get_Stat().pNpc_Name);
//m_pNPCInteraction->NpcInfo(m_pNpcStat->Get_Stat().pNpc_Name);
return S_OK;
}