@@ -15,6 +15,7 @@
|
||||
#include "Mouse_Manager.h"
|
||||
#include "Collider_Manager.h"
|
||||
#include "Picking.h"
|
||||
#include "PhysX_Manager.h"
|
||||
|
||||
IMPLEMENT_SINGLETON(CGameInstance)
|
||||
|
||||
@@ -89,6 +90,10 @@ HRESULT CGameInstance::Initialize_Engine(const ENGINE_DESC& EngineDesc, ID3D11De
|
||||
if (nullptr == m_pCollider_Manager) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pPhysX_Manager = CPhysX_Manager::Create(*ppDevice, *ppContext);
|
||||
if (nullptr == m_pPhysX_Manager) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -112,6 +117,7 @@ void CGameInstance::Update_Engine(_float fTimeDelta)
|
||||
|
||||
m_pLevel_Manager->Update(fTimeDelta);
|
||||
m_pObject_Manager->Clear_DeadObj();
|
||||
m_pPhysX_Manager->Update(fTimeDelta);
|
||||
//m_pObstacle_Manager->Refresh_Region();
|
||||
}
|
||||
|
||||
@@ -169,6 +175,11 @@ const _char* CGameInstance::Load_BinaryModelFilePath(_uint iIndex)
|
||||
return iter->first;
|
||||
}
|
||||
|
||||
size_t CGameInstance::BinaryModelFilePathCount()
|
||||
{
|
||||
return m_sModelMap.size();
|
||||
}
|
||||
|
||||
|
||||
size_t CGameInstance::ModelFilePathCount()
|
||||
{
|
||||
@@ -524,6 +535,30 @@ SaveModel* CGameInstance::Load_SaveModel(const _char* filePath)
|
||||
auto iter = m_sModelMap.find(filePath);
|
||||
return &iter->second;
|
||||
}
|
||||
|
||||
#pragma region PhysX_Manager
|
||||
PSX::PxMaterial* CGameInstance::Get_Material(_float3& vMatInfo)
|
||||
{
|
||||
return m_pPhysX_Manager->Get_Material(vMatInfo);
|
||||
}
|
||||
HRESULT CGameInstance::Create_TriangleMesh(const _wstring& wstrMeshKey, CMesh* pMesh)
|
||||
{
|
||||
return m_pPhysX_Manager->Create_TriangleMesh(wstrMeshKey, pMesh);
|
||||
}
|
||||
PSX::PxShape* CGameInstance::Create_Shape(ACTOR eType, _float3& vhalfGeometryInfo, PSX::PxMaterial& pxMaterial, _bool bExclusive, PSX::PxShapeFlags ePxShapeFlag)
|
||||
{
|
||||
return m_pPhysX_Manager->Create_Shape(eType, vhalfGeometryInfo, pxMaterial, bExclusive, ePxShapeFlag);
|
||||
}
|
||||
const PSX::PxRigidDynamic* CGameInstance::Add_DynamicActor(CRigidBody& RigidBody)
|
||||
{
|
||||
return m_pPhysX_Manager->Add_DynamicActor(RigidBody);
|
||||
}
|
||||
const PSX::PxRigidStatic* CGameInstance::Add_StaticActor(CRigidBody& RigidBody)
|
||||
{
|
||||
return m_pPhysX_Manager->Add_StaticActor(RigidBody);
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
bool CGameInstance::Key_Pressing(int _iKey)
|
||||
{
|
||||
if (false == (GUI::IsWindowFocused(ImGuiFocusedFlags_AnyWindow))) {
|
||||
@@ -631,6 +666,7 @@ void CGameInstance::Release_Engine()
|
||||
{
|
||||
DestroyInstance();
|
||||
|
||||
SAFE_RELEASE(m_pPhysX_Manager);
|
||||
SAFE_RELEASE(m_pPicking);
|
||||
SAFE_RELEASE(m_pCollider_Manager);
|
||||
SAFE_RELEASE(m_pShadow);
|
||||
|
||||
Reference in New Issue
Block a user