@@ -88,6 +88,12 @@ void CBombard::Late_Update(_float fTimeDelta)
|
||||
OnCollision(this);
|
||||
}
|
||||
|
||||
if (false == m_bHit) {
|
||||
_vector vStartPos = XMLoadFloat4(&m_vStartPos);
|
||||
_vector vEndPos = XMLoadFloat4(&m_vEndPos);
|
||||
SweepTarget(vStartPos, vEndPos, 0.125);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
HRESULT CBombard::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
|
||||
@@ -97,50 +97,6 @@ void CDecendo::Late_Update(_float fTimeDelta)
|
||||
|
||||
Get_PartObject<CTrailObject>()->Trail_Update(m_pProjectile->Get_Component<CTransform>()->Get_XMWorldMatrix(), fTimeDelta);
|
||||
|
||||
_vector vStartPos = m_pProjectile->Get_WorldPostion();
|
||||
|
||||
_vector vEndPos = XMLoadFloat4(&m_vTargetPos);
|
||||
|
||||
_vector vDir2 = { vEndPos - vStartPos };
|
||||
|
||||
_float fDistance = XMVectorGetX(XMVector3Length(vEndPos - vStartPos));
|
||||
|
||||
PSX::PxSweepBuffer pxBuffer = {};
|
||||
|
||||
_bool bHit = m_pGameInstance->SphereCast(0.2f, vStartPos, vDir2, fDistance, PSX::PxHitFlag::ePOSITION | PSX::PxHitFlag::eNORMAL, PSX::PxQueryFlag::eDYNAMIC, pxBuffer);
|
||||
|
||||
if (bHit) {
|
||||
const PSX::PxSweepHit& hit = pxBuffer.block;
|
||||
PSX::PxRigidActor* pActor = hit.actor;
|
||||
PSX::PxShape* pShape = hit.shape;
|
||||
|
||||
if (nullptr != pActor && nullptr != pActor->userData)
|
||||
{
|
||||
PhsXUserData* pUserData = static_cast<PhsXUserData*>(pActor->userData);
|
||||
|
||||
switch (pUserData->eKind)
|
||||
{
|
||||
case PHYSX_KIND::CCTActor:
|
||||
{
|
||||
switch (PXOBJECT(pUserData->iSubKind))
|
||||
{
|
||||
case PXOBJECT::MONSTER:
|
||||
case PXOBJECT::GOBLIN_WARRIOR:
|
||||
{
|
||||
pUserData->pOwner->OnCollision(this);
|
||||
}
|
||||
break;
|
||||
case PXOBJECT::TROLL:
|
||||
{
|
||||
pUserData->pOwner->OnCollision(this);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
XMStoreFloat4(&m_vEndPos, m_pProjectile->Get_WorldPostion());
|
||||
|
||||
_vector vDir = XMLoadFloat4(&m_vEndPos) - XMLoadFloat4(&m_vStartPos);
|
||||
@@ -151,6 +107,12 @@ void CDecendo::Late_Update(_float fTimeDelta)
|
||||
OnCollision();
|
||||
}
|
||||
|
||||
if (false == m_bHit) {
|
||||
_vector vStartPos = XMLoadFloat4(&m_vStartPos);
|
||||
_vector vEndPos = XMLoadFloat4(&m_vEndPos);
|
||||
SweepTarget(vStartPos, vEndPos, 0.2f);
|
||||
}
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
|
||||
@@ -47,6 +47,8 @@ HRESULT CEffectPool::Initialize(void* pArg)
|
||||
if (FAILED(Ready_Effect())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -317,12 +317,11 @@ _int CEffect_Container::CollisionCheck()
|
||||
case PXOBJECT::GOBLIN_WARRIOR:
|
||||
case PXOBJECT::GOBLIN_MAGICIAN:
|
||||
case PXOBJECT::TROLL:
|
||||
case PXOBJECT::WALL:
|
||||
{
|
||||
pUserData->pOwner->OnCollision(this);
|
||||
return i;
|
||||
}
|
||||
break;
|
||||
case PXOBJECT::WALL:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -348,6 +347,66 @@ _int CEffect_Container::CollisionCheck()
|
||||
|
||||
}
|
||||
|
||||
void CEffect_Container::SweepTarget(_vector StartPos, _vector EndPos, _float fRadius)
|
||||
{
|
||||
_vector vStartPos = StartPos;
|
||||
_vector vEndPos = EndPos;
|
||||
_vector vDir = { vEndPos - vStartPos };
|
||||
|
||||
_float fDistance = XMVectorGetX(XMVector3Length(vEndPos - vStartPos));
|
||||
|
||||
PSX::PxSweepBuffer pxBuffer = {};
|
||||
|
||||
_bool bHit = m_pGameInstance->SphereCast(fRadius, vStartPos, vDir, fDistance, PSX::PxHitFlag::ePOSITION | PSX::PxHitFlag::eNORMAL, PSX::PxQueryFlag::eDYNAMIC, pxBuffer);
|
||||
|
||||
if (bHit) {
|
||||
const PSX::PxSweepHit& hit = pxBuffer.block;
|
||||
PSX::PxRigidActor* pActor = hit.actor;
|
||||
PSX::PxShape* pShape = hit.shape;
|
||||
ON_COLLISION_INFO tagCollInfo = {};
|
||||
memcpy_s(&tagCollInfo.vWorldPos, sizeof(tagCollInfo.vWorldPos), &hit.position, sizeof(hit.position));
|
||||
memcpy_s(&tagCollInfo.vWorldNomal, sizeof(tagCollInfo.vWorldNomal), &hit.normal, sizeof(hit.normal));
|
||||
XMStoreFloat4(&tagCollInfo.vHitDir, vDir);
|
||||
tagCollInfo.fLength = fDistance;
|
||||
|
||||
|
||||
if (nullptr != pActor && nullptr != pActor->userData)
|
||||
{
|
||||
PhsXUserData* pUserData = static_cast<PhsXUserData*>(pActor->userData);
|
||||
|
||||
switch (pUserData->eKind)
|
||||
{
|
||||
case PHYSX_KIND::CCTActor:
|
||||
{
|
||||
switch (PXOBJECT(pUserData->iSubKind))
|
||||
{
|
||||
case PXOBJECT::MONSTER:
|
||||
break;
|
||||
case PXOBJECT::GOBLIN_WARRIOR:
|
||||
{
|
||||
pUserData->pOwner->OnCollision(this, &tagCollInfo);
|
||||
m_bHit = true;
|
||||
}
|
||||
break;
|
||||
case PXOBJECT::GOBLIN_MAGICIAN:
|
||||
{
|
||||
pUserData->pOwner->OnCollision(this, &tagCollInfo);
|
||||
m_bHit = true;
|
||||
}
|
||||
break;
|
||||
case PXOBJECT::TROLL:
|
||||
{
|
||||
pUserData->pOwner->OnCollision(this, &tagCollInfo);
|
||||
m_bHit = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CEffect_Container::Update_Event(_float fTimeDelta)
|
||||
{
|
||||
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
#include "State_Combat.h"
|
||||
#pragma endregion
|
||||
|
||||
#include "EffectParts.h"
|
||||
|
||||
|
||||
CGoblin::CGoblin(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CMonster(pDevice, pContext)
|
||||
@@ -296,6 +298,46 @@ HRESULT CGoblin::Ready_Parts()
|
||||
|
||||
Get_PartObject<CGoblin_Dagger>()->Set_Visible(false);
|
||||
|
||||
#pragma region EFFECT
|
||||
/* EFFECT */
|
||||
|
||||
CPartObject::PARTOBJECT_DESC PartsDesc{};
|
||||
|
||||
PartsDesc.pParentTransform = m_pTransformCom;
|
||||
|
||||
|
||||
|
||||
if (FAILED(Add_PartObject<CEffectParts>("Goblin_Particle",g_iStaticLevel, &m_pGoblin_Particle, &PartsDesc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pGoblin_Particle->Load("../Bin/Resources/Data/Effect/Goblin/GoblinSide/Goblin_Particle", static_cast<LEVEL>(NEXT_LEVEL));
|
||||
m_pGoblin_Particle->FollowParants(m_pModelCom->Get_BoneMatrixPtr("RightShoulder"));
|
||||
|
||||
|
||||
|
||||
if (FAILED(Add_PartObject<CEffectParts>("Goblin_Particle2", g_iStaticLevel, &m_pGoblin_Particle2, &PartsDesc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pGoblin_Particle2->Load("../Bin/Resources/Data/Effect/Goblin/GoblinSide/Goblin_Particle2", static_cast<LEVEL>(NEXT_LEVEL));
|
||||
m_pGoblin_Particle2->FollowParants(m_pModelCom->Get_BoneMatrixPtr("RightShoulder"));
|
||||
|
||||
|
||||
if (FAILED(Add_PartObject<CEffectParts>("Goblin_Smoke", g_iStaticLevel, &m_pSmoke, &PartsDesc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pSmoke->Load("../Bin/Resources/Data/Effect/Goblin/GoblinSide/Goblin_Smoke", static_cast<LEVEL>(NEXT_LEVEL));
|
||||
m_pSmoke->FollowParants(m_pModelCom->Get_BoneMatrixPtr("Spine2"));
|
||||
|
||||
|
||||
#pragma endregion
|
||||
return S_OK;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -354,6 +396,9 @@ void CGoblin::Free()
|
||||
|
||||
SAFE_RELEASE(m_pCharacter_Controller);
|
||||
SAFE_RELEASE(m_pRigidBody);
|
||||
SAFE_RELEASE(m_pSmoke);
|
||||
SAFE_RELEASE(m_pGoblin_Particle);
|
||||
SAFE_RELEASE(m_pGoblin_Particle2);
|
||||
Safe_Delete(m_pCallBack_Behavior);
|
||||
Safe_Delete(m_pCallBack_HitReport);
|
||||
}
|
||||
|
||||
@@ -101,6 +101,12 @@ void CLevioso::Late_Update(_float fTimeDelta)
|
||||
OnCollision(this);
|
||||
}
|
||||
|
||||
if (false == m_bHit) {
|
||||
_vector vStartPos = XMLoadFloat4(&m_vStartPos);
|
||||
_vector vEndPos = XMLoadFloat4(&m_vEndPos);
|
||||
SweepTarget(vStartPos, vEndPos, 0.2f);
|
||||
}
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
|
||||
|
||||
|
||||
@@ -817,6 +817,8 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
//#pragma region UI_ANI
|
||||
// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Altering_Spell"),
|
||||
// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Altering_Spell\\Altering_Spell%d.png"), 349))))
|
||||
@@ -1706,83 +1708,83 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#pragma region MAP_INSTANCE
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_SM_OakTree_MedA */
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_SM_OakTree_MedA"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_OakTree_MedA.bin",
|
||||
"../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_SM_BearBerry_A */
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_SM_BearBerry_A"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_BearBerry_A.bin",
|
||||
"../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_SM_HM_OwlPost_Window_A*/
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_SM_HM_OwlPost_Window_A"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_HM_OwlPost_Window_A.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_WA_Rectangle_Double_A*/
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_WA_Rectangle_Double_A"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_HM_WindowsStyleA_L_Rectangle_Double_A.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_WC_Retangle_Double_A*/
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_WC_Retangle_Double_A"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_HM_WindowsStyleC_Retangle_Double_A.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_WA_Square_Double_C*/
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_WA_Square_Double_C"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_HM_WindowsStyleA_L_Square_Double_C.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_Quid_Window_A*/
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_Quid_Window_A"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_HM_Quid_Window_A.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_Ollivanders_Box_Window*/
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_Ollivanders_Box_Window"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_HM_Ollivanders_Box_Window.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_WC_L_DoubleS_A*/
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_WC_L_DoubleS_A"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_HM_WindowsStyleC_L_Double_Single_A.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_WC_Round_Double_A*/
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_WC_Round_Double_A"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_HM_WindowsStyleC_Round_Double_A.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door1a*/
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door1a"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_HM_Door1a.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door2b*/
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door2b"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_HM_Door2b.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
#pragma endregion
|
||||
|
||||
//
|
||||
//#pragma region MAP_INSTANCE
|
||||
// /* For.Prototype_Component_VIBuffer_Model_Instancel_SM_OakTree_MedA */
|
||||
// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_SM_OakTree_MedA"),
|
||||
// CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
// "../Bin/Resources/Models/InstanceProp/SM_OakTree_MedA.bin",
|
||||
// "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
// return E_FAIL;
|
||||
//
|
||||
// /* For.Prototype_Component_VIBuffer_Model_Instancel_SM_BearBerry_A */
|
||||
// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_SM_BearBerry_A"),
|
||||
// CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
// "../Bin/Resources/Models/InstanceProp/SM_BearBerry_A.bin",
|
||||
// "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
// return E_FAIL;
|
||||
//
|
||||
// /* For.Prototype_Component_VIBuffer_Model_Instancel_SM_HM_OwlPost_Window_A*/
|
||||
// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_SM_HM_OwlPost_Window_A"),
|
||||
// CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
// "../Bin/Resources/Models/InstanceProp/SM_HM_OwlPost_Window_A.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
// return E_FAIL;
|
||||
//
|
||||
// /* For.Prototype_Component_VIBuffer_Model_Instancel_WA_Rectangle_Double_A*/
|
||||
// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_WA_Rectangle_Double_A"),
|
||||
// CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
// "../Bin/Resources/Models/InstanceProp/SM_HM_WindowsStyleA_L_Rectangle_Double_A.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
// return E_FAIL;
|
||||
//
|
||||
// /* For.Prototype_Component_VIBuffer_Model_Instancel_WC_Retangle_Double_A*/
|
||||
// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_WC_Retangle_Double_A"),
|
||||
// CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
// "../Bin/Resources/Models/InstanceProp/SM_HM_WindowsStyleC_Retangle_Double_A.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
// return E_FAIL;
|
||||
//
|
||||
// /* For.Prototype_Component_VIBuffer_Model_Instancel_WA_Square_Double_C*/
|
||||
// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_WA_Square_Double_C"),
|
||||
// CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
// "../Bin/Resources/Models/InstanceProp/SM_HM_WindowsStyleA_L_Square_Double_C.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
// return E_FAIL;
|
||||
//
|
||||
// /* For.Prototype_Component_VIBuffer_Model_Instancel_Quid_Window_A*/
|
||||
// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_Quid_Window_A"),
|
||||
// CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
// "../Bin/Resources/Models/InstanceProp/SM_HM_Quid_Window_A.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
// return E_FAIL;
|
||||
//
|
||||
// /* For.Prototype_Component_VIBuffer_Model_Instancel_Ollivanders_Box_Window*/
|
||||
// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_Ollivanders_Box_Window"),
|
||||
// CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
// "../Bin/Resources/Models/InstanceProp/SM_HM_Ollivanders_Box_Window.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
// return E_FAIL;
|
||||
//
|
||||
// /* For.Prototype_Component_VIBuffer_Model_Instancel_WC_L_DoubleS_A*/
|
||||
// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_WC_L_DoubleS_A"),
|
||||
// CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
// "../Bin/Resources/Models/InstanceProp/SM_HM_WindowsStyleC_L_Double_Single_A.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
// return E_FAIL;
|
||||
//
|
||||
// /* For.Prototype_Component_VIBuffer_Model_Instancel_WC_Round_Double_A*/
|
||||
// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_WC_Round_Double_A"),
|
||||
// CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
// "../Bin/Resources/Models/InstanceProp/SM_HM_WindowsStyleC_Round_Double_A.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
// return E_FAIL;
|
||||
//
|
||||
// /* For.Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door1a*/
|
||||
// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door1a"),
|
||||
// CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
// "../Bin/Resources/Models/InstanceProp/SM_HM_Door1a.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
// return E_FAIL;
|
||||
//
|
||||
// /* For.Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door2b*/
|
||||
// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door2b"),
|
||||
// CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
// "../Bin/Resources/Models/InstanceProp/SM_HM_Door2b.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
// return E_FAIL;
|
||||
//#pragma endregion
|
||||
//
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Box */
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Box"),
|
||||
|
||||
@@ -123,67 +123,15 @@ void CNomalJap::Late_Update(_float fTimeDelta)
|
||||
return;
|
||||
}
|
||||
if (false == m_bHit) {
|
||||
SweepTarget();
|
||||
_vector vStartPos = XMLoadFloat4(&m_vStartPos);
|
||||
_vector vEndPos = m_pProjectile->Get_WorldPostion();
|
||||
SweepTarget(vStartPos,vEndPos, 0.002f);
|
||||
}
|
||||
Get_PartObject<CTrailObject>()->Trail_Update(m_pProjectile->Get_Component<CTransform>()->Get_XMWorldMatrix(), fTimeDelta);
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CNomalJap::SweepTarget()
|
||||
{
|
||||
_vector vStartPos = m_pProjectile->Get_WorldPostion();
|
||||
_vector vEndPos = XMLoadFloat4(&m_vTargetPos);
|
||||
_vector vDir = { vEndPos - vStartPos };
|
||||
|
||||
_float fDistance = XMVectorGetX(XMVector3Length(vEndPos - vStartPos));
|
||||
|
||||
PSX::PxSweepBuffer pxBuffer = {};
|
||||
|
||||
_bool bHit = m_pGameInstance->SphereCast(0.002f, vStartPos, vDir, fDistance, PSX::PxHitFlag::ePOSITION | PSX::PxHitFlag::eNORMAL, PSX::PxQueryFlag::eDYNAMIC, pxBuffer);
|
||||
|
||||
if (bHit) {
|
||||
const PSX::PxSweepHit& hit = pxBuffer.block;
|
||||
PSX::PxRigidActor* pActor = hit.actor;
|
||||
PSX::PxShape* pShape = hit.shape;
|
||||
ON_COLLISION_INFO tagCollInfo = {};
|
||||
memcpy_s(&tagCollInfo.vWorldPos, sizeof(tagCollInfo.vWorldPos), &hit.position, sizeof(hit.position));
|
||||
memcpy_s(&tagCollInfo.vWorldNomal, sizeof(tagCollInfo.vWorldNomal), &hit.normal, sizeof(hit.normal));
|
||||
XMStoreFloat4(&tagCollInfo.vHitDir, vDir);
|
||||
tagCollInfo.fLength = fDistance;
|
||||
|
||||
|
||||
if (nullptr != pActor && nullptr != pActor->userData)
|
||||
{
|
||||
PhsXUserData* pUserData = static_cast<PhsXUserData*>(pActor->userData);
|
||||
|
||||
switch (pUserData->eKind)
|
||||
{
|
||||
case PHYSX_KIND::CCTActor:
|
||||
{
|
||||
switch (PXOBJECT(pUserData->iSubKind))
|
||||
{
|
||||
case PXOBJECT::MONSTER:
|
||||
break;
|
||||
case PXOBJECT::GOBLIN_WARRIOR:
|
||||
{
|
||||
pUserData->pOwner->OnCollision(this, &tagCollInfo);
|
||||
m_bHit = true;
|
||||
}
|
||||
break;
|
||||
case PXOBJECT::TROLL:
|
||||
{
|
||||
pUserData->pOwner->OnCollision(this, &tagCollInfo);
|
||||
m_bHit = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CNomalJap::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Pre_Setting(pObject, nullptr)))
|
||||
|
||||
@@ -72,8 +72,6 @@ HRESULT CPlayer::Initialize(void* pArg)
|
||||
|
||||
Set_Anim();
|
||||
|
||||
m_eSpell = STATEANIM::DESCENDO;
|
||||
|
||||
{
|
||||
CFSM::FSM_DESC FSMDesc{};
|
||||
FSMDesc.pStates = &m_States;
|
||||
|
||||
@@ -500,7 +500,7 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_AIM_LEFT];
|
||||
}
|
||||
else if (m_pFSM->IsEnable(FSMSTATE::JOG))
|
||||
else if (m_pFSM->IsEnable(FSMSTATE::JOG) && !m_pFSM->IsEnable(FSMSTATE::SPRINT))
|
||||
{
|
||||
if (degree > 35.f && degree < 55.f)
|
||||
{
|
||||
@@ -532,7 +532,7 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_AIM_RIGHT];
|
||||
}
|
||||
else if (m_pFSM->IsEnable(FSMSTATE::JOG))
|
||||
else if (m_pFSM->IsEnable(FSMSTATE::JOG) && !m_pFSM->IsEnable(FSMSTATE::SPRINT))
|
||||
{
|
||||
if (degree < -35.f && degree > -55.f)
|
||||
{
|
||||
@@ -565,7 +565,7 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_AIM_BWD];
|
||||
}
|
||||
else if (m_pFSM->IsEnable(FSMSTATE::JOG))
|
||||
else if (m_pFSM->IsEnable(FSMSTATE::JOG) && !m_pFSM->IsEnable(FSMSTATE::SPRINT))
|
||||
{
|
||||
if (m_pModelCom->IsFinishedAnim() && iCurrentAnimIndex == m_Animation[STATEANIM::JOG_BWD].first)
|
||||
{
|
||||
|
||||
@@ -174,16 +174,16 @@ HRESULT CTroll::Render()
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
if (true == m_pCharacter_Controller->IsActive()) {
|
||||
if (FAILED(m_pCharacter_Controller->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (FAILED(m_pRigidBody->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
//if (true == m_pCharacter_Controller->IsActive()) {
|
||||
// if (FAILED(m_pCharacter_Controller->Render())) {
|
||||
// return E_FAIL;
|
||||
// }
|
||||
//}
|
||||
//else {
|
||||
// if (FAILED(m_pRigidBody->Render())) {
|
||||
// return E_FAIL;
|
||||
// }
|
||||
//}
|
||||
#endif
|
||||
|
||||
return S_OK;
|
||||
@@ -316,7 +316,7 @@ HRESULT CTroll::Ready_Parts()
|
||||
|
||||
|
||||
|
||||
/*if (FAILED(Add_PartObject<CEffectParts>("Troll_Particle", g_iStaticLevel, &m_pTroll_Particle, &PartsDesc)))
|
||||
if (FAILED(Add_PartObject<CEffectParts>("Troll_Particle", g_iStaticLevel, &m_pTroll_Particle, &PartsDesc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -350,7 +350,7 @@ HRESULT CTroll::Ready_Parts()
|
||||
|
||||
m_pLeft_Smoke->Load("../Bin/Resources/Data/Effect/Troll/TrollSide/Troll_Smoke", static_cast<LEVEL>(NEXT_LEVEL));
|
||||
m_pLeft_Smoke->FollowParants(m_pModelCom->Get_BoneMatrixPtr("LeftArm"));
|
||||
*/
|
||||
|
||||
#pragma endregion
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@ class CEffect_Container abstract : public CContainerObject
|
||||
void Update_Event(_float fTimeDelta);
|
||||
HRESULT Reset_EffectParts();
|
||||
_int CollisionCheck();
|
||||
void SweepTarget(_vector StartPos, _vector EndPos, _float fRadius);
|
||||
|
||||
protected:
|
||||
_float4 m_vStartPos = {};
|
||||
@@ -44,7 +45,7 @@ class CEffect_Container abstract : public CContainerObject
|
||||
PSX::PxSweepBufferN<12> m_Hitbuffer = {};
|
||||
protected:
|
||||
_wstring m_wstrEffectName = {};
|
||||
|
||||
_bool m_bHit = { false };
|
||||
_bool m_isLoop = {};
|
||||
|
||||
_float m_fAccTime = {};
|
||||
|
||||
@@ -40,6 +40,11 @@ class CGoblin final : public CMonster
|
||||
_float2 m_vStunTimer = { 0.f, 4.f };
|
||||
_uint iIndex;
|
||||
|
||||
|
||||
class CEffectParts* m_pSmoke = { nullptr };
|
||||
class CEffectParts* m_pGoblin_Particle = { nullptr };
|
||||
class CEffectParts* m_pGoblin_Particle2 = { nullptr };
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
@@ -30,7 +30,6 @@ class CNomalJap final : public CEffect_Container
|
||||
HRESULT Ready_Child();
|
||||
HRESULT Bind_ShaderResources() override;
|
||||
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
|
||||
void SweepTarget();
|
||||
private:
|
||||
class CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
_wstring m_wstrEffectName = {};
|
||||
@@ -57,7 +56,6 @@ class CNomalJap final : public CEffect_Container
|
||||
_float m_fAngularSpeed = {};
|
||||
_float m_fLinearSpeed = 35.f;
|
||||
_float m_fTimeRate = {};
|
||||
_bool m_bHit = { false };
|
||||
|
||||
/*좌우 무빙 관련 변수들*/
|
||||
_float3 m_vRotateRight = {};
|
||||
|
||||
Reference in New Issue
Block a user