From bfeea69f51943059eff6ca15bc6f27e96d81db82 Mon Sep 17 00:00:00 2001 From: GiJungSUk Date: Mon, 5 Jan 2026 22:29:19 +0900 Subject: [PATCH] commit --- Jusin154_Team3D/Client/Default/Client.vcxproj | 6 + .../Client/Default/Client.vcxproj.filters | 35 ++- Jusin154_Team3D/Client/Private/EffectPool.cpp | 34 ++- Jusin154_Team3D/Client/Private/Loader.cpp | 12 + .../Client/Private/Ranrok_Breath.cpp | 39 +++- .../Client/Private/Ranrok_GroundPulse.cpp | 207 ++++++++++++++++++ .../Client/Private/Ranrok_Land.cpp | 201 +++++++++++++++++ .../Client/Private/Ranrok_Rush_Bottom.cpp | 202 +++++++++++++++++ .../Client/Private/Ranrok_States.cpp | 94 ++++++-- .../Client/Private/TrailObject.cpp | 11 +- Jusin154_Team3D/Client/Public/Client_Enum.h | 3 +- Jusin154_Team3D/Client/Public/Ranrok.h | 2 +- Jusin154_Team3D/Client/Public/Ranrok_Breath.h | 8 + .../Client/Public/Ranrok_GroundPulse.h | 55 +++++ Jusin154_Team3D/Client/Public/Ranrok_Land.h | 58 +++++ .../Client/Public/Ranrok_Rush_Bottom.h | 58 +++++ .../MonsterPackage/Ranrok/RanrokBreath.bin | 4 +- .../Ranrok/RanrokGroundPulse.bin | 3 + .../Ranrok/RanrokRushBottom.bin | 3 + .../Effect/Ranrok/RanrokBreath/Land_Decal.bin | 3 + .../RanrokGroundPulse/BottomSplatter.bin | 3 + .../Ranrok/RanrokGroundPulse/Bottom_Decal.bin | 3 + .../Ranrok/RanrokGroundPulse/Red_Sphere.bin | 3 + .../Ranrok/RanrokGroundPulse/Rock_PT.bin | 3 + .../Effect/Ranrok/RanrokGroundPulse/Smoke.bin | 3 + .../Ranrok/RanrokRushBottom/Rock_PT.bin | 3 + .../Ranrok/RanrokRushBottom/Rush_Decal.bin | 3 + .../Effect/Ranrok/RanrokRushBottom/Smoke.bin | 3 + Jusin154_Team3D/Editor/Default/Editor.vcxproj | 4 + .../Editor/Default/Editor.vcxproj.filters | 18 ++ Jusin154_Team3D/Editor/Private/EditEffect.cpp | 2 +- Jusin154_Team3D/Editor/Private/EffectPool.cpp | 23 +- Jusin154_Team3D/Editor/Private/Loader.cpp | 9 + .../Editor/Private/Ranrok_Breath.cpp | 39 +++- .../Editor/Private/Ranrok_GroundPulse.cpp | 204 +++++++++++++++++ .../Editor/Private/Ranrok_Rush_Bottom.cpp | 199 +++++++++++++++++ .../Editor/Private/Ranrok_States.cpp | 90 +++++++- .../Editor/Private/TrailObject.cpp | 4 - Jusin154_Team3D/Editor/Public/Editor_Define.h | 3 +- Jusin154_Team3D/Editor/Public/Ranrok.h | 1 + Jusin154_Team3D/Editor/Public/Ranrok_Breath.h | 7 + .../Editor/Public/Ranrok_GroundPulse.h | 55 +++++ .../Editor/Public/Ranrok_Rush_Bottom.h | 58 +++++ Jusin154_Team3D/Engine/Private/Renderer.cpp | 29 +++ Jusin154_Team3D/Engine/Private/Unit.cpp | 49 +++-- Jusin154_Team3D/Engine/Public/Engine_Enum.h | 2 +- Jusin154_Team3D/Engine/Public/Renderer.h | 1 + Jusin154_Team3D/Engine/Public/Unit.h | 10 +- 48 files changed, 1781 insertions(+), 88 deletions(-) create mode 100644 Jusin154_Team3D/Client/Private/Ranrok_GroundPulse.cpp create mode 100644 Jusin154_Team3D/Client/Private/Ranrok_Land.cpp create mode 100644 Jusin154_Team3D/Client/Private/Ranrok_Rush_Bottom.cpp create mode 100644 Jusin154_Team3D/Client/Public/Ranrok_GroundPulse.h create mode 100644 Jusin154_Team3D/Client/Public/Ranrok_Land.h create mode 100644 Jusin154_Team3D/Client/Public/Ranrok_Rush_Bottom.h create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokGroundPulse.bin create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokRushBottom.bin create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBreath/Land_Decal.bin create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokGroundPulse/BottomSplatter.bin create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokGroundPulse/Bottom_Decal.bin create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokGroundPulse/Red_Sphere.bin create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokGroundPulse/Rock_PT.bin create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokGroundPulse/Smoke.bin create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokRushBottom/Rock_PT.bin create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokRushBottom/Rush_Decal.bin create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokRushBottom/Smoke.bin create mode 100644 Jusin154_Team3D/Editor/Private/Ranrok_GroundPulse.cpp create mode 100644 Jusin154_Team3D/Editor/Private/Ranrok_Rush_Bottom.cpp create mode 100644 Jusin154_Team3D/Editor/Public/Ranrok_GroundPulse.h create mode 100644 Jusin154_Team3D/Editor/Public/Ranrok_Rush_Bottom.h diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj index 14e466596..eff1f8ff6 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj @@ -190,12 +190,15 @@ call Update_Resources.bat + + + @@ -466,11 +469,14 @@ call Update_Resources.bat + + + diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters index 5ce7e472a..875c77186 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters @@ -841,10 +841,19 @@ 02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Nomal_Hit - + 02.GameObjects\NPC\Ally\RandomNpc - + + + 02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Rush + + + 02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Land + + + 02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_GroundPulse + @@ -1751,10 +1760,19 @@ {15ea8015-5b0a-4678-bf02-55b042ef4de4} - + {88b62177-01fc-424d-a444-4fb5fd4b2db5} + + {9cf44fef-f3be-409e-b530-6aef90db5c0c} + + + {c756e70b-1ba2-4a25-a177-b50bbc1a332a} + + + {eb8e52f5-0283-4acf-8fbb-0e734b7580e9} + @@ -2543,10 +2561,19 @@ 02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Nomal_Hit - + 02.GameObjects\NPC\Ally\RandomNpc + + 02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Rush + + + 02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Land + + + 02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_GroundPulse + diff --git a/Jusin154_Team3D/Client/Private/EffectPool.cpp b/Jusin154_Team3D/Client/Private/EffectPool.cpp index 8765c16ee..025be182d 100644 --- a/Jusin154_Team3D/Client/Private/EffectPool.cpp +++ b/Jusin154_Team3D/Client/Private/EffectPool.cpp @@ -49,7 +49,9 @@ #include "Ranrok_Charge.h" #include "Ranrok_Hit.h" #include "Ranrok_Impact.h" - +#include "Ranrok_Land.h" +#include "Ranrok_GroundPulse.h" +#include "Ranrok_Rush_Bottom.h" CEffectPool::CEffectPool(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) : CGameObject(pDevice, pContext) @@ -637,7 +639,35 @@ HRESULT CEffectPool::Ready_MonsterEffect() ))) return E_FAIL; - + if (FAILED(Create_Effect(SKILL_TYPE::RANROK_LAND, 5, g_iStaticLevel, g_iStaticLevel, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + + CRanrok_Land* pEffect = nullptr; + + pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr); + + return pEffect; } + + ))) return E_FAIL; + + if (FAILED(Create_Effect(SKILL_TYPE::RANROK_GROUNDPULSE, 5, g_iStaticLevel, g_iStaticLevel, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + + CRanrok_GroundPulse* pEffect = nullptr; + + pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr); + + return pEffect; } + + ))) return E_FAIL; + + if (FAILED(Create_Effect(SKILL_TYPE::RANROK_RUSH_BOTTOM, 5, g_iStaticLevel, g_iStaticLevel, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + + CRanrok_Rush_Bottom* pEffect = nullptr; + + pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr); + + return pEffect; } + + ))) return E_FAIL; return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index 3897b397e..e6830a1f0 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -215,6 +215,9 @@ #include "Ranrok_Pulse.h" #include "Ranrok_Hit.h" #include "Ranrok_Impact.h" +#include "Ranrok_Land.h" +#include "Ranrok_GroundPulse.h" +#include "Ranrok_Rush_Bottom.h" #include "StunEffect.h" #include "Box_Splesh.h" @@ -2365,6 +2368,15 @@ HRESULT CLoader::Loading_For_GamePlay() return E_FAIL; } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRanrok_Land::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRanrok_GroundPulse::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRanrok_Rush_Bottom::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CGoblin_Teleport::Create(m_pDevice, m_pContext)))) { diff --git a/Jusin154_Team3D/Client/Private/Ranrok_Breath.cpp b/Jusin154_Team3D/Client/Private/Ranrok_Breath.cpp index de8cf6b89..40b798602 100644 --- a/Jusin154_Team3D/Client/Private/Ranrok_Breath.cpp +++ b/Jusin154_Team3D/Client/Private/Ranrok_Breath.cpp @@ -6,6 +6,7 @@ #include "Wand.h" #include "Player.h" #include "InfoInstance.h" +#include "Ranrok.h" CRanrok_Breath::CRanrok_Breath(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) : CEffect_Container{ pDevice, pContext } @@ -48,11 +49,13 @@ HRESULT CRanrok_Breath::Initialize(void* pArg) m_pBreath_Black = Get_PartObject("Breath_Black"); m_pBreathSlog = Get_PartObject("BreathSlog"); m_pMouthFire = Get_PartObject("MouthFire"); + m_pLand_Decal = Get_PartObject("Land_Decal"); SAFE_ADDREF(m_pBreath); SAFE_ADDREF(m_pBreath_Black); SAFE_ADDREF(m_pBreathSlog); SAFE_ADDREF(m_pMouthFire); + SAFE_ADDREF(m_pLand_Decal); m_fDuration = 5.f; @@ -130,9 +133,9 @@ HRESULT CRanrok_Breath::Pre_Setting(CGameObject* pObject, void* pArg) /* 브레스 시간 제어 */ - _float fBreathTime = *static_cast<_float*>(pArg); + BREATH_INFO BreathDesc = *static_cast(pArg); - Set_BreathTime(fBreathTime); + Set_BreathTime(BreathDesc.fTime); /* 초기 객체 비지블*/ @@ -146,7 +149,7 @@ HRESULT CRanrok_Breath::Pre_Setting(CGameObject* pObject, void* pArg) /* 초기 객체 위치 초기화*/ - _matrix BoneMat = XMLoadFloat4x4(m_pOwner->Get_Component()->Get_BoneMatrixPtr("jaw")); + _matrix BoneMat = XMLoadFloat4x4(m_pOwner->Get_Component()->Get_BoneMatrixPtr("tongue_01")); for (int i = 0; i < 3; ++i) { BoneMat.r[i] = XMVector3Normalize(BoneMat.r[i]); @@ -180,6 +183,33 @@ HRESULT CRanrok_Breath::Pre_Setting(CGameObject* pObject, void* pArg) m_isParticleEnd = false; m_isStartRayCast = false; + + + + /* 바닥 페이즈 일때*/ + + if (static_cast(BreathDesc.iPase) == CRanrok::RANROK_PHASE::PHASE_GROUND) + { + m_pLand_Decal->Set_Visible(true); + + _vector vOwnerPos = m_pOwner->Get_Component()->Get_Position(); + CUnit* pPlayer = m_pInfoInstance->Get_NearestPlayerAlly(m_pOwner->Get_WorldPostion()).first; + + if (pPlayer == nullptr) + return E_FAIL; + + _vector vPlayer_FootPos = pPlayer->Get_Component()->Get_FootPosition(); + + XMStoreFloat4(&m_vTargetPos, vPlayer_FootPos); + + _vector vCompute_Pos = XMVectorSetY(vOwnerPos, XMVectorGetY(vPlayer_FootPos)); + + m_pLand_Decal->Get_Component()->Set_State(STATE::POSITION, vCompute_Pos); + + m_pLand_Decal->Get_Component()->Set_Loop(true); + + } + return S_OK; } @@ -254,6 +284,7 @@ void CRanrok_Breath::OnCollision(CGameObject* pOther, void* pDesc) pSplatterBottom0->Set_Visible(true); pSplatterBottom0->Get_Component()->Set_State(STATE::POSITION, vPos + vDir * 3.f); + m_pLand_Decal->Get_Component()->Set_Loop(false); XMStoreFloat4(&m_vPreCollisionPos, vPos); } @@ -304,7 +335,7 @@ void CRanrok_Breath::Free() SAFE_RELEASE(m_pBreath_Black); SAFE_RELEASE(m_pBreathSlog); SAFE_RELEASE(m_pMouthFire); - + SAFE_RELEASE(m_pLand_Decal); //SAFE_RELEASE(m_pFireBall_Tail); } #ifdef _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Ranrok_GroundPulse.cpp b/Jusin154_Team3D/Client/Private/Ranrok_GroundPulse.cpp new file mode 100644 index 000000000..9fb2039a4 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Ranrok_GroundPulse.cpp @@ -0,0 +1,207 @@ +#include "pch.h" +#include "Ranrok_GroundPulse.h" + +#include "GameInstance.h" +#include "EffectParts.h" +#include "Wand.h" +#include "Player.h" +#include "InfoInstance.h" + +CRanrok_GroundPulse::CRanrok_GroundPulse(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CEffect_Container{ pDevice, pContext } +{ +} + +CRanrok_GroundPulse::CRanrok_GroundPulse(const CRanrok_GroundPulse& rhs) + : CEffect_Container(rhs), + m_pInfoInstance(CInfoInstance::GetInstance()) +{ + SAFE_ADDREF(m_pInfoInstance); +} + +HRESULT CRanrok_GroundPulse::Initialize_Prototype() +{ + + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokGroundPulse"))) + return E_FAIL; + + + return S_OK; + +} + +HRESULT CRanrok_GroundPulse::Initialize(void* pArg) +{ + if (FAILED(__super::Initialize(pArg))) + return E_FAIL; + + if (FAILED(Ready_Components(pArg))) + return E_FAIL; + + if (FAILED(Create_Effect())) + return E_FAIL; + + + m_wstrEffectName = L"RanrokGroundPulse"; + + + + m_fDuration = 10.f; + + + return S_OK; +} + +void CRanrok_GroundPulse::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); + +} + +void CRanrok_GroundPulse::Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Update(fTimeDelta); + + Update_Event(fTimeDelta); + + + + + +} + +void CRanrok_GroundPulse::Late_Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Late_Update(fTimeDelta); + + +} + +HRESULT CRanrok_GroundPulse::Pre_Setting(CGameObject* pObject, void* pArg) +{ + if (FAILED(__super::Pre_Setting(pObject, nullptr))) + return E_FAIL; + + + /* 초기 객체 비지블*/ + + CEffectParts* pBottomDecal = Get_PartObject("Bottom_Decal"); + CEffectParts* pBottomSplatter = Get_PartObject("BottomSplatter"); + CEffectParts* pRed_Sphere = Get_PartObject("Red_Sphere"); + CEffectParts* pRock_PT = Get_PartObject("Rock_PT"); + CEffectParts* pSmoke = Get_PartObject("Smoke"); + + pBottomDecal->Set_Visible(true); + pBottomSplatter->Set_Visible(true); + pRock_PT->Set_Visible(true); + pSmoke->Set_Visible(true); + pRed_Sphere->Set_Visible(true); + + + /* 초기 객체 위치 초기화*/ + + _vector vOwnerPos = m_pOwner->Get_Component()->Get_Position(); + + pRed_Sphere->Get_Component()->Set_WorldMatrix(m_pOwner->Get_Component()->Get_XMWorldMatrix()); + pRed_Sphere->Get_Component()->Set_State(STATE::POSITION, vOwnerPos); + + CUnit* pPlayer = m_pInfoInstance->Get_NearestPlayerAlly(m_pOwner->Get_WorldPostion()).first; + + if (pPlayer == nullptr) + return E_FAIL; + + _vector vPlayer_FootPos = pPlayer->Get_Component()->Get_FootPosition(); + + XMStoreFloat4(&m_vTargetPos, vPlayer_FootPos); + + _vector vCompute_Pos = XMVectorSetY(vOwnerPos, XMVectorGetY(vPlayer_FootPos)); + + pBottomDecal->Get_Component()->Set_State(STATE::POSITION, vCompute_Pos); + pBottomSplatter->Get_Component()->Set_State(STATE::POSITION, vCompute_Pos); + pRock_PT->Get_Component()->Set_State(STATE::POSITION, vCompute_Pos); + pSmoke->Get_Component()->Set_State(STATE::POSITION, vCompute_Pos); + + + return S_OK; +} + +HRESULT CRanrok_GroundPulse::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CRanrok_GroundPulse::Ready_Child() +{ + return S_OK; +} + +CRanrok_GroundPulse* CRanrok_GroundPulse::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CRanrok_GroundPulse* pInstance = new CRanrok_GroundPulse(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CRanrok_GroundPulse"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + + +CGameObject* CRanrok_GroundPulse::Clone(void* pArg, CGameObject* pOwner) +{ + CRanrok_GroundPulse* pInstance = new CRanrok_GroundPulse(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CRanrok_GroundPulse"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CRanrok_GroundPulse::OnCollision(CGameObject* pOther, void* pDesc) +{ + if (m_bHit == false) + return; + + ON_COLLISION_INFO CollisionDesc = *static_cast(pDesc); + + _vector vPos = XMLoadFloat4(&CollisionDesc.vWorldPos); + + +} + +void CRanrok_GroundPulse::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pInfoInstance); + + +} +#ifdef _DEBUG +void CRanrok_GroundPulse::Describe_Entity() +{ + +} +#endif + +HRESULT CRanrok_GroundPulse::Bind_ShaderResources() +{ + return S_OK; +} + + diff --git a/Jusin154_Team3D/Client/Private/Ranrok_Land.cpp b/Jusin154_Team3D/Client/Private/Ranrok_Land.cpp new file mode 100644 index 000000000..2d82db520 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Ranrok_Land.cpp @@ -0,0 +1,201 @@ +#include "pch.h" +#include "Ranrok_Land.h" + +#include "GameInstance.h" +#include "EffectParts.h" +#include "Wand.h" +#include "Player.h" +#include "InfoInstance.h" + +CRanrok_Land::CRanrok_Land(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CEffect_Container{ pDevice, pContext } +{ +} + +CRanrok_Land::CRanrok_Land(const CRanrok_Land& rhs) + : CEffect_Container(rhs), + m_pInfoInstance(CInfoInstance::GetInstance()) +{ + SAFE_ADDREF(m_pInfoInstance); +} + +HRESULT CRanrok_Land::Initialize_Prototype() +{ + + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokLand"))) + return E_FAIL; + + return S_OK; + +} + +HRESULT CRanrok_Land::Initialize(void* pArg) +{ + if (FAILED(__super::Initialize(pArg))) + return E_FAIL; + + if (FAILED(Ready_Components(pArg))) + return E_FAIL; + + if (FAILED(Create_Effect())) + return E_FAIL; + + + m_wstrEffectName = L"RanrokLand"; + + + + m_fDuration = 5.f; + + + return S_OK; +} + +void CRanrok_Land::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); + +} + +void CRanrok_Land::Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Update(fTimeDelta); + + Update_Event(fTimeDelta); + + + + + +} + +void CRanrok_Land::Late_Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Late_Update(fTimeDelta); + + +} + +HRESULT CRanrok_Land::Pre_Setting(CGameObject* pObject, void* pArg) +{ + if (FAILED(__super::Pre_Setting(pObject, nullptr))) + return E_FAIL; + + + /* 초기 객체 비지블*/ + + CEffectParts* pBottom_Decal = Get_PartObject("Bottom_Decal"); + CEffectParts* pRock_PT = Get_PartObject("Rock_PT"); + CEffectParts* pSmoke = Get_PartObject("Smoke"); + + + pBottom_Decal->Set_Visible(true); + pSmoke->Set_Visible(true); + pRock_PT->Set_Visible(true); + + + /* 초기 객체 위치 초기화*/ + + + _vector vOwnerPos = m_pOwner->Get_Component()->Get_Position(); + + + CUnit* pPlayer = m_pInfoInstance->Get_NearestPlayerAlly(m_pOwner->Get_WorldPostion()).first; + + if (pPlayer == nullptr) + return E_FAIL; + + _vector vPlayer_FootPos = pPlayer->Get_Component()->Get_FootPosition(); + + XMStoreFloat4(&m_vTargetPos, vPlayer_FootPos); + + + _vector vCompute_Pos = XMVectorSetY(vOwnerPos, XMVectorGetY(vPlayer_FootPos)); + + pBottom_Decal->Get_Component()->Set_State(STATE::POSITION, vCompute_Pos); + pSmoke->Get_Component()->Set_State(STATE::POSITION, vCompute_Pos); + pRock_PT->Get_Component()->Set_State(STATE::POSITION, vCompute_Pos); + + return S_OK; +} + +HRESULT CRanrok_Land::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CRanrok_Land::Ready_Child() +{ + return S_OK; +} + +CRanrok_Land* CRanrok_Land::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CRanrok_Land* pInstance = new CRanrok_Land(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CRanrok_Land"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + + +CGameObject* CRanrok_Land::Clone(void* pArg, CGameObject* pOwner) +{ + CRanrok_Land* pInstance = new CRanrok_Land(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CRanrok_Land"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CRanrok_Land::OnCollision(CGameObject* pOther, void* pDesc) +{ + if (m_bHit == false) + return; + + ON_COLLISION_INFO CollisionDesc = *static_cast(pDesc); + + _vector vPos = XMLoadFloat4(&CollisionDesc.vWorldPos); + + +} + +void CRanrok_Land::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pInfoInstance); + + +} +#ifdef _DEBUG +void CRanrok_Land::Describe_Entity() +{ + +} +#endif + +HRESULT CRanrok_Land::Bind_ShaderResources() +{ + return S_OK; +} + + diff --git a/Jusin154_Team3D/Client/Private/Ranrok_Rush_Bottom.cpp b/Jusin154_Team3D/Client/Private/Ranrok_Rush_Bottom.cpp new file mode 100644 index 000000000..a01990e65 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Ranrok_Rush_Bottom.cpp @@ -0,0 +1,202 @@ +#include "pch.h" +#include "Ranrok_Rush_Bottom.h" + +#include "GameInstance.h" +#include "EffectParts.h" +#include "Wand.h" +#include "Player.h" +#include "InfoInstance.h" + +CRanrok_Rush_Bottom::CRanrok_Rush_Bottom(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CEffect_Container{ pDevice, pContext } +{ +} + +CRanrok_Rush_Bottom::CRanrok_Rush_Bottom(const CRanrok_Rush_Bottom& rhs) + : CEffect_Container(rhs), + m_pInfoInstance(CInfoInstance::GetInstance()) +{ + SAFE_ADDREF(m_pInfoInstance); +} + +HRESULT CRanrok_Rush_Bottom::Initialize_Prototype() +{ + + + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokRushBottom"))) + return E_FAIL; + + return S_OK; + +} + +HRESULT CRanrok_Rush_Bottom::Initialize(void* pArg) +{ + if (FAILED(__super::Initialize(pArg))) + return E_FAIL; + + if (FAILED(Ready_Components(pArg))) + return E_FAIL; + + if (FAILED(Create_Effect())) + return E_FAIL; + + + m_wstrEffectName = L"Ranrok_Rush_Bottom"; + + + + m_fDuration = 3.f; + + + return S_OK; +} + +void CRanrok_Rush_Bottom::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); + +} + +void CRanrok_Rush_Bottom::Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Update(fTimeDelta); + + Update_Event(fTimeDelta); + + + + + +} + +void CRanrok_Rush_Bottom::Late_Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Late_Update(fTimeDelta); + + +} + +HRESULT CRanrok_Rush_Bottom::Pre_Setting(CGameObject* pObject, void* pArg) +{ + if (FAILED(__super::Pre_Setting(pObject, nullptr))) + return E_FAIL; + + + /* 초기 객체 비지블*/ + + CEffectParts* pRush_Decal = Get_PartObject("Rush_Decal"); + CEffectParts* pRock_PT = Get_PartObject("Rock_PT"); + CEffectParts* pSmoke = Get_PartObject("Smoke"); + + + pRush_Decal->Set_Visible(true); + pSmoke->Set_Visible(true); + pRock_PT->Set_Visible(true); + + + /* 초기 객체 위치 초기화*/ + + + _vector vBonePos = XMLoadFloat4(static_cast<_float4*>(pArg)); + + + CUnit* pPlayer = m_pInfoInstance->Get_NearestPlayerAlly(m_pOwner->Get_WorldPostion()).first; + + if (pPlayer == nullptr) + return E_FAIL; + + _vector vPlayer_FootPos = pPlayer->Get_Component()->Get_FootPosition(); + + XMStoreFloat4(&m_vTargetPos, vPlayer_FootPos); + + + _vector vCompute_Pos = XMVectorSetY(vBonePos, XMVectorGetY(vPlayer_FootPos)); + + pRush_Decal->Get_Component()->Set_State(STATE::POSITION, vCompute_Pos); + pSmoke->Get_Component()->Set_State(STATE::POSITION, vCompute_Pos); + pRock_PT->Get_Component()->Set_State(STATE::POSITION, vCompute_Pos); + + return S_OK; +} + +HRESULT CRanrok_Rush_Bottom::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CRanrok_Rush_Bottom::Ready_Child() +{ + return S_OK; +} + +CRanrok_Rush_Bottom* CRanrok_Rush_Bottom::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CRanrok_Rush_Bottom* pInstance = new CRanrok_Rush_Bottom(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CRanrok_Rush_Bottom"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + + +CGameObject* CRanrok_Rush_Bottom::Clone(void* pArg, CGameObject* pOwner) +{ + CRanrok_Rush_Bottom* pInstance = new CRanrok_Rush_Bottom(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CRanrok_Rush_Bottom"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CRanrok_Rush_Bottom::OnCollision(CGameObject* pOther, void* pDesc) +{ + if (m_bHit == false) + return; + + ON_COLLISION_INFO CollisionDesc = *static_cast(pDesc); + + _vector vPos = XMLoadFloat4(&CollisionDesc.vWorldPos); + + +} + +void CRanrok_Rush_Bottom::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pInfoInstance); + + +} +#ifdef _DEBUG +void CRanrok_Rush_Bottom::Describe_Entity() +{ + +} +#endif + +HRESULT CRanrok_Rush_Bottom::Bind_ShaderResources() +{ + return S_OK; +} + + diff --git a/Jusin154_Team3D/Client/Private/Ranrok_States.cpp b/Jusin154_Team3D/Client/Private/Ranrok_States.cpp index f9734ff41..c47802e5f 100644 --- a/Jusin154_Team3D/Client/Private/Ranrok_States.cpp +++ b/Jusin154_Team3D/Client/Private/Ranrok_States.cpp @@ -7,6 +7,7 @@ #include "EffectPool.h" #include "EffectParts.h" #include "TrailObject.h" +#include "Ranrok_Breath.h" #pragma region STATE #include "State_Idle.h" @@ -352,9 +353,13 @@ void CRanrok::Behavior_FireBreathEnter() Add_Event(m_Animation[STATEANIM::FIREBREATH_A].first, [this]() { - _float fBreathTime = 1.f; - m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_BREATH, this, &fBreathTime); + CRanrok_Breath::BREATH_INFO BreathDesc; + + BreathDesc.fTime = 1.f; + BreathDesc.iPase = ENUM_CLASS(m_ePhase); + + m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_BREATH, this, &BreathDesc); }, 0.1f); @@ -370,8 +375,13 @@ void CRanrok::Behavior_FireBreathEnter() Add_Event(pairAnimInfo.first, [this]() { - _float fBreathTime = 5.f; - m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_BREATH, this, &fBreathTime); + CRanrok_Breath::BREATH_INFO BreathDesc; + + BreathDesc.fTime = 2.f; + BreathDesc.iPase = ENUM_CLASS(m_ePhase); + + m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_BREATH, this, &BreathDesc); + m_bLookAt = false; }, 0.2f); @@ -457,9 +467,13 @@ void CRanrok::Behavior_FireSweepEnter() Add_Event(m_Animation[STATEANIM::FIRESWEEP_A].first, [this]() { - _float fBreathTime = 3.f; - m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_BREATH, this, &fBreathTime); + CRanrok_Breath::BREATH_INFO BreathDesc; + + BreathDesc.fTime = 2.5f; + BreathDesc.iPase = ENUM_CLASS(m_ePhase); + + m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_BREATH, this, &BreathDesc); }, 0.08f); @@ -476,8 +490,13 @@ void CRanrok::Behavior_FireSweepEnter() Add_Event(m_Animation[STATEANIM::FIRESWEEP_G].first, [this]() { - _float fBreathTime = 5.f; - m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_BREATH, this, &fBreathTime); + + CRanrok_Breath::BREATH_INFO BreathDesc; + + BreathDesc.fTime = 3.f; + BreathDesc.iPase = ENUM_CLASS(m_ePhase); + + m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_BREATH, this, &BreathDesc); m_bLookAt = false; }, 0.2f); @@ -698,6 +717,31 @@ void CRanrok::Behavior_RushEnter() m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second,2.f); m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::RUSH)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::RUSH)]; m_bLookAt = false; + + Add_Event(m_Animation[STATEANIM::RUSH_LOOP].first, + [this]() { + + _matrix LeftBoneMat = XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("wrist_left_target")) * m_pTransformCom->Get_XMWorldMatrix(); + + _float4 vLeftPos; + XMStoreFloat4(&vLeftPos, LeftBoneMat.r[3]); + + m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_RUSH_BOTTOM, this, &vLeftPos); + + }, 0.5f, true); + + Add_Event(m_Animation[STATEANIM::RUSH_LOOP].first, + [this]() { + + _matrix RightBoneMat = XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("wrist_right_target")) * m_pTransformCom->Get_XMWorldMatrix(); + + _float4 vRightPos; + XMStoreFloat4(&vRightPos, RightBoneMat.r[3]); + + m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_RUSH_BOTTOM, this, &vRightPos); + + }, 0.8f, true); + } HRESULT CRanrok::Behavior_RushExitCheck(_float fTimeDelta) @@ -762,6 +806,9 @@ HRESULT CRanrok::Behavior_RushExitCheck(_float fTimeDelta) m_pFSM->Change_State(FSMSTATE::GROUND); return E_FAIL; } + + + return S_OK; } @@ -782,21 +829,31 @@ void CRanrok::Behavior_PulseEnter() m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::PULSE)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::PULSE)]; m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); - Add_Event(pairAnimInfo.first, - [this]() { CameraShake(10.f, 2.f, 5.f, 1.2f); - m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_PURSE, this); - }, - 0.39f); - Add_Event(pairAnimInfo.first, [this]() { m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_CHARGE, this); - m_pLeftSmoke->Set_Visible(false); m_pRightSmoke->Set_Visible(false); m_pBottomSmoke->Set_Visible(false); - }, 0.f); + }, 0.01f); + + if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_AIR)) + { + Add_Event(pairAnimInfo.first, + [this]() { + CameraShake(10.f, 2.f, 5.f, 1.2f); + m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_PURSE, this); + }, 0.39f); + } + else + { + Add_Event(pairAnimInfo.first, + [this]() { + CameraShake(10.f, 2.f, 5.f, 1.2f); + m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_GROUNDPULSE, this); + }, 0.39f); + } } @@ -908,8 +965,11 @@ void CRanrok::Behavior_LandEnter() pairAnimInfo = m_Animation[STATEANIM::LAND]; m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second,1.f,false,fAnimSpeed); + Add_Event(pairAnimInfo.first, - [this]() { CameraShake(30.f, 5.f, 10.f, 1.2f); }, + [this]() { + m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_LAND, this); + CameraShake(30.f, 5.f, 10.f, 1.2f); }, 0.53f); } diff --git a/Jusin154_Team3D/Client/Private/TrailObject.cpp b/Jusin154_Team3D/Client/Private/TrailObject.cpp index 4128edbec..23757823f 100644 --- a/Jusin154_Team3D/Client/Private/TrailObject.cpp +++ b/Jusin154_Team3D/Client/Private/TrailObject.cpp @@ -378,8 +378,6 @@ HRESULT CTrailObject::Render_Blur() if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_POSTEX::TRAIL_BLUR)))) return E_FAIL; - - if (FAILED(m_pTrailCom->Render())) return E_FAIL; @@ -470,10 +468,6 @@ HRESULT CTrailObject::Bind_ShaderResources() if (FAILED(m_pTrailCom->Bind_Resources())) return E_FAIL; - if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) { - return E_FAIL; - } - if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Depth"), m_pShaderCom, "g_DepthTexture"))) { return E_FAIL; } @@ -482,6 +476,11 @@ HRESULT CTrailObject::Bind_ShaderResources() return E_FAIL; } + + if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Public/Client_Enum.h b/Jusin154_Team3D/Client/Public/Client_Enum.h index be4a959de..ad94ebfee 100644 --- a/Jusin154_Team3D/Client/Public/Client_Enum.h +++ b/Jusin154_Team3D/Client/Public/Client_Enum.h @@ -78,7 +78,8 @@ namespace Client /*란록*/ - RANROK_FIREBALL, RANROK_BREATH, RANROK_POINT, RANROK_PURSE, RANROK_CHARGE, RANROK_HIT , RANROK_IMPACT, + RANROK_FIREBALL, RANROK_BREATH, RANROK_POINT, RANROK_PURSE, RANROK_CHARGE, RANROK_HIT , RANROK_IMPACT, RANROK_LAND, RANROK_RUSH_BOTTOM, + RANROK_GROUNDPULSE, END }; diff --git a/Jusin154_Team3D/Client/Public/Ranrok.h b/Jusin154_Team3D/Client/Public/Ranrok.h index 56572fe0c..5b37358e3 100644 --- a/Jusin154_Team3D/Client/Public/Ranrok.h +++ b/Jusin154_Team3D/Client/Public/Ranrok.h @@ -31,7 +31,7 @@ class CRanrok final : public CMonster BODY, END }; - +public: enum class RANROK_PHASE { PHASE_AIR, diff --git a/Jusin154_Team3D/Client/Public/Ranrok_Breath.h b/Jusin154_Team3D/Client/Public/Ranrok_Breath.h index f8d7ba358..fa7db340a 100644 --- a/Jusin154_Team3D/Client/Public/Ranrok_Breath.h +++ b/Jusin154_Team3D/Client/Public/Ranrok_Breath.h @@ -10,6 +10,13 @@ NS_BEGIN(Client) class CRanrok_Breath final : public CEffect_Container { +public: + typedef struct tagBreathInfo + { + _float fTime; + _int iPase; + }BREATH_INFO; + private: CRanrok_Breath(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); CRanrok_Breath(const CRanrok_Breath& rhs); @@ -38,6 +45,7 @@ class CRanrok_Breath final : public CEffect_Container class CEffectParts* m_pBreath_Black = { nullptr }; class CEffectParts* m_pBreathSlog = { nullptr }; class CEffectParts* m_pMouthFire = { nullptr }; + class CEffectParts* m_pLand_Decal = { nullptr }; _float3 m_vLook = {}; _float m_fLinearSpeed = 0.8f; diff --git a/Jusin154_Team3D/Client/Public/Ranrok_GroundPulse.h b/Jusin154_Team3D/Client/Public/Ranrok_GroundPulse.h new file mode 100644 index 000000000..f0215a15e --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Ranrok_GroundPulse.h @@ -0,0 +1,55 @@ +#pragma once + +#include "Client_Define.h" +#include "Effect_Container.h" + +NS_BEGIN(Engine) +NS_END + +NS_BEGIN(Client) + +class CRanrok_GroundPulse final : public CEffect_Container +{ +private: + CRanrok_GroundPulse(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CRanrok_GroundPulse(const CRanrok_GroundPulse& rhs); + virtual ~CRanrok_GroundPulse() = 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 = {}; + + + _float3 m_vLook = {}; + _float m_fLinearSpeed = 0.8f; + + _float4 m_vStartPos = { 0.f, 0.f, 0.f, 1.f }; + _float4 m_vTargetPos = { 0.f, 0.f, 10.f, 1.f }; +private: + class CInfoInstance* m_pInfoInstance = { nullptr }; +public: + static CRanrok_GroundPulse* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual void Free() override; + CGameObject* Clone(void* pArg, CGameObject* pOwner) override; +#ifdef _DEBUG + void Describe_Entity() override; +#endif // DEBUG + + +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Ranrok_Land.h b/Jusin154_Team3D/Client/Public/Ranrok_Land.h new file mode 100644 index 000000000..cb82471dc --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Ranrok_Land.h @@ -0,0 +1,58 @@ +#pragma once + +#include "Client_Define.h" +#include "Effect_Container.h" + +NS_BEGIN(Engine) +NS_END + +NS_BEGIN(Client) + +class CRanrok_Land final : public CEffect_Container +{ +private: + CRanrok_Land(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CRanrok_Land(const CRanrok_Land& rhs); + virtual ~CRanrok_Land() = 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 CEffectParts* m_pGooRod_0 = { nullptr }; + class CEffectParts* m_pSmoke = { nullptr }; + class CEffectParts* m_pSpread_PT = { nullptr }; + + _float3 m_vLook = {}; + _float m_fLinearSpeed = 0.8f; + + _float4 m_vStartPos = { 0.f, 0.f, 0.f, 1.f }; + _float4 m_vTargetPos = { 0.f, 0.f, 10.f, 1.f }; +private: + class CInfoInstance* m_pInfoInstance = { nullptr }; +public: + static CRanrok_Land* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual void Free() override; + CGameObject* Clone(void* pArg, CGameObject* pOwner) override; +#ifdef _DEBUG + void Describe_Entity() override; +#endif // DEBUG + + +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Ranrok_Rush_Bottom.h b/Jusin154_Team3D/Client/Public/Ranrok_Rush_Bottom.h new file mode 100644 index 000000000..2ce9f1425 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Ranrok_Rush_Bottom.h @@ -0,0 +1,58 @@ +#pragma once + +#include "Client_Define.h" +#include "Effect_Container.h" + +NS_BEGIN(Engine) +NS_END + +NS_BEGIN(Client) + +class CRanrok_Rush_Bottom final : public CEffect_Container +{ +private: + CRanrok_Rush_Bottom(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CRanrok_Rush_Bottom(const CRanrok_Rush_Bottom& rhs); + virtual ~CRanrok_Rush_Bottom() = 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 CEffectParts* m_pGooRod_0 = { nullptr }; + class CEffectParts* m_pSmoke = { nullptr }; + class CEffectParts* m_pSpread_PT = { nullptr }; + + _float3 m_vLook = {}; + _float m_fLinearSpeed = 0.8f; + + _float4 m_vStartPos = { 0.f, 0.f, 0.f, 1.f }; + _float4 m_vTargetPos = { 0.f, 0.f, 10.f, 1.f }; +private: + class CInfoInstance* m_pInfoInstance = { nullptr }; +public: + static CRanrok_Rush_Bottom* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual void Free() override; + CGameObject* Clone(void* pArg, CGameObject* pOwner) override; +#ifdef _DEBUG + void Describe_Entity() override; +#endif // DEBUG + + +}; + +NS_END diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokBreath.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokBreath.bin index 969dd22c1..084bd4bd2 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokBreath.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokBreath.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:689aba78dedc0a31d77676d8498b666885b1ccf8848e97a07c0c24f4c8b865ae -size 577 +oid sha256:3a3320b269d01068f0ac0fd8f772f401f76de11cf100f8b4fae160d99449b83d +size 649 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokGroundPulse.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokGroundPulse.bin new file mode 100644 index 000000000..24c83841f --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokGroundPulse.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3b5990d85db30386d54894aa8f2a8b12a43636926aa39524f2ed9f8483232ed4 +size 387 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokRushBottom.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokRushBottom.bin new file mode 100644 index 000000000..8dfb9f24f --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokRushBottom.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5f9586d41f4b57e9942d9322e4a60589e64ffcaf4cbb13ac52fca91fcde58832 +size 224 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBreath/Land_Decal.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBreath/Land_Decal.bin new file mode 100644 index 000000000..b087125e6 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBreath/Land_Decal.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f712cfafff85e820710e7fc754155933446134584ba231f732032b258815bb88 +size 1271 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokGroundPulse/BottomSplatter.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokGroundPulse/BottomSplatter.bin new file mode 100644 index 000000000..8e83ae77d --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokGroundPulse/BottomSplatter.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eff64f0aec70177895feddc841d6adde1bd1c7f028149a544082712d3c57d5b4 +size 1210 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokGroundPulse/Bottom_Decal.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokGroundPulse/Bottom_Decal.bin new file mode 100644 index 000000000..c853d1ba6 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokGroundPulse/Bottom_Decal.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4a9533f4fe3f556901a3b7db30c9e4fb19ae943a60bf99402e73f3eeaf3ca394 +size 1217 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokGroundPulse/Red_Sphere.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokGroundPulse/Red_Sphere.bin new file mode 100644 index 000000000..c831ac46c --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokGroundPulse/Red_Sphere.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8777ccd563047dd7f7bc91356e48f129ba54780747e6acd4925ddba3254dfccf +size 1242 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokGroundPulse/Rock_PT.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokGroundPulse/Rock_PT.bin new file mode 100644 index 000000000..8f5432e80 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokGroundPulse/Rock_PT.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:23cf3d5bec2be4b13b8bd36a67126d5918e93a36b3cf2f8bb30b1c78bc8648dd +size 1194 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokGroundPulse/Smoke.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokGroundPulse/Smoke.bin new file mode 100644 index 000000000..aad2356a1 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokGroundPulse/Smoke.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8113aa957c9abb4b4290d94594bc5f27608d2b44c1accff557d5a52fcedee115 +size 1191 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokRushBottom/Rock_PT.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokRushBottom/Rock_PT.bin new file mode 100644 index 000000000..509c03e32 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokRushBottom/Rock_PT.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:85f5a88ad50135b86ad471137cbe1fd56bbcc967d68468c34cd430e5aa1f8a38 +size 1186 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokRushBottom/Rush_Decal.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokRushBottom/Rush_Decal.bin new file mode 100644 index 000000000..f88dc97ba --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokRushBottom/Rush_Decal.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3eb3759fc7d8e9f7362cab51e8b4e1eba42a58fc54e91b8e408a35e2a2fc49fc +size 1261 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokRushBottom/Smoke.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokRushBottom/Smoke.bin new file mode 100644 index 000000000..c376cf60c --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokRushBottom/Smoke.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a51f9fd7c19e84b6a015840077d275c2f79855d04852c261fbb2598acfbf4112 +size 1196 diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj b/Jusin154_Team3D/Editor/Default/Editor.vcxproj index 35ce3159d..a9194344d 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj @@ -215,6 +215,8 @@ call Update_Shaders.bat + + @@ -489,6 +491,8 @@ call Update_Shaders.bat + + diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters index 15b1b25f6..3ddda3ce4 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters @@ -754,6 +754,12 @@ {ea60b62d-1df5-41d7-aa0f-74ec9f454443} + + {7210d8cd-a5b8-48bd-a45e-52992dfe3557} + + + {614e67ae-6df9-4826-adbe-6be96f54041d} + @@ -1527,6 +1533,12 @@ 02.GameObjects\Layer_Effect\Effect_Editor\Effect\Monster_Effect\Ranrok\Land + + 02.GameObjects\Layer_Effect\Effect_Editor\Effect\Monster_Effect\Ranrok\Rush + + + 02.GameObjects\Layer_Effect\Effect_Editor\Effect\Monster_Effect\Ranrok\GroundPulse + @@ -2308,6 +2320,12 @@ 02.GameObjects\Layer_Effect\Effect_Editor\Effect\Monster_Effect\Ranrok\Land + + 02.GameObjects\Layer_Effect\Effect_Editor\Effect\Monster_Effect\Ranrok\Rush + + + 02.GameObjects\Layer_Effect\Effect_Editor\Effect\Monster_Effect\Ranrok\GroundPulse + diff --git a/Jusin154_Team3D/Editor/Private/EditEffect.cpp b/Jusin154_Team3D/Editor/Private/EditEffect.cpp index 83466cf4f..7c2bd3efa 100644 --- a/Jusin154_Team3D/Editor/Private/EditEffect.cpp +++ b/Jusin154_Team3D/Editor/Private/EditEffect.cpp @@ -452,7 +452,7 @@ void CEditEffect::Describe_Entity() //여기서 모델, 텍스쳐, 선택할 수 있도록 함 const char* pLerp[] = { "Linear" , "EaseInQuad", "EaseOutQuad", "EaseInCubic" , "EaseOutCubic" , "EaseInOutSin" , "EaseInBack" , "Expo" , "Circle" }; - const char* pRenderNames[] = { "PRIORITY" , "SHADOW_NEAR", "NONBLEND", "DECAL", "BLUR" , "NONLIGHT" ,"EFFECT", "BLEND" ,"BLOOM", "DISTORTION", "BULR_MESH" , "UI", "OCCLUSION" , "SHADOW_MIDDLE" , "PRESHADOW" , "UI_OVERLAY"}; + const char* pRenderNames[] = { "PRIORITY" , "SHADOW_NEAR", "NONBLEND", "DECAL", "BLUR" , "NONLIGHT" ,"EFFECT", "BLEND" ,"BLOOM", "DISTORTION", "BULR_MESH", "UI", "OCCLUSION" , "SHADOW_MIDDLE" , "PRESHADOW" , "UI_OVERLAY", "EFFECT_NONBLEND" }; const char* pEffectType[] = { "EFFECT" , "TRAIL" }; const char* pShaderPass[] = { "DEFAULT" , "NON_NOMALMAP" , "BLUR" , "WEIGHTBLEND" , "NON_WORLD" , "NON_WORLD_BLUR", "BLEND", "BLEND_NOWORLD", "BLOOM" ,"BLOOM_NOWORLD" ,"BLUR_NO_EMMISVE", diff --git a/Jusin154_Team3D/Editor/Private/EffectPool.cpp b/Jusin154_Team3D/Editor/Private/EffectPool.cpp index 18a39ac2b..33517ec77 100644 --- a/Jusin154_Team3D/Editor/Private/EffectPool.cpp +++ b/Jusin154_Team3D/Editor/Private/EffectPool.cpp @@ -29,7 +29,8 @@ #include "Ranrok_Hit.h" #include "Ranrok_Impact.h" #include "Ranrok_Land.h" - +#include "Ranrok_Rush_Bottom.h" +#include "Ranrok_GroundPulse.h" CEffectPool::CEffectPool(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) : CGameObject(pDevice, pContext) @@ -395,6 +396,26 @@ HRESULT CEffectPool::Ready_MonsterEffect() return pEffect; } ))) return E_FAIL; + if (FAILED(Create_Effect(SKILL_TYPE::RANROK_RUSH_BOTTOM, 10, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + + CRanrok_Rush_Bottom* pEffect = nullptr; + + pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr); + + return pEffect; } + ))) return E_FAIL; + + + if (FAILED(Create_Effect(SKILL_TYPE::RANROK_GROUNDPULSE, 10, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + + CRanrok_GroundPulse* pEffect = nullptr; + + pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr); + + return pEffect; } + ))) return E_FAIL; + + return S_OK; } diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp index fd18d86e2..267bc85b0 100644 --- a/Jusin154_Team3D/Editor/Private/Loader.cpp +++ b/Jusin154_Team3D/Editor/Private/Loader.cpp @@ -222,6 +222,8 @@ #include "Ranrok_Hit.h" #include "Ranrok_Impact.h" #include "Ranrok_Land.h" +#include "Ranrok_Rush_Bottom.h" +#include "Ranrok_GroundPulse.h" #pragma endregion #pragma region PHYSX_HEADER @@ -1968,6 +1970,13 @@ HRESULT CLoader::Loading_For_Effect() return E_FAIL; } + if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CRanrok_Rush_Bottom::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CRanrok_GroundPulse::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } /* For.Prototype_GameObject_Wand */ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CWand::Create(m_pDevice, m_pContext)))) diff --git a/Jusin154_Team3D/Editor/Private/Ranrok_Breath.cpp b/Jusin154_Team3D/Editor/Private/Ranrok_Breath.cpp index 3f4a53017..076342b14 100644 --- a/Jusin154_Team3D/Editor/Private/Ranrok_Breath.cpp +++ b/Jusin154_Team3D/Editor/Private/Ranrok_Breath.cpp @@ -6,6 +6,7 @@ #include "Wand.h" #include "Player.h" #include "InfoInstance.h" +#include "Ranrok.h" CRanrok_Breath::CRanrok_Breath(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) : CEffect_Container{ pDevice, pContext } @@ -46,11 +47,13 @@ HRESULT CRanrok_Breath::Initialize(void* pArg) m_pBreath_Black = Get_PartObject("Breath_Black"); m_pBreathSlog = Get_PartObject("BreathSlog"); m_pMouthFire = Get_PartObject("MouthFire"); + m_pLand_Decal = Get_PartObject("Land_Decal"); SAFE_ADDREF(m_pBreath); SAFE_ADDREF(m_pBreath_Black); SAFE_ADDREF(m_pBreathSlog); SAFE_ADDREF(m_pMouthFire); + SAFE_ADDREF(m_pLand_Decal); m_fDuration = 5.f; @@ -128,9 +131,9 @@ HRESULT CRanrok_Breath::Pre_Setting(CGameObject* pObject, void* pArg) /* 브레스 시간 제어 */ - _float fBreathTime = *static_cast<_float*>(pArg); + BREATH_INFO BreathDesc = *static_cast(pArg); - Set_BreathTime(fBreathTime); + Set_BreathTime(BreathDesc.fTime); /* 초기 객체 비지블*/ @@ -178,6 +181,35 @@ HRESULT CRanrok_Breath::Pre_Setting(CGameObject* pObject, void* pArg) m_isParticleEnd = false; m_isStartRayCast = false; + + + + /* 바닥 페이즈 일때*/ + + if (static_cast(BreathDesc.iPase) == CRanrok::RANROK_PHASE::PHASE_GROUND) + { + m_pLand_Decal->Set_Visible(true); + + _vector vOwnerPos = m_pOwner->Get_Component()->Get_Position(); + CUnit* pPlayer = m_pInfoInstance->Get_NearestPlayerAlly(m_pOwner->Get_WorldPostion()).first; + + if (pPlayer == nullptr) + return E_FAIL; + + _vector vPlayer_FootPos = pPlayer->Get_Component()->Get_FootPosition(); + + XMStoreFloat4(&m_vTargetPos, vPlayer_FootPos); + + _vector vCompute_Pos = XMVectorSetY(vOwnerPos, XMVectorGetY(vPlayer_FootPos)); + + m_pLand_Decal->Get_Component()->Set_State(STATE::POSITION, vCompute_Pos); + + m_pLand_Decal->Get_Component()->Set_Loop(true); + } + + + + return S_OK; } @@ -270,6 +302,7 @@ void CRanrok_Breath::Set_BreathTime(_float fTime) m_pBreathSlog->Set_Visible(false); + m_pLand_Decal->Get_Component()->Set_Loop(false); }); m_Events.emplace(fTime + 0.5f, [&]() { @@ -302,7 +335,7 @@ void CRanrok_Breath::Free() SAFE_RELEASE(m_pBreath_Black); SAFE_RELEASE(m_pBreathSlog); SAFE_RELEASE(m_pMouthFire); - + SAFE_RELEASE(m_pLand_Decal); //SAFE_RELEASE(m_pFireBall_Tail); } #ifdef _DEBUG diff --git a/Jusin154_Team3D/Editor/Private/Ranrok_GroundPulse.cpp b/Jusin154_Team3D/Editor/Private/Ranrok_GroundPulse.cpp new file mode 100644 index 000000000..e066865f9 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/Ranrok_GroundPulse.cpp @@ -0,0 +1,204 @@ +#include "pch.h" +#include "Ranrok_GroundPulse.h" + +#include "GameInstance.h" +#include "EditEffect.h" +#include "Wand.h" +#include "Player.h" +#include "InfoInstance.h" + +CRanrok_GroundPulse::CRanrok_GroundPulse(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CEffect_Container{ pDevice, pContext } +{ +} + +CRanrok_GroundPulse::CRanrok_GroundPulse(const CRanrok_GroundPulse& rhs) + : CEffect_Container(rhs), + m_pInfoInstance(CInfoInstance::GetInstance()) +{ + SAFE_ADDREF(m_pInfoInstance); +} + +HRESULT CRanrok_GroundPulse::Initialize_Prototype() +{ + + + return S_OK; + +} + +HRESULT CRanrok_GroundPulse::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/MonsterPackage/Ranrok/RanrokGroundPulse"))) + return E_FAIL; + + m_wstrEffectName = L"RanrokGroundPulse"; + + + + m_fDuration = 10.f; + + + return S_OK; +} + +void CRanrok_GroundPulse::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); + +} + +void CRanrok_GroundPulse::Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Update(fTimeDelta); + + Update_Event(fTimeDelta); + + + + + +} + +void CRanrok_GroundPulse::Late_Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Late_Update(fTimeDelta); + + +} + +HRESULT CRanrok_GroundPulse::Pre_Setting(CGameObject* pObject, void* pArg) +{ + if (FAILED(__super::Pre_Setting(pObject, nullptr))) + return E_FAIL; + + + /* 초기 객체 비지블*/ + + CEditEffect* pBottomDecal = Get_PartObject("Bottom_Decal"); + CEditEffect* pBottomSplatter = Get_PartObject("BottomSplatter"); + CEditEffect* pRed_Sphere = Get_PartObject("Red_Sphere"); + CEditEffect* pRock_PT = Get_PartObject("Rock_PT"); + CEditEffect* pSmoke = Get_PartObject("Smoke"); + + pBottomDecal->Set_Visible(true); + pBottomSplatter->Set_Visible(true); + pRock_PT->Set_Visible(true); + pSmoke->Set_Visible(true); + pRed_Sphere->Set_Visible(true); + + + /* 초기 객체 위치 초기화*/ + + _vector vOwnerPos = m_pOwner->Get_Component()->Get_Position(); + + pRed_Sphere->Get_Component()->Set_WorldMatrix(m_pOwner->Get_Component()->Get_XMWorldMatrix()); + pRed_Sphere->Get_Component()->Set_State(STATE::POSITION, vOwnerPos); + + CUnit* pPlayer = m_pInfoInstance->Get_NearestPlayerAlly(m_pOwner->Get_WorldPostion()).first; + + if (pPlayer == nullptr) + return E_FAIL; + + _vector vPlayer_FootPos = pPlayer->Get_Component()->Get_FootPosition(); + + XMStoreFloat4(&m_vTargetPos, vPlayer_FootPos); + + _vector vCompute_Pos = XMVectorSetY(vOwnerPos, XMVectorGetY(vPlayer_FootPos)); + + pBottomDecal->Get_Component()->Set_State(STATE::POSITION, vCompute_Pos); + pBottomSplatter->Get_Component()->Set_State(STATE::POSITION, vCompute_Pos); + pRock_PT->Get_Component()->Set_State(STATE::POSITION, vCompute_Pos); + pSmoke->Get_Component()->Set_State(STATE::POSITION, vCompute_Pos); + + + return S_OK; +} + +HRESULT CRanrok_GroundPulse::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CRanrok_GroundPulse::Ready_Child() +{ + return S_OK; +} + +CRanrok_GroundPulse* CRanrok_GroundPulse::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CRanrok_GroundPulse* pInstance = new CRanrok_GroundPulse(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CRanrok_GroundPulse"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + + +CGameObject* CRanrok_GroundPulse::Clone(void* pArg, CGameObject* pOwner) +{ + CRanrok_GroundPulse* pInstance = new CRanrok_GroundPulse(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CRanrok_GroundPulse"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CRanrok_GroundPulse::OnCollision(CGameObject* pOther, void* pDesc) +{ + if (m_bHit == false) + return; + + ON_COLLISION_INFO CollisionDesc = *static_cast(pDesc); + + _vector vPos = XMLoadFloat4(&CollisionDesc.vWorldPos); + + +} + +void CRanrok_GroundPulse::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pInfoInstance); + + +} +#ifdef _DEBUG +void CRanrok_GroundPulse::Describe_Entity() +{ + +} +#endif + +HRESULT CRanrok_GroundPulse::Bind_ShaderResources() +{ + return S_OK; +} + + diff --git a/Jusin154_Team3D/Editor/Private/Ranrok_Rush_Bottom.cpp b/Jusin154_Team3D/Editor/Private/Ranrok_Rush_Bottom.cpp new file mode 100644 index 000000000..13e2be8aa --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/Ranrok_Rush_Bottom.cpp @@ -0,0 +1,199 @@ +#include "pch.h" +#include "Ranrok_Rush_Bottom.h" + +#include "GameInstance.h" +#include "EditEffect.h" +#include "Wand.h" +#include "Player.h" +#include "InfoInstance.h" + +CRanrok_Rush_Bottom::CRanrok_Rush_Bottom(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CEffect_Container{ pDevice, pContext } +{ +} + +CRanrok_Rush_Bottom::CRanrok_Rush_Bottom(const CRanrok_Rush_Bottom& rhs) + : CEffect_Container(rhs), + m_pInfoInstance(CInfoInstance::GetInstance()) +{ + SAFE_ADDREF(m_pInfoInstance); +} + +HRESULT CRanrok_Rush_Bottom::Initialize_Prototype() +{ + + + return S_OK; + +} + +HRESULT CRanrok_Rush_Bottom::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/MonsterPackage/Ranrok/RanrokRushBottom"))) + return E_FAIL; + + m_wstrEffectName = L"Ranrok_Rush_Bottom"; + + + + m_fDuration = 3.f; + + + return S_OK; +} + +void CRanrok_Rush_Bottom::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); + +} + +void CRanrok_Rush_Bottom::Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Update(fTimeDelta); + + Update_Event(fTimeDelta); + + + + + +} + +void CRanrok_Rush_Bottom::Late_Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Late_Update(fTimeDelta); + + +} + +HRESULT CRanrok_Rush_Bottom::Pre_Setting(CGameObject* pObject, void* pArg) +{ + if (FAILED(__super::Pre_Setting(pObject, nullptr))) + return E_FAIL; + + + /* 초기 객체 비지블*/ + + CEditEffect* pRush_Decal = Get_PartObject("Rush_Decal"); + CEditEffect* pRock_PT = Get_PartObject("Rock_PT"); + CEditEffect* pSmoke = Get_PartObject("Smoke"); + + + pRush_Decal->Set_Visible(true); + pSmoke->Set_Visible(true); + pRock_PT->Set_Visible(true); + + + /* 초기 객체 위치 초기화*/ + + + _vector vBonePos = XMLoadFloat4(static_cast<_float4*>(pArg)); + + + CUnit* pPlayer = m_pInfoInstance->Get_NearestPlayerAlly(m_pOwner->Get_WorldPostion()).first; + + if (pPlayer == nullptr) + return E_FAIL; + + _vector vPlayer_FootPos = pPlayer->Get_Component()->Get_FootPosition(); + + XMStoreFloat4(&m_vTargetPos, vPlayer_FootPos); + + + _vector vCompute_Pos = XMVectorSetY(vBonePos, XMVectorGetY(vPlayer_FootPos)); + + pRush_Decal->Get_Component()->Set_State(STATE::POSITION, vCompute_Pos); + pSmoke->Get_Component()->Set_State(STATE::POSITION, vCompute_Pos); + pRock_PT->Get_Component()->Set_State(STATE::POSITION, vCompute_Pos); + + return S_OK; +} + +HRESULT CRanrok_Rush_Bottom::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CRanrok_Rush_Bottom::Ready_Child() +{ + return S_OK; +} + +CRanrok_Rush_Bottom* CRanrok_Rush_Bottom::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CRanrok_Rush_Bottom* pInstance = new CRanrok_Rush_Bottom(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CRanrok_Rush_Bottom"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + + +CGameObject* CRanrok_Rush_Bottom::Clone(void* pArg, CGameObject* pOwner) +{ + CRanrok_Rush_Bottom* pInstance = new CRanrok_Rush_Bottom(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CRanrok_Rush_Bottom"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CRanrok_Rush_Bottom::OnCollision(CGameObject* pOther, void* pDesc) +{ + if (m_bHit == false) + return; + + ON_COLLISION_INFO CollisionDesc = *static_cast(pDesc); + + _vector vPos = XMLoadFloat4(&CollisionDesc.vWorldPos); + + +} + +void CRanrok_Rush_Bottom::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pInfoInstance); + + +} +#ifdef _DEBUG +void CRanrok_Rush_Bottom::Describe_Entity() +{ + +} +#endif + +HRESULT CRanrok_Rush_Bottom::Bind_ShaderResources() +{ + return S_OK; +} + + diff --git a/Jusin154_Team3D/Editor/Private/Ranrok_States.cpp b/Jusin154_Team3D/Editor/Private/Ranrok_States.cpp index 05bc4594a..35c0a2743 100644 --- a/Jusin154_Team3D/Editor/Private/Ranrok_States.cpp +++ b/Jusin154_Team3D/Editor/Private/Ranrok_States.cpp @@ -7,6 +7,7 @@ #include "EffectPool.h" #include "TrailObject.h" #include "EditEffect.h" +#include "Ranrok_Breath.h" #pragma region STATE #include "State_Idle.h" @@ -309,9 +310,12 @@ void CRanrok::Behavior_FireBreathEnter() Add_Event(m_Animation[STATEANIM::FIREBREATH_A].first, [this]() { - _float fBreathTime = 1.f; + CRanrok_Breath::BREATH_INFO BreathDesc; - m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_BREATH, this , &fBreathTime); + BreathDesc.fTime = 1.f; + BreathDesc.iPase = ENUM_CLASS(m_ePhase); + + m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_BREATH, this , &BreathDesc); }, 0.1f); @@ -323,8 +327,15 @@ void CRanrok::Behavior_FireBreathEnter() Add_Event(pairAnimInfo.first, [this]() { - _float fBreathTime = 5.f; - m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_BREATH, this, &fBreathTime); + + CRanrok_Breath::BREATH_INFO BreathDesc; + + BreathDesc.fTime = 2.f; + BreathDesc.iPase = ENUM_CLASS(m_ePhase); + + m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_BREATH, this, &BreathDesc); + + m_bLookAt = false; }, 0.2f); } @@ -384,9 +395,13 @@ void CRanrok::Behavior_FireSweepEnter() Add_Event(m_Animation[STATEANIM::FIRESWEEP_A].first, [this]() { - _float fBreathTime = 3.f; - m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_BREATH, this, &fBreathTime); + CRanrok_Breath::BREATH_INFO BreathDesc; + + BreathDesc.fTime = 2.5f; + BreathDesc.iPase = ENUM_CLASS(m_ePhase); + + m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_BREATH, this, &BreathDesc); }, 0.08f); } @@ -397,8 +412,14 @@ void CRanrok::Behavior_FireSweepEnter() Add_Event(m_Animation[STATEANIM::FIRESWEEP_G].first, [this]() { - _float fBreathTime = 5.f; - m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_BREATH, this, &fBreathTime); + + CRanrok_Breath::BREATH_INFO BreathDesc; + + BreathDesc.fTime = 3.f; + BreathDesc.iPase = ENUM_CLASS(m_ePhase); + + m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_BREATH, this, &BreathDesc); + m_bLookAt = false; }, 0.2f); } @@ -595,6 +616,31 @@ void CRanrok::Behavior_RushEnter() m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 2.f); m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::RUSH)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::RUSH)]; m_bLookAt = false; + + Add_Event(m_Animation[STATEANIM::RUSH_LOOP].first, + [this]() { + + _matrix LeftBoneMat = XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("wrist_left_target")) * m_pTransformCom->Get_XMWorldMatrix(); + + _float4 vLeftPos; + XMStoreFloat4(&vLeftPos, LeftBoneMat.r[3]); + + m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_RUSH_BOTTOM, this, &vLeftPos); + + }, 0.5f , true); + + Add_Event(m_Animation[STATEANIM::RUSH_LOOP].first, + [this]() { + + _matrix RightBoneMat = XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("wrist_right_target")) * m_pTransformCom->Get_XMWorldMatrix(); + + _float4 vRightPos; + XMStoreFloat4(&vRightPos, RightBoneMat.r[3]); + + m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_RUSH_BOTTOM, this, &vRightPos); + + }, 0.8f , true); + } HRESULT CRanrok::Behavior_RushExitCheck(_float fTimeDelta) @@ -616,6 +662,12 @@ HRESULT CRanrok::Behavior_RushExitCheck(_float fTimeDelta) _vector vPos = m_pCharacter_Controller->Get_Position(); _vector vNextPos = vPos + vLook * 10.f * fTimeDelta; m_pCharacter_Controller->Set_Position(vNextPos); + + if (m_pModelCom->IsFinishedAnim()) + { + + } + return S_OK; } @@ -632,6 +684,7 @@ void CRanrok::Behavior_RushExit() m_pFSM->Disable_State(FSMSTATE::RUSH); m_fRushTime = 0.f; m_bLookAt = true; + Reset_Event(); } void CRanrok::Behavior_PulseEnter() @@ -653,11 +706,23 @@ void CRanrok::Behavior_PulseEnter() m_pBottomSmoke->Set_Visible(false); }, 0.f); - Add_Event(pairAnimInfo.first, - [this]() { + if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_AIR)) + { + Add_Event(pairAnimInfo.first, + [this]() { + + m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_PURSE, this); + }, 0.39f); + } + else + { + Add_Event(pairAnimInfo.first, + [this]() { + + m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_GROUNDPULSE, this); + }, 0.39f); + } - m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_PURSE, this); - },0.39f); } HRESULT CRanrok::Behavior_PulseExitCheck(_float fTimeDelta) @@ -756,6 +821,7 @@ void CRanrok::Behavior_LandEnter() m_pCharacter_Controller->SetGravity(true); #endif m_ePhase = ENUM_CLASS(RANROK_PHASE::PHASE_GROUND); + m_pBottomSmoke->Set_Visible(false); pairAnimInfo = m_Animation[STATEANIM::LAND]; m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); diff --git a/Jusin154_Team3D/Editor/Private/TrailObject.cpp b/Jusin154_Team3D/Editor/Private/TrailObject.cpp index cd77a7a02..1b3a91400 100644 --- a/Jusin154_Team3D/Editor/Private/TrailObject.cpp +++ b/Jusin154_Team3D/Editor/Private/TrailObject.cpp @@ -43,10 +43,6 @@ void CTrailObject::Update(_float fTimeDelta) if (m_bVisible == false) return; - - - - /* 디스토션 타임*/ if (m_TrailInfo.vDistortionTime.y != 0) { diff --git a/Jusin154_Team3D/Editor/Public/Editor_Define.h b/Jusin154_Team3D/Editor/Public/Editor_Define.h index c46a6ca57..f6d3488ab 100644 --- a/Jusin154_Team3D/Editor/Public/Editor_Define.h +++ b/Jusin154_Team3D/Editor/Public/Editor_Define.h @@ -67,7 +67,8 @@ namespace Editor JAP_SIDE, BOMBARDA_SIDE, DESCENDO_SIDE, LEVIOSO_SIDE, STUN, - TROLL_ATTACK, TROLL_RUSH_HIT, TROLL_NOMAL_SMOKE, BLINK, RANROK_FIREBALL, RANROK_BREATH, RANROK_POINT, RANROK_PURSE, RANROK_CHARGE, RANROK_IMPACT , RANROK_HIT, RANROK_LAND, + TROLL_ATTACK, TROLL_RUSH_HIT, TROLL_NOMAL_SMOKE, BLINK, RANROK_FIREBALL, RANROK_BREATH, RANROK_POINT, RANROK_PURSE, RANROK_CHARGE, RANROK_IMPACT , RANROK_HIT, RANROK_LAND, RANROK_RUSH_BOTTOM, + RANROK_GROUNDPULSE, END }; diff --git a/Jusin154_Team3D/Editor/Public/Ranrok.h b/Jusin154_Team3D/Editor/Public/Ranrok.h index f994ed160..263475517 100644 --- a/Jusin154_Team3D/Editor/Public/Ranrok.h +++ b/Jusin154_Team3D/Editor/Public/Ranrok.h @@ -32,6 +32,7 @@ class CRanrok final : public CMonster END }; +public: enum class RANROK_PHASE { PHASE_AIR, diff --git a/Jusin154_Team3D/Editor/Public/Ranrok_Breath.h b/Jusin154_Team3D/Editor/Public/Ranrok_Breath.h index dc8a7e008..affa4e799 100644 --- a/Jusin154_Team3D/Editor/Public/Ranrok_Breath.h +++ b/Jusin154_Team3D/Editor/Public/Ranrok_Breath.h @@ -10,6 +10,12 @@ NS_BEGIN(Editor) class CRanrok_Breath final : public CEffect_Container { +public: + typedef struct tagBreathInfo + { + _float fTime; + _int iPase; + }BREATH_INFO; private: CRanrok_Breath(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); CRanrok_Breath(const CRanrok_Breath& rhs); @@ -39,6 +45,7 @@ class CRanrok_Breath final : public CEffect_Container class CEditEffect* m_pBreath_Black = { nullptr }; class CEditEffect* m_pBreathSlog = { nullptr }; class CEditEffect* m_pMouthFire = { nullptr }; + class CEditEffect* m_pLand_Decal = { nullptr }; _float3 m_vLook = {}; _float m_fLinearSpeed = 0.8f; diff --git a/Jusin154_Team3D/Editor/Public/Ranrok_GroundPulse.h b/Jusin154_Team3D/Editor/Public/Ranrok_GroundPulse.h new file mode 100644 index 000000000..498880d4f --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/Ranrok_GroundPulse.h @@ -0,0 +1,55 @@ +#pragma once + +#include "Editor_Define.h" +#include "Effect_Container.h" + +NS_BEGIN(Engine) +NS_END + +NS_BEGIN(Editor) + +class CRanrok_GroundPulse final : public CEffect_Container +{ +private: + CRanrok_GroundPulse(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CRanrok_GroundPulse(const CRanrok_GroundPulse& rhs); + virtual ~CRanrok_GroundPulse() = 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 = {}; + + + _float3 m_vLook = {}; + _float m_fLinearSpeed = 0.8f; + + _float4 m_vStartPos = { 0.f, 0.f, 0.f, 1.f }; + _float4 m_vTargetPos = { 0.f, 0.f, 10.f, 1.f }; +private: + class CInfoInstance* m_pInfoInstance = { nullptr }; +public: + static CRanrok_GroundPulse* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual void Free() override; + CGameObject* Clone(void* pArg, CGameObject* pOwner) override; +#ifdef _DEBUG + void Describe_Entity() override; +#endif // DEBUG + + +}; + +NS_END diff --git a/Jusin154_Team3D/Editor/Public/Ranrok_Rush_Bottom.h b/Jusin154_Team3D/Editor/Public/Ranrok_Rush_Bottom.h new file mode 100644 index 000000000..bfc5f3774 --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/Ranrok_Rush_Bottom.h @@ -0,0 +1,58 @@ +#pragma once + +#include "Editor_Define.h" +#include "Effect_Container.h" + +NS_BEGIN(Engine) +NS_END + +NS_BEGIN(Editor) + +class CRanrok_Rush_Bottom final : public CEffect_Container +{ +private: + CRanrok_Rush_Bottom(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CRanrok_Rush_Bottom(const CRanrok_Rush_Bottom& rhs); + virtual ~CRanrok_Rush_Bottom() = 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_pGooRod_0 = { nullptr }; + class CEditEffect* m_pSmoke = { nullptr }; + class CEditEffect* m_pSpread_PT = { nullptr }; + + _float3 m_vLook = {}; + _float m_fLinearSpeed = 0.8f; + + _float4 m_vStartPos = { 0.f, 0.f, 0.f, 1.f }; + _float4 m_vTargetPos = { 0.f, 0.f, 10.f, 1.f }; +private: + class CInfoInstance* m_pInfoInstance = { nullptr }; +public: + static CRanrok_Rush_Bottom* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual void Free() override; + CGameObject* Clone(void* pArg, CGameObject* pOwner) override; +#ifdef _DEBUG + void Describe_Entity() override; +#endif // DEBUG + + +}; + +NS_END diff --git a/Jusin154_Team3D/Engine/Private/Renderer.cpp b/Jusin154_Team3D/Engine/Private/Renderer.cpp index 8182c285a..f243454d3 100644 --- a/Jusin154_Team3D/Engine/Private/Renderer.cpp +++ b/Jusin154_Team3D/Engine/Private/Renderer.cpp @@ -11,6 +11,7 @@ void CRenderer::Render() Render_Shadow(); Render_NonBlend(); Render_Decal(); + Render_EffectNonBlend(); Render_SSAO(); Render_SSAO_BLUR(); Render_LightAcc(); @@ -361,6 +362,34 @@ void CRenderer::Render_Decal() m_pGameInstance->Clear_RenderTarget(TEXT("Target_NormalCopy")); } +void CRenderer::Render_EffectNonBlend() +{ + COMPUTE_TIMEDELTA("Timer_Render_EffectNonBlend"); + EVENTSCOPE_("Render_EffectNonBlend"); + m_eType = RENDER::EFFECT_NONBLEND; + + if (FAILED(m_pGameInstance->Begin_MRT_NonClear(TEXT("MRT_GameObjects")))) { + return; + } + + for (auto& pRenderObject : m_RenderObjects[ENUM_CLASS(RENDER::EFFECT_NONBLEND)]) + { + if (nullptr != pRenderObject) { + if (FAILED(pRenderObject->Render())) { + assert(false); + } + } + + SAFE_RELEASE(pRenderObject); + } + + m_RenderObjects[ENUM_CLASS(RENDER::EFFECT_NONBLEND)].clear(); + if (FAILED(m_pGameInstance->End_MRT())) { + return; + } + COMPUTE_TIMEDELTA("Timer_Render_EffectNonBlend"); +} + void CRenderer::Render_LightAcc() { COMPUTE_TIMEDELTA("Timer_Render_LightAcc"); diff --git a/Jusin154_Team3D/Engine/Private/Unit.cpp b/Jusin154_Team3D/Engine/Private/Unit.cpp index 33800e52a..09abc6b7f 100644 --- a/Jusin154_Team3D/Engine/Private/Unit.cpp +++ b/Jusin154_Team3D/Engine/Private/Unit.cpp @@ -129,32 +129,35 @@ HRESULT CUnit::Ready_Components(void *pArg) void CUnit::Play_Event() { - for (auto iter = m_PendingEvents.begin(); iter != m_PendingEvents.end(); ) - { - _float ratio = m_pModelCom->Get_CurrentTrackProgressRatio(); - _uint curAnim = m_pModelCom->Get_AnimIndex(); + for (auto iter = m_PendingEvents.begin(); iter != m_PendingEvents.end(); ) + { + _float ratio = m_pModelCom->Get_CurrentTrackProgressRatio(); + _uint curAnim = m_pModelCom->Get_AnimIndex(); - if (curAnim == iter->AnimIndex) - { - if (!iter->bExecuted && ratio >= iter->fRatio) - { - iter->Callback(); - iter->bExecuted = true; + _float prevRatio = iter->PrevRatio; - if (!iter->bKeep) - { - iter = m_PendingEvents.erase(iter); - continue; - } - } - } - else - { - iter->bExecuted = false; - } + if (curAnim == iter->AnimIndex) + { + if (prevRatio <= iter->fRatio && ratio >= iter->fRatio) + { + iter->Callback(); - ++iter; - } + if (!iter->bKeep) + { + iter = m_PendingEvents.erase(iter); + continue; + } + } + + iter->PrevRatio = ratio; + } + else + { + iter->PrevRatio = 0.f; + } + + ++iter; + } } void CUnit::Add_Event(_uint AnimIndex, function Callback, _float fRatio,_bool bKeep) diff --git a/Jusin154_Team3D/Engine/Public/Engine_Enum.h b/Jusin154_Team3D/Engine/Public/Engine_Enum.h index c5a6da3ed..5245635e7 100644 --- a/Jusin154_Team3D/Engine/Public/Engine_Enum.h +++ b/Jusin154_Team3D/Engine/Public/Engine_Enum.h @@ -5,7 +5,7 @@ NS_BEGIN(Engine) enum class STATE { RIGHT, UP, LOOK, POSITION, END }; enum class LIGHT { DIRECTIONAL, POINT, SPOT, END }; enum class COLLIDER { AABB, OBB, SPHERE, END }; -enum class RENDER {PRIORITY, SHADOW_NEAR, NONBLEND, DECAL, BLUR, NONLIGHT, EFFECT ,BLEND, BLOOM, DISTORTION, BULR_MESH ,UI, OCCLUSION, SHADOW_MIDDLE, PRESHADOW, UI_OVERLAY ,END }; +enum class RENDER {PRIORITY, SHADOW_NEAR, NONBLEND, DECAL, BLUR, NONLIGHT, EFFECT ,BLEND, BLOOM, DISTORTION, BULR_MESH ,UI, OCCLUSION, SHADOW_MIDDLE, PRESHADOW, UI_OVERLAY, EFFECT_NONBLEND,END }; enum class RAY { LOCAL, WORLD, END }; enum class ACTOR { BOX, CAPSULE, SPHERE, PLANE, TRIANGLEMESH, HEIGHTFIELD, END }; enum class BLEND_BONE{SPINE,SHOULDER_L,SHOULDER_R,NECK,SHOULDER_NECK_L, SHOULDER_NECK_R,HEAD, HIPS_CLOTH, END}; diff --git a/Jusin154_Team3D/Engine/Public/Renderer.h b/Jusin154_Team3D/Engine/Public/Renderer.h index 80ad83817..c1eb8f018 100644 --- a/Jusin154_Team3D/Engine/Public/Renderer.h +++ b/Jusin154_Team3D/Engine/Public/Renderer.h @@ -119,6 +119,7 @@ class CRenderer final : public CBase void Render_Shadow(); void Render_NonBlend(); void Render_Decal(); + void Render_EffectNonBlend(); void Render_Blur(); void Combine_Blur(); void Render_SSAO(); diff --git a/Jusin154_Team3D/Engine/Public/Unit.h b/Jusin154_Team3D/Engine/Public/Unit.h index db04d0401..b9b9900bf 100644 --- a/Jusin154_Team3D/Engine/Public/Unit.h +++ b/Jusin154_Team3D/Engine/Public/Unit.h @@ -15,11 +15,11 @@ class ENGINE_DLL CUnit abstract : public CContainerObject struct PendingEvent { - _float fRatio = 0.f; - _uint AnimIndex = 0; - function Callback; - _bool bKeep = { false }; - _bool bExecuted = { false }; + _float fRatio = 0.f; + _uint AnimIndex = 0; + function Callback; + _bool bKeep = { false }; + _float PrevRatio = {}; }; protected: CUnit(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);