From 33386049e41d13b88f617eb3b2931509f37d53c0 Mon Sep 17 00:00:00 2001 From: kimnuri Date: Fri, 2 Jan 2026 17:26:36 +0900 Subject: [PATCH 1/9] [add] Basic] Collider Player --- Jusin154_Team3D/Client/Default/Client.cpp | 4 +- Jusin154_Team3D/Client/Private/PlayerRobe.cpp | 236 ++++++++++-------- Jusin154_Team3D/Client/Public/PlayerRobe.h | 13 +- 3 files changed, 151 insertions(+), 102 deletions(-) diff --git a/Jusin154_Team3D/Client/Default/Client.cpp b/Jusin154_Team3D/Client/Default/Client.cpp index 4084d56e2..05d2522ff 100644 --- a/Jusin154_Team3D/Client/Default/Client.cpp +++ b/Jusin154_Team3D/Client/Default/Client.cpp @@ -198,7 +198,7 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) g_hWnd = hWnd; #endif // _DEBUG -#ifdef Bin +//#ifdef Bin #ifndef _DEBUG int screenX = GetSystemMetrics(SM_CXSCREEN); int screenY = GetSystemMetrics(SM_CYSCREEN); @@ -224,7 +224,7 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) UpdateWindow(hWnd); #endif // !_DEBUG -#endif // Bin +//#endif // Bin return TRUE; } diff --git a/Jusin154_Team3D/Client/Private/PlayerRobe.cpp b/Jusin154_Team3D/Client/Private/PlayerRobe.cpp index 306f2a4e5..a1d623676 100644 --- a/Jusin154_Team3D/Client/Private/PlayerRobe.cpp +++ b/Jusin154_Team3D/Client/Private/PlayerRobe.cpp @@ -44,7 +44,12 @@ HRESULT CPlayerRobe::Render() { #ifdef _DEBUG #ifdef 기무리 - //Render_BonePhysX(); + if (m_pGameInstance->Key_Up(DIK_8)) { + m_bRenderDebug = !m_bRenderDebug; + } + if (m_bRenderDebug) { + Render_BonePhysX(); + } #endif // 기무리 #endif // _DEBUG return S_OK; @@ -56,12 +61,6 @@ HRESULT CPlayerRobe::Update_RobeSocketPosition() PSX::PxTransform pxTransform = {}; _matrix WorldMatrix = {}; _matrix OwnerInvWorldMatrix = m_pParentTransformCom->Get_WorldMatrixInv(); - //{ - // pxTransform = m_pRobeMainAnchor->Get_GlobalPosition(); - // WorldMatrix = XMMatrixAffineTransformation(XMVectorSet(1.f, 1.f, 1.f, 0.f), XMVectorZero(), XMLoadFloat4((_float4*)&pxTransform.q), XMVectorSetW(XMLoadFloat3((_float3*)&pxTransform.p), 1.f)); - // _fmatrix LocalMatrix = WorldMatrix * OwnerInvWorldMatrix; - // m_pModelCom->Set_BoneCombinedTransformation("Hips_Cloth", LocalMatrix); - //} for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) { pxTransform = m_pRobeJointAnchor[i]->Get_GlobalPosition(); WorldMatrix = XMMatrixAffineTransformation(XMVectorSet(1.f, 1.f, 1.f, 0.f), XMVectorZero(), XMLoadFloat4((_float4*)&pxTransform.q), XMVectorSetW(XMLoadFloat3((_float3*)&pxTransform.p), 1.f)); @@ -137,62 +136,122 @@ HRESULT CPlayerRobe::Update_LegsPosition() } #endif // _DEBUG } - m_pLower0Bound->Move_Kinematic(m_pParentTransformCom->Get_XMWorldMatrix(), false); - m_pLower1Bound->Move_Kinematic(m_pParentTransformCom->Get_XMWorldMatrix(), false); + { + + _vector vLegPos = XMVector4Transform(XMLoadFloat4((_float4*)&m_pLeftLegLocalMatrix->m[3][0]), WorldMatrix); + _vector vLegUp = XMVector4Transform(XMLoadFloat4((_float4*)&m_pLeftLegUpLocalMatrix->m[3][0]), WorldMatrix); + m_pLeftThigh->Set_CenterTransform(vLegPos, vLegUp, false); + +#ifdef _DEBUG + { + _vector vCenterWorldPos = (vLegPos + vLegUp ) * 0.5f; + _vector vRotQ = XMQuaternionIdentity(); + _vector vDir = XMVectorSetW(vLegUp - vLegPos, 0.f); + _float vLength = XMVectorGetX(XMVector3Length(vDir)); + if (vLength > FLT_EPSILON5) { + vDir = XMVector3Normalize(vDir); + vRotQ = CMyTools::MakeQuaternionFromTo(XMVectorSet(0.f, 1.f, 0.f, 0.f), vDir); + } + XMStoreFloat4x4(&m_LeftThighMatrix, XMMatrixRotationQuaternion(vRotQ) * XMMatrixTranslationFromVector(vCenterWorldPos)); + } +#endif // _DEBUG + + vLegPos = XMVector4Transform(XMLoadFloat4((_float4*)&m_pRightLegLocalMatrix->m[3][0]), WorldMatrix); + vLegUp = XMVector4Transform(XMLoadFloat4((_float4*)&m_pRightLegUpLocalMatrix->m[3][0]), WorldMatrix); + m_pRightThigh->Set_CenterTransform(vLegPos, vLegUp, false); + +#ifdef _DEBUG + { + _vector vCenterWorldPos = (vLegPos + vLegUp) * 0.5f; + _vector vRotQ = XMQuaternionIdentity(); + _vector vDir = XMVectorSetW(vLegUp - vLegPos, 0.f); + _float vLength = XMVectorGetX(XMVector3Length(vDir)); + if (vLength > FLT_EPSILON5) { + vDir = XMVector3Normalize(vDir); + vRotQ = CMyTools::MakeQuaternionFromTo(XMVectorSet(0.f, 1.f, 0.f, 0.f), vDir); + } + XMStoreFloat4x4(&m_RightThighMatrix, XMMatrixRotationQuaternion(vRotQ) * XMMatrixTranslationFromVector(vCenterWorldPos)); + } +#endif // _DEBUG + } + m_pLower0Bound->Move_Kinematic(XMMatrixTranslationFromVector(XMVectorSet(0.f, -0.2f, 0.f, 0.f)) * XMLoadFloat4x4(m_pLower0BoundMatrix) * WorldMatrix, false); + m_pLower1Bound->Move_Kinematic(XMMatrixTranslationFromVector(XMVectorSet(0.f, -0.7f, 0.f, 0.f)) * XMLoadFloat4x4(m_pLower1BoundMatrix) * WorldMatrix, false); return S_OK; } #ifdef _DEBUG -HRESULT CPlayerRobe::Render_Legs() +HRESULT CPlayerRobe::Render_Legs(_fmatrix LowerMatrix) { _float fHeight = 0.25f; - _matrix WorldMatrix = XMLoadFloat4x4(&m_LeftLegMatrix); _matrix ViewMatrix = m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW); _matrix ProjMatrix = m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ); _vector vColor = CMyTools::ColorRGB_A_HEXtoVECTOR(0xff0000, 1.f); - m_pMainShape->Draw(WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true, + m_pMainShape->Draw(LowerMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true, [this]() { m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0); }); - _matrix WorldUp = XMMatrixTranslationFromVector(WorldMatrix.r[1] * fHeight); - _matrix WorldDown = XMMatrixTranslationFromVector(WorldMatrix.r[1] * -fHeight); - m_pSubShape->Draw(WorldUp * WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true, + _matrix WorldUp = XMMatrixTranslationFromVector(LowerMatrix.r[1] * fHeight); + _matrix WorldDown = XMMatrixTranslationFromVector(LowerMatrix.r[1] * -fHeight); + m_pSubShape->Draw(WorldUp * LowerMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true, [this]() { m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0); }); - m_pSubShape->Draw(WorldDown * WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true, + m_pSubShape->Draw(WorldDown * LowerMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true, [this]() { m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0); }); - - WorldMatrix = XMLoadFloat4x4(&m_RightLegMatrix); - - m_pMainShape->Draw(WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true, - [this]() { - m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0); - }); - WorldUp = XMMatrixTranslationFromVector(WorldMatrix.r[1] * fHeight); - WorldDown = XMMatrixTranslationFromVector(WorldMatrix.r[1] * -fHeight); - m_pSubShape->Draw(WorldUp * WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true, - [this]() { - m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0); - }); - m_pSubShape->Draw(WorldDown * WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true, - [this]() { - m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0); - }); - m_pLower0Bound->Render([this]() { - m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0); - }); - m_pLower1Bound->Render([this]() { - m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0); - }); - return S_OK; } +HRESULT CPlayerRobe::Render_BonePhysX() +{ + _vector vColor = CMyTools::ColorRGB_A_HEXtoVECTOR(0x00ff00, 1.f); + _fmatrix OwnerMatrix = m_pParentTransformCom->Get_XMWorldMatrix(); + _cmatrix ViewMatrix = m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW); + _matrix ProjMatrix = m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ); + ID3D11DepthStencilState* pPrevDSS = nullptr; + UINT iPrevStencilRef = 0; + m_pContext->OMGetDepthStencilState(&pPrevDSS, &iPrevStencilRef); + + for (_uint iBoneIndex = 0; iBoneIndex < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++iBoneIndex) + { + _matrix WorldMatrix = XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr(PLAYER_JOINT_BONE_NAMES[iBoneIndex])) * OwnerMatrix; + + m_pSubShape->Draw(WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true, + [this]() { + m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0); + }); + } + _matrix MainAnchorMatrix = /*XMMatrixRotationZ(XM_PIDIV2) * */XMLoadFloat4x4(m_pSocketMatrix) * OwnerMatrix; + m_pSubShape->Draw(MainAnchorMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true, + [this]() { + m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0); + }); + m_pRobeMainAnchor->Render([this]() { + m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0); + }); + Render_Legs(XMLoadFloat4x4(&m_LeftLegMatrix)); + Render_Legs(XMLoadFloat4x4(&m_RightLegMatrix)); + Render_Legs(XMLoadFloat4x4(&m_LeftThighMatrix)); + Render_Legs(XMLoadFloat4x4(&m_RightThighMatrix)); + _vector vRouteColor = CMyTools::ColorRGB_A_HEXtoVECTOR(0x0000ff, 1.f); + for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) { + m_pRobeJointAnchor[i]->Render([this]() { + m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0); + }); + } + m_pContext->OMSetDepthStencilState(pPrevDSS, iPrevStencilRef); + if (pPrevDSS != nullptr) { + pPrevDSS->Release(); + } + m_pLower0Bound->Render(); + m_pLower1Bound->Render(); + return S_OK; +} +#endif // _DEBUG + HRESULT CPlayerRobe::Update_RobeJoints() { for (_uint i = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_RUP_START); i < ENUM_CLASS(PLAYER_JOINT_ORDER::END); ++i) { @@ -203,22 +262,22 @@ HRESULT CPlayerRobe::Update_RobeJoints() case PLAYER_JOINT_ORDER::ORIGIN_TO_RUP_START: case PLAYER_JOINT_ORDER::ORIGIN_TO_TUP_START: case PLAYER_JOINT_ORDER::ORIGIN_TO_LUP_START: - m_JointDescriptions[i].iMotionTwist = 0; - m_JointDescriptions[i].iMotionSwing1 = 0; - m_JointDescriptions[i].iMotionSwing2 = 0; + m_JointDescriptions[i].iMotionTwist = 1; + m_JointDescriptions[i].iMotionSwing1 = 1; + m_JointDescriptions[i].iMotionSwing2 = 1; m_JointDescriptions[i].fLinearLimit = 0.f; m_JointDescriptions[i].fTwistAbsDeg = 0.f; - m_JointDescriptions[i].fSwingDeg = 5.f; + m_JointDescriptions[i].fSwingDeg = 40.f; break; case PLAYER_JOINT_ORDER::ORIGIN_TO_RUP_END: case PLAYER_JOINT_ORDER::ORIGIN_TO_TUP_END: case PLAYER_JOINT_ORDER::ORIGIN_TO_LUP_END: - m_JointDescriptions[i].iMotionTwist = 0; - m_JointDescriptions[i].iMotionSwing1 = 0; - m_JointDescriptions[i].iMotionSwing2 = 0; + m_JointDescriptions[i].iMotionTwist = 1; + m_JointDescriptions[i].iMotionSwing1 = 1; + m_JointDescriptions[i].iMotionSwing2 = 1; m_JointDescriptions[i].fLinearLimit = 0.f; m_JointDescriptions[i].fTwistAbsDeg = 0.f; - m_JointDescriptions[i].fSwingDeg = 5.f; + m_JointDescriptions[i].fSwingDeg = 40.f; break; @@ -299,48 +358,6 @@ HRESULT CPlayerRobe::Update_RobeJoints() } return S_OK; } -HRESULT CPlayerRobe::Render_BonePhysX() -{ - _vector vColor = CMyTools::ColorRGB_A_HEXtoVECTOR(0x00ff00, 1.f); - _fmatrix OwnerMatrix = m_pParentTransformCom->Get_XMWorldMatrix(); - _cmatrix ViewMatrix = m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW); - _matrix ProjMatrix = m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ); - ID3D11DepthStencilState* pPrevDSS = nullptr; - UINT iPrevStencilRef = 0; - m_pContext->OMGetDepthStencilState(&pPrevDSS, &iPrevStencilRef); - - for (_uint iBoneIndex = 0; iBoneIndex < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++iBoneIndex) - { - _matrix WorldMatrix = XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr(PLAYER_JOINT_BONE_NAMES[iBoneIndex])) * OwnerMatrix; - - m_pSubShape->Draw(WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true, - [this]() { - m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0); - }); - } - _matrix MainAnchorMatrix = /*XMMatrixRotationZ(XM_PIDIV2) * */XMLoadFloat4x4(m_pSocketMatrix) * OwnerMatrix; - m_pSubShape->Draw(MainAnchorMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true, - [this]() { - m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0); - }); - m_pRobeMainAnchor->Render([this]() { - m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0); - }); - Render_Legs(); - _vector vRouteColor = CMyTools::ColorRGB_A_HEXtoVECTOR(0x0000ff, 1.f); - for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) { - m_pRobeJointAnchor[i]->Render([this]() { - m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0); - }); - } - m_pContext->OMSetDepthStencilState(pPrevDSS, iPrevStencilRef); - if (pPrevDSS != nullptr) { - pPrevDSS->Release(); - } - return S_OK; -} -#endif // _DEBUG - HRESULT CPlayerRobe::Ready_Components() { __super::Ready_Components(nullptr); @@ -367,6 +384,23 @@ HRESULT CPlayerRobe::Ready_Components() return E_FAIL; } } + + { // + CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; + Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG); + Desc.bAutoOwnerTranslation = false; + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_Leg"), (CComponent**)&m_pLeftThigh, &Desc))) { + return E_FAIL; + } + } + { // + CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; + Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG); + Desc.bAutoOwnerTranslation = false; + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_Leg"), (CComponent**)&m_pRightThigh, &Desc))) { + return E_FAIL; + } + } { // CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG); @@ -587,7 +621,7 @@ HRESULT CPlayerRobe::Initialize(void* pArg) PlayerRobe_DESC* pDesc = static_cast (pArg); m_pSocketMatrix = pDesc->pSocketMatrix; m_pModelCom = pDesc->pModel; - + m_ReconstructedJointAnchorMatirces.resize(ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END)); m_iBoneNum = m_pModelCom->Get_MeshInfluencedBoneNum(ENUM_CLASS(PLAYER_MESH_ORDER::ROBE_CLOTH)); @@ -596,13 +630,16 @@ HRESULT CPlayerRobe::Initialize(void* pArg) return E_FAIL; } - m_pLeftFootLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("LeftFoot"); - m_pLeftLegLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("LeftLeg"); - m_pRightFootLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("RightFoot"); - m_pRightLegLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("RightLeg"); - - XMStoreFloat4x4(&m_PreTransformMatrix, XMLoadFloat4x4(m_pModelCom->Get_PreTransformMatrixPtr())); + m_pLeftFootLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("LeftFoot"); + m_pLeftLegLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("LeftLeg"); + m_pRightFootLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("RightFoot"); + m_pRightLegLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("RightLeg"); + m_pLeftLegUpLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("LeftUpLeg"); + m_pRightLegUpLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("RightUpLeg"); + m_pLower1BoundMatrix = m_pLower0BoundMatrix = m_pModelCom->Get_BoneMatrixPtr("Hips"); + + XMStoreFloat4x4(&m_PreTransformMatrix, XMLoadFloat4x4(m_pModelCom->Get_PreTransformMatrixPtr())); for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) { m_RobeJointAnchorMatrices[i] = m_pModelCom->Get_BoneLocalMatrixPtr(PLAYER_JOINT_BONE_NAMES[i]); } @@ -672,6 +709,7 @@ HRESULT CPlayerRobe::Initialize(void* pArg) JointDesc.ApplyToJoint(*m_pDynamicJoints[i]); m_JointDescriptions[i] = JointDesc; } + Update_LegsPosition(); Update_RobeJoints(); #ifdef _DEBUG @@ -724,9 +762,11 @@ void CPlayerRobe::Free() SAFE_RELEASE(m_pDepthStencilStateNone); #endif // _DEBUG SAFE_RELEASE(m_pRightLeg); + SAFE_RELEASE(m_pLeftLeg); + SAFE_RELEASE(m_pRightThigh); + SAFE_RELEASE(m_pLeftThigh); SAFE_RELEASE(m_pLower0Bound); SAFE_RELEASE(m_pLower1Bound); - SAFE_RELEASE(m_pLeftLeg); SAFE_RELEASE(m_pRobeMainAnchor); for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::END); ++i) { SAFE_RELEASE(m_pRobeJointRoute[i]); diff --git a/Jusin154_Team3D/Client/Public/PlayerRobe.h b/Jusin154_Team3D/Client/Public/PlayerRobe.h index bd7a6af1e..95749f8fa 100644 --- a/Jusin154_Team3D/Client/Public/PlayerRobe.h +++ b/Jusin154_Team3D/Client/Public/PlayerRobe.h @@ -40,8 +40,12 @@ class CPlayerRobe final : public CPartObject const _float4x4* m_pSocketMatrix = { nullptr }; const _float4x4* m_pLeftFootLocalMatrix = { nullptr }; const _float4x4* m_pLeftLegLocalMatrix = { nullptr }; + const _float4x4* m_pLeftLegUpLocalMatrix = { nullptr }; const _float4x4* m_pRightFootLocalMatrix = { nullptr }; const _float4x4* m_pRightLegLocalMatrix = { nullptr }; + const _float4x4* m_pRightLegUpLocalMatrix = { nullptr }; + const _float4x4* m_pLower0BoundMatrix = { nullptr }; + const _float4x4* m_pLower1BoundMatrix = { nullptr }; const _float4x4* m_RobeJointAnchorMatrices[ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END)] = { nullptr }; vector<_float4x4> m_ReconstructedJointAnchorMatirces = { }; //_float4x4 m_ReconstructedJointAnchorMatirces[ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END)] = { }; @@ -50,6 +54,8 @@ class CPlayerRobe final : public CPartObject _int m_iBoneNum = -1; CRigidBody_Dynamic* m_pRightLeg = { nullptr }; CRigidBody_Dynamic* m_pLeftLeg = { nullptr }; + CRigidBody_Dynamic* m_pLeftThigh = { nullptr }; + CRigidBody_Dynamic* m_pRightThigh = { nullptr }; CRigidBody_Dynamic* m_pLower0Bound = { nullptr }; CRigidBody_Dynamic* m_pLower1Bound = { nullptr }; CRigidBody_Dynamic* m_pRobeMainAnchor = { nullptr }; @@ -65,6 +71,9 @@ class CPlayerRobe final : public CPartObject ID3D11DepthStencilState* m_pDepthStencilStateNone = { nullptr }; _float4x4 m_LeftLegMatrix = {}; _float4x4 m_RightLegMatrix = {}; + _float4x4 m_LeftThighMatrix = {}; + _float4x4 m_RightThighMatrix = {}; + _bool m_bRenderDebug = { true }; #endif // _DEBUG private: virtual HRESULT Initialize_Prototype() override; @@ -74,10 +83,10 @@ class CPlayerRobe final : public CPartObject HRESULT Update_LegsPosition(); HRESULT Helper_RouteJointGenerater(CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC& Desc_Body, ROUTE_DESC& Desc_Route, _matrix* xmAnchorMatricesWorld); + HRESULT Update_RobeJoints(); #ifdef _DEBUG HRESULT Render_BonePhysX(); - HRESULT Render_Legs(); - HRESULT Update_RobeJoints(); + HRESULT Render_Legs(_fmatrix LowerMatrix); #endif // _DEBUG public: static CPlayerRobe* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); From 837ec3e90e669ef2ece30142a42bff1b973d54ab Mon Sep 17 00:00:00 2001 From: kimnuri Date: Fri, 2 Jan 2026 22:04:15 +0900 Subject: [PATCH 2/9] [reapply] basic_anim [add] Additional_Bone --- .gitignore | 1 + Jusin154_Team3D/Client/Default/Client.vcxproj | 1 + .../Client/Default/Client.vcxproj.filters | 3 + Jusin154_Team3D/Client/Private/Player.cpp | 7 - Jusin154_Team3D/Client/Private/PlayerRobe.cpp | 638 +++--------------- .../Client/Private/PlayerRobe_Initialize.cpp | 511 ++++++++++++++ Jusin154_Team3D/Client/Public/Player_ENUM.h | 66 +- .../Human/PlayableCharacter/Playable.bin | 4 +- .../Human/PlayableCharacter/Playable.fbx | 4 +- .../Playable_AvadaKedavra.bin | 4 +- .../Playable_AvadaKedavra.fbx | 4 +- .../Human/PlayableCharacter/Playable_Bm.bin | 4 +- .../Human/PlayableCharacter/Playable_Bm.fbx | 4 +- .../PlayableCharacter/Playable_Broom.bin | 4 +- .../PlayableCharacter/Playable_Broom.fbx | 4 +- .../Human/PlayableCharacter/Playable_Cmbt.bin | 4 +- .../Human/PlayableCharacter/Playable_Cmbt.fbx | 4 +- .../PlayableCharacter/Playable_Lightning.bin | 4 +- .../PlayableCharacter/Playable_Lightning.fbx | 4 +- .../PlayableCharacter/Playable_Protego.bin | 4 +- .../PlayableCharacter/Playable_Protego.fbx | 4 +- .../Human/PlayableCharacter/Playable_Rct.bin | 4 +- .../Human/PlayableCharacter/Playable_Rct.fbx | 4 +- .../PlayableCharacter/Playable_Sneak.bin | 4 +- .../PlayableCharacter/Playable_Sneak.fbx | 4 +- .../PlayableCharacter/Playable_Spawn.bin | 4 +- .../PlayableCharacter/Playable_Spawn.fbx | 4 +- .../Playable_Spell_Learning.bin | 4 +- .../Playable_Spell_Learning.fbx | 4 +- .../Models/Monster/SubTroll/troll.xml | 2 +- .../ShaderFiles/Shader_NPC_PBR_Anim.hlsl | 2 +- .../Editor/Private/Level_ObjectViewer.cpp | 4 +- .../Editor/Private/Loader_ObjectViewer.cpp | 10 +- .../Engine/Private/GameInstance.cpp | 4 + .../Engine/Private/PhysX_Manager.cpp | 37 +- Jusin154_Team3D/Engine/Public/Engine_Enum.h | 1 + Jusin154_Team3D/Engine/Public/GameInstance.h | 1 + Jusin154_Team3D/Engine/Public/Model.h | 2 +- Jusin154_Team3D/Engine/Public/PhysX_Manager.h | 1 + 39 files changed, 752 insertions(+), 627 deletions(-) create mode 100644 Jusin154_Team3D/Client/Private/PlayerRobe_Initialize.cpp diff --git a/.gitignore b/.gitignore index 8ce467e13..5484ffc9a 100644 --- a/.gitignore +++ b/.gitignore @@ -35,6 +35,7 @@ x64/ Release/ Debug/ Inc/ +enc_temp_folder/ Jusin154_Team3D/Client/Bin/Resources/ # Imgui 임시 파일 diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj index 53519c337..91c5b41bf 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj @@ -440,6 +440,7 @@ call Update_Resources.bat + diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters index 8b1dd71e2..de6be1d11 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters @@ -2412,6 +2412,9 @@ 02.GameObjects\Environment\02.InstancedProp\Light + + 02.GameObjects\Player\Robe + diff --git a/Jusin154_Team3D/Client/Private/Player.cpp b/Jusin154_Team3D/Client/Private/Player.cpp index 5063571b3..4e6e4bf82 100644 --- a/Jusin154_Team3D/Client/Private/Player.cpp +++ b/Jusin154_Team3D/Client/Private/Player.cpp @@ -231,13 +231,6 @@ HRESULT CPlayer::Render() if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) { return E_FAIL; } -//#ifdef _DEBUG -//#ifdef 기무리 -// if (FAILED(m_pModelCom->Bind_BoneMatrices(i, m_pShaderCom, "g_BoneMatrices"))) { -// return E_FAIL; -// } -//#endif // 기무리 -//#endif // _DEBUG if (FAILED(m_pShaderCom->Bind_Matrices( "g_OffsetMatrix", m_pModelCom->Get_OffsetMatrix(i).data(), diff --git a/Jusin154_Team3D/Client/Private/PlayerRobe.cpp b/Jusin154_Team3D/Client/Private/PlayerRobe.cpp index a1d623676..4503181d7 100644 --- a/Jusin154_Team3D/Client/Private/PlayerRobe.cpp +++ b/Jusin154_Team3D/Client/Private/PlayerRobe.cpp @@ -2,31 +2,21 @@ #include "PlayerRobe.h" #include "GameInstance.h" -CPlayerRobe::CPlayerRobe(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) - : CPartObject(pDevice, pContext) -{ -} - -CPlayerRobe::CPlayerRobe(const CPlayerRobe& Prototype) - : CPartObject(Prototype) -{ -} void CPlayerRobe::Priority_Update(_float fTimeDelta) { #ifdef _DEBUG #ifdef 기무리 + Describe_Entity(); Update_RobeJoints(); #endif // 기무리 - - Describe_Entity(); #endif // _DEBUG } void CPlayerRobe::Update(_float fTimeDelta) { - _matrix SocketMatrixFixed = (XMMatrixRotationZ(XM_PI) * XMLoadFloat4x4(m_pSocketMatrix)) * - XMLoadFloat4x4(m_pParentTransformCom->Get_WorldMatrixPtr()); + _matrix SocketMatrixFixed = (XMMatrixRotationZ(XM_PI) * XMLoadFloat4x4(m_pSocketMatrix)) + * XMLoadFloat4x4(m_pParentTransformCom->Get_WorldMatrixPtr()); m_pRobeMainAnchor->Move_Kinematic(SocketMatrixFixed, false); m_pRobeMainAnchor->Get_Actor()->wakeUp(); @@ -72,29 +62,6 @@ HRESULT CPlayerRobe::Update_RobeSocketPosition() return S_OK; } -HRESULT CPlayerRobe::Helper_RouteJointGenerater(CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC& Desc_Body, ROUTE_DESC& Desc_Route, _matrix* xmAnchorMatricesWorld) -{ - - if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) { - return E_FAIL; - } - m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(xmAnchorMatricesWorld[Desc_Route.iStartBoneIndex].r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true); - - - PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iStartBoneIndex]->Get_Actor(); - PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor(); - PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor(); - - PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y-- - PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++ - - m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose); - - m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose); - - return S_OK; -} - HRESULT CPlayerRobe::Update_LegsPosition() { _matrix WorldMatrix = m_pParentTransformCom->Get_XMWorldMatrix(); @@ -259,98 +226,110 @@ HRESULT CPlayerRobe::Update_RobeJoints() switch (PLAYER_JOINT_ORDER(i)) { /* From Origin */ - case PLAYER_JOINT_ORDER::ORIGIN_TO_RUP_START: - case PLAYER_JOINT_ORDER::ORIGIN_TO_TUP_START: - case PLAYER_JOINT_ORDER::ORIGIN_TO_LUP_START: - m_JointDescriptions[i].iMotionTwist = 1; - m_JointDescriptions[i].iMotionSwing1 = 1; - m_JointDescriptions[i].iMotionSwing2 = 1; - m_JointDescriptions[i].fLinearLimit = 0.f; - m_JointDescriptions[i].fTwistAbsDeg = 0.f; - m_JointDescriptions[i].fSwingDeg = 40.f; - break; - case PLAYER_JOINT_ORDER::ORIGIN_TO_RUP_END: - case PLAYER_JOINT_ORDER::ORIGIN_TO_TUP_END: - case PLAYER_JOINT_ORDER::ORIGIN_TO_LUP_END: - m_JointDescriptions[i].iMotionTwist = 1; - m_JointDescriptions[i].iMotionSwing1 = 1; - m_JointDescriptions[i].iMotionSwing2 = 1; - m_JointDescriptions[i].fLinearLimit = 0.f; - m_JointDescriptions[i].fTwistAbsDeg = 0.f; - m_JointDescriptions[i].fSwingDeg = 40.f; - break; - - + { + case PLAYER_JOINT_ORDER::ORIGIN_TO_RUP_START: + case PLAYER_JOINT_ORDER::ORIGIN_TO_TUP_START: + case PLAYER_JOINT_ORDER::ORIGIN_TO_LUP_START: + case PLAYER_JOINT_ORDER::ORIGIN_TO_RSIDEUP_START: + case PLAYER_JOINT_ORDER::ORIGIN_TO_LSIDEUP_START: + m_JointDescriptions[i].iMotionTwist = 1; + m_JointDescriptions[i].iMotionSwing1 = 1; + m_JointDescriptions[i].iMotionSwing2 = 1; + m_JointDescriptions[i].fLinearLimit = 0.f; + m_JointDescriptions[i].fTwistAbsDeg = 0.f; + m_JointDescriptions[i].fSwingDeg = 40.f; + break; + case PLAYER_JOINT_ORDER::ORIGIN_TO_RUP_END: + case PLAYER_JOINT_ORDER::ORIGIN_TO_TUP_END: + case PLAYER_JOINT_ORDER::ORIGIN_TO_LUP_END: + case PLAYER_JOINT_ORDER::ORIGIN_TO_RSIDEUP_END: + case PLAYER_JOINT_ORDER::ORIGIN_TO_LSIDEUP_END: + m_JointDescriptions[i].iMotionTwist = 1; + m_JointDescriptions[i].iMotionSwing1 = 1; + m_JointDescriptions[i].iMotionSwing2 = 1; + m_JointDescriptions[i].fLinearLimit = 0.f; + m_JointDescriptions[i].fTwistAbsDeg = 0.f; + m_JointDescriptions[i].fSwingDeg = 40.f; + break; + } /* From_Middle */ - case PLAYER_JOINT_ORDER::RUP_TO_RMIDDLE_START: - case PLAYER_JOINT_ORDER::TUP_TO_TMIDDLE_START: - case PLAYER_JOINT_ORDER::LUP_TO_LMIDDLE_START: - m_JointDescriptions[i].iMotionTwist = 0; - m_JointDescriptions[i].iMotionSwing1 = 0; - m_JointDescriptions[i].iMotionSwing2 = 0; - m_JointDescriptions[i].fLinearLimit = 0.f; - m_JointDescriptions[i].fTwistAbsDeg = 0.f; - m_JointDescriptions[i].fSwingDeg = 10.f; - break; - - case PLAYER_JOINT_ORDER::RUP_TO_RMIDDLE_END: - case PLAYER_JOINT_ORDER::TUP_TO_TMIDDLE_END: - case PLAYER_JOINT_ORDER::LUP_TO_LMIDDLE_END: - m_JointDescriptions[i].iMotionTwist = 1; - m_JointDescriptions[i].iMotionSwing1 = 1; - m_JointDescriptions[i].iMotionSwing2 = 1; - m_JointDescriptions[i].fLinearLimit = 0.f; - m_JointDescriptions[i].fSwingDeg = 0.f; - m_JointDescriptions[i].fTwistAbsDeg = 0.f; - - m_JointDescriptions[i].bEnableSlerpDrive = true; - m_JointDescriptions[i].fLinearStiffness = 10.f; - m_JointDescriptions[i].fSlerpDamping = 3.f; - m_JointDescriptions[i].fSlerpForceLimit = 40.f; - m_JointDescriptions[i].bSlerpAccel = true; - break; + { + case PLAYER_JOINT_ORDER::RUP_TO_RMIDDLE_START: + case PLAYER_JOINT_ORDER::TUP_TO_TMIDDLE_START: + case PLAYER_JOINT_ORDER::LUP_TO_LMIDDLE_START: + case PLAYER_JOINT_ORDER::RSIDEUP_TO_RSIDE_START: + case PLAYER_JOINT_ORDER::LSIDEUP_TO_LSIDE_START: + m_JointDescriptions[i].iMotionTwist = 0; + m_JointDescriptions[i].iMotionSwing1 = 0; + m_JointDescriptions[i].iMotionSwing2 = 0; + m_JointDescriptions[i].fLinearLimit = 0.f; + m_JointDescriptions[i].fTwistAbsDeg = 0.f; + m_JointDescriptions[i].fSwingDeg = 10.f; + break; + case PLAYER_JOINT_ORDER::RUP_TO_RMIDDLE_END: + case PLAYER_JOINT_ORDER::TUP_TO_TMIDDLE_END: + case PLAYER_JOINT_ORDER::LUP_TO_LMIDDLE_END: + case PLAYER_JOINT_ORDER::RSIDEUP_TO_RSIDE_END: + case PLAYER_JOINT_ORDER::LSIDEUP_TO_LSIDE_END: + m_JointDescriptions[i].iMotionTwist = 1; + m_JointDescriptions[i].iMotionSwing1 = 1; + m_JointDescriptions[i].iMotionSwing2 = 1; + m_JointDescriptions[i].fLinearLimit = 0.f; + m_JointDescriptions[i].fSwingDeg = 0.f; + m_JointDescriptions[i].fTwistAbsDeg = 0.f; + m_JointDescriptions[i].bEnableSlerpDrive = true; + m_JointDescriptions[i].fLinearStiffness = 10.f; + m_JointDescriptions[i].fSlerpDamping = 3.f; + m_JointDescriptions[i].fSlerpForceLimit = 40.f; + m_JointDescriptions[i].bSlerpAccel = true; + break; + } /* From_Lower */ - case PLAYER_JOINT_ORDER::RMIDDLE_TO_RR_START: - case PLAYER_JOINT_ORDER::RMIDDLE_TO_R_START: - m_JointDescriptions[i].iMotionTwist = 1; - m_JointDescriptions[i].iMotionSwing1 = 1; - m_JointDescriptions[i].iMotionSwing2 = 1; - m_JointDescriptions[i].fLinearLimit = 0.f; - m_JointDescriptions[i].fTwistAbsDeg = 15.f; - m_JointDescriptions[i].fSwingDeg = 15.f; - break; + { + case PLAYER_JOINT_ORDER::RMIDDLE_TO_RR_START: + case PLAYER_JOINT_ORDER::RSIDE_TO_R_START: + m_JointDescriptions[i].iMotionTwist = 1; + m_JointDescriptions[i].iMotionSwing1 = 1; + m_JointDescriptions[i].iMotionSwing2 = 1; + m_JointDescriptions[i].fLinearLimit = 0.f; + m_JointDescriptions[i].fTwistAbsDeg = 15.f; + m_JointDescriptions[i].fSwingDeg = 15.f; + break; - case PLAYER_JOINT_ORDER::RMIDDLE_TO_R_END: - case PLAYER_JOINT_ORDER::RMIDDLE_TO_RR_END: - break; - case PLAYER_JOINT_ORDER::TMIDDLE_TO_TR_START: - case PLAYER_JOINT_ORDER::TMIDDLE_TO_TL_START: - m_JointDescriptions[i].iMotionTwist = 1; - m_JointDescriptions[i].iMotionSwing1 = 1; - m_JointDescriptions[i].iMotionSwing2 = 1; - m_JointDescriptions[i].fLinearLimit = 0.f; - m_JointDescriptions[i].fTwistAbsDeg = 15.f; - m_JointDescriptions[i].fSwingDeg = 15.f; - break; + case PLAYER_JOINT_ORDER::RSIDE_TO_R_END: + case PLAYER_JOINT_ORDER::RMIDDLE_TO_RR_END: + break; - case PLAYER_JOINT_ORDER::TMIDDLE_TO_TR_END: - case PLAYER_JOINT_ORDER::TMIDDLE_TO_TL_END: - break; - case PLAYER_JOINT_ORDER::LMIDDLE_TO_L_START: - case PLAYER_JOINT_ORDER::LMIDDLE_TO_LL_START: - m_JointDescriptions[i].iMotionTwist = 1; - m_JointDescriptions[i].iMotionSwing1 = 1; - m_JointDescriptions[i].iMotionSwing2 = 1; - m_JointDescriptions[i].fLinearLimit = 0.f; - m_JointDescriptions[i].fTwistAbsDeg = 15.f; - m_JointDescriptions[i].fSwingDeg = 15.f; - break; + case PLAYER_JOINT_ORDER::TMIDDLE_TO_TR_START: + case PLAYER_JOINT_ORDER::TMIDDLE_TO_TL_START: + m_JointDescriptions[i].iMotionTwist = 1; + m_JointDescriptions[i].iMotionSwing1 = 1; + m_JointDescriptions[i].iMotionSwing2 = 1; + m_JointDescriptions[i].fLinearLimit = 0.f; + m_JointDescriptions[i].fTwistAbsDeg = 15.f; + m_JointDescriptions[i].fSwingDeg = 15.f; + break; - case PLAYER_JOINT_ORDER::LMIDDLE_TO_L_END: - case PLAYER_JOINT_ORDER::LMIDDLE_TO_LL_END: - break; + case PLAYER_JOINT_ORDER::TMIDDLE_TO_TR_END: + case PLAYER_JOINT_ORDER::TMIDDLE_TO_TL_END: + break; + + case PLAYER_JOINT_ORDER::LSIDE_TO_L_START: + case PLAYER_JOINT_ORDER::LMIDDLE_TO_LL_START: + m_JointDescriptions[i].iMotionTwist = 1; + m_JointDescriptions[i].iMotionSwing1 = 1; + m_JointDescriptions[i].iMotionSwing2 = 1; + m_JointDescriptions[i].fLinearLimit = 0.f; + m_JointDescriptions[i].fTwistAbsDeg = 15.f; + m_JointDescriptions[i].fSwingDeg = 15.f; + break; + + case PLAYER_JOINT_ORDER::LSIDE_TO_L_END: + case PLAYER_JOINT_ORDER::LMIDDLE_TO_LL_END: + break; + } default: break; } @@ -358,423 +337,6 @@ HRESULT CPlayerRobe::Update_RobeJoints() } return S_OK; } -HRESULT CPlayerRobe::Ready_Components() -{ - __super::Ready_Components(nullptr); - - _matrix socketWorld = /*XMMatrixRotationZ(XM_PIDIV2) * */XMLoadFloat4x4(m_pSocketMatrix) * m_pParentTransformCom->Get_XMWorldMatrix(); - _matrix xmAnchorMatricesWorld[ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END)] = { }; - for (_uint iBoneIndex = 0; iBoneIndex < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++iBoneIndex) { - xmAnchorMatricesWorld[iBoneIndex] = XMLoadFloat4x4(&m_ReconstructedJointAnchorMatirces[iBoneIndex]) * socketWorld; - } - - { // - CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; - Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG); - Desc.bAutoOwnerTranslation = false; - if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_Leg"), (CComponent**)&m_pLeftLeg, &Desc))) { - return E_FAIL; - } - } - { // - CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; - Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG); - Desc.bAutoOwnerTranslation = false; - if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_Leg"), (CComponent**)&m_pRightLeg, &Desc))) { - return E_FAIL; - } - } - - { // - CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; - Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG); - Desc.bAutoOwnerTranslation = false; - if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_Leg"), (CComponent**)&m_pLeftThigh, &Desc))) { - return E_FAIL; - } - } - { // - CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; - Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG); - Desc.bAutoOwnerTranslation = false; - if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_Leg"), (CComponent**)&m_pRightThigh, &Desc))) { - return E_FAIL; - } - } - { // - CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; - Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG); - Desc.bAutoOwnerTranslation = false; - if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_LowerBound"), (CComponent**)&m_pLower0Bound, &Desc))) { - return E_FAIL; - } - } - { // - CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; - Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG); - Desc.bAutoOwnerTranslation = false; - if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_LowerBound"), (CComponent**)&m_pLower1Bound, &Desc))) { - return E_FAIL; - } - } - { // RobeSocket - { // Fixed_MainAnchor - CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; - Desc.iSubKind = ENUM_CLASS(PXOBJECT::JOINT_ANCHOR); - Desc.bAutoOwnerTranslation = false; - if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ANCHOR"), (CComponent**)&m_pRobeMainAnchor, &Desc))) { - return E_FAIL; - } - m_pRobeMainAnchor->Set_Kinematic(true); - m_pRobeMainAnchor->Set_Transform(socketWorld, true); -#ifdef _DEBUG - m_pRobeMainAnchor->Set_Name("MainAnchor"); -#endif // _DEBUG - } - // SubAnchors - for (_int i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) { - CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; - Desc.iSubKind = ENUM_CLASS(PXOBJECT::JOINT_ANCHOR); - Desc.bAutoOwnerTranslation = false; - if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ANCHOR"), (CComponent**)&m_pRobeJointAnchor[i], &Desc))) { - return E_FAIL; - } - - m_pRobeJointAnchor[i]->Set_Transform(xmAnchorMatricesWorld[i], true); -#ifdef _DEBUG - m_pRobeJointAnchor[i]->Set_Name(PLAYER_JOINT_BONE_NAMES[i]); -#endif // _DEBUG - } - } - { // RobeRoute - CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc_Body = {}; - ROUTE_DESC Desc_Route = {}; - Desc_Body.bAutoOwnerTranslation = false; - Desc_Body.iSubKind = ENUM_CLASS(PXOBJECT::JOINT_ROUTE); - /*Origin_Linked_Routes*/ - { - { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::ORIGIN_TO_RUP); - Desc_Route.iStartBoneIndex = -1; - Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTUP); - Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_RUP_START); - Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) { - return E_FAIL; - } - m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(socketWorld.r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true); -#ifdef _DEBUG - m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_Name("Origin_Linked_Routes"); -#endif // _DEBUG - { // Joint - PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeMainAnchor->Get_Actor(); - PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor(); - PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor(); - - PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y-- - PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++ - - m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose); - m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose); - } - } - { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::ORIGIN_TO_TUP); - Desc_Route.iStartBoneIndex = -1; - Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILUP); - Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_TUP_START); - Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) { - return E_FAIL; - } - m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(socketWorld.r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true); -#ifdef _DEBUG - m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_Name("Origin_Linked_Routes"); -#endif // _DEBUG - { // Joint - PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeMainAnchor->Get_Actor(); - PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor(); - PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor(); - - PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y-- - PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++ - - m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose); - m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose); - } - } - { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::ORIGIN_TO_LUP); - Desc_Route.iStartBoneIndex = -1; - Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTUP); - Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_LUP_START); - Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) { - return E_FAIL; - } - m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(socketWorld.r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true); -#ifdef _DEBUG - m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_Name("Origin_Linked_Routes"); -#endif // _DEBUG - { // Joint - PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeMainAnchor->Get_Actor(); - PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor(); - PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor(); - - PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y-- - PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++ - - m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose); - m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose); - } - } - } - /*UP_TO_MIDDLE*/ - { - { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::RUP_TO_RMIDDLE); - Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTUP); - Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHT); - Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::RUP_TO_RMIDDLE_START); - Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); - } - { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::TUP_TO_TMIDDLE); - Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILUP); - Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAIL); - Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::TUP_TO_TMIDDLE_START); - Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); - } - { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::LUP_TO_LMIDDLE); - Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTUP); - Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFT); - Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::LUP_TO_LMIDDLE_START); - Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); - } - } - /*MIDDLE_TO_DOWN*/ - { - { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::RMIDDLE_TO_RR); - Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHT); - Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTDOWNRIGHT); - Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::RMIDDLE_TO_RR_START); - Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); - } - { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::RMIDDLE_TO_R); - Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHT); - Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTDOWN); - Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::RMIDDLE_TO_R_START); - Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); - } - { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::TMIDDLE_TO_TR); - Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAIL); - Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILRIGHTDOWN); - Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::TMIDDLE_TO_TR_START); - Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); - } - { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::TMIDDLE_TO_TL); - Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAIL); - Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILLEFTDOWN); - Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::TMIDDLE_TO_TL_START); - Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); - } - { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::LMIDDLE_TO_L); - Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFT); - Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTDOWN); - Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::LMIDDLE_TO_L_START); - Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); - } - { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::LMIDDLE_TO_LL); - Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFT); - Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTDOWNLEFT); - Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::LMIDDLE_TO_LL_START); - Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); - } - } - } - return S_OK; -} - -HRESULT CPlayerRobe::Initialize_Prototype() -{ - return S_OK; -} - -HRESULT CPlayerRobe::Initialize(void* pArg) -{ - PlayerRobe_DESC* pDesc = static_cast (pArg); - m_pSocketMatrix = pDesc->pSocketMatrix; - m_pModelCom = pDesc->pModel; - - m_ReconstructedJointAnchorMatirces.resize(ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END)); - - m_iBoneNum = m_pModelCom->Get_MeshInfluencedBoneNum(ENUM_CLASS(PLAYER_MESH_ORDER::ROBE_CLOTH)); - m_PrevRobeBoneMatrices.resize(m_iBoneNum); - if (FAILED(m_pModelCom->Capture_BoneMatrices(ENUM_CLASS(PLAYER_MESH_ORDER::ROBE_CLOTH), m_PrevRobeBoneMatrices))) { - return E_FAIL; - } - - m_pLeftFootLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("LeftFoot"); - m_pLeftLegLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("LeftLeg"); - m_pRightFootLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("RightFoot"); - m_pRightLegLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("RightLeg"); - - m_pLeftLegUpLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("LeftUpLeg"); - m_pRightLegUpLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("RightUpLeg"); - m_pLower1BoundMatrix = m_pLower0BoundMatrix = m_pModelCom->Get_BoneMatrixPtr("Hips"); - - XMStoreFloat4x4(&m_PreTransformMatrix, XMLoadFloat4x4(m_pModelCom->Get_PreTransformMatrixPtr())); - for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) { - m_RobeJointAnchorMatrices[i] = m_pModelCom->Get_BoneLocalMatrixPtr(PLAYER_JOINT_BONE_NAMES[i]); - } - for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) - { - _uint iParentIndex = UINT_MAX; - _bool bCopyPreTransform = false; - - switch ((PLAYER_JOINT_BONE_ORDER)i) - { - case PLAYER_JOINT_BONE_ORDER::RIGHTUP: - case PLAYER_JOINT_BONE_ORDER::TAILUP: - case PLAYER_JOINT_BONE_ORDER::LEFTUP: - bCopyPreTransform = true; - break; - - case PLAYER_JOINT_BONE_ORDER::RIGHT: - iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTUP); - break; - case PLAYER_JOINT_BONE_ORDER::TAIL: - iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILUP); - break; - case PLAYER_JOINT_BONE_ORDER::LEFT: - iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTUP); - break; - case PLAYER_JOINT_BONE_ORDER::RIGHTDOWNRIGHT: - case PLAYER_JOINT_BONE_ORDER::RIGHTDOWN: - iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHT); - break; - case PLAYER_JOINT_BONE_ORDER::TAILRIGHTDOWN: - case PLAYER_JOINT_BONE_ORDER::TAILLEFTDOWN: - iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAIL); - break; - case PLAYER_JOINT_BONE_ORDER::LEFTDOWN: - case PLAYER_JOINT_BONE_ORDER::LEFTDOWNLEFT: - iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFT); - break; - default: - assert(false); - break; - } - - if (true == bCopyPreTransform) - { - _matrix constructedMatrix = XMLoadFloat4x4(m_RobeJointAnchorMatrices[i]) * XMLoadFloat4x4(&m_PreTransformMatrix); - - XMStoreFloat4x4(&m_ReconstructedJointAnchorMatirces[i], constructedMatrix); - continue; - } - - _matrix constructedMatrix = XMLoadFloat4x4(m_RobeJointAnchorMatrices[i]) - * XMLoadFloat4x4(&m_ReconstructedJointAnchorMatirces[iParentIndex]); - - XMStoreFloat4x4(&m_ReconstructedJointAnchorMatirces[i], constructedMatrix); - } - - if (FAILED(__super::Initialize(pArg))) { - return E_FAIL; - } - - if (FAILED(Ready_Components())) { - return E_FAIL; - } - - D6JOINTDESC JointDesc = D6JOINTDESC(); - for (_uint i = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_RUP_START); i < ENUM_CLASS(PLAYER_JOINT_ORDER::END); ++i) { - JointDesc.ApplyToJoint(*m_pDynamicJoints[i]); - m_JointDescriptions[i] = JointDesc; - } - Update_LegsPosition(); - Update_RobeJoints(); - -#ifdef _DEBUG - m_pSubShape = (GeometricPrimitive::CreateSphere(m_pContext, 0.05f, 22, false, false)); - m_pMainShape = (GeometricPrimitive::CreateCylinder(m_pContext, 0.3f, 0.075f, 22, false)); - D3D11_DEPTH_STENCIL_DESC depthStencilDesc = {}; - depthStencilDesc.DepthEnable = FALSE; - depthStencilDesc.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ZERO; - depthStencilDesc.DepthFunc = D3D11_COMPARISON_ALWAYS; - depthStencilDesc.StencilEnable = FALSE; - - HRESULT result = m_pDevice->CreateDepthStencilState(&depthStencilDesc, &m_pDepthStencilStateNone); - if (FAILED(result)){ - return E_FAIL; - } -#endif // _DEBUG - return S_OK; -} - -CPlayerRobe* CPlayerRobe::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) -{ - CPlayerRobe* pInstance = new CPlayerRobe(pDevice, pContext); - - if (FAILED(pInstance->Initialize_Prototype())) - { - MSG_BOX("Failed to Created : CPlayerRobe"); - SAFE_RELEASE(pInstance); - } - - return pInstance; -} - -CGameObject* CPlayerRobe::Clone(void* pArg, CGameObject* pOwner) -{ - CPlayerRobe* pInstance = new CPlayerRobe(*this); - pInstance->m_pOwner = pOwner; - if (FAILED(pInstance->Initialize(pArg))) - { - MSG_BOX("Failed to Cloned : CPlayerRobe"); - SAFE_RELEASE(pInstance); - } - - return pInstance; -} - -void CPlayerRobe::Free() -{ - __super::Free(); -#ifdef _DEBUG - SAFE_RELEASE(m_pDepthStencilStateNone); -#endif // _DEBUG - SAFE_RELEASE(m_pRightLeg); - SAFE_RELEASE(m_pLeftLeg); - SAFE_RELEASE(m_pRightThigh); - SAFE_RELEASE(m_pLeftThigh); - SAFE_RELEASE(m_pLower0Bound); - SAFE_RELEASE(m_pLower1Bound); - SAFE_RELEASE(m_pRobeMainAnchor); - for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::END); ++i) { - SAFE_RELEASE(m_pRobeJointRoute[i]); - } - for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) { - SAFE_RELEASE(m_pRobeJointAnchor[i]); - } -} #ifdef _DEBUG void CPlayerRobe::Describe_Entity() diff --git a/Jusin154_Team3D/Client/Private/PlayerRobe_Initialize.cpp b/Jusin154_Team3D/Client/Private/PlayerRobe_Initialize.cpp new file mode 100644 index 000000000..75ed8a63a --- /dev/null +++ b/Jusin154_Team3D/Client/Private/PlayerRobe_Initialize.cpp @@ -0,0 +1,511 @@ +#include "pch.h" +#include "PlayerRobe.h" +#include "GameInstance.h" + +CPlayerRobe::CPlayerRobe(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) : CPartObject(pDevice, pContext) { } +CPlayerRobe::CPlayerRobe(const CPlayerRobe& Prototype) : CPartObject(Prototype) { } +HRESULT CPlayerRobe::Helper_RouteJointGenerater(CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC& Desc_Body, ROUTE_DESC& Desc_Route, _matrix* xmAnchorMatricesWorld) +{ + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) { + return E_FAIL; + } + m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(xmAnchorMatricesWorld[Desc_Route.iStartBoneIndex].r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true); + + PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iStartBoneIndex]->Get_Actor(); + PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor(); + PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor(); + + PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y-- + PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++ + + m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose); + m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose); + + return S_OK; +} +HRESULT CPlayerRobe::Ready_Components() +{ + __super::Ready_Components(nullptr); + + _matrix socketWorld = XMLoadFloat4x4(m_pSocketMatrix) * m_pParentTransformCom->Get_XMWorldMatrix(); + _matrix xmAnchorMatricesWorld[ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END)] = { }; + for (_uint iBoneIndex = 0; iBoneIndex < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++iBoneIndex) { + xmAnchorMatricesWorld[iBoneIndex] = XMLoadFloat4x4(&m_ReconstructedJointAnchorMatirces[iBoneIndex]) * socketWorld; + } +#pragma region BASIC_COMP + { // LLEG + CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; + Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG); + Desc.bAutoOwnerTranslation = false; + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_Leg"), (CComponent**)&m_pLeftLeg, &Desc))) { + return E_FAIL; + } + } + { // RLEG + CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; + Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG); + Desc.bAutoOwnerTranslation = false; + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_Leg"), (CComponent**)&m_pRightLeg, &Desc))) { + return E_FAIL; + } + } + + { // LTHIGH + CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; + Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG); + Desc.bAutoOwnerTranslation = false; + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_Leg"), (CComponent**)&m_pLeftThigh, &Desc))) { + return E_FAIL; + } + } + { // RTHIGH + CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; + Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG); + Desc.bAutoOwnerTranslation = false; + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_Leg"), (CComponent**)&m_pRightThigh, &Desc))) { + return E_FAIL; + } + } + { // L0BOUND + CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; + Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG); + Desc.bAutoOwnerTranslation = false; + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_LowerBound"), (CComponent**)&m_pLower0Bound, &Desc))) { + return E_FAIL; + } + } + { // L1BOUND + CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; + Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG); + Desc.bAutoOwnerTranslation = false; + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_LowerBound"), (CComponent**)&m_pLower1Bound, &Desc))) { + return E_FAIL; + } + } +#pragma endregion +#pragma region SOCKET +#pragma region SOCKET_DECLARE + { // RobeSocket + { // Fixed_MainAnchor + CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; + Desc.iSubKind = ENUM_CLASS(PXOBJECT::JOINT_ANCHOR); + Desc.bAutoOwnerTranslation = false; + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ANCHOR"), (CComponent**)&m_pRobeMainAnchor, &Desc))) { + return E_FAIL; + } + m_pRobeMainAnchor->Set_Kinematic(true); + m_pRobeMainAnchor->Set_Transform(socketWorld, true); +#ifdef _DEBUG + m_pRobeMainAnchor->Set_Name("MainAnchor"); +#endif // _DEBUG + } + // SubAnchors + for (_int i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) { + CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; + Desc.iSubKind = ENUM_CLASS(PXOBJECT::JOINT_ANCHOR); + Desc.bAutoOwnerTranslation = false; + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ANCHOR"), (CComponent**)&m_pRobeJointAnchor[i], &Desc))) { + return E_FAIL; + } + + m_pRobeJointAnchor[i]->Set_Transform(xmAnchorMatricesWorld[i], true); +#ifdef _DEBUG + m_pRobeJointAnchor[i]->Set_Name(PLAYER_JOINT_BONE_NAMES[i]); +#endif // _DEBUG + } + } +#pragma endregion + { // RobeRoute + CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc_Body = {}; + ROUTE_DESC Desc_Route = {}; + Desc_Body.bAutoOwnerTranslation = false; + Desc_Body.iSubKind = ENUM_CLASS(PXOBJECT::JOINT_ROUTE); + /*Origin_Linked_Routes*/ + { + { + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::ORIGIN_TO_RUP); + Desc_Route.iStartBoneIndex = -1; + Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTUP); + Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_RUP_START); + Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) { + return E_FAIL; + } + m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(socketWorld.r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true); + { // Joint + PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeMainAnchor->Get_Actor(); + PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor(); + PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor(); + + PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y-- + PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++ + + m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose); + m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose); + } + } + { + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::ORIGIN_TO_TUP); + Desc_Route.iStartBoneIndex = -1; + Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILUP); + Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_TUP_START); + Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) { + return E_FAIL; + } + m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(socketWorld.r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true); + { // Joint + PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeMainAnchor->Get_Actor(); + PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor(); + PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor(); + + PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y-- + PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++ + + m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose); + m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose); + } + } + { + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::ORIGIN_TO_LUP); + Desc_Route.iStartBoneIndex = -1; + Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTUP); + Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_LUP_START); + Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) { + return E_FAIL; + } + m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(socketWorld.r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true); + { // Joint + PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeMainAnchor->Get_Actor(); + PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor(); + PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor(); + + PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y-- + PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++ + + m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose); + m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose); + } + } + { + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::ORIGIN_TO_RSIDEUP); + Desc_Route.iStartBoneIndex = -1; + Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTSIDEUP); + Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_RSIDEUP_START); + Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) { + return E_FAIL; + } + m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(socketWorld.r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true); + { // Joint + PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeMainAnchor->Get_Actor(); + PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor(); + PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor(); + + PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y-- + PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++ + + m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose); + m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose); + } + } + { + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::ORIGIN_TO_LSIDEUP); + Desc_Route.iStartBoneIndex = -1; + Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTSIDEUP); + Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_LSIDEUP_START); + Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) { + return E_FAIL; + } + m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(socketWorld.r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true); + { // Joint + PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeMainAnchor->Get_Actor(); + PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor(); + PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor(); + + PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y-- + PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++ + + m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose); + m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose); + } + } + } + /*UP_TO_MIDDLE*/ + { + { + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::RUP_TO_RMIDDLE); + Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTUP); + Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHT); + Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::RUP_TO_RMIDDLE_START); + Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; + Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); + } + { + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::TUP_TO_TMIDDLE); + Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILUP); + Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAIL); + Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::TUP_TO_TMIDDLE_START); + Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; + Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); + } + { + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::LUP_TO_LMIDDLE); + Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTUP); + Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFT); + Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::LUP_TO_LMIDDLE_START); + Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; + Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); + } + { + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::RSIDEUP_TO_RSIDE); + Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTSIDEUP); + Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTSIDE); + Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::RSIDEUP_TO_RSIDE_START); + Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; + Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); + } + { + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::LSIDEUP_TO_LSIDE); + Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTSIDEUP); + Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTSIDE); + Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::LSIDEUP_TO_LSIDE_START); + Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; + Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); + } + } + /*MIDDLE_TO_DOWN*/ + { + { + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::RMIDDLE_TO_RR); + Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHT); + Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTDOWN); + Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::RMIDDLE_TO_RR_START); + Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; + Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); + } + { + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::RSIDE_TO_R); + Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTSIDE); + Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTDOWNSIDE); + Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::RSIDE_TO_R_START); + Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; + Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); + } + { + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::TMIDDLE_TO_TR); + Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAIL); + Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILRIGHTDOWN); + Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::TMIDDLE_TO_TR_START); + Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; + Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); + } + { + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::TMIDDLE_TO_TL); + Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAIL); + Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILLEFTDOWN); + Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::TMIDDLE_TO_TL_START); + Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; + Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); + } + { + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::LSIDE_TO_L); + Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTSIDE); + Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTDOWNSIDE); + Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::LSIDE_TO_L_START); + Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; + Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); + } + { + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::LMIDDLE_TO_LL); + Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFT); + Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTDOWN); + Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::LMIDDLE_TO_LL_START); + Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; + Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); + } + } + } +#pragma endregion + return S_OK; +} +HRESULT CPlayerRobe::Initialize_Prototype() { return S_OK; } +HRESULT CPlayerRobe::Initialize(void* pArg) +{ + PlayerRobe_DESC* pDesc = static_cast (pArg); + m_pSocketMatrix = pDesc->pSocketMatrix; + m_pModelCom = pDesc->pModel; + + m_ReconstructedJointAnchorMatirces.resize(ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END)); + + m_iBoneNum = m_pModelCom->Get_MeshInfluencedBoneNum(ENUM_CLASS(PLAYER_MESH_ORDER::ROBE_CLOTH)); + m_PrevRobeBoneMatrices.resize(m_iBoneNum); + if (FAILED(m_pModelCom->Capture_BoneMatrices(ENUM_CLASS(PLAYER_MESH_ORDER::ROBE_CLOTH), m_PrevRobeBoneMatrices))) { + return E_FAIL; + } + + // Leg-Thigh + m_pLeftFootLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("LeftFoot"); + m_pLeftLegLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("LeftLeg"); + m_pRightFootLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("RightFoot"); + m_pRightLegLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("RightLeg"); + m_pLeftLegUpLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("LeftUpLeg"); + m_pRightLegUpLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("RightUpLeg"); + + // Circle + m_pLower1BoundMatrix = m_pLower0BoundMatrix = m_pModelCom->Get_BoneMatrixPtr("Hips"); + +#pragma region READY_INITIAL_COMBINED_TRANSFORMATIONMATRIX + XMStoreFloat4x4(&m_PreTransformMatrix, XMLoadFloat4x4(m_pModelCom->Get_PreTransformMatrixPtr())); + for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) { + m_RobeJointAnchorMatrices[i] = m_pModelCom->Get_BoneLocalMatrixPtr(PLAYER_JOINT_BONE_NAMES[i]); + } + for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) + { + _uint iParentIndex = UINT_MAX; + _bool bCopyPreTransform = false; + + switch ((PLAYER_JOINT_BONE_ORDER)i) + { + case PLAYER_JOINT_BONE_ORDER::RIGHTUP: + case PLAYER_JOINT_BONE_ORDER::TAILUP: + case PLAYER_JOINT_BONE_ORDER::LEFTUP: + case PLAYER_JOINT_BONE_ORDER::RIGHTSIDEUP: + case PLAYER_JOINT_BONE_ORDER::LEFTSIDEUP: + bCopyPreTransform = true; + break; + + case PLAYER_JOINT_BONE_ORDER::RIGHT: + iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTUP); + break; + case PLAYER_JOINT_BONE_ORDER::TAIL: + iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILUP); + break; + case PLAYER_JOINT_BONE_ORDER::LEFT: + iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTUP); + break; + case PLAYER_JOINT_BONE_ORDER::RIGHTSIDE: + iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTSIDEUP); + break; + case PLAYER_JOINT_BONE_ORDER::LEFTSIDE: + iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTSIDEUP); + break; + + case PLAYER_JOINT_BONE_ORDER::RIGHTDOWN: + iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHT); + break; + case PLAYER_JOINT_BONE_ORDER::TAILRIGHTDOWN: + case PLAYER_JOINT_BONE_ORDER::TAILLEFTDOWN: + iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAIL); + break; + case PLAYER_JOINT_BONE_ORDER::LEFTDOWN: + iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFT); + break; + case PLAYER_JOINT_BONE_ORDER::RIGHTDOWNSIDE: + iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTSIDE); + break; + case PLAYER_JOINT_BONE_ORDER::LEFTDOWNSIDE: + iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTSIDE); + break; + default: + assert(false); + break; + } + + if (true == bCopyPreTransform) + { + _matrix constructedMatrix = XMLoadFloat4x4(m_RobeJointAnchorMatrices[i]) * XMLoadFloat4x4(&m_PreTransformMatrix); + + XMStoreFloat4x4(&m_ReconstructedJointAnchorMatirces[i], constructedMatrix); + continue; + } + + _matrix constructedMatrix = XMLoadFloat4x4(m_RobeJointAnchorMatrices[i]) + * XMLoadFloat4x4(&m_ReconstructedJointAnchorMatirces[iParentIndex]); + + XMStoreFloat4x4(&m_ReconstructedJointAnchorMatirces[i], constructedMatrix); + } +#pragma endregion + + if (FAILED(__super::Initialize(pArg))) { + return E_FAIL; + } + + if (FAILED(Ready_Components())) { + return E_FAIL; + } + + D6JOINTDESC JointDesc = D6JOINTDESC(); + for (_uint i = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_RUP_START); i < ENUM_CLASS(PLAYER_JOINT_ORDER::END); ++i) { + JointDesc.ApplyToJoint(*m_pDynamicJoints[i]); + m_JointDescriptions[i] = JointDesc; + } + + Update_LegsPosition(); + Update_RobeJoints(); + +#ifdef _DEBUG + m_pSubShape = (GeometricPrimitive::CreateSphere(m_pContext, 0.05f, 22, false, false)); + m_pMainShape = (GeometricPrimitive::CreateCylinder(m_pContext, 0.3f, 0.075f, 22, false)); + D3D11_DEPTH_STENCIL_DESC depthStencilDesc = {}; + depthStencilDesc.DepthEnable = FALSE; + depthStencilDesc.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ZERO; + depthStencilDesc.DepthFunc = D3D11_COMPARISON_ALWAYS; + depthStencilDesc.StencilEnable = FALSE; + + HRESULT result = m_pDevice->CreateDepthStencilState(&depthStencilDesc, &m_pDepthStencilStateNone); + if (FAILED(result)){ + return E_FAIL; + } +#endif // _DEBUG + return S_OK; +} + +CPlayerRobe* CPlayerRobe::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CPlayerRobe* pInstance = new CPlayerRobe(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CPlayerRobe"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CPlayerRobe::Clone(void* pArg, CGameObject* pOwner) +{ + CPlayerRobe* pInstance = new CPlayerRobe(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CPlayerRobe"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CPlayerRobe::Free() +{ + __super::Free(); +#ifdef _DEBUG + SAFE_RELEASE(m_pDepthStencilStateNone); +#endif // _DEBUG + SAFE_RELEASE(m_pRightLeg); + SAFE_RELEASE(m_pLeftLeg); + SAFE_RELEASE(m_pRightThigh); + SAFE_RELEASE(m_pLeftThigh); + SAFE_RELEASE(m_pLower0Bound); + SAFE_RELEASE(m_pLower1Bound); + SAFE_RELEASE(m_pRobeMainAnchor); + for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::END); ++i) { + SAFE_RELEASE(m_pRobeJointRoute[i]); + } + for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) { + SAFE_RELEASE(m_pRobeJointAnchor[i]); + } +} diff --git a/Jusin154_Team3D/Client/Public/Player_ENUM.h b/Jusin154_Team3D/Client/Public/Player_ENUM.h index 7ad5c5a99..b7a757e03 100644 --- a/Jusin154_Team3D/Client/Public/Player_ENUM.h +++ b/Jusin154_Team3D/Client/Public/Player_ENUM.h @@ -23,44 +23,56 @@ enum class PLAYER_MESH_ORDER { END }; -static const _char* PLAYER_JOINT_BONE_NAMES[12] = { +static const _char* PLAYER_JOINT_BONE_NAMES[16] = { "RightUpLeg_Cloth" , "RightLeg_Cloth" , "RightDownLeg_Cloth" - , "RightDownRightLeg_Cloth" , "LeftUpLeg_Cloth" , "LeftLeg_Cloth" , "LeftDownLeg_Cloth" - , "LeftDownLeftLeg_Cloth" , "TailUp_Cloth" , "Tail_Cloth" , "TailLeftDown_Cloth" , "TailRightDown_Cloth" + , "RightSideUpLeg_Cloth" + , "RightSideLeg_Cloth" + , "RightDownSideLeg_Cloth" + + , "LeftSideUpLeg_Cloth" + , "LeftSideLeg_Cloth" + , "LeftDownSideLeg_Cloth" }; enum class PLAYER_JOINT_BONE_ORDER { RIGHTUP , RIGHT , RIGHTDOWN - , RIGHTDOWNRIGHT , LEFTUP , LEFT , LEFTDOWN - , LEFTDOWNLEFT , TAILUP , TAIL , TAILLEFTDOWN , TAILRIGHTDOWN + , RIGHTSIDEUP + , RIGHTSIDE + , RIGHTDOWNSIDE + + , LEFTSIDEUP + , LEFTSIDE + , LEFTDOWNSIDE + , END }; enum class PLAYER_JOINT_ORDER { +#pragma region ORIGIN_TO_UP ORIGIN_TO_RUP_START , ORIGIN_TO_RUP_END @@ -70,7 +82,13 @@ enum class PLAYER_JOINT_ORDER { , ORIGIN_TO_LUP_START , ORIGIN_TO_LUP_END - + , ORIGIN_TO_RSIDEUP_START + , ORIGIN_TO_RSIDEUP_END + + , ORIGIN_TO_LSIDEUP_START + , ORIGIN_TO_LSIDEUP_END +#pragma endregion +#pragma region UP_TO_MIDDLE , RUP_TO_RMIDDLE_START , RUP_TO_RMIDDLE_END @@ -80,26 +98,39 @@ enum class PLAYER_JOINT_ORDER { , LUP_TO_LMIDDLE_START , LUP_TO_LMIDDLE_END + , RSIDEUP_TO_RSIDE_START + , RSIDEUP_TO_RSIDE_END + , LSIDEUP_TO_LSIDE_START + , LSIDEUP_TO_LSIDE_END +#pragma endregion +#pragma region MIDDLE_TO_BOTTOM , RMIDDLE_TO_RR_START , RMIDDLE_TO_RR_END - , RMIDDLE_TO_R_START - , RMIDDLE_TO_R_END - , TMIDDLE_TO_TR_START , TMIDDLE_TO_TR_END , TMIDDLE_TO_TL_START , TMIDDLE_TO_TL_END - , LMIDDLE_TO_L_START - , LMIDDLE_TO_L_END - , LMIDDLE_TO_LL_START , LMIDDLE_TO_LL_END + , RSIDE_TO_R_START + , RSIDE_TO_R_END + , LSIDE_TO_L_START + , LSIDE_TO_L_END +#pragma endregion +#pragma region ORIGIN_HORIZONTAL +#pragma endregion +#pragma region UP_HORIZONTAL +#pragma endregion +#pragma region MIDDLE_HORIZONTAL +#pragma endregion +#pragma region DOWN_HORIZONTAL +#pragma endregion , END }; @@ -107,17 +138,24 @@ enum class PLAYER_JOINT_ROUTE_ORDER { ORIGIN_TO_RUP , ORIGIN_TO_TUP , ORIGIN_TO_LUP + , ORIGIN_TO_RSIDEUP + , ORIGIN_TO_LSIDEUP , RUP_TO_RMIDDLE , TUP_TO_TMIDDLE , LUP_TO_LMIDDLE + , RSIDEUP_TO_RSIDE + , LSIDEUP_TO_LSIDE + , RMIDDLE_TO_RR - , RMIDDLE_TO_R , TMIDDLE_TO_TR , TMIDDLE_TO_TL - , LMIDDLE_TO_L , LMIDDLE_TO_LL + + , RSIDE_TO_R + , LSIDE_TO_L + , END }; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable.bin index 401c670b0..a4c4758f5 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:19fe722384b732f55bddc9ac5d09f0d50c2a81c76bd7b8c580378f6fa077ca92 -size 10364804 +oid sha256:87c758a2826671b83278e10f317fa5da1f6d9e5f95d18a354e0462b434dd003c +size 10396801 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable.fbx index bb404edba..426160853 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable.fbx +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:32213c93d4cc6a61dd1bfcdb4193bfa76ddb1df6446e1ab1dfeab4d5ff522efd -size 5730924 +oid sha256:01136f9f94eb8740cca6eab949a12b71aafcf8a3c8d095c24d000151702e538e +size 5782684 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_AvadaKedavra.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_AvadaKedavra.bin index 84a67412b..b677974e7 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_AvadaKedavra.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_AvadaKedavra.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5de12debaa365a050c382275f3f5ea6f0d1837fb91455f97ec7ed6664ca0a125 -size 10647812 +oid sha256:c0340a8a0b08502e6b931b479aca9dae73719a434dbd30d731efea04278e8e7f +size 10680526 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_AvadaKedavra.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_AvadaKedavra.fbx index 421a1ac9e..e4bffd1e6 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_AvadaKedavra.fbx +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_AvadaKedavra.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:78fb82fcf96c82e6150fcbb64add88abc6bc7c622c4b3eee282fe75c3aaf438e -size 6313116 +oid sha256:f3c4a07825d551440d37c0eb56c56528c5cf729eda1b0e8d961b16ceee36f9aa +size 6535596 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Bm.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Bm.bin index 87e386e1e..fd9b2e2d0 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Bm.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Bm.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d6603be4f8c20ac9d35068a179b14d328d2e3ed8606cbbe4ff485ee20860c0e8 -size 171707390 +oid sha256:9f284800b9984ead6d6492da61715e4b4614da55252049f8afc4ff2a73d634b2 +size 172156085 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Bm.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Bm.fbx index a9917c355..4290f0588 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Bm.fbx +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Bm.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a4b060e3740116655157dcef4e1c24be46ef19e135bee51f1f226c8e67f92553 -size 483257372 +oid sha256:04af77e6fd573fb448d78a4afccd218b9940479fcaef46e375499a3374a4c326 +size 496538684 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Broom.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Broom.bin index d0c17e284..4daef16ff 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Broom.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Broom.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1d7c2c35f74162db556b2ffc41430330758f2663ff74789a9df08228ed384de7 -size 23075473 +oid sha256:00dd067d5e97d20be5f8e0fbe544ba7018305af8f6b7192a5bbacc1453d37450 +size 23190066 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Broom.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Broom.fbx index 16f03d476..90c7123a8 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Broom.fbx +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Broom.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0ad3ae0879799efcc14fb85e27aadb253deb42262d583646d59e96e0e4971891 -size 56931356 +oid sha256:546136e613a6efd35ab9db1e22a97373147f20f3b4831ca2ef8a869b94084afa +size 58621516 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Cmbt.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Cmbt.bin index 4cfeee79b..6445f6267 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Cmbt.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Cmbt.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d11392338e9b08f59daf4a89c6314c909324db9b8cd12eed44b9d54f0f38024a -size 69331867 +oid sha256:2265a7cb220bc45acf8bec67f8eb3855d48d4a71260f6866277bd93b286286f5 +size 69510580 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Cmbt.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Cmbt.fbx index a6552e63f..a0caadcf2 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Cmbt.fbx +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Cmbt.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3852584ae91ce78b9c3299e91ea1639afa69ce3fddb78fa301aec277ecdfd796 -size 182598812 +oid sha256:46bb4f14c6166fcb966998ab1688f933776a5c0bed07bd6278a0f7c3d1f9f5fb +size 187629004 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Lightning.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Lightning.bin index 04d63a307..07b783c00 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Lightning.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Lightning.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5530b986c6bd101b5e3eda8eb5631594b07a071886f7708b69494730193fd8de -size 10807972 +oid sha256:fc989ee8bef63e3c178ea47dc22742580f0a43c254e3bb0328e2e60a4dc66275 +size 10839386 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Lightning.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Lightning.fbx index f087a226a..a6a50a1ed 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Lightning.fbx +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Lightning.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8a95ec0fd1c0b1991083fd21c0fb2a87d6126400acde22ef97a6df438b1c5d3c -size 6401564 +oid sha256:424e5eb5fdf67d1e9ab6d26a22daf433c490ebef787013e31ef934621dc9378f +size 6622524 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Protego.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Protego.bin index d005baddb..33eaa83ba 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Protego.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Protego.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cf4c2fc354b8fe220a85cf2a4766aca198966d2afe06b99ea15b60520b3d600d -size 11563567 +oid sha256:cd9ef6d0085b5b5aa114f93658bd677b2f6e63166c7040a8b0f41d590fd1d598 +size 11599528 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Protego.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Protego.fbx index 17ee917fe..53d4ae88d 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Protego.fbx +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Protego.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9344cd73993ca5a9979005e4a2d6602afd495ce1a665b6693807ffc8288891bb -size 10960124 +oid sha256:d09ce4044856db084f1c27d202ce2ef8ec39caab390090c39cfea58682335f5e +size 11317660 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Rct.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Rct.bin index d3c6afa9c..6d3d26444 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Rct.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Rct.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fed83d790ce5ec13ed5cf7acd245ac38b3a86658e52c72d7c8d3424d86d500f7 -size 60651350 +oid sha256:0c2b15b19dbd5e9cac30f8dd7a0503697fefb8ba7670a0517fa76a92f1e39dd9 +size 60872730 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Rct.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Rct.fbx index e8fc6d273..d334a4453 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Rct.fbx +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Rct.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c15071ebf86e8c4688d6f252de7b50487cb1454bc5e7ca5231334ac0d5546d64 -size 157682572 +oid sha256:97b6f3b412d2efaee517a4957e733bd10fa4ec2cce0cfc2ab7849f189cac1ab4 +size 162112268 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Sneak.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Sneak.bin index 3f55b79df..78b0c122c 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Sneak.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Sneak.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1d369879ae3846d1bb1779818b025a714b9412cb4a7faaa238c6b862f7bdd0ec -size 19489076 +oid sha256:c014c7879bd0bf784b52c41103c914e36ccd342a19fe774d14a76db339b10406 +size 19553373 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Sneak.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Sneak.fbx index 8e0194c1e..fdeecd83d 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Sneak.fbx +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Sneak.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:068105d25b85bbd235d0be09005cfa7d4a2938571965019ad3459dcaa3133360 -size 41111868 +oid sha256:9a0f699ca4bd2b3fc8fe6fa488eb603e57571dcb997d415e3773959bcff3c376 +size 42318204 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Spawn.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Spawn.bin index 8173f74c8..8e2669fc2 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Spawn.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Spawn.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:97a3468fa1372811a36391ffece957b786dcf633ec84b6bb1ded222e89bca6d9 -size 15496127 +oid sha256:7cd902991cc0e07a13d661ff082063c4d91d05558745e22fd55b6236534657ce +size 15532953 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Spawn.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Spawn.fbx index 4f53e5320..cd212311b 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Spawn.fbx +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Spawn.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7c57f4192cd1cc660c7975d3d0c2e73680f55257a48c3d6ef6965e3290b19c0e -size 13271484 +oid sha256:0c6ea3057be2b0b2b79a9f68b04a50c57d2aafd511248eb5f45fbcacae41bf94 +size 13646412 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Spell_Learning.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Spell_Learning.bin index f3654b2ae..6f211a32d 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Spell_Learning.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Spell_Learning.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e6cdba1d2a122702abe7704d60fe38a1fed7d33020713ad0478ca5374681651d -size 12209325 +oid sha256:16a8a368648f0a2a465e60be2594f116a9e5c8fd66756f68472f2da90518953b +size 12244771 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Spell_Learning.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Spell_Learning.fbx index a2146657d..bd8c2f8b9 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Spell_Learning.fbx +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Spell_Learning.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dfdb7b6f61c64274ea30443d94497b20db204a7c9e82154980154b16af194e6d -size 9383916 +oid sha256:4d1815739ab986871b4e43dc9a93594acebd8734f3cb0d18f58ea598e0322479 +size 9683692 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll.xml b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll.xml index d24083c9d..6934e9717 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll.xml +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll.xml @@ -173,7 +173,7 @@ - + diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_NPC_PBR_Anim.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_NPC_PBR_Anim.hlsl index 27f9a031b..88775ff78 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_NPC_PBR_Anim.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_NPC_PBR_Anim.hlsl @@ -201,7 +201,7 @@ VS_OUT VS_MAIN_LEGACY(VS_IN In) matrix TempBoneMatrix = (matrix) 0; int MinIdx = 30; - int MaxIdx = 41; + int MaxIdx = 45; if (idx.x >= MinIdx && idx.x <= MaxIdx) //g_RobeBoneMask[idx.x] == 1) diff --git a/Jusin154_Team3D/Editor/Private/Level_ObjectViewer.cpp b/Jusin154_Team3D/Editor/Private/Level_ObjectViewer.cpp index 86d6b9861..e8c5da63e 100644 --- a/Jusin154_Team3D/Editor/Private/Level_ObjectViewer.cpp +++ b/Jusin154_Team3D/Editor/Private/Level_ObjectViewer.cpp @@ -764,8 +764,8 @@ HRESULT CLevel_ObjectViewer::Ready_Layer_Dummy(const _wstring& strLayerTag) return E_FAIL; } - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag, nullptr, nullptr, &m_Test))) - return E_FAIL; + //if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag, nullptr, nullptr, &m_Test))) + // return E_FAIL; if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_CUBE))) return E_FAIL; diff --git a/Jusin154_Team3D/Editor/Private/Loader_ObjectViewer.cpp b/Jusin154_Team3D/Editor/Private/Loader_ObjectViewer.cpp index 8c26560ec..9c54c78be 100644 --- a/Jusin154_Team3D/Editor/Private/Loader_ObjectViewer.cpp +++ b/Jusin154_Team3D/Editor/Private/Loader_ObjectViewer.cpp @@ -100,9 +100,9 @@ HRESULT CLoader::Loading_For_ObjectViewer() CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/GoblinSpector/GoblinSpector.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) return E_FAIL; - //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Playable_Model"), - // CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable.bin", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) - // return E_FAIL; + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Playable_Model"), + CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable.bin", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) + return E_FAIL; futures.emplace_back(Deferred_ModelLoad( MODEL::ANIM, "../Bin/Resources/Models/Monster/TombProtector/TombProtector.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixIdentity(), @@ -206,12 +206,12 @@ HRESULT CLoader::Loading_For_ObjectViewer() return E_FAIL; futures.emplace_back(Deferred_ModelLoad( - MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable.bin", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable.fbx", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(), TEXT("Prototype_Component_Playable_Model") )); //futures.emplace_back(Deferred_ModelLoad( - // MODEL::ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable_Rct.fbx", XMMatrixIdentity(), + // MODEL::ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable_Cmbt.fbx", XMMatrixIdentity(), // TEXT("Prototype_Component_Student_Cmbt_Model") //)); diff --git a/Jusin154_Team3D/Engine/Private/GameInstance.cpp b/Jusin154_Team3D/Engine/Private/GameInstance.cpp index b19fbb64d..ff96a4ad3 100644 --- a/Jusin154_Team3D/Engine/Private/GameInstance.cpp +++ b/Jusin154_Team3D/Engine/Private/GameInstance.cpp @@ -1073,6 +1073,10 @@ PSX::PxD6Joint* CGameInstance::Create_BasicPxD6Joint(PSX::PxRigidDynamic* pActor { return m_pPhysX_Manager->Create_BasicPxD6Joint(pActor0, pActor1, pxJointWorldPos); } +PSX::PxFixedJoint* CGameInstance::Create_BasicPxFixedJoint(PSX::PxRigidDynamic* pActor0, PSX::PxRigidDynamic* pActor1, const PSX::PxTransform& pxJointWorldPos) +{ + return m_pPhysX_Manager->Create_BasicPxFixedJoint(pActor0, pActor0, pxJointWorldPos); +} _bool CGameInstance::SphereCast(_float fRadius, _float3 vStartPos, _float3 vDir, _float fDistance, PSX::PxHitFlags flagHitsData, PSX::PxQueryFlags flagQuery, PSX::PxSweepBuffer& hitBuffer) { return m_pPhysX_Manager->SphereCast(fRadius, vStartPos, vDir, fDistance, flagHitsData, flagQuery, hitBuffer); diff --git a/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp b/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp index a6a4cc748..7a33dd237 100644 --- a/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp +++ b/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp @@ -169,6 +169,12 @@ PSX::PxJoint* CPhysX_Manager::Create_PxJoint(PHYSX_JOINT eType, PSX::PxRigidActo pOut = pJoint; } break; + case PHYSX_JOINT::FIXED: + { + PSX::PxFixedJoint* pJoint = PSX::PxFixedJointCreate(*m_pPhysics, pActor0, pxLocalFrame0, pActor1, pxLocalFrame1); + pOut = pJoint; + } + break; default: break; } @@ -198,20 +204,6 @@ PSX::PxD6Joint* CPhysX_Manager::Create_BasicPxD6Joint(PSX::PxRigidDynamic* pActo pActor1->setSolverIterationCounts(4, 1); #endif // 기무리 - pJoint->setMotion(PSX::PxD6Axis::eX, PSX::PxD6Motion::eLOCKED); - pJoint->setMotion(PSX::PxD6Axis::eY, PSX::PxD6Motion::eLOCKED); - pJoint->setMotion(PSX::PxD6Axis::eZ, PSX::PxD6Motion::eLOCKED); - pJoint->setMotion(PSX::PxD6Axis::eTWIST, PSX::PxD6Motion::eLIMITED); - pJoint->setMotion(PSX::PxD6Axis::eSWING1, PSX::PxD6Motion::eLIMITED); - pJoint->setMotion(PSX::PxD6Axis::eSWING2, PSX::PxD6Motion::eLIMITED); - - - pJoint->setTwistLimit(PSX::PxJointAngularLimitPair(-XMConvertToRadians(1.f), XMConvertToRadians(1.f))); // 20도 - pJoint->setSwingLimit(PSX::PxJointLimitCone(XMConvertToRadians(1.f), XMConvertToRadians(1.f))); - - pJoint->setDrive(PSX::PxD6Drive::eSLERP, PSX::PxD6JointDrive(50.0f, 100.0f, FLT_MAX, true)); - pJoint->setDrivePosition(PSX::PxTransform(PSX::PxIdentity)); //생성 시 프레임 기준 - pJoint->setConstraintFlag(PSX::PxConstraintFlag::eVISUALIZATION, true); pJoint->setConstraintFlag(PSX::PxConstraintFlag::eIMPROVED_SLERP, true); pJoint->setConstraintFlag(PSX::PxConstraintFlag::eCOLLISION_ENABLED, false); @@ -220,6 +212,23 @@ PSX::PxD6Joint* CPhysX_Manager::Create_BasicPxD6Joint(PSX::PxRigidDynamic* pActo return pJoint; } +PSX::PxFixedJoint* CPhysX_Manager::Create_BasicPxFixedJoint(PSX::PxRigidDynamic* pActor0, PSX::PxRigidDynamic* pActor1, const PSX::PxTransform& pxJointWorldPos) +{ + const PSX::PxTransform pxWorldParentPos = pActor0->getGlobalPose(); + const PSX::PxTransform pxWorldChildPos = pActor1->getGlobalPose(); + + const PSX::PxTransform pxLocalParentPOs = pxWorldParentPos.transformInv(pxJointWorldPos); + const PSX::PxTransform pxLocalChildPos = pxWorldChildPos.transformInv(pxJointWorldPos); + + PSX::PxFixedJoint* pJoint = PSX::PxFixedJointCreate(*m_pPhysics, pActor0, pxLocalParentPOs, pActor1, pxLocalChildPos); + + pJoint->setConstraintFlag(PSX::PxConstraintFlag::eVISUALIZATION, true); + pJoint->setConstraintFlag(PSX::PxConstraintFlag::eCOLLISION_ENABLED, false); + + pJoint->setBreakForce(1e30f, 1e30f); + return pJoint; +} + PSX::PxMaterial* CPhysX_Manager::Create_Material(const _float3* vMatInfo) { PSX::PxMaterial* pPxMaterial = m_pPhysics->createMaterial(vMatInfo->x, vMatInfo->y, vMatInfo->z); diff --git a/Jusin154_Team3D/Engine/Public/Engine_Enum.h b/Jusin154_Team3D/Engine/Public/Engine_Enum.h index 0677fe0b0..592d6b08a 100644 --- a/Jusin154_Team3D/Engine/Public/Engine_Enum.h +++ b/Jusin154_Team3D/Engine/Public/Engine_Enum.h @@ -122,6 +122,7 @@ enum class PHYSX_JOINT { D6, DISTANCE, REVOLUTE, + FIXED, END }; diff --git a/Jusin154_Team3D/Engine/Public/GameInstance.h b/Jusin154_Team3D/Engine/Public/GameInstance.h index 748f6d6e3..93c09817e 100644 --- a/Jusin154_Team3D/Engine/Public/GameInstance.h +++ b/Jusin154_Team3D/Engine/Public/GameInstance.h @@ -220,6 +220,7 @@ class ENGINE_DLL CGameInstance final : public CBase PSX::PxRigidStatic* Add_StaticActor(CRigidBody_Static& RigidBody, _uint iLevel); PSX::PxJoint* Create_PxJoint(PHYSX_JOINT eType, PSX::PxRigidActor* pActor0, PSX::PxTransform& pxLocalFrame0, PSX::PxRigidActor* pActor1, PSX::PxTransform& pxLocalFrame1); PSX::PxD6Joint* Create_BasicPxD6Joint(PSX::PxRigidDynamic* pActor0, PSX::PxRigidDynamic* pActor1, const PSX::PxTransform& pxJointWorldPos); + PSX::PxFixedJoint* Create_BasicPxFixedJoint(PSX::PxRigidDynamic* pActor0, PSX::PxRigidDynamic* pActor1, const PSX::PxTransform& pxJointWorldPos); _bool SphereCast(_float fRadius, _float3 vStartPos, _float3 vDir, _float fDistance, PSX::PxHitFlags flagHitsData, PSX::PxQueryFlags flagQuery, PSX::PxSweepBuffer& hitBuffer); _bool SphereCast(_float fRadius, _fvector vStartPos, _gvector vDir, _float fDistance, PSX::PxHitFlags flagHitsData, PSX::PxQueryFlags flagQuery, PSX::PxSweepBuffer& hitBuffer); diff --git a/Jusin154_Team3D/Engine/Public/Model.h b/Jusin154_Team3D/Engine/Public/Model.h index 7f6ef92b9..700274b36 100644 --- a/Jusin154_Team3D/Engine/Public/Model.h +++ b/Jusin154_Team3D/Engine/Public/Model.h @@ -197,7 +197,7 @@ class ENGINE_DLL CModel final : public CComponent _float m_fRatio = {}; _int m_iCurrSecondAnimIndex = { -1 }; - _int m_iBoneIndex[ENUM_CLASS(BLEND_BONE::END)] = { -1,-1,-1,-1,-1,-1,-1,-1 }; + _int m_iBoneIndex[ENUM_CLASS(BLEND_BONE::END)] = { -1,-1,-1,-1, -1,-1,-1,-1 }; vector> m_BoneMask; vector<_bool> m_CPUBoneMask; diff --git a/Jusin154_Team3D/Engine/Public/PhysX_Manager.h b/Jusin154_Team3D/Engine/Public/PhysX_Manager.h index 2d2d57264..caa617918 100644 --- a/Jusin154_Team3D/Engine/Public/PhysX_Manager.h +++ b/Jusin154_Team3D/Engine/Public/PhysX_Manager.h @@ -37,6 +37,7 @@ class CPhysX_Manager final : public CBase // https://documentation.help/nvidia-physx-sdk-guide/Joints.html PSX::PxJoint* Create_PxJoint(PHYSX_JOINT eType, PSX::PxRigidActor* pActor0, PSX::PxTransform& pxLocalFrame0, PSX::PxRigidActor* pActor1, PSX::PxTransform& pxLocalFrame1); PSX::PxD6Joint* Create_BasicPxD6Joint(PSX::PxRigidDynamic* pActor0, PSX::PxRigidDynamic* pActor1, const PSX::PxTransform& pxJointWorldPos); + PSX::PxFixedJoint* Create_BasicPxFixedJoint(PSX::PxRigidDynamic* pActor0, PSX::PxRigidDynamic* pActor1, const PSX::PxTransform& pxJointWorldPos); void RegistTriMesh(const _char* pName, PSX::PxTriangleMesh* pPxTriMesh, _uint iLevel); void RegistHeight(const _tchar* pName, PSX::PxHeightFieldDesc& Desc, _uint iLevel); From c6fdb4a328ea18c70e014697bb09c4793ede862b Mon Sep 17 00:00:00 2001 From: kimnuri Date: Sat, 3 Jan 2026 15:03:23 +0900 Subject: [PATCH 3/9] [add] RobeInitializer --- Jusin154_Team3D/Client/Private/PlayerRobe.cpp | 4 ++ .../Client/Private/PlayerRobe_Initialize.cpp | 43 +++++++++++++------ Jusin154_Team3D/Client/Public/PlayerRobe.h | 4 +- Jusin154_Team3D/Client/Public/Player_ENUM.h | 26 ++++++++++- 4 files changed, 59 insertions(+), 18 deletions(-) diff --git a/Jusin154_Team3D/Client/Private/PlayerRobe.cpp b/Jusin154_Team3D/Client/Private/PlayerRobe.cpp index 4503181d7..c5bc45195 100644 --- a/Jusin154_Team3D/Client/Private/PlayerRobe.cpp +++ b/Jusin154_Team3D/Client/Private/PlayerRobe.cpp @@ -333,6 +333,10 @@ HRESULT CPlayerRobe::Update_RobeJoints() default: break; } + + //m_JointDescriptions[i].iMotionTwist = 0; + //m_JointDescriptions[i].iMotionSwing1 = 0; + //m_JointDescriptions[i].iMotionSwing2 = 0; m_JointDescriptions[i].ApplyToJoint(*m_pDynamicJoints[i]); } return S_OK; diff --git a/Jusin154_Team3D/Client/Private/PlayerRobe_Initialize.cpp b/Jusin154_Team3D/Client/Private/PlayerRobe_Initialize.cpp index 75ed8a63a..3ae8fa796 100644 --- a/Jusin154_Team3D/Client/Private/PlayerRobe_Initialize.cpp +++ b/Jusin154_Team3D/Client/Private/PlayerRobe_Initialize.cpp @@ -4,7 +4,7 @@ CPlayerRobe::CPlayerRobe(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) : CPartObject(pDevice, pContext) { } CPlayerRobe::CPlayerRobe(const CPlayerRobe& Prototype) : CPartObject(Prototype) { } -HRESULT CPlayerRobe::Helper_RouteJointGenerater(CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC& Desc_Body, ROUTE_DESC& Desc_Route, _matrix* xmAnchorMatricesWorld) +HRESULT CPlayerRobe::Helper_RouteJointGenerater(PHYSX_JOINT eType, CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC& Desc_Body, ROUTE_DESC& Desc_Route, _matrix* xmAnchorMatricesWorld) { if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) { return E_FAIL; @@ -18,8 +18,15 @@ HRESULT CPlayerRobe::Helper_RouteJointGenerater(CRigidBody_Dynamic::RIGIDBODY_DY PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y-- PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++ - m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose); - m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose); + if (PHYSX_JOINT::D6 == eType) { + m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose); + m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose); + } + else if (PHYSX_JOINT::FIXED == eType) { + m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxFixedJoint(startAnchorRigidActor, routeRigidActor, startJointWorldPose); + m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxFixedJoint(routeRigidActor, endAnchorRigidActor, endJointWorldPose); + } + return S_OK; } @@ -241,7 +248,7 @@ HRESULT CPlayerRobe::Ready_Components() Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHT); Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::RUP_TO_RMIDDLE_START); Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); + Helper_RouteJointGenerater(PHYSX_JOINT::D6, Desc_Body, Desc_Route, xmAnchorMatricesWorld); } { Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::TUP_TO_TMIDDLE); @@ -249,7 +256,7 @@ HRESULT CPlayerRobe::Ready_Components() Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAIL); Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::TUP_TO_TMIDDLE_START); Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); + Helper_RouteJointGenerater(PHYSX_JOINT::D6, Desc_Body, Desc_Route, xmAnchorMatricesWorld); } { Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::LUP_TO_LMIDDLE); @@ -257,7 +264,7 @@ HRESULT CPlayerRobe::Ready_Components() Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFT); Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::LUP_TO_LMIDDLE_START); Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); + Helper_RouteJointGenerater(PHYSX_JOINT::D6, Desc_Body, Desc_Route, xmAnchorMatricesWorld); } { Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::RSIDEUP_TO_RSIDE); @@ -265,7 +272,7 @@ HRESULT CPlayerRobe::Ready_Components() Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTSIDE); Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::RSIDEUP_TO_RSIDE_START); Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); + Helper_RouteJointGenerater(PHYSX_JOINT::D6, Desc_Body, Desc_Route, xmAnchorMatricesWorld); } { Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::LSIDEUP_TO_LSIDE); @@ -273,7 +280,7 @@ HRESULT CPlayerRobe::Ready_Components() Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTSIDE); Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::LSIDEUP_TO_LSIDE_START); Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); + Helper_RouteJointGenerater(PHYSX_JOINT::D6, Desc_Body, Desc_Route, xmAnchorMatricesWorld); } } /*MIDDLE_TO_DOWN*/ @@ -284,7 +291,7 @@ HRESULT CPlayerRobe::Ready_Components() Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTDOWN); Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::RMIDDLE_TO_RR_START); Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); + Helper_RouteJointGenerater(PHYSX_JOINT::D6, Desc_Body, Desc_Route, xmAnchorMatricesWorld); } { Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::RSIDE_TO_R); @@ -292,7 +299,7 @@ HRESULT CPlayerRobe::Ready_Components() Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTDOWNSIDE); Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::RSIDE_TO_R_START); Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); + Helper_RouteJointGenerater(PHYSX_JOINT::D6, Desc_Body, Desc_Route, xmAnchorMatricesWorld); } { Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::TMIDDLE_TO_TR); @@ -300,7 +307,7 @@ HRESULT CPlayerRobe::Ready_Components() Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILRIGHTDOWN); Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::TMIDDLE_TO_TR_START); Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); + Helper_RouteJointGenerater(PHYSX_JOINT::D6, Desc_Body, Desc_Route, xmAnchorMatricesWorld); } { Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::TMIDDLE_TO_TL); @@ -308,7 +315,7 @@ HRESULT CPlayerRobe::Ready_Components() Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILLEFTDOWN); Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::TMIDDLE_TO_TL_START); Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); + Helper_RouteJointGenerater(PHYSX_JOINT::D6, Desc_Body, Desc_Route, xmAnchorMatricesWorld); } { Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::LSIDE_TO_L); @@ -316,7 +323,7 @@ HRESULT CPlayerRobe::Ready_Components() Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTDOWNSIDE); Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::LSIDE_TO_L_START); Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); + Helper_RouteJointGenerater(PHYSX_JOINT::D6, Desc_Body, Desc_Route, xmAnchorMatricesWorld); } { Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::LMIDDLE_TO_LL); @@ -324,7 +331,15 @@ HRESULT CPlayerRobe::Ready_Components() Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTDOWN); Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::LMIDDLE_TO_LL_START); Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); + Helper_RouteJointGenerater(PHYSX_JOINT::D6, Desc_Body, Desc_Route, xmAnchorMatricesWorld); + } + { + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::LMIDDLE_TO_LL); + Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFT); + Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTDOWN); + Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::LMIDDLE_TO_LL_START); + Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; + Helper_RouteJointGenerater(PHYSX_JOINT::D6, Desc_Body, Desc_Route, xmAnchorMatricesWorld); } } } diff --git a/Jusin154_Team3D/Client/Public/PlayerRobe.h b/Jusin154_Team3D/Client/Public/PlayerRobe.h index 95749f8fa..4e848e756 100644 --- a/Jusin154_Team3D/Client/Public/PlayerRobe.h +++ b/Jusin154_Team3D/Client/Public/PlayerRobe.h @@ -61,7 +61,7 @@ class CPlayerRobe final : public CPartObject CRigidBody_Dynamic* m_pRobeMainAnchor = { nullptr }; CRigidBody_Dynamic* m_pRobeJointRoute[ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::END)] = { nullptr }; CRigidBody_Dynamic* m_pRobeJointAnchor[ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END)] = { nullptr }; - PSX::PxD6Joint* m_pDynamicJoints[ENUM_CLASS(PLAYER_JOINT_ORDER::END)] = { nullptr }; + PSX::PxJoint* m_pDynamicJoints[ENUM_CLASS(PLAYER_JOINT_ORDER::END)] = { nullptr }; D6JOINTDESC m_JointDescriptions[ENUM_CLASS(PLAYER_JOINT_ORDER::END)] = { }; vector<_float4x4> m_PrevRobeBoneMatrices = { }; @@ -82,7 +82,7 @@ class CPlayerRobe final : public CPartObject HRESULT Bind_ShaderResources() { return S_OK; } HRESULT Update_LegsPosition(); - HRESULT Helper_RouteJointGenerater(CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC& Desc_Body, ROUTE_DESC& Desc_Route, _matrix* xmAnchorMatricesWorld); + HRESULT Helper_RouteJointGenerater(PHYSX_JOINT eType, CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC& Desc_Body, ROUTE_DESC& Desc_Route, _matrix* xmAnchorMatricesWorld); HRESULT Update_RobeJoints(); #ifdef _DEBUG HRESULT Render_BonePhysX(); diff --git a/Jusin154_Team3D/Client/Public/Player_ENUM.h b/Jusin154_Team3D/Client/Public/Player_ENUM.h index b7a757e03..4ad529593 100644 --- a/Jusin154_Team3D/Client/Public/Player_ENUM.h +++ b/Jusin154_Team3D/Client/Public/Player_ENUM.h @@ -123,13 +123,35 @@ enum class PLAYER_JOINT_ORDER { , LSIDE_TO_L_START , LSIDE_TO_L_END #pragma endregion -#pragma region ORIGIN_HORIZONTAL -#pragma endregion #pragma region UP_HORIZONTAL + , UP_R_RS_START + , UP_R_RS_END + , UP_RS_T_START + , UP_RS_T_END + , UP_T_LS_START + , UP_T_LS_END + , UP_LS_L_START + , UP_LS_L_END #pragma endregion #pragma region MIDDLE_HORIZONTAL + , MIDDLE_R_RS_START + , MIDDLE_R_RS_END + , MIDDLE_RS_T_START + , MIDDLE_RS_T_END + , MIDDLE_T_LS_START + , MIDDLE_T_LS_END + , MIDDLE_LS_L_START + , MIDDLE_LS_L_END #pragma endregion #pragma region DOWN_HORIZONTAL + , DOWN_R_RS_START + , DOWN_R_RS_END + , DOWN_RS_T_START + , DOWN_RS_T_END + , DOWN_T_LS_START + , DOWN_T_LS_END + , DOWN_LS_L_START + , DOWN_LS_L_END #pragma endregion , END }; From 12ae4074e9d755666b5f570385a7e7806a5acb42 Mon Sep 17 00:00:00 2001 From: GiJungSUk Date: Mon, 5 Jan 2026 10:01:29 +0900 Subject: [PATCH 4/9] commit --- Jusin154_Team3D/Client/Private/Ranrok.cpp | 12 +++---- Jusin154_Team3D/Editor/Private/Ranrok.cpp | 44 ++++++++++++++++++----- 2 files changed, 41 insertions(+), 15 deletions(-) diff --git a/Jusin154_Team3D/Client/Private/Ranrok.cpp b/Jusin154_Team3D/Client/Private/Ranrok.cpp index 72a70b398..3d178c82b 100644 --- a/Jusin154_Team3D/Client/Private/Ranrok.cpp +++ b/Jusin154_Team3D/Client/Private/Ranrok.cpp @@ -399,10 +399,10 @@ void CRanrok::OnCollision(CGameObject* pOther, void* pDesc) Add_Event(pairAnimInfo.first, [&]() {m_bDisolve = true; }, - 0.75f); + 0.15f); Add_Event(pairAnimInfo.first, [&]() {m_pFSM->Change_State(FSMSTATE::TUCKED); }, - 0.95f); + 0.5f); m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); return; } @@ -415,10 +415,10 @@ void CRanrok::OnCollision(CGameObject* pOther, void* pDesc) Add_Event(pairAnimInfo.first, [&]() {m_bDisolve = true; }, - 0.75f); + 0.15f); Add_Event(pairAnimInfo.first, [&]() {m_pFSM->Change_State(FSMSTATE::TUCKED); }, - 0.95f); + 0.5f); m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); return; } @@ -432,10 +432,10 @@ void CRanrok::OnCollision(CGameObject* pOther, void* pDesc) Add_Event(pairAnimInfo.first, [&]() {m_bDisolve = true; }, - 0.75f); + 0.15f); Add_Event(pairAnimInfo.first, [&]() {m_pFSM->Change_State(FSMSTATE::TUCKED); }, - 0.95f); + 0.5f); m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); return; } diff --git a/Jusin154_Team3D/Editor/Private/Ranrok.cpp b/Jusin154_Team3D/Editor/Private/Ranrok.cpp index eb75e816b..46031bf20 100644 --- a/Jusin154_Team3D/Editor/Private/Ranrok.cpp +++ b/Jusin154_Team3D/Editor/Private/Ranrok.cpp @@ -310,8 +310,8 @@ void CRanrok::OnCollision(CGameObject* pOther, void* pDesc) break; } - m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_IMPACT, this, &CollisionDesc->vWorldPos); - m_fHp -= 1.f; + m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_HIT, this, &CollisionDesc->vWorldPos); + m_fHp -= 5.f; } else { @@ -320,29 +320,55 @@ void CRanrok::OnCollision(CGameObject* pOther, void* pDesc) CMapElement_Interactable* pProps = dynamic_cast(pOther); } + pair<_uint, _bool> pairAnimInfo = {}; if (Get_HpRatio() == 0.85f) { - m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_IMPACT, this); + pairAnimInfo = m_Animation[STATEANIM::HIT_BWD2]; - m_pFSM->Change_State(FSMSTATE::TUCKED); + m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_IMPACT, this, &CollisionDesc->vWorldPos); + + Add_Event(pairAnimInfo.first, + [&]() {}, + 0.25f); + Add_Event(pairAnimInfo.first, + [&]() {m_pFSM->Change_State(FSMSTATE::TUCKED); }, + 0.55f); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); return; } else if (Get_HpRatio() == 0.7f) { - m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_IMPACT, this); + pairAnimInfo = m_Animation[STATEANIM::HIT_BWD2]; - m_pFSM->Change_State(FSMSTATE::TUCKED); + m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_IMPACT, this, &CollisionDesc->vWorldPos); + + Add_Event(pairAnimInfo.first, + [&]() { }, + 0.25f); + Add_Event(pairAnimInfo.first, + [&]() {m_pFSM->Change_State(FSMSTATE::TUCKED); }, + 0.55f); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); return; } else if (Get_HpRatio() == 0.5f) { - m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_IMPACT, this); - + pairAnimInfo = m_Animation[STATEANIM::HIT_BWD2]; m_ePhase = ENUM_CLASS(RANROK_PHASE::PHASE_GROUND); - m_pFSM->Change_State(FSMSTATE::TUCKED); + + m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_IMPACT, this, &CollisionDesc->vWorldPos); + + Add_Event(pairAnimInfo.first, + [&]() {}, + 0.25f); + Add_Event(pairAnimInfo.first, + [&]() {m_pFSM->Change_State(FSMSTATE::TUCKED); }, + 0.55f); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); return; } + m_pFSM->Change_State(FSMSTATE::HIT); } From d911a439050bab226f4dcab3578d9651b8152b34 Mon Sep 17 00:00:00 2001 From: GiJungSUk Date: Mon, 5 Jan 2026 14:43:39 +0900 Subject: [PATCH 5/9] commit --- .../MonsterPackage/Ranrok/RanrokLand.bin | 3 + .../Effect/Ranrok/RanrokBreath/BottomFire.bin | 2 +- .../Ranrok/RanrokBreath/SplatterBottom0.bin | 2 +- .../Effect/Ranrok/RanrokCharge/CombinedPT.bin | 2 +- .../Effect/Ranrok/RanrokHit/Splatter_Hit.bin | 2 +- .../Effect/Ranrok/RanrokLand/Bottom_Decal.bin | 3 + .../Data/Effect/Ranrok/RanrokLand/Rock_PT.bin | 3 + .../Data/Effect/Ranrok/RanrokLand/Smoke.bin | 3 + .../Ranrok/RanrokPulse/Bottom_Decal.bin | 4 +- .../ShaderFiles/Shader_VtxModelInstance.hlsl | 2 +- Jusin154_Team3D/Editor/Default/Editor.vcxproj | 2 + .../Editor/Default/Editor.vcxproj.filters | 9 + Jusin154_Team3D/Editor/Private/Dummy_Cube.cpp | 1 + .../Editor/Private/Dummy_Plane.cpp | 2 +- Jusin154_Team3D/Editor/Private/EffectPool.cpp | 9 + .../Editor/Private/Level_EffectViewer.cpp | 6 + Jusin154_Team3D/Editor/Private/Loader.cpp | 6 + Jusin154_Team3D/Editor/Private/Ranrok.cpp | 33 ++- .../Editor/Private/Ranrok_Land.cpp | 199 ++++++++++++++++++ .../Editor/Private/Ranrok_States.cpp | 9 +- Jusin154_Team3D/Editor/Public/Editor_Define.h | 2 +- Jusin154_Team3D/Editor/Public/Ranrok.h | 2 +- Jusin154_Team3D/Editor/Public/Ranrok_Land.h | 58 +++++ 23 files changed, 334 insertions(+), 30 deletions(-) create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokLand.bin create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokLand/Bottom_Decal.bin create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokLand/Rock_PT.bin create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokLand/Smoke.bin create mode 100644 Jusin154_Team3D/Editor/Private/Ranrok_Land.cpp create mode 100644 Jusin154_Team3D/Editor/Public/Ranrok_Land.h diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokLand.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokLand.bin new file mode 100644 index 000000000..934eb4d15 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokLand.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:165aa84dee025cb15aa97e34d6195b1d96f23b4f7392e627d8f8f30e8a0c9d3e +size 208 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBreath/BottomFire.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBreath/BottomFire.bin index 59eef9e36..21e2db0b7 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBreath/BottomFire.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBreath/BottomFire.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5ca0eefb3c084b1d79971c1da492e7391c0ac5192302bede9f6c48d2a4472acd +oid sha256:b25d71ce9c8b01d692a97fd1cafde0f3de39e8ec8a9c0564cbb322a7a4af94f8 size 1203 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBreath/SplatterBottom0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBreath/SplatterBottom0.bin index 0a2527bbc..fda9da937 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBreath/SplatterBottom0.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBreath/SplatterBottom0.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:30243ca9247d77f7860b8ccdf71f530a3276acf0b81c3b0cb6bafa45e9ed782c +oid sha256:d89f9e5f845f49272670495184b22728d7a66388037fc3af4dd4ba94fa067138 size 1208 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokCharge/CombinedPT.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokCharge/CombinedPT.bin index 51c93c30a..4ce3fea08 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokCharge/CombinedPT.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokCharge/CombinedPT.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3be5833f7a3a3ef563c1ee1e7f338bdfe9a496eec626304d7afece3b0df11c8f +oid sha256:5362cdc70ca4b25e0c714768745664fcbb59243b013b69ea60d7e896e581797b size 1294 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokHit/Splatter_Hit.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokHit/Splatter_Hit.bin index 870586f89..31082de90 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokHit/Splatter_Hit.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokHit/Splatter_Hit.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5fb4a4c11e7de1fe47a70800ac873fb8256e432a3f4fb2fd3f33676a07e8cf0d +oid sha256:8e91a78f7f75be8686fa1348187ef8b50fd74d4666cec8921ad3b6dac2fd8df3 size 1201 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokLand/Bottom_Decal.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokLand/Bottom_Decal.bin new file mode 100644 index 000000000..59ca1dda6 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokLand/Bottom_Decal.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:95907d7f9ad9ad332ad87df576b43ac08ce4b9de03e9b265dc379c2e2ae6091b +size 1202 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokLand/Rock_PT.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokLand/Rock_PT.bin new file mode 100644 index 000000000..aac5f36b9 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokLand/Rock_PT.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:45c90771bc9e45bf10e582a7336a441837ed733bf47e2fa38e50de5b751569d5 +size 1186 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokLand/Smoke.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokLand/Smoke.bin new file mode 100644 index 000000000..8aadcfbef --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokLand/Smoke.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9e8c11419d8239501f0ad3c1b79681f19b83c759439662392a4b1e88ca880382 +size 1196 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokPulse/Bottom_Decal.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokPulse/Bottom_Decal.bin index 74254fffc..3dafdea5c 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokPulse/Bottom_Decal.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokPulse/Bottom_Decal.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7f9ecc36ee91f4d586605269c85dd19cba8ab3ba038776847e344fc23dc4e27e -size 1220 +oid sha256:3498ce843154813d20f8b9633b88bf5e8f8f2f1b4a6bf05d99322abab81bc8ba +size 1217 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl index 1e9ca52f2..3185f6d30 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl @@ -1852,7 +1852,7 @@ technique11 DefaultTechnique { SetRasterizerState(RS_Nocull); SetDepthStencilState(DSS_Effect, 0); - SetBlendState(BS_WB_Acc, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + SetBlendState(BS_Blend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); VertexShader = compile vs_5_0 VS_MAIN(); PixelShader = compile ps_5_0 PS_DECAL_WB(); diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj b/Jusin154_Team3D/Editor/Default/Editor.vcxproj index f6306c34a..35ce3159d 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj @@ -215,6 +215,7 @@ call Update_Shaders.bat + @@ -488,6 +489,7 @@ call Update_Shaders.bat + diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters index c6cf5fb68..15b1b25f6 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters @@ -751,6 +751,9 @@ {d276d751-77aa-423e-9499-c63875e36266} + + {ea60b62d-1df5-41d7-aa0f-74ec9f454443} + @@ -1521,6 +1524,9 @@ 02.GameObjects\Layer_Effect\Effect_Editor\Effect\Monster_Effect\Ranrok\Big_Hit + + 02.GameObjects\Layer_Effect\Effect_Editor\Effect\Monster_Effect\Ranrok\Land + @@ -2299,6 +2305,9 @@ 02.GameObjects\Layer_Effect\Effect_Editor\Effect\Monster_Effect\Ranrok\Nomal_Hit + + 02.GameObjects\Layer_Effect\Effect_Editor\Effect\Monster_Effect\Ranrok\Land + diff --git a/Jusin154_Team3D/Editor/Private/Dummy_Cube.cpp b/Jusin154_Team3D/Editor/Private/Dummy_Cube.cpp index e810017f8..dc5bfba96 100644 --- a/Jusin154_Team3D/Editor/Private/Dummy_Cube.cpp +++ b/Jusin154_Team3D/Editor/Private/Dummy_Cube.cpp @@ -27,6 +27,7 @@ HRESULT CDummy_Cube::Initialize(void* pArg) if (FAILED(Ready_Components(pArg))) return E_FAIL; + m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(0.f, 0.f, 195.f, 1.f)); return S_OK; } diff --git a/Jusin154_Team3D/Editor/Private/Dummy_Plane.cpp b/Jusin154_Team3D/Editor/Private/Dummy_Plane.cpp index b0edf9b69..15dcfb043 100644 --- a/Jusin154_Team3D/Editor/Private/Dummy_Plane.cpp +++ b/Jusin154_Team3D/Editor/Private/Dummy_Plane.cpp @@ -27,7 +27,7 @@ HRESULT CDummy_Plane::Initialize(void* pArg) if (FAILED(Ready_Components(pArg))) return E_FAIL; - m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(0.f, -5.f, 0.f, 1.f)); + m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(0.f, -12.f, 195.f, 1.f)); return S_OK; } diff --git a/Jusin154_Team3D/Editor/Private/EffectPool.cpp b/Jusin154_Team3D/Editor/Private/EffectPool.cpp index 9b9f36eea..18a39ac2b 100644 --- a/Jusin154_Team3D/Editor/Private/EffectPool.cpp +++ b/Jusin154_Team3D/Editor/Private/EffectPool.cpp @@ -28,6 +28,7 @@ #include "Ranrok_Charge.h" #include "Ranrok_Hit.h" #include "Ranrok_Impact.h" +#include "Ranrok_Land.h" CEffectPool::CEffectPool(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) @@ -385,6 +386,14 @@ HRESULT CEffectPool::Ready_MonsterEffect() return pEffect; } ))) return E_FAIL; + if (FAILED(Create_Effect(SKILL_TYPE::RANROK_LAND, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + + CRanrok_Land* pEffect = nullptr; + + pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr); + + return pEffect; } + ))) return E_FAIL; return S_OK; } diff --git a/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp b/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp index e41ea8c6f..e3518b164 100644 --- a/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp +++ b/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp @@ -83,6 +83,11 @@ HRESULT CLevel_EffectViewer::Initialize() return E_FAIL; } + // if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(NEXT_LEVEL, NEXT_LEVEL, TEXT("Layer_Plane")))) //플레이어보다 먼저 생성해야함! + //{ + // return E_FAIL; + //} + //if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Monster")))) // return E_FAIL; @@ -99,6 +104,7 @@ HRESULT CLevel_EffectViewer::Initialize() //ZeroMemory(&m_PlaneData, sizeof(m_PlaneData)); //m_PlaneData.eKind = PHYSX_KIND::BODY_STATIC; //m_PlaneData.iSubKind = ENUM_CLASS(PXOBJECT::TERRAIN); + //m_pGameInstance->Add_Editor_Plane(m_PlaneData); diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp index c125b1433..fd18d86e2 100644 --- a/Jusin154_Team3D/Editor/Private/Loader.cpp +++ b/Jusin154_Team3D/Editor/Private/Loader.cpp @@ -221,6 +221,7 @@ #include "Ranrok_Charge.h" #include "Ranrok_Hit.h" #include "Ranrok_Impact.h" +#include "Ranrok_Land.h" #pragma endregion #pragma region PHYSX_HEADER @@ -1963,6 +1964,11 @@ HRESULT CLoader::Loading_For_Effect() return E_FAIL; } + if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CRanrok_Land::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)))) return E_FAIL; diff --git a/Jusin154_Team3D/Editor/Private/Ranrok.cpp b/Jusin154_Team3D/Editor/Private/Ranrok.cpp index 46031bf20..2c103f372 100644 --- a/Jusin154_Team3D/Editor/Private/Ranrok.cpp +++ b/Jusin154_Team3D/Editor/Private/Ranrok.cpp @@ -71,12 +71,20 @@ HRESULT CRanrok::Initialize(void* pArg) m_pCharacter_Controller->Set_Position(XMVectorSet(3.f, -75.f, -15.f, 1.f)); m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(3.f, -75.f, -15.f, 1.f)); +#if 진우 + m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(0.f, -11.f, 195.f, 1.f)); + m_pCharacter_Controller->Set_Position(XMVectorSet(0.f, -11.f, 195.f, 1.f)); + + m_vCCTPos = _float3(0.f, -10.f, 195.f); + m_pCharacter_Controller->SetGravity(false); +#endif + Load_RanrokPos("../Bin/Resources/Data/RanrokPos/RanrokPos.xml"); return S_OK; } -void CRanrok::Priority_Update(_float fTimeDelta) +void CRanrok::Priority_Update(_float fTimeDelta) { __super::Priority_Update(fTimeDelta); } @@ -311,7 +319,7 @@ void CRanrok::OnCollision(CGameObject* pOther, void* pDesc) } m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_HIT, this, &CollisionDesc->vWorldPos); - m_fHp -= 5.f; + //m_fHp -= 5.f; } else { @@ -887,24 +895,15 @@ void CRanrok::Describe_Entity() GUI::TreePop(); } - } - -#ifdef gimch - - if (m_pGameInstance->Key_Down(DIK_L)) + } + if (GUI::DragFloat3("Change CCT Pos" , (_float*)& m_vCCTPos)) { - _float3 vPos; - if (m_pGameInstance->isPicking(&vPos)) - { - m_pCharacter_Controller->Set_Position(XMVectorSetW(XMLoadFloat3(&vPos), 1.f)); - } + _vector vPos = XMLoadFloat3(&m_vCCTPos); + + vPos = XMVectorSetW(vPos , 1.f); + m_pCharacter_Controller->Set_Position(vPos); } -#endif // - - m_pTransformCom->Describe_Entity(); - - } #endif // _DEBUG diff --git a/Jusin154_Team3D/Editor/Private/Ranrok_Land.cpp b/Jusin154_Team3D/Editor/Private/Ranrok_Land.cpp new file mode 100644 index 000000000..9e825b91e --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/Ranrok_Land.cpp @@ -0,0 +1,199 @@ +#include "pch.h" +#include "Ranrok_Land.h" + +#include "GameInstance.h" +#include "EditEffect.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() +{ + + + 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(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokLand"))) + 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; + + + /* 초기 객체 비지블*/ + + CEditEffect* pBottom_Decal = Get_PartObject("Bottom_Decal"); + CEditEffect* pRock_PT = Get_PartObject("Rock_PT"); + CEditEffect* 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/Editor/Private/Ranrok_States.cpp b/Jusin154_Team3D/Editor/Private/Ranrok_States.cpp index 3136f4636..6268520e2 100644 --- a/Jusin154_Team3D/Editor/Private/Ranrok_States.cpp +++ b/Jusin154_Team3D/Editor/Private/Ranrok_States.cpp @@ -748,15 +748,18 @@ void CRanrok::Behavior_LandEnter() { pair<_uint, _bool> pairAnimInfo = {}; m_pFSM->Enable_State(FSMSTATE::LAND); +#ifndef 진우 m_pCharacter_Controller->SetGravity(true); +#endif m_ePhase = ENUM_CLASS(RANROK_PHASE::PHASE_GROUND); pairAnimInfo = m_Animation[STATEANIM::LAND]; m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); - /*Add_Event(pairAnimInfo.first, - [this]() { CameraShake(30.f, 5.f, 10.f, 1.2f); }, - 0.53f);*/ + Add_Event(pairAnimInfo.first, + [this]() { + m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_LAND, this); + }, 0.53f); } HRESULT CRanrok::Behavior_LandExitCheck(_float fTimeDelta) diff --git a/Jusin154_Team3D/Editor/Public/Editor_Define.h b/Jusin154_Team3D/Editor/Public/Editor_Define.h index 2ac1d2fdf..c46a6ca57 100644 --- a/Jusin154_Team3D/Editor/Public/Editor_Define.h +++ b/Jusin154_Team3D/Editor/Public/Editor_Define.h @@ -67,7 +67,7 @@ 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, + 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, END }; diff --git a/Jusin154_Team3D/Editor/Public/Ranrok.h b/Jusin154_Team3D/Editor/Public/Ranrok.h index fee23aa10..f994ed160 100644 --- a/Jusin154_Team3D/Editor/Public/Ranrok.h +++ b/Jusin154_Team3D/Editor/Public/Ranrok.h @@ -126,7 +126,7 @@ class CRanrok final : public CMonster _float m_fRushTime = {}; _float m_fTuckedSpeed = { 75.f}; - + _float3 m_vCCTPos = {}; void Behavior_IdleEnter(); HRESULT Behavior_IdleExitCheck(); diff --git a/Jusin154_Team3D/Editor/Public/Ranrok_Land.h b/Jusin154_Team3D/Editor/Public/Ranrok_Land.h new file mode 100644 index 000000000..9b622207e --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/Ranrok_Land.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_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 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_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 From bfeea69f51943059eff6ca15bc6f27e96d81db82 Mon Sep 17 00:00:00 2001 From: GiJungSUk Date: Mon, 5 Jan 2026 22:29:19 +0900 Subject: [PATCH 6/9] 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); From 14a562fbc428969742959f04de475b71b4ef161d Mon Sep 17 00:00:00 2001 From: kimnuri Date: Mon, 5 Jan 2026 22:36:42 +0900 Subject: [PATCH 7/9] [add] Anim --- .../Playable_AvadaKedavra.bin | 4 +- .../Playable_AvadaKedavra.fbx | 4 +- .../PlayableCharacter/Playable_OpenDoor.bin | 4 +- .../PlayableCharacter/Playable_OpenDoor.fbx | 4 +- .../PlayableCharacter/Playable_TrollIntro.bin | 3 + .../PlayableCharacter/Playable_TrollIntro.fbx | 3 + .../Models/Monster/SubTroll/Female01.fbx | 3 + .../Models/Monster/SubTroll/male01.fbx | 3 + .../Models/Monster/SubTroll/troll.bin | 4 +- .../Models/Monster/SubTroll/troll.fbx | 4 +- .../Models/Monster/SubTroll/troll_Anim.bin | 4 +- .../Models/Monster/SubTroll/troll_Anim.fbx | 4 +- .../Monster/SubTroll/troll_TrollIntro.bin | 3 + .../Monster/SubTroll/troll_TrollIntro.fbx | 3 + .../Object/Camera/Camera_TrollIntro.bin | 3 + .../Object/Camera/Camera_TrollIntro.fbx | 3 + .../ShaderFiles/Shader_NPC_PBR_Anim.hlsl | 2 +- .../Editor/Private/Loader_ObjectViewer.cpp | 172 +++++++++++------- 18 files changed, 144 insertions(+), 86 deletions(-) create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_TrollIntro.bin create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_TrollIntro.fbx create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/Female01.fbx create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/male01.fbx create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll_TrollIntro.bin create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll_TrollIntro.fbx create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Camera/Camera_TrollIntro.bin create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Camera/Camera_TrollIntro.fbx diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_AvadaKedavra.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_AvadaKedavra.bin index b677974e7..ac0f24504 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_AvadaKedavra.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_AvadaKedavra.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c0340a8a0b08502e6b931b479aca9dae73719a434dbd30d731efea04278e8e7f -size 10680526 +oid sha256:0e6e8d353a7023d1d869027065bae2628265461835b7a165e390a2ccef2b8ef8 +size 10770337 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_AvadaKedavra.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_AvadaKedavra.fbx index e4bffd1e6..6a6ca843f 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_AvadaKedavra.fbx +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_AvadaKedavra.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f3c4a07825d551440d37c0eb56c56528c5cf729eda1b0e8d961b16ceee36f9aa -size 6535596 +oid sha256:a675d9c736c93922ae2058a24982074f2593cc8cd6f584a51c1a93c398b39101 +size 6579084 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_OpenDoor.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_OpenDoor.bin index 48ab10d3d..f746f425e 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_OpenDoor.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_OpenDoor.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ff865f8dceb4baf57465631ea28be92f8729068435d4eec8acef1b74968d1b21 -size 10798323 +oid sha256:407209a0587422e75ddc3cf5ec0b06e3b49cb66d14af4bcf55b817a2f7802596 +size 10446291 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_OpenDoor.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_OpenDoor.fbx index d1fcd8c1b..d605634fb 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_OpenDoor.fbx +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_OpenDoor.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7d57c7dd2a5a50ab101b390c05715319737e5fff3548684d7c652556e12be1e4 -size 7602204 +oid sha256:aa0598d4e3883f2ca4b8e4a5afe4bc121034a734bbd24e681d2b68f53c96dbed +size 7670460 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_TrollIntro.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_TrollIntro.bin new file mode 100644 index 000000000..8779cd5a1 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_TrollIntro.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:32b51f41874a6648ba4d389840709175a6bfbc04152d800abb743fc4a6689e03 +size 13829790 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_TrollIntro.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_TrollIntro.fbx new file mode 100644 index 000000000..f88a088c2 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_TrollIntro.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2ce6d6d9c175b7711f49a87c50e3e16bce60ee524ea04254a7fee76b8054f5bd +size 7854460 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/Female01.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/Female01.fbx new file mode 100644 index 000000000..98fbb02b8 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/Female01.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b0b5e33928ae4072c6dc1dafd7d1034c18600591839da84c2ecab3757e4418b6 +size 36510876 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/male01.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/male01.fbx new file mode 100644 index 000000000..28682a24e --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/male01.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1f9c508279da4a3fcaac901b784f3ab70655e9bcd9a941df0fa5c064a1c37f8c +size 49008684 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll.bin index c3a633e78..00406df54 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a7d1e09cadbb9b893154e11dae7e8a4dbd6519c294fbca956cf2ba11fdfe4ed5 -size 5154246 +oid sha256:66743ee440af5a10d0e74ff2203efa4f08514f6b19869fcc133869f568af7b8e +size 5163586 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll.fbx index 866d6ed22..fac6a610d 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll.fbx +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:62c113acb5e15bab839185ad00acf6ede4587fcf44874078ce738d0475fec203 -size 2138700 +oid sha256:6afe140b1bd18e24b74e3631ffa881cfbcd1036fc83fd3e4d49fc5cf76206338 +size 2268364 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll_Anim.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll_Anim.bin index 19074fb85..bc4eff994 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll_Anim.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll_Anim.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aafe6c653fd8c4be89928fd725687e9939deacddbdc59f26c8a92a3e6a2251c8 -size 41873230 +oid sha256:7f0aec44a3dbeafab4cbbd655e2f193d1159aa57843d86f7eadb702358032237 +size 43489033 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll_Anim.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll_Anim.fbx index 3dc740612..d9a512f66 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll_Anim.fbx +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll_Anim.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2f4ac561f8c038b1e1a3697288135c24cdc8e954fd24a396c5836c36135f9206 -size 123683036 +oid sha256:cecb0a62fb33d988795f4369738633dc14988ebcd87ad85fb724fc462efe3327 +size 136112332 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll_TrollIntro.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll_TrollIntro.bin new file mode 100644 index 000000000..4c50849ef --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll_TrollIntro.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:290de4b9a47b9e07596a092531280c77548e4c6ab8bae2564a976b6338f6daa9 +size 16281507 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll_TrollIntro.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll_TrollIntro.fbx new file mode 100644 index 000000000..3a854e1cf --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll_TrollIntro.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6fa4bf2c5c8aff70c37b8a113812c4b040b2b7a3664700f5d7024358612eb2be +size 4519836 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Camera/Camera_TrollIntro.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Camera/Camera_TrollIntro.bin new file mode 100644 index 000000000..5e3c63885 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Camera/Camera_TrollIntro.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ef3ac2202757e81a8a8a89c4a032326fdb9fad7cc3f7b4e64abd6b71e82fe0b1 +size 134860 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Camera/Camera_TrollIntro.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Camera/Camera_TrollIntro.fbx new file mode 100644 index 000000000..4b09a75d1 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Camera/Camera_TrollIntro.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c1932284b28eaec10dc58e31f142665a4b19eee9af9392ce438495264e36128 +size 143068 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_NPC_PBR_Anim.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_NPC_PBR_Anim.hlsl index 1a22e3351..ad6342569 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_NPC_PBR_Anim.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_NPC_PBR_Anim.hlsl @@ -251,7 +251,7 @@ VS_OUT VS_MAIN_LEGACY(VS_IN In) //BoneMatrix = TempBoneMatrix; - matrix BoneMatrix = + BoneMatrix = mul(g_OffsetMatrix[In.vBlendIndex.x], mul(g_BoneBuffer[In.vBlendIndex.x].LocalCombined, w.x)) + mul(g_OffsetMatrix[In.vBlendIndex.y], diff --git a/Jusin154_Team3D/Editor/Private/Loader_ObjectViewer.cpp b/Jusin154_Team3D/Editor/Private/Loader_ObjectViewer.cpp index d66505a73..ddb883001 100644 --- a/Jusin154_Team3D/Editor/Private/Loader_ObjectViewer.cpp +++ b/Jusin154_Team3D/Editor/Private/Loader_ObjectViewer.cpp @@ -81,44 +81,54 @@ HRESULT CLoader::Loading_For_ObjectViewer() #pragma region MONSTER - futures.emplace_back(Deferred_ModelLoad( - MODEL::ANIM, "../Bin/Resources/Models/Monster/Goblin/SK_GOB_M_T4Melee_INST_A_Master.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - TEXT("Prototype_Component_SK_GOB_M_T4Melee_INST_A_Master_Model") - )); + //futures.emplace_back(Deferred_ModelLoad( + // MODEL::ANIM, "../Bin/Resources/Models/Monster/Goblin/SK_GOB_M_T4Melee_INST_A_Master.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + // TEXT("Prototype_Component_SK_GOB_M_T4Melee_INST_A_Master_Model") + //)); - futures.emplace_back(Deferred_ModelLoad( - MODEL::ANIM, "../Bin/Resources/Models/Monster/Goblin_Mage/GoblinMage.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - TEXT("Prototype_Component_GoblinMage_Model") - )); + //futures.emplace_back(Deferred_ModelLoad( + // MODEL::ANIM, "../Bin/Resources/Models/Monster/Goblin_Mage/GoblinMage.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + // TEXT("Prototype_Component_GoblinMage_Model") + //)); - futures.emplace_back(Deferred_ModelLoad( - MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/Goblin_Assassin/SK_GOB_M_Assassin_Master.bin", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - TEXT("Prototype_Component_SK_GOB_M_Assassin_Master_Model") - )); + //futures.emplace_back(Deferred_ModelLoad( + // MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/Goblin_Assassin/SK_GOB_M_Assassin_Master.bin", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + // TEXT("Prototype_Component_SK_GOB_M_Assassin_Master_Model") + //)); - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_GoblinSpector_Model"), - CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/GoblinSpector/GoblinSpector.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) - return E_FAIL; + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_GoblinSpector_Model"), + // CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/GoblinSpector/GoblinSpector.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) + // return E_FAIL; - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Playable_Model"), - CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable.bin", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) - return E_FAIL; + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Playable_Model"), + // CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable.bin", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) + // return E_FAIL; futures.emplace_back(Deferred_ModelLoad( MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/SubTroll/troll.bin", XMMatrixIdentity(), TEXT("Prototype_Component_troll_Model") )); + //futures.emplace_back(Deferred_ModelLoad( + // MODEL::ANIM, "../Bin/Resources/Models/Monster/SubTroll/troll_TrollIntro.bin", XMMatrixIdentity(), + // TEXT("Prototype_Component_trsoll_Model") + //)); + + //futures.emplace_back(Deferred_ModelLoad( + // MODEL::ANIM, "../Bin/Resources/Models/Monster/SubTroll/troll_Anim.bin", XMMatrixIdentity(), + // TEXT("Prototype_Component_trsoll_Model") + //)); + futures.emplace_back(Deferred_ModelLoad( MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/ConjuredDragon/ConjuredDragon.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(), TEXT("Prototype_Component_ConjuredDragon_Model") )); - futures.emplace_back(Deferred_ModelLoad( - MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - TEXT("Prototype_Component_Professor_EleazarFig_Model") - )); + //futures.emplace_back(Deferred_ModelLoad( + // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + // TEXT("Prototype_Component_Professor_EleazarFig_Model") + //)); #pragma endregion @@ -176,10 +186,11 @@ HRESULT CLoader::Loading_For_ObjectViewer() MODEL::NONANIM, "../Bin/Resources/Models/Box/Box.bin", XMMatrixIdentity(), TEXT("Desc_Box") )); - futures.emplace_back(Deferred_ModelLoad( - MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.bin", XMMatrixIdentity(), - TEXT("Prototype_Component_GerboldOlivander_Model") - )); + //futures.emplace_back(Deferred_ModelLoad( + // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.bin", XMMatrixIdentity(), + // TEXT("Prototype_Component_GerboldOlivander_Model") + //)); + //futures.emplace_back(Deferred_ModelLoad( // MODEL::ANIM, "../Bin/Resources/Models/Object/Camera/Camera.bin", XMMatrixIdentity(), @@ -196,63 +207,86 @@ HRESULT CLoader::Loading_For_ObjectViewer() // TEXT("Prototype_Component_Camera_DSModel") //)); - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_CCL_CameraRig.001_Model"), - CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Camera/CCL_CameraRig.001.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) - return E_FAIL; + //futures.emplace_back(Deferred_ModelLoad( + // MODEL::ANIM, "../Bin/Resources/Models/Object/Camera/Camera_TrollIntro.fbx", XMMatrixIdentity(), + // TEXT("Prototype_Component_Camera_dsModel") + //)); - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Camera_Model"), - CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Camera/Camera.bin", XMMatrixIdentity())))) - return E_FAIL; + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_CCL_CameraRig.001_Model"), + // CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Camera/CCL_CameraRig.001.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) + // return E_FAIL; + + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Camera_Model"), + // CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Camera/Camera.bin", XMMatrixIdentity())))) + // return E_FAIL; futures.emplace_back(Deferred_ModelLoad( - MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable.fbx", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable.bin", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(), TEXT("Prototype_Component_Playable_Model") )); - futures.emplace_back(Deferred_ModelLoad( - MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/MatildaWeasely/MatildaWeasely.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - TEXT("Prototype_Component_MatildaWeasely_Model") - )); + //futures.emplace_back(Deferred_ModelLoad( + // MODEL::ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable_TrollIntro.fbx", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + // TEXT("Prototype_Component_Playable_Model") + //)); - futures.emplace_back(Deferred_ModelLoad( - MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/SatyavatiShah/SatyavatiShah.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - TEXT("Prototype_Component_SatyavatiShah_Model") - )); +#pragma region NPC - futures.emplace_back(Deferred_ModelLoad( - MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/PhineasBlack/PhineasBlack.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - TEXT("Prototype_Component_PhineasBlack_Model") - )); + //futures.emplace_back(Deferred_ModelLoad( + // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + // TEXT("Prototype_Component_Professor_EleazarFig_Model") + //)); - futures.emplace_back(Deferred_ModelLoad( - MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/ChiyoKogawa/ChiyoKogawa.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - TEXT("Prototype_Component_ChiyoKogawa_Model") - )); + //futures.emplace_back(Deferred_ModelLoad( + // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/MatildaWeasely/MatildaWeasely.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + // TEXT("Prototype_Component_MatildaWeasely_Model") + //)); - futures.emplace_back(Deferred_ModelLoad( - MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/Ghost_Peeves/Ghost_Peeves.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - TEXT("Prototype_Component_Ghost_Peeves_Model") - )); + //futures.emplace_back(Deferred_ModelLoad( + // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/SatyavatiShah/SatyavatiShah.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + // TEXT("Prototype_Component_SatyavatiShah_Model") + //)); - futures.emplace_back(Deferred_ModelLoad( - MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/M_Student/M_Student.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - TEXT("Prototype_Component_M_Student_Model") - )); - futures.emplace_back(Deferred_ModelLoad( - MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/F_Student/F_Student.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - TEXT("Prototype_Component_F_Student_Model") - )); + //futures.emplace_back(Deferred_ModelLoad( + // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/PhineasBlack/PhineasBlack.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + // TEXT("Prototype_Component_PhineasBlack_Model") + //)); - futures.emplace_back(Deferred_ModelLoad( - MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/Elf/Elf.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - TEXT("Prototype_Component_Elf_Model") - )); + //futures.emplace_back(Deferred_ModelLoad( + // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/ChiyoKogawa/ChiyoKogawa.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + // TEXT("Prototype_Component_ChiyoKogawa_Model") + //)); + + //futures.emplace_back(Deferred_ModelLoad( + // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/Ghost_Peeves/Ghost_Peeves.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + // TEXT("Prototype_Component_Ghost_Peeves_Model") + //)); + + //futures.emplace_back(Deferred_ModelLoad( + // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/M_Student/M_Student.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + // TEXT("Prototype_Component_M_Student_Model") + //)); + //futures.emplace_back(Deferred_ModelLoad( + // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/F_Student/F_Student.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + // TEXT("Prototype_Component_F_Student_Model") + //)); + + //futures.emplace_back(Deferred_ModelLoad( + // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/Elf/Elf.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + // TEXT("Prototype_Component_Elf_Model") + //)); //futures.emplace_back(Deferred_ModelLoad( // MODEL::ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable_Cmbt.fbx", XMMatrixIdentity(), // TEXT("Prototype_Component_Student_Cmbt_Model") //)); + + + //futures.emplace_back(Deferred_ModelLoad( + // MODEL::ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable_OpenDoor.fbx", XMMatrixIdentity(), + // TEXT("Prototype_Component_Student_Cmbt_Model") + //)); //futures.emplace_back(Deferred_ModelLoad( // MODEL::ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable_Rct.fbx", XMMatrixIdentity(), @@ -294,10 +328,10 @@ HRESULT CLoader::Loading_For_ObjectViewer() // TEXT("Prototype_Component_Student_Cmbt_Model") //)); - /*futures.emplace_back(Deferred_ModelLoad( - MODEL::ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable_AvadaKedavra.fbx", XMMatrixIdentity(), - TEXT("Prototype_Component_Student_Cmbt_Model") - ));*/ + //futures.emplace_back(Deferred_ModelLoad( + // MODEL::ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable_AvadaKedavra.fbx", XMMatrixIdentity(), + // TEXT("Prototype_Component_Student_Cmbt_Model") + //)); for (auto& job : futures) { pair<_wstring, CModel*>* pResult = job.get(); From 9da9a05f7aff6d05f32d04ff01f87c15b551bb1f Mon Sep 17 00:00:00 2001 From: kimnuri Date: Tue, 6 Jan 2026 10:42:00 +0900 Subject: [PATCH 8/9] [fix] Ranrok Leak --- .../Client/Private/Level_GamePlay.cpp | 6 +- Jusin154_Team3D/Client/Private/Loader.cpp | 2 +- Jusin154_Team3D/Client/Private/Player.cpp | 108 ++++++------- .../Client/Private/PlayerRobe_Initialize.cpp | 144 ++++++++++-------- Jusin154_Team3D/Client/Private/Ranrok.cpp | 3 + Jusin154_Team3D/Client/Public/PlayerRobe.h | 7 +- Jusin154_Team3D/Client/Public/Player_ENUM.h | 71 +++++---- .../Playable_AvadaKedavra.fbx | 2 +- .../PlayableCharacter/Playable_OpenDoor.bin | 4 +- .../PlayableCharacter/Playable_OpenDoor.fbx | 4 +- .../Editor/Private/Loader_ObjectViewer.cpp | 101 ++++++------ Jusin154_Team3D/Engine/Private/PipeLine.cpp | 1 + 12 files changed, 246 insertions(+), 207 deletions(-) diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp index 514197bd1..fe46d92d1 100644 --- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp +++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp @@ -340,7 +340,7 @@ HRESULT CLevel_GamePlay::Ready_Background() #endif // #ifdef 기무리 isReady_Background = true; - isReady_Hogsmeade = true; + isReady_Hogsmeade = false; isReady_Hogwart = false; #endif // #ifdef 나 @@ -726,8 +726,8 @@ HRESULT CLevel_GamePlay::Ready_Layer_Player(const _wstring& strLayerTag) isLoad_RandomNPC = true; #endif // #ifdef 기무리 - isLoad_NPC = true; - isLoad_RandomNPC = true; + isLoad_NPC = false; + isLoad_RandomNPC = false; #endif // #ifdef 나 isLoad_RandomNPC = true; diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index 5bcca63b5..dac47f28b 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -409,7 +409,7 @@ HRESULT CLoader::Loading_For_GamePlay() isLoad_Background = true; isLoad_Hogwart = false; isLoad_UI_SEQUANTIAL = false; - isLoad_NPC = true; + isLoad_NPC = false; isLoad_Monster = true; #endif // #ifdef 나 diff --git a/Jusin154_Team3D/Client/Private/Player.cpp b/Jusin154_Team3D/Client/Private/Player.cpp index 17d0f9d39..3943ab927 100644 --- a/Jusin154_Team3D/Client/Private/Player.cpp +++ b/Jusin154_Team3D/Client/Private/Player.cpp @@ -587,15 +587,15 @@ HRESULT CPlayer::Ready_Parts() //XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("broomSocket")); #ifdef 기무리 - { - CPlayerRobe::PlayerRobe_DESC Desc{}; - Desc.pModel = m_pModelCom; - Desc.pParentTransform = m_pTransformCom; - Desc.pSocketMatrix = m_pModelCom->Get_BoneMatrixPtr("Hips_Cloth"); - if (FAILED(Add_PartObject("RobePart", g_iStaticLevel, &m_pRobePart, &Desc))) { - assert(false); - } - } + //{ + // CPlayerRobe::PlayerRobe_DESC Desc{}; + // Desc.pModel = m_pModelCom; + // Desc.pParentTransform = m_pTransformCom; + // Desc.pSocketMatrix = m_pModelCom->Get_BoneMatrixPtr("Hips_Cloth"); + // if (FAILED(Add_PartObject("RobePart", g_iStaticLevel, &m_pRobePart, &Desc))) { + // assert(false); + // } + //} #endif // 기무리 @@ -665,51 +665,51 @@ HRESULT CPlayer::Bind_ShaderParameters(_uint iMeshOrder) fMixerFactor = 0.658333f; iColorMixerMethod = 1; break; -#ifdef 기무리 - - case PLAYER_MESH_ORDER::ROBE_CLOTH: - { - CMesh* pMesh = m_pModelCom->Get_Mesh(ENUM_CLASS(PLAYER_MESH_ORDER::ROBE_CLOTH)); - _uint MeshBoneCount = pMesh->Get_NumBone(); - - for (_uint i = 0; i < MeshBoneCount; ++i) - { - XMStoreFloat4x4(&SkinMatrices[i], XMMatrixIdentity()); - } - - _uint temp = 0; - vector<_uint> globalMask = m_pModelCom->Get_BoneMask(ENUM_CLASS(BLEND_BONE::HIPS_CLOTH)); - vector<_int> boneIndices = pMesh->Get_BoneIndices(); - - for (_uint i = 0; i < MeshBoneCount; ++i) - { - _uint global = boneIndices[i]; - if (global == 38) - continue; - if (globalMask[global] == 1) - { - SkinMatrices[i] = m_pRobePart->Get_RobeJointAnchorMatrix(temp++); - } - } - - GUI::DragFloat("TempWeight", &m_fTempWeight, 0.01f); - - if (FAILED(m_pShaderCom->Bind_RawValue("g_TempWeight", &m_fTempWeight, sizeof(_float)))) { - return E_FAIL; - } - - - if (FAILED(m_pShaderCom->Bind_Matrices( - "g_BoneMatrices", - SkinMatrices.data(), - (_int)SkinMatrices.size() - ))) - { - return E_FAIL; - } - } - break; -#endif // _DEBUG +//#ifdef 기무리 +// +// case PLAYER_MESH_ORDER::ROBE_CLOTH: +// { +// CMesh* pMesh = m_pModelCom->Get_Mesh(ENUM_CLASS(PLAYER_MESH_ORDER::ROBE_CLOTH)); +// _uint MeshBoneCount = pMesh->Get_NumBone(); +// +// for (_uint i = 0; i < MeshBoneCount; ++i) +// { +// XMStoreFloat4x4(&SkinMatrices[i], XMMatrixIdentity()); +// } +// +// _uint temp = 0; +// vector<_uint> globalMask = m_pModelCom->Get_BoneMask(ENUM_CLASS(BLEND_BONE::HIPS_CLOTH)); +// vector<_int> boneIndices = pMesh->Get_BoneIndices(); +// +// for (_uint i = 0; i < MeshBoneCount; ++i) +// { +// _uint global = boneIndices[i]; +// if (global == 38) +// continue; +// if (globalMask[global] == 1) +// { +// SkinMatrices[i] = m_pRobePart->Get_RobeJointAnchorMatrix(temp++); +// } +// } +// +// GUI::DragFloat("TempWeight", &m_fTempWeight, 0.01f); +// +// if (FAILED(m_pShaderCom->Bind_RawValue("g_TempWeight", &m_fTempWeight, sizeof(_float)))) { +// return E_FAIL; +// } +// +// +// if (FAILED(m_pShaderCom->Bind_Matrices( +// "g_BoneMatrices", +// SkinMatrices.data(), +// (_int)SkinMatrices.size() +// ))) +// { +// return E_FAIL; +// } +// } +// break; +//#endif // _DEBUG default: break; diff --git a/Jusin154_Team3D/Client/Private/PlayerRobe_Initialize.cpp b/Jusin154_Team3D/Client/Private/PlayerRobe_Initialize.cpp index 3ae8fa796..23fd682c4 100644 --- a/Jusin154_Team3D/Client/Private/PlayerRobe_Initialize.cpp +++ b/Jusin154_Team3D/Client/Private/PlayerRobe_Initialize.cpp @@ -6,27 +6,38 @@ CPlayerRobe::CPlayerRobe(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) : CPlayerRobe::CPlayerRobe(const CPlayerRobe& Prototype) : CPartObject(Prototype) { } HRESULT CPlayerRobe::Helper_RouteJointGenerater(PHYSX_JOINT eType, CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC& Desc_Body, ROUTE_DESC& Desc_Route, _matrix* xmAnchorMatricesWorld) { - if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) { - return E_FAIL; - } - m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(xmAnchorMatricesWorld[Desc_Route.iStartBoneIndex].r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true); - - PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iStartBoneIndex]->Get_Actor(); - PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor(); - PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor(); - - PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y-- - PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++ - if (PHYSX_JOINT::D6 == eType) { + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) { + return E_FAIL; + } + m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(xmAnchorMatricesWorld[Desc_Route.iStartBoneIndex].r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true); + + PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iStartBoneIndex]->Get_Actor(); + PSX::PxRigidDynamic* routeRigidActor = m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor(); + PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor(); + + PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y-- + PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++ + m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose); m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose); } - else if (PHYSX_JOINT::FIXED == eType) { - m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxFixedJoint(startAnchorRigidActor, routeRigidActor, startJointWorldPose); - m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxFixedJoint(routeRigidActor, endAnchorRigidActor, endJointWorldPose); - } + //else if (PHYSX_JOINT::FIXED == eType) { + // if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) { + // return E_FAIL; + // } + // m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(xmAnchorMatricesWorld[Desc_Route.iStartBoneIndex].r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true); + // PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iStartBoneIndex]->Get_Actor(); + // PSX::PxRigidDynamic* routeRigidActor = m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor(); + // PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor(); + + // PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y-- + // PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++ + + // m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxFixedJoint(startAnchorRigidActor, routeRigidActor, startJointWorldPose); + // m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxFixedJoint(routeRigidActor, endAnchorRigidActor, endJointWorldPose); + //} return S_OK; } @@ -130,110 +141,110 @@ HRESULT CPlayerRobe::Ready_Components() /*Origin_Linked_Routes*/ { { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::ORIGIN_TO_RUP); + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::ORIGIN_TO_RUP); Desc_Route.iStartBoneIndex = -1; Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTUP); Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_RUP_START); Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) { + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) { return E_FAIL; } - m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(socketWorld.r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true); + m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(socketWorld.r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true); { // Joint PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeMainAnchor->Get_Actor(); - PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor(); + PSX::PxRigidDynamic* routeRigidActor = m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor(); PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor(); - PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y-- - PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++ + PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y-- + PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++ m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose); m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose); } } { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::ORIGIN_TO_TUP); + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::ORIGIN_TO_TUP); Desc_Route.iStartBoneIndex = -1; Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILUP); Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_TUP_START); Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) { + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) { return E_FAIL; } - m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(socketWorld.r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true); + m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(socketWorld.r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true); { // Joint PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeMainAnchor->Get_Actor(); - PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor(); + PSX::PxRigidDynamic* routeRigidActor = m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor(); PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor(); - PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y-- - PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++ + PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y-- + PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++ m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose); m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose); } } { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::ORIGIN_TO_LUP); + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::ORIGIN_TO_LUP); Desc_Route.iStartBoneIndex = -1; Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTUP); Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_LUP_START); Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) { + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) { return E_FAIL; } - m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(socketWorld.r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true); + m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(socketWorld.r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true); { // Joint PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeMainAnchor->Get_Actor(); - PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor(); + PSX::PxRigidDynamic* routeRigidActor = m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor(); PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor(); - PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y-- - PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++ + PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y-- + PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++ m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose); m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose); } } { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::ORIGIN_TO_RSIDEUP); + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::ORIGIN_TO_RSIDEUP); Desc_Route.iStartBoneIndex = -1; Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTSIDEUP); Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_RSIDEUP_START); Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) { + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) { return E_FAIL; } - m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(socketWorld.r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true); + m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(socketWorld.r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true); { // Joint PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeMainAnchor->Get_Actor(); - PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor(); + PSX::PxRigidDynamic* routeRigidActor = m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor(); PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor(); - PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y-- - PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++ + PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y-- + PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++ m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose); m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose); } } { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::ORIGIN_TO_LSIDEUP); + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::ORIGIN_TO_LSIDEUP); Desc_Route.iStartBoneIndex = -1; Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTSIDEUP); Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_LSIDEUP_START); Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) { + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) { return E_FAIL; } - m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(socketWorld.r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true); + m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(socketWorld.r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true); { // Joint PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeMainAnchor->Get_Actor(); - PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor(); + PSX::PxRigidDynamic* routeRigidActor = m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor(); PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor(); - PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y-- - PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++ + PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y-- + PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++ m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose); m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose); @@ -243,7 +254,7 @@ HRESULT CPlayerRobe::Ready_Components() /*UP_TO_MIDDLE*/ { { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::RUP_TO_RMIDDLE); + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::RUP_TO_RMIDDLE); Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTUP); Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHT); Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::RUP_TO_RMIDDLE_START); @@ -251,7 +262,7 @@ HRESULT CPlayerRobe::Ready_Components() Helper_RouteJointGenerater(PHYSX_JOINT::D6, Desc_Body, Desc_Route, xmAnchorMatricesWorld); } { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::TUP_TO_TMIDDLE); + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::TUP_TO_TMIDDLE); Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILUP); Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAIL); Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::TUP_TO_TMIDDLE_START); @@ -259,7 +270,7 @@ HRESULT CPlayerRobe::Ready_Components() Helper_RouteJointGenerater(PHYSX_JOINT::D6, Desc_Body, Desc_Route, xmAnchorMatricesWorld); } { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::LUP_TO_LMIDDLE); + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::LUP_TO_LMIDDLE); Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTUP); Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFT); Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::LUP_TO_LMIDDLE_START); @@ -267,7 +278,7 @@ HRESULT CPlayerRobe::Ready_Components() Helper_RouteJointGenerater(PHYSX_JOINT::D6, Desc_Body, Desc_Route, xmAnchorMatricesWorld); } { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::RSIDEUP_TO_RSIDE); + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::RSIDEUP_TO_RSIDE); Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTSIDEUP); Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTSIDE); Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::RSIDEUP_TO_RSIDE_START); @@ -275,7 +286,7 @@ HRESULT CPlayerRobe::Ready_Components() Helper_RouteJointGenerater(PHYSX_JOINT::D6, Desc_Body, Desc_Route, xmAnchorMatricesWorld); } { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::LSIDEUP_TO_LSIDE); + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::LSIDEUP_TO_LSIDE); Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTSIDEUP); Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTSIDE); Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::LSIDEUP_TO_LSIDE_START); @@ -286,7 +297,7 @@ HRESULT CPlayerRobe::Ready_Components() /*MIDDLE_TO_DOWN*/ { { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::RMIDDLE_TO_RR); + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::RMIDDLE_TO_RR); Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHT); Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTDOWN); Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::RMIDDLE_TO_RR_START); @@ -294,7 +305,7 @@ HRESULT CPlayerRobe::Ready_Components() Helper_RouteJointGenerater(PHYSX_JOINT::D6, Desc_Body, Desc_Route, xmAnchorMatricesWorld); } { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::RSIDE_TO_R); + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::RSIDE_TO_R); Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTSIDE); Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTDOWNSIDE); Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::RSIDE_TO_R_START); @@ -302,7 +313,7 @@ HRESULT CPlayerRobe::Ready_Components() Helper_RouteJointGenerater(PHYSX_JOINT::D6, Desc_Body, Desc_Route, xmAnchorMatricesWorld); } { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::TMIDDLE_TO_TR); + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::TMIDDLE_TO_TR); Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAIL); Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILRIGHTDOWN); Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::TMIDDLE_TO_TR_START); @@ -310,7 +321,7 @@ HRESULT CPlayerRobe::Ready_Components() Helper_RouteJointGenerater(PHYSX_JOINT::D6, Desc_Body, Desc_Route, xmAnchorMatricesWorld); } { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::TMIDDLE_TO_TL); + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::TMIDDLE_TO_TL); Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAIL); Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILLEFTDOWN); Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::TMIDDLE_TO_TL_START); @@ -318,7 +329,7 @@ HRESULT CPlayerRobe::Ready_Components() Helper_RouteJointGenerater(PHYSX_JOINT::D6, Desc_Body, Desc_Route, xmAnchorMatricesWorld); } { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::LSIDE_TO_L); + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::LSIDE_TO_L); Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTSIDE); Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTDOWNSIDE); Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::LSIDE_TO_L_START); @@ -326,7 +337,7 @@ HRESULT CPlayerRobe::Ready_Components() Helper_RouteJointGenerater(PHYSX_JOINT::D6, Desc_Body, Desc_Route, xmAnchorMatricesWorld); } { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::LMIDDLE_TO_LL); + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::LMIDDLE_TO_LL); Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFT); Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTDOWN); Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::LMIDDLE_TO_LL_START); @@ -334,7 +345,7 @@ HRESULT CPlayerRobe::Ready_Components() Helper_RouteJointGenerater(PHYSX_JOINT::D6, Desc_Body, Desc_Route, xmAnchorMatricesWorld); } { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::LMIDDLE_TO_LL); + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::LMIDDLE_TO_LL); Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFT); Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTDOWN); Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::LMIDDLE_TO_LL_START); @@ -512,15 +523,26 @@ void CPlayerRobe::Free() #endif // _DEBUG SAFE_RELEASE(m_pRightLeg); SAFE_RELEASE(m_pLeftLeg); - SAFE_RELEASE(m_pRightThigh); SAFE_RELEASE(m_pLeftThigh); + SAFE_RELEASE(m_pRightThigh); SAFE_RELEASE(m_pLower0Bound); SAFE_RELEASE(m_pLower1Bound); SAFE_RELEASE(m_pRobeMainAnchor); - for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::END); ++i) { - SAFE_RELEASE(m_pRobeJointRoute[i]); + for (_uint i = 0; i < ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::END); ++i) { + SAFE_RELEASE(m_pRobeVerticalJointRoute[i]); + } + for (_uint i = 0; i < ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::END); ++i) { + SAFE_RELEASE(m_pRobeFixedJointRoute[i]); } for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) { SAFE_RELEASE(m_pRobeJointAnchor[i]); } + if (nullptr != m_pMainShape) { + m_pMainShape.release(); + m_pMainShape = nullptr; + } + if (nullptr != m_pSubShape) { + m_pSubShape.release(); + m_pSubShape = nullptr; + } } diff --git a/Jusin154_Team3D/Client/Private/Ranrok.cpp b/Jusin154_Team3D/Client/Private/Ranrok.cpp index 3d178c82b..4e8d24960 100644 --- a/Jusin154_Team3D/Client/Private/Ranrok.cpp +++ b/Jusin154_Team3D/Client/Private/Ranrok.cpp @@ -660,6 +660,9 @@ HRESULT CRanrok::Render_Nonblend() if (FAILED(m_pModelCom->Render(i))) { return E_FAIL; } + if (true == m_bDrawOutLine) { + m_pGameInstance->End_OutLine_Write(); + } } /*if (m_bDrawOutLine) { diff --git a/Jusin154_Team3D/Client/Public/PlayerRobe.h b/Jusin154_Team3D/Client/Public/PlayerRobe.h index 4e848e756..ee1d3a0b8 100644 --- a/Jusin154_Team3D/Client/Public/PlayerRobe.h +++ b/Jusin154_Team3D/Client/Public/PlayerRobe.h @@ -59,9 +59,12 @@ class CPlayerRobe final : public CPartObject CRigidBody_Dynamic* m_pLower0Bound = { nullptr }; CRigidBody_Dynamic* m_pLower1Bound = { nullptr }; CRigidBody_Dynamic* m_pRobeMainAnchor = { nullptr }; - CRigidBody_Dynamic* m_pRobeJointRoute[ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::END)] = { nullptr }; + + CRigidBody_Dynamic* m_pRobeVerticalJointRoute[ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::END)] = { nullptr }; + CRigidBody_Dynamic* m_pRobeFixedJointRoute[ENUM_CLASS(PLAYER_ROUTE_HORIZONTAL_ORDER::END)] = { nullptr }; CRigidBody_Dynamic* m_pRobeJointAnchor[ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END)] = { nullptr }; - PSX::PxJoint* m_pDynamicJoints[ENUM_CLASS(PLAYER_JOINT_ORDER::END)] = { nullptr }; + PSX::PxD6Joint* m_pDynamicJoints[ENUM_CLASS(PLAYER_JOINT_ORDER::END)] = { nullptr }; + PSX::PxFixedJoint* m_pFixedJoints[ENUM_CLASS(PLAYER_JOINT_HORIZONTAL_ORDER::END)] = { nullptr }; D6JOINTDESC m_JointDescriptions[ENUM_CLASS(PLAYER_JOINT_ORDER::END)] = { }; vector<_float4x4> m_PrevRobeBoneMatrices = { }; diff --git a/Jusin154_Team3D/Client/Public/Player_ENUM.h b/Jusin154_Team3D/Client/Public/Player_ENUM.h index 4ad529593..73fa76841 100644 --- a/Jusin154_Team3D/Client/Public/Player_ENUM.h +++ b/Jusin154_Team3D/Client/Public/Player_ENUM.h @@ -71,6 +71,40 @@ enum class PLAYER_JOINT_BONE_ORDER { , END }; +enum class PLAYER_JOINT_HORIZONTAL_ORDER { + +#pragma region UP_HORIZONTAL + UP_R_RS_START + , UP_R_RS_END + , UP_RS_T_START + , UP_RS_T_END + , UP_T_LS_START + , UP_T_LS_END + , UP_LS_L_START + , UP_LS_L_END +#pragma endregion +#pragma region MIDDLE_HORIZONTAL + , MIDDLE_R_RS_START + , MIDDLE_R_RS_END + , MIDDLE_RS_T_START + , MIDDLE_RS_T_END + , MIDDLE_T_LS_START + , MIDDLE_T_LS_END + , MIDDLE_LS_L_START + , MIDDLE_LS_L_END +#pragma endregion +#pragma region DOWN_HORIZONTAL + , DOWN_R_RS_START + , DOWN_R_RS_END + , DOWN_RS_T_START + , DOWN_RS_T_END + , DOWN_T_LS_START + , DOWN_T_LS_END + , DOWN_LS_L_START + , DOWN_LS_L_END +#pragma endregion + , END +}; enum class PLAYER_JOINT_ORDER { #pragma region ORIGIN_TO_UP ORIGIN_TO_RUP_START @@ -122,41 +156,16 @@ enum class PLAYER_JOINT_ORDER { , LSIDE_TO_L_START , LSIDE_TO_L_END -#pragma endregion -#pragma region UP_HORIZONTAL - , UP_R_RS_START - , UP_R_RS_END - , UP_RS_T_START - , UP_RS_T_END - , UP_T_LS_START - , UP_T_LS_END - , UP_LS_L_START - , UP_LS_L_END -#pragma endregion -#pragma region MIDDLE_HORIZONTAL - , MIDDLE_R_RS_START - , MIDDLE_R_RS_END - , MIDDLE_RS_T_START - , MIDDLE_RS_T_END - , MIDDLE_T_LS_START - , MIDDLE_T_LS_END - , MIDDLE_LS_L_START - , MIDDLE_LS_L_END -#pragma endregion -#pragma region DOWN_HORIZONTAL - , DOWN_R_RS_START - , DOWN_R_RS_END - , DOWN_RS_T_START - , DOWN_RS_T_END - , DOWN_T_LS_START - , DOWN_T_LS_END - , DOWN_LS_L_START - , DOWN_LS_L_END #pragma endregion , END }; -enum class PLAYER_JOINT_ROUTE_ORDER { +enum class PLAYER_ROUTE_HORIZONTAL_ORDER { + da, + END +}; + +enum class PLAYER_ROUTE_VERTICAL_ORDER { ORIGIN_TO_RUP , ORIGIN_TO_TUP , ORIGIN_TO_LUP diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_AvadaKedavra.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_AvadaKedavra.fbx index 6a6ca843f..9be5039ec 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_AvadaKedavra.fbx +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_AvadaKedavra.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a675d9c736c93922ae2058a24982074f2593cc8cd6f584a51c1a93c398b39101 +oid sha256:8fc5792af9353309a5791d793b869418fc4cb5c8d03d2e21b241cda92d93e235 size 6579084 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_OpenDoor.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_OpenDoor.bin index f746f425e..864a8893d 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_OpenDoor.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_OpenDoor.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:407209a0587422e75ddc3cf5ec0b06e3b49cb66d14af4bcf55b817a2f7802596 -size 10446291 +oid sha256:4d05b034196df340038c767a70317f3a4391c913a9f5c10518c1da3963f1ceb6 +size 10837383 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_OpenDoor.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_OpenDoor.fbx index d605634fb..057cbb1b4 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_OpenDoor.fbx +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_OpenDoor.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aa0598d4e3883f2ca4b8e4a5afe4bc121034a734bbd24e681d2b68f53c96dbed -size 7670460 +oid sha256:ae3c437a5201ddb26c276d6f278bd1d5e8e627240766b1761ed68d762a921aa8 +size 7862876 diff --git a/Jusin154_Team3D/Editor/Private/Loader_ObjectViewer.cpp b/Jusin154_Team3D/Editor/Private/Loader_ObjectViewer.cpp index 3ea4c963e..975ecf091 100644 --- a/Jusin154_Team3D/Editor/Private/Loader_ObjectViewer.cpp +++ b/Jusin154_Team3D/Editor/Private/Loader_ObjectViewer.cpp @@ -110,10 +110,10 @@ HRESULT CLoader::Loading_For_ObjectViewer() // CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable.bin", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) // return E_FAIL; - futures.emplace_back(Deferred_ModelLoad( - MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/SubTroll/troll.bin", XMMatrixIdentity(), - TEXT("Prototype_Component_troll_Model") - )); + //futures.emplace_back(Deferred_ModelLoad( + // MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/SubTroll/troll.bin", XMMatrixIdentity(), + // TEXT("Prototype_Component_troll_Model") + //)); //futures.emplace_back(Deferred_ModelLoad( // MODEL::ANIM, "../Bin/Resources/Models/Monster/SubTroll/troll_TrollIntro.bin", XMMatrixIdentity(), @@ -126,10 +126,10 @@ HRESULT CLoader::Loading_For_ObjectViewer() //)); - futures.emplace_back(Deferred_ModelLoad( - MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/ConjuredDragon/ConjuredDragon.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - TEXT("Prototype_Component_ConjuredDragon_Model") - )); + //futures.emplace_back(Deferred_ModelLoad( + // MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/ConjuredDragon/ConjuredDragon.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + // TEXT("Prototype_Component_ConjuredDragon_Model") + //)); //futures.emplace_back(Deferred_ModelLoad( // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), @@ -184,7 +184,7 @@ HRESULT CLoader::Loading_For_ObjectViewer() )); #pragma endregion - + futures.emplace_back(Deferred_ModelLoad( MODEL::ANIM, "../Bin/Resources/Models/Object/Reparo_Object/VFX_SK_OLI_TrollFight_BlockerA.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), @@ -244,25 +244,25 @@ HRESULT CLoader::Loading_For_ObjectViewer() #pragma region NPC - futures.emplace_back(Deferred_ModelLoad( - MODEL::ANIM, "../Bin/Resources/Models/Human/Npc/Npc.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - TEXT("Prototype_Component_Npc_Model") - )); + //futures.emplace_back(Deferred_ModelLoad( + // MODEL::ANIM, "../Bin/Resources/Models/Human/Npc/Npc.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + // TEXT("Prototype_Component_Npc_Model") + //)); - futures.emplace_back(Deferred_ModelLoad( - MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - TEXT("Prototype_Component_Professor_EleazarFig_Model") - )); + //futures.emplace_back(Deferred_ModelLoad( + // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + // TEXT("Prototype_Component_Professor_EleazarFig_Model") + //)); - futures.emplace_back(Deferred_ModelLoad( - MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - TEXT("Prototype_Component_GerboldOlivander_Model") - )); + //futures.emplace_back(Deferred_ModelLoad( + // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + // TEXT("Prototype_Component_GerboldOlivander_Model") + //)); - futures.emplace_back(Deferred_ModelLoad( - MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/VictorRookWood/VictorRookWood.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - TEXT("Prototype_Component_VictorRookWood_Model") - )); + //futures.emplace_back(Deferred_ModelLoad( + // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/VictorRookWood/VictorRookWood.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + // TEXT("Prototype_Component_VictorRookWood_Model") + //)); //futures.emplace_back(Deferred_ModelLoad( // MODEL::ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable_TrollIntro.fbx", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(), @@ -326,36 +326,37 @@ HRESULT CLoader::Loading_For_ObjectViewer() // MODEL::ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable_OpenDoor.fbx", XMMatrixIdentity(), // TEXT("Prototype_Component_Student_Cmbt_Model") //)); - futures.emplace_back(Deferred_ModelLoad( - MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/Elf/Elf.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - TEXT("Prototype_Component_Elf_Model") - )); - futures.emplace_back(Deferred_ModelLoad( - MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/Elf/Kitchen_Female/Kitchen_Female.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - TEXT("Prototype_Component_Kitchen_Female_Model") - )); - - futures.emplace_back(Deferred_ModelLoad( - MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/BaiHowin/BaiHowin.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - TEXT("Prototype_Component_BaiHowin_Model") - )); + //futures.emplace_back(Deferred_ModelLoad( + // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/Elf/Elf.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + // TEXT("Prototype_Component_Elf_Model") + //)); - futures.emplace_back(Deferred_ModelLoad( - MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/GeorgeOsric/GeorgeOsric.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - TEXT("Prototype_Component_GeorgeOsric_Model") - )); + //futures.emplace_back(Deferred_ModelLoad( + // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/Elf/Kitchen_Female/Kitchen_Female.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + // TEXT("Prototype_Component_Kitchen_Female_Model") + //)); + // + //futures.emplace_back(Deferred_ModelLoad( + // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/BaiHowin/BaiHowin.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + // TEXT("Prototype_Component_BaiHowin_Model") + //)); + + //futures.emplace_back(Deferred_ModelLoad( + // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/GeorgeOsric/GeorgeOsric.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + // TEXT("Prototype_Component_GeorgeOsric_Model") + //)); - futures.emplace_back(Deferred_ModelLoad( - MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/DinahHecat/DinahHecat.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - TEXT("Prototype_Component_DinahHecat_Model") - )); + //futures.emplace_back(Deferred_ModelLoad( + // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/DinahHecat/DinahHecat.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + // TEXT("Prototype_Component_DinahHecat_Model") + //)); - futures.emplace_back(Deferred_ModelLoad( - MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/MudiwaOnai/MudiwaOnai.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - TEXT("Prototype_Component_MudiwaOnai_Model") - )); + //futures.emplace_back(Deferred_ModelLoad( + // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/MudiwaOnai/MudiwaOnai.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + // TEXT("Prototype_Component_MudiwaOnai_Model") + //)); //futures.emplace_back(Deferred_ModelLoad( diff --git a/Jusin154_Team3D/Engine/Private/PipeLine.cpp b/Jusin154_Team3D/Engine/Private/PipeLine.cpp index 419af7f40..70572e8a9 100644 --- a/Jusin154_Team3D/Engine/Private/PipeLine.cpp +++ b/Jusin154_Team3D/Engine/Private/PipeLine.cpp @@ -522,6 +522,7 @@ void CPipeLine::Free() __super::Free(); SAFE_RELEASE(m_pDevice); SAFE_RELEASE(m_pContext); + SAFE_RELEASE(m_pPrevDSS); SAFE_RELEASE(m_pDSS_OutLineWrite); SAFE_RELEASE(m_pGameInstance); for (auto& pairSRV : m_mapGlobalSRV) { From a4e7c40dd79a303de7d688764757b02fae569199 Mon Sep 17 00:00:00 2001 From: qordlsgur <127704460+qordlsgur@users.noreply.github.com> Date: Tue, 6 Jan 2026 11:00:01 +0900 Subject: [PATCH 9/9] =?UTF-8?q?[Modify]=20UI=EB=93=A4=20=EC=8A=A4=ED=85=8C?= =?UTF-8?q?=ED=8B=B1=20=EB=A0=88=EB=B2=A8=EB=A1=9C=20=EB=B9=BC=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jusin154_Team3D/Client/Default/Client.vcxproj | 8 +- .../Client/Default/Client.vcxproj.filters | 36 ++-- .../Client/Private/Action_Panel.cpp | 32 +-- Jusin154_Team3D/Client/Private/Broom.cpp | 11 +- .../Client/Private/Broom_Panel.cpp | 14 +- .../Client/Private/Dialogue_Data.cpp | 19 +- .../Client/Private/Dialogue_Font.cpp | 188 ++++++++++-------- .../Client/Private/Enemy_Panel.cpp | 6 +- .../Client/Private/GamePlay_Canvas.cpp | 14 +- .../Client/Private/InfoInstance.cpp | 26 ++- .../Client/Private/Level_Field.cpp | 3 + Jusin154_Team3D/Client/Private/Loader.cpp | 8 +- .../Client/Private/Loading_Panel.cpp | 4 +- .../Client/Private/MiniMap_Panel.cpp | 4 +- .../Client/Private/NPCInteraction.cpp | 10 +- .../Client/Private/NPC_Ollivander.cpp | 12 ++ Jusin154_Team3D/Client/Private/Player.cpp | 15 +- .../Client/Private/Quest_Canvas.cpp | 2 +- .../Client/Private/Quest_Panel.cpp | 18 +- ...de_BboosterBar.cpp => Ride_BoosterBar.cpp} | 64 +++--- ...booster_Slot.cpp => Ride_Booster_Slot.cpp} | 40 ++-- Jusin154_Team3D/Client/Private/Ride_Panel.cpp | 41 ++-- .../Client/Private/SpellLearn_Canvas.cpp | 2 +- .../Client/Private/SpellLearn_Panel.cpp | 14 +- .../Client/Private/Spell_Canvas.cpp | 2 +- .../Client/Private/Spell_Panel.cpp | 30 +-- Jusin154_Team3D/Client/Private/UI_Manager.cpp | 62 +++++- Jusin154_Team3D/Client/Public/Action_Panel.h | 1 + Jusin154_Team3D/Client/Public/Client_Enum.h | 2 +- Jusin154_Team3D/Client/Public/Client_Struct.h | 7 +- Jusin154_Team3D/Client/Public/Dialogue_Data.h | 6 +- Jusin154_Team3D/Client/Public/Dialogue_Font.h | 9 + Jusin154_Team3D/Client/Public/InfoInstance.h | 7 +- .../Client/Public/NPC_Ollivander.h | 5 + .../{Ride_BboosterBar.h => Ride_BoosterBar.h} | 16 +- ...de_Bbooster_Slot.h => Ride_Booster_Slot.h} | 10 +- Jusin154_Team3D/Client/Public/Ride_Panel.h | 26 ++- Jusin154_Team3D/Client/Public/UI_Manager.h | 6 + .../Bin/Resources/Data/Dialogue/Dialogue.xml | 56 +++++- .../Bin/Resources/Data/Stat/NpcStat.xml | 18 +- Jusin154_Team3D/Editor/Default/Editor.vcxproj | 8 +- .../Editor/Default/Editor.vcxproj.filters | 28 +-- Jusin154_Team3D/Editor/Private/Loader.cpp | 8 +- ...de_BboosterBar.cpp => Ride_BoosterBar.cpp} | 44 ++-- ...booster_Slot.cpp => Ride_Booster_Slot.cpp} | 40 ++-- Jusin154_Team3D/Editor/Private/Ride_Panel.cpp | 12 +- .../{Ride_BboosterBar.h => Ride_BoosterBar.h} | 10 +- ...de_Bbooster_Slot.h => Ride_Booster_Slot.h} | 10 +- Jusin154_Team3D/Editor/Public/Ride_Panel.h | 4 +- Jusin154_Team3D/Engine/Private/NPCStat.cpp | 1 + Jusin154_Team3D/Engine/Private/Unit.cpp | 10 + Jusin154_Team3D/Engine/Public/NPCStat.h | 1 + Jusin154_Team3D/Engine/Public/Unit.h | 2 + 53 files changed, 652 insertions(+), 380 deletions(-) rename Jusin154_Team3D/Client/Private/{Ride_BboosterBar.cpp => Ride_BoosterBar.cpp} (80%) rename Jusin154_Team3D/Client/Private/{Ride_Bbooster_Slot.cpp => Ride_Booster_Slot.cpp} (79%) rename Jusin154_Team3D/Client/Public/{Ride_BboosterBar.h => Ride_BoosterBar.h} (77%) rename Jusin154_Team3D/Client/Public/{Ride_Bbooster_Slot.h => Ride_Booster_Slot.h} (77%) rename Jusin154_Team3D/Editor/Private/{Ride_BboosterBar.cpp => Ride_BoosterBar.cpp} (83%) rename Jusin154_Team3D/Editor/Private/{Ride_Bbooster_Slot.cpp => Ride_Booster_Slot.cpp} (79%) rename Jusin154_Team3D/Editor/Public/{Ride_BboosterBar.h => Ride_BoosterBar.h} (80%) rename Jusin154_Team3D/Editor/Public/{Ride_Bbooster_Slot.h => Ride_Booster_Slot.h} (75%) diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj index 14e466596..456378909 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj @@ -197,8 +197,8 @@ call Update_Resources.bat - - + + @@ -472,8 +472,8 @@ call Update_Resources.bat - - + + diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters index 5ce7e472a..46ac96442 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters @@ -809,11 +809,11 @@ 04.Mechanic\State\Focus\Fear - - 02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_Bbooster_Slot + + 02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_Booster_Slot - - 02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_BboosterBar + + 02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_BoosterBar 02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_HpBar @@ -841,10 +841,10 @@ 02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Nomal_Hit - + 02.GameObjects\NPC\Ally\RandomNpc - + @@ -1722,12 +1722,6 @@ {5bf233fa-6f9c-40d5-85c6-adbc7fcf7d28} - - {9c357e12-18b3-461e-b74c-76f85280796f} - - - {8b69e309-b90b-47f6-8f2d-3dd778b468fe} - {d3ad8db7-ff00-498d-ba50-aa4c38a56d4a} @@ -1751,10 +1745,16 @@ {15ea8015-5b0a-4678-bf02-55b042ef4de4} - + {88b62177-01fc-424d-a444-4fb5fd4b2db5} + + {9c357e12-18b3-461e-b74c-76f85280796f} + + + {8b69e309-b90b-47f6-8f2d-3dd778b468fe} + @@ -2511,11 +2511,11 @@ 04.Mechanic\State\Focus\Fear - - 02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_Bbooster_Slot + + 02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_Booster_Slot - - 02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_BboosterBar + + 02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_BoosterBar 02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_HpBar @@ -2543,7 +2543,7 @@ 02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Nomal_Hit - + 02.GameObjects\NPC\Ally\RandomNpc diff --git a/Jusin154_Team3D/Client/Private/Action_Panel.cpp b/Jusin154_Team3D/Client/Private/Action_Panel.cpp index 08df3b239..cb63d3bbe 100644 --- a/Jusin154_Team3D/Client/Private/Action_Panel.cpp +++ b/Jusin154_Team3D/Client/Private/Action_Panel.cpp @@ -296,82 +296,82 @@ HRESULT CAction_Panel::Ready_Components(void* pArg) HRESULT CAction_Panel::Ready_Element(void* pArg) { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pSpell_Slot)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pSpell_Slot)))) { return E_FAIL; } Add_Element(TEXT("Spell_Slot"), m_pSpell_Slot); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Overlay1)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Overlay1)))) { return E_FAIL; } Add_Element(TEXT("Spell_Overlay1"), m_pSpell_Overlay1); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Overlay2)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Overlay2)))) { return E_FAIL; } static_cast(m_pSpell_Overlay2)->MoveX(481.f); Add_Element(TEXT("Spell_Overlay2"), m_pSpell_Overlay2); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Overlay3)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Overlay3)))) { return E_FAIL; } static_cast(m_pSpell_Overlay3)->MoveX(582.f); Add_Element(TEXT("Spell_Overlay3"), m_pSpell_Overlay3); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Overlay4)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Overlay4)))) { return E_FAIL; } static_cast(m_pSpell_Overlay4)->MoveX(683.f); Add_Element(TEXT("Spell_Overlay4"), m_pSpell_Overlay4); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSlot_Number)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSlot_Number)))) { return E_FAIL; } Add_Element(TEXT("Slot_Number"), m_pSlot_Number); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pHpBarBG)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pHpBarBG)))) { return E_FAIL; } Add_Element(TEXT("HpBarBG"), m_pHpBarBG); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMagic_Meter1)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMagic_Meter1)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMagic_Meter2)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMagic_Meter2)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMagic_Meter3)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMagic_Meter3)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMagic_Meter4)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMagic_Meter4)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pLastMagic_Meter)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pLastMagic_Meter)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMagic_Icon)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMagic_Icon)))) { return E_FAIL; } Add_Element(TEXT("Magic_Icon"), m_pMagic_Icon); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_UI)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_UI)))) { return E_FAIL; } Add_Element(TEXT("Spell_UI"), m_pSpell_UI); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pPotion)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pPotion)))) { return E_FAIL; } Add_Element(TEXT("Potion"), m_pPotion); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMagic_Item)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMagic_Item)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/Broom.cpp b/Jusin154_Team3D/Client/Private/Broom.cpp index 65a9953b5..b6e7762e8 100644 --- a/Jusin154_Team3D/Client/Private/Broom.cpp +++ b/Jusin154_Team3D/Client/Private/Broom.cpp @@ -49,7 +49,7 @@ HRESULT CBroom::Initialize(void* pArg) m_pFSM->Change_State(FSMSTATE::IDLE); } - m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(0.f,-100.f, 0.f, 1.f)); + m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(0.f, -100.f, 0.f, 1.f)); m_pParentUnit = dynamic_cast(m_pOwner); @@ -83,6 +83,7 @@ void CBroom::Update(_float fTimeDelta) if (!m_pParentUnit->IsAI()) { PlayerInput(fTimeDelta); + m_pInfoInstance->Set_Broom_Booster_Timer(m_fTurboBoost); } else { m_fAITime += fTimeDelta; @@ -98,9 +99,9 @@ void CBroom::Update(_float fTimeDelta) m_bHoverToggle = true; m_fSpeed = 0.f; - if(m_pWindEffect != nullptr) + if (m_pWindEffect != nullptr) { - if(m_pWindEffect->Get_Visible() == true) // 전 프레임에 트루였다면 + if (m_pWindEffect->Get_Visible() == true) // 전 프레임에 트루였다면 { m_pWindEffect->Set_Visible(false); m_pWindEffect->Get_Effect_Info()->fSoftMask = 1.f; @@ -158,7 +159,7 @@ void CBroom::Late_Update(_float fTimeDelta) HRESULT CBroom::Render() { - if (!m_pModelCom){ + if (!m_pModelCom) { return S_OK; } @@ -304,6 +305,7 @@ void CBroom::PlayerInput(_float fTimeDelta) m_fTurboBoost = 0.f; } m_Input.bTurbo = true; + m_pInfoInstance->Event_CallBack(TEXT("BroomBooster"), &m_Input.bTurbo); } else { m_Input.bTurbo = false; @@ -321,6 +323,7 @@ void CBroom::PlayerInput(_float fTimeDelta) } } m_Input.bTurbo = false; + m_pInfoInstance->Event_CallBack(TEXT("BroomBooster"), &m_Input.bTurbo); } m_bTurbo = m_Input.bTurbo; diff --git a/Jusin154_Team3D/Client/Private/Broom_Panel.cpp b/Jusin154_Team3D/Client/Private/Broom_Panel.cpp index 938ac1392..18370b3da 100644 --- a/Jusin154_Team3D/Client/Private/Broom_Panel.cpp +++ b/Jusin154_Team3D/Client/Private/Broom_Panel.cpp @@ -142,43 +142,43 @@ HRESULT CBroom_Panel::Ready_Components(void* pArg) HRESULT CBroom_Panel::Ready_Element(void* pArg) { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pBroom_Flag)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pBroom_Flag)))) { return E_FAIL; } Add_Element(TEXT("Broom_Flag"), m_pBroom_Flag); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pBroom_Circle)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pBroom_Circle)))) { return E_FAIL; } Add_Element(TEXT("Broom_Circle"), m_pBroom_Circle); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pBroom_Scoreboard)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pBroom_Scoreboard)))) { return E_FAIL; } Add_Element(TEXT("Broom_Scoreboard"), m_pBroom_Scoreboard); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pBroom_Finish)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pBroom_Finish)))) { return E_FAIL; } Add_Element(TEXT("Broom_Fiish"), m_pBroom_Finish); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pBroom_Record)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pBroom_Record)))) { return E_FAIL; } Add_Element(TEXT("Broom_Record"), m_pBroom_Record); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pBroom_Exit)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pBroom_Exit)))) { return E_FAIL; } Add_Element(TEXT("Broom_Exit"), m_pBroom_Exit); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pBroom_Trophy)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pBroom_Trophy)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/Dialogue_Data.cpp b/Jusin154_Team3D/Client/Private/Dialogue_Data.cpp index e32387fbb..f71bc98f4 100644 --- a/Jusin154_Team3D/Client/Private/Dialogue_Data.cpp +++ b/Jusin154_Team3D/Client/Private/Dialogue_Data.cpp @@ -11,7 +11,7 @@ CDialogue_Data::CDialogue_Data() HRESULT CDialogue_Data::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex) { - Load_SpellInfo("../Bin/Resources/Data/UI/Dialogue/Dialogue.xml"); + Load_SpellInfo("../Bin/Resources/Data/Dialogue/Dialogue.xml"); return S_OK; } @@ -33,6 +33,9 @@ HRESULT CDialogue_Data::Load_SpellInfo(const _char* pFilePath) while (pDialogue) { NpcDialogue npc{}; + const char* NpcName = pDialogue->Attribute("NpcName"); + if (pDialogue) npc.pNpcName = CMyTools::ToWstring(NpcName); + pDialogue->QueryIntAttribute("NpcID", &npc.iNpcID); tinyxml2::XMLElement* pLine = pDialogue->FirstChildElement("Line"); @@ -68,19 +71,25 @@ HRESULT CDialogue_Data::Load_SpellInfo(const _char* pFilePath) pChoice = pChoice->NextSiblingElement("Choice"); } - npc.Info.push_back(line); + npc.Info.emplace(line.iLineID, line); pLine = pLine->NextSiblingElement("Line"); } - m_DialogueInfo.push_back(npc); + m_DialogueInfo.emplace(npc.pNpcName, npc); pDialogue = pDialogue->NextSiblingElement("Dialogue"); } return S_OK; } -const NPCDIALOGUEINFO& CDialogue_Data::Get_Info(_uint DialogueID) const +const NPCDIALOGUEINFO& CDialogue_Data::Get_Info(_wstring NpcName) const { - return m_DialogueInfo[DialogueID]; + auto iter = m_DialogueInfo.find(NpcName); + if (iter == m_DialogueInfo.end()) + { + return Dummy; + } + + return iter->second; } CDialogue_Data* CDialogue_Data::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) diff --git a/Jusin154_Team3D/Client/Private/Dialogue_Font.cpp b/Jusin154_Team3D/Client/Private/Dialogue_Font.cpp index 0099970ac..6ce9e85f9 100644 --- a/Jusin154_Team3D/Client/Private/Dialogue_Font.cpp +++ b/Jusin154_Team3D/Client/Private/Dialogue_Font.cpp @@ -5,154 +5,184 @@ #include "Dialogue.h" CDialogue_Font::CDialogue_Font(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) - :CGameObject(pDevice, pContext) + :CGameObject(pDevice, pContext) { } CDialogue_Font::CDialogue_Font(const CDialogue_Font& rhs) - :CGameObject(rhs), - m_pInfoInstance(CInfoInstance::GetInstance()) + :CGameObject(rhs), + m_pInfoInstance(CInfoInstance::GetInstance()) { } HRESULT CDialogue_Font::Initialize_Prototype() { - return S_OK; + return S_OK; } HRESULT CDialogue_Font::Initialize(void* pArg) { - m_pInfoInstance->Add_Event(TEXT("Dialogue"), [this](void* p) {this->Add_Text(p); }); + m_pInfoInstance->Add_Event(TEXT("Dialogue"), [this](void* p) {this->Add_Text(p); }); - for (_int i = 0; i < 5; ++i) - { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pDialogue)))) { - return E_FAIL; - } + m_pInfoInstance->Add_Event(TEXT("NpcInteract"), [this](void* p) {this->NpcInteract(*reinterpret_cast<_bool*>(p)); }); + m_pInfoInstance->Add_Event(TEXT("NPCInteractionOn"), [this](void* p) {this->NpcInfo(p); }); - m_pDialogue->Visible(true); - m_DialoguInfo.push_back(m_pDialogue); - } + for (_int i = 0; i < 5; ++i) + { + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pDialogue)))) { + return E_FAIL; + } - return S_OK; + m_pDialogue->Visible(true); + m_DialoguInfo.push_back(m_pDialogue); + } + + return S_OK; } - void CDialogue_Font::Priority_Update(_float fTimeDelta) { } void CDialogue_Font::Update(_float fTimeDelta) { - if (!m_pCurrentDialogue.empty()) - { - for (auto it = m_pCurrentDialogue.begin(); it != m_pCurrentDialogue.end();) - { - if ((*it)->Get_Hover() == false) - { - (*it)->Visible(false); - m_DialoguInfo.push_back((*it)); - it = m_pCurrentDialogue.erase(it); - } - else - { - it++; - } - } - } + if (!m_pCurrentDialogue.empty()) + { + for (auto it = m_pCurrentDialogue.begin(); it != m_pCurrentDialogue.end();) + { + if ((*it)->Get_Hover() == false) + { + (*it)->Visible(false); + m_DialoguInfo.push_back((*it)); + it = m_pCurrentDialogue.erase(it); + } + else + { + it++; + } + } + } + + if (m_bNpcInteract != m_bCurrentInteract) + { + m_bCurrentInteract = m_bNpcInteract; + m_pInfoInstance->Get_Dialogue(m_pNpcName); + } + + if (m_bNpcInteract == false) + { + if (m_bCurrentInteract == true) + m_bCurrentInteract = false; + } + } void CDialogue_Font::Late_Update(_float fTimeDelta) { - if (!m_DialoguInfo.empty()) - { - m_pGameInstance->Add_RenderGroup(RENDER::UI_OVERLAY, this); - } + if (!m_DialoguInfo.empty()) + { + m_pGameInstance->Add_RenderGroup(RENDER::UI_OVERLAY, this); + } } HRESULT CDialogue_Font::Render() { - if (!m_pCurrentDialogue.empty()) - { - for (auto it : m_pCurrentDialogue) - { - it->Render(); - } - } - return S_OK; + if (!m_pCurrentDialogue.empty()) + { + for (auto it : m_pCurrentDialogue) + { + it->Render(); + } + } + + + + return S_OK; } _vector CDialogue_Font::Get_WorldPostion() { - return _vector(); + return _vector(); } HRESULT CDialogue_Font::Bind_ShaderResources() { - return S_OK; + return S_OK; } HRESULT CDialogue_Font::Ready_Components(void* pArg) { - return S_OK; + return S_OK; } void CDialogue_Font::Add_Text(void* pArg) { - if (m_DialoguInfo.empty() == true) - return; + if (m_DialoguInfo.empty() == true) + return; - DIALOGUEINFO pInfo = *reinterpret_cast(pArg); - - CDialogue* Dialogue = m_DialoguInfo.back(); - m_DialoguInfo.pop_back(); + DIALOGUEINFO pInfo = *reinterpret_cast(pArg); - for (auto& it : m_pCurrentDialogue) - { - it->Up(); - } - - pInfo.fTime = 2.5f; - Dialogue->SizeUpdate(pInfo.pName, pInfo.pText); - Dialogue->Visible(true); - Dialogue->Set_Time(pInfo.fTime); + CDialogue* Dialogue = m_DialoguInfo.back(); + m_DialoguInfo.pop_back(); - m_pCurrentDialogue.push_front(Dialogue); + for (auto& it : m_pCurrentDialogue) + { + it->Up(); + } + + pInfo.fTime = 2.5f; + Dialogue->SizeUpdate(pInfo.pName, pInfo.pText); + Dialogue->Visible(true); + Dialogue->Set_Time(pInfo.fTime); + + m_pCurrentDialogue.push_front(Dialogue); +} + +void CDialogue_Font::NpcInfo(void* pArg) +{ + NPCINTERACTIONINFO* Info = reinterpret_cast(pArg); + m_pNpcName = Info->pName; + m_iTextID = Info->iTextID; +} + +void CDialogue_Font::NpcInteract(_bool bInteract) +{ + m_bNpcInteract = bInteract; } CDialogue_Font* CDialogue_Font::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) { - CDialogue_Font* pInstance = new CDialogue_Font(pDevice, pContext); + CDialogue_Font* pInstance = new CDialogue_Font(pDevice, pContext); - if (FAILED(pInstance->Initialize_Prototype())) - { - MSG_BOX("Failed to Created : CDialogue_Font"); - SAFE_RELEASE(pInstance); - } + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CDialogue_Font"); + SAFE_RELEASE(pInstance); + } - return pInstance; + return pInstance; } CGameObject* CDialogue_Font::Clone(void* pArg, CGameObject* pOwner) { - CDialogue_Font* pInstance = new CDialogue_Font(*this); - pInstance->m_pOwner = pOwner; - if (FAILED(pInstance->Initialize(pArg))) - { - MSG_BOX("Failed to Cloned : CDialogue_Font"); - SAFE_RELEASE(pInstance); - } + CDialogue_Font* pInstance = new CDialogue_Font(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CDialogue_Font"); + SAFE_RELEASE(pInstance); + } - return pInstance; + return pInstance; } void CDialogue_Font::Free() { - __super::Free(); + __super::Free(); - m_DialoguInfo.clear(); + m_DialoguInfo.clear(); } #ifdef _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Enemy_Panel.cpp b/Jusin154_Team3D/Client/Private/Enemy_Panel.cpp index 34b99e202..abae5f8ce 100644 --- a/Jusin154_Team3D/Client/Private/Enemy_Panel.cpp +++ b/Jusin154_Team3D/Client/Private/Enemy_Panel.cpp @@ -137,19 +137,19 @@ HRESULT CEnemy_Panel::Ready_Components(void* pArg) HRESULT CEnemy_Panel::Ready_Element(void* pArg) { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pEnemy_HpBar)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pEnemy_HpBar)))) { return E_FAIL; } Add_Element(TEXT("Enemy_HpBar"), m_pEnemy_HpBar); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pEnemy_Info)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pEnemy_Info)))) { return E_FAIL; } Add_Element(TEXT("Enemy_Info"), m_pEnemy_Info); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pBoss_HpBar)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pBoss_HpBar)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/GamePlay_Canvas.cpp b/Jusin154_Team3D/Client/Private/GamePlay_Canvas.cpp index fc6dbdfe1..3c74f95c1 100644 --- a/Jusin154_Team3D/Client/Private/GamePlay_Canvas.cpp +++ b/Jusin154_Team3D/Client/Private/GamePlay_Canvas.cpp @@ -111,43 +111,43 @@ HRESULT CGamePlay_Canvas::Ready_Components(void* pArg) HRESULT CGamePlay_Canvas::Ready_Panel(void* pArg) { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pLoading_Panel)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pLoading_Panel)))) { return E_FAIL; } Add_Panel(TEXT("LoadingPanel"), m_pLoading_Panel); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMinimap_Panel)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMinimap_Panel)))) { return E_FAIL; } Add_Panel(TEXT("MinimapPanel"), m_pMinimap_Panel); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMission_Panel)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMission_Panel)))) { return E_FAIL; } Add_Panel(TEXT("MissionPanel"), m_pMission_Panel); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pAction_Panel)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pAction_Panel)))) { return E_FAIL; } Add_Panel(TEXT("ActionPanel"), m_pAction_Panel); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pEnemy_Panel)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pEnemy_Panel)))) { return E_FAIL; } Add_Panel(TEXT("Enemy_Panel"), m_pEnemy_Panel); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pBroom_Panel)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pBroom_Panel)))) { return E_FAIL; } Add_Panel(TEXT("Broom_Panel"), m_pBroom_Panel); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pRide_Panel)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pRide_Panel)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/InfoInstance.cpp b/Jusin154_Team3D/Client/Private/InfoInstance.cpp index 5dc08865d..ea6a68cef 100644 --- a/Jusin154_Team3D/Client/Private/InfoInstance.cpp +++ b/Jusin154_Team3D/Client/Private/InfoInstance.cpp @@ -12,6 +12,7 @@ #include "NPCStat.h" #include "Player.h" #include "Dialogue_Font.h" +#include "Dialogue_Data.h" IMPLEMENT_SINGLETON(CInfoInstance) @@ -35,6 +36,7 @@ void CInfoInstance::Change_Level() m_pMapInfo->Change_Level(); m_pSkillInfo->Change_Level(); m_pInteractiveInfo->Change_Level(); + UI_Event.clear(); } CStat* CInfoInstance::Get_PlayerStatPtr() @@ -329,9 +331,14 @@ _int CInfoInstance::Get_SpellLearnIndex() return m_pSpellLearn_Data->Get_Index(); } -void CInfoInstance::Set_Font(void* pArg) +//void CInfoInstance::Set_Font(void* pArg) +//{ +// m_pDialogue_Font->Add_Text(pArg); +//} + +const NPCDIALOGUEINFO& CInfoInstance::Get_Dialogue(_wstring NpcName) const { - m_pDialogue_Font->Add_Text(pArg); + return m_pDialogue_Data->Get_Info(NpcName); } HRESULT CInfoInstance::Regist_ActiveInteractive(CMapElement_Interactable* pInteractive) @@ -365,6 +372,16 @@ _float CInfoInstance::Get_Broom_Timer() return m_fBroom_Timer; } +void CInfoInstance::Set_Broom_Booster_Timer(_float fTimer) +{ + m_fBroom_Booster = fTimer; +} + +_float CInfoInstance::Get_Broom_Booster_Timer() +{ + return m_fBroom_Booster; +} + #pragma endregion LEVEL CInfoInstance::Get_RestartLevel() { @@ -423,6 +440,10 @@ HRESULT CInfoInstance::Initialize_Information(ID3D11Device* pDevice, ID3D11Devic if (nullptr == m_pDialogue_Font) { return E_FAIL; } + m_pDialogue_Data = CDialogue_Data::Create(pDevice, pContext); + if (nullptr == m_pDialogue_Data) { + return E_FAIL; + } return S_OK; } @@ -497,6 +518,7 @@ void CInfoInstance::Release_Information() DestroyInstance(); + SAFE_RELEASE(m_pDialogue_Data); SAFE_RELEASE(m_pDialogue_Font); SAFE_RELEASE(m_pSpellLearn_Data); SAFE_RELEASE(m_pMapInfo); diff --git a/Jusin154_Team3D/Client/Private/Level_Field.cpp b/Jusin154_Team3D/Client/Private/Level_Field.cpp index 34abda90b..fcb69dc65 100644 --- a/Jusin154_Team3D/Client/Private/Level_Field.cpp +++ b/Jusin154_Team3D/Client/Private/Level_Field.cpp @@ -11,6 +11,9 @@ #include "Terrain.h" #include "SkyBox.h" #include "Ranrok.h" +#include "UI_Manager.h" + + CLevel_Field::CLevel_Field(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID) : CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) } { diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index 30a8a39e3..d04b300cc 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -153,8 +153,8 @@ #include "Ride_Info_Key.h" #include "Ride_Info.h" #include "Ride_InfoBG.h" -#include "Ride_Bbooster_Slot.h" -#include "Ride_BboosterBar.h" +#include "Ride_Booster_Slot.h" +#include "Ride_BoosterBar.h" #include "Ride_HpBar.h" #include "Ride_HpSlot.h" @@ -2826,12 +2826,12 @@ HRESULT CLoader::Loading_For_GamePlay() return E_FAIL; } /* For.Prototype_GameObject_SpellLearn_Ride_Bbooster_Slot*/ - if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRide_Bbooster_Slot::Create(m_pDevice, m_pContext)))) + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRide_Booster_Slot::Create(m_pDevice, m_pContext)))) { return E_FAIL; } /* For.Prototype_GameObject_SpellLearn_Ride_BboosterBar*/ - if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRide_BboosterBar::Create(m_pDevice, m_pContext)))) + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRide_BoosterBar::Create(m_pDevice, m_pContext)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/Loading_Panel.cpp b/Jusin154_Team3D/Client/Private/Loading_Panel.cpp index 55973eb04..f4b8b8ed9 100644 --- a/Jusin154_Team3D/Client/Private/Loading_Panel.cpp +++ b/Jusin154_Team3D/Client/Private/Loading_Panel.cpp @@ -101,13 +101,13 @@ HRESULT CLoading_Panel::Ready_Components(void* pArg) HRESULT CLoading_Panel::Ready_Element(void* pArg) { - //if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pLoadingWidget)))) + //if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pLoadingWidget)))) //{ // return E_FAIL; //} //Add_Element(TEXT("LoadingWidget"), m_pLoadingWidget); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pLoadingWidget_Flame)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pLoadingWidget_Flame)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/MiniMap_Panel.cpp b/Jusin154_Team3D/Client/Private/MiniMap_Panel.cpp index 9e6c91082..22744c680 100644 --- a/Jusin154_Team3D/Client/Private/MiniMap_Panel.cpp +++ b/Jusin154_Team3D/Client/Private/MiniMap_Panel.cpp @@ -98,12 +98,12 @@ HRESULT CMiniMap_Panel::Ready_Components(void* pArg) HRESULT CMiniMap_Panel::Ready_Element(void* pArg) { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pMiniMap_TrimBorder)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pMiniMap_TrimBorder)))) { return E_FAIL; } Add_Element(TEXT("MiniMap_TrimBorder"), m_pMiniMap_TrimBorder); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pNoMountIcon)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pNoMountIcon)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/NPCInteraction.cpp b/Jusin154_Team3D/Client/Private/NPCInteraction.cpp index 398411a21..d3154d442 100644 --- a/Jusin154_Team3D/Client/Private/NPCInteraction.cpp +++ b/Jusin154_Team3D/Client/Private/NPCInteraction.cpp @@ -97,11 +97,11 @@ void CNPCInteraction::NpcInfo(void* pArg) m_pInfo.pOwner = Info->pOwner; m_pInfo.pNPCName = Info->pNPCName; - m_pInfo.pNPCPosition = Info->pNPCPosition; + m_pInfo.fNPCPosition = Info->fNPCPosition; _vector MonsterPos = static_cast(Info->pOwner)->Get_WorldPostion(); _vector HeadPos = MonsterPos + XMVectorSet(0.5f, 2.f, 0.f, 0.f); - XMStoreFloat4(&m_pInfo.pNPCPosition, HeadPos); + XMStoreFloat4(&m_pInfo.fNPCPosition, HeadPos); } void CNPCInteraction::Priority_Update(_float fTimeDelta) @@ -110,7 +110,7 @@ void CNPCInteraction::Priority_Update(_float fTimeDelta) { _vector MonsterPos = static_cast(m_pInfo.pOwner)->Get_WorldPostion(); _vector HeadPos = XMVectorAdd(MonsterPos, XMVectorSet(0.5f, 2.f, 0.f, 0.f)); - XMStoreFloat4(&m_pInfo.pNPCPosition, HeadPos); + XMStoreFloat4(&m_pInfo.fNPCPosition, HeadPos); _vector ScreenPos = XMVector3Project( HeadPos, @@ -137,7 +137,7 @@ void CNPCInteraction::Priority_Update(_float fTimeDelta) XMStoreFloat4(&m_vFontPosition, WorldOffsetPos); m_fSize = _float3(m_fSize.x, m_fOrigin_Size.y, m_fOrigin_Size.z); m_fFontSize = 0; - m_pTransformCom->Set_State(STATE::POSITION, XMLoadFloat4(&m_pInfo.pNPCPosition)); + m_pTransformCom->Set_State(STATE::POSITION, XMLoadFloat4(&m_pInfo.fNPCPosition)); } } @@ -190,7 +190,7 @@ HRESULT CNPCInteraction::Render() m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ), TEXT("Font_size15"), TEXT("대화하기"), - XMLoadFloat4(&m_pInfo.pNPCPosition)); + XMLoadFloat4(&m_pInfo.fNPCPosition)); return S_OK; diff --git a/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp b/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp index 5454e0b4f..9673806bc 100644 --- a/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp +++ b/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp @@ -140,6 +140,16 @@ _wstring CNPC_Ollivander::Get_Name() return m_pNpcStat->Get_Stat().pNpc_Name; } +_wstring CNPC_Ollivander::Get_NpcName() +{ + return m_pNpcStat->Get_Stat().pName; +} + +_int CNPC_Ollivander::Get_TextID() +{ + return m_iNpc_DialogueTextID; +} + HRESULT CNPC_Ollivander::Bind_ShaderResources() { if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) { @@ -188,6 +198,8 @@ HRESULT CNPC_Ollivander::Initialize(void* pArg) m_pModelCom->Set_AnimationIndex(0, true); + //m_pInfoInstance->Add_Event(TEXT("NPCDialogue"), [this](void* p) {this->Get_TextID(*reinterpret_cast<_int*>(p)); }); + m_bNpc = true; return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Player.cpp b/Jusin154_Team3D/Client/Private/Player.cpp index c24ad49eb..38b5a352c 100644 --- a/Jusin154_Team3D/Client/Private/Player.cpp +++ b/Jusin154_Team3D/Client/Private/Player.cpp @@ -54,6 +54,9 @@ HRESULT CPlayer::Initialize(void* pArg) #if 진우 m_isDebugMode = true; // 디버그 무적 모드 #endif +#if 나 + m_isDebugMode = true; // 디버그 무적 모드 +#endif #endif // _DEBUG @@ -154,6 +157,14 @@ void CPlayer::Update(_float fTimeDelta) CheckMouseInput(); + if (m_pGameInstance->Key_Down(DIK_F)) + { + if (m_bNpcInteraction == true) + { + m_pInfoInstance->Event_CallBack(TEXT("NpcInteract"), &m_bNpcInteraction); + } + } + m_pInfoInstance->Set_PlayerPos(m_pTransformCom->Get_State(STATE::POSITION)); } @@ -345,9 +356,11 @@ HRESULT CPlayer::Update_RaycastElements() Info.pOwner = pFoundNPC; Info.pNPCName = static_cast(pFoundNPC)->Get_Name(); + Info.pName = static_cast(pFoundNPC)->Get_NpcName(); _float4 Pos{}; XMStoreFloat4(&Pos, static_cast(pFoundNPC)->Get_WorldPostion()); - Info.pNPCPosition = Pos; + Info.fNPCPosition = Pos; + Info.iTextID = static_cast(pFoundNPC)->Get_TextID(); m_bNpcInteraction = true; m_pInfoInstance->Event_CallBack(TEXT("NPCInteractionOn"), &Info); } diff --git a/Jusin154_Team3D/Client/Private/Quest_Canvas.cpp b/Jusin154_Team3D/Client/Private/Quest_Canvas.cpp index accca3075..9c413d948 100644 --- a/Jusin154_Team3D/Client/Private/Quest_Canvas.cpp +++ b/Jusin154_Team3D/Client/Private/Quest_Canvas.cpp @@ -90,7 +90,7 @@ HRESULT CQuest_Canvas::Ready_Components(void* pArg) HRESULT CQuest_Canvas::Ready_Panel(void* pArg) { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pQuest_Panel)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pQuest_Panel)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/Quest_Panel.cpp b/Jusin154_Team3D/Client/Private/Quest_Panel.cpp index 41e723493..b3a5ebf2f 100644 --- a/Jusin154_Team3D/Client/Private/Quest_Panel.cpp +++ b/Jusin154_Team3D/Client/Private/Quest_Panel.cpp @@ -53,7 +53,7 @@ HRESULT CQuest_Panel::Initialize(void* pArg) ElementAllVisible(true); Set_Status(); Add_Function(TEXT("Click"), [this](void* p) {this->Slot_Hover(*reinterpret_cast<_int*>(p)); }); - static_cast(m_pOwner)->Add_Function(TEXT("QuestPanelClose"), [this](void* p) {this->Slot_Hover(*reinterpret_cast<_int*>(p)); }); + //static_cast(m_pOwner)->Add_Function(TEXT("QuestPanelClose"), [this](void* p) {this->Slot_Hover(*reinterpret_cast<_int*>(p)); }); return S_OK; } @@ -170,49 +170,49 @@ HRESULT CQuest_Panel::Ready_Components(void* pArg) HRESULT CQuest_Panel::Ready_Element(void* pArg) { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Slot)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Slot)))) { return E_FAIL; } Add_Element(TEXT("Quest_Slot"), m_pQuest_Slot); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Info)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Info)))) { return E_FAIL; } Add_Element(TEXT("Quest_Info"), m_pQuest_Info); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Info_Header)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Info_Header)))) { return E_FAIL; } Add_Element(TEXT("Quest_Info_Header"), m_pQuest_Info_Header); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Info_Line)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Info_Line)))) { return E_FAIL; } Add_Element(TEXT("Quest_Info_Line"), m_pQuest_Info_Line); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Entry_Line)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Entry_Line)))) { return E_FAIL; } Add_Element(TEXT("Quest_Entry_Line"), m_pQuest_Entry_Line); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Status1)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Status1)))) { return E_FAIL; } Add_Element(TEXT("Quest_Status1"), m_pQuest_Status1); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Status2)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Status2)))) { return E_FAIL; } Add_Element(TEXT("Quest_Status2"), m_pQuest_Status2); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Status3)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Status3)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/Ride_BboosterBar.cpp b/Jusin154_Team3D/Client/Private/Ride_BoosterBar.cpp similarity index 80% rename from Jusin154_Team3D/Client/Private/Ride_BboosterBar.cpp rename to Jusin154_Team3D/Client/Private/Ride_BoosterBar.cpp index 638a37e2a..cde44a9b1 100644 --- a/Jusin154_Team3D/Client/Private/Ride_BboosterBar.cpp +++ b/Jusin154_Team3D/Client/Private/Ride_BoosterBar.cpp @@ -1,23 +1,24 @@ #include "pch.h" -#include "Ride_BboosterBar.h" +#include "Ride_BoosterBar.h" #include "GameInstance.h" +#include "InfoInstance.h" -CRide_BboosterBar::CRide_BboosterBar(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +CRide_BoosterBar::CRide_BoosterBar(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) :CElementObject(pDevice, pContext) { } -CRide_BboosterBar::CRide_BboosterBar(const CRide_BboosterBar& rhs) +CRide_BoosterBar::CRide_BoosterBar(const CRide_BoosterBar& rhs) :CElementObject(rhs) { } -HRESULT CRide_BboosterBar::Initialize_Prototype() +HRESULT CRide_BoosterBar::Initialize_Prototype() { return S_OK; } -HRESULT CRide_BboosterBar::Initialize(void* pArg) +HRESULT CRide_BoosterBar::Initialize(void* pArg) { CUIObject::UIOBJECT_DESC Desc{}; @@ -41,8 +42,8 @@ HRESULT CRide_BboosterBar::Initialize(void* pArg) m_fAlpha = 1.f; m_fAlphaTime = 10.f; m_vNine_Slice = _float4(27.f, 125.f, m_fSizeY * 0.5f, m_fSizeY * 0.5f); - m_fMaxGauge = 100.f; - m_fCurrentGauge = m_fMaxGauge; + m_fMaxGauge = 5.f; + m_fCurrentGauge = 5.f; m_fTargetGauge = m_fMaxGauge; m_fMoveSpeed = 5.f; m_fGaugeBGSize = _float2(144.f, 24.f); @@ -52,17 +53,27 @@ HRESULT CRide_BboosterBar::Initialize(void* pArg) return S_OK; } -void CRide_BboosterBar::Active(_float fTimeDelta) +void CRide_BoosterBar::Active(_float fTimeDelta) { m_fCurrentGauge = CMyTools::Lerp_f1D(m_fCurrentGauge, m_fTargetGauge, fTimeDelta * m_fMoveSpeed); } -void CRide_BboosterBar::NonActive(_float fTimeDelta) +void CRide_BoosterBar::NonActive(_float fTimeDelta) { m_fCurrentGauge = CMyTools::Lerp_f1D(m_fTargetGauge, m_fCurrentGauge, fTimeDelta * m_fMoveSpeed); } -void CRide_BboosterBar::Priority_Update(_float fTimeDelta) +void CRide_BoosterBar::Set_Gauge(_float fTime) +{ + m_fTargetGauge = fTime; +} + +void CRide_BoosterBar::Booster(_bool bBooster) +{ + m_bBooster = bBooster; +} + +void CRide_BoosterBar::Priority_Update(_float fTimeDelta) { if (!__super::Chack_Visible()) { @@ -71,7 +82,7 @@ void CRide_BboosterBar::Priority_Update(_float fTimeDelta) __super::Priority_Update(fTimeDelta); } -void CRide_BboosterBar::Update(_float fTimeDelta) +void CRide_BoosterBar::Update(_float fTimeDelta) { if (!__super::Chack_Visible()) { @@ -113,9 +124,8 @@ void CRide_BboosterBar::Update(_float fTimeDelta) m_fGaugeBar = m_fCurrentGauge / m_fMaxGauge; - if (m_pGameInstance->Mouse_Pressing(DIM_LBUTTON)) + if (m_bBooster == true) { - m_fTargetGauge -= fTimeDelta * m_fTimeMult; m_iClick = 1; } else @@ -130,7 +140,7 @@ void CRide_BboosterBar::Update(_float fTimeDelta) if (m_iClick == 0) { - m_fTargetGauge += fTimeDelta * m_fTimeMult; + //m_fTargetGauge += fTimeDelta; } if (m_iClick == 1) @@ -150,7 +160,7 @@ void CRide_BboosterBar::Update(_float fTimeDelta) __super::Update(fTimeDelta); } -void CRide_BboosterBar::Late_Update(_float fTimeDelta) +void CRide_BoosterBar::Late_Update(_float fTimeDelta) { if (!__super::Chack_Visible()) { @@ -162,7 +172,7 @@ void CRide_BboosterBar::Late_Update(_float fTimeDelta) } } -HRESULT CRide_BboosterBar::Render() +HRESULT CRide_BoosterBar::Render() { if (FAILED(Bind_ShaderResources())) { return E_FAIL; @@ -180,12 +190,12 @@ HRESULT CRide_BboosterBar::Render() return S_OK; } -_vector CRide_BboosterBar::Get_WorldPostion() +_vector CRide_BoosterBar::Get_WorldPostion() { return m_pTransformCom->Get_State(STATE::POSITION); } -HRESULT CRide_BboosterBar::Bind_ShaderResources() +HRESULT CRide_BoosterBar::Bind_ShaderResources() { if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) { @@ -270,7 +280,7 @@ HRESULT CRide_BboosterBar::Bind_ShaderResources() return S_OK; } -HRESULT CRide_BboosterBar::Ready_Components(void* pArg) +HRESULT CRide_BoosterBar::Ready_Components(void* pArg) { if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) { @@ -295,33 +305,33 @@ HRESULT CRide_BboosterBar::Ready_Components(void* pArg) return S_OK; } -CRide_BboosterBar* CRide_BboosterBar::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +CRide_BoosterBar* CRide_BoosterBar::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) { - CRide_BboosterBar* pInstance = new CRide_BboosterBar(pDevice, pContext); + CRide_BoosterBar* pInstance = new CRide_BoosterBar(pDevice, pContext); if (FAILED(pInstance->Initialize_Prototype())) { - MSG_BOX("Failed to Created : CRide_BboosterBar"); + MSG_BOX("Failed to Created : CRide_BoosterBar"); SAFE_RELEASE(pInstance); } return pInstance; } -CGameObject* CRide_BboosterBar::Clone(void* pArg, CGameObject* pOwner) +CGameObject* CRide_BoosterBar::Clone(void* pArg, CGameObject* pOwner) { - CRide_BboosterBar* pInstance = new CRide_BboosterBar(*this); + CRide_BoosterBar* pInstance = new CRide_BoosterBar(*this); pInstance->m_pOwner = pOwner; if (FAILED(pInstance->Initialize(pArg))) { - MSG_BOX("Failed to Cloned : CRide_BboosterBar"); + MSG_BOX("Failed to Cloned : CRide_BoosterBar"); SAFE_RELEASE(pInstance); } return pInstance; } -void CRide_BboosterBar::Free() +void CRide_BoosterBar::Free() { __super::Free(); @@ -333,7 +343,7 @@ void CRide_BboosterBar::Free() } #ifdef _DEBUG -void CRide_BboosterBar::Describe_Entity() +void CRide_BoosterBar::Describe_Entity() { } #endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Ride_Bbooster_Slot.cpp b/Jusin154_Team3D/Client/Private/Ride_Booster_Slot.cpp similarity index 79% rename from Jusin154_Team3D/Client/Private/Ride_Bbooster_Slot.cpp rename to Jusin154_Team3D/Client/Private/Ride_Booster_Slot.cpp index 27f2e36bb..7c1c07873 100644 --- a/Jusin154_Team3D/Client/Private/Ride_Bbooster_Slot.cpp +++ b/Jusin154_Team3D/Client/Private/Ride_Booster_Slot.cpp @@ -1,22 +1,22 @@ #include "pch.h" -#include "Ride_Bbooster_Slot.h" +#include "Ride_Booster_Slot.h" #include "GameInstance.h" -CRide_Bbooster_Slot::CRide_Bbooster_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +CRide_Booster_Slot::CRide_Booster_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) :CElementObject(pDevice, pContext) { } -CRide_Bbooster_Slot::CRide_Bbooster_Slot(const CRide_Bbooster_Slot& rhs) +CRide_Booster_Slot::CRide_Booster_Slot(const CRide_Booster_Slot& rhs) :CElementObject(rhs) { } -HRESULT CRide_Bbooster_Slot::Initialize_Prototype() +HRESULT CRide_Booster_Slot::Initialize_Prototype() { return S_OK; } -HRESULT CRide_Bbooster_Slot::Initialize(void* pArg) +HRESULT CRide_Booster_Slot::Initialize(void* pArg) { CUIObject::UIOBJECT_DESC Desc{}; @@ -44,7 +44,7 @@ HRESULT CRide_Bbooster_Slot::Initialize(void* pArg) return S_OK; } -void CRide_Bbooster_Slot::Priority_Update(_float fTimeDelta) +void CRide_Booster_Slot::Priority_Update(_float fTimeDelta) { if (!__super::Chack_Visible()) { @@ -52,7 +52,7 @@ void CRide_Bbooster_Slot::Priority_Update(_float fTimeDelta) } __super::Priority_Update(fTimeDelta); } -void CRide_Bbooster_Slot::Update(_float fTimeDelta) +void CRide_Booster_Slot::Update(_float fTimeDelta) { if (!__super::Chack_Visible()) { @@ -88,7 +88,7 @@ void CRide_Bbooster_Slot::Update(_float fTimeDelta) __super::Update(fTimeDelta); } -void CRide_Bbooster_Slot::Late_Update(_float fTimeDelta) +void CRide_Booster_Slot::Late_Update(_float fTimeDelta) { if (!__super::Chack_Visible()) { @@ -100,7 +100,7 @@ void CRide_Bbooster_Slot::Late_Update(_float fTimeDelta) } } -HRESULT CRide_Bbooster_Slot::Render() +HRESULT CRide_Booster_Slot::Render() { if (FAILED(Bind_ShaderResources())) { return E_FAIL; @@ -118,12 +118,12 @@ HRESULT CRide_Bbooster_Slot::Render() return S_OK; } -_vector CRide_Bbooster_Slot::Get_WorldPostion() +_vector CRide_Booster_Slot::Get_WorldPostion() { return m_pTransformCom->Get_State(STATE::POSITION); } -HRESULT CRide_Bbooster_Slot::Bind_ShaderResources() +HRESULT CRide_Booster_Slot::Bind_ShaderResources() { if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) { @@ -180,7 +180,7 @@ HRESULT CRide_Bbooster_Slot::Bind_ShaderResources() return S_OK; } -HRESULT CRide_Bbooster_Slot::Ready_Components(void* pArg) +HRESULT CRide_Booster_Slot::Ready_Components(void* pArg) { if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) { @@ -205,33 +205,33 @@ HRESULT CRide_Bbooster_Slot::Ready_Components(void* pArg) return S_OK; } -CRide_Bbooster_Slot* CRide_Bbooster_Slot::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +CRide_Booster_Slot* CRide_Booster_Slot::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) { - CRide_Bbooster_Slot* pInstance = new CRide_Bbooster_Slot(pDevice, pContext); + CRide_Booster_Slot* pInstance = new CRide_Booster_Slot(pDevice, pContext); if (FAILED(pInstance->Initialize_Prototype())) { - MSG_BOX("Failed to Created : CRide_Bbooster_Slot"); + MSG_BOX("Failed to Created : CRide_Booster_Slot"); SAFE_RELEASE(pInstance); } return pInstance; } -CGameObject* CRide_Bbooster_Slot::Clone(void* pArg, CGameObject* pOwner) +CGameObject* CRide_Booster_Slot::Clone(void* pArg, CGameObject* pOwner) { - CRide_Bbooster_Slot* pInstance = new CRide_Bbooster_Slot(*this); + CRide_Booster_Slot* pInstance = new CRide_Booster_Slot(*this); pInstance->m_pOwner = pOwner; if (FAILED(pInstance->Initialize(pArg))) { - MSG_BOX("Failed to Cloned : CRide_Bbooster_Slot"); + MSG_BOX("Failed to Cloned : CRide_Booster_Slot"); SAFE_RELEASE(pInstance); } return pInstance; } -void CRide_Bbooster_Slot::Free() +void CRide_Booster_Slot::Free() { __super::Free(); @@ -243,7 +243,7 @@ void CRide_Bbooster_Slot::Free() } #ifdef _DEBUG -void CRide_Bbooster_Slot::Describe_Entity() +void CRide_Booster_Slot::Describe_Entity() { } #endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Ride_Panel.cpp b/Jusin154_Team3D/Client/Private/Ride_Panel.cpp index 7d5e9cb5d..9c7a6276c 100644 --- a/Jusin154_Team3D/Client/Private/Ride_Panel.cpp +++ b/Jusin154_Team3D/Client/Private/Ride_Panel.cpp @@ -4,10 +4,11 @@ #include "Ride_Info_Key.h" #include "Ride_Info.h" #include "Ride_InfoBG.h" -#include "Ride_Bbooster_Slot.h" -#include "Ride_BboosterBar.h" +#include "Ride_Booster_Slot.h" +#include "Ride_BoosterBar.h" #include "Ride_HpBar.h" #include "Ride_HpSlot.h" +#include "InfoInstance.h" CRide_Panel::CRide_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) :CPanelObject(pDevice, pContext) @@ -15,7 +16,9 @@ CRide_Panel::CRide_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) } CRide_Panel::CRide_Panel(const CRide_Panel& rhs) - :CPanelObject(rhs) + :CPanelObject(rhs), + m_pInfoInstance(CInfoInstance::GetInstance()) + { } @@ -57,9 +60,21 @@ HRESULT CRide_Panel::Initialize(void* pArg) m_vLerp_Position = _float4(1750.f, m_fY, 0.f, 1.f); static_cast(m_pRide_Info)->Visible(false); static_cast(m_pRide_InfoBG)->Visible(false); + m_pInfoInstance->Add_Event(TEXT("BroomBooster"), [this](void* p) {this->Booster(*reinterpret_cast<_bool*>(p)); }); return S_OK; } +void CRide_Panel::Booster(_bool bBooster) +{ + m_bBooster = bBooster; + static_cast(m_pRide_BoosterBar)->Booster(m_bBooster); +} + +void CRide_Panel::Set_Gauge() +{ + static_cast(m_pRide_BoosterBar)->Set_Gauge(m_pInfoInstance->Get_Broom_Booster_Timer()); +} + void CRide_Panel::Priority_Update(_float fTimeDelta) { if (!__super::Chack_Visible()) @@ -124,6 +139,8 @@ void CRide_Panel::Update(_float fTimeDelta) static_cast(m_pRide_InfoBG)->Set_Hover(true); } + Set_Gauge(); + __super::Update(fTimeDelta); } @@ -168,43 +185,43 @@ HRESULT CRide_Panel::Ready_Components(void* pArg) HRESULT CRide_Panel::Ready_Element(void* pArg) { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_InfoBG)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_InfoBG)))) { return E_FAIL; } Add_Element(TEXT("Ride_InfoBG"), m_pRide_InfoBG); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_Info_Key)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_Info_Key)))) { return E_FAIL; } Add_Element(TEXT("Ride_Info_Key"), m_pRide_Info_Key); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_Info)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_Info)))) { return E_FAIL; } Add_Element(TEXT("Ride_Info"), m_pRide_Info); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_Bbooster_Slot)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_Booster_Slot)))) { return E_FAIL; } - Add_Element(TEXT("Ride_Bbooster_Slot"), m_pRide_Bbooster_Slot); + Add_Element(TEXT("Ride_Bbooster_Slot"), m_pRide_Booster_Slot); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_BboosterBar)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_BoosterBar)))) { return E_FAIL; } - Add_Element(TEXT("Ride_BboosterBar"), m_pRide_BboosterBar); + Add_Element(TEXT("Ride_BboosterBar"), m_pRide_BoosterBar); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_HpBar)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_HpBar)))) { return E_FAIL; } Add_Element(TEXT("Ride_HpBar"), m_pRide_HpBar); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_HpSlot)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_HpSlot)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/SpellLearn_Canvas.cpp b/Jusin154_Team3D/Client/Private/SpellLearn_Canvas.cpp index 36d8e4dd0..3fd849dcf 100644 --- a/Jusin154_Team3D/Client/Private/SpellLearn_Canvas.cpp +++ b/Jusin154_Team3D/Client/Private/SpellLearn_Canvas.cpp @@ -87,7 +87,7 @@ HRESULT CSpellLearn_Canvas::Ready_Components(void* pArg) HRESULT CSpellLearn_Canvas::Ready_Panel(void* pArg) { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pSpellLearn_Panel)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pSpellLearn_Panel)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/SpellLearn_Panel.cpp b/Jusin154_Team3D/Client/Private/SpellLearn_Panel.cpp index 71b6b8009..d16532b7c 100644 --- a/Jusin154_Team3D/Client/Private/SpellLearn_Panel.cpp +++ b/Jusin154_Team3D/Client/Private/SpellLearn_Panel.cpp @@ -303,37 +303,37 @@ HRESULT CSpellLearn_Panel::Ready_Components(void* pArg) HRESULT CSpellLearn_Panel::Ready_Element(void* pArg) { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_Name)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_Name)))) { return E_FAIL; } Add_Element(TEXT("SpellLearn_Name"), m_pSpellLearn_Name); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn)))) { return E_FAIL; } Add_Element(TEXT("SpellLearn"), m_pSpellLearn); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_MovePointer)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_MovePointer)))) { return E_FAIL; } Add_Element(TEXT("SpellLearn_MovePointer"), m_pSpellLearn_MovePointer); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_ChaserPointer)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_ChaserPointer)))) { return E_FAIL; } Add_Element(TEXT("SPellLeam_ChaserPointer"), m_pSpellLearn_ChaserPointer); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_Slot)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_Slot)))) { return E_FAIL; } Add_Element(TEXT("SpellLearn_Slot"), m_pSpellLearn_Slot); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_Overlay)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_Overlay)))) { return E_FAIL; } @@ -341,7 +341,7 @@ HRESULT CSpellLearn_Panel::Ready_Element(void* pArg) for (_int i = 0; i < 3; ++i) { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_Booster)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_Booster)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/Spell_Canvas.cpp b/Jusin154_Team3D/Client/Private/Spell_Canvas.cpp index 756b5f9af..50f88e5ba 100644 --- a/Jusin154_Team3D/Client/Private/Spell_Canvas.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_Canvas.cpp @@ -86,7 +86,7 @@ HRESULT CSpell_Canvas::Ready_Components(void* pArg) HRESULT CSpell_Canvas::Ready_Panel(void* pArg) { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pSpell_Panel)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pSpell_Panel)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/Spell_Panel.cpp b/Jusin154_Team3D/Client/Private/Spell_Panel.cpp index 4d1ad1088..3decb0b0a 100644 --- a/Jusin154_Team3D/Client/Private/Spell_Panel.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_Panel.cpp @@ -240,91 +240,91 @@ HRESULT CSpell_Panel::Ready_Components(void* pArg) HRESULT CSpell_Panel::Ready_Element(void* pArg) { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pCurrent_Spell_Slot)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pCurrent_Spell_Slot)))) { return E_FAIL; } Add_Element(TEXT("Current_Spell_Slot"), m_pCurrent_Spell_Slot); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_List)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_List)))) { return E_FAIL; } Add_Element(TEXT("Spell_List"), m_pSpell_List); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pEessential_Spell_Slot)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pEessential_Spell_Slot)))) { return E_FAIL; } Add_Element(TEXT("Eessential_Spell_Slot"), m_pEessential_Spell_Slot); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pEessential_Spell)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pEessential_Spell)))) { return E_FAIL; } Add_Element(TEXT("Eessential_Spell"), m_pEessential_Spell); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_List_Image)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_List_Image)))) { return E_FAIL; } Add_Element(TEXT("Spell_List_Image"), m_pSpell_List_Image); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_State)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_State)))) { return E_FAIL; } Add_Element(TEXT("Spell_State"), m_pSpell_State); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Hover)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Hover)))) { return E_FAIL; } Add_Element(TEXT("Spell_Hover"), m_pSpell_Hover); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Hover_Effect)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Hover_Effect)))) { return E_FAIL; } Add_Element(TEXT("Spell_Hover_Effect"), m_pSpell_Hover_Effect); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Preview)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Preview)))) { return E_FAIL; } Add_Element(TEXT("Spell_Preview"), m_pSpell_Preview); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Vidio_Border)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Vidio_Border)))) { return E_FAIL; } Add_Element(TEXT("Spell_Vidio_Border"), m_pSpell_Vidio_Border); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pCurrent_Slot_Number)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pCurrent_Slot_Number)))) { return E_FAIL; } Add_Element(TEXT("Current_Slot_Number"), m_pCurrent_Slot_Number); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Header)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Header)))) { return E_FAIL; } Add_Element(TEXT("Spell_Header"), m_pSpell_Header); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Header_Line)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Header_Line)))) { return E_FAIL; } Add_Element(TEXT("Spell_Header_Line"), m_pSpell_Header_Line); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Anim)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Anim)))) { return E_FAIL; } Add_Element(TEXT("Spell_Anim"), m_pSpell_Anim); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Drag)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Drag)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/UI_Manager.cpp b/Jusin154_Team3D/Client/Private/UI_Manager.cpp index fda823657..4d45f7164 100644 --- a/Jusin154_Team3D/Client/Private/UI_Manager.cpp +++ b/Jusin154_Team3D/Client/Private/UI_Manager.cpp @@ -58,6 +58,7 @@ HRESULT CUI_Manager::Initialize(void* pArg) m_fSortZ = 0.f; m_pInfoInstance->Set_UISTATE(m_eType); m_pInfoInstance->Add_Event(TEXT("Canvas_Change"), [this](void* p) {this->Canvas_Change(*reinterpret_cast(p)); }); + m_pInfoInstance->Add_Event(TEXT("NpcInteract"), [this](void* p) {this->NpcInteract(*reinterpret_cast<_bool*>(p)); }); return S_OK; } @@ -74,6 +75,10 @@ void CUI_Manager::Canvas_Change(UI_STATE eType) static_cast(m_pSpell_Canvas)->Visible(false); static_cast(m_pQuest_Canvas)->Visible(false); static_cast(m_pSpellLearn_Canvas)->Visible(false); + static_cast(m_pInteraction_Key)->Set_Visible(true); + static_cast(m_pNPCInteraction)->Set_Visible(true); + static_cast(m_pBroom_TargetGate)->Set_Visible(true); + static_cast(m_pDamage_Font)->Set_Visible(true); break; case UI_STATE::SPELL: @@ -100,6 +105,19 @@ void CUI_Manager::Canvas_Change(UI_STATE eType) static_cast(m_pGamePlay_Canves)->Visible(false); break; + case UI_STATE::NPC_INTERACT: + m_pMouse_Cursor->Set_Visible(false); + m_pCamera_LockOn->Set_Visible(false); + static_cast(m_pGamePlay_Canves)->Visible(false); + static_cast(m_pSpell_Canvas)->Visible(false); + static_cast(m_pQuest_Canvas)->Visible(false); + static_cast(m_pSpellLearn_Canvas)->Visible(false); + static_cast(m_pInteraction_Key)->Set_Visible(false); + static_cast(m_pNPCInteraction)->Set_Visible(false); + static_cast(m_pBroom_TargetGate)->Set_Visible(false); + static_cast(m_pDamage_Font)->Set_Visible(false); + break; + default: return; } @@ -152,6 +170,7 @@ void CUI_Manager::Update(_float fTimeDelta) if (m_bActive == false) { m_bActive = true; + m_bAlphaZero = true; if (m_eType == UI_STATE::GAMEPLAYER) { m_eType = UI_STATE::QUEST; @@ -164,6 +183,7 @@ void CUI_Manager::Update(_float fTimeDelta) } } } + if (m_eType == UI_STATE::GAMEPLAYER || m_eType == UI_STATE::SPELLLNEARN) { if (m_pGameInstance->Key_Down(DIK_ESCAPE)) @@ -171,6 +191,7 @@ void CUI_Manager::Update(_float fTimeDelta) if (m_bActive == false) { m_bActive = true; + m_bAlphaZero = true; if (m_eType == UI_STATE::GAMEPLAYER) { m_eType = UI_STATE::SPELLLNEARN; @@ -183,6 +204,27 @@ void CUI_Manager::Update(_float fTimeDelta) } } + if (m_eType == UI_STATE::GAMEPLAYER && m_bNPCInteract == true) + { + if (m_eType == UI_STATE::GAMEPLAYER) + { + Canvas_Change(UI_STATE::NPC_INTERACT); + } + + else + { + if (m_bActive == false) + { + m_bActive = true; + m_bAlphaZero = true; + if (m_eType == UI_STATE::GAMEPLAYER) + { + m_eType = UI_STATE::NPC_INTERACT; + } + } + } + } + if (m_bActive == true && m_bHover == false) { if (m_fAlpha <= 1.f) @@ -190,8 +232,9 @@ void CUI_Manager::Update(_float fTimeDelta) m_fAlpha += fTimeDelta * m_fAlphaTime; } - if (m_fAlpha > 1.f) + if (m_fAlpha > 1.f && m_bAlphaZero == true) { + m_bAlphaZero = false; m_fAlpha = 1.f; m_bFadeIn = true; Canvas_Change(m_eType); @@ -322,6 +365,11 @@ HRESULT CUI_Manager::Ready_Components(void* pArg) } Add_Canvas(TEXT("Quest_Canvas"), m_pQuest_Canvas); + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_Canvas)))) { + return E_FAIL; + } + Add_Canvas(TEXT("SpellLearn_Canvas"), m_pSpellLearn_Canvas); + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMouse_Cursor)))) { return E_FAIL; } @@ -352,12 +400,7 @@ HRESULT CUI_Manager::Ready_Components(void* pArg) } Add_Canvas(TEXT("NPCInteraction"), m_pNPCInteraction); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_Canvas)))) { - return E_FAIL; - } - Add_Canvas(TEXT("SpellLearn_Canvas"), m_pSpellLearn_Canvas); - - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pBroom_TargetGate)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pBroom_TargetGate)))) { return E_FAIL; } @@ -393,6 +436,11 @@ CGameObject* CUI_Manager::Find_Canvas(const _wstring& Name) return iter->second; } +void CUI_Manager::NpcInteract(_bool bInteract) +{ + m_bNPCInteract = bInteract; +} + CUI_Manager* CUI_Manager::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) { CUI_Manager* pInstance = new CUI_Manager(pDevice, pContext); diff --git a/Jusin154_Team3D/Client/Public/Action_Panel.h b/Jusin154_Team3D/Client/Public/Action_Panel.h index eeaa2609b..3fb8710b9 100644 --- a/Jusin154_Team3D/Client/Public/Action_Panel.h +++ b/Jusin154_Team3D/Client/Public/Action_Panel.h @@ -74,6 +74,7 @@ class CAction_Panel final : public CPanelObject CGameObject* m_pMagic_Item = { nullptr }; vector m_Magic_Meters; + //vector m_pSlot; public: static CAction_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); diff --git a/Jusin154_Team3D/Client/Public/Client_Enum.h b/Jusin154_Team3D/Client/Public/Client_Enum.h index 373602168..3b33f5275 100644 --- a/Jusin154_Team3D/Client/Public/Client_Enum.h +++ b/Jusin154_Team3D/Client/Public/Client_Enum.h @@ -36,7 +36,7 @@ namespace Client PLAYER_HAIR_DAOTHV_ToSRO, PLAYER_Suit_DSRON_ToSRO, PLAYER_EyeLash_DAOTHV_ToSRO, PLAYER_Eye_ToSRO, PLAYER_Robe_ToMRO, SHADOW, SHADOW_LEGACY , END }; - enum class UI_STATE { GAMEPLAYER, SPELL, QUEST, INVENTORY, SPELLLNEARN, END }; + enum class UI_STATE { GAMEPLAYER, SPELL, QUEST, INVENTORY, SPELLLNEARN, NPC_INTERACT, END }; enum class QUESTTYPE { MAIN, SUB, END }; enum class QUESTSTATE {NONE, ACCEPTED, CLEARED, END }; diff --git a/Jusin154_Team3D/Client/Public/Client_Struct.h b/Jusin154_Team3D/Client/Public/Client_Struct.h index e202943a2..f397d777f 100644 --- a/Jusin154_Team3D/Client/Public/Client_Struct.h +++ b/Jusin154_Team3D/Client/Public/Client_Struct.h @@ -55,8 +55,9 @@ namespace Client typedef struct NpcDialogue { + _wstring pNpcName; _int iNpcID{}; - vector Info; + unordered_map<_int, CURRENTDIALOGUEINFO> Info; }NPCDIALOGUEINFO; typedef struct tagLockOnInfo { @@ -69,7 +70,9 @@ namespace Client { CGameObject* pOwner = { nullptr }; _wstring pNPCName; - _float4 pNPCPosition{}; + _wstring pName; + _float4 fNPCPosition{}; + _int iTextID{}; }NPCINTERACTIONINFO; typedef struct tagUnitInfo diff --git a/Jusin154_Team3D/Client/Public/Dialogue_Data.h b/Jusin154_Team3D/Client/Public/Dialogue_Data.h index a9abb91a3..0e33c3d1e 100644 --- a/Jusin154_Team3D/Client/Public/Dialogue_Data.h +++ b/Jusin154_Team3D/Client/Public/Dialogue_Data.h @@ -25,14 +25,14 @@ class CDialogue_Data final : public CBase HRESULT Load_SpellInfo(const _char* pFilePath); public: - const NPCDIALOGUEINFO& Get_Info(_uint DialogueID) const; + const NPCDIALOGUEINFO& Get_Info(_wstring NpcName) const; private: CInfoInstance* m_pInfoInstance = { nullptr }; _int m_iDialogue_Count{}; - vector m_DialogueInfo; - + map<_wstring, NPCDIALOGUEINFO> m_DialogueInfo; + NPCDIALOGUEINFO Dummy{}; private: HRESULT Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex); diff --git a/Jusin154_Team3D/Client/Public/Dialogue_Font.h b/Jusin154_Team3D/Client/Public/Dialogue_Font.h index 6257c3ead..0f36f010b 100644 --- a/Jusin154_Team3D/Client/Public/Dialogue_Font.h +++ b/Jusin154_Team3D/Client/Public/Dialogue_Font.h @@ -41,6 +41,10 @@ class CDialogue_Font final : public CGameObject public: void Add_Text(void* pArg); +private: + void NpcInfo(void* pArg); + void NpcInteract(_bool bInteract); + private: CInfoInstance* m_pInfoInstance = { nullptr }; @@ -49,6 +53,11 @@ class CDialogue_Font final : public CGameObject vector m_DialoguInfo; deque m_pCurrentDialogue; + _bool m_bNpcInteract = { false }; + _bool m_bCurrentInteract = { false }; + _wstring m_pNpcName; + _int m_iTextID{}; + public: static CDialogue_Font* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Client/Public/InfoInstance.h b/Jusin154_Team3D/Client/Public/InfoInstance.h index db4f62a8f..e7a51c7c7 100644 --- a/Jusin154_Team3D/Client/Public/InfoInstance.h +++ b/Jusin154_Team3D/Client/Public/InfoInstance.h @@ -86,7 +86,8 @@ DECLARE_SINGLETON(CInfoInstance) _int Get_SpellLearnIndex(); #pragma endregion #pragma region Dialogue_Font - void Set_Font(void* pArg); + //void Set_Font(void* pArg); + const NPCDIALOGUEINFO& Get_Dialogue(_wstring NpcName) const; #pragma endregion HRESULT Regist_ActiveInteractive(class CMapElement_Interactable* pInteractive); HRESULT Deregist_ActiveInteractive(class CMapElement_Interactable* pInteractive); @@ -96,6 +97,8 @@ DECLARE_SINGLETON(CInfoInstance) #pragma region BroomManager void Set_Broom_Timer(_float fTimer); _float Get_Broom_Timer(); + void Set_Broom_Booster_Timer(_float fTimer); + _float Get_Broom_Booster_Timer(); #pragma endregion private: CGameInstance* m_pGameInstance = { nullptr }; @@ -111,6 +114,7 @@ DECLARE_SINGLETON(CInfoInstance) class CDamage_Font* m_pDamage_Font = { nullptr }; class CSpellLearn_Data* m_pSpellLearn_Data = { nullptr }; class CDialogue_Font* m_pDialogue_Font = { nullptr }; + class CDialogue_Data* m_pDialogue_Data = { nullptr }; _vector m_pPlayerPos{}; @@ -118,6 +122,7 @@ DECLARE_SINGLETON(CInfoInstance) _int m_eSpell = ENUM_CLASS(SKILL_TYPE::END); _float m_fBroom_Timer{}; + _float m_fBroom_Booster{}; _float m_fDamage{}; UI_STATE m_eUI_State = { UI_STATE::END }; diff --git a/Jusin154_Team3D/Client/Public/NPC_Ollivander.h b/Jusin154_Team3D/Client/Public/NPC_Ollivander.h index ae5211035..1657e9d20 100644 --- a/Jusin154_Team3D/Client/Public/NPC_Ollivander.h +++ b/Jusin154_Team3D/Client/Public/NPC_Ollivander.h @@ -26,6 +26,9 @@ class CNPC_Ollivander final : public CUnit virtual HRESULT Render_Shadow(SHADOW eType) override; virtual void OnRayCollision(CGameObject* pCaster, _uint iCastedOrder, _float fDistance, _float3 vCastedWorldPos)override; virtual _wstring Get_Name() override; + virtual _wstring Get_NpcName() override; + void Set_TextID(_int ID) { m_iNpc_DialogueTextID = ID; } + virtual _int Get_TextID() override; protected: CInfoInstance* m_pInfoInstance = { nullptr }; @@ -34,6 +37,8 @@ class CNPC_Ollivander final : public CUnit CNPC_Ollivander* m_pNPC_Ollivander = { nullptr }; class CNPCInteraction* m_pNPCInteraction = { nullptr }; + _int m_iNpc_DialogueTextID{}; + CNPCStat* m_pNpcStat = { nullptr }; _int m_iEntered = { 0 }; diff --git a/Jusin154_Team3D/Client/Public/Ride_BboosterBar.h b/Jusin154_Team3D/Client/Public/Ride_BoosterBar.h similarity index 77% rename from Jusin154_Team3D/Client/Public/Ride_BboosterBar.h rename to Jusin154_Team3D/Client/Public/Ride_BoosterBar.h index 345927288..8ff3509e4 100644 --- a/Jusin154_Team3D/Client/Public/Ride_BboosterBar.h +++ b/Jusin154_Team3D/Client/Public/Ride_BoosterBar.h @@ -11,12 +11,12 @@ NS_END NS_BEGIN(Client) -class CRide_BboosterBar final : public CElementObject +class CRide_BoosterBar final : public CElementObject { private: - CRide_BboosterBar(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); - CRide_BboosterBar(const CRide_BboosterBar& rhs); - virtual ~CRide_BboosterBar() = default; + CRide_BoosterBar(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CRide_BoosterBar(const CRide_BoosterBar& rhs); + virtual ~CRide_BoosterBar() = default; public: virtual void Priority_Update(_float fTimeDelta); @@ -35,6 +35,10 @@ class CRide_BboosterBar final : public CElementObject void Active(_float fTimeDelta); void NonActive(_float fTimeDelta); +public: + void Set_Gauge(_float fTime); + void Booster(_bool bBooster); + private: CTexture* m_pDiffuse_TextureCom = { nullptr }; CTexture* m_pDiffuse_TextureCom1 = { nullptr }; @@ -54,8 +58,10 @@ class CRide_BboosterBar final : public CElementObject _int m_iClick{}; + _bool m_bBooster = { false }; + public: - static CRide_BboosterBar* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + static CRide_BoosterBar* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; virtual void Free() override; #ifdef _DEBUG diff --git a/Jusin154_Team3D/Client/Public/Ride_Bbooster_Slot.h b/Jusin154_Team3D/Client/Public/Ride_Booster_Slot.h similarity index 77% rename from Jusin154_Team3D/Client/Public/Ride_Bbooster_Slot.h rename to Jusin154_Team3D/Client/Public/Ride_Booster_Slot.h index 2288ec2d2..dabe50c7e 100644 --- a/Jusin154_Team3D/Client/Public/Ride_Bbooster_Slot.h +++ b/Jusin154_Team3D/Client/Public/Ride_Booster_Slot.h @@ -11,12 +11,12 @@ NS_END NS_BEGIN(Client) -class CRide_Bbooster_Slot final : public CElementObject +class CRide_Booster_Slot final : public CElementObject { private: - CRide_Bbooster_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); - CRide_Bbooster_Slot(const CRide_Bbooster_Slot& rhs); - virtual ~CRide_Bbooster_Slot() = default; + CRide_Booster_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CRide_Booster_Slot(const CRide_Booster_Slot& rhs); + virtual ~CRide_Booster_Slot() = default; public: virtual void Priority_Update(_float fTimeDelta); @@ -41,7 +41,7 @@ class CRide_Bbooster_Slot final : public CElementObject _float4 m_fImagePosi{}; public: - static CRide_Bbooster_Slot* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + static CRide_Booster_Slot* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; virtual void Free() override; #ifdef _DEBUG diff --git a/Jusin154_Team3D/Client/Public/Ride_Panel.h b/Jusin154_Team3D/Client/Public/Ride_Panel.h index 523f1ac7a..3c07eaad2 100644 --- a/Jusin154_Team3D/Client/Public/Ride_Panel.h +++ b/Jusin154_Team3D/Client/Public/Ride_Panel.h @@ -30,16 +30,24 @@ class CRide_Panel final : public CPanelObject virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; -private: - CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; +public: + void Booster(_bool bBooster); + void Set_Gauge(); + +private: + CInfoInstance* m_pInfoInstance = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + CGameObject* m_pRide_Info_Key = { nullptr }; + CGameObject* m_pRide_InfoBG = { nullptr }; + CGameObject* m_pRide_Info = { nullptr }; + CGameObject* m_pRide_Booster_Slot = { nullptr }; + CGameObject* m_pRide_BoosterBar = { nullptr }; + CGameObject* m_pRide_HpBar = { nullptr }; + CGameObject* m_pRide_HpSlot = { nullptr }; + + _bool m_bBooster = { false }; + _float m_fBoosterTimer{}; - CGameObject* m_pRide_Info_Key = { nullptr }; - CGameObject* m_pRide_InfoBG = { nullptr }; - CGameObject* m_pRide_Info = { nullptr }; - CGameObject* m_pRide_Bbooster_Slot = { nullptr }; - CGameObject* m_pRide_BboosterBar = { nullptr }; - CGameObject* m_pRide_HpBar = { nullptr }; - CGameObject* m_pRide_HpSlot = { nullptr }; public: static CRide_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Client/Public/UI_Manager.h b/Jusin154_Team3D/Client/Public/UI_Manager.h index 8c47fe56e..3f7fb53a7 100644 --- a/Jusin154_Team3D/Client/Public/UI_Manager.h +++ b/Jusin154_Team3D/Client/Public/UI_Manager.h @@ -45,6 +45,8 @@ class CUI_Manager final : public CUIObject void Add_Canvas(_wstring Name, class CGameObject* pCanvas); CGameObject* Find_Canvas(const _wstring& Name); + void NpcInteract(_bool bInteract); + private: CInfoInstance* m_pInfoInstance = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; @@ -76,6 +78,10 @@ class CUI_Manager final : public CUIObject _bool m_bCgangede = { false }; _bool m_bSpellLearn = { false }; + _bool m_bNPCInteract = { false }; + + _bool m_bAlphaZero = { false }; + public: static CUI_Manager* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Dialogue/Dialogue.xml b/Jusin154_Team3D/Editor/Bin/Resources/Data/Dialogue/Dialogue.xml index d49d0319b..bf2fec570 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Dialogue/Dialogue.xml +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Dialogue/Dialogue.xml @@ -1,11 +1,59 @@  - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Stat/NpcStat.xml b/Jusin154_Team3D/Editor/Bin/Resources/Data/Stat/NpcStat.xml index 364c376e4..35c8645be 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Stat/NpcStat.xml +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Stat/NpcStat.xml @@ -1,12 +1,12 @@  - - - - - - - - - + + + + + + + + + \ No newline at end of file diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj b/Jusin154_Team3D/Editor/Default/Editor.vcxproj index f6306c34a..b39779bd1 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj @@ -220,8 +220,8 @@ call Update_Shaders.bat - - + + @@ -494,8 +494,8 @@ call Update_Shaders.bat - - + + diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters index c6cf5fb68..8b296e780 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters @@ -637,12 +637,6 @@ {8ada79e8-727c-40c3-95dc-ce34b8924e69} - - {906987cf-14ce-4676-8ca7-a68b6b2c29b6} - - - {12d83369-3413-478f-920e-c3c0ddeabfe8} - {353f9458-6fe9-4159-a1c6-1f3a85cffda9} @@ -751,6 +745,12 @@ {d276d751-77aa-423e-9499-c63875e36266} + + {906987cf-14ce-4676-8ca7-a68b6b2c29b6} + + + {12d83369-3413-478f-920e-c3c0ddeabfe8} + @@ -1497,11 +1497,11 @@ 50.UI\GamePlay_Canvas\Ride_Panel\Ride_HpBar - - 50.UI\GamePlay_Canvas\Ride_Panel\Ride_Bbooster_Slot + + 50.UI\GamePlay_Canvas\Ride_Panel\Ride_Booster_Slot - - 50.UI\GamePlay_Canvas\Ride_Panel\Ride_BboosterBar + + 50.UI\GamePlay_Canvas\Ride_Panel\Ride_BoosterBar 50.UI\GamePlay_Canvas\Ride_Panel\Ride_HpSlot @@ -2275,11 +2275,11 @@ 50.UI\GamePlay_Canvas\Ride_Panel\Ride_HpBar - - 50.UI\GamePlay_Canvas\Ride_Panel\Ride_Bbooster_Slot + + 50.UI\GamePlay_Canvas\Ride_Panel\Ride_Booster_Slot - - 50.UI\GamePlay_Canvas\Ride_Panel\Ride_BboosterBar + + 50.UI\GamePlay_Canvas\Ride_Panel\Ride_BoosterBar 50.UI\GamePlay_Canvas\Ride_Panel\Ride_HpSlot diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp index c125b1433..95d1cfca6 100644 --- a/Jusin154_Team3D/Editor/Private/Loader.cpp +++ b/Jusin154_Team3D/Editor/Private/Loader.cpp @@ -139,8 +139,8 @@ #include "Ride_Info_Key.h" #include "Ride_Info.h" #include "Ride_InfoBG.h" -#include "Ride_Bbooster_Slot.h" -#include "Ride_BboosterBar.h" +#include "Ride_Booster_Slot.h" +#include "Ride_BoosterBar.h" #include "Ride_HpBar.h" #include "Ride_HpSlot.h" @@ -1238,11 +1238,11 @@ HRESULT CLoader::Loading_For_UI() { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRide_Bbooster_Slot::Create(m_pDevice, m_pContext)))) + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRide_Booster_Slot::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRide_BboosterBar::Create(m_pDevice, m_pContext)))) + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRide_BoosterBar::Create(m_pDevice, m_pContext)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Editor/Private/Ride_BboosterBar.cpp b/Jusin154_Team3D/Editor/Private/Ride_BoosterBar.cpp similarity index 83% rename from Jusin154_Team3D/Editor/Private/Ride_BboosterBar.cpp rename to Jusin154_Team3D/Editor/Private/Ride_BoosterBar.cpp index 7e1c71227..bea793fdb 100644 --- a/Jusin154_Team3D/Editor/Private/Ride_BboosterBar.cpp +++ b/Jusin154_Team3D/Editor/Private/Ride_BoosterBar.cpp @@ -1,23 +1,23 @@ #include "pch.h" -#include "Ride_BboosterBar.h" +#include "Ride_BoosterBar.h" #include "GameInstance.h" -CRide_BboosterBar::CRide_BboosterBar(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +CRide_BoosterBar::CRide_BoosterBar(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) :CElementObject(pDevice, pContext) { } -CRide_BboosterBar::CRide_BboosterBar(const CRide_BboosterBar& rhs) +CRide_BoosterBar::CRide_BoosterBar(const CRide_BoosterBar& rhs) :CElementObject(rhs) { } -HRESULT CRide_BboosterBar::Initialize_Prototype() +HRESULT CRide_BoosterBar::Initialize_Prototype() { return S_OK; } -HRESULT CRide_BboosterBar::Initialize(void* pArg) +HRESULT CRide_BoosterBar::Initialize(void* pArg) { CUIObject::UIOBJECT_DESC Desc{}; @@ -52,17 +52,17 @@ HRESULT CRide_BboosterBar::Initialize(void* pArg) return S_OK; } -void CRide_BboosterBar::Active(_float fTimeDelta) +void CRide_BoosterBar::Active(_float fTimeDelta) { m_fCurrentGauge = CMyTools::Lerp_f1D(m_fCurrentGauge, m_fTargetGauge, fTimeDelta * m_fMoveSpeed); } -void CRide_BboosterBar::NonActive(_float fTimeDelta) +void CRide_BoosterBar::NonActive(_float fTimeDelta) { m_fCurrentGauge = CMyTools::Lerp_f1D(m_fTargetGauge, m_fCurrentGauge, fTimeDelta * m_fMoveSpeed); } -void CRide_BboosterBar::Priority_Update(_float fTimeDelta) +void CRide_BoosterBar::Priority_Update(_float fTimeDelta) { if (!__super::Chack_Visible()) { @@ -71,7 +71,7 @@ void CRide_BboosterBar::Priority_Update(_float fTimeDelta) __super::Priority_Update(fTimeDelta); } -void CRide_BboosterBar::Update(_float fTimeDelta) +void CRide_BoosterBar::Update(_float fTimeDelta) { if (!__super::Chack_Visible()) { @@ -150,7 +150,7 @@ void CRide_BboosterBar::Update(_float fTimeDelta) __super::Update(fTimeDelta); } -void CRide_BboosterBar::Late_Update(_float fTimeDelta) +void CRide_BoosterBar::Late_Update(_float fTimeDelta) { if (!__super::Chack_Visible()) { @@ -162,7 +162,7 @@ void CRide_BboosterBar::Late_Update(_float fTimeDelta) } } -HRESULT CRide_BboosterBar::Render() +HRESULT CRide_BoosterBar::Render() { if (FAILED(Bind_ShaderResources())) { return E_FAIL; @@ -180,12 +180,12 @@ HRESULT CRide_BboosterBar::Render() return S_OK; } -_vector CRide_BboosterBar::Get_WorldPostion() +_vector CRide_BoosterBar::Get_WorldPostion() { return m_pTransformCom->Get_State(STATE::POSITION); } -HRESULT CRide_BboosterBar::Bind_ShaderResources() +HRESULT CRide_BoosterBar::Bind_ShaderResources() { if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) { @@ -270,7 +270,7 @@ HRESULT CRide_BboosterBar::Bind_ShaderResources() return S_OK; } -HRESULT CRide_BboosterBar::Ready_Components(void* pArg) +HRESULT CRide_BoosterBar::Ready_Components(void* pArg) { if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) { @@ -295,33 +295,33 @@ HRESULT CRide_BboosterBar::Ready_Components(void* pArg) return S_OK; } -CRide_BboosterBar* CRide_BboosterBar::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +CRide_BoosterBar* CRide_BoosterBar::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) { - CRide_BboosterBar* pInstance = new CRide_BboosterBar(pDevice, pContext); + CRide_BoosterBar* pInstance = new CRide_BoosterBar(pDevice, pContext); if (FAILED(pInstance->Initialize_Prototype())) { - MSG_BOX("Failed to Created : CRide_BboosterBar"); + MSG_BOX("Failed to Created : CRide_BoosterBar"); SAFE_RELEASE(pInstance); } return pInstance; } -CGameObject* CRide_BboosterBar::Clone(void* pArg, CGameObject* pOwner) +CGameObject* CRide_BoosterBar::Clone(void* pArg, CGameObject* pOwner) { - CRide_BboosterBar* pInstance = new CRide_BboosterBar(*this); + CRide_BoosterBar* pInstance = new CRide_BoosterBar(*this); pInstance->m_pOwner = pOwner; if (FAILED(pInstance->Initialize(pArg))) { - MSG_BOX("Failed to Cloned : CRide_BboosterBar"); + MSG_BOX("Failed to Cloned : CRide_BoosterBar"); SAFE_RELEASE(pInstance); } return pInstance; } -void CRide_BboosterBar::Free() +void CRide_BoosterBar::Free() { __super::Free(); @@ -332,6 +332,6 @@ void CRide_BboosterBar::Free() SAFE_RELEASE(m_pVIBufferCom); } -void CRide_BboosterBar::Describe_Entity() +void CRide_BoosterBar::Describe_Entity() { } diff --git a/Jusin154_Team3D/Editor/Private/Ride_Bbooster_Slot.cpp b/Jusin154_Team3D/Editor/Private/Ride_Booster_Slot.cpp similarity index 79% rename from Jusin154_Team3D/Editor/Private/Ride_Bbooster_Slot.cpp rename to Jusin154_Team3D/Editor/Private/Ride_Booster_Slot.cpp index 4710d7fee..18e84498f 100644 --- a/Jusin154_Team3D/Editor/Private/Ride_Bbooster_Slot.cpp +++ b/Jusin154_Team3D/Editor/Private/Ride_Booster_Slot.cpp @@ -1,22 +1,22 @@ #include "pch.h" -#include "Ride_Bbooster_Slot.h" +#include "Ride_Booster_Slot.h" #include "GameInstance.h" -CRide_Bbooster_Slot::CRide_Bbooster_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +CRide_Booster_Slot::CRide_Booster_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) :CElementObject(pDevice, pContext) { } -CRide_Bbooster_Slot::CRide_Bbooster_Slot(const CRide_Bbooster_Slot& rhs) +CRide_Booster_Slot::CRide_Booster_Slot(const CRide_Booster_Slot& rhs) :CElementObject(rhs) { } -HRESULT CRide_Bbooster_Slot::Initialize_Prototype() +HRESULT CRide_Booster_Slot::Initialize_Prototype() { return S_OK; } -HRESULT CRide_Bbooster_Slot::Initialize(void* pArg) +HRESULT CRide_Booster_Slot::Initialize(void* pArg) { CUIObject::UIOBJECT_DESC Desc{}; @@ -44,7 +44,7 @@ HRESULT CRide_Bbooster_Slot::Initialize(void* pArg) return S_OK; } -void CRide_Bbooster_Slot::Priority_Update(_float fTimeDelta) +void CRide_Booster_Slot::Priority_Update(_float fTimeDelta) { if (!__super::Chack_Visible()) { @@ -52,7 +52,7 @@ void CRide_Bbooster_Slot::Priority_Update(_float fTimeDelta) } __super::Priority_Update(fTimeDelta); } -void CRide_Bbooster_Slot::Update(_float fTimeDelta) +void CRide_Booster_Slot::Update(_float fTimeDelta) { if (!__super::Chack_Visible()) { @@ -88,7 +88,7 @@ void CRide_Bbooster_Slot::Update(_float fTimeDelta) __super::Update(fTimeDelta); } -void CRide_Bbooster_Slot::Late_Update(_float fTimeDelta) +void CRide_Booster_Slot::Late_Update(_float fTimeDelta) { if (!__super::Chack_Visible()) { @@ -100,7 +100,7 @@ void CRide_Bbooster_Slot::Late_Update(_float fTimeDelta) } } -HRESULT CRide_Bbooster_Slot::Render() +HRESULT CRide_Booster_Slot::Render() { if (FAILED(Bind_ShaderResources())) { return E_FAIL; @@ -118,12 +118,12 @@ HRESULT CRide_Bbooster_Slot::Render() return S_OK; } -_vector CRide_Bbooster_Slot::Get_WorldPostion() +_vector CRide_Booster_Slot::Get_WorldPostion() { return m_pTransformCom->Get_State(STATE::POSITION); } -HRESULT CRide_Bbooster_Slot::Bind_ShaderResources() +HRESULT CRide_Booster_Slot::Bind_ShaderResources() { if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) { @@ -180,7 +180,7 @@ HRESULT CRide_Bbooster_Slot::Bind_ShaderResources() return S_OK; } -HRESULT CRide_Bbooster_Slot::Ready_Components(void* pArg) +HRESULT CRide_Booster_Slot::Ready_Components(void* pArg) { if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) { @@ -205,33 +205,33 @@ HRESULT CRide_Bbooster_Slot::Ready_Components(void* pArg) return S_OK; } -CRide_Bbooster_Slot* CRide_Bbooster_Slot::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +CRide_Booster_Slot* CRide_Booster_Slot::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) { - CRide_Bbooster_Slot* pInstance = new CRide_Bbooster_Slot(pDevice, pContext); + CRide_Booster_Slot* pInstance = new CRide_Booster_Slot(pDevice, pContext); if (FAILED(pInstance->Initialize_Prototype())) { - MSG_BOX("Failed to Created : CRide_Bbooster_Slot"); + MSG_BOX("Failed to Created : CRide_Booster_Slot"); SAFE_RELEASE(pInstance); } return pInstance; } -CGameObject* CRide_Bbooster_Slot::Clone(void* pArg, CGameObject* pOwner) +CGameObject* CRide_Booster_Slot::Clone(void* pArg, CGameObject* pOwner) { - CRide_Bbooster_Slot* pInstance = new CRide_Bbooster_Slot(*this); + CRide_Booster_Slot* pInstance = new CRide_Booster_Slot(*this); pInstance->m_pOwner = pOwner; if (FAILED(pInstance->Initialize(pArg))) { - MSG_BOX("Failed to Cloned : CRide_Bbooster_Slot"); + MSG_BOX("Failed to Cloned : CRide_Booster_Slot"); SAFE_RELEASE(pInstance); } return pInstance; } -void CRide_Bbooster_Slot::Free() +void CRide_Booster_Slot::Free() { __super::Free(); @@ -242,6 +242,6 @@ void CRide_Bbooster_Slot::Free() SAFE_RELEASE(m_pVIBufferCom); } -void CRide_Bbooster_Slot::Describe_Entity() +void CRide_Booster_Slot::Describe_Entity() { } diff --git a/Jusin154_Team3D/Editor/Private/Ride_Panel.cpp b/Jusin154_Team3D/Editor/Private/Ride_Panel.cpp index 19e1d762e..0e4a565ad 100644 --- a/Jusin154_Team3D/Editor/Private/Ride_Panel.cpp +++ b/Jusin154_Team3D/Editor/Private/Ride_Panel.cpp @@ -4,8 +4,8 @@ #include "Ride_Info_Key.h" #include "Ride_Info.h" #include "Ride_InfoBG.h" -#include "Ride_Bbooster_Slot.h" -#include "Ride_BboosterBar.h" +#include "Ride_Booster_Slot.h" +#include "Ride_BoosterBar.h" #include "Ride_HpBar.h" #include "Ride_HpSlot.h" @@ -186,17 +186,17 @@ HRESULT CRide_Panel::Ready_Element(void* pArg) } Add_Element(TEXT("Ride_Info"), m_pRide_Info); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_Bbooster_Slot)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_Booster_Slot)))) { return E_FAIL; } - Add_Element(TEXT("Ride_Bbooster_Slot"), m_pRide_Bbooster_Slot); + Add_Element(TEXT("Ride_Bbooster_Slot"), m_pRide_Booster_Slot); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_BboosterBar)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_BoosterBar)))) { return E_FAIL; } - Add_Element(TEXT("Ride_BboosterBar"), m_pRide_BboosterBar); + Add_Element(TEXT("Ride_BboosterBar"), m_pRide_BoosterBar); if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_HpBar)))) { diff --git a/Jusin154_Team3D/Editor/Public/Ride_BboosterBar.h b/Jusin154_Team3D/Editor/Public/Ride_BoosterBar.h similarity index 80% rename from Jusin154_Team3D/Editor/Public/Ride_BboosterBar.h rename to Jusin154_Team3D/Editor/Public/Ride_BoosterBar.h index 0e46616bd..cd5aa8f70 100644 --- a/Jusin154_Team3D/Editor/Public/Ride_BboosterBar.h +++ b/Jusin154_Team3D/Editor/Public/Ride_BoosterBar.h @@ -5,12 +5,12 @@ NS_BEGIN(Editor) -class CRide_BboosterBar final : public CElementObject +class CRide_BoosterBar final : public CElementObject { private: - CRide_BboosterBar(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); - CRide_BboosterBar(const CRide_BboosterBar& rhs); - virtual ~CRide_BboosterBar() = default; + CRide_BoosterBar(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CRide_BoosterBar(const CRide_BoosterBar& rhs); + virtual ~CRide_BoosterBar() = default; public: virtual void Priority_Update(_float fTimeDelta); @@ -49,7 +49,7 @@ class CRide_BboosterBar final : public CElementObject _int m_iClick{}; public: - static CRide_BboosterBar* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + static CRide_BoosterBar* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; virtual void Free() override; void Describe_Entity() override; diff --git a/Jusin154_Team3D/Editor/Public/Ride_Bbooster_Slot.h b/Jusin154_Team3D/Editor/Public/Ride_Booster_Slot.h similarity index 75% rename from Jusin154_Team3D/Editor/Public/Ride_Bbooster_Slot.h rename to Jusin154_Team3D/Editor/Public/Ride_Booster_Slot.h index a558437ce..9952a85f4 100644 --- a/Jusin154_Team3D/Editor/Public/Ride_Bbooster_Slot.h +++ b/Jusin154_Team3D/Editor/Public/Ride_Booster_Slot.h @@ -5,12 +5,12 @@ NS_BEGIN(Editor) -class CRide_Bbooster_Slot final : public CElementObject +class CRide_Booster_Slot final : public CElementObject { private: - CRide_Bbooster_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); - CRide_Bbooster_Slot(const CRide_Bbooster_Slot& rhs); - virtual ~CRide_Bbooster_Slot() = default; + CRide_Booster_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CRide_Booster_Slot(const CRide_Booster_Slot& rhs); + virtual ~CRide_Booster_Slot() = default; public: virtual void Priority_Update(_float fTimeDelta); @@ -35,7 +35,7 @@ class CRide_Bbooster_Slot final : public CElementObject _float4 m_fImagePosi{}; public: - static CRide_Bbooster_Slot* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + static CRide_Booster_Slot* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; virtual void Free() override; void Describe_Entity() override; diff --git a/Jusin154_Team3D/Editor/Public/Ride_Panel.h b/Jusin154_Team3D/Editor/Public/Ride_Panel.h index c10b00c4f..4613fe132 100644 --- a/Jusin154_Team3D/Editor/Public/Ride_Panel.h +++ b/Jusin154_Team3D/Editor/Public/Ride_Panel.h @@ -32,8 +32,8 @@ class CRide_Panel final : public CPanelObject CGameObject* m_pRide_Info_Key = { nullptr }; CGameObject* m_pRide_InfoBG = { nullptr }; CGameObject* m_pRide_Info = { nullptr }; - CGameObject* m_pRide_Bbooster_Slot = { nullptr }; - CGameObject* m_pRide_BboosterBar = { nullptr }; + CGameObject* m_pRide_Booster_Slot = { nullptr }; + CGameObject* m_pRide_BoosterBar = { nullptr }; CGameObject* m_pRide_HpBar = { nullptr }; CGameObject* m_pRide_HpSlot = { nullptr }; public: diff --git a/Jusin154_Team3D/Engine/Private/NPCStat.cpp b/Jusin154_Team3D/Engine/Private/NPCStat.cpp index fcb9499a4..8eb63279b 100644 --- a/Jusin154_Team3D/Engine/Private/NPCStat.cpp +++ b/Jusin154_Team3D/Engine/Private/NPCStat.cpp @@ -18,6 +18,7 @@ HRESULT CNPCStat::Initialize_Prototype(tinyxml2::XMLNode* pChild) auto pElement = pChild->ToElement(); pElement->QueryIntAttribute("ID", &m_NpcInfo.iID); m_NpcInfo.pNpc_Name = CMyTools::ToWstring(pElement->Attribute("Name")); + m_NpcInfo.pName = CMyTools::ToWstring(pElement->Attribute("NpcName")); pElement->QueryIntAttribute("TAG", &m_NpcInfo.iNpcType); pElement->QueryFloatAttribute("SizeX", &m_NpcInfo.fFontPos); return S_OK; diff --git a/Jusin154_Team3D/Engine/Private/Unit.cpp b/Jusin154_Team3D/Engine/Private/Unit.cpp index 33800e52a..b6f39e760 100644 --- a/Jusin154_Team3D/Engine/Private/Unit.cpp +++ b/Jusin154_Team3D/Engine/Private/Unit.cpp @@ -113,6 +113,16 @@ _wstring CUnit::Get_Name() return _wstring(); } +_wstring CUnit::Get_NpcName() +{ + return _wstring(); +} + +_int CUnit::Get_TextID() +{ + return _int(); +} + HRESULT CUnit::Ready_Components(void *pArg) { if (FAILED(__super::Ready_Components(pArg))) { diff --git a/Jusin154_Team3D/Engine/Public/NPCStat.h b/Jusin154_Team3D/Engine/Public/NPCStat.h index 97ab4669c..775c7295e 100644 --- a/Jusin154_Team3D/Engine/Public/NPCStat.h +++ b/Jusin154_Team3D/Engine/Public/NPCStat.h @@ -10,6 +10,7 @@ class ENGINE_DLL CNPCStat final : public CComponent { _int iID{}; _wstring pNpc_Name; + _wstring pName; _int iNpcType{}; _float fFontPos{}; }NPCINFO; diff --git a/Jusin154_Team3D/Engine/Public/Unit.h b/Jusin154_Team3D/Engine/Public/Unit.h index db04d0401..5d49d9084 100644 --- a/Jusin154_Team3D/Engine/Public/Unit.h +++ b/Jusin154_Team3D/Engine/Public/Unit.h @@ -54,6 +54,8 @@ class ENGINE_DLL CUnit abstract : public CContainerObject virtual _bool Get_Npc() { return m_bNpc; } virtual _wstring Get_Name(); + virtual _wstring Get_NpcName(); + virtual _int Get_TextID(); #pragma endregion protected: