push
This commit is contained in:
@@ -150,6 +150,8 @@ HRESULT CBombard::Ready_Child()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
SAFE_ADDREF(m_pPhysHitBox);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -201,15 +203,15 @@ void CBombard::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
Get_PartObject<CEffectParts>("Bombard_Circle0")->Set_Visible(false);
|
||||
|
||||
m_pPhysHitBox->Set_Dead();
|
||||
SAFE_RELEASE(m_pPhysHitBox);
|
||||
}
|
||||
|
||||
void CBombard::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
//if(m_pPhysHitBox != nullptr)
|
||||
// if (m_pPhysHitBox->Get_Depth() == false)
|
||||
// SAFE_RELEASE(m_pPhysHitBox);
|
||||
if (m_pPhysHitBox != nullptr)
|
||||
SAFE_RELEASE(m_pPhysHitBox);
|
||||
|
||||
SAFE_RELEASE(m_pLight_Projectile);
|
||||
|
||||
|
||||
@@ -250,8 +250,7 @@ void CDecendo::Free()
|
||||
__super::Free();
|
||||
|
||||
if (m_pPhysHitBox != nullptr)
|
||||
if (m_pPhysHitBox->isDead() == false)
|
||||
SAFE_RELEASE(m_pPhysHitBox);
|
||||
SAFE_RELEASE(m_pPhysHitBox);
|
||||
|
||||
SAFE_RELEASE(m_pProjectile_Blur);
|
||||
SAFE_RELEASE(m_pProjectile);
|
||||
|
||||
@@ -213,12 +213,12 @@ HRESULT CLevel_GamePlay::Ready_Layer_SkyBox(const _wstring& strLayerTag)
|
||||
|
||||
HRESULT CLevel_GamePlay::Ready_Layer_Monster()
|
||||
{
|
||||
/*for (_uint i = 0; i < 2; ++i)
|
||||
for (_uint i = 0; i < 2; ++i)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CGoblin>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER,&i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
return S_OK;
|
||||
|
||||
@@ -217,10 +217,10 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
|
||||
});
|
||||
|
||||
//if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Cursor"),
|
||||
// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/Cursor/UI_T_CursorRings.dds"), 0)))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Cursor"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/Cursor/UI_T_CursorRings.dds"), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
Asset_FileLoad("../Bin/Resources/Textures/Mission", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath)
|
||||
{
|
||||
|
||||
@@ -241,8 +241,7 @@ void CNomalJap::Free()
|
||||
__super::Free();
|
||||
|
||||
if (m_pPhysHitBox != nullptr)
|
||||
if (m_pPhysHitBox->isDead() == false)
|
||||
SAFE_RELEASE(m_pPhysHitBox);
|
||||
SAFE_RELEASE(m_pPhysHitBox);
|
||||
|
||||
Safe_Release(m_pProjectile);
|
||||
Safe_Release(m_pProjectile_Side);
|
||||
|
||||
@@ -344,6 +344,26 @@ void CPlayer::Update_CameraCoordinateSystem()
|
||||
XMStoreFloat3(&m_vCameraLookDir, xmvCameraLook);
|
||||
}
|
||||
|
||||
_matrix CPlayer::Get_WandPos()
|
||||
{
|
||||
CModel* pWand = Get_PartObject<CWand>()->Get_Component<CModel>();
|
||||
|
||||
if (pWand == nullptr)
|
||||
return _matrix();
|
||||
|
||||
_matrix BoneMatrix = XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("root"));
|
||||
|
||||
BoneMatrix = BoneMatrix * m_pTransformCom->Get_XMWorldMatrix();
|
||||
|
||||
_float3 vOffset = _float3(0.f, -0.27f, -0.32f);
|
||||
|
||||
BoneMatrix.r[3] += XMVector3Normalize(BoneMatrix.r[0]) * vOffset.x;
|
||||
BoneMatrix.r[3] += XMVector3Normalize(BoneMatrix.r[1]) * vOffset.y;
|
||||
BoneMatrix.r[3] += XMVector3Normalize(BoneMatrix.r[2]) * vOffset.z;
|
||||
|
||||
return BoneMatrix;
|
||||
}
|
||||
|
||||
CPlayer* CPlayer::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CPlayer* pInstance = new CPlayer(pDevice, pContext);
|
||||
|
||||
@@ -22,21 +22,28 @@
|
||||
|
||||
#include "EffectPool.h"
|
||||
|
||||
template<typename T>
|
||||
void CPlayer::Spawn_Effect()
|
||||
|
||||
_matrix CPlayer::Get_WandPos()
|
||||
{
|
||||
CPartObject::PARTOBJECT_DESC PartsDesc{};
|
||||
|
||||
PartsDesc.pParentTransform = m_pTransformCom;
|
||||
m_
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<T>(NEXT_LEVEL, NEXT_LEVEL, TEXT("Layer_Effect"), &PartsDesc, this, nullptr))) {
|
||||
assert(false);
|
||||
return;
|
||||
}
|
||||
_matrix BoneMatrix = XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("root"));
|
||||
|
||||
BoneMatrix = BoneMatrix * m_pTransformCom->Get_XMWorldMatrix();
|
||||
|
||||
|
||||
BoneMatrix.r[3] += XMVector3Normalize(BoneMatrix.r[0]) * m_vOffset.x;
|
||||
BoneMatrix.r[3] += XMVector3Normalize(BoneMatrix.r[1]) * m_vOffset.y;
|
||||
BoneMatrix.r[3] += XMVector3Normalize(BoneMatrix.r[2]) * m_vOffset.z;
|
||||
|
||||
m_pEffectParts->Get_Component<CTransform>()->Set_WorldMatrix(BoneMatrix);
|
||||
|
||||
return _matrix();
|
||||
}
|
||||
|
||||
|
||||
#pragma region States
|
||||
|
||||
void CPlayer::TestKeyInput(_float fTimeDelta)
|
||||
{
|
||||
if (m_pGameInstance->Key_Down(DIK_F1))
|
||||
|
||||
@@ -196,10 +196,6 @@ void CProtego::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
//if(m_pPhysHitBox != nullptr)
|
||||
// if (m_pPhysHitBox->Get_Depth() == false)
|
||||
// SAFE_RELEASE(m_pPhysHitBox);
|
||||
|
||||
SAFE_RELEASE(m_pSphere);
|
||||
SAFE_RELEASE(m_pBottom);
|
||||
SAFE_RELEASE(m_pCircle);
|
||||
|
||||
@@ -32,33 +32,6 @@ HRESULT CWand::Initialize(void* pArg)
|
||||
if (FAILED(Ready_Components()))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
CPartObject::PARTOBJECT_DESC PartsDesc{};
|
||||
|
||||
PartsDesc.pParentTransform = m_pTransformCom;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CTrailObject>(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Trail"), &PartsDesc, this , &m_pTrail))) {
|
||||
assert(false);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pTrail->Load_Trail("../Bin/Resources/Data/Effect/Trail/Bombard_Trail" , static_cast<LEVEL>(NEXT_LEVEL))))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CEffectParts>(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Trail"), &PartsDesc, this, &m_pEffectParts))) {
|
||||
assert(false);
|
||||
return E_FAIL;
|
||||
}
|
||||
SAFE_ADDREF(m_pTrail);
|
||||
SAFE_ADDREF(m_pEffectParts);
|
||||
|
||||
m_pEffectParts->Load("../Bin/Resources/Data/Effect/Lumos/Lumos", static_cast<LEVEL>(NEXT_LEVEL));
|
||||
|
||||
m_pEffectParts->Set_Visible(true);
|
||||
|
||||
m_vOffset = _float3(0.f, -0.27f, -0.32f);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -83,22 +56,6 @@ void CWand::Priority_Update(_float fTimeDelta)
|
||||
void CWand::Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
//m_pTrail->Trail_Update(CombinedMat, fTimeDelta);
|
||||
|
||||
|
||||
m_pModelCom->Combined_BoneMatrix();
|
||||
|
||||
_matrix BoneMatrix = XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("Effect"));
|
||||
|
||||
BoneMatrix = BoneMatrix * m_pTransformCom->Get_XMWorldMatrix();
|
||||
|
||||
|
||||
BoneMatrix.r[3] += XMVector3Normalize(BoneMatrix.r[0]) * m_vOffset.x;
|
||||
BoneMatrix.r[3] += XMVector3Normalize(BoneMatrix.r[1]) * m_vOffset.y;
|
||||
BoneMatrix.r[3] += XMVector3Normalize(BoneMatrix.r[2]) * m_vOffset.z;
|
||||
|
||||
m_pEffectParts->Get_Component<CTransform>()->Set_WorldMatrix(BoneMatrix);
|
||||
|
||||
}
|
||||
|
||||
void CWand::Late_Update(_float fTimeDelta)
|
||||
@@ -207,22 +164,12 @@ void CWand::Free()
|
||||
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pModelCom);
|
||||
SAFE_RELEASE(m_pEffectParts);
|
||||
SAFE_RELEASE(m_pTrail);
|
||||
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CWand::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("VALUE");
|
||||
|
||||
_float4 vValue = {};
|
||||
|
||||
if (GUI::InputFloat3("OFFSET", (_float*)&m_vOffset))
|
||||
{
|
||||
}
|
||||
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -32,7 +32,6 @@ class CBombard final : public CEffect_Container
|
||||
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
|
||||
private:
|
||||
_wstring m_wstrEffectName = {};
|
||||
class CPhysXEffectHitBox* m_pPhysHitBox = {};
|
||||
class CPartObject* m_pLight_Projectile = {};
|
||||
public:
|
||||
static CBombard* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
@@ -32,7 +32,6 @@ class CDecendo final : public CEffect_Container
|
||||
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
|
||||
private:
|
||||
_wstring m_wstrEffectName = {};
|
||||
class CPhysXEffectHitBox* m_pPhysHitBox = {};
|
||||
|
||||
class CPartObject* m_pProjectile = {};
|
||||
class CPartObject* m_pProjectile_Blur = {};
|
||||
|
||||
@@ -35,7 +35,7 @@ class CEffect_Container abstract : public CContainerObject
|
||||
void Update_Event(_float fTimeDelta);
|
||||
HRESULT Reset_EffectParts();
|
||||
protected:
|
||||
class CPhysXEffectHitBox* m_pPhysHitBox = {};
|
||||
class CPhysXEffectHitBox* m_pPhysHitBox = {};
|
||||
|
||||
protected:
|
||||
_wstring m_wstrEffectName = {};
|
||||
|
||||
@@ -33,7 +33,6 @@ class CNomalJap final : public CEffect_Container
|
||||
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
|
||||
private:
|
||||
_wstring m_wstrEffectName = {};
|
||||
class CPhysXEffectHitBox* m_pPhysHitBox = {};
|
||||
|
||||
class CPartObject* m_pProjectile = {};
|
||||
class CPartObject* m_pProjectile_Side = {};
|
||||
|
||||
@@ -20,8 +20,8 @@ class CPlayer final : public CUnit
|
||||
#ifdef _DEBUG
|
||||
void Render_CameraCoordinateSystem();
|
||||
#endif // _DEBUG
|
||||
_bool Set_Sprint(_bool bSprint) { m_bSprintToggle = bSprint; }
|
||||
|
||||
_bool Set_Sprint(_bool bSprint) { m_bSprintToggle = bSprint; }
|
||||
_matrix Get_WandPos();
|
||||
private:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
class CMonster* m_pLockOnMonster = { nullptr };
|
||||
@@ -71,8 +71,8 @@ class CPlayer final : public CUnit
|
||||
public:
|
||||
virtual void Reset_Sprint() { m_bSprintToggle = false; }
|
||||
virtual void Reset_Walk() { m_bWalkToggle = false; }
|
||||
template<typename T>
|
||||
void Spawn_Effect();
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -24,16 +24,13 @@ class CWand final : public CPartObject
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
public:
|
||||
|
||||
private:
|
||||
const _float4x4* m_pSocketMatrices = { };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CModel* m_pModelCom = { nullptr };
|
||||
|
||||
class CTrailObject* m_pTrail = { nullptr };
|
||||
class CEffectParts* m_pEffectParts = { nullptr };
|
||||
|
||||
_float3 m_vOffset = {};
|
||||
private:
|
||||
HRESULT Ready_Components();
|
||||
HRESULT Bind_ShaderResources();
|
||||
|
||||
@@ -211,10 +211,10 @@ HRESULT CPlayer::Ready_Parts()
|
||||
WandDesc.pParentTransform = m_pTransformCom;
|
||||
WandDesc.pSocketMatrices = m_pModelCom->Get_BoneMatrixPtr("SKT_RightHand");
|
||||
|
||||
//if (FAILED(Add_PartObject<CWand>("Wand", g_iStaticLevel, nullptr, &WandDesc)))
|
||||
//{
|
||||
// return E_FAIL;
|
||||
//}
|
||||
if (FAILED(Add_PartObject<CWand>("Wand", g_iStaticLevel, nullptr, &WandDesc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
{
|
||||
CCamPosition_Shoulder::CAMERA_SHOULDER_DESC Desc;
|
||||
@@ -233,6 +233,26 @@ HRESULT CPlayer::Ready_Parts()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_matrix CPlayer::Get_WandPos()
|
||||
{
|
||||
CModel* pWand = Get_PartObject<CWand>()->Get_Component<CModel>();
|
||||
|
||||
if (pWand == nullptr)
|
||||
return _matrix();
|
||||
|
||||
_matrix BoneMatrix = XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("root"));
|
||||
|
||||
BoneMatrix = BoneMatrix * m_pTransformCom->Get_XMWorldMatrix();
|
||||
|
||||
_float3 vOffset = _float3(0.f, -0.27f, -0.32f);
|
||||
|
||||
BoneMatrix.r[3] += XMVector3Normalize(BoneMatrix.r[0]) * vOffset.x;
|
||||
BoneMatrix.r[3] += XMVector3Normalize(BoneMatrix.r[1]) * vOffset.y;
|
||||
BoneMatrix.r[3] += XMVector3Normalize(BoneMatrix.r[2]) * vOffset.z;
|
||||
|
||||
return BoneMatrix;
|
||||
}
|
||||
|
||||
HRESULT CPlayer::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
|
||||
|
||||
@@ -36,23 +36,6 @@ HRESULT CWand::Initialize(void* pArg)
|
||||
|
||||
PartsDesc.pParentTransform = m_pTransformCom;
|
||||
|
||||
/*if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CTrailObject>(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Trail"), &PartsDesc, this, &m_pTrail))) {
|
||||
assert(false);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pTrail->Load_Trail("../Bin/Resources/Data/Effect/Trail/Bombard_Trail", static_cast<LEVEL>(NEXT_LEVEL))))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CEditEffect>(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Effect"), &PartsDesc, this, &m_pEffectParts))) {
|
||||
assert(false);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pEffectParts->Load("../Bin/Resources/Data/Effect/Lumos/Lumos", static_cast<LEVEL>(NEXT_LEVEL));
|
||||
m_pEffectParts->Set_Visible(true);*/
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -73,8 +56,6 @@ void CWand::Update(_float fTimeDelta)
|
||||
|
||||
Describe_Entity();
|
||||
|
||||
m_pModelCom->Combined_BoneMatrix();
|
||||
|
||||
//_matrix BoneMatrix = XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("root"));
|
||||
|
||||
//BoneMatrix = BoneMatrix * m_pTransformCom->Get_XMWorldMatrix();
|
||||
|
||||
@@ -18,7 +18,7 @@ class CPlayer final : public CUnit
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
_bool Set_Sprint(_bool bSprint) { m_bSprintToggle = bSprint; }
|
||||
|
||||
_matrix Get_WandPos();
|
||||
private:
|
||||
_float m_fDirectionRadian = 0.f;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user