Merge branch 'UI' into Develope
This commit is contained in:
@@ -211,6 +211,7 @@ call Update_Lib.bat
|
||||
<ClCompile Include="..\private\Fog.cpp" />
|
||||
<ClCompile Include="..\private\Font.cpp" />
|
||||
<ClCompile Include="..\private\Font_Manager.cpp" />
|
||||
<ClCompile Include="..\private\NPCStat.cpp" />
|
||||
<ClCompile Include="..\private\QuadTree.cpp" />
|
||||
<ClCompile Include="..\private\OcclusionQuery.cpp" />
|
||||
<ClCompile Include="..\private\Quest.cpp" />
|
||||
@@ -428,6 +429,7 @@ call Update_Lib.bat
|
||||
<ClInclude Include="..\public\Font.h" />
|
||||
<ClInclude Include="..\public\Font_Manager.h" />
|
||||
<ClInclude Include="..\public\FSM.h" />
|
||||
<ClInclude Include="..\public\NPCStat.h" />
|
||||
<ClInclude Include="..\public\QuadTree.h" />
|
||||
<ClInclude Include="..\public\OcclusionQuery.h" />
|
||||
<ClInclude Include="..\public\Quest.h" />
|
||||
|
||||
@@ -310,6 +310,9 @@
|
||||
<Filter Include="01.Utility\01.Renderer\RenderEventDebugger">
|
||||
<UniqueIdentifier>{fd18d84d-d656-4dbd-9859-436191a27b91}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.Element\02.Component\13.NPCStat">
|
||||
<UniqueIdentifier>{a564976c-cade-4f34-85c8-891b28d96b93}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\Private\Base.cpp">
|
||||
@@ -591,6 +594,9 @@
|
||||
<ClCompile Include="..\Private\CallBack_QueryFilterCallback.cpp">
|
||||
<Filter>02.Element\02.Component\08.Character_Controller\CallBack</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\NPCStat.cpp">
|
||||
<Filter>02.Element\02.Component\13.NPCStat</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\Public\Base.h">
|
||||
@@ -1238,6 +1244,9 @@
|
||||
<ClInclude Include="..\Public\CallBack_QueryFilterCallback.h">
|
||||
<Filter>02.Element\02.Component\08.Character_Controller\CallBack</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\NPCStat.h">
|
||||
<Filter>02.Element\02.Component\13.NPCStat</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\Public\Assimp\color4.inl">
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
#include "pch.h"
|
||||
#include "NPCStat.h"
|
||||
|
||||
CNPCStat::CNPCStat(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CComponent{ pDevice, pContext }
|
||||
, m_NpcInfo{}
|
||||
{
|
||||
}
|
||||
|
||||
CNPCStat::CNPCStat(const CNPCStat& rhs)
|
||||
: CComponent(rhs)
|
||||
, m_NpcInfo{ rhs.m_NpcInfo }
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CNPCStat::Initialize_Prototype(tinyxml2::XMLNode* pChild)
|
||||
{
|
||||
auto pElement = pChild->ToElement();
|
||||
m_NpcInfo.pNpc_Name = CMyTools::ToWstring(pElement->Attribute("Name"));
|
||||
pElement->QueryIntAttribute("OBJECTID", &m_NpcInfo.iNpcType);
|
||||
pElement->QueryFloatAttribute("HP", &m_NpcInfo.fFontPos);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CNPCStat::Initialize(void* pArg)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CNPCStat* CNPCStat::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, tinyxml2::XMLNode* pChild)
|
||||
{
|
||||
CNPCStat* pInstance = new CNPCStat(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype(pChild)))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CNPCStat");
|
||||
Safe_Release(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CComponent* CNPCStat::Clone(void* pArg, class CGameObject* pOwner)
|
||||
{
|
||||
CNPCStat* pInstance = new CNPCStat(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CNPCStat");
|
||||
Safe_Release(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CNPCStat::Free()
|
||||
{
|
||||
__super::Free();
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CNPCStat::Describe_Entity()
|
||||
{
|
||||
}
|
||||
|
||||
CNPCStat::NPCINFO CNPCStat::Get_Stat()
|
||||
{
|
||||
return m_NpcInfo;
|
||||
}
|
||||
#endif // _DEBUG
|
||||
@@ -0,0 +1,40 @@
|
||||
#pragma once
|
||||
|
||||
#include "Component.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
|
||||
class ENGINE_DLL CNPCStat final : public CComponent
|
||||
{
|
||||
typedef struct tagNpcInfo
|
||||
{
|
||||
_wstring pNpc_Name;
|
||||
_int iNpcType{};
|
||||
_float fFontPos{};
|
||||
}NPCINFO;
|
||||
|
||||
private:
|
||||
CNPCStat(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CNPCStat(const CNPCStat& rhs);
|
||||
virtual ~CNPCStat() = default;
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype(tinyxml2::XMLNode* pChild);
|
||||
virtual HRESULT Initialize(void* pArg);
|
||||
|
||||
public:
|
||||
static CNPCStat* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, tinyxml2::XMLNode* pChild);
|
||||
virtual CComponent* Clone(void* pArg, class CGameObject* pOwner = nullptr) override;
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
|
||||
public:
|
||||
NPCINFO Get_Stat();
|
||||
|
||||
private:
|
||||
NPCINFO m_NpcInfo;
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "Cell.h"
|
||||
#include "Model.h"
|
||||
#include "Instance_Model.h"
|
||||
#include "NPCStat.h"
|
||||
#include "Stat.h"
|
||||
#include "StatEvent.h"
|
||||
#include "Character_Controller.h"
|
||||
|
||||
Reference in New Issue
Block a user