diff --git a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl index fec7287d9..d70673f30 100644 --- a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl +++ b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl @@ -4,7 +4,7 @@ matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix; Texture2D g_DepthTexture; -float4 g_CamaraPosition; +float3 g_CamaraPosition; int g_iImageCountX; int g_iImageCountY; @@ -1506,30 +1506,28 @@ VS_OUT3D VS_MAIN3D(VS_IN3D In) { VS_OUT3D Out; - float3 CamaeraPos = float3(g_CamaraPosition.x, 1.f, g_CamaraPosition.z); - float3 UIPos = float3(g_WorldMatrix._41, g_WorldMatrix._42, g_WorldMatrix._43); + matrix matViewProj = mul(g_ViewMatrix, g_ProjMatrix); - float3 CameraDir = normalize(CamaeraPos - UIPos); - - float angle = atan2(CameraDir.x, CameraDir.z); - float cosA = cos(angle); - float sinA = sin(angle); - - - float3 rotation = float3(0.f, 0.f, 0.f); + float2 Offset = In.vTexcoord - 0.5f; + float3 worldCenter = float3(g_WorldMatrix._41, g_WorldMatrix._42, g_WorldMatrix._43); - rotation.x = In.vPosition.x * cosA - In.vPosition.z * sinA; - rotation.y = In.vPosition.y; - rotation.z = In.vPosition.x * sinA + In.vPosition.z * cosA; - float3 worldPos = rotation + UIPos; + float3 vLook = normalize(g_CamaraPosition - worldCenter); - matrix matWVP = mul(g_ViewMatrix, g_ProjMatrix); - float4 clipPos = mul(float4(worldPos, 1.0f), matWVP); + vLook.y = 0.f; + vLook = normalize(vLook); + + float3 upDir = float3(0.f, 1.f, 0.f); - Out.vPosition = clipPos; - Out.vTexcoord = In.vTexcoord; - + float3 rightDir = normalize(cross(vLook, upDir)); + + float3 dirRight = rightDir * g_fCurrent_Size.x * Offset.x; + float3 dirUp = upDir * g_fCurrent_Size.y * Offset.y; + + float3 vertexPos = worldCenter + dirRight + dirUp; + + Out.vPosition = mul(float4(vertexPos, 1.f), matViewProj); + Out.vTexcoord = 1.f - In.vTexcoord; return Out; } diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj index 62d7a3245..b9fad64cb 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj @@ -160,6 +160,8 @@ call Update_Resources.bat + + @@ -194,8 +196,10 @@ call Update_Resources.bat + + @@ -335,6 +339,8 @@ call Update_Resources.bat + + @@ -371,11 +377,13 @@ call Update_Resources.bat + + diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters index 3034c4ba0..87d452564 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters @@ -524,6 +524,15 @@ 02.GameObjects\UI\GamePlay_Canvas\Enemy_Penel\Boss_HpBar + + 02.GameObjects\Effect\PropsEffect\Box + + + 02.GameObjects\Effect\PropsEffect\Chair + + + 02.GameObjects\Effect\PropsEffect\Barral + 04.Mechanic\State\Broom_Player\State_Broom_Hover @@ -539,6 +548,9 @@ 02.GameObjects\NPC\Ally\Shopper + + 04.Mechanic\State\State_Combat\State_Shield + @@ -1122,6 +1134,18 @@ {b49a3671-96d0-47b8-833f-28190d549b0f} + + {215b093d-648c-4cca-a69b-f4005b34ee06} + + + {b3c9f1a4-afb1-45ba-8d8b-034267607976} + + + {c2841516-9f72-4c72-aa50-652b4ff33b5a} + + + {3103c6e1-60cb-438b-a3eb-844b919ccd43} + {24f6903f-8f6b-46ff-a387-ecb44d673887} @@ -1134,6 +1158,9 @@ {34a4beb9-ccb9-4847-ae45-af4e7dc25d94} + + {fd4a0869-2491-4fec-9df9-3aedbac96171} + {02cb243a-f63e-4e55-9d55-b47e31a4c13e} @@ -1605,6 +1632,15 @@ 02.GameObjects\UI\GamePlay_Canvas\Enemy_Penel\Boss_HpBar + + 02.GameObjects\Effect\PropsEffect\Box + + + 02.GameObjects\Effect\PropsEffect\Barral + + + 02.GameObjects\Effect\PropsEffect\Chair + 04.Mechanic\State\Broom_Player\State_Broom_Hover @@ -1617,6 +1653,9 @@ 02.GameObjects\UI\Enemy_Detection + + 04.Mechanic\State\State_Combat\State_Shield + 02.GameObjects\NPC\Ally\Shopper diff --git a/Jusin154_Team3D/Client/Private/Action_Panel.cpp b/Jusin154_Team3D/Client/Private/Action_Panel.cpp index 410766887..7f2fc0aea 100644 --- a/Jusin154_Team3D/Client/Private/Action_Panel.cpp +++ b/Jusin154_Team3D/Client/Private/Action_Panel.cpp @@ -65,6 +65,7 @@ HRESULT CAction_Panel::Initialize(void* pArg) m_pInfoInstance->Add_Event(TEXT("GetSpell"), [this](void* p) {this->Spell_Setting(p); }); m_pInfoInstance->Add_Event(TEXT("Monster_Hit"), [this](void* p) {this->Magic_Meter_Update(); }); m_pInfoInstance->Add_Event(TEXT("Ancient_Magic_Throw"), [this](void* p) {this->Ancient_Magic_Throw(); }); + m_pInfoInstance->Add_Event(TEXT("Use_Potion"), [this](void* p) {this->Use_Potion(); }); return S_OK; } @@ -267,6 +268,18 @@ void CAction_Panel::Spell_Setting(void* pArg) } } +void CAction_Panel::Use_Potion() +{ + if (m_pInfoInstance->Get_PlayerStatPtr()->Get_Stat().fCurrentHp >= m_pInfoInstance->Get_PlayerStatPtr()->Get_Stat().fMaxHp) + return; + + _float Heal = static_cast(m_pPotion)->Use_Potion(); + if (Heal == -1) + return; + + m_pInfoInstance->Get_PlayerStatPtr()->Add_Hp(Heal); +} + HRESULT CAction_Panel::Bind_ShaderResources() { return S_OK; diff --git a/Jusin154_Team3D/Client/Private/Barral_Splesh.cpp b/Jusin154_Team3D/Client/Private/Barral_Splesh.cpp new file mode 100644 index 000000000..49a0f1db5 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Barral_Splesh.cpp @@ -0,0 +1,186 @@ +#include "pch.h" +#include "Barral_Splesh.h" + +#include "GameInstance.h" +#include "EffectParts.h" +#include "Wand.h" +#include "Player.h" + +CBarral_Splesh::CBarral_Splesh(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CEffect_Container{ pDevice, pContext } +{ +} + +CBarral_Splesh::CBarral_Splesh(const CBarral_Splesh& rhs) + : CEffect_Container(rhs) +{ +} + +HRESULT CBarral_Splesh::Initialize_Prototype() +{ + + return S_OK; + +} + +HRESULT CBarral_Splesh::Initialize(void* pArg) +{ + if (FAILED(__super::Initialize(pArg))) + return E_FAIL; + + if (FAILED(Ready_Components(pArg))) + return E_FAIL; + + + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Barral"))) + return E_FAIL; + + + m_wstrEffectName = L"Barral_Splesh"; + + + m_fDuration = 5.f; + + return S_OK; +} + +void CBarral_Splesh::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); + +} + +void CBarral_Splesh::Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Update(fTimeDelta); + + Update_Event(fTimeDelta); + + +} + +void CBarral_Splesh::Late_Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Late_Update(fTimeDelta); + + +} + +HRESULT CBarral_Splesh::Pre_Setting(CGameObject* pObject, void* pArg) +{ + + if (FAILED(__super::Pre_Setting(pObject, nullptr))) + return E_FAIL; + + CEffectParts* pWood_PT0 = Get_PartObject("Wood_PT0"); + CEffectParts* pWood_PT1 = Get_PartObject("Wood_PT1"); + CEffectParts* pWood_PT2 = Get_PartObject("Wood_PT2"); + CEffectParts* pWater_Splesh = Get_PartObject("Water_Splesh"); + + + _vector vPos = m_pOwner->Get_WorldPostion(); + + pWood_PT0->Get_Component()->Set_State(STATE::POSITION, vPos); + pWood_PT1->Get_Component()->Set_State(STATE::POSITION, vPos); + pWood_PT2->Get_Component()->Set_State(STATE::POSITION, vPos); + pWater_Splesh->Get_Component()->Set_State(STATE::POSITION, vPos); + + + pWood_PT0->Set_Visible(true); + pWood_PT1->Set_Visible(true); + pWood_PT2->Set_Visible(true); + pWater_Splesh->Set_Visible(true); + + + return S_OK; +} + +HRESULT CBarral_Splesh::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CBarral_Splesh::Ready_Child() +{ + return S_OK; +} + +CBarral_Splesh* CBarral_Splesh::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CBarral_Splesh* pInstance = new CBarral_Splesh(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CBarral_Splesh"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + + +CGameObject* CBarral_Splesh::Clone(void* pArg, CGameObject* pOwner) +{ + CBarral_Splesh* pInstance = new CBarral_Splesh(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CBarral_Splesh"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CBarral_Splesh::OnCollision(CGameObject* pOther, void* pDesc) +{ + _int iIndex = CollisionCheck(); + + if (iIndex < 0) + return; + + if (m_isCollisionEnter == true) + return; + + m_isCollisionEnter = true; + + _vector vPos = XMVectorSet(m_Hitbuffer.touches[iIndex].position.x, m_Hitbuffer.touches[iIndex].position.y, m_Hitbuffer.touches[iIndex].position.z, 1.f); + + + for (auto& pPair : m_PartObjects) + { + pPair.second->Set_Visible(true); + pPair.second->Get_Component()->Set_State(STATE::POSITION, vPos); + } + + +} + +void CBarral_Splesh::Free() +{ + __super::Free(); + +} +#ifdef _DEBUG +void CBarral_Splesh::Describe_Entity() +{ + +} +#endif + +HRESULT CBarral_Splesh::Bind_ShaderResources() +{ + return S_OK; +} + + diff --git a/Jusin154_Team3D/Client/Private/Box_Splesh.cpp b/Jusin154_Team3D/Client/Private/Box_Splesh.cpp new file mode 100644 index 000000000..4d516417d --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Box_Splesh.cpp @@ -0,0 +1,182 @@ +#include "pch.h" +#include "Box_Splesh.h" + +#include "GameInstance.h" +#include "EffectParts.h" +#include "Wand.h" +#include "Player.h" + +CBox_Splesh::CBox_Splesh(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CEffect_Container{ pDevice, pContext } +{ +} + +CBox_Splesh::CBox_Splesh(const CBox_Splesh& rhs) + : CEffect_Container(rhs) +{ +} + +HRESULT CBox_Splesh::Initialize_Prototype() +{ + + return S_OK; + +} + +HRESULT CBox_Splesh::Initialize(void* pArg) +{ + if (FAILED(__super::Initialize(pArg))) + return E_FAIL; + + if (FAILED(Ready_Components(pArg))) + return E_FAIL; + + + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Box"))) + return E_FAIL; + + + m_wstrEffectName = L"Box_Splesh"; + + + m_fDuration = 5.f; + + return S_OK; +} + +void CBox_Splesh::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); + +} + +void CBox_Splesh::Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Update(fTimeDelta); + + Update_Event(fTimeDelta); + + +} + +void CBox_Splesh::Late_Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Late_Update(fTimeDelta); + + +} + +HRESULT CBox_Splesh::Pre_Setting(CGameObject* pObject, void* pArg) +{ + + if (FAILED(__super::Pre_Setting(pObject, nullptr))) + return E_FAIL; + + CEffectParts* pPaper = Get_PartObject("Paper"); + CEffectParts* pSmoke = Get_PartObject("Smoke"); + + + + _vector vPos = m_pOwner->Get_WorldPostion(); + + pPaper->Get_Component()->Set_State(STATE::POSITION, vPos); + pSmoke->Get_Component()->Set_State(STATE::POSITION, vPos); + + + pPaper->Set_Visible(true); + pSmoke->Set_Visible(true); + + + + return S_OK; +} + +HRESULT CBox_Splesh::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CBox_Splesh::Ready_Child() +{ + return S_OK; +} + +CBox_Splesh* CBox_Splesh::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CBox_Splesh* pInstance = new CBox_Splesh(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CBarral_Splesh"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + + +CGameObject* CBox_Splesh::Clone(void* pArg, CGameObject* pOwner) +{ + CBox_Splesh* pInstance = new CBox_Splesh(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CBarral_Splesh"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CBox_Splesh::OnCollision(CGameObject* pOther, void* pDesc) +{ + _int iIndex = CollisionCheck(); + + if (iIndex < 0) + return; + + if (m_isCollisionEnter == true) + return; + + m_isCollisionEnter = true; + + _vector vPos = XMVectorSet(m_Hitbuffer.touches[iIndex].position.x, m_Hitbuffer.touches[iIndex].position.y, m_Hitbuffer.touches[iIndex].position.z, 1.f); + + + for (auto& pPair : m_PartObjects) + { + pPair.second->Set_Visible(true); + pPair.second->Get_Component()->Set_State(STATE::POSITION, vPos); + } + + +} + +void CBox_Splesh::Free() +{ + __super::Free(); + +} +#ifdef _DEBUG +void CBox_Splesh::Describe_Entity() +{ + +} +#endif + +HRESULT CBox_Splesh::Bind_ShaderResources() +{ + return S_OK; +} + + diff --git a/Jusin154_Team3D/Client/Private/Chair_Splesh.cpp b/Jusin154_Team3D/Client/Private/Chair_Splesh.cpp new file mode 100644 index 000000000..bb123e405 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Chair_Splesh.cpp @@ -0,0 +1,186 @@ +#include "pch.h" +#include "Chair_Splesh.h" + +#include "GameInstance.h" +#include "EffectParts.h" +#include "Wand.h" +#include "Player.h" + +CChair_Splesh::CChair_Splesh(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CEffect_Container{ pDevice, pContext } +{ +} + +CChair_Splesh::CChair_Splesh(const CChair_Splesh& rhs) + : CEffect_Container(rhs) +{ +} + +HRESULT CChair_Splesh::Initialize_Prototype() +{ + + return S_OK; + +} + +HRESULT CChair_Splesh::Initialize(void* pArg) +{ + if (FAILED(__super::Initialize(pArg))) + return E_FAIL; + + if (FAILED(Ready_Components(pArg))) + return E_FAIL; + + + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Chair"))) + return E_FAIL; + + + m_wstrEffectName = L"Chair_Splesh"; + + + m_fDuration = 5.f; + + return S_OK; +} + +void CChair_Splesh::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); + +} + +void CChair_Splesh::Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Update(fTimeDelta); + + Update_Event(fTimeDelta); + + +} + +void CChair_Splesh::Late_Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Late_Update(fTimeDelta); + + +} + +HRESULT CChair_Splesh::Pre_Setting(CGameObject* pObject, void* pArg) +{ + + if (FAILED(__super::Pre_Setting(pObject, nullptr))) + return E_FAIL; + + CEffectParts* pHit = Get_PartObject("Hit"); + CEffectParts* pSmoke = Get_PartObject("Smoke"); + CEffectParts* pWood_PT0 = Get_PartObject("Wood_PT0"); + CEffectParts* pWood_PT1 = Get_PartObject("Wood_PT1"); + + + _vector vPos = m_pOwner->Get_WorldPostion(); + + pWood_PT0->Get_Component()->Set_State(STATE::POSITION, vPos); + pWood_PT1->Get_Component()->Set_State(STATE::POSITION, vPos); + pHit->Get_Component()->Set_State(STATE::POSITION, vPos); + pSmoke->Get_Component()->Set_State(STATE::POSITION, vPos); + + + pWood_PT0->Set_Visible(true); + pWood_PT1->Set_Visible(true); + pHit->Set_Visible(true); + pSmoke->Set_Visible(true); + + + return S_OK; +} + +HRESULT CChair_Splesh::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CChair_Splesh::Ready_Child() +{ + return S_OK; +} + +CChair_Splesh* CChair_Splesh::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CChair_Splesh* pInstance = new CChair_Splesh(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CBarral_Splesh"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + + +CGameObject* CChair_Splesh::Clone(void* pArg, CGameObject* pOwner) +{ + CChair_Splesh* pInstance = new CChair_Splesh(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CBarral_Splesh"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CChair_Splesh::OnCollision(CGameObject* pOther, void* pDesc) +{ + _int iIndex = CollisionCheck(); + + if (iIndex < 0) + return; + + if (m_isCollisionEnter == true) + return; + + m_isCollisionEnter = true; + + _vector vPos = XMVectorSet(m_Hitbuffer.touches[iIndex].position.x, m_Hitbuffer.touches[iIndex].position.y, m_Hitbuffer.touches[iIndex].position.z, 1.f); + + + for (auto& pPair : m_PartObjects) + { + pPair.second->Set_Visible(true); + pPair.second->Get_Component()->Set_State(STATE::POSITION, vPos); + } + + +} + +void CChair_Splesh::Free() +{ + __super::Free(); + +} +#ifdef _DEBUG +void CChair_Splesh::Describe_Entity() +{ + +} +#endif + +HRESULT CChair_Splesh::Bind_ShaderResources() +{ + return S_OK; +} + + diff --git a/Jusin154_Team3D/Client/Private/EffectObject.cpp b/Jusin154_Team3D/Client/Private/EffectObject.cpp index f67e22961..264111807 100644 --- a/Jusin154_Team3D/Client/Private/EffectObject.cpp +++ b/Jusin154_Team3D/Client/Private/EffectObject.cpp @@ -143,13 +143,26 @@ void CEffectObject::Add_Light() m_pGameInstance->Add_Light(CURRENT_LEVEL, m_pLightCom); } -void CEffectObject::FollowParents(const _float4x4* pParentsMat) +void CEffectObject::FollowParents(const _float4x4* pParentsMat,const _float4x4* pOffsetMat) { if (pParentsMat == nullptr) return; + if (pOffsetMat) + { + _matrix parent = XMLoadFloat4x4(pParentsMat); + _matrix offset = XMLoadFloat4x4(pOffsetMat); + + _matrix final = offset * parent; + + XMStoreFloat4x4(&m_FinalParentMatrix, final); + + m_pParentMatrix = &m_FinalParentMatrix; + } + else { + m_pParentMatrix = pParentsMat; + } - m_pParentMatrix = pParentsMat; m_bVisible = true; } diff --git a/Jusin154_Team3D/Client/Private/EffectPool.cpp b/Jusin154_Team3D/Client/Private/EffectPool.cpp index 47fb11e1d..2f0ca07fa 100644 --- a/Jusin154_Team3D/Client/Private/EffectPool.cpp +++ b/Jusin154_Team3D/Client/Private/EffectPool.cpp @@ -28,6 +28,9 @@ #include "Mage_Nomal_Attack.h" #include "MageSide.h" #include "StunEffect.h" +#include "Box_Splesh.h" +#include "Chair_Splesh.h" +#include "Barral_Splesh.h" CEffectPool::CEffectPool(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) : CGameObject(pDevice, pContext) @@ -55,12 +58,41 @@ HRESULT CEffectPool::Initialize(void* pArg) return E_FAIL; } - if (FAILED(Ready_Effect())) { - return E_FAIL; +#ifdef _DEBUG + +#ifdef gimch + m_isActiveEffectCreate = false; + m_isActiveMonsterEffectCreate = false; +#endif // gimch +#ifdef Bin + m_isActiveEffectCreate = true; + m_isActiveMonsterEffectCreate = true; +#endif // +#ifdef 진우 + m_isActiveEffectCreate = true; + m_isActiveMonsterEffectCreate = true; +#endif // +#ifdef 기무리 + m_isActiveEffectCreate = false; + m_isActiveMonsterEffectCreate = false; +#endif // +#ifdef 인혁 + m_isActiveEffectCreate = false; + m_isActiveMonsterEffectCreate = false; +#endif // + +#endif + + if (m_isActiveEffectCreate) + { + if (FAILED(Ready_Effect())) + return E_FAIL; } - if (FAILED(Ready_MonsterEffect())) { - return E_FAIL; + if (m_isActiveMonsterEffectCreate) + { + if (FAILED(Ready_MonsterEffect())) + return E_FAIL; } @@ -264,6 +296,36 @@ HRESULT CEffectPool::Ready_Effect() return pEffect; } ))) return E_FAIL; + + if (FAILED(Create_Effect(SKILL_TYPE::BOX_SPLESH, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + + CBox_Splesh* pEffect = nullptr; + + pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr); + + return pEffect; } + ))) return E_FAIL; + + + if (FAILED(Create_Effect(SKILL_TYPE::CHAIL_SPLESH, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + + CChair_Splesh* pEffect = nullptr; + + pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr); + + return pEffect; } + ))) return E_FAIL; + + + if (FAILED(Create_Effect(SKILL_TYPE::BARRAL_SPLASH, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + + CBarral_Splesh* pEffect = nullptr; + + pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr); + + return pEffect; } + ))) return E_FAIL; + #endif // !기무리 return S_OK; diff --git a/Jusin154_Team3D/Client/Private/Enemy_Detection.cpp b/Jusin154_Team3D/Client/Private/Enemy_Detection.cpp index 09c59bcfb..4b894fa05 100644 --- a/Jusin154_Team3D/Client/Private/Enemy_Detection.cpp +++ b/Jusin154_Team3D/Client/Private/Enemy_Detection.cpp @@ -32,14 +32,15 @@ HRESULT CEnemy_Detection::Initialize(void* pArg) return E_FAIL; } - m_fOrigin_Size = _float3(150.f, 150.f, 1.f); + m_fOrigin_Size = _float3(1.f, 1.f, 1.f); m_fSize.x = m_fOrigin_Size.x; m_fSize.y = m_fOrigin_Size.y; - m_pTransformCom->Set_Scale(m_fOrigin_Size); - + _float3 scals = _float3(1.f, 1.f, 1.f); + m_pTransformCom->Set_Scale(scals); + m_fSize.z = 1.f; m_fAlpha = 1.f; m_bStep1 = true; - m_vImageposi = _float4(37.5f, 37.5f, 75.f, 75.f); + m_vImageposi = _float4(0.3f, 0.3f, 0.4f, 0.4f); return S_OK; } @@ -47,17 +48,22 @@ HRESULT CEnemy_Detection::Initialize(void* pArg) void CEnemy_Detection::Priority_Update(_float fTimeDelta) { - XMFLOAT4X4 Head = *static_cast(m_pOwner)->Get_HeadMatrix(); - - XMVECTOR HeadPos = XMVectorSet(static_cast(m_pOwner)->Get_WorldPostion().m128_f32[0], static_cast(m_pOwner)->Get_WorldPostion().m128_f32[1], static_cast(m_pOwner)->Get_WorldPostion().m128_f32[2], 1.f); + XMVECTOR MonsterPos = static_cast(m_pOwner)->Get_WorldPostion(); + + _float fOffsetY = 3.0f; // 적절한 Y 오프셋 값 (몬스터 머리 위로 올리기 위함) + + XMVECTOR HeadPos = XMVectorAdd(MonsterPos, XMVectorSet(0.f, fOffsetY, 0.f, 0.f)); m_vPosition = HeadPos; + m_fSize = _float3(2.f, 2.f, 2.f); + m_vImageposi = _float4(0.5f, 0.5f, 1.f, 1.f); + m_pTransformCom->Set_State(STATE::POSITION, m_vPosition); } void CEnemy_Detection::Update(_float fTimeDelta) { - if (m_fActive == true) + if (m_bActive == true) { m_fTime += fTimeDelta; @@ -86,13 +92,13 @@ void CEnemy_Detection::Update(_float fTimeDelta) } } } - else if (m_fActive == false) + else if (m_bActive == false) { m_fTime = 0.f; m_bStep1 = true; m_bStep2 = false; m_bStep3 = false; - m_fSizeUp = false; + m_bSizeUp = false; m_fAlpha = 1.f; SizeUpX(m_fOrigin_Size.x); SizeUpY(m_fOrigin_Size.y); @@ -102,19 +108,19 @@ void CEnemy_Detection::Update(_float fTimeDelta) if (m_bStep3 == true) { - if (m_fSizeUp == false) + if (m_bSizeUp == false) { - SizeUpX(m_fSize.x + 10.f); - SizeUpY(m_fSize.y + 10.f); - m_vImageposi.z += 10.f; - m_vImageposi.w += 10.f; - m_fSizeUp = true; + SizeUpX(m_fSize.x + 1.f); + SizeUpY(m_fSize.y + 1.f); + m_vImageposi.z += 0.4f; + m_vImageposi.w += 0.4f; + m_bSizeUp = true; } } if (m_fSize.x != m_fOrigin_Size.x) { - SizeUpdate(-fTimeDelta * 10.f); + SizeUpdate(-fTimeDelta); m_vImageposi.z -= fTimeDelta; m_vImageposi.w -= fTimeDelta; } @@ -122,8 +128,6 @@ void CEnemy_Detection::Update(_float fTimeDelta) if (m_fAlpha <= 0.f) m_fAlpha = 0.f; - _float3 Size = _float3(100.f,100.f, 1.f); - m_pTransformCom->Set_Scale(Size); } void CEnemy_Detection::Late_Update(_float fTimeDelta) @@ -174,11 +178,21 @@ void CEnemy_Detection::SizeUpdate(_float fSizeX) { m_fSize.x = m_fOrigin_Size.x; m_fSize.y = m_fOrigin_Size.y; - m_vImageposi.z = 75.f; - m_vImageposi.w = 75.f; + m_vImageposi.z = 1.f; + m_vImageposi.w = 1.f; } } +void CEnemy_Detection::Set_Active(_bool bAtcive) +{ + m_bActive = bAtcive; +} + +_bool CEnemy_Detection::Get_Step() +{ + return m_bStep3; +} + HRESULT CEnemy_Detection::Ready_Components() { __super::Ready_Components(nullptr); @@ -224,7 +238,7 @@ HRESULT CEnemy_Detection::Bind_ShaderResources() if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) { return E_FAIL; } - if (FAILED(m_pShaderCom->Bind_RawValue("g_CamaraPosition", m_pGameInstance->Get_CamPosition(), sizeof(_float4)))) + if (FAILED(m_pShaderCom->Bind_RawValue("g_CamaraPosition", m_pGameInstance->Get_CamPosition(), sizeof(_float3)))) { return E_FAIL; } @@ -291,7 +305,6 @@ HRESULT CEnemy_Detection::Bind_ShaderResources() return E_FAIL; } return S_OK; - return S_OK; } CEnemy_Detection* CEnemy_Detection::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) diff --git a/Jusin154_Team3D/Client/Private/Enemy_HpBar.cpp b/Jusin154_Team3D/Client/Private/Enemy_HpBar.cpp index d58a517fc..ff539516d 100644 --- a/Jusin154_Team3D/Client/Private/Enemy_HpBar.cpp +++ b/Jusin154_Team3D/Client/Private/Enemy_HpBar.cpp @@ -44,9 +44,9 @@ HRESULT CEnemy_HpBar::Initialize(void* pArg) m_fAlpha = 0.f; m_fAlphaTime = 10.f; m_vNine_Slice = _float4(15.f, 100.f, 5.f, 15.f); - m_fMaxHp = -1.f; - m_fCurrentHp = -1.f; - m_fTargetHp = -1.f; + m_fMaxHp = 1.f; + m_fCurrentHp = 1.f; + m_fTargetHp = 1.f; SizeUpX(360.f); m_fMoveSpeed = 5.f; m_bAnimation = false; diff --git a/Jusin154_Team3D/Client/Private/Goblin.cpp b/Jusin154_Team3D/Client/Private/Goblin.cpp index 5a5395478..dd69b5710 100644 --- a/Jusin154_Team3D/Client/Private/Goblin.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin.cpp @@ -64,7 +64,7 @@ HRESULT CGoblin::Initialize(void* pArg) m_pCallBack_Behavior->Initialize(m_pCharacter_Controller, m_pRigidBody); m_pCallBack_HitReport->Initialize(m_pCharacter_Controller, m_pRigidBody); - m_pCharacter_Controller->Set_Position(XMVectorSet(-40.f, 5.f, -20.f, 1.f)); + m_pCharacter_Controller->Set_Position(XMVectorSet(-60.f, 5.f, -40.f, 1.f)); m_pEffectPool = m_pGameInstance->Get_Layer(NEXT_LEVEL, TEXT("Layer_EffectPool"))->Get_Object(); SAFE_ADDREF(m_pEffectPool); @@ -120,6 +120,8 @@ void CGoblin::Update(_float fTimeDelta) m_fSkillCoolTime[i] = max(0.f, m_fSkillCoolTime[i] - fTimeDelta); + m_pDetection->Set_Active(m_bDetection); + } void CGoblin::Late_Update(_float fTimeDelta) @@ -255,6 +257,8 @@ void CGoblin::OnCollision(CGameObject* pOther, void* pDesc) m_pGoblinSpector->Set_Visible(false); ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc); + Check_HitAngle(XMLoadFloat4(&CollisionDesc->vHitDir)); + _uint iSkillType = dynamic_cast(pOther)->Get_SkillType(); auto damagePair = Get_Damage(m_pInfoInstance->Get_Spell_Damage(iSkillType)); @@ -263,29 +267,24 @@ void CGoblin::OnCollision(CGameObject* pOther, void* pDesc) switch (iSkillType) { case ENUM_CLASS(SKILL_TYPE::DESCENDO): - m_eHitSpell = STATEANIM::KNOCKDOWN_FWD; + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::DESCENDO); break; case ENUM_CLASS(SKILL_TYPE::BOMBARDA): - m_eHitSpell = STATEANIM::KNOCKDOWN_BWD; + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::BOMBARDA); break; case ENUM_CLASS(SKILL_TYPE::JAP): { - m_eHitSpell = STATEANIM::HIT_BWD; - + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::JAP); m_DamageInfo.fDamage = damagePair.first; m_pInfoInstance->Event_CallBack(TEXT("Monster_Hit"), &m_DamageInfo); if (0 == damagePair.second) { m_pFSM->Change_State(FSMSTATE::DEAD); return; } - } break; case ENUM_CLASS(SKILL_TYPE::LEVIOSO): - m_eHitSpell = STATEANIM::HIT_LEVIOSO; - break; - default: - m_eHitSpell = STATEANIM::KNOCKDOWN_FWD; + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::LEVIOSO); break; } if (!m_pFSM->IsEnable(FSMSTATE::BLINK)) { @@ -298,6 +297,11 @@ void CGoblin::OnHit(CGameObject* pOther, CGameObject* pCaller) { } +void CGoblin::Set_Detection(_bool bDetection) +{ + m_bDetection = bDetection; +} + HRESULT CGoblin::Ready_Components() { CTransform::TRANSFORM_DESC Desc = {}; @@ -411,8 +415,8 @@ HRESULT CGoblin::Ready_Parts() #pragma endregion - if (FAILED(Add_PartObject("Enemy_Detection", g_iStaticLevel, &m_pDetection, &PartsDesc))) - { + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER, &PartsDesc, this, &m_pDetection))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/Goblin_BattleAxe.cpp b/Jusin154_Team3D/Client/Private/Goblin_BattleAxe.cpp index c28d48b11..f80a96b46 100644 --- a/Jusin154_Team3D/Client/Private/Goblin_BattleAxe.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin_BattleAxe.cpp @@ -34,6 +34,11 @@ HRESULT CGoblin_BattleAxe::Initialize(void* pArg) return E_FAIL; } +#ifdef _DEBUG + m_pGripShape = (GeometricPrimitive::CreateSphere(m_pContext, 0.3f, 10, false, false)); + m_pSubShape = (GeometricPrimitive::CreateSphere(m_pContext, 0.6f, 10, false, false)); +#endif // _DEBUG + return S_OK; } @@ -49,11 +54,9 @@ void CGoblin_BattleAxe::Priority_Update(_float fTimeDelta) } m_pTransformCom->Set_WorldMatrix(socketMatrix * XMLoadFloat4x4(m_pParentTransformCom->Get_WorldMatrixPtr())); - - + XMStoreFloat4x4(&m_vAxeMat, XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("Bone")) * m_pTransformCom->Get_XMWorldMatrix()); #ifdef _DEBUG Describe_Entity(); - #endif // _DEBUG } @@ -68,16 +71,6 @@ void CGoblin_BattleAxe::Update(_float fTimeDelta) m_bVisible = false; } } - - _matrix AxeMat = XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("Bone")); - - - for (int i = 0; i < 3; ++i) { - AxeMat.r[i] = XMVector3Normalize(AxeMat.r[i]); - } - - XMStoreFloat4x4(&m_vAxeMat, AxeMat * m_pTransformCom->Get_XMWorldMatrix()); - } void CGoblin_BattleAxe::Late_Update(_float fTimeDelta) @@ -126,6 +119,10 @@ HRESULT CGoblin_BattleAxe::Render() m_pShaderCom->Bind_RawValue("g_fDisolveRatio", &zero, sizeof(_float)); } +#ifdef _DEBUG + m_pGripShape->Draw(m_pTransformCom->Get_XMWorldMatrix(), m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW), m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ), DirectX::Colors::Green, nullptr, true); + m_pSubShape->Draw(XMLoadFloat4x4(&m_vAxeMat), m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW), m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ), DirectX::Colors::Purple, nullptr, true); +#endif // _DEBUG return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Goblin_Dagger.cpp b/Jusin154_Team3D/Client/Private/Goblin_Dagger.cpp index 9000f9a41..bdf60e515 100644 --- a/Jusin154_Team3D/Client/Private/Goblin_Dagger.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin_Dagger.cpp @@ -38,7 +38,7 @@ HRESULT CGoblin_Dagger::Initialize(void* pArg) void CGoblin_Dagger::Priority_Update(_float fTimeDelta) { - //m_pModelCom->Combined_BoneMatrix(); + XMStoreFloat4(&m_vStartPos, m_pTransformCom->Get_State(STATE::POSITION)); if (m_bAttach) { _matrix socketMatrix = {}; @@ -73,6 +73,7 @@ void CGoblin_Dagger::Update(_float fTimeDelta) void CGoblin_Dagger::Late_Update(_float fTimeDelta) { + Dagger_Hit(); m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this); } @@ -153,6 +154,73 @@ HRESULT CGoblin_Dagger::Bind_ShaderResources() return S_OK; } +void CGoblin_Dagger::Dagger_Hit() +{ + _vector vStartPos = XMLoadFloat4(&m_vStartPos); + _vector vEndPos = m_pTransformCom->Get_State(STATE::POSITION); + _vector vDir = vEndPos - vStartPos; + _float fLength = XMVectorGetX(XMVector4Length(vDir)); + vDir = XMVector4Normalize(vDir); + m_SweepBuffer = {}; + _bool bHit = m_pGameInstance->SphereCast(0.5f, vStartPos, vDir, fLength, PSX::PxHitFlag::eDEFAULT, PSX::PxQueryFlag::eDYNAMIC, m_SweepBuffer); + if (true == bHit) { + vector Hits; + _uint iHitCount = m_SweepBuffer.nbTouches; + if (true == m_SweepBuffer.hasBlock) { + iHitCount += 1; + Hits.reserve(iHitCount); + Hits.emplace_back(&m_SweepBuffer.block); + } + else { + Hits.reserve(iHitCount); + } + for (_uint i = 0; i < m_SweepBuffer.nbTouches; ++i) { + Hits.emplace_back(&m_SweepBuffer.touches[i]); + } + + for (_uint i = 0; i < Hits.size(); ++i) { + PSX::PxSweepHit* pHit = Hits[i]; + PSX::PxActor* pActor = pHit->actor; + if (nullptr != pActor && nullptr != pActor->userData) { + const PSX::PxSweepHit& hit = m_SweepBuffer.block; + PSX::PxShape* pShape = hit.shape; + ON_COLLISION_INFO tagCollInfo = {}; + + tagCollInfo.vWorldPos.w = 1.f; + + 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 = fLength; + + PhsXUserData* pUserData = static_cast(pActor->userData); + tagCollInfo.pObject = pUserData->pOwner; + switch (PXOBJECT(pUserData->iSubKind)) + { + case Engine::PXOBJECT::PLAYER: + { + if (false == m_bVisible) { + break; + } + m_bVisible = false; + CStat* pStat = pUserData->pCharacter->Get_Owner()->Get_Component(); + pStat->Get_Damage(10.f); + pUserData->pOwner->OnCollision(this, &tagCollInfo); + } + break; + case Engine::PXOBJECT::ALLY_HITBOX: + break; + default: + break; + } + + + } + } + } +} + CGoblin_Dagger* CGoblin_Dagger::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) { diff --git a/Jusin154_Team3D/Client/Private/Goblin_Mage.cpp b/Jusin154_Team3D/Client/Private/Goblin_Mage.cpp index f5a1177a7..8c651b2bf 100644 --- a/Jusin154_Team3D/Client/Private/Goblin_Mage.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin_Mage.cpp @@ -118,6 +118,7 @@ void CGoblin_Mage::Update(_float fTimeDelta) m_fSkillCoolTime[i] = max(0.f, m_fSkillCoolTime[i] - fTimeDelta); } + } void CGoblin_Mage::Late_Update(_float fTimeDelta) @@ -131,9 +132,25 @@ void CGoblin_Mage::Late_Update(_float fTimeDelta) } if (true == m_bLookAt) { - m_pTransformCom->LookAt_Horizontal(XMLoadFloat4(&m_vTargetPos)); + m_pTransformCom->LookAt_Lerp(XMLoadFloat4(&m_vTargetPos),fTimeDelta,3.f); } + m_fHoverTime += fTimeDelta; + + _float hoverY = sinf(m_fHoverTime * m_fHoverSpeed) * m_fHoverHeight; + _matrix HoverMat = XMMatrixTranslation(0.f, hoverY, 0.f); + + _matrix socketMatrix = m_pModelCom->Get_BoneMatrix("LeftArm"); + + for (int i = 0; i < 3; ++i) + socketMatrix.r[i] = XMVector3Normalize(socketMatrix.r[i]); + + _matrix OffsetMat = XMMatrixTranslation(-0.55f, 0.5f, 0.5f); + + _matrix World = socketMatrix * OffsetMat * m_pTransformCom->Get_XMWorldMatrix() * HoverMat; + + m_pGoblin_Orb->Get_Component()->Set_WorldMatrix(World); + m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this); m_pGameInstance->Add_RenderGroup(RENDER::SHADOW, this); } @@ -246,39 +263,48 @@ _vector CGoblin_Mage::Get_LockOnPos() void CGoblin_Mage::OnCollision(CGameObject* pOther, void* pDesc) { - + if (true == m_bDead) { + return; + } + _vector Head = (XMLoadFloat4x4(Get_HeadMatrix()) * m_pTransformCom->Get_XMWorldMatrix()).r[3]; + m_DamageInfo.vTarget_Pos = XMVectorSet(Head.m128_f32[0], Head.m128_f32[1], Head.m128_f32[2], 1.f); ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc); + Check_HitAngle(XMLoadFloat4(&CollisionDesc->vHitDir)); + _uint iSkillType = dynamic_cast(pOther)->Get_SkillType(); + auto damagePair = Get_Damage(m_pInfoInstance->Get_Spell_Damage(iSkillType)); + + m_fHitRadius = CMyTools::Get_Direction2D(m_pTransformCom->Get_State(STATE::LOOK), XMLoadFloat4(&CollisionDesc->vHitDir)); + switch (iSkillType) { case ENUM_CLASS(SKILL_TYPE::DESCENDO): - m_eHitSpell = STATEANIM::KNOCKDOWN_FWD; + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::DESCENDO); break; case ENUM_CLASS(SKILL_TYPE::BOMBARDA): - m_eHitSpell = STATEANIM::KNOCKDOWN_BWD; + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::BOMBARDA); break; case ENUM_CLASS(SKILL_TYPE::JAP): { - m_eHitSpell = STATEANIM::HIT_BWD; - //_float fSkillRatio = m_pInfoInstance->Get_Spell_Info(ENUM_CLASS(SKILL_TYPE::JAP)).fSpell_Damage; - //_float fCoefficient = CollisionDesc->pObject->Get_Component()->Get_Stat().fDamage; - //if (true == Get_Damage(fSkillRatio * fCoefficient)) { - // m_pFSM->Change_State(FSMSTATE::DEAD); - // return; - //} + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::JAP); + m_DamageInfo.fDamage = damagePair.first; + m_pInfoInstance->Event_CallBack(TEXT("Monster_Hit"), &m_DamageInfo); + if (0 == damagePair.second) { + m_pFSM->Change_State(FSMSTATE::DEAD); + return; + } } break; case ENUM_CLASS(SKILL_TYPE::LEVIOSO): - m_eHitSpell = STATEANIM::HIT_LEVIOSO; - break; - default: - m_eHitSpell = STATEANIM::KNOCKDOWN_FWD; + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::LEVIOSO); break; } - if (!m_pFSM->IsEnable(FSMSTATE::BLINK)){ + + if (!m_pFSM->IsEnable(FSMSTATE::BLINK)) { m_pFSM->Change_State(FSMSTATE::HIT); } + } void CGoblin_Mage::OnHit(CGameObject* pOther, CGameObject* pCaller) @@ -351,8 +377,7 @@ HRESULT CGoblin_Mage::Ready_Parts() } m_pGoblin_Orb->Load("../Bin/Resources/Data/Effect/GoblinMage/Orb_P", static_cast(NEXT_LEVEL)); - - m_pGoblin_Orb->FollowParents(m_pModelCom->Get_BoneMatrixPtr("RightHand")); + Get_PartObject()->Set_Visible(true); return S_OK; } @@ -416,6 +441,7 @@ void CGoblin_Mage::Free() Safe_Delete(m_pCallBack_Behavior); Safe_Delete(m_pCallBack_HitReport); SAFE_RELEASE(m_pGoblin_Orb); + } #ifdef _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Goblin_Mage_States.cpp b/Jusin154_Team3D/Client/Private/Goblin_Mage_States.cpp index a3f0d0f2e..3b0cdb130 100644 --- a/Jusin154_Team3D/Client/Private/Goblin_Mage_States.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin_Mage_States.cpp @@ -30,10 +30,12 @@ void CGoblin_Mage::Behavior_IdleEnter() HRESULT CGoblin_Mage::Behavior_IdleExitCheck() { + m_bLookAt = false; if (m_fTargetDistance <= 20.f && m_fTargetDistance != 0.f) { m_vOriginPos = m_pTransformCom->Get_State(STATE::POSITION); m_pEffectPool->Use_Skill(SKILL_TYPE::GOBLIN_PROTEGO, this); + m_bLookAt = true; m_pFSM->Change_State(FSMSTATE::MOVE); } else if (m_fTargetDistance >= 25.f) @@ -154,14 +156,14 @@ HRESULT CGoblin_Mage::Behavior_CombatExitCheck(_float fTimeDelta) { m_pFSM->Change_State(FSMSTATE::BLINK); } - else if (m_fTargetDistance <= 12.f && m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::LIGHTATTACK)] <= 0.f) - { - m_pFSM->Change_State(FSMSTATE::LIGHT_ATTACK); - } - else if (m_fTargetDistance <= 15.f && m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::SPELL)] <= 0.f) + else if (m_fTargetDistance <= 10.f && m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::SPELL)] <= 0.f) { m_pFSM->Change_State(FSMSTATE::SPELL); } + else if (m_fTargetDistance <= 15.f && m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::LIGHTATTACK)] <= 0.f) + { + m_pFSM->Change_State(FSMSTATE::LIGHT_ATTACK); + } else { m_pFSM->Change_State(FSMSTATE::IDLEBREAK); } @@ -232,7 +234,7 @@ void CGoblin_Mage::Behavior_LightAttackEnter() pair<_uint, _bool> pairAnimInfo = {}; _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex(); pairAnimInfo = m_Animation[STATEANIM::LIGHT_ATTACK]; - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second,1.f,true,1.3f); m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::LIGHTATTACK)] = m_fMaxSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::LIGHTATTACK)]; @@ -361,21 +363,55 @@ void CGoblin_Mage::Behavior_HitEnter() pair<_uint, _bool> pairAnimInfo = {}; m_pFSM->Enable_State(FSMSTATE::HIT); + m_bLookAt = false; + switch (m_eHitSpell) { - case STATEANIM::KNOCKDOWN_FWD: + case ENUM_CLASS(SKILL_TYPE::DESCENDO): pairAnimInfo = m_Animation[STATEANIM::KNOCKDOWN_FWD]; break; - case STATEANIM::TUMBLE2: - pairAnimInfo = m_Animation[STATEANIM::TUMBLE2]; + case ENUM_CLASS(SKILL_TYPE::BOMBARDA): + pairAnimInfo = m_Animation[STATEANIM::STUMBLE_BWD_R]; break; - case STATEANIM::HIT_LEVIOSO: + case ENUM_CLASS(SKILL_TYPE::JAP): { - pairAnimInfo = m_Animation[STATEANIM::HIT_LEVIOSO]; - break; + if (m_fHitDegree >= 90.f) + { + _int iRandIndex = m_pGameInstance->Real_Random_Int(0, 5); + switch (iRandIndex) + { + case 0: + pairAnimInfo = m_Animation[STATEANIM::HIT_BWD]; + break; + case 1: + pairAnimInfo = m_Animation[STATEANIM::HIT_BWD2]; + break; + case 2: + pairAnimInfo = m_Animation[STATEANIM::HIT_BWD3]; + break; + case 3: + pairAnimInfo = m_Animation[STATEANIM::HIT_BWD4]; + break; + default: + break; + } + } + else if (m_fHitDegree >= 45.f) { + + if (m_fHitCross > 0.f) { + pairAnimInfo = m_Animation[STATEANIM::HIT_L]; + } + else { + pairAnimInfo = m_Animation[STATEANIM::HIT_R]; + } + } + else{ + pairAnimInfo = m_Animation[STATEANIM::HIT_FWD]; + } } - default: - pairAnimInfo = m_Animation[STATEANIM::KNOCKDOWN_FWD]; + break; + case ENUM_CLASS(SKILL_TYPE::LEVIOSO): + pairAnimInfo = m_Animation[STATEANIM::HIT_LEVIOSO]; break; } @@ -701,6 +737,10 @@ void CGoblin_Mage::Set_Anim() m_Animation[STATEANIM::LAND] = { 376, false }; m_Animation[STATEANIM::HIT_LEVIOSO] = { 381, false }; + m_Animation[STATEANIM::STUMBLE_BWD_L] = { 394, false }; + m_Animation[STATEANIM::STUMBLE_BWD_R] = { 395, false }; + m_Animation[STATEANIM::STUMBLE_FWD] = { 396, false }; + m_Animation[STATEANIM::DEAD_BWD] = { 317, false }; m_Animation[STATEANIM::DEAD_BWD2] = { 318, false }; m_Animation[STATEANIM::DEAD_FWD] = { 319, false }; diff --git a/Jusin154_Team3D/Client/Private/Goblin_States.cpp b/Jusin154_Team3D/Client/Private/Goblin_States.cpp index 093bc0578..9d8d55c7f 100644 --- a/Jusin154_Team3D/Client/Private/Goblin_States.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin_States.cpp @@ -37,13 +37,21 @@ void CGoblin::Behavior_IdleEnter() HRESULT CGoblin::Behavior_IdleExitCheck() { - if (m_fTargetDistance <= 20.f && m_fTargetDistance != 0.f) + if (m_fTargetDistance <= 20.f && m_fTargetDistance > 10.f) + { + m_bLookAt = false; + m_bDetection = true; + } + if ((m_fTargetDistance <= 10.f && m_fTargetDistance != 0.f) || m_pDetection->Get_Step() == true) { m_vOriginPos = m_pTransformCom->Get_State(STATE::POSITION); + m_bLookAt = true; m_pFSM->Change_State(FSMSTATE::MOVE); } else if (m_fTargetDistance >= 25.f) { + m_bDetection = false; + m_pFSM->Change_State(FSMSTATE::IDLEBREAK); } @@ -59,7 +67,7 @@ void CGoblin::Behavior_IdleBreakEnter() { m_pFSM->Enable_State(FSMSTATE::IDLEBREAK); pair<_uint, _bool> pairAnimInfo; - m_bLookAt = true; + m_bLookAt = false; _int RandIndex = m_pGameInstance->Real_Random_Int(0, 6); switch (RandIndex) { @@ -171,7 +179,7 @@ HRESULT CGoblin::Behavior_MoveExitCheck(_float fTimeDelta) } } - if (m_fTargetDistance <= 15.f && m_fTargetDistance >= 5.f && m_fTargetDistance !=0.f) + if (m_fTargetDistance <= 15.f && m_fTargetDistance >= 5.f && m_fTargetDistance != 0.f) m_pFSM->Change_State(FSMSTATE::COMBAT); return E_FAIL; @@ -234,7 +242,7 @@ void CGoblin::Behavior_SwingEnter() m_pFSM->Enable_State(FSMSTATE::SWING); pairAnimInfo = m_Animation[STATEANIM::SWING_FWD]; - + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::SWING)] = m_fMaxSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::SWING)]; @@ -258,11 +266,11 @@ void CGoblin::Behavior_SwingEnter() Add_Event(pairAnimInfo.first, [&]() { m_bLookAt = true; - m_bStep = true; - m_pGoblinSpector->Set_Visible(false); - m_pGoblinSpector->Spector_Trail_Visible(false); + m_bStep = true; + m_pGoblinSpector->Set_Visible(false); + m_pGoblinSpector->Spector_Trail_Visible(false); - m_pFSM->Change_State(FSMSTATE::SHUFFLE); }, + m_pFSM->Change_State(FSMSTATE::SHUFFLE); }, 0.45f); } @@ -282,7 +290,7 @@ HRESULT CGoblin::Behavior_SwingExitCheck(_float fTimeDelta) vDistance = XMVector4Normalize(vDistance); _float step = dist - fDesiredRange; - m_pTransformCom->AccumulateMomentum(vDistance * step *fTimeDelta*1.5f); + m_pTransformCom->AccumulateMomentum(vDistance * step * fTimeDelta * 1.5f); } } @@ -340,7 +348,7 @@ void CGoblin::Behavior_BlinkEnter() m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); Add_Event(pairAnimInfo.first, - [this]() { + [this]() { m_bVisible = false; m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::TP)] = m_fMaxSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::TP)]; _vector vPlayerPos = XMLoadFloat4(&m_vTargetPos); @@ -438,21 +446,54 @@ void CGoblin::Behavior_HitEnter() m_pFSM->Enable_State(FSMSTATE::HIT); m_bLookAt = false; + switch (m_eHitSpell) { - case STATEANIM::KNOCKDOWN_FWD: + case ENUM_CLASS(SKILL_TYPE::DESCENDO): pairAnimInfo = m_Animation[STATEANIM::KNOCKDOWN_FWD]; break; - case STATEANIM::TUMBLE2: - pairAnimInfo = m_Animation[STATEANIM::TUMBLE2]; + case ENUM_CLASS(SKILL_TYPE::BOMBARDA): + pairAnimInfo = m_Animation[STATEANIM::STUMBLE_BWD_L]; break; - case STATEANIM::HIT_LEVIOSO: + case ENUM_CLASS(SKILL_TYPE::JAP): { - pairAnimInfo = m_Animation[STATEANIM::HIT_LEVIOSO]; - break; + if (m_fHitDegree >= 90.f) + { + _int iRandIndex = m_pGameInstance->Real_Random_Int(0, 5); + switch (iRandIndex) + { + case 0: + pairAnimInfo = m_Animation[STATEANIM::HIT_BWD]; + break; + case 1: + pairAnimInfo = m_Animation[STATEANIM::HIT_BWD2]; + break; + case 2: + pairAnimInfo = m_Animation[STATEANIM::HIT_BWD3]; + break; + case 3: + pairAnimInfo = m_Animation[STATEANIM::HIT_BWD4]; + break; + default: + break; + } + } + else if (m_fHitDegree >= 45.f) { + + if (m_fHitCross > 0.f) { + pairAnimInfo = m_Animation[STATEANIM::HIT_L]; + } + else { + pairAnimInfo = m_Animation[STATEANIM::HIT_R]; + } + } + else { + pairAnimInfo = m_Animation[STATEANIM::HIT_FWD]; + } } - default: - pairAnimInfo = m_Animation[STATEANIM::KNOCKDOWN_FWD]; + break; + case ENUM_CLASS(SKILL_TYPE::LEVIOSO): + pairAnimInfo = m_Animation[STATEANIM::HIT_LEVIOSO]; break; } @@ -497,7 +538,7 @@ HRESULT CGoblin::Behavior_HitExitCheck(_float fTimeDelta) } } - + if (m_pModelCom->IsFinishedAnim()) { m_bLookAt = true; @@ -524,7 +565,7 @@ void CGoblin::Behavior_DeadEnter() m_pCharacter_Controller->SetActive(false); _bool bStrongerKnockDown = { false }; - + switch (m_eHitSpell) { case STATEANIM::KNOCKDOWN_FWD: @@ -564,7 +605,7 @@ void CGoblin::Behavior_DeadEnter() HRESULT CGoblin::Behavior_DeadExitCheck(_float fTimeDelta) { - if ( FLT_EPSILON > m_pModelCom->Get_CurrentTrackProgressRatio()) { + if (FLT_EPSILON > m_pModelCom->Get_CurrentTrackProgressRatio()) { return E_PENDING; } return S_OK; @@ -672,12 +713,12 @@ void CGoblin::Add_FSM() Desc.funcEnterEvent = [this]() { Behavior_DeadEnter(); }; Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_DeadExitCheck(fTimedelta); }; Desc.funcExitEvent = [this]() { Behavior_DeadExit(); }; - Desc.funcLateUpdate = [this](_float fDeadRatio) { + Desc.funcLateUpdate = [this](_float fDeadRatio) { m_fDeadRatio = fDeadRatio; - if (m_fDeadRatio > 1.f) { - m_bDead = true; - } - }; + if (m_fDeadRatio > 1.f) { + m_bDead = true; + } + }; Desc.vDeadTimer.x = FLT_EPSILON5; Desc.vDeadTimer.y = 2.f; m_States.emplace(FSMSTATE::DEAD, CState_Dead::Create(&Desc)); @@ -778,6 +819,10 @@ void CGoblin::Set_Anim() m_Animation[STATEANIM::LAND] = { 376, false }; m_Animation[STATEANIM::HIT_LEVIOSO] = { 381, false }; + m_Animation[STATEANIM::STUMBLE_BWD_L] = { 394, false }; + m_Animation[STATEANIM::STUMBLE_BWD_R] = { 395, false }; + m_Animation[STATEANIM::STUMBLE_FWD] = { 396, false }; + m_Animation[STATEANIM::DEAD_BWD] = { 317, false }; m_Animation[STATEANIM::DEAD_BWD2] = { 318, false }; m_Animation[STATEANIM::DEAD_FWD] = { 319, false }; @@ -827,5 +872,7 @@ void CGoblin::Set_Anim() // Jog 90 R 155 - + // L 394 + // R 395 + // fwd 396 } diff --git a/Jusin154_Team3D/Client/Private/HpBarBG.cpp b/Jusin154_Team3D/Client/Private/HpBarBG.cpp index ff79636ab..4d87dc2ec 100644 --- a/Jusin154_Team3D/Client/Private/HpBarBG.cpp +++ b/Jusin154_Team3D/Client/Private/HpBarBG.cpp @@ -172,7 +172,7 @@ void CHpBarBG::Lerp_PosX(_float X) void CHpBarBG::Heal(_float fTimeDelta) { - m_fCurrentHp = CMyTools::Lerp_f1D(m_fTargetHp, m_fCurrentHp, fTimeDelta * m_fMoveSpeed); + m_fCurrentHp = CMyTools::Lerp_f1D(m_fCurrentHp, m_fTargetHp, fTimeDelta * m_fMoveSpeed); } void CHpBarBG::Hit(_float fTimeDelta) diff --git a/Jusin154_Team3D/Client/Private/InfoInstance.cpp b/Jusin154_Team3D/Client/Private/InfoInstance.cpp index c62d49a82..a8a9027b5 100644 --- a/Jusin154_Team3D/Client/Private/InfoInstance.cpp +++ b/Jusin154_Team3D/Client/Private/InfoInstance.cpp @@ -61,14 +61,6 @@ void CInfoInstance::Set_Damage(_float fDamage) m_pSkillInfo->Update_Damage(fDamage); } -CPlater* CInfoInstance::Get_PlayerInfo() -{ - //return m_pPlayerInfo->Get_CameraCoordinateSystem(); - return nullptr; -} - - - #pragma region MONSTER_INFO HRESULT CInfoInstance::Regist_PlayerAlly(CUnit* pUnit) { @@ -113,6 +105,7 @@ CMonster* CInfoInstance::Get_TargetMonster() } #pragma endregion + #pragma region MAP_INFO HRESULT CInfoInstance::Load_MapObjects(const _char* pFilePath) { @@ -190,7 +183,7 @@ void CInfoInstance::Key_Input(_uint Input) Event_CallBack(TEXT("Ancient_Magic_Throw")); break; case ENUM_CLASS(KEYINPUT::INPUT_G): - + Event_CallBack(TEXT("Use_Potion")); break; case ENUM_CLASS(KEYINPUT::INPUT_TAB): @@ -347,6 +340,7 @@ void CInfoInstance::Release_Information() DestroyInstance(); + SAFE_RELEASE(m_pMapInfo); SAFE_RELEASE(m_pPlayerInfo); SAFE_RELEASE(m_pMonsterInfo); diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp index a69dc9ee1..a4fa92b76 100644 --- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp +++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp @@ -40,6 +40,12 @@ HRESULT CLevel_GamePlay::Initialize(void* pArg) if (FAILED(Ready_Lights())) { return E_FAIL; } + + //플레이어 , 맵 보다 먼저 생성해야함 ! + if (FAILED(Reday_Layer_EffectPool())) { + return E_FAIL; + } + if (FAILED(Ready_Background())) { return E_FAIL; } @@ -49,10 +55,7 @@ HRESULT CLevel_GamePlay::Initialize(void* pArg) if (FAILED(Ready_Layer_UI(LAYER_UI))) { return E_FAIL; } - //플레이어보다 먼저 생성해야함! - if (FAILED(Reday_Layer_EffectPool())) { - return E_FAIL; - } + // 이것도 플레이어보다 먼저 생성해야함! if (FAILED(Ready_Layer_Item(LAYER_ITEM))) { return E_FAIL; @@ -235,10 +238,10 @@ HRESULT CLevel_GamePlay::Ready_Background() isReady_Background = true; #endif // gimch #ifdef Bin - isReady_Background = true; + isReady_Background = false; #endif // #ifdef 진우 - isReady_Background = false; + isReady_Background = true; #endif // #ifdef 기무리 isReady_Background = true; @@ -257,14 +260,14 @@ HRESULT CLevel_GamePlay::Ready_Background() else { /* 전체 맵 */ - CInfoInstance::GetInstance()->Load_MapObjects("Hogsmeade_MapContainer_Data"); + //CInfoInstance::GetInstance()->Load_MapObjects("Hogsmeade_MapContainer_Data"); /* 물 오브젝트 */ if (FAILED(CInfoInstance::GetInstance()->Load_WaterElemet("Element_Water_Info"))) return E_FAIL; /* 조명 오브젝트 */ - CInfoInstance::GetInstance()->Load_LightElements("LightElement"); + /*CInfoInstance::GetInstance()->Load_LightElements("LightElement");*/ /* 상호작용 오브젝트 */ CInfoInstance::GetInstance()->Load_InteractableElements("E_INTER_Barrel"); @@ -515,7 +518,7 @@ HRESULT CLevel_GamePlay::Ready_Layer_SkyBox(const _wstring& strLayerTag) HRESULT CLevel_GamePlay::Ready_Layer_Monster() { - for (_uint i = 0; i < 0; ++i) + for (_uint i = 0; i < 1; ++i) { if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) { return E_FAIL; diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index 4ea5c4b99..c1811a8c2 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -143,6 +143,9 @@ #include "MageSide.h" #include "StunEffect.h" +#include "Box_Splesh.h" +#include "Chair_Splesh.h" +#include "Barral_Splesh.h" #pragma endregion @@ -308,10 +311,10 @@ HRESULT CLoader::Loading_For_GamePlay() isLoad_Background = true; #endif // gimch #ifdef Bin - isLoad_Background = true; + isLoad_Background = false; #endif // #ifdef 진우 - isLoad_Background = false; + isLoad_Background = true; #endif // #ifdef 기무리 isLoad_Background = true; @@ -1472,7 +1475,7 @@ HRESULT CLoader::Loading_For_GamePlay() return E_FAIL; if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Troll_Weapon_Model"), - CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Object/SubTroll_Weapon/SK_WPN_Troll_Club07.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) + CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Object/SubTroll_Weapon/SK_WPN_Troll_Club07.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationX(XMConvertToRadians(-90.f)) * XMMatrixIdentity())))) return E_FAIL; if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Troll_Rock_Big_Model"), @@ -1484,7 +1487,7 @@ HRESULT CLoader::Loading_For_GamePlay() return E_FAIL; if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_BattleAxe_Model"), - CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Goblin_BattleAxe/SK_WPN_GOB_BattleAxe01.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) + CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Goblin_BattleAxe/SK_WPN_GOB_BattleAxe01.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationX(XMConvertToRadians(-90.f)) * XMMatrixIdentity())))) return E_FAIL; @@ -1583,6 +1586,17 @@ HRESULT CLoader::Loading_For_GamePlay() return E_FAIL; } + if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CBox_Splesh::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CBarral_Splesh::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CChair_Splesh::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CWandEnd::Create(m_pDevice, m_pContext)))) { return E_FAIL; @@ -1595,6 +1609,17 @@ HRESULT CLoader::Loading_For_GamePlay() m_strMessage = TEXT("Model Loading.."); + + Asset_FileLoad("../Bin/Resources/Models/Effect/Box", L"Prototype_Instance_Model_", [&](_wstring wstrFileName, const _char* pFilePath) { + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, wstrFileName, + CInstance_Model::Create(m_pDevice, m_pContext, pFilePath, MODEL::NONANIM, XMMatrixScaling(0.1f, 0.1f, 0.1f) * XMMatrixIdentity(), 0)))) + return E_FAIL; + + return S_OK; + + }); + Asset_FileLoad("../Bin/Resources/Models/Effect/ParticleMesh", L"Prototype_Instance_Model_", [&](_wstring wstrFileName, const _char* pFilePath) { if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, wstrFileName, diff --git a/Jusin154_Team3D/Client/Private/Lumos.cpp b/Jusin154_Team3D/Client/Private/Lumos.cpp index a296efff4..9159605c9 100644 --- a/Jusin154_Team3D/Client/Private/Lumos.cpp +++ b/Jusin154_Team3D/Client/Private/Lumos.cpp @@ -49,6 +49,14 @@ void CLumos::Priority_Update(_float fTimeDelta) { __super::Priority_Update(fTimeDelta); + + CWand* pWand = static_cast(m_pOwner); + + if (pWand == nullptr) + return; + + m_pLumos_Light->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion()); + } void CLumos::Update(_float fTimeDelta) @@ -59,15 +67,6 @@ void CLumos::Update(_float fTimeDelta) __super::Update(fTimeDelta); Update_Event(fTimeDelta); - - - CWand* pWand = static_cast(m_pOwner); - - if (pWand == nullptr) - return; - - m_pLumos_Light->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion()); - } void CLumos::Late_Update(_float fTimeDelta) diff --git a/Jusin154_Team3D/Client/Private/MapElement_Interactable.cpp b/Jusin154_Team3D/Client/Private/MapElement_Interactable.cpp index 81f4b8394..ed83b7082 100644 --- a/Jusin154_Team3D/Client/Private/MapElement_Interactable.cpp +++ b/Jusin154_Team3D/Client/Private/MapElement_Interactable.cpp @@ -3,6 +3,8 @@ #include "InfoInstance.h" #include "GameInstance.h" +#include "EffectPool.h" +#include "Layer.h" CMapElement_Interactable::CMapElement_Interactable(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) : CMapElement{ pDevice, pContext } @@ -32,6 +34,25 @@ HRESULT CMapElement_Interactable::Initialize(void* pArg) //m_ModelPathIndices.push_back((*pDesc->pModelPathIndices)[i]); } + if (m_ModelPrototypeTags[0] == L"Prototype_GameObject_SM_Prop_Barrel_Breakable_B_Oppungo") + { + m_eInteractableID = ELEMENT_INTERACTABLE_ID::BARREL; + } + + else if (m_ModelPrototypeTags[0] == L"Prototype_GameObject_SM_HM_OwlPost_Package_B") + { + m_eInteractableID = ELEMENT_INTERACTABLE_ID::BOX; + } + else if (m_ModelPrototypeTags[0] == L"Prototype_GameObject_SM_HM_TeaShop_Table_B") + { + m_eInteractableID = ELEMENT_INTERACTABLE_ID::TABLE; + } + else if (m_ModelPrototypeTags[0] == L"Prototype_GameObject_SM_HM_TeaShop_Chair_B") + { + m_eInteractableID = ELEMENT_INTERACTABLE_ID::TABLE; + } + + if (FAILED(__super::Initialize(pArg))) return E_FAIL; @@ -59,19 +80,43 @@ HRESULT CMapElement_Interactable::Initialize(void* pArg) m_pInfoInstance->Regist_ActiveInteractive(this); + + m_pEffectPool = m_pGameInstance->Get_Layer(NEXT_LEVEL, TEXT("Layer_EffectPool"))->Get_Object(); + SAFE_ADDREF(m_pEffectPool); + return S_OK; } void CMapElement_Interactable::Priority_Update(_float fTimeDelta) { + _float fRadius = m_pModelComs[0]->Get_Radius(); + + XMStoreFloat4(&m_vStartPos, Get_WorldPostion() + XMVectorSet(0.f , fRadius , 0.f , 0.f )); + } void CMapElement_Interactable::Update(_float fTimeDelta) { + } void CMapElement_Interactable::Late_Update(_float fTimeDelta) { + + if (m_isGraped == true) + { + _float fRadius = m_pModelComs[0]->Get_Radius(); + + if (false == m_bHit) { + _vector vStartPos = XMLoadFloat4(&m_vStartPos); + _vector vEndPos = Get_WorldPostion() + XMVectorSet(0.f, fRadius, 0.f, 0.f); + ON_COLLISION_INFO CollisionInfo = CollisionCheck(vStartPos, vEndPos, 1.f); + + if (m_bHit == true) + OnCollision(this, &CollisionInfo); + } + } + if (m_pGameInstance->isIn_WorldFrustum(Get_WorldPostion(), m_pModelComs[0]->Get_Radius())) { m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this); } @@ -119,8 +164,46 @@ void CMapElement_Interactable::GrapToPlayer(_fvector vPos, _float fRatio) { _vector vCurrentPosition = m_pTransformCom->Get_State(STATE::POSITION); m_pTransformCom->Set_State(STATE::POSITION, XMVectorLerp(vCurrentPosition, vPos, fRatio)); + + m_isGraped = true; + } +void CMapElement_Interactable::OnCollision(CGameObject* pOther, void* pDesc) +{ + if (m_bHit == false) + return; + + ON_COLLISION_INFO CollisionDesc = *static_cast(pDesc); + + _vector vPos = XMLoadFloat4(&CollisionDesc.vWorldPos); + + switch (m_eInteractableID) + { + case Client::ELEMENT_INTERACTABLE_ID::BARREL: + + m_pEffectPool->Use_Skill(SKILL_TYPE::BARRAL_SPLASH, this); + break; + case Client::ELEMENT_INTERACTABLE_ID::BOX: + + m_pEffectPool->Use_Skill(SKILL_TYPE::BOX_SPLESH, this); + break; + case Client::ELEMENT_INTERACTABLE_ID::TABLE: + m_pEffectPool->Use_Skill(SKILL_TYPE::CHAIL_SPLESH, this); + break; + case Client::ELEMENT_INTERACTABLE_ID::END: + break; + default: + break; + } + + + + Set_Dead(); +} + + + HRESULT CMapElement_Interactable::Ready_Components(void* pArg) { if (FAILED(__super::Ready_Components(pArg))) { @@ -241,6 +324,121 @@ void CMapElement_Interactable::Set_KinematicFlag(_bool bFlag) m_pRigidBody->Set_Kinematic(bFlag); } +ON_COLLISION_INFO CMapElement_Interactable::CollisionCheck(_fvector StartPos, _fvector 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); + + const PSX::PxSweepHit& hit = pxBuffer.block; + PSX::PxRigidActor* pActor = hit.actor; + PSX::PxShape* pShape = hit.shape; + ON_COLLISION_INFO tagCollInfo = {}; + + tagCollInfo.vWorldPos.w = 1.f; + + if (bHit) { + + 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(pActor->userData); + tagCollInfo.pObject = pUserData->pOwner; + + 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; + } + } + } + } + + + } + + if (bHit == false) + { + 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; + tagCollInfo.pObject = this; + + bHit = m_pGameInstance->SphereCast(fRadius, vStartPos, vDir, fDistance, PSX::PxHitFlag::ePOSITION | PSX::PxHitFlag::eNORMAL, PSX::PxQueryFlag::eSTATIC, pxBuffer); + + const PSX::PxSweepHit& hit = pxBuffer.block; + PSX::PxRigidActor* pActor = hit.actor; + PSX::PxShape* pShape = hit.shape; + + tagCollInfo.vWorldPos.w = 1.f; + + if (bHit) + { + 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(pActor->userData); + tagCollInfo.pObject = pUserData->pOwner; + + switch (PXOBJECT(pUserData->iSubKind)) + { + case PXOBJECT::TERRAIN: + { + /* TODO, 터레인 안됨 */ + m_bHit = true; + break; + } + } + + } + } + + + } + + return tagCollInfo; +} + CMapElement_Interactable* CMapElement_Interactable::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) { CMapElement_Interactable* pInstance = new CMapElement_Interactable(pDevice, pContext); @@ -276,6 +474,7 @@ void CMapElement_Interactable::Free() SAFE_RELEASE(m_pRigidBody); SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pEffectPool); if (nullptr != m_pInfoInstance) { CInfoInstance* pInfo = m_pInfoInstance; @@ -285,6 +484,8 @@ void CMapElement_Interactable::Free() for (auto& pModel : m_pModelComs){ SAFE_RELEASE(pModel); } + + } #ifdef _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Player.cpp b/Jusin154_Team3D/Client/Private/Player.cpp index 578553abd..ac5dd6001 100644 --- a/Jusin154_Team3D/Client/Private/Player.cpp +++ b/Jusin154_Team3D/Client/Private/Player.cpp @@ -297,6 +297,14 @@ HRESULT CPlayer::Render_Shadow() } void CPlayer::OnCollision(CGameObject* pOther, void* pDesc) { + ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc); + if (CollisionDesc) { + Check_HitAngle(XMLoadFloat4(&CollisionDesc->vHitDir)); + } + else { + m_fHitDegree = -1.f; + } + m_pFSM->Change_State(FSMSTATE::HIT); } void CPlayer::OnHit(CGameObject* pOther, CGameObject* pCaller) diff --git a/Jusin154_Team3D/Client/Private/Player_States.cpp b/Jusin154_Team3D/Client/Private/Player_States.cpp index 505e032cf..34f444bda 100644 --- a/Jusin154_Team3D/Client/Private/Player_States.cpp +++ b/Jusin154_Team3D/Client/Private/Player_States.cpp @@ -24,6 +24,7 @@ #include "State_Combat.h" #include "State_LightAttack.h" #include "State_Spell.h" +#include "State_Shield.h" #include "State_Hit.h" #include "State_Broom_Ride.h" #include "State_Broom_Ride_Move.h" @@ -72,6 +73,7 @@ HRESULT CPlayer::InputAction() if (m_pGameInstance->Key_Down(DIK_T)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_T)); if (m_pGameInstance->Key_Down(DIK_TAB)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_TAB)); if (m_pGameInstance->Key_Down(DIK_X)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_X)); + if (m_pGameInstance->Key_Down(DIK_G)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_G)); return S_OK; } } @@ -201,7 +203,7 @@ HRESULT CPlayer::Behavior_IdleExitCheck(_float fTimeDelta) m_pFSM->Change_State(FSMSTATE::COMBAT); } else if (m_pGameInstance->Key_Down(DIK_Q)) { - m_pFSM->Change_State(FSMSTATE::COMBAT); + m_pFSM->Change_State(FSMSTATE::SHIELD); } else if (SUCCEEDED(InputSpell())) { m_pFSM->Change_State(FSMSTATE::COMBAT); @@ -213,7 +215,7 @@ HRESULT CPlayer::Behavior_IdleExitCheck(_float fTimeDelta) m_pFSM->Change_State(FSMSTATE::COMBAT); } else if (m_pGameInstance->Key_Down(DIK_G)) { - m_pFSM->Change_State(FSMSTATE::COMBAT); + m_pModelCom->Set_Second_AnimationIndex(ENUM_CLASS(BLEND_BONE::SHOULDER_NECK_L), m_Animation[STATEANIM::POTION].first, m_Animation[STATEANIM::POTION].second); } else if (m_pGameInstance->Key_Down(DIK_B)) { m_pFSM->Change_State(FSMSTATE::BROOM_RIDE); @@ -391,7 +393,7 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta) m_pFSM->Change_State(FSMSTATE::COMBAT); } else if (m_pGameInstance->Key_Down(DIK_Q)) { - m_pFSM->Change_State(FSMSTATE::COMBAT); + m_pFSM->Change_State(FSMSTATE::SHIELD); } else if (m_pGameInstance->Mouse_Up(DIM_LBUTTON)) { m_pFSM->Change_State(FSMSTATE::COMBAT); @@ -406,8 +408,9 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta) m_pFSM->Change_State(FSMSTATE::COMBAT); } else if (m_pGameInstance->Key_Down(DIK_G)) { - m_pFSM->Change_State(FSMSTATE::COMBAT); + m_pModelCom->Set_Second_AnimationIndex(ENUM_CLASS(BLEND_BONE::SHOULDER_NECK_L), m_Animation[STATEANIM::POTION].first, m_Animation[STATEANIM::POTION].second); } + else if (m_pGameInstance->Key_Down(DIK_B)) { m_pFSM->Change_State(FSMSTATE::BROOM_RIDE); } @@ -488,24 +491,27 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta) _bool bSkipAngleCheck = { false }; if (m_pFSM->IsEnable(FSMSTATE::JOG | FSMSTATE::WALK| FSMSTATE::SPRINT)) { - if (iCurrentAnimIndex != m_Animation[STATEANIM::JOG_FWD].first && + /* if (iCurrentAnimIndex != m_Animation[STATEANIM::JOG_FWD].first && iCurrentAnimIndex != m_Animation[STATEANIM::WALK_FWD].first&& - iCurrentAnimIndex != m_Animation[STATEANIM::SPRINT].first) { + iCurrentAnimIndex != m_Animation[STATEANIM::SPRINT].first&& + iCurrentAnimIndex != m_Animation[STATEANIM::JOG_AIM_LEFT].first&& + iCurrentAnimIndex != m_Animation[STATEANIM::JOG_AIM_RIGHT].first&& + iCurrentAnimIndex != m_Animation[STATEANIM::JOG_AIM_BWD].first) { bSkipAngleCheck = true; - +*/ if (m_pModelCom->IsFinishedAnim() || m_pFSM->IsEnable(FSMSTATE::STOP) || SUCCEEDED(InputAim())) { m_pFSM->Disable_State(FSMSTATE::STOP); bSkipAngleCheck = false; } - } + //} if (!bSkipAngleCheck) { _float absDir = fabsf(vDir); - if (absDir < XMConvertToRadians(85.f)) { + if (absDir < XMConvertToRadians(80.f)) { if (m_bWalkToggle) { pairAnimInfo = m_Animation[STATEANIM::WALK_FWD]; } - else if ( m_bSprintToggle) + else if (m_bSprintToggle) { pairAnimInfo = m_Animation[STATEANIM::SPRINT]; } @@ -794,7 +800,7 @@ void CPlayer::Behavior_CombatEnter() if (m_pModelCom->Get_SecondAnimIndex() == m_Animation[STATEANIM::LUMOS].first) { - m_pModelCom->Set_Second_AnimationIndex(-1, ENUM_CLASS(BLEND_BONE::SHOULDER_R)); + m_pModelCom->Set_Second_AnimationIndex(ENUM_CLASS(BLEND_BONE::SHOULDER_R) ,-1) ; m_eSpell = ENUM_CLASS(SKILL_TYPE::END); } if (m_pGameInstance->Key_Down(DIK_R)) { @@ -803,11 +809,8 @@ void CPlayer::Behavior_CombatEnter() m_pEffectPool->Use_Skill(SKILL_TYPE::REVELIO, this); } else if (m_pGameInstance->Key_Down(DIK_Q)) { - m_pFSM->Enable_State(FSMSTATE::SKILL2); - pairAnimInfo = m_Animation[STATEANIM::SKILL2]; - Add_Event(pairAnimInfo.first, - [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::PROTEGO, this); }, - 0.4f); + + m_pFSM->Change_State(FSMSTATE::SHIELD); } else if (m_pGameInstance->Mouse_Up(DIM_LBUTTON)) { m_pFSM->Change_State(FSMSTATE::LIGHT_ATTACK); @@ -842,29 +845,6 @@ void CPlayer::Behavior_CombatEnter() [this]() { Throwing_Interactive(); }, 0.2f); } - else if (m_pGameInstance->Key_Down(DIK_G)) { - m_pFSM->Enable_State(FSMSTATE::POTION); - if (SUCCEEDED(InputMove())) - { - if (m_bSprintToggle) - { - pairAnimInfo = m_Animation[STATEANIM::SPRINT]; - } - else if (m_bWalkToggle) - { - pairAnimInfo = m_Animation[STATEANIM::WALK_FWD]; - } - else { - pairAnimInfo = m_Animation[STATEANIM::JOG_FWD]; - } - } - else { - pairAnimInfo = m_Animation[STATEANIM::IDLE]; - } - - m_pModelCom->Set_Second_AnimationIndex(m_Animation[STATEANIM::POTION].first, ENUM_CLASS(BLEND_BONE::SHOULDER_NECK_L)); - } - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); } @@ -880,9 +860,7 @@ HRESULT CPlayer::Behavior_CombatExitCheck() } else if (m_pGameInstance->Key_Down(DIK_Q)) { - m_pFSM->Enable_State(FSMSTATE::SKILL2); - pairAnimInfo = m_Animation[STATEANIM::SKILL2]; - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + m_pFSM->Change_State(FSMSTATE::SHIELD); } else if (m_pGameInstance->Key_Down(DIK_V)) { @@ -914,29 +892,6 @@ HRESULT CPlayer::Behavior_CombatExitCheck() m_vGrapInteratableLerp.x = 0.f; } } - else if (m_pGameInstance->Key_Down(DIK_G)) { - m_pFSM->Enable_State(FSMSTATE::POTION); - if (SUCCEEDED(InputMove())) - { - if (m_bSprintToggle) - { - pairAnimInfo = m_Animation[STATEANIM::SPRINT]; - } - else if (m_bWalkToggle) - { - pairAnimInfo = m_Animation[STATEANIM::WALK_FWD]; - } - else { - pairAnimInfo = m_Animation[STATEANIM::JOG_FWD]; - } - - } - else { - pairAnimInfo = m_Animation[STATEANIM::IDLE]; - } - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); - m_pModelCom->Set_Second_AnimationIndex(m_Animation[STATEANIM::POTION].first, ENUM_CLASS(BLEND_BONE::SHOULDER_NECK_L)); - } } if (m_pFSM->IsEnable(FSMSTATE::ANCIENT_THROW)) @@ -973,7 +928,7 @@ HRESULT CPlayer::Behavior_CombatExitCheck() void CPlayer::Behavior_CombatExit() { m_pFSM->Disable_State(FSMSTATE::COMBAT | FSMSTATE::SKILL | - FSMSTATE::SKILL2 | FSMSTATE::MAPHELP | FSMSTATE::ANCIENT_THROW | FSMSTATE::POTION); + FSMSTATE::MAPHELP | FSMSTATE::ANCIENT_THROW); } void CPlayer::Behavior_LightAttackEnter() @@ -1215,7 +1170,7 @@ void CPlayer::Behavior_SpellEnter() Add_Event(pairAnimInfo.first, [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::LUMOS, Get_PartObject()); }, 0.f); - m_pModelCom->Set_Second_AnimationIndex(m_Animation[STATEANIM::LUMOS].first, ENUM_CLASS(BLEND_BONE::SHOULDER_R), true); + m_pModelCom->Set_Second_AnimationIndex(ENUM_CLASS(BLEND_BONE::SHOULDER_R),m_Animation[STATEANIM::LUMOS].first, m_Animation[STATEANIM::LUMOS].second); } else { @@ -1234,8 +1189,7 @@ void CPlayer::Behavior_SpellEnter() else { pairAnimInfo = m_Animation[STATEANIM::IDLE]; } - m_pModelCom->Set_Second_AnimationIndex(m_Animation[STATEANIM::LUMOS_STOP].first, ENUM_CLASS(BLEND_BONE::SHOULDER_R)); - m_eSpell = STATEANIM::END; + m_pModelCom->Set_Second_AnimationIndex(ENUM_CLASS(BLEND_BONE::SHOULDER_R),m_Animation[STATEANIM::LUMOS_STOP].first, m_Animation[STATEANIM::LUMOS_STOP].second); } break; default: @@ -1288,7 +1242,7 @@ HRESULT CPlayer::Behavior_SpellExitCheck() m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); - if (m_eSpell != ENUM_CLASS(SKILL_TYPE::END)&& m_eSpell != -1) + if (m_eSpell != ENUM_CLASS(SKILL_TYPE::END) && m_eSpell != -1) { _float fRatio = 0.2f; if (iNext - iStart == 2) { @@ -1326,6 +1280,49 @@ HRESULT CPlayer::Behavior_SpellExitCheck() [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::LEVIOSO_SIDE, Get_PartObject()); }, 0.f); break; + case ENUM_CLASS(SKILL_TYPE::LUMOS): + if (m_pModelCom->Get_SecondAnimIndex() != m_Animation[STATEANIM::LUMOS].first) + { + if (SUCCEEDED(InputMove())) + { + if (m_bSprintToggle) { + pairAnimInfo = m_Animation[STATEANIM::SPRINT]; + } + else if (m_bWalkToggle) { + pairAnimInfo = m_Animation[STATEANIM::WALK_FWD]; + } + else { + pairAnimInfo = m_Animation[STATEANIM::JOG_FWD]; + } + } + else { + pairAnimInfo = m_Animation[STATEANIM::IDLE]; + } + Add_Event(pairAnimInfo.first, + [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::LUMOS, Get_PartObject()); }, + 0.f); + m_pModelCom->Set_Second_AnimationIndex(ENUM_CLASS(BLEND_BONE::SHOULDER_R), m_Animation[STATEANIM::LUMOS].first, m_Animation[STATEANIM::LUMOS].second); + } + else + { + if (SUCCEEDED(InputMove())) + { + if (m_bSprintToggle) { + pairAnimInfo = m_Animation[STATEANIM::SPRINT]; + } + else if (m_bWalkToggle) { + pairAnimInfo = m_Animation[STATEANIM::WALK_FWD]; + } + else { + pairAnimInfo = m_Animation[STATEANIM::JOG_FWD]; + } + } + else { + pairAnimInfo = m_Animation[STATEANIM::IDLE]; + } + m_pModelCom->Set_Second_AnimationIndex(ENUM_CLASS(BLEND_BONE::SHOULDER_R), m_Animation[STATEANIM::LUMOS_STOP].first, m_Animation[STATEANIM::LUMOS_STOP].second); + } + break; } } else { @@ -1389,6 +1386,38 @@ void CPlayer::Behavior_SpellExit() m_pFSM->Disable_State(FSMSTATE::SPELL); } +void CPlayer::Behavior_ShieldEnter() +{ + pair<_uint, _bool> pairAnimInfo; + + m_pFSM->Enable_State(FSMSTATE::SHIELD); + pairAnimInfo = m_Animation[STATEANIM::SKILL2]; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + + Add_Event(pairAnimInfo.first, + [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::PROTEGO, this); }, + 0.4f); +} + +HRESULT CPlayer::Behavior_ShieldExitCheck() +{ + if (m_pModelCom->IsFinishedAnim()) { + if (SUCCEEDED(InputMove())) + { + m_pFSM->Change_State(FSMSTATE::MOVE); + } + else { + m_pFSM->Change_State(FSMSTATE::IDLE); + } + } + return E_FAIL; +} + +void CPlayer::Behavior_ShieldExit() +{ + m_pFSM->Disable_State(FSMSTATE::SHIELD); +} + void CPlayer::Behavior_HitEnter() { m_pFSM->Enable_State(FSMSTATE::HIT); @@ -1409,6 +1438,23 @@ void CPlayer::Behavior_HitEnter() break; } + if (m_fHitDegree >= 90.f) + { + pairAnimInfo = m_Animation[STATEANIM::FLINCH_BWD]; + } + else if (m_fHitDegree >= 45.f) { + + if (m_fHitCross > 0.f) { + pairAnimInfo = m_Animation[STATEANIM::FLINCH_LEFT]; + } + else { + pairAnimInfo = m_Animation[STATEANIM::FLINCH_RIGHT]; + } + } + else if(m_fHitDegree>=0.f){ + pairAnimInfo = m_Animation[STATEANIM::FLINCH_FWD]; + } + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); } @@ -2063,6 +2109,17 @@ void CPlayer::Add_FSM() Desc.funcLateUpdate = nullptr; m_States.emplace(FSMSTATE::SPELL, CState_Spell::Create(&Desc)); } + + { + CState_Shield::STATE_SHIELD_DESC Desc{}; + Desc.pOwner = this; + Desc.funcEnterEvent = [this]() { Behavior_ShieldEnter(); }; + Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_ShieldExitCheck(); }; + Desc.funcExitEvent = [this]() { Behavior_ShieldExit(); }; + Desc.funcPriorityUpdate = nullptr; + Desc.funcLateUpdate = nullptr; + m_States.emplace(FSMSTATE::SHIELD, CState_Shield::Create(&Desc)); + } #pragma endregion #pragma region Behavior_Combat_Focus @@ -2259,6 +2316,10 @@ void CPlayer::Set_Anim() m_Animation[STATEANIM::HIT_L] = { 1200,false }; m_Animation[STATEANIM::HIT_R] = { 1201,false }; + m_Animation[STATEANIM::FLINCH_BWD] = { 1060,false }; + m_Animation[STATEANIM::FLINCH_FWD] = { 1061,false }; + m_Animation[STATEANIM::FLINCH_LEFT] = { 1062,false }; + m_Animation[STATEANIM::FLINCH_RIGHT] = { 1063,false }; m_Animation[STATEANIM::KNOCKBACK] = { 1078,false }; m_Animation[STATEANIM::BROOM_IDLE] = { 710,true }; diff --git a/Jusin154_Team3D/Client/Private/Potion.cpp b/Jusin154_Team3D/Client/Private/Potion.cpp index 235a2e4c6..c16c19c53 100644 --- a/Jusin154_Team3D/Client/Private/Potion.cpp +++ b/Jusin154_Team3D/Client/Private/Potion.cpp @@ -1,6 +1,7 @@ #include "pch.h" #include "Potion.h" #include "GameInstance.h" +#include "InfoInstance.h" CPotion::CPotion(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) :CElementObject(pDevice, pContext) @@ -8,7 +9,8 @@ CPotion::CPotion(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) } CPotion::CPotion(const CPotion& rhs) - :CElementObject(rhs) + :CElementObject(rhs), + m_pInfoInstance(CInfoInstance::GetInstance()) { } @@ -44,11 +46,22 @@ HRESULT CPotion::Initialize(void* pArg) m_vImageSize = _float2(32.f, 32.f); m_fFontX = 1163.f; m_fFontY = 860.f; - m_iPotionIndex = 0; + m_iPotionIndex = 10; m_iPerPotionIndex = -1; + m_iPotion_Level = 1; return S_OK; } +_float CPotion::Use_Potion() +{ + if (m_iPotionIndex == 0) + return -1.f; + + m_iPotionIndex--; + + return floor(m_pInfoInstance->Get_PlayerStatPtr()->Get_Stat().fMaxHp * (m_iPotion_Level * 0.25f)); +} + void CPotion::Priority_Update(_float fTimeDelta) { if (!__super::Chack_Visible()) @@ -90,11 +103,6 @@ void CPotion::Update(_float fTimeDelta) } } - if (m_pGameInstance->Key_Down(DIK_G)) - { - m_fTime = -1.f; - } - if (m_iPerPotionIndex != m_iPotionIndex) { m_strPotion = to_wstring(m_iPotionIndex); diff --git a/Jusin154_Team3D/Client/Private/Skill_Data.cpp b/Jusin154_Team3D/Client/Private/Skill_Data.cpp index 8c190dab2..7866ae75c 100644 --- a/Jusin154_Team3D/Client/Private/Skill_Data.cpp +++ b/Jusin154_Team3D/Client/Private/Skill_Data.cpp @@ -16,6 +16,9 @@ HRESULT CSkill_Data::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pCon m_bNoCool = false; m_pInfoInstance->Add_Event(TEXT("NoCooL"), [this](void* p) {this->NoCool(*reinterpret_cast<_bool*>(p)); }); + Spell_UnLock(2); + Spell_UnLock(6); + Spell_UnLock(11); return S_OK; } @@ -54,6 +57,15 @@ void CSkill_Data::Update_Damage(_float Damage) } } +void CSkill_Data::Spell_UnLock(_int SpellID) +{ + if (SpellInfo[SpellID].bSpell_Lock == true) + return; + + SpellInfo[SpellID].bSpell_Lock = true; + m_pInfoInstance->Event_CallBack(TEXT("Spell_UnLock"), &SpellInfo[SpellID].bSpell_Lock); +} + void CSkill_Data::Update(_float fTimeDelta) { for (_int i = 0; i < m_iSpell_Count; ++i) diff --git a/Jusin154_Team3D/Client/Private/Spell_Anim.cpp b/Jusin154_Team3D/Client/Private/Spell_Anim.cpp index 5ce3998bf..34b4f071c 100644 --- a/Jusin154_Team3D/Client/Private/Spell_Anim.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_Anim.cpp @@ -88,23 +88,30 @@ void CSpell_Anim::Update(_float fTimeDelta) m_bAnim_Start = false; } - - if (m_bAnim_Start == true) + if (m_bFadeOut == false) { - m_fTime += fTimeDelta * m_fTimeMult; - } - else - { - m_iCurrentFrame = 0; - } - - if (m_fTime >= m_fFrameTime) - { - m_iCurrentFrame++; - m_fTime -= m_fFrameTime; - - if (m_iCurrentFrame >= m_iTotalFrames) + if (m_bAnim_Start == true) + { + m_fTime += fTimeDelta * m_fTimeMult; + } + else + { m_iCurrentFrame = 0; + } + + if (m_fTime >= m_fFrameTime) + { + m_iCurrentFrame++; + m_fTime -= m_fFrameTime; + + if (m_iCurrentFrame >= m_iTotalFrames) + m_iCurrentFrame = 0; + } + } + + if (m_iPerSpell != -1) + { + m_fY = m_fOrigin_Position.y + m_pInfoInstance->Get_Spell_Info(m_iPerSpell).fVidio; } __super::Update(fTimeDelta); diff --git a/Jusin154_Team3D/Client/Private/Spell_Header.cpp b/Jusin154_Team3D/Client/Private/Spell_Header.cpp index 491322ec4..685d50aa5 100644 --- a/Jusin154_Team3D/Client/Private/Spell_Header.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_Header.cpp @@ -48,7 +48,6 @@ HRESULT CSpell_Header::Initialize(void* pArg) static_cast(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); }); static_cast(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); }); static_cast(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); }); - static_cast(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); }); m_fFontX = 920.f; m_fFontY = 510.f; m_fType = _float2(935.f, 550.f); @@ -101,12 +100,15 @@ void CSpell_Header::Update(_float fTimeDelta) } } - if (m_iSpellType != -1 && m_iPerSpellIndex != m_iSpellType) + if (m_bFadeOut == false) { - m_iSkillType = static_cast(m_pOwner)->Get_Info(m_iSpellType).iSpell_Type; - m_pSpell_Name = static_cast(m_pOwner)->Get_Info(m_iSpellType).pSpell_Name; - m_fSpell_Type = static_cast(m_pOwner)->Get_Info(m_iSpellType).pType_Name; - m_iPerSpellIndex = m_iSpellType; + if (m_iSpellType != -1 && m_iPerSpellIndex != m_iSpellType) + { + m_iSkillType = m_pInfoInstance->Get_Spell_Info(m_iSpellType).iSpell_Type; + m_pSpell_Name = m_pInfoInstance->Get_Spell_Info(m_iSpellType).pSpell_Name; + m_fSpell_Type = m_pInfoInstance->Get_Spell_Info(m_iSpellType).pType_Name; + m_iPerSpellIndex = m_iSpellType; + } } m_fTime += fTimeDelta * m_fTimeMult; diff --git a/Jusin154_Team3D/Client/Private/Spell_Preview.cpp b/Jusin154_Team3D/Client/Private/Spell_Preview.cpp index 67c9c579e..074f99af1 100644 --- a/Jusin154_Team3D/Client/Private/Spell_Preview.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_Preview.cpp @@ -104,12 +104,15 @@ void CSpell_Preview::Update(_float fTimeDelta) } } - if (m_iSpellType != -1 && m_iPerSpellIndex != m_iSpellType) + if (m_bFadeOut == false) { - m_pSpell_Info = static_cast(m_pOwner)->Get_Info(m_iSpellType).pSpellInfo; - m_fPreviewOffSet = static_cast(m_pOwner)->Get_Info(m_iSpellType).fPreview; - SizeUpY(m_fOriginPerviewSize + m_fPreviewOffSet); - m_iPerSpellIndex = m_iSpellType; + if (m_iSpellType != -1) + { + m_pSpell_Info = m_pInfoInstance->Get_Spell_Info(m_iSpellType).pSpellInfo; + m_fPreviewOffSet = m_pInfoInstance->Get_Spell_Info(m_iSpellType).fPreview; + SizeUpY(m_fOriginPerviewSize + m_fPreviewOffSet); + m_iPerSpellIndex = m_iSpellType; + } } m_fTime += fTimeDelta * m_fTimeMult; diff --git a/Jusin154_Team3D/Client/Private/Spell_State.cpp b/Jusin154_Team3D/Client/Private/Spell_State.cpp index bcfce9906..da1e3d9b9 100644 --- a/Jusin154_Team3D/Client/Private/Spell_State.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_State.cpp @@ -1,6 +1,7 @@ #include "pch.h" #include "Spell_State.h" #include "GameInstance.h" +#include "InfoInstance.h" CSpell_State::CSpell_State(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) :CElementObject(pDevice, pContext) @@ -8,7 +9,8 @@ CSpell_State::CSpell_State(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) } CSpell_State::CSpell_State(const CSpell_State& rhs) - :CElementObject(rhs) + :CElementObject(rhs), + m_pInfoInstance(CInfoInstance::GetInstance()) { } @@ -47,6 +49,8 @@ HRESULT CSpell_State::Initialize(void* pArg) m_pVIBufferCom->Set_Pos(-185.f, 375.f, m_fOffSetX, m_fOffSetY, m_iCols); m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); static_cast(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); }); + m_pInfoInstance->Add_Event(TEXT("Spell_UnLock"), [this](void* p) {this->Spell_UnLock(*reinterpret_cast<_int*>(p)); }); + Spell_Setting(); return S_OK; } @@ -118,7 +122,7 @@ HRESULT CSpell_State::Render() { return E_FAIL; } - if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIINTANCE::ALPHABLEND)))) + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIINTANCE::SPELL_LOCK)))) { return E_FAIL; } @@ -170,6 +174,24 @@ void CSpell_State::Click_Slot(_bool bClick) } } +void CSpell_State::Spell_Setting() +{ + for (_int i = 0; i < 26; ++i) + { + m_bLock[i] = m_pInfoInstance->Get_Spell_Info(i).bSpell_Lock; + if (m_bLock[i] == true) + { + m_pVIBufferCom->Set_Equip_Index(i); + } + } +} + +void CSpell_State::Spell_UnLock(_int iSpellIndex) +{ + m_pVIBufferCom->Set_Equip_Index(iSpellIndex); + m_bLock[iSpellIndex] = true; +} + HRESULT CSpell_State::Bind_ShaderResources() { if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) diff --git a/Jusin154_Team3D/Client/Private/Spell_Vidio_Border.cpp b/Jusin154_Team3D/Client/Private/Spell_Vidio_Border.cpp index 7521a2e79..2aa6094a2 100644 --- a/Jusin154_Team3D/Client/Private/Spell_Vidio_Border.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_Vidio_Border.cpp @@ -1,6 +1,7 @@ #include "pch.h" #include "Spell_Vidio_Border.h" #include "GameInstance.h" +#include "InfoInstance.h" CSpell_Vidio_Border::CSpell_Vidio_Border(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) :CElementObject(pDevice, pContext) @@ -8,7 +9,8 @@ CSpell_Vidio_Border::CSpell_Vidio_Border(ID3D11Device* pDevice, ID3D11DeviceCont } CSpell_Vidio_Border::CSpell_Vidio_Border(const CSpell_Vidio_Border& rhs) - :CElementObject(rhs) + :CElementObject(rhs), + m_pInfoInstance(CInfoInstance::GetInstance()) { } @@ -92,6 +94,14 @@ void CSpell_Vidio_Border::Update(_float fTimeDelta) } } + if (m_bFadeOut == false) + { + if (m_iSpellType != -1) + { + m_fY = m_fOrigin_Position.y + m_pInfoInstance->Get_Spell_Info(m_iSpellType).fVidio; + } + } + m_fTime += fTimeDelta * m_fTimeMult; if (m_fAlpha >= 0.3f) diff --git a/Jusin154_Team3D/Client/Private/State_Shield.cpp b/Jusin154_Team3D/Client/Private/State_Shield.cpp new file mode 100644 index 000000000..fbf855e80 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/State_Shield.cpp @@ -0,0 +1,64 @@ +#include "pch.h" +#include "State_Shield.h" +#include "Unit.h" + + +CState_Shield::CState_Shield() + :CState_Root() +{ +} + +void CState_Shield::Enter() +{ + __super::Enter(); +} + +HRESULT CState_Shield::Update(_float fTimeDelta) +{ + if (nullptr != m_funcPriorityUpdate) { + m_funcPriorityUpdate(fTimeDelta); + } + if (E_FAIL == (__super::Update(fTimeDelta))) { + return E_FAIL; + } + if (nullptr != m_funcLateUpdate) { + m_funcLateUpdate(fTimeDelta); + } + return S_OK; +} + +void CState_Shield::Exit() +{ + __super::Exit(); +} + +HRESULT CState_Shield::Initialize(STATE_SHIELD_DESC* pDesc) +{ + if (FAILED(__super::Initialize(pDesc))) { + return E_FAIL; + } + m_funcPriorityUpdate = pDesc->funcPriorityUpdate; + m_funcLateUpdate = pDesc->funcLateUpdate; + m_pModel = m_pOwner->Get_Component(); + m_pFSM = m_pOwner->Get_Component(); + + return S_OK; +} + +CState_Shield* CState_Shield::Create(STATE_SHIELD_DESC* pDesc) +{ + CState_Shield* pInstance = new CState_Shield; + if (FAILED(pInstance->Initialize(pDesc))) { + SAFE_RELEASE(pInstance); + } + return pInstance; +} + +void CState_Shield::Free() +{ + __super::Free(); +} + +void CState_Shield::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Client/Private/StunEffect.cpp b/Jusin154_Team3D/Client/Private/StunEffect.cpp index 939c7915a..5db5fb195 100644 --- a/Jusin154_Team3D/Client/Private/StunEffect.cpp +++ b/Jusin154_Team3D/Client/Private/StunEffect.cpp @@ -78,9 +78,9 @@ void CStunEffect::Update(_float fTimeDelta) BoneMat.r[i] = XMVector3Normalize(BoneMat.r[i]); } - m_pStunEffect->Get_Component()->Set_WorldMatrix(BoneMat * m_pOwner->Get_Component()->Get_XMWorldMatrix()); + BoneMat *= m_pOwner->Get_Component()->Get_XMWorldMatrix(); - m_pStunEffect->Get_Component()->Rotation(XMVectorSet(0.f, 0.f, XMConvertToRadians(180.f), 0.f)); + m_pStunEffect->Get_Component()->Set_State(STATE::POSITION, BoneMat.r[3]); } @@ -109,10 +109,11 @@ HRESULT CStunEffect::Pre_Setting(CGameObject* pObject, void* pArg) for (int i = 0; i < 3; ++i) { BoneMat.r[i] = XMVector3Normalize(BoneMat.r[i]); } + BoneMat *= m_pOwner->Get_Component()->Get_XMWorldMatrix(); + + m_pStunEffect->Get_Component()->Set_State(STATE::POSITION, BoneMat.r[3]); - m_pStunEffect->Get_Component()->Set_WorldMatrix(BoneMat * m_pOwner->Get_Component()->Get_XMWorldMatrix()); - m_pStunEffect->Get_Component()->Rotation(XMVectorSet(0.f, 0.f , 90.f, 0.f)); m_pStunEffect->Set_Visible(true); diff --git a/Jusin154_Team3D/Client/Private/Troll.cpp b/Jusin154_Team3D/Client/Private/Troll.cpp index da1025840..cf03a70ee 100644 --- a/Jusin154_Team3D/Client/Private/Troll.cpp +++ b/Jusin154_Team3D/Client/Private/Troll.cpp @@ -11,6 +11,7 @@ #include "EffectPool.h" #include "Layer.h" #include "TrailObject.h" +#include "MapElement_Interactable.h" #pragma region STATE #include "State_Idle.h" @@ -329,21 +330,42 @@ _vector CTroll::Get_LockOnPos() void CTroll::OnCollision(CGameObject* pOther, void* pDesc) { + if (true == m_bDead) { + return; + } + ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc); + + _vector Head = (XMLoadFloat4x4(Get_HeadMatrix()) * m_pTransformCom->Get_XMWorldMatrix()).r[3]; + m_DamageInfo.vTarget_Pos = XMVectorSet(Head.m128_f32[0], Head.m128_f32[1], Head.m128_f32[2], 1.f); + _uint iSkillType = dynamic_cast(pOther)->Get_SkillType(); + auto damagePair = Get_Damage(m_pInfoInstance->Get_Spell_Damage(iSkillType)); switch (iSkillType) { case ENUM_CLASS(SKILL_TYPE::DESCENDO): - m_eHitSpell = STATEANIM::KNOCKDOWN_FWD; + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::DESCENDO); + break; + case ENUM_CLASS(SKILL_TYPE::BOMBARDA): + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::DESCENDO); break; case ENUM_CLASS(SKILL_TYPE::FLIPENDO): - m_eHitSpell = STATEANIM::TUMBLE2; + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::FLIPENDO); + break; + case ENUM_CLASS(SKILL_TYPE::JAP): + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::JAP); break; default: - m_eHitSpell = STATEANIM::KNOCKDOWN_FWD; + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::END); break; } + m_DamageInfo.fDamage = damagePair.first; + m_pInfoInstance->Event_CallBack(TEXT("Monster_Hit"), &m_DamageInfo); + if (0 == damagePair.second) { + m_pFSM->Change_State(FSMSTATE::DEAD); + return; + } m_pFSM->Change_State(FSMSTATE::HIT); } diff --git a/Jusin154_Team3D/Client/Private/Troll_Rock.cpp b/Jusin154_Team3D/Client/Private/Troll_Rock.cpp index c88512a42..cb1ee4aa4 100644 --- a/Jusin154_Team3D/Client/Private/Troll_Rock.cpp +++ b/Jusin154_Team3D/Client/Private/Troll_Rock.cpp @@ -38,6 +38,7 @@ HRESULT CTroll_Rock::Initialize(void* pArg) void CTroll_Rock::Priority_Update(_float fTimeDelta) { + XMStoreFloat4(&m_vStartPos, m_pTransformCom->Get_State(STATE::POSITION)); m_pModelCom->Combined_BoneMatrix(); if (m_bAttach) { @@ -62,7 +63,6 @@ void CTroll_Rock::Priority_Update(_float fTimeDelta) m_pTransformCom->Go_Straight(fTimeDelta); } - XMStoreFloat4(&m_vStartPos, m_pTransformCom->Get_State(STATE::POSITION)); #ifdef _DEBUG @@ -111,7 +111,19 @@ void CTroll_Rock::RockHit() PSX::PxSweepHit* pHit = Hits[i]; PSX::PxActor* pActor = pHit->actor; if (nullptr != pActor && nullptr != pActor->userData) { + const PSX::PxSweepHit& hit = m_SweepBuffer.block; + PSX::PxShape* pShape = hit.shape; + ON_COLLISION_INFO tagCollInfo = {}; + + tagCollInfo.vWorldPos.w = 1.f; + + 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 = fLength; PhsXUserData* pUserData = static_cast(pActor->userData); + tagCollInfo.pObject = pUserData->pOwner; switch (PXOBJECT(pUserData->iSubKind)) { case Engine::PXOBJECT::PLAYER: @@ -122,6 +134,7 @@ void CTroll_Rock::RockHit() m_bVisible = false; CStat* pStat = pUserData->pCharacter->Get_Owner()->Get_Component(); pStat->Get_Damage(10.f); + pUserData->pOwner->OnCollision(this, &tagCollInfo); } break; case Engine::PXOBJECT::ALLY_HITBOX: diff --git a/Jusin154_Team3D/Client/Private/Troll_States.cpp b/Jusin154_Team3D/Client/Private/Troll_States.cpp index 9652b509d..46332d5db 100644 --- a/Jusin154_Team3D/Client/Private/Troll_States.cpp +++ b/Jusin154_Team3D/Client/Private/Troll_States.cpp @@ -21,6 +21,7 @@ #include "State_Swing.h" #include "State_Slam.h" #include "State_Hit.h" +#include "State_Dead.h" #pragma endregion @@ -469,6 +470,7 @@ void CTroll::SwingHit(_bool& bPlayerHit) pStat->Get_Damage(20.f); Damage = 7.f; bPlayerHit = true; + pUserData->pOwner->OnCollision(this); } break; case PXOBJECT::ALLY_HITBOX: break; @@ -607,9 +609,6 @@ void CTroll::Behavior_StunEnter() [this]() { m_bLookAt = true; }, 0.6f); - - - } HRESULT CTroll::Behavior_StunExitCheck(_float fTimeDelta) @@ -684,6 +683,36 @@ void CTroll::Behavior_HitExit() m_pFSM->Disable_State(FSMSTATE::HIT); } +void CTroll::Behavior_DeadEnter() +{ + m_bLookAt = false; + m_pFSM->Enable_State(FSMSTATE::DEAD); + _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex(); + pair<_uint, _bool> pairAnimInfo; + + pairAnimInfo = m_Animation[STATEANIM::KNOCKDOWN_BWD]; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + + PSX::PxExtendedVec3 pxControlllerPos = m_pCharacter_Controller->Get_Controller()->getPosition(); + PSX::PxTransform pxTransform((_float)pxControlllerPos.x, (_float)pxControlllerPos.y + 100.f, (_float)pxControlllerPos.z); + m_pCharacter_Controller->Set_Position(XMLoadFloat3((_float3*)&pxTransform.p)); + m_pRigidBody->SetActive(false); + m_pCharacter_Controller->SetActive(false); +} + +HRESULT CTroll::Behavior_DeadExitCheck(_float fTimeDelta) +{ + if (m_pModelCom->IsFinishedAnim()) { + m_bDead = true; + } + return S_OK; +} + +void CTroll::Behavior_DeadExit() +{ + m_bDead = true; +} + void CTroll::Add_FSM() { @@ -810,6 +839,19 @@ void CTroll::Add_FSM() m_States.emplace(FSMSTATE::HIT, CState_Hit::Create(&Desc)); } + { + CState_Dead::STATE_DEAD_DESC Desc{}; + Desc.pOwner = this; + Desc.funcEnterEvent = [this]() { Behavior_DeadEnter(); }; + Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_DeadExitCheck(fTimedelta); }; + Desc.funcExitEvent = [this]() { Behavior_DeadExit(); }; + Desc.funcLateUpdate = [this](_float fDeadRatio) { + }; + Desc.vDeadTimer.x = FLT_EPSILON5; + Desc.vDeadTimer.y = 2.f; + m_States.emplace(FSMSTATE::DEAD, CState_Dead::Create(&Desc)); + } + #pragma endregion } @@ -834,6 +876,7 @@ void CTroll::SlamHit(_bool& bPlayerHit) CStat* pStat = pUserData->pCharacter->Get_Owner()->Get_Component(); pStat->Get_Damage(20.f); bPlayerHit = true; + pUserData->pOwner->OnCollision(this); } break; case PXOBJECT::ALLY_HITBOX: break; @@ -940,6 +983,8 @@ void CTroll::Set_Anim() m_Animation[STATEANIM::HIT_BWD2] = { 168, false }; // m_Animation[STATEANIM::HIT_BWD3] = { 169, false }; // + m_Animation[STATEANIM::HIT_FWD] = { 170,false }; + m_Animation[STATEANIM::HIT_FACE] = { 156, false }; // m_Animation[STATEANIM::HIT_FACE_END] = { 157, false }; // diff --git a/Jusin154_Team3D/Client/Public/Action_Panel.h b/Jusin154_Team3D/Client/Public/Action_Panel.h index 6b7d20e1d..eeaa2609b 100644 --- a/Jusin154_Team3D/Client/Public/Action_Panel.h +++ b/Jusin154_Team3D/Client/Public/Action_Panel.h @@ -38,6 +38,7 @@ class CAction_Panel final : public CPanelObject void Use_Spell(_int Index); void Spell_Setting(void* pArg); + void Use_Potion(); private: virtual HRESULT Bind_ShaderResources() override; virtual HRESULT Ready_Components(void* pArg) override; diff --git a/Jusin154_Team3D/Client/Public/Barral_Splesh.h b/Jusin154_Team3D/Client/Public/Barral_Splesh.h new file mode 100644 index 000000000..5967b2a22 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Barral_Splesh.h @@ -0,0 +1,42 @@ +#pragma once + +#include "Client_Define.h" +#include "Effect_Container.h" + +NS_BEGIN(Engine) +NS_END + +NS_BEGIN(Client) + +class CBarral_Splesh final : public CEffect_Container +{ +private: + CBarral_Splesh(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CBarral_Splesh(const CBarral_Splesh& rhs); + virtual ~CBarral_Splesh() = default; + +public: + virtual void Priority_Update(_float fTimeDelta) override; + virtual void Update(_float fTimeDelta) override; + virtual void Late_Update(_float fTimeDelta) override; + +public: + virtual HRESULT Pre_Setting(CGameObject* pObject, void* pArg = nullptr) override; + +private: + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + virtual HRESULT Ready_Components(void* pArg) override; + HRESULT Ready_Child(); + HRESULT Bind_ShaderResources() override; + virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override; +private: + _wstring m_wstrEffectName = {}; +public: + static CBarral_Splesh* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual void Free() override; + CGameObject* Clone(void* pArg, CGameObject* pOwner) override; + void Describe_Entity() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Box_Splesh.h b/Jusin154_Team3D/Client/Public/Box_Splesh.h new file mode 100644 index 000000000..d165b109f --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Box_Splesh.h @@ -0,0 +1,42 @@ +#pragma once + +#include "Client_Define.h" +#include "Effect_Container.h" + +NS_BEGIN(Engine) +NS_END + +NS_BEGIN(Client) + +class CBox_Splesh final : public CEffect_Container +{ +private: + CBox_Splesh(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CBox_Splesh(const CBox_Splesh& rhs); + virtual ~CBox_Splesh() = default; + +public: + virtual void Priority_Update(_float fTimeDelta) override; + virtual void Update(_float fTimeDelta) override; + virtual void Late_Update(_float fTimeDelta) override; + +public: + virtual HRESULT Pre_Setting(CGameObject* pObject, void* pArg = nullptr) override; + +private: + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + virtual HRESULT Ready_Components(void* pArg) override; + HRESULT Ready_Child(); + HRESULT Bind_ShaderResources() override; + virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override; +private: + _wstring m_wstrEffectName = {}; +public: + static CBox_Splesh* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual void Free() override; + CGameObject* Clone(void* pArg, CGameObject* pOwner) override; + void Describe_Entity() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Chair_Splesh.h b/Jusin154_Team3D/Client/Public/Chair_Splesh.h new file mode 100644 index 000000000..23793a329 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Chair_Splesh.h @@ -0,0 +1,42 @@ +#pragma once + +#include "Client_Define.h" +#include "Effect_Container.h" + +NS_BEGIN(Engine) +NS_END + +NS_BEGIN(Client) + +class CChair_Splesh final : public CEffect_Container +{ +private: + CChair_Splesh(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CChair_Splesh(const CChair_Splesh& rhs); + virtual ~CChair_Splesh() = default; + +public: + virtual void Priority_Update(_float fTimeDelta) override; + virtual void Update(_float fTimeDelta) override; + virtual void Late_Update(_float fTimeDelta) override; + +public: + virtual HRESULT Pre_Setting(CGameObject* pObject, void* pArg = nullptr) override; + +private: + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + virtual HRESULT Ready_Components(void* pArg) override; + HRESULT Ready_Child(); + HRESULT Bind_ShaderResources() override; + virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override; +private: + _wstring m_wstrEffectName = {}; +public: + static CChair_Splesh* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual void Free() override; + CGameObject* Clone(void* pArg, CGameObject* pOwner) override; + void Describe_Entity() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Client_Enum.h b/Jusin154_Team3D/Client/Public/Client_Enum.h index 81bcffa29..263032014 100644 --- a/Jusin154_Team3D/Client/Public/Client_Enum.h +++ b/Jusin154_Team3D/Client/Public/Client_Enum.h @@ -13,7 +13,8 @@ namespace Client enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, TRAIL_BLEND, TRAILWB_FOR_BLEND, TRAIL_BLUR, TRAIL_BLOOM, END }; enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, BLEND, BLEND_NOWORLD, BLOOM, BLOOM_NOWORLD, BLUR_NO_EMMISVE, BLUR_NO_WORLD_NO_EMISSIVE, WEIGHTBLEND_FOR_BLEND, END }; enum class SHADER_PASS_UIEDITOR { DEFAULT, LOGO, LOGO_TEXT, LOGO_GLOW, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, TYPE, HPBAR, MAGIC_METER, MAGIC_ICON, REMOVEUV, REVELIO, POTION, MAGIC_ITEM, SPELL_PREVIEW, SPELL_HEADER, SPELL_HEADER_LINE, SPELL_DRAG, CAMERA_LOCKON, LODING_SCREEN, ENEMY_HPBAR, BOSS_HPBAR, ENEMY_DETECTION, END }; - enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, UVALPHABLEND, MAGIC_METER, SPELL_LIST, EESSENTIAL_SPELL_SOLT, EESSENTIAL_SPELL, COLOR, SPELL_HOVER, SPELL_SLOT_EFFECT, SPELL_SLOT, END }; + enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, UVALPHABLEND, MAGIC_METER, SPELL_LIST, EESSENTIAL_SPELL_SOLT, EESSENTIAL_SPELL, COLOR, SPELL_HOVER, SPELL_SLOT_EFFECT, SPELL_SLOT, SPELL_LOCK, END }; + enum class SHADER_PASS_NPC_PBR_ANIM { EYELASH_DAOTHV_ToSRO, TEETH_SRXO_ToSRO, EYE_DN_ToSRO, EYE_OCC, FACIAL_HAIR_DAOTHV_ToSRO, HEAD_HAIR_DAOTHV_ToSRO, HEADwtHAND_DSRXON_ToSRO, LOWER_DSRON_ToSRO, UPPER_DMRON_ToMRO, GLASSES_DMRON_ToMRO, EmissiveMetalness_DENMRO_ToMRO, MI_ClothSim_DSEN_ToSRO, MI_Troll_Club_DAENMROSRXO_To , OUTLINE_READ, TEETH_SRXO_ToSRO__OUTLINE_WRITE, EYE_DN_ToSRO__OUTLINE_WRITE, HEADwtHAND_DSRXON_ToSRO__OUTLINE_WRITE, UPPER_DMRON_ToMRO__OUTLINE_WRITE, EmissiveMetalness_DENMRO_ToMRO__OUTLINE_WRITE, MI_ClothSim_DSEN_ToSRO__OUTLINE_WRITE @@ -35,6 +36,9 @@ namespace Client JAP, REVELIO, PROTEGO, STUPEFY, // 검은색 ANCIENT_MAGIC_THROW, ANCIENT_MAGIC, ALOHOMORA, PETRIFICUS_TOTALUS, + /* PROPS */ + + BOX_SPLESH, CHAIL_SPLESH , BARRAL_SPLASH, /*상태 이펙트*/ STUN, diff --git a/Jusin154_Team3D/Client/Public/EffectObject.h b/Jusin154_Team3D/Client/Public/EffectObject.h index fd4693f0e..055336155 100644 --- a/Jusin154_Team3D/Client/Public/EffectObject.h +++ b/Jusin154_Team3D/Client/Public/EffectObject.h @@ -151,7 +151,7 @@ class CEffectObject abstract : public CPartObject void Disable_Light(); void Add_Light(); - void FollowParents(const _float4x4* pParentsMat); + void FollowParents(const _float4x4* pParentsMat, const _float4x4* pOffsetMat = nullptr); protected: virtual HRESULT Bind_ShaderResources() override; virtual HRESULT Ready_Components(void* pArg) override; @@ -172,6 +172,7 @@ class CEffectObject abstract : public CPartObject CInstance_Model* m_pInstance_ModelCom = { nullptr }; const _float4x4* m_pParentMatrix = { nullptr }; + _float4x4 m_FinalParentMatrix; protected: EFFECT_INFO m_EffectInfo = {}; diff --git a/Jusin154_Team3D/Client/Public/EffectPool.h b/Jusin154_Team3D/Client/Public/EffectPool.h index a1d0a1810..4bfbb7939 100644 --- a/Jusin154_Team3D/Client/Public/EffectPool.h +++ b/Jusin154_Team3D/Client/Public/EffectPool.h @@ -35,6 +35,9 @@ class CEffectPool final : public CGameObject HRESULT Bind_ShaderResources(); HRESULT Ready_Effect(); HRESULT Ready_MonsterEffect(); +private: + _bool m_isActiveEffectCreate = { true }; + _bool m_isActiveMonsterEffectCreate = { true }; public: static CEffectPool* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr) override; diff --git a/Jusin154_Team3D/Client/Public/Enemy_Detection.h b/Jusin154_Team3D/Client/Public/Enemy_Detection.h index 22dfdc79f..e63552797 100644 --- a/Jusin154_Team3D/Client/Public/Enemy_Detection.h +++ b/Jusin154_Team3D/Client/Public/Enemy_Detection.h @@ -31,6 +31,9 @@ class CEnemy_Detection final : public CPartObject void SizeUpY(_float fY); void SizeUpdate(_float fSize); +public: + void Set_Active(_bool bAtcive); + _bool Get_Step(); private: const _float4x4* m_pSocketMatrices = { }; CTexture* m_pDiffuse_TextureCom = { nullptr }; @@ -50,12 +53,13 @@ class CEnemy_Detection final : public CPartObject _bool m_bStep2 = { false }; _bool m_bStep3 = { false }; - _bool m_fActive = { false }; - _bool m_fSizeUp = { false }; + _bool m_bActive = { false }; + _bool m_bSizeUp = { false }; + _bool m_bAtteckTrigger = { false }; _float3 m_fOrigin_Size{}; - _float2 m_fSize; + _float3 m_fSize{}; _float m_fAlpha{}; _float m_fTime{}; diff --git a/Jusin154_Team3D/Client/Public/Goblin.h b/Jusin154_Team3D/Client/Public/Goblin.h index 53a62d583..855201913 100644 --- a/Jusin154_Team3D/Client/Public/Goblin.h +++ b/Jusin154_Team3D/Client/Public/Goblin.h @@ -32,6 +32,7 @@ class CGoblin final : public CMonster virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr)override; virtual void OnHit(CGameObject* pOther, CGameObject* pCaller = nullptr)override; + void Set_Detection(_bool bDetection); private: CCallBack_Monster_Behavior* m_pCallBack_Behavior = { nullptr }; CCallBack_Monster_HitReport* m_pCallBack_HitReport = { nullptr }; @@ -45,6 +46,7 @@ class CGoblin final : public CMonster class CEffectPool* m_pEffectPool = nullptr; DAMAGE_INFO m_DamageInfo; + _bool m_bDetection = { false }; class CEffectParts* m_pSmoke = { nullptr }; class CEffectParts* m_pGoblin_Particle = { nullptr }; diff --git a/Jusin154_Team3D/Client/Public/Goblin_BattleAxe.h b/Jusin154_Team3D/Client/Public/Goblin_BattleAxe.h index 2784038ce..4df150f5c 100644 --- a/Jusin154_Team3D/Client/Public/Goblin_BattleAxe.h +++ b/Jusin154_Team3D/Client/Public/Goblin_BattleAxe.h @@ -18,8 +18,6 @@ class CGoblin_BattleAxe final : public CPartObject virtual ~CGoblin_BattleAxe() = default; public: - virtual HRESULT Initialize_Prototype() override; - virtual HRESULT Initialize(void* pArg) override; virtual void Priority_Update(_float fTimeDelta) override; virtual void Update(_float fTimeDelta) override; virtual void Late_Update(_float fTimeDelta) override; @@ -27,7 +25,6 @@ class CGoblin_BattleAxe final : public CPartObject HRESULT Render_Disolve(); void Set_Disolve(_bool bDisolve) { m_bDisolve = bDisolve; } const _float4x4 Get_AxeMatrix() { return m_vAxeMat; }; -public: private: const _float4x4* m_pSocketMatrices = { }; @@ -38,7 +35,13 @@ class CGoblin_BattleAxe final : public CPartObject _float4x4 m_vAxeMat= {}; +#ifdef _DEBUG + unique_ptr m_pGripShape = { nullptr }; + unique_ptr m_pSubShape = { nullptr }; +#endif // _DEBUG private: + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; HRESULT Ready_Components(); HRESULT Bind_ShaderResources(); diff --git a/Jusin154_Team3D/Client/Public/Goblin_Dagger.h b/Jusin154_Team3D/Client/Public/Goblin_Dagger.h index 4c0e545df..aa2813925 100644 --- a/Jusin154_Team3D/Client/Public/Goblin_Dagger.h +++ b/Jusin154_Team3D/Client/Public/Goblin_Dagger.h @@ -33,9 +33,13 @@ class CGoblin_Dagger final : public CPartObject CModel* m_pModelCom = { nullptr }; _bool m_bAttach = { true }; + _float4 m_vStartPos = {}; + PSX::PxSweepBufferN<12> m_SweepBuffer = {}; + private: HRESULT Ready_Components(); HRESULT Bind_ShaderResources(); + void Dagger_Hit(); public: static CGoblin_Dagger* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); diff --git a/Jusin154_Team3D/Client/Public/Goblin_Mage.h b/Jusin154_Team3D/Client/Public/Goblin_Mage.h index cc6a80c30..90175c73b 100644 --- a/Jusin154_Team3D/Client/Public/Goblin_Mage.h +++ b/Jusin154_Team3D/Client/Public/Goblin_Mage.h @@ -48,6 +48,10 @@ class CGoblin_Mage final : public CMonster class CEffectParts* m_pGoblin_Orb = { nullptr }; class CGoblin_Spector* m_pGoblinSpector = { nullptr }; + + _float m_fHoverTime = 0.1f; + _float m_fHoverHeight = 0.1f; + _float m_fHoverSpeed = 5.f; private: virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; @@ -71,7 +75,7 @@ class CGoblin_Mage final : public CMonster class CEffectPool* m_pEffectPool = { nullptr }; _float m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::END)] = {}; - _float m_fMaxSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::END)] = { 30.f,5.f,30.f,20.f }; + _float m_fMaxSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::END)] = { 20.f,5.f,30.f,15.f }; _bool m_bStep = { false }; _float m_fTpTime = {}; diff --git a/Jusin154_Team3D/Client/Public/InfoInstance.h b/Jusin154_Team3D/Client/Public/InfoInstance.h index 085323e09..c20e42e11 100644 --- a/Jusin154_Team3D/Client/Public/InfoInstance.h +++ b/Jusin154_Team3D/Client/Public/InfoInstance.h @@ -33,7 +33,6 @@ DECLARE_SINGLETON(CInfoInstance) pair<_float3, _float3> Get_CameraCoordinateSystem(); _float Player_Damage(); void Set_Damage(_float fDamage); - class CPlater* Get_PlayerInfo(); #pragma endregion #pragma region MONSTER_INFO HRESULT Regist_PlayerAlly(CUnit* pUnit); diff --git a/Jusin154_Team3D/Client/Public/MapElement_Interactable.h b/Jusin154_Team3D/Client/Public/MapElement_Interactable.h index 57aeb7647..e49c56fdd 100644 --- a/Jusin154_Team3D/Client/Public/MapElement_Interactable.h +++ b/Jusin154_Team3D/Client/Public/MapElement_Interactable.h @@ -27,11 +27,14 @@ class CMapElement_Interactable final : public CMapElement virtual void Late_Update(_float fTimeDelta) override; virtual HRESULT Render() override; virtual void GrapToPlayer(_fvector vPos, _float fRatio); + virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override; + ON_COLLISION_INFO CollisionCheck(_fvector StartPos, _fvector EndPos, _float fRadius); _vector Get_LockOnPos(); virtual void Set_DrawOutLine(); virtual HRESULT Render_OutLine() override; void Set_KinematicFlag(_bool bFlag); + private: ELEMENT_INTERACTABLE_ID m_eInteractableID = { ELEMENT_INTERACTABLE_ID::END }; class CInfoInstance* m_pInfoInstance = { nullptr }; @@ -44,7 +47,11 @@ class CMapElement_Interactable final : public CMapElement _float m_fOutLineScale = { 1.f }; _float m_fOutLinePower = { 1.f }; - + /* 충돌을 위한 변수*/ + _bool m_isGraped = { false }; + _bool m_bHit = { false }; + _float4 m_vStartPos = { 0.f, 0.f, 0.f, 1.f }; + class CEffectPool* m_pEffectPool = { nullptr }; private: virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; diff --git a/Jusin154_Team3D/Client/Public/Player.h b/Jusin154_Team3D/Client/Public/Player.h index 237a6cbb1..b62aabad5 100644 --- a/Jusin154_Team3D/Client/Public/Player.h +++ b/Jusin154_Team3D/Client/Public/Player.h @@ -162,6 +162,10 @@ class CPlayer final : public CUnit HRESULT Behavior_SpellExitCheck(); void Behavior_SpellExit(); + void Behavior_ShieldEnter(); + HRESULT Behavior_ShieldExitCheck(); + void Behavior_ShieldExit(); + void Behavior_HitEnter(); HRESULT Behavior_HitExitCheck(); void Behavior_HitExit(); diff --git a/Jusin154_Team3D/Client/Public/Potion.h b/Jusin154_Team3D/Client/Public/Potion.h index 6753becd7..232046634 100644 --- a/Jusin154_Team3D/Client/Public/Potion.h +++ b/Jusin154_Team3D/Client/Public/Potion.h @@ -31,6 +31,9 @@ class CPotion final : public CElementObject virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; +public: + _float Use_Potion(); + private: CTexture* m_pDiffuse_TextureCom = { nullptr }; CTexture* m_pDiffuse_TextureCom1 = { nullptr }; @@ -43,9 +46,13 @@ class CPotion final : public CElementObject _float2 m_vImageSlotPos{}; _float2 m_vImageSize{}; + CInfoInstance* m_pInfoInstance = { nullptr }; + _int m_iPotionIndex{}; _int m_iPerPotionIndex{}; _wstring m_strPotion; + _int m_iPotion_Level{}; + public: static CPotion* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Client/Public/Skill_Data.h b/Jusin154_Team3D/Client/Public/Skill_Data.h index ef13b7193..3c9e19acd 100644 --- a/Jusin154_Team3D/Client/Public/Skill_Data.h +++ b/Jusin154_Team3D/Client/Public/Skill_Data.h @@ -33,6 +33,7 @@ class CSkill_Data final : public CBase _int Update_Spell(_int SpellID); _float Get_Spell_Damage(_int SpellDamage); void Update_Damage(_float Damage); + void Spell_UnLock(_int SpellID); private: CInfoInstance* m_pInfoInstance = { nullptr }; diff --git a/Jusin154_Team3D/Client/Public/Spell_State.h b/Jusin154_Team3D/Client/Public/Spell_State.h index c16df540f..15388f7a6 100644 --- a/Jusin154_Team3D/Client/Public/Spell_State.h +++ b/Jusin154_Team3D/Client/Public/Spell_State.h @@ -31,6 +31,8 @@ class CSpell_State final : public CElementObject private: void Click_Slot(_bool bClick); + void Spell_Setting(); + void Spell_UnLock(_int iSpellIndex); private: virtual HRESULT Bind_ShaderResources() override; @@ -43,10 +45,15 @@ class CSpell_State final : public CElementObject CShader* m_pShaderCom = { nullptr }; CVIBuffer_UI_Instance* m_pVIBufferCom = { nullptr }; + CInfoInstance* m_pInfoInstance = { nullptr }; + _float m_fOffSetX{}; _float m_fOffSetY{}; _uint m_iCols{}; + _bool m_bLock[26] = {}; + + public: static CSpell_State* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Client/Public/Spell_Vidio_Border.h b/Jusin154_Team3D/Client/Public/Spell_Vidio_Border.h index 65534bc16..5a5662c4d 100644 --- a/Jusin154_Team3D/Client/Public/Spell_Vidio_Border.h +++ b/Jusin154_Team3D/Client/Public/Spell_Vidio_Border.h @@ -37,6 +37,8 @@ class CSpell_Vidio_Border final : public CElementObject CShader* m_pShaderCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + CInfoInstance* m_pInfoInstance = { nullptr }; + _float m_fStertTimer{}; _int m_iPerIndex{}; diff --git a/Jusin154_Team3D/Client/Public/State_Dead.h b/Jusin154_Team3D/Client/Public/State_Dead.h index fb79fec0f..1e40775d2 100644 --- a/Jusin154_Team3D/Client/Public/State_Dead.h +++ b/Jusin154_Team3D/Client/Public/State_Dead.h @@ -7,7 +7,7 @@ NS_BEGIN(Client) class CState_Dead final : public CState_Root { public: - typedef struct tagLand : public CState_Root::STATE_ROOT_DESC { + typedef struct tagDead : public CState_Root::STATE_ROOT_DESC { _float2 vDeadTimer = { 0.f, 2.f }; function funcLateUpdate = { nullptr }; }STATE_DEAD_DESC; diff --git a/Jusin154_Team3D/Client/Public/State_Shield.h b/Jusin154_Team3D/Client/Public/State_Shield.h new file mode 100644 index 000000000..e76be82f5 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/State_Shield.h @@ -0,0 +1,36 @@ +#pragma once +#include "Client_Define.h" +#include "State_Root.h" + +NS_BEGIN(Client) + +class CState_Shield final : public CState_Root +{ +public: + typedef struct tagShield : public CState_Root::STATE_ROOT_DESC { + function funcPriorityUpdate = { nullptr }; + function funcLateUpdate = { nullptr }; + }STATE_SHIELD_DESC; +private: + CState_Shield(); + virtual ~CState_Shield() = default; + +public: + virtual void Enter(); + virtual HRESULT Update(_float fTimeDelta); + virtual void Exit(); + +private: + function m_funcPriorityUpdate = { nullptr }; + function m_funcLateUpdate = { nullptr }; + +private: + HRESULT Initialize(STATE_SHIELD_DESC* pDesc); + +public: + static CState_Shield* Create(STATE_SHIELD_DESC* pDesc); + virtual void Free() override; + virtual void Describe_Entity(); +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Troll.h b/Jusin154_Team3D/Client/Public/Troll.h index c81ac58a7..ef7b787fc 100644 --- a/Jusin154_Team3D/Client/Public/Troll.h +++ b/Jusin154_Team3D/Client/Public/Troll.h @@ -52,6 +52,7 @@ class CTroll final : public CMonster _float4 m_vStartGripPos = { }; _float2 m_vStunTimer = { 0.f, 4.f }; _uint iIndex; + DAMAGE_INFO m_DamageInfo; class CEffectParts* m_pRight_Smoke = { nullptr }; class CEffectParts* m_pLeft_Smoke = { nullptr }; @@ -145,6 +146,9 @@ class CTroll final : public CMonster HRESULT Behavior_HitExitCheck(); void Behavior_HitExit(); + void Behavior_DeadEnter(); + HRESULT Behavior_DeadExitCheck(_float fTimeDelta); + void Behavior_DeadExit(); }; NS_END diff --git a/Jusin154_Team3D/Client/Public/Troll_Weapon.h b/Jusin154_Team3D/Client/Public/Troll_Weapon.h index 5e1fa1116..eb759a0d4 100644 --- a/Jusin154_Team3D/Client/Public/Troll_Weapon.h +++ b/Jusin154_Team3D/Client/Public/Troll_Weapon.h @@ -32,7 +32,6 @@ class CTroll_Weapon final : public CPartObject CShader* m_pShaderCom = { nullptr }; CModel* m_pModelCom = { nullptr }; _float4x4 m_HammerMatrix = { }; - _float3 m_Offset = {}; #ifdef _DEBUG unique_ptr m_pGripShape = { nullptr }; unique_ptr m_pSubShape = { nullptr }; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Circle1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Circle1.bin index f863cf149..0606920d9 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Circle1.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Circle1.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aaa06e374bcfc56f65154e4d2293463f823d5c74cc61a5c49c69a5ba55e0eeac +oid sha256:7b3118db9e9d4ebfdcd7083d8f2c7c08cee6684a4439d16cd841872e2b57b451 size 1124 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_0.bin index af1a3ce5e..ed93caf83 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_0.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_0.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e7be6c40fc89bd24a6e52b241c38060de62459db7b2ca5c9a73a3796f93ab4b6 +oid sha256:b3b6e27206610e5450a74d0ed62f3f57ba400a94f4d0c758bc67937a4d004d5b size 1086 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_1.bin index defad9844..b83b60dab 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_1.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_1.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9637ca3adc6bfb8e08c16d2aa301210d56e16746d3edcf64a601a86e4ba843f0 -size 1086 +oid sha256:c1b74e6239d4a668c7ad9f05cafde30c1c21431d731cf2e3d4a3a94d0badfbb1 +size 1097 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_2.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_2.bin index 38cf0f270..a80b6bb9e 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_2.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_2.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:193806a665e16659703332985e175a4cc91701b0b6852577d51fc58b85ae49d1 -size 1078 +oid sha256:c783b881079bf3de9e100abcb7da14b73e154e927ef0f1843d9682921168fb3f +size 1097 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_3.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_3.bin index 60ff9cd2c..697d98fff 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_3.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_3.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c1ddb59edb9de096b776a19ed62ce291c1453eab460e7c34efc15696e7971677 -size 1078 +oid sha256:46e5fb3f58e6d0dda73d4119663c64f272d9f73c4b45fc54b92d137fa3d81b09 +size 1097 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/DownAttack/Smoke.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/DownAttack/Smoke.bin index f612221e7..0bf9b1c3c 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/DownAttack/Smoke.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/DownAttack/Smoke.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:38dfe38192e97262014ae4fc5d6d10b2857fc9ead329f58628f083aa66d4b3f5 +oid sha256:55ccf041f8dc3d2e49cef79d73d6581fa70bfad63a30b0538db49699e8b52ec5 size 1074 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Barral.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Barral.bin new file mode 100644 index 000000000..ef712a578 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Barral.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5767731381ad50116d99f4f008e68e84e74638a12388e1fd9d44d6fc622a9dc7 +size 280 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Box.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Box.bin new file mode 100644 index 000000000..ee6a75408 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Box.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:492af061d7ed1f14189c8db77d8e59a1bc29328343e371c5057247b8e421612b +size 128 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Chair.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Chair.bin new file mode 100644 index 000000000..2673ce8c9 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Chair.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3da562a51b459f78fa4688604cadb4da883e67ba63f06f017621785b33029560 +size 264 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Barral/Water_Splesh.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Barral/Water_Splesh.bin new file mode 100644 index 000000000..432959f04 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Barral/Water_Splesh.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7d3366352d4a4a8d7c86f5658141461d32bf37251f3cd9e8e53b5bda2e70ae66 +size 1095 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Barral/Wood_PT0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Barral/Wood_PT0.bin new file mode 100644 index 000000000..7723fa872 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Barral/Wood_PT0.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:beb9cd0d559583255a806e4f300e8b7d4f7ceea2ecb4a17f0448dc20fef430bd +size 1042 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Barral/Wood_PT1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Barral/Wood_PT1.bin new file mode 100644 index 000000000..9fe4db8b4 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Barral/Wood_PT1.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4fcc45ca864a35e1b0a75cf725cc0ddf2124914499f774f7770b5aa0bb46671a +size 1042 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Barral/Wood_PT2.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Barral/Wood_PT2.bin new file mode 100644 index 000000000..66e23aa27 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Barral/Wood_PT2.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2d1543e3630c63d41d7591360f048acca63416741f452971b5dd30065299c976 +size 1089 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Box/Paper.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Box/Paper.bin new file mode 100644 index 000000000..28b637cdf --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Box/Paper.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3985d2f4b1eb8d28092685036737ce99a1e17cbed155a103dffd583fd5c5f898 +size 1038 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Box/Smoke.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Box/Smoke.bin new file mode 100644 index 000000000..4c0ea1407 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Box/Smoke.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:697b94a630f4f0257c7d0b1ae6f2cca2175d2d801ee057c1d333ca3ffe976cab +size 1081 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Chair/Hit.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Chair/Hit.bin new file mode 100644 index 000000000..c831bed53 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Chair/Hit.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:040953416567d0a143c21bf3fb1940de36e8f5c24a92f2ce290c094b38d09ae8 +size 1119 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Chair/Smoke.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Chair/Smoke.bin new file mode 100644 index 000000000..7826b1628 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Chair/Smoke.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a6a55bca6de65814691c12c333fda2053e8226a58281fcec461e37b29df3732b +size 1085 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Chair/Wood_PT0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Chair/Wood_PT0.bin new file mode 100644 index 000000000..561296e55 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Chair/Wood_PT0.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:988bc29f07aa84a7a7d571269525e92637e8c159b9845c814ecae69f4a2fe95c +size 1049 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Chair/Wood_PT1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Chair/Wood_PT1.bin new file mode 100644 index 000000000..541352135 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Chair/Wood_PT1.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2e13e86ef501990dbf9f15e8ebb9d208a850c3a77be91ac93a36a2b9d5b417e5 +size 1055 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Stun/StunEffect.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Stun/StunEffect.bin index 9a1cd7e9d..646a8e273 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Stun/StunEffect.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Stun/StunEffect.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:65288cca05e14c1a1ecb287e36d2ce2ffd8b427f6217cd557df931fabb117a20 +oid sha256:97e343fdb35dbe4e21e8d7e431a8253f97678c8b5d9240d6b6cdb5e596e86ab4 size 1090 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollSwing/Rock_PT_25.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollSwing/Rock_PT_25.bin index caddd023c..c4014359d 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollSwing/Rock_PT_25.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollSwing/Rock_PT_25.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f693501254f7fcb522d8b879ca9a02d2f69374ca18c762b8b9b4fb21cfba2acb +oid sha256:e9c6a94510ca1d5fcfd175009c2cb1a7c28f5d052fa8d5051e7f09a39065ae72 size 1031 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_0.001.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_0.001.bin new file mode 100644 index 000000000..297db8306 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_0.001.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:acd09e78e963697a3d419a55bf7864baf9a9914227dedf6e553c7bc19d731904 +size 31818 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_0.001.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_0.001.fbx new file mode 100644 index 000000000..bff9d909e --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_0.001.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6e968b012ccd725f3cae2ce2c0c55aa19de32fe016eac2a327c4926eb6fff4fb +size 26428 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_0.pskx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_0.pskx deleted file mode 100644 index 16cd2bb09..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_0.pskx and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_1.001.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_1.001.bin new file mode 100644 index 000000000..92da9ab42 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_1.001.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:920201f56b90e3508b6a84f6361f38a0551c48396aaa8c9ec89138c12cffa492 +size 26990 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_1.001.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_1.001.fbx new file mode 100644 index 000000000..92d882b26 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_1.001.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dd834974a2d22a6e535a2acaa9c9f5106bff315f489a317cdd36bbbf3cd1c78d +size 25020 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_1.pskx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_1.pskx deleted file mode 100644 index f608109ba..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_1.pskx and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_2.001.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_2.001.bin new file mode 100644 index 000000000..820e5d5b9 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_2.001.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aeb55cd03d8053dbd2146f19b0dfffdf78cbe38076b4a81fc1b030ef357afa57 +size 29326 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_2.001.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_2.001.fbx new file mode 100644 index 000000000..3b4058bb8 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_2.001.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:72c9298a654da937a32992f39747d59afe77816fb128920406d532c4c4b59b7c +size 25708 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_2.pskx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_2.pskx deleted file mode 100644 index 236042c61..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_2.pskx and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_3.001.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_3.001.bin new file mode 100644 index 000000000..d2f1dd421 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_3.001.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:98cc4f3fdc0ca1c64492730d10423e6d7039086c30f5374b5e11d3c5d294b87f +size 22578 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_3.001.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_3.001.fbx new file mode 100644 index 000000000..15bf65815 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_3.001.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7130ae98175d4f8b4619f929cfe0716cdd1f82f5af7c496d73a12e8b606b3a57 +size 23052 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_3.pskx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_3.pskx deleted file mode 100644 index 6e43f57a7..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_3.pskx and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_0.001.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_0.001.bin new file mode 100644 index 000000000..83c7baec9 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_0.001.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:72fa107b0129322d7c9f07dd8c32f344dd3425c34514a15d5b823ae58cbebb8c +size 27502 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_0.001.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_0.001.fbx new file mode 100644 index 000000000..960e5d96b --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_0.001.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:50477d4ecbe4287736969767ade5a0f91c3d3afd04b792967e739ba998769b13 +size 25020 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_0.pskx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_0.pskx deleted file mode 100644 index 40cd09b35..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_0.pskx and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_1.001.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_1.001.bin new file mode 100644 index 000000000..ab01ed1fb --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_1.001.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fceb6456ccaf6c3f1b0e6ef3df084bdcb7222784a02763ddf24c8a27d5f833fb +size 40970 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_1.001.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_1.001.fbx new file mode 100644 index 000000000..9707ee8ae --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_1.001.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4dbe2bb7ee77dc664f71460505af675639f2a41a36730d3b6adbb59dc27d3097 +size 29276 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_1.pskx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_1.pskx deleted file mode 100644 index e80f1a5f2..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_1.pskx and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_2.001.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_2.001.bin new file mode 100644 index 000000000..571f4de31 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_2.001.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac74420ec141343a2309a52594a3bfe023e24fdda52dadb3fcc558c18d4c0c77 +size 17786 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_2.001.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_2.001.fbx new file mode 100644 index 000000000..aebb5a667 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_2.001.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:69ad762ab872b3f02856385448bec7f29ad5ba31ff03da74d55ee3af4ae70e64 +size 21852 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_2.pskx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_2.pskx deleted file mode 100644 index 69a889ba9..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_2.pskx and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Small_0.001.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Small_0.001.bin new file mode 100644 index 000000000..e8e290e11 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Small_0.001.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f26fdf66511e1951556ec7a11fb56dc675d9a159e2ca5000c0da5ee496d2a238 +size 32014 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Small_0.001.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Small_0.001.fbx new file mode 100644 index 000000000..31ef03f67 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Small_0.001.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:313502f9bead431c62e5c135cbe6237461698fb4287b34fb13eada6e2cc2a0a5 +size 26092 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Small_0.pskx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Small_0.pskx deleted file mode 100644 index a843b7846..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Small_0.pskx and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl index 2ed787044..bc9f9e91d 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl @@ -46,10 +46,12 @@ struct ParticleValue bool isCompareStop; float fCollisionTime; - float fDropAttenuation; + float fDropAttenuation; float3 vVelocity; float fAcceleration; + + bool isStop; }; @@ -82,7 +84,7 @@ cbuffer g_ConstantBuffer : register(b0) // b0 << 이 숫자와 컨스턴트 쉐 bool isMoveUp; bool isExcludePos; - bool isPadding1; + bool isStopMove_For_Depth_Compare; bool isPadding2; float fTimeDelta; @@ -108,8 +110,6 @@ void CS_MAIN( { int iIndex = DispatchThreadID.x; // 배열 인덱스 - - Particle particle = g_ParticleBufferInput[iIndex]; ParticleValue particleValue = g_ParticleValueBufferInput[iIndex]; @@ -152,7 +152,7 @@ void CS_MAIN( /* 내 z가 가려지는 상황이었다면 연산하지않음*/ - if (particle.vLifeTime.x >= particle.vLifeTime.y) + if (particle.vLifeTime.x >= particle.vLifeTime.y || particleValue.isStop == true) { particleValue.isCompareStop = false; @@ -165,6 +165,7 @@ void CS_MAIN( return ; } + //초기화 particle.vRight = particleValue.vOriginRight; particle.vUp = particleValue.vOriginUp; @@ -173,6 +174,7 @@ void CS_MAIN( particle.vLifeTime.x = 0.f; particleValue.vDelay.x = 0.f; + particleValue.isStop = false; if (isRandomAniIndex == false) particleValue.vAniIndex.x = 0.f; @@ -307,10 +309,15 @@ void CS_MAIN( if (isTurn == true) { + float fRotationSpeed = 1.f; + + if (particleValue.fRotaionSpeed > FLT_EPSILON5) + fRotationSpeed = particleValue.fRotaionSpeed; + /* ROTATE */ - float4x4 RotateXMat = RotateX(particleValue.vDeltaAngle.x * fTimeDelta); - float4x4 RotateYMat = RotateY(particleValue.vDeltaAngle.y * fTimeDelta); - float4x4 RotateZMat = RotateZ(particleValue.vDeltaAngle.z * fTimeDelta); + float4x4 RotateXMat = RotateX(particleValue.vDeltaAngle.x * fTimeDelta * fRotationSpeed); + float4x4 RotateYMat = RotateY(particleValue.vDeltaAngle.y * fTimeDelta * fRotationSpeed); + float4x4 RotateZMat = RotateZ(particleValue.vDeltaAngle.z * fTimeDelta * fRotationSpeed); float4x4 CombinedRotMat = mul(RotateZMat, mul(RotateYMat, RotateXMat)); @@ -329,9 +336,14 @@ void CS_MAIN( if (isAxisTurn) { - float4x4 RotateAxisRightMat = RotateAxis(particle.vRight, particleValue.vDeltaAxisAngle.x * fTimeDelta); - float4x4 RotateAxisUpMat = RotateAxis(particle.vUp, particleValue.vDeltaAxisAngle.y * fTimeDelta); - float4x4 RotateAxisLookMat = RotateAxis(particle.vLook, particleValue.vDeltaAxisAngle.z * fTimeDelta); + float fRotationSpeed = 1.f; + + if (particleValue.fRotaionSpeed > FLT_EPSILON5) + fRotationSpeed = particleValue.fRotaionSpeed; + + float4x4 RotateAxisRightMat = RotateAxis(particle.vRight, particleValue.vDeltaAxisAngle.x * fRotationSpeed * fTimeDelta); + float4x4 RotateAxisUpMat = RotateAxis(particle.vUp, particleValue.vDeltaAxisAngle.y * fRotationSpeed * fTimeDelta); + float4x4 RotateAxisLookMat = RotateAxis(particle.vLook, particleValue.vDeltaAxisAngle.z * fRotationSpeed * fTimeDelta); float4x4 CombinedRotMat = mul(RotateAxisLookMat, mul(RotateAxisUpMat, RotateAxisRightMat)); @@ -382,15 +394,22 @@ void CS_MAIN( particleValue.isCompareStop = true; // 내가 지면에 사라지는 순간 particleValue.fCollisionTime = particle.vLifeTime.x; + if (isStopMove_For_Depth_Compare == true) + { + particleValue.isStop = true; + particle.vTranslation.y += 0.2f; + + } + + } } - if (particleValue.isCompareStop == true) // 지면에 부딪혔을 때 + if (particleValue.isCompareStop == true && isStopMove_For_Depth_Compare == false) // 지면에 부딪혔을 때 { particle.vTranslation.y = fOnlyDropY; // 지면에 부딪혓을때 이제 y연산은 오직 drop으로만 수행함 } - } /*가속력*/ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl index fec7287d9..d70673f30 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl @@ -4,7 +4,7 @@ matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix; Texture2D g_DepthTexture; -float4 g_CamaraPosition; +float3 g_CamaraPosition; int g_iImageCountX; int g_iImageCountY; @@ -1506,30 +1506,28 @@ VS_OUT3D VS_MAIN3D(VS_IN3D In) { VS_OUT3D Out; - float3 CamaeraPos = float3(g_CamaraPosition.x, 1.f, g_CamaraPosition.z); - float3 UIPos = float3(g_WorldMatrix._41, g_WorldMatrix._42, g_WorldMatrix._43); + matrix matViewProj = mul(g_ViewMatrix, g_ProjMatrix); - float3 CameraDir = normalize(CamaeraPos - UIPos); - - float angle = atan2(CameraDir.x, CameraDir.z); - float cosA = cos(angle); - float sinA = sin(angle); - - - float3 rotation = float3(0.f, 0.f, 0.f); + float2 Offset = In.vTexcoord - 0.5f; + float3 worldCenter = float3(g_WorldMatrix._41, g_WorldMatrix._42, g_WorldMatrix._43); - rotation.x = In.vPosition.x * cosA - In.vPosition.z * sinA; - rotation.y = In.vPosition.y; - rotation.z = In.vPosition.x * sinA + In.vPosition.z * cosA; - float3 worldPos = rotation + UIPos; + float3 vLook = normalize(g_CamaraPosition - worldCenter); - matrix matWVP = mul(g_ViewMatrix, g_ProjMatrix); - float4 clipPos = mul(float4(worldPos, 1.0f), matWVP); + vLook.y = 0.f; + vLook = normalize(vLook); + + float3 upDir = float3(0.f, 1.f, 0.f); - Out.vPosition = clipPos; - Out.vTexcoord = In.vTexcoord; - + float3 rightDir = normalize(cross(vLook, upDir)); + + float3 dirRight = rightDir * g_fCurrent_Size.x * Offset.x; + float3 dirUp = upDir * g_fCurrent_Size.y * Offset.y; + + float3 vertexPos = worldCenter + dirRight + dirUp; + + Out.vPosition = mul(float4(vertexPos, 1.f), matViewProj); + Out.vTexcoord = 1.f - In.vTexcoord; return Out; } diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UI_Instance.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UI_Instance.hlsl index 832d2e2a0..5eda5ab45 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UI_Instance.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UI_Instance.hlsl @@ -412,6 +412,30 @@ PS_OUT PS_Spell_Slot(PS_IN In) return Out; } +PS_OUT PS_Spell_Lock(PS_IN In) +{ + PS_OUT Out; + + float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; + + float4 color = g_Texture.Sample(ClampSampler, In.vTexcoord); + + if(In.bSpell == 0) + { + if (color.a <= 0.4f) + discard; + } + + else + discard; + + color.a *= Alpha; + + Out.vColor = color; + + return Out; +} + technique11 PosTexTechnique11 { pass Default @@ -534,4 +558,15 @@ technique11 PosTexTechnique11 GeometryShader = NULL; PixelShader = compile ps_5_0 PS_Spell_Slot(); } + + pass Spell_Lock + { + SetRasterizerState(RS_Default); + SetDepthStencilState(DSS_Default, 0); + SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + + VertexShader = compile vs_5_0 VS_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_Spell_Lock(); + } } diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl index 0df171305..867a0672e 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl @@ -15,30 +15,33 @@ struct ParticleValue float2 vDiffuseUVMoveTime; float2 vDistortionUVMoveTime; float2 vNoiseUVMoveTime; - float2 vAniTime; float2 vDissolveUVMoveTime; + float2 vAniTime; + float2 vAniIndex; - float fGravity; + float fGravity; float3 vSinAmount; float3 vDeltaAngle; float3 vDeltaAxisAngle; - float fDrag; + float fDrag; float3 vPivot; - float fSizeDrag; + float fSizeDrag; float3 vDeltaSize; float2 vDelay; - bool isCompareStop; + + bool isCompareStop; float fCollisionTime; float fDropAttenuation; float3 vVelocity; - float fAcceleration; + float fAcceleration; + bool isStop; }; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Diffuse/T_FX_Tilable_Wood_D.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Diffuse/T_FX_Tilable_Wood_D.png new file mode 100644 index 000000000..98b292a8b Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Diffuse/T_FX_Tilable_Wood_D.png differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Diffuse/VFX_T_Feathers_D.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Diffuse/VFX_T_Feathers_D.png new file mode 100644 index 000000000..82549b2e5 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Diffuse/VFX_T_Feathers_D.png differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Diffuse/VFX_T_FlyingPaper_D.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Diffuse/VFX_T_FlyingPaper_D.png new file mode 100644 index 000000000..db7254057 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Diffuse/VFX_T_FlyingPaper_D.png differ diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj b/Jusin154_Team3D/Editor/Default/Editor.vcxproj index df3851f2f..b77eaaaf2 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj @@ -191,6 +191,7 @@ call Update_Shaders.bat + @@ -394,6 +395,7 @@ call Update_Shaders.bat + diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters index 4488e7c02..9daa90333 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters @@ -562,6 +562,9 @@ {49575102-9b08-494e-bf3f-bdc98774913e} + + {d276d751-77aa-423e-9499-c63875e36266} + {81c6b163-6c8b-47ac-a4b6-e86088ce709f} @@ -1125,6 +1128,9 @@ 50.UI\GamePlay_Canvas\Enemy_Panel\Boss_HpBar + + 02.GameObjects\Layer_Effect\Effect\State_Effect + 50.UI\GamePlay_Canvas\Enemy_Panel\Enemy_Detection @@ -1690,6 +1696,9 @@ 50.UI\GamePlay_Canvas\Enemy_Panel\Boss_HpBar + + 02.GameObjects\Layer_Effect\Effect\State_Effect + 50.UI\GamePlay_Canvas\Enemy_Panel\Enemy_Detection diff --git a/Jusin154_Team3D/Editor/Private/EffectPool.cpp b/Jusin154_Team3D/Editor/Private/EffectPool.cpp index 4bbe549e5..b613f74d9 100644 --- a/Jusin154_Team3D/Editor/Private/EffectPool.cpp +++ b/Jusin154_Team3D/Editor/Private/EffectPool.cpp @@ -19,6 +19,7 @@ #include "Troll_Rush_Hit.h" #include "Troll_Nomal_Smoke.h" #include "TrollSwing.h" +#include "StunEffect.h" CEffectPool::CEffectPool(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) : CGameObject(pDevice, pContext) @@ -44,11 +45,38 @@ HRESULT CEffectPool::Initialize(void* pArg) if (FAILED(Ready_Components())) return E_FAIL; - if (FAILED(Ready_Effect())) - return E_FAIL; +#ifdef gimch + m_isActiveEffectCreate = false; + m_isActiveMonsterEffectCreate = false; +#endif // gimch +#ifdef Bin + m_isActiveEffectCreate = false; + m_isActiveMonsterEffectCreate = false; +#endif // +#ifdef 진우 + m_isActiveEffectCreate = false; + m_isActiveMonsterEffectCreate = false; +#endif // +#ifdef 기무리 + m_isActiveEffectCreate = false; + m_isActiveMonsterEffectCreate = false; +#endif // +#ifdef 인혁 + m_isActiveEffectCreate = false; + m_isActiveMonsterEffectCreate = false; +#endif // - //if (FAILED(Ready_MonsterEffect())) - // return E_FAIL; + if (m_isActiveEffectCreate) + { + if (FAILED(Ready_Effect())) + return E_FAIL; + } + + if (m_isActiveMonsterEffectCreate) + { + if (FAILED(Ready_MonsterEffect())) + return E_FAIL; + } return S_OK; } @@ -253,6 +281,16 @@ HRESULT CEffectPool::Ready_MonsterEffect() return pEffect; } ))) return E_FAIL; + + if (FAILED(Create_Effect(SKILL_TYPE::STUN, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + + CStunEffect* pEffect = nullptr; + + pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr); + + return pEffect; } + ))) return E_FAIL; + return S_OK; } @@ -377,6 +415,7 @@ void CEffectPool::Free() void CEffectPool::Describe_Entity() { + if(GUI::Button("Reset Pool")) { Reset_Pool(); diff --git a/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp b/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp index 3fd4ebcfc..a71a30515 100644 --- a/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp +++ b/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp @@ -108,12 +108,6 @@ void CEffect_Editor::Update(_float fTimeDelta) /* 이펙트 컨테이너 업데이트 */ //Update_Event(fTimeDelta); - - - - - - } void CEffect_Editor::Late_Update(_float fTimeDelta) diff --git a/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp b/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp index 9fd2eb7b0..21bb176e2 100644 --- a/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp +++ b/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp @@ -53,6 +53,8 @@ HRESULT CLevel_EffectViewer::Initialize() Desc.iAlphaSizeX = 2048; Desc.iAlphaSizeY = 2048; Desc.vPosition = _float3(-194, 18.5f, -153.f); + Desc.strAlphaMapTag = "Hogsmeade_AlphaMap.bin"; + Desc.strHeightMapTag = "Hogsmeade_HeightMap.bin"; Desc.strBufferTag = TEXT("Prototype_Component_VIBuffer_Terrain_Hogsmeade"); if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Terrain"), &Desc))) diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp index 1c84ac1f5..e9e7f6fdc 100644 --- a/Jusin154_Team3D/Editor/Private/Loader.cpp +++ b/Jusin154_Team3D/Editor/Private/Loader.cpp @@ -156,6 +156,7 @@ #include "Goblin_Dagger.h" #include "Goblin_BattleAxe.h" #include "Goblin_Spector.h" +#include "StunEffect.h" #pragma endregion #pragma region PHYSX_HEADER @@ -1274,6 +1275,16 @@ HRESULT CLoader::Loading_For_Effect() return E_FAIL; + Asset_FileLoad("../Bin/Resources/Models/Effect/Box", L"Prototype_Instance_Model_", [&](_wstring wstrFileName, const _char* pFilePath) { + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::EFFECT), wstrFileName, + CInstance_Model::Create(m_pDevice, m_pContext, pFilePath, MODEL::NONANIM, XMMatrixScaling(0.1f, 0.1f, 0.1f) * XMMatrixIdentity(), 0)))) + return E_FAIL; + + return S_OK; + + }); + Asset_FileLoad("../Bin/Resources/Models/Effect/Rock", L"Prototype_Instance_Model_", [&](_wstring wstrFileName, const _char* pFilePath) { if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::EFFECT), wstrFileName, @@ -1474,6 +1485,9 @@ HRESULT CLoader::Loading_For_Effect() if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CTroll_Weapon::Create(m_pDevice, m_pContext)))) return E_FAIL; + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CStunEffect::Create(m_pDevice, m_pContext)))) + return E_FAIL; + /* For.Prototype_GameObject_DummySkyBox */ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CDummySkyBox::Create(m_pDevice, m_pContext)))) @@ -2205,8 +2219,8 @@ HRESULT CLoader::Loading_For_ObjectViewer() TEXT("Prototype_Component_TombProtector_Model") )); futures.emplace_back(Deferred_ModelLoad( - MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/SubTroll/Troll.fbx", XMMatrixIdentity(), - TEXT("Prototype_Component_Troll_Model") + MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/SubTroll/troll.bin", XMMatrixIdentity(), + TEXT("Prototype_Component_troll_Model") )); futures.emplace_back(Deferred_ModelLoad( @@ -2216,11 +2230,6 @@ HRESULT CLoader::Loading_For_ObjectViewer() #pragma endregion - futures.emplace_back(Deferred_ModelLoad( - MODEL::ANIM, "../Bin/Resources/Models/Monster/SubTroll/troll_Anim.fbx", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f)* XMMatrixIdentity(), - TEXT("Prototype_Component_SubTroll_Model") - )); - futures.emplace_back(Deferred_ModelLoad( MODEL::ANIM, "../Bin/Resources/Models/Object/Troll_Weapon/Troll_Weapon.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixIdentity(), TEXT("Prototype_Component_Troll_Weapon_Model") diff --git a/Jusin154_Team3D/Editor/Private/Player_States.cpp b/Jusin154_Team3D/Editor/Private/Player_States.cpp index 1552449a9..c7dcda6a9 100644 --- a/Jusin154_Team3D/Editor/Private/Player_States.cpp +++ b/Jusin154_Team3D/Editor/Private/Player_States.cpp @@ -858,26 +858,7 @@ void CPlayer::Behavior_CombatEnter() pairAnimInfo = m_Animation[STATEANIM::ANCIENT_THROW]; } else if (m_pGameInstance->Key_Down(DIK_G)) { - m_pFSM->Enable_State(FSMSTATE::POTION); - if (SUCCEEDED(InputMove())) - { - if (m_bSprintToggle) - { - pairAnimInfo = m_Animation[STATEANIM::SPRINT]; - } - else if (m_bWalkToggle) - { - pairAnimInfo = m_Animation[STATEANIM::WALK_FWD]; - } - else { - pairAnimInfo = m_Animation[STATEANIM::JOG_FWD]; - } - } - else { - pairAnimInfo = m_Animation[STATEANIM::IDLE]; - } - m_pModelCom->Set_Second_AnimationIndex(m_Animation[STATEANIM::POTION].first, ENUM_CLASS(BLEND_BONE::SHOULDER_NECK_L)); } m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); @@ -944,27 +925,7 @@ HRESULT CPlayer::Behavior_CombatExitCheck() m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); } else if (m_pGameInstance->Key_Down(DIK_G)) { - m_pFSM->Enable_State(FSMSTATE::POTION); - if (SUCCEEDED(InputMove())) - { - if (m_bSprintToggle) - { - pairAnimInfo = m_Animation[STATEANIM::SPRINT]; - } - else if (m_bWalkToggle) - { - pairAnimInfo = m_Animation[STATEANIM::WALK_FWD]; - } - else { - pairAnimInfo = m_Animation[STATEANIM::JOG_FWD]; - } - - } - else { - pairAnimInfo = m_Animation[STATEANIM::IDLE]; - } - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); - m_pModelCom->Set_Second_AnimationIndex(m_Animation[STATEANIM::POTION].first, ENUM_CLASS(BLEND_BONE::SHOULDER_NECK_L)); + } } @@ -1022,7 +983,7 @@ HRESULT CPlayer::Behavior_CombatExitCheck() void CPlayer::Behavior_CombatExit() { m_pFSM->Disable_State(FSMSTATE::COMBAT | FSMSTATE::LIGHT_ATTACK | FSMSTATE::SPELL | FSMSTATE::SKILL | - FSMSTATE::SKILL2 | FSMSTATE::MAPHELP | FSMSTATE::ANCIENT_THROW | FSMSTATE::POTION); + FSMSTATE::MAPHELP | FSMSTATE::ANCIENT_THROW); } void CPlayer::Behavior_HitEnter() diff --git a/Jusin154_Team3D/Editor/Private/Spell_State.cpp b/Jusin154_Team3D/Editor/Private/Spell_State.cpp index a41babab4..c80a02f54 100644 --- a/Jusin154_Team3D/Editor/Private/Spell_State.cpp +++ b/Jusin154_Team3D/Editor/Private/Spell_State.cpp @@ -47,6 +47,7 @@ HRESULT CSpell_State::Initialize(void* pArg) m_pVIBufferCom->Set_Pos(-185.f, 375.f, m_fOffSetX, m_fOffSetY, m_iCols); m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); static_cast(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); }); + Spell_Setting(); return S_OK; } @@ -91,9 +92,14 @@ void CSpell_State::Update(_float fTimeDelta) } m_fTime += fTimeDelta * m_fTimeMult; - if (m_bClick == false) + + if (m_iSpellType != -1) { - m_pVIBufferCom->Set_Hover_Index(m_iSpellType); + if (m_pGameInstance->Mouse_Down(DIM_RBUTTON)) + { + m_pVIBufferCom->Set_Equip_Index(m_iSpellType); + m_bLock[m_iSpellType] = true; + } } __super::Update(fTimeDelta); @@ -118,7 +124,7 @@ HRESULT CSpell_State::Render() { return E_FAIL; } - if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIINTANCE::ALPHABLEND)))) + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIINTANCE::SPELL_LOCK)))) { return E_FAIL; } @@ -170,6 +176,14 @@ void CSpell_State::Click_Slot(_bool bClick) } } +void CSpell_State::Spell_Setting() +{ + for (_int i = 0; i < 26; ++i) + { + m_bLock[i] = static_cast(m_pOwner)->Get_Info(i).bSpell_Lock; + } +} + HRESULT CSpell_State::Bind_ShaderResources() { if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) diff --git a/Jusin154_Team3D/Editor/Private/StunEffect.cpp b/Jusin154_Team3D/Editor/Private/StunEffect.cpp new file mode 100644 index 000000000..e0127a2f3 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/StunEffect.cpp @@ -0,0 +1,206 @@ +#include "pch.h" +#include "StunEffect.h" + +#include "GameInstance.h" +#include "EditEffect.h" +#include "Wand.h" +#include "Player.h" + +CStunEffect::CStunEffect(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CEffect_Container{ pDevice, pContext } +{ +} + +CStunEffect::CStunEffect(const CStunEffect& rhs) + : CEffect_Container(rhs) +{ +} + +HRESULT CStunEffect::Initialize_Prototype() +{ + + return S_OK; + +} + +HRESULT CStunEffect::Initialize(void* pArg) +{ + if (FAILED(__super::Initialize(pArg))) + return E_FAIL; + + if (FAILED(Ready_Components(pArg))) + return E_FAIL; + + + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Stun"))) + return E_FAIL; + + + m_wstrEffectName = L"Stun"; + + + m_fDuration = 3.f; + + m_pStunEffect = Get_PartObject("StunEffect"); + SAFE_ADDREF(m_pStunEffect); + + + m_Events.emplace(3.f, [&]() { + + m_BoneMat = nullptr; + + }); + + return S_OK; +} + +void CStunEffect::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); + +} + +void CStunEffect::Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Update(fTimeDelta); + + Update_Event(fTimeDelta); + + if (m_BoneMat == nullptr) + return; + + _matrix BoneMat = XMLoadFloat4x4(m_BoneMat); + + for (int i = 0; i < 3; ++i) { + BoneMat.r[i] = XMVector3Normalize(BoneMat.r[i]); + } + + m_pStunEffect->Get_Component()->Set_WorldMatrix(BoneMat * m_pOwner->Get_Component()->Get_XMWorldMatrix()); + + //m_pStunEffect->Get_Component()->Rotation(XMVectorSet(0.f, 0.f, XMConvertToRadians(180.f), 0.f)); + +} + +void CStunEffect::Late_Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Late_Update(fTimeDelta); + + +} + +HRESULT CStunEffect::Pre_Setting(CGameObject* pObject, void* pArg) +{ + + if (FAILED(__super::Pre_Setting(pObject, nullptr))) + return E_FAIL; + + _string strBoneName = *static_cast<_string*>(pArg); + + m_BoneMat = m_pOwner->Get_Component()->Get_BoneMatrixPtr(strBoneName.c_str()) ; // 위치 넘기기 + + _matrix BoneMat = XMLoadFloat4x4(m_BoneMat); + + for (int i = 0; i < 3; ++i) { + BoneMat.r[i] = XMVector3Normalize(BoneMat.r[i]); + } + + m_pStunEffect->Get_Component()->Set_WorldMatrix(BoneMat * m_pOwner->Get_Component()->Get_XMWorldMatrix()); + + m_pStunEffect->Get_Component()->Rotation(XMVectorSet(0.f, 0.f , 90.f, 0.f)); + + m_pStunEffect->Set_Visible(true); + + + return S_OK; +} + +HRESULT CStunEffect::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CStunEffect::Ready_Child() +{ + return S_OK; +} + +CStunEffect* CStunEffect::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CStunEffect* pInstance = new CStunEffect(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CStunEffect"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + + +CGameObject* CStunEffect::Clone(void* pArg, CGameObject* pOwner) +{ + CStunEffect* pInstance = new CStunEffect(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CStunEffect"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CStunEffect::OnCollision(CGameObject* pOther, void* pDesc) +{ + _int iIndex = CollisionCheck(); + + if (iIndex < 0) + return; + + if (m_isCollisionEnter == true) + return; + + m_isCollisionEnter = true; + + _vector vPos = XMVectorSet(m_Hitbuffer.touches[iIndex].position.x, m_Hitbuffer.touches[iIndex].position.y, m_Hitbuffer.touches[iIndex].position.z, 1.f); + + + for (auto& pPair : m_PartObjects) + { + pPair.second->Set_Visible(true); + pPair.second->Get_Component()->Set_State(STATE::POSITION, vPos); + } + + +} + +void CStunEffect::Free() +{ + __super::Free(); + Safe_Release(m_pStunEffect); + +} +#ifdef _DEBUG +void CStunEffect::Describe_Entity() +{ + +} +#endif + +HRESULT CStunEffect::Bind_ShaderResources() +{ + return S_OK; +} + + diff --git a/Jusin154_Team3D/Editor/Private/Troll.cpp b/Jusin154_Team3D/Editor/Private/Troll.cpp index bd86d3a2f..0365600e6 100644 --- a/Jusin154_Team3D/Editor/Private/Troll.cpp +++ b/Jusin154_Team3D/Editor/Private/Troll.cpp @@ -412,6 +412,15 @@ HRESULT CTroll::Ready_Parts() m_pWeaponTrail->Load_Trail("../Bin/Resources/Data/Effect/Troll/TrollSide/Troll_Swing_Trail", static_cast(NEXT_LEVEL)); m_pWeaponTrail->Set_Visible(false); + + if (FAILED(Add_PartObject("Stun", NEXT_LEVEL, &m_pStunEffect, &PartsDesc))) + { + return E_FAIL; + } + + m_pStunEffect->Load("../Bin/Resources/Data/Effect/Stun/StunEffect", static_cast(NEXT_LEVEL)); + m_pStunEffect->FollowParants(m_pModelCom->Get_BoneMatrixPtr("HeadEnd")); + #pragma endregion return S_OK; @@ -489,6 +498,7 @@ void CTroll::Free() SAFE_RELEASE(m_pLeftTrail); SAFE_RELEASE(m_pRightTrail); SAFE_RELEASE(m_pWeaponTrail); + SAFE_RELEASE(m_pStunEffect); } #ifdef _DEBUG @@ -502,6 +512,23 @@ void CTroll::Describe_Entity() GUI::Text(strSocket.c_str()); + _uint iindex = {}; + + for (auto& pChild : m_PartObjects) + { + _string strName = to_string(iindex++) + pChild.first; + + if(GUI::TreeNode(strName.c_str())) + { + + pChild.second->Describe_Entity(); + + GUI::TreePop(); + } + + + } + m_pTransformCom->Describe_Entity(); } diff --git a/Jusin154_Team3D/Editor/Public/Editor_Define.h b/Jusin154_Team3D/Editor/Public/Editor_Define.h index 4a67a6635..b52ba7b07 100644 --- a/Jusin154_Team3D/Editor/Public/Editor_Define.h +++ b/Jusin154_Team3D/Editor/Public/Editor_Define.h @@ -30,7 +30,7 @@ namespace Editor enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, TRAIL_BLEND, TRAILWB_FOR_BLEND, TRAIL_BLUR, TRAIL_BLOOM, END }; enum class SHADER_PASS_UIEDITOR { DEFAULT, LOGO, LOGO_TEXT, LOGO_GLOW, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, TYPE, HPBAR, MAGIC_METER, MAGIC_ICON, REMOVEUV, REVELIO, POTION, MAGIC_ITEM, SPELL_PREVIEW, SPELL_HEADER, SPELL_HEADER_LINE, SPELL_DRAG, CAMERA_LOCKON, LODING_SCREEN, ENEMY_HPBAR, BOSS_HPBAR, ENEMY_DETECTION, END }; enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, BLEND, BLEND_NOWORLD, BLOOM, BLOOM_NOWORLD, BLUR_NO_EMMISVE, BLUR_NO_WORLD_NO_EMISSIVE, WEIGHTBLEND_FOR_BLEND, DEPTH_STOP, END }; - enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, UVALPHABLEND, MAGIC_METER, SPELL_LIST, EESSENTIAL_SPELL_SOLT, EESSENTIAL_SPELL, COLOR, SPELL_HOVER, SPELL_SLOT_EFFECT, SPELL_SLOT, END }; + enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, UVALPHABLEND, MAGIC_METER, SPELL_LIST, EESSENTIAL_SPELL_SOLT, EESSENTIAL_SPELL, COLOR, SPELL_HOVER, SPELL_SLOT_EFFECT, SPELL_SLOT, SPELL_LOCK,END }; enum class EFFECT_TYPE { EFFECT, TRAIL, END }; @@ -46,6 +46,7 @@ namespace Editor ANCIENT_MAGIC_THROW, ANCIENT_MAGIC, ALOHOMORA, PETRIFICUS_TOTALUS, JAP_SIDE, BOMBARDA_SIDE, DESCENDO_SIDE, LEVIOSO_SIDE, + STUN, TROLL_ATTACK, TROLL_RUSH_HIT, TROLL_NOMAL_SMOKE, END }; diff --git a/Jusin154_Team3D/Editor/Public/EffectPool.h b/Jusin154_Team3D/Editor/Public/EffectPool.h index fc1f618a8..70dc8795d 100644 --- a/Jusin154_Team3D/Editor/Public/EffectPool.h +++ b/Jusin154_Team3D/Editor/Public/EffectPool.h @@ -34,6 +34,9 @@ class CEffectPool final : public CGameObject private: list m_EffectList[ENUM_CLASS(SKILL_TYPE::END)] = {}; list m_ActiveEffectList = {}; + + _bool m_isActiveEffectCreate = {}; + _bool m_isActiveMonsterEffectCreate = {}; private: HRESULT Ready_Components(); HRESULT Bind_ShaderResources(); diff --git a/Jusin154_Team3D/Editor/Public/Spell_State.h b/Jusin154_Team3D/Editor/Public/Spell_State.h index 09f34bacf..1e5ff636a 100644 --- a/Jusin154_Team3D/Editor/Public/Spell_State.h +++ b/Jusin154_Team3D/Editor/Public/Spell_State.h @@ -29,6 +29,7 @@ class CSpell_State final : public CElementObject private: void Click_Slot(_bool bClick); + void Spell_Setting(); private: virtual HRESULT Bind_ShaderResources() override; @@ -45,6 +46,8 @@ class CSpell_State final : public CElementObject _float m_fOffSetY{}; _uint m_iCols{}; + _bool m_bLock[26] = {}; + public: static CSpell_State* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Editor/Public/StunEffect.h b/Jusin154_Team3D/Editor/Public/StunEffect.h new file mode 100644 index 000000000..6986db219 --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/StunEffect.h @@ -0,0 +1,44 @@ +#pragma once + +#include "Editor_Define.h" +#include "Effect_Container.h" + +NS_BEGIN(Engine) +NS_END + +NS_BEGIN(Editor) + +class CStunEffect final : public CEffect_Container +{ +private: + CStunEffect(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CStunEffect(const CStunEffect& rhs); + virtual ~CStunEffect() = default; + +public: + virtual void Priority_Update(_float fTimeDelta) override; + virtual void Update(_float fTimeDelta) override; + virtual void Late_Update(_float fTimeDelta) override; + +public: + virtual HRESULT Pre_Setting(CGameObject* pObject, void* pArg = nullptr) override; + +private: + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + virtual HRESULT Ready_Components(void* pArg) override; + HRESULT Ready_Child(); + HRESULT Bind_ShaderResources() override; + virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override; +private: + _wstring m_wstrEffectName = {}; + class CEditEffect* m_pStunEffect = { nullptr }; + const _float4x4* m_BoneMat = { nullptr }; +public: + static CStunEffect* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual void Free() override; + CGameObject* Clone(void* pArg, CGameObject* pOwner) override; + void Describe_Entity() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Editor/Public/Troll.h b/Jusin154_Team3D/Editor/Public/Troll.h index ceaa47aa8..09d182839 100644 --- a/Jusin154_Team3D/Editor/Public/Troll.h +++ b/Jusin154_Team3D/Editor/Public/Troll.h @@ -48,6 +48,8 @@ class CTroll final : public CMonster class CEditEffect* m_pTroll_Particle = { nullptr }; class CEditEffect* m_pTroll_Particle2 = { nullptr }; + class CEditEffect* m_pStunEffect = { nullptr }; + class CTrailObject* m_pLeftTrail = { nullptr }; class CTrailObject* m_pRightTrail = { nullptr }; class CTrailObject* m_pWeaponTrail = { nullptr }; diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl index 2ed787044..bc9f9e91d 100644 --- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl +++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl @@ -46,10 +46,12 @@ struct ParticleValue bool isCompareStop; float fCollisionTime; - float fDropAttenuation; + float fDropAttenuation; float3 vVelocity; float fAcceleration; + + bool isStop; }; @@ -82,7 +84,7 @@ cbuffer g_ConstantBuffer : register(b0) // b0 << 이 숫자와 컨스턴트 쉐 bool isMoveUp; bool isExcludePos; - bool isPadding1; + bool isStopMove_For_Depth_Compare; bool isPadding2; float fTimeDelta; @@ -108,8 +110,6 @@ void CS_MAIN( { int iIndex = DispatchThreadID.x; // 배열 인덱스 - - Particle particle = g_ParticleBufferInput[iIndex]; ParticleValue particleValue = g_ParticleValueBufferInput[iIndex]; @@ -152,7 +152,7 @@ void CS_MAIN( /* 내 z가 가려지는 상황이었다면 연산하지않음*/ - if (particle.vLifeTime.x >= particle.vLifeTime.y) + if (particle.vLifeTime.x >= particle.vLifeTime.y || particleValue.isStop == true) { particleValue.isCompareStop = false; @@ -165,6 +165,7 @@ void CS_MAIN( return ; } + //초기화 particle.vRight = particleValue.vOriginRight; particle.vUp = particleValue.vOriginUp; @@ -173,6 +174,7 @@ void CS_MAIN( particle.vLifeTime.x = 0.f; particleValue.vDelay.x = 0.f; + particleValue.isStop = false; if (isRandomAniIndex == false) particleValue.vAniIndex.x = 0.f; @@ -307,10 +309,15 @@ void CS_MAIN( if (isTurn == true) { + float fRotationSpeed = 1.f; + + if (particleValue.fRotaionSpeed > FLT_EPSILON5) + fRotationSpeed = particleValue.fRotaionSpeed; + /* ROTATE */ - float4x4 RotateXMat = RotateX(particleValue.vDeltaAngle.x * fTimeDelta); - float4x4 RotateYMat = RotateY(particleValue.vDeltaAngle.y * fTimeDelta); - float4x4 RotateZMat = RotateZ(particleValue.vDeltaAngle.z * fTimeDelta); + float4x4 RotateXMat = RotateX(particleValue.vDeltaAngle.x * fTimeDelta * fRotationSpeed); + float4x4 RotateYMat = RotateY(particleValue.vDeltaAngle.y * fTimeDelta * fRotationSpeed); + float4x4 RotateZMat = RotateZ(particleValue.vDeltaAngle.z * fTimeDelta * fRotationSpeed); float4x4 CombinedRotMat = mul(RotateZMat, mul(RotateYMat, RotateXMat)); @@ -329,9 +336,14 @@ void CS_MAIN( if (isAxisTurn) { - float4x4 RotateAxisRightMat = RotateAxis(particle.vRight, particleValue.vDeltaAxisAngle.x * fTimeDelta); - float4x4 RotateAxisUpMat = RotateAxis(particle.vUp, particleValue.vDeltaAxisAngle.y * fTimeDelta); - float4x4 RotateAxisLookMat = RotateAxis(particle.vLook, particleValue.vDeltaAxisAngle.z * fTimeDelta); + float fRotationSpeed = 1.f; + + if (particleValue.fRotaionSpeed > FLT_EPSILON5) + fRotationSpeed = particleValue.fRotaionSpeed; + + float4x4 RotateAxisRightMat = RotateAxis(particle.vRight, particleValue.vDeltaAxisAngle.x * fRotationSpeed * fTimeDelta); + float4x4 RotateAxisUpMat = RotateAxis(particle.vUp, particleValue.vDeltaAxisAngle.y * fRotationSpeed * fTimeDelta); + float4x4 RotateAxisLookMat = RotateAxis(particle.vLook, particleValue.vDeltaAxisAngle.z * fRotationSpeed * fTimeDelta); float4x4 CombinedRotMat = mul(RotateAxisLookMat, mul(RotateAxisUpMat, RotateAxisRightMat)); @@ -382,15 +394,22 @@ void CS_MAIN( particleValue.isCompareStop = true; // 내가 지면에 사라지는 순간 particleValue.fCollisionTime = particle.vLifeTime.x; + if (isStopMove_For_Depth_Compare == true) + { + particleValue.isStop = true; + particle.vTranslation.y += 0.2f; + + } + + } } - if (particleValue.isCompareStop == true) // 지면에 부딪혔을 때 + if (particleValue.isCompareStop == true && isStopMove_For_Depth_Compare == false) // 지면에 부딪혔을 때 { particle.vTranslation.y = fOnlyDropY; // 지면에 부딪혓을때 이제 y연산은 오직 drop으로만 수행함 } - } /*가속력*/ diff --git a/Jusin154_Team3D/Engine/Private/Instance_Model.cpp b/Jusin154_Team3D/Engine/Private/Instance_Model.cpp index ce7a97c87..9cc90197e 100644 --- a/Jusin154_Team3D/Engine/Private/Instance_Model.cpp +++ b/Jusin154_Team3D/Engine/Private/Instance_Model.cpp @@ -546,7 +546,7 @@ void CInstance_Model::Compute_CS(_float fTimeDelta) pDesc->isDetphCompareStop = m_InstanceDesc.isDetphCompareStop; pDesc->isRandomAniIndex = m_InstanceDesc.isRandomAniIndex; pDesc->isExcludePos = m_InstanceDesc.isExcludePos; - + pDesc->isStop_Move_For_Depth_Compare = m_InstanceDesc.isStop_Move_For_Depth_Compare; pDesc->WorldMatrix = *m_pOwner->Get_Component()->Get_WorldMatrixPtr(); pDesc->fSizeLerpOption = m_InstanceDesc.fSizeLerpOption; @@ -722,7 +722,7 @@ void CInstance_Model::Instane_Buffer_ReStruct() pParticleValues[i].fCollisionTime = 0.f; pParticleValues[i].isCompareStop = false; - + pParticleValues[i].isStop = false; memcpy(&pParticleValues[i].vOriginRight, SRMatrix.m[0], sizeof(_float4)); memcpy(&pParticleValues[i].vOriginUp, SRMatrix.m[1], sizeof(_float4)); @@ -828,58 +828,6 @@ void CInstance_Model::Describe_Entity() Instane_Buffer_ReStruct(); } - if (GUI::Checkbox("Drop", &m_InstanceDesc.isDrop)) - { - Instane_Buffer_ReStruct(); - } - - if (GUI::Checkbox("Forward Move", &m_InstanceDesc.isMoveForward)) - { - Instane_Buffer_ReStruct(); - } - - if (GUI::Checkbox("Up Move", &m_InstanceDesc.isMoveUp)) - { - Instane_Buffer_ReStruct(); - } - - if (GUI::Checkbox("Right Move", &m_InstanceDesc.isMoveRight)) - { - Instane_Buffer_ReStruct(); - } - - - if (GUI::Checkbox("Sin Wave", &m_InstanceDesc.isSinWave)) - { - Instane_Buffer_ReStruct(); - } - - if (GUI::Checkbox("Turn", &m_InstanceDesc.isTurn)) - { - Instane_Buffer_ReStruct(); - } - - if (GUI::Checkbox("AxisTurn", &m_InstanceDesc.isAxisTurn)) - { - Instane_Buffer_ReStruct(); - } - - - if (GUI::Checkbox("ExcludePos From PibotMove", &m_InstanceDesc.isExcludePos)) - { - Instane_Buffer_ReStruct(); - } - - if (GUI::Checkbox("PivotMove", &m_InstanceDesc.isPivotMove)) - { - Instane_Buffer_ReStruct(); - } - - if (GUI::Checkbox("SizeLerp", &m_InstanceDesc.isSizeLerp)) - { - Instane_Buffer_ReStruct(); - } - if (GUI::Checkbox("NoWorld", &m_InstanceDesc.isNoWorld)) { Instane_Buffer_ReStruct(); @@ -890,193 +838,333 @@ void CInstance_Model::Describe_Entity() Instane_Buffer_ReStruct(); } - if (GUI::Checkbox("DetphCompareStop", &m_InstanceDesc.isDetphCompareStop)) - { - Instane_Buffer_ReStruct(); - } - if (ImGui::DragFloat3("SizeMin", reinterpret_cast<_float*>(&m_InstanceDesc.vSizeMin))) - { - Instane_Buffer_ReStruct(); - } - if (ImGui::DragFloat3("SizeMax", reinterpret_cast<_float*>(&m_InstanceDesc.vSizeMax))) + if (GUI::TreeNode("Transform")) { - Instane_Buffer_ReStruct(); + + if (ImGui::DragFloat3("Center", reinterpret_cast<_float*>(&m_InstanceDesc.vCenter))) + { + Instane_Buffer_ReStruct(); + } + + if (ImGui::DragFloat3("Range", reinterpret_cast<_float*>(&m_InstanceDesc.vRange))) + { + Instane_Buffer_ReStruct(); + } + + if (ImGui::DragFloat3("SizeMin", reinterpret_cast<_float*>(&m_InstanceDesc.vSizeMin))) + { + Instane_Buffer_ReStruct(); + } + + if (ImGui::DragFloat3("SizeMax", reinterpret_cast<_float*>(&m_InstanceDesc.vSizeMax))) + { + Instane_Buffer_ReStruct(); + } + + if (ImGui::DragFloat3("RotationMin", reinterpret_cast<_float*>(&m_InstanceDesc.vRotationAngleMin))) + { + Instane_Buffer_ReStruct(); + } + + if (ImGui::DragFloat3("RotationMax", reinterpret_cast<_float*>(&m_InstanceDesc.vRotationAngleMax))) + { + Instane_Buffer_ReStruct(); + } + + GUI::TreePop(); } - if (ImGui::DragFloat3("Center", reinterpret_cast<_float*>(&m_InstanceDesc.vCenter))) + if (GUI::TreeNode("Move")) { - Instane_Buffer_ReStruct(); - } + _int iMoveLerpOption = (_int)m_InstanceDesc.fMoveLerpOption; - if (ImGui::DragFloat3("Range", reinterpret_cast<_float*>(&m_InstanceDesc.vRange))) - { - Instane_Buffer_ReStruct(); - } + if (ImGui::Combo("Move Lerp Option", &iMoveLerpOption, pLerp, 9)) + { + Instane_Buffer_ReStruct(); - if (ImGui::DragFloat2("Speed", reinterpret_cast<_float*>(&m_InstanceDesc.vSpeed))) - { - Instane_Buffer_ReStruct(); - } + m_InstanceDesc.fMoveLerpOption = (_float)iMoveLerpOption; + } - if (ImGui::DragFloat2("RotationSpeed", reinterpret_cast<_float*>(&m_InstanceDesc.vRotationSpeed))) - { - Instane_Buffer_ReStruct(); - } + if (ImGui::DragFloat2("Speed", reinterpret_cast<_float*>(&m_InstanceDesc.vSpeed))) + { + Instane_Buffer_ReStruct(); + } - if (ImGui::DragFloat3("RotationMin", reinterpret_cast<_float*>(&m_InstanceDesc.vRotationAngleMin))) - { - Instane_Buffer_ReStruct(); - } + if (ImGui::DragFloat2("Drag", reinterpret_cast<_float*>(&m_InstanceDesc.vDrag))) + { + Instane_Buffer_ReStruct(); + } - if (ImGui::DragFloat3("RotationMax", reinterpret_cast<_float*>(&m_InstanceDesc.vRotationAngleMax))) - { - Instane_Buffer_ReStruct(); - } + if (ImGui::DragFloat2("Acceleration", reinterpret_cast<_float*>(&m_InstanceDesc.vAcceleration))) + { + Instane_Buffer_ReStruct(); + } - if (ImGui::DragFloat2("LifeTime", reinterpret_cast<_float*>(&m_InstanceDesc.vLifeTime))) - { - Instane_Buffer_ReStruct(); - } + if (ImGui::DragFloat3("VelocityMin", reinterpret_cast<_float*>(&m_InstanceDesc.vVelocityMin))) + { + Instane_Buffer_ReStruct(); + } - if (ImGui::DragFloat2("Delay", reinterpret_cast<_float*>(&m_InstanceDesc.vDelay))) - { - Instane_Buffer_ReStruct(); - } + if (ImGui::DragFloat3("VelocityMax", reinterpret_cast<_float*>(&m_InstanceDesc.vVelocityMax))) + { + Instane_Buffer_ReStruct(); + } - if (ImGui::DragFloat2("DiffuseUVMoveTime", reinterpret_cast<_float*>(&m_InstanceDesc.vDiffuseUVMoveTime))) - { - Instane_Buffer_ReStruct(); - } - if (ImGui::DragFloat2("MaskingUVMoveTime", reinterpret_cast<_float*>(&m_InstanceDesc.vMaskingUVMoveTime))) - { - Instane_Buffer_ReStruct(); + if (GUI::TreeNode("Dir Move")) + { + + + if (GUI::Checkbox("Forward Move", &m_InstanceDesc.isMoveForward)) + { + Instane_Buffer_ReStruct(); + } + + if (GUI::Checkbox("Up Move", &m_InstanceDesc.isMoveUp)) + { + Instane_Buffer_ReStruct(); + } + + if (GUI::Checkbox("Right Move", &m_InstanceDesc.isMoveRight)) + { + Instane_Buffer_ReStruct(); + } + + GUI::TreePop(); + } + + if (GUI::TreeNode("Pivot Move")) + { + + if (GUI::Checkbox("PivotMove", &m_InstanceDesc.isPivotMove)) + { + Instane_Buffer_ReStruct(); + } + + if (ImGui::DragFloat3("PivotMin", reinterpret_cast<_float*>(&m_InstanceDesc.vPivotMin))) + { + Instane_Buffer_ReStruct(); + } + + if (ImGui::DragFloat3("PivotMax", reinterpret_cast<_float*>(&m_InstanceDesc.vPivotMax))) + { + Instane_Buffer_ReStruct(); + } + + + GUI::TreePop(); + } + + if (GUI::TreeNode("Drop Move")) + { + if (GUI::Checkbox("Drop", &m_InstanceDesc.isDrop)) + { + Instane_Buffer_ReStruct(); + } + + if (ImGui::DragFloat2("Gravity", reinterpret_cast<_float*>(&m_InstanceDesc.vGravity))) + { + Instane_Buffer_ReStruct(); + } + + if (ImGui::DragFloat2("DropAttenuation", reinterpret_cast<_float*>(&m_InstanceDesc.vDropAttenuation))) + { + Instane_Buffer_ReStruct(); + } + + GUI::TreePop(); + } + GUI::TreePop(); } - if (ImGui::DragFloat2("DistortionUVMoveTime", reinterpret_cast<_float*>(&m_InstanceDesc.vDistortionUVMoveTime))) + if (GUI::TreeNode("Rotate")) { - Instane_Buffer_ReStruct(); - } - if (ImGui::DragFloat2("NoiseUVMoveTime", reinterpret_cast<_float*>(&m_InstanceDesc.vNoiseUVMoveTime))) - { - Instane_Buffer_ReStruct(); - } + if (ImGui::DragFloat2("RotationSpeed", reinterpret_cast<_float*>(&m_InstanceDesc.vRotationSpeed))) + { + Instane_Buffer_ReStruct(); + } - if (ImGui::DragFloat2("AniTime", reinterpret_cast<_float*>(&m_InstanceDesc.vAniTime))) - { - Instane_Buffer_ReStruct(); - } + if (GUI::TreeNode("Nomal Turn")) + { + if (GUI::Checkbox("Turn", &m_InstanceDesc.isTurn)) + { + Instane_Buffer_ReStruct(); + } - if (ImGui::DragFloat2("AniIndex", reinterpret_cast<_float*>(&m_InstanceDesc.vAniIndex))) - { - Instane_Buffer_ReStruct(); - } + if (ImGui::DragFloat3("DeltaAngleMin", reinterpret_cast<_float*>(&m_InstanceDesc.vDeltaAngleMin))) + { + Instane_Buffer_ReStruct(); + } - if (ImGui::DragFloat2("Gravity", reinterpret_cast<_float*>(&m_InstanceDesc.vGravity))) - { - Instane_Buffer_ReStruct(); - } + if (ImGui::DragFloat3("DeltaAngleMax", reinterpret_cast<_float*>(&m_InstanceDesc.vDeltaAngleMax))) + { + Instane_Buffer_ReStruct(); + } - if (ImGui::DragFloat3("SinWaveMin", reinterpret_cast<_float*>(&m_InstanceDesc.vSinMinAmount))) - { - Instane_Buffer_ReStruct(); - } + GUI::TreePop(); + } - if (ImGui::DragFloat3("SinWaveMax", reinterpret_cast<_float*>(&m_InstanceDesc.vSinMaxAmount))) - { - Instane_Buffer_ReStruct(); - } - if (ImGui::DragFloat3("VelocityMin", reinterpret_cast<_float*>(&m_InstanceDesc.vVelocityMin))) - { - Instane_Buffer_ReStruct(); - } + if (GUI::TreeNode("Axis Turn")) + { - if (ImGui::DragFloat3("VelocityMax", reinterpret_cast<_float*>(&m_InstanceDesc.vVelocityMax))) - { - Instane_Buffer_ReStruct(); - } + if (GUI::Checkbox("AxisTurn", &m_InstanceDesc.isAxisTurn)) + { + Instane_Buffer_ReStruct(); + } - if (ImGui::DragFloat3("DeltaAngleMin", reinterpret_cast<_float*>(&m_InstanceDesc.vDeltaAngleMin))) - { - Instane_Buffer_ReStruct(); - } - if (ImGui::DragFloat3("DeltaAngleMax", reinterpret_cast<_float*>(&m_InstanceDesc.vDeltaAngleMax))) - { - Instane_Buffer_ReStruct(); + if (GUI::Checkbox("ExcludePos From PibotMove", &m_InstanceDesc.isExcludePos)) + { + Instane_Buffer_ReStruct(); + } + + + + + if (ImGui::DragFloat3("DeltaAxisAngleMin", reinterpret_cast<_float*>(&m_InstanceDesc.vDeltaAxisAngleMin))) + { + Instane_Buffer_ReStruct(); + } + + if (ImGui::DragFloat3("DeltaAxisAngleMax", reinterpret_cast<_float*>(&m_InstanceDesc.vDeltaAxisAngleMax))) + { + Instane_Buffer_ReStruct(); + } + + + GUI::TreePop(); + } + + if (GUI::TreeNode("Sin Turn")) + { + + + if (GUI::Checkbox("Sin Wave", &m_InstanceDesc.isSinWave)) + { + Instane_Buffer_ReStruct(); + } + + if (ImGui::DragFloat3("SinWaveMin", reinterpret_cast<_float*>(&m_InstanceDesc.vSinMinAmount))) + { + Instane_Buffer_ReStruct(); + } + + if (ImGui::DragFloat3("SinWaveMax", reinterpret_cast<_float*>(&m_InstanceDesc.vSinMaxAmount))) + { + Instane_Buffer_ReStruct(); + } + + + GUI::TreePop(); + } + + GUI::TreePop(); } - if (ImGui::DragFloat3("DeltaAxisAngleMin", reinterpret_cast<_float*>(&m_InstanceDesc.vDeltaAxisAngleMin))) + if (GUI::TreeNode("Size")) { - Instane_Buffer_ReStruct(); - } - if (ImGui::DragFloat3("DeltaAxisAngleMax", reinterpret_cast<_float*>(&m_InstanceDesc.vDeltaAxisAngleMax))) - { - Instane_Buffer_ReStruct(); - } + if (GUI::Checkbox("SizeLerp", &m_InstanceDesc.isSizeLerp)) + { + Instane_Buffer_ReStruct(); + } - _int iMoveLerpOption = (_int)m_InstanceDesc.fMoveLerpOption; + _int iSizeLerpOption = (_int)m_InstanceDesc.fSizeLerpOption; - if (ImGui::Combo("Move Lerp Option", &iMoveLerpOption, pLerp, 9)) - { - Instane_Buffer_ReStruct(); + if (ImGui::Combo("Size Lerp Option", &iSizeLerpOption, pLerp, 9)) + { + Instane_Buffer_ReStruct(); - m_InstanceDesc.fMoveLerpOption = (_float)iMoveLerpOption; - } + m_InstanceDesc.fSizeLerpOption = (_float)iSizeLerpOption; + } - if (ImGui::DragFloat3("PivotMin", reinterpret_cast<_float*>(&m_InstanceDesc.vPivotMin))) - { - Instane_Buffer_ReStruct(); - } + if (ImGui::DragFloat3("LerpSizeAmount", reinterpret_cast<_float*>(&m_InstanceDesc.vDeltaSize))) + { + Instane_Buffer_ReStruct(); + } - if (ImGui::DragFloat3("PivotMax", reinterpret_cast<_float*>(&m_InstanceDesc.vPivotMax))) - { - Instane_Buffer_ReStruct(); - } + if (ImGui::DragFloat2("Size Drag", reinterpret_cast<_float*>(&m_InstanceDesc.vSizeDrag))) + { + Instane_Buffer_ReStruct(); + } - if (ImGui::DragFloat2("Drag", reinterpret_cast<_float*>(&m_InstanceDesc.vDrag))) - { - Instane_Buffer_ReStruct(); + + GUI::TreePop(); } - _int iSizeLerpOption = (_int)m_InstanceDesc.fSizeLerpOption; - - if (ImGui::Combo("Size Lerp Option", &iSizeLerpOption, pLerp, 9)) + if (GUI::TreeNode("Time")) { - Instane_Buffer_ReStruct(); + if (ImGui::DragFloat2("LifeTime", reinterpret_cast<_float*>(&m_InstanceDesc.vLifeTime))) + { + Instane_Buffer_ReStruct(); + } - m_InstanceDesc.fSizeLerpOption = (_float)iSizeLerpOption; + if (ImGui::DragFloat2("Delay", reinterpret_cast<_float*>(&m_InstanceDesc.vDelay))) + { + Instane_Buffer_ReStruct(); + } + + if (ImGui::DragFloat2("DiffuseUVMoveTime", reinterpret_cast<_float*>(&m_InstanceDesc.vDiffuseUVMoveTime))) + { + Instane_Buffer_ReStruct(); + } + + if (ImGui::DragFloat2("MaskingUVMoveTime", reinterpret_cast<_float*>(&m_InstanceDesc.vMaskingUVMoveTime))) + { + Instane_Buffer_ReStruct(); + } + + + if (ImGui::DragFloat2("DistortionUVMoveTime", reinterpret_cast<_float*>(&m_InstanceDesc.vDistortionUVMoveTime))) + { + Instane_Buffer_ReStruct(); + } + + if (ImGui::DragFloat2("NoiseUVMoveTime", reinterpret_cast<_float*>(&m_InstanceDesc.vNoiseUVMoveTime))) + { + Instane_Buffer_ReStruct(); + } + + if (ImGui::DragFloat2("AniTime", reinterpret_cast<_float*>(&m_InstanceDesc.vAniTime))) + { + Instane_Buffer_ReStruct(); + } + + if (ImGui::DragFloat2("AniIndex", reinterpret_cast<_float*>(&m_InstanceDesc.vAniIndex))) + { + Instane_Buffer_ReStruct(); + } + + GUI::TreePop(); } - if (ImGui::DragFloat3("LerpSizeAmount", reinterpret_cast<_float*>(&m_InstanceDesc.vDeltaSize))) + if (GUI::TreeNode("Depth Compare")) { - Instane_Buffer_ReStruct(); - } - - if (ImGui::DragFloat2("Size Drag", reinterpret_cast<_float*>(&m_InstanceDesc.vSizeDrag))) - { - Instane_Buffer_ReStruct(); - } + if (GUI::Checkbox("DetphCompareStop", &m_InstanceDesc.isDetphCompareStop)) + { + Instane_Buffer_ReStruct(); + } - if (ImGui::DragFloat2("DropAttenuation", reinterpret_cast<_float*>(&m_InstanceDesc.vDropAttenuation))) - { - Instane_Buffer_ReStruct(); - } + if (GUI::Checkbox("Stop_Move_For_Depth_Compare", &m_InstanceDesc.isStop_Move_For_Depth_Compare)) + { + Instane_Buffer_ReStruct(); + } - if (ImGui::DragFloat2("Acceleration", reinterpret_cast<_float*>(&m_InstanceDesc.vAcceleration))) - { - Instane_Buffer_ReStruct(); + GUI::TreePop(); } + + + + ImGui::PopItemWidth(); diff --git a/Jusin154_Team3D/Engine/Private/Model.cpp b/Jusin154_Team3D/Engine/Private/Model.cpp index 2bac3ea93..f0d1ed31b 100644 --- a/Jusin154_Team3D/Engine/Private/Model.cpp +++ b/Jusin154_Team3D/Engine/Private/Model.cpp @@ -218,11 +218,11 @@ _bool CModel::Play_Anim(_float fTimeDelta, CTransform* pTransform) _bool CModel::Play_Dual_Anim(_float fTimeDelta, CTransform* pTransform) { - if (m_bLoopRestarted) + /*if (m_bLoopRestarted) { m_vPrevRootPos = { 0,0,0 }; m_bLoopRestarted = false; - } + }*/ //ComputeAnimation(m_iCurrentAnimIndex); //ComputeAnimation_Second(m_iCurrSecondAnimIndex); @@ -260,16 +260,20 @@ _bool CModel::Play_Dual_Anim(_float fTimeDelta, CTransform* pTransform) { m_fSecondRatio = 1.f; } - else{ - m_fSecondBlendTime = 0.f; - } } } else { - m_fSecondBlendTime += fTimeDelta; - m_fSecondRatio = (m_fSecondBlendTime / m_fSecondBlendDuration); - if (m_fSecondRatio > 1.f) m_fSecondRatio = 1.f; + if (!m_bSecondStopBlend && m_iCurrSecondAnimIndex != -1) + { + m_fSecondBlendTime += fTimeDelta; + + if (m_fSecondBlendTime > m_fSecondBlendDuration) + m_fSecondBlendTime = m_fSecondBlendDuration; + + m_fSecondRatio = m_fSecondBlendTime / m_fSecondBlendDuration; + } + m_bIsFinishedAnim = m_Animations[m_iCurrentAnimIndex]->Update_TransformationMatrices(m_Bones, m_pLocalPos, m_bIsLoop, fTimeDelta, true, m_iBoneMask, m_vector); @@ -283,9 +287,6 @@ _bool CModel::Play_Dual_Anim(_float fTimeDelta, CTransform* pTransform) { m_fSecondRatio = 1.f; } - else{ - m_fSecondBlendTime = 0.f; - } } } @@ -315,11 +316,30 @@ _bool CModel::Play_Dual_Anim(_float fTimeDelta, CTransform* pTransform) m_bInitialRootRotSaved = false; } - if (!m_bIsSecondLoop && m_bIsSecondFinishedAnim) + if (m_bIsSecondFinishedAnim && !m_bIsSecondLoop) { - m_iCurrSecondAnimIndex = -1; + m_bSecondStopBlend = true; } + if (m_bSecondStopBlend) + { + m_fSecondBlendTime -= fTimeDelta; + + if (m_fSecondBlendTime < 0.f) + m_fSecondBlendTime = 0.f; + + m_fSecondRatio = m_fSecondBlendTime / m_fSecondBlendDuration; + + if (m_fSecondRatio <= 0.f) + { + m_fSecondRatio = 0.f; + m_bSecondStopBlend = false; + m_iCurrSecondAnimIndex = -1; + } + } + + + for (auto& pBone : m_Bones) { pBone->Update_CombinedTransformationMatrix(m_Bones, XMLoadFloat4x4(&m_PreTransformMatrix)); @@ -366,23 +386,38 @@ void CModel::Set_AnimationIndex(_uint iIndex, _bool isLoop, _float fAmount, _boo } -void CModel::Set_Second_AnimationIndex(_uint iIndex, _uint BoneIndex, _bool isLoop) +void CModel::Set_Second_AnimationIndex(_uint BoneIndex, _uint iIndex, _bool isLoop) { - if (m_iCurrSecondAnimIndex == iIndex) { - return; - } if (iIndex >= 0 && iIndex < m_iNumAnimations) { + if (m_iCurrSecondAnimIndex != -1) + { + m_Animations[m_iCurrSecondAnimIndex]->Depart_Animation(); + } + m_iCurrSecondAnimIndex = iIndex; m_bIsSecondLoop = isLoop; m_iBoneMask = m_BoneMask[BoneIndex]; + m_fSecondBlendTime = 0.f; + m_fSecondRatio = 0.f; + m_bIsSecondFinishedAnim = false; + + m_Animations[m_iCurrSecondAnimIndex]->Depart_Animation(); } - else { + else + { + if (m_iCurrSecondAnimIndex != -1) + m_Animations[m_iCurrSecondAnimIndex]->Depart_Animation(); + m_iCurrSecondAnimIndex = -1; + m_bIsSecondFinishedAnim = false; + m_fSecondBlendTime = 0.f; + m_fSecondRatio = 0.f; } } + void CModel::Update_RootBone(_float Amount) { if (m_Bones[m_iRootBoneIndex]->Compare_Name("Reference")&& diff --git a/Jusin154_Team3D/Engine/Private/Unit.cpp b/Jusin154_Team3D/Engine/Private/Unit.cpp index 91a63294d..1afee7b89 100644 --- a/Jusin154_Team3D/Engine/Private/Unit.cpp +++ b/Jusin154_Team3D/Engine/Private/Unit.cpp @@ -162,6 +162,24 @@ void CUnit::Add_Event(_uint AnimIndex, function Callback, _float fRatio, m_PendingEvents.push_back(Desc); } +void CUnit::Check_HitAngle(_vector ProjectileDir) +{ + _vector vProjectileDir = ProjectileDir; + + _vector vLook = m_pTransformCom->Get_State(STATE::LOOK); + + vLook = XMVector3Normalize(vLook); + vProjectileDir = XMVector3Normalize(vProjectileDir); + + _float fDot = XMVectorGetX(XMVector3Dot(vLook, vProjectileDir)); + fDot = clamp(fDot, -1.0f, 1.0f); + + _float fAngleRad = acosf(fDot); + m_fHitDegree = XMConvertToDegrees(fAngleRad); + _vector vCross = XMVector3Cross(vLook, vProjectileDir); + m_fHitCross = XMVectorGetY(vCross); +} + void CUnit::Free() { __super::Free(); diff --git a/Jusin154_Team3D/Engine/Public/Engine_Macro.h b/Jusin154_Team3D/Engine/Public/Engine_Macro.h index f97dab7d6..3a1da1fd2 100644 --- a/Jusin154_Team3D/Engine/Public/Engine_Macro.h +++ b/Jusin154_Team3D/Engine/Public/Engine_Macro.h @@ -145,8 +145,7 @@ constexpr unsigned int g_iMaxShadowHeight = 9216; unsigned int iRefCnt = {}; \ if(nullptr != s_pInstance) { \ iRefCnt = s_pInstance->Release(); \ - if(0 == iRefCnt) \ - s_pInstance = nullptr; \ + s_pInstance = nullptr; \ } \ return iRefCnt; \ } diff --git a/Jusin154_Team3D/Engine/Public/FSM.h b/Jusin154_Team3D/Engine/Public/FSM.h index eef1a200e..c481c7da5 100644 --- a/Jusin154_Team3D/Engine/Public/FSM.h +++ b/Jusin154_Team3D/Engine/Public/FSM.h @@ -21,7 +21,7 @@ enum ESTATE : _u64Flag SKILL2 = 1ULL << 14, ANCIENT_THROW = 1ULL << 15, MAPHELP = 1ULL << 16, - POTION = 1ULL << 17, + SHIELD = 1ULL << 17, STOP = 1ULL << 18, HIT = 1ULL << 19, BROOM_RIDE = 1ULL << 20, diff --git a/Jusin154_Team3D/Engine/Public/Instance_Model.h b/Jusin154_Team3D/Engine/Public/Instance_Model.h index b04d39386..a7e3917b9 100644 --- a/Jusin154_Team3D/Engine/Public/Instance_Model.h +++ b/Jusin154_Team3D/Engine/Public/Instance_Model.h @@ -83,7 +83,7 @@ class ENGINE_DLL CInstance_Model final : public CComponent _bool isMoveUp = {}; _bool isMoveRight = {}; _bool isExcludePos = {}; - _bool isPadding5 = {}; + _bool isStop_Move_For_Depth_Compare = {}; }INSTANCE_DESC; @@ -108,7 +108,7 @@ class ENGINE_DLL CInstance_Model final : public CComponent _float2 vDiffuseUVMoveTime = { 1.f, 1.f }; _float2 vDistortionUVMoveTime = { 1.f , 1.f }; _float2 vNoiseUVMoveTime = { 1.f ,1.f }; - _float2 vAniTime = { 1.f , 1.f }; + _float2 vAniTime = { 0.01f , 0.01f }; _float2 vAniIndex = {}; _bool isMoveForward = {}; @@ -175,7 +175,7 @@ class ENGINE_DLL CInstance_Model final : public CComponent _int isMoveUp = {}; _int isExcludePos = {}; - _int isPadding1 = {}; + _int isStop_Move_For_Depth_Compare = {}; _int isPadding2 = {}; _float fTimeDelta = {}; @@ -230,6 +230,8 @@ class ENGINE_DLL CInstance_Model final : public CComponent _float3 vVelocity = {}; _float fAcceleration = {}; + _bool isStop = {}; + }CS_PARTICLE_VALUE_DESC; public: diff --git a/Jusin154_Team3D/Engine/Public/Model.h b/Jusin154_Team3D/Engine/Public/Model.h index 67e398a23..98a1b9347 100644 --- a/Jusin154_Team3D/Engine/Public/Model.h +++ b/Jusin154_Team3D/Engine/Public/Model.h @@ -36,7 +36,7 @@ class ENGINE_DLL CModel final : public CComponent _bool Play_Anim(_float fTimeDelta, CTransform* pTransform); _bool Play_Dual_Anim(_float fTimeDelta, CTransform* pTransform); void Set_AnimationIndex(_uint iIndex, _bool isLoop = true, _float fAmount = 1.f, _bool bRatio = false,_float fAnimSpeed = 1.f); - void Set_Second_AnimationIndex(_uint iIndex, _uint BoneIndex, _bool isLoop = false); + void Set_Second_AnimationIndex(_uint BoneIndex, _uint iIndex, _bool isLoop = false); _bool IsFinishedAnim() const { return m_bIsFinishedAnim; } _bool IsFinishedSecondAnim() const { return m_bIsSecondFinishedAnim; } _bool IsLoopAnim() const { return m_bIsLoop; } @@ -131,9 +131,10 @@ class ENGINE_DLL CModel final : public CComponent _float m_fBlendDuration = { 0.3f }; _float3 m_vRadiusOffset = {}; // 컬링용 Radius Offset - _float m_fSecondBlendTime = {}; - _float m_fSecondBlendDuration = { 0.3f }; - _float m_fSecondRatio = {}; + _float m_fSecondBlendTime = {}; + _float m_fSecondBlendDuration = { 0.3f }; + _float m_fSecondRatio = {}; + _bool m_bSecondStopBlend = {}; vector m_Animations; // 애니메이션의 벡터, diff --git a/Jusin154_Team3D/Engine/Public/State.h b/Jusin154_Team3D/Engine/Public/State.h index f47bf2032..b1cf28c33 100644 --- a/Jusin154_Team3D/Engine/Public/State.h +++ b/Jusin154_Team3D/Engine/Public/State.h @@ -34,6 +34,8 @@ enum ESTATE TUMBLE, TUMBLE2, PETRIFICUSED_START, STUN, + FLINCH_BWD,FLINCH_FWD, FLINCH_LEFT, FLINCH_RIGHT, + STUMBLE_BWD_L,STUMBLE_BWD_R,STUMBLE_FWD, ////////////////////////// 빗자루 BROOM_MOUNT_B, BROOM_HOVER_IDLE_B, BROOM_HOVER_STOP_B,BROOM_HOVER_DOWN_B,BROOM_HOVER_UP_B,BROOM_HOVER_LEFT_B,BROOM_HOVER_RIGHT_B,BROOM_FLY_DOWN_B, BROOM_FLY_LEFT_B, BROOM_FLY_RIGHT_B, BROOM_FLY_UP_B,BROOM_FLY_B,BROOM_ADD, /// //////////////////////////// diff --git a/Jusin154_Team3D/Engine/Public/Unit.h b/Jusin154_Team3D/Engine/Public/Unit.h index 226a1bcbf..012dee2bf 100644 --- a/Jusin154_Team3D/Engine/Public/Unit.h +++ b/Jusin154_Team3D/Engine/Public/Unit.h @@ -75,6 +75,9 @@ class ENGINE_DLL CUnit abstract : public CContainerObject vector m_PendingEvents; + _float m_fHitDegree = {}; + _float m_fHitCross = {}; + private: virtual void Add_FSM() {}; virtual void Set_FSM() {}; @@ -86,6 +89,7 @@ class ENGINE_DLL CUnit abstract : public CContainerObject HRESULT Ready_Components(void*pArg); void Play_Event(); void Add_Event(_uint AnimIndex, function Callback, _float fRatio = 0.f, _bool bKeep = false); + void Check_HitAngle(_vector ProjectileDir); public: virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr)PURE; virtual void Free() override;