From f87e2d968b67f25eafceb52c79fd4e6b34672f65 Mon Sep 17 00:00:00 2001 From: kimnuri Date: Thu, 20 Nov 2025 12:38:25 +0900 Subject: [PATCH 1/7] =?UTF-8?q?[fix]=20=EB=B6=88=ED=95=84=EC=9A=94?= =?UTF-8?q?=ED=95=9C=20=EB=A9=A4=EB=B2=84=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jusin154_Team3D/Editor/Private/Dummy_Globe.cpp | 1 - Jusin154_Team3D/Editor/Public/Dummy_Globe.h | 1 - 2 files changed, 2 deletions(-) diff --git a/Jusin154_Team3D/Editor/Private/Dummy_Globe.cpp b/Jusin154_Team3D/Editor/Private/Dummy_Globe.cpp index f4e35177b..713f37acf 100644 --- a/Jusin154_Team3D/Editor/Private/Dummy_Globe.cpp +++ b/Jusin154_Team3D/Editor/Private/Dummy_Globe.cpp @@ -53,7 +53,6 @@ HRESULT CDummy_Globe::Render() return E_FAIL; } - _uint iNumMeshes = m_pModelCom->Get_NumMeshes(); for (_uint i = 0; i < iNumMeshes; i++) diff --git a/Jusin154_Team3D/Editor/Public/Dummy_Globe.h b/Jusin154_Team3D/Editor/Public/Dummy_Globe.h index 0c88bb16d..5ed94c890 100644 --- a/Jusin154_Team3D/Editor/Public/Dummy_Globe.h +++ b/Jusin154_Team3D/Editor/Public/Dummy_Globe.h @@ -31,7 +31,6 @@ class CDummy_Globe final : public CGameObject private: CModel* m_pModelCom = { nullptr }; CShader* m_pShaderCom = { nullptr }; - _bool m_bMRO = { false }; private: virtual HRESULT Initialize_Prototype() override; From e52fe083f23c391667c5d1d6e56b52dd0fa4106a Mon Sep 17 00:00:00 2001 From: GiJungSUk Date: Thu, 20 Nov 2025 18:48:45 +0900 Subject: [PATCH 2/7] 251120 1848 commit --- .../ShaderFiles/Engine_Shader_Defines.hlsli | 252 ------------------ .../ShaderFiles/Shader_Deferred.hlsl | 2 + .../ShaderFiles/Shader_LastColor.hlsl | 2 +- .../Resources/Data/Effect/BaiscParticle.bin | 3 - .../Resources/Data/Effect/BasicParticle2.bin | 2 +- .../Bin/Resources/Data/Effect/JapImpact.bin | 3 + .../Resources/Data/Effect/JapProjectile.bin | 3 + .../Bin/Resources/Data/Effect/Package/1.bin | 3 - .../Bin/Resources/Data/Effect/Package/Jap.bin | 3 + .../Bin/Resources/Data/Effect/Smoke0.bin | 3 + .../ShaderFiles/Engine_Shader_Defines.hlsli | 252 ------------------ .../ShaderFiles/Engine_Shader_States.hlsli | 4 +- .../ShaderFiles/Shader_Deferred.hlsl | 2 + .../ShaderFiles/Shader_LastColor.hlsl | 2 +- .../ShaderFiles/Shader_VtxModelInstance.hlsl | 41 ++- Jusin154_Team3D/Editor/Default/.bin | Bin 372 -> 0 bytes Jusin154_Team3D/Editor/Default/Editor.vcxproj | 12 + .../Editor/Default/Editor.vcxproj.filters | 43 ++- .../CallBack_EffectHitBox_Behavior.cpp | 97 +++++++ .../CallBack_EffectHitBox_HitReport.cpp | 148 ++++++++++ .../Private/Dummy_PhysXEffectHitBox.cpp | 200 ++++++++++++++ .../Editor/Private/Dummy_PhysXHitBox.cpp | 170 ++++++++++++ .../Editor/Private/Dummy_PhysXPlayable.cpp | 10 + .../Editor/Private/Dummy_Plane.cpp | 2 +- Jusin154_Team3D/Editor/Private/EditEffect.cpp | 13 +- .../Editor/Private/EffectObject.cpp | 92 +++++-- .../Editor/Private/Effect_Container.cpp | 20 +- .../Editor/Private/Effect_Editor.cpp | 9 +- .../Editor/Private/Level_EffectViewer.cpp | 59 +++- Jusin154_Team3D/Editor/Private/Loader.cpp | 82 +++++- Jusin154_Team3D/Editor/Private/NomalJap.cpp | 55 +++- .../Public/CallBack_EffectHitBox_Behavior.h | 47 ++++ .../Public/CallBack_EffectHitBox_HitReport.h | 46 ++++ .../Editor/Public/Dummy_PhysXEffectHitBox.h | 61 +++++ .../Editor/Public/Dummy_PhysXHitBox.h | 54 ++++ Jusin154_Team3D/Editor/Public/Editor_Struct.h | 15 +- Jusin154_Team3D/Editor/Public/EffectObject.h | 2 +- .../Editor/Public/Effect_Container.h | 2 +- .../Editor/Public/Level_EffectViewer.h | 7 +- Jusin154_Team3D/Editor/Public/NomalJap.h | 2 +- .../ShaderFiles/Engine_Shader_Defines.hlsli | 252 ------------------ .../ShaderFiles/Engine_Shader_States.hlsli | 4 +- .../ShaderFiles/Shader_Deferred.hlsl | 2 + .../ShaderFiles/Shader_LastColor.hlsl | 2 +- .../Engine/Private/Character_Controller.cpp | 3 + Jusin154_Team3D/Engine/Private/GameObject.cpp | 2 +- .../Engine/Private/PhysX_Manager.cpp | 32 +++ Jusin154_Team3D/Engine/Private/Renderer.cpp | 14 +- Jusin154_Team3D/Engine/Public/Engine_Macro.h | 2 +- Jusin154_Team3D/Engine/Public/GameObject.h | 4 +- Jusin154_Team3D/Engine/Public/PhysX_Manager.h | 4 + 51 files changed, 1281 insertions(+), 865 deletions(-) delete mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BaiscParticle.bin create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapImpact.bin create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapProjectile.bin delete mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/1.bin create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Jap.bin create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Smoke0.bin delete mode 100644 Jusin154_Team3D/Editor/Default/.bin create mode 100644 Jusin154_Team3D/Editor/Private/CallBack_EffectHitBox_Behavior.cpp create mode 100644 Jusin154_Team3D/Editor/Private/CallBack_EffectHitBox_HitReport.cpp create mode 100644 Jusin154_Team3D/Editor/Private/Dummy_PhysXEffectHitBox.cpp create mode 100644 Jusin154_Team3D/Editor/Private/Dummy_PhysXHitBox.cpp create mode 100644 Jusin154_Team3D/Editor/Public/CallBack_EffectHitBox_Behavior.h create mode 100644 Jusin154_Team3D/Editor/Public/CallBack_EffectHitBox_HitReport.h create mode 100644 Jusin154_Team3D/Editor/Public/Dummy_PhysXEffectHitBox.h create mode 100644 Jusin154_Team3D/Editor/Public/Dummy_PhysXHitBox.h diff --git a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Engine_Shader_Defines.hlsli b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Engine_Shader_Defines.hlsli index 05b918dcc..3ce9b7364 100644 --- a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Engine_Shader_Defines.hlsli +++ b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Engine_Shader_Defines.hlsli @@ -7,258 +7,6 @@ #include "Engine_Shader_States.hlsli" #include "Engine_Shader_Functions.hlsli" -float PI = 3.14592; -sampler DefaultSampler = sampler_state -{ - Filter = MIN_MAG_MIP_LINEAR; - AddressU = wrap; - AddressV = wrap; -}; - -sampler ClampSampler = sampler_state -{ - Filter = MIN_MAG_MIP_POINT; - AddressU = clamp; - AddressV = clamp; -}; - -sampler MirrorSampler = sampler_state -{ - Filter = MIN_MAG_MIP_LINEAR; - AddressU = mirror; - AddressV = mirror; -}; - -sampler BorderZeroSampler = sampler_state -{ - Filter = MIN_MAG_MIP_POINT; - AddressU = Border; - AddressV = Border; - BorderColor = float4(0, 0, 0, 0); -}; - -sampler PointSampler = sampler_state -{ - Filter = MIN_MAG_MIP_POINT; - AddressU = wrap; - AddressV = wrap; -}; - -RasterizerState RS_Default -{ - FillMode = Solid; - CullMode = Back; -}; - -RasterizerState RS_Nocull -{ - FillMode = Solid; - CullMode = None; - FrontCounterClockwise = false; - DepthClipEnable = false; -}; - -RasterizerState RS_Nocull_Wireframe -{ - FillMode = Wireframe; - CullMode = None; - FrontCounterClockwise = false; - DepthBias = 0; - SlopeScaledDepthBias = 0.f; - DepthBiasClamp = 0.f; - DepthClipEnable = false; - ScissorEnable = false; - MultisampleEnable = false; - AntialiasedLineEnable = false; -}; - -RasterizerState RS_Scissor -{ - FillMode = Solid; - CullMode = Back; - FrontCounterClockwise = false; - ScissorEnable = true; -}; - -DepthStencilState DSS_Default -{ - DepthEnable = true; - DepthWriteMask = all; - DepthFunc = less_equal; -}; - -DepthStencilState DSS_None -{ - DepthEnable = false; - DepthWriteMask = zero; -}; - -DepthStencilState DSS_Effect -{ - DepthEnable = true; - DepthWriteMask = zero; - DepthFunc = less_equal; - StencilEnable = false; -}; - -BlendState BS_None -{ - BlendEnable[0] = false; -}; - -BlendState BS_AlphaBlend // ALPHA_BLEND -{ - BlendEnable[0] = true; - BlendEnable[1] = true; - BlendEnable[2] = true; - BlendEnable[3] = true; - BlendEnable[4] = true; - BlendEnable[5] = true; - BlendEnable[6] = true; - BlendEnable[7] = true; - - // Ac * Aa + Bc * (1 - Aa); - SrcBlend = Src_Alpha; - DestBlend = Inv_Src_Alpha; - BlendOp = Add; -}; - -BlendState BS_Blend // ADDITIVE_BLEND -{ - BlendEnable[0] = true; - BlendEnable[1] = true; - BlendEnable[2] = true; - BlendEnable[3] = true; - BlendEnable[4] = true; - BlendEnable[5] = true; - BlendEnable[6] = true; - BlendEnable[7] = true; - - // Ac * (1) + Bc * (1); - SrcBlend = one; - DestBlend = one; - BlendOp = Add; -}; - -BlendState BS_UIBlend -{ - BlendEnable[0] = true; - BlendEnable[1] = true; - BlendEnable[2] = true; - BlendEnable[3] = true; - BlendEnable[4] = true; - BlendEnable[5] = true; - BlendEnable[6] = true; - BlendEnable[7] = true; - - SrcBlend = Src_Alpha; - DestBlend = Inv_Src_Alpha; - BlendOp = Add; - - SrcBlendAlpha = One; - DestBlendAlpha = Zero; - BlendOpAlpha = Add; - - RenderTargetWriteMask[0] = 0x0F; // RGBA 모두 출력 -}; - -BlendState BS_WB_Acc -{ - BlendEnable[0] = true; - BlendEnable[1] = true; - BlendEnable[2] = true; - BlendEnable[3] = true; - BlendEnable[4] = true; - BlendEnable[5] = true; - BlendEnable[6] = true; - BlendEnable[7] = true; - - SrcBlend[0] = one; - DestBlend[0] = one; - BlendOp[0] = Add; - - SrcBlend[1] = Inv_Src_Alpha; - DestBlend[1] = Zero; - BlendOp[1] = Add; - - - SrcBlend[2] = one; - DestBlend[2] = one; - BlendOp[2] = Add; -}; - -BlendState BS_WeightBlend -{ - BlendEnable[0] = true; - BlendEnable[1] = true; - BlendEnable[2] = true; - BlendEnable[3] = true; - BlendEnable[4] = true; - BlendEnable[5] = true; - BlendEnable[6] = true; - BlendEnable[7] = true; - - - SrcBlend[0] = Src_Alpha; - DestBlend[0] = Inv_Src_Alpha; - - BlendOp[0] = Add; - - - -}; - -float ShadowVisibility_hwPCF(Texture2D ShadowMap, float4 vLightClip, float2 vShadowMapSize, float bias) -{ - float2 uv = float2(vLightClip.x / vLightClip.w, -vLightClip.y / vLightClip.w) * 0.5f + 0.5f; - float fDepthCenter = saturate(vLightClip.z / vLightClip.w); - float2 vTexel = 1.f / vShadowMapSize; - - float fVisibility = 0.f; - for (int v = -1; v <= 1; ++v) - { - for (int u = -1; u <= 1; ++u) - { - float2 vOffset = float2(u, v) * vTexel; - float fDepth = ShadowMap.Sample(DefaultSampler, uv + vOffset).x; - fVisibility += (fDepthCenter - bias > fDepth) ? 0.f : 1.f; - } - } - return fVisibility / 9.f; -} - -float GetRimLight(float3 vCamPosition, float3 vPosition, float3 vNormal, float fRimPower, float fRimStrength) -{ - float fRimLight = (1 - dot(normalize(vCamPosition - vPosition), vNormal)); - fRimLight = pow(fRimLight, fRimPower); - fRimLight = fRimLight * fRimStrength; - return fRimLight; -} - -float2 Get_MovedUV(float2 vOriginalUV, float fDeltaU, float fDeltaV, uint iIndexU, uint iIndexV) -{ - float2 vDelta = float2(fDeltaU, fDeltaV); - float2 vOffset = float2(iIndexU * fDeltaU, iIndexV * fDeltaV); - return vOriginalUV * vDelta + vOffset; -} - -float2 UV_Cutting(float2 vUV, float2 vUVCutting, int iCurrentFrame) -{ - float2 UV = vUV; // 이미지의 UV값 - - int iTotalFrame = vUVCutting.x * vUVCutting.y; // 이미지의 최대 프레임 (몇 곱하기 몇인지) - - int iFrameX = iCurrentFrame % (int) vUVCutting.x; // 현재 x축의 위치(현재 이미지의 몇번째 칸을 보여줄 지) - int iFrameY = iCurrentFrame / (int) vUVCutting.x; // 현재 y축의 위치(현재 이미지의 몇번째 줄을 보여줄 지) - - float fFreamWidth = 1.0 / vUVCutting.x; // 1.0 나누기 이미지 갯수를 해서 한칸에 얼마나 갈지 정해준다. - float fFreamHeight = 1.0 / vUVCutting.y; // 1.0 나누기 이미지 갯수를 해서 한줄에 얼마나 갈지 정해준다. - - UV.x = UV.x * fFreamWidth + iFrameX * fFreamWidth; // 먼저 uv를 0~1이 아닌 0~fFrameWidth로 만든 다음에 한칸씩 옆으로 밀어준다. - UV.y = UV.y * fFreamHeight + iFrameY * fFreamHeight; // 먼저 uv를 0~1이 아닌 0~fFrameHeight로 만든 다음에 한줄씩 밑으로 내려준다. - - return UV; -} #endif // ENGINE_SHADER_DEFINES_HLSLI diff --git a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl index a02084c27..3e4b0bbd5 100644 --- a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl +++ b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl @@ -407,6 +407,7 @@ PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In) float fVisibility_Static = ShadowVisibility_hwPCF(g_PreShadowTexture, vPreShadowPosition, float2(g_iMaxShadowWidth, g_iMaxShadowHeight), 0.0005f); Out.vBackBuffer.rgb *= lerp(0.5f, 1.f, min(fVisibility_Dynamic, fVisibility_Static)); + //float fShadowDepth = g_ShadowTexture.Sample(DefaultSampler, vTexcoord).x; //float fPreShadowDepth = g_PreShadowTexture.Sample(DefaultSampler, vPreShadowTexcoord).x; //bool IsShadow = { false }; @@ -441,6 +442,7 @@ PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In) //} //[loop] // 변수로 루프돌리려면 반드시 필요함 + for (int i = -15; i < 16; ++i) { vTexcoord.x = In.vTexcoord.x; diff --git a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_LastColor.hlsl b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_LastColor.hlsl index 5c8f5c81a..cb79ebc0b 100644 --- a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_LastColor.hlsl +++ b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_LastColor.hlsl @@ -50,7 +50,7 @@ PS_OUT_BACKBUFFER PS_OUT_LASTCOLOR(PS_IN In) Out.vBackBuffer = float4(0.f, 0.f, 0.f, 0.f); - vector vColorTexture = g_ColorTexture.Sample(ClampSampler, In.vTexcoord); + vector vColorTexture = g_ColorTexture.Sample(DefaultSampler, In.vTexcoord); if (0.f == vColorTexture.a) { diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BaiscParticle.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BaiscParticle.bin deleted file mode 100644 index 918c30892..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BaiscParticle.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5f97e1272ef22cebdc2bbc672b1267c98c6433aa7ffdf77ce3c34f71bd7c4cbd -size 606 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BasicParticle2.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BasicParticle2.bin index c9b54ca60..d3e2ee6f1 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BasicParticle2.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BasicParticle2.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:11bdf139c24c2065b691be072e6483f68870ab3a0a980f7c10aaf012a5ac75a0 +oid sha256:a1b8dbceb9ca07dc22e4737226a682a7a8db90860fe75ee7451d90ba30941797 size 606 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapImpact.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapImpact.bin new file mode 100644 index 000000000..105617a53 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapImpact.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:828c5c1282287b21341ca4cc866b70f4507da74bcfef21e80f56c1ed0c97a327 +size 659 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapProjectile.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapProjectile.bin new file mode 100644 index 000000000..049eb352e --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapProjectile.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b219de38477c95013742c4d3110c679380c3e147589a067ab8d2aceaeaf0c440 +size 642 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/1.bin deleted file mode 100644 index be9aa71f0..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/1.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:dafba43009b3809b1cf3b2886f9453f1fba5ad7c1c6551afd1dfc5634a4a245a -size 262 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Jap.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Jap.bin new file mode 100644 index 000000000..6fe41b744 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Jap.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bb36372372bf2af8134a67602cbfcb12d59453bd9de39d84dd5f6ca28e14e684 +size 178 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Smoke0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Smoke0.bin new file mode 100644 index 000000000..070ef03e6 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Smoke0.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:642666d3fbe73ddb73f32e1d8647b81b79d90fe2cd00fbb315f117b546194fc8 +size 606 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Defines.hlsli b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Defines.hlsli index 05b918dcc..3ce9b7364 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Defines.hlsli +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Defines.hlsli @@ -7,258 +7,6 @@ #include "Engine_Shader_States.hlsli" #include "Engine_Shader_Functions.hlsli" -float PI = 3.14592; -sampler DefaultSampler = sampler_state -{ - Filter = MIN_MAG_MIP_LINEAR; - AddressU = wrap; - AddressV = wrap; -}; - -sampler ClampSampler = sampler_state -{ - Filter = MIN_MAG_MIP_POINT; - AddressU = clamp; - AddressV = clamp; -}; - -sampler MirrorSampler = sampler_state -{ - Filter = MIN_MAG_MIP_LINEAR; - AddressU = mirror; - AddressV = mirror; -}; - -sampler BorderZeroSampler = sampler_state -{ - Filter = MIN_MAG_MIP_POINT; - AddressU = Border; - AddressV = Border; - BorderColor = float4(0, 0, 0, 0); -}; - -sampler PointSampler = sampler_state -{ - Filter = MIN_MAG_MIP_POINT; - AddressU = wrap; - AddressV = wrap; -}; - -RasterizerState RS_Default -{ - FillMode = Solid; - CullMode = Back; -}; - -RasterizerState RS_Nocull -{ - FillMode = Solid; - CullMode = None; - FrontCounterClockwise = false; - DepthClipEnable = false; -}; - -RasterizerState RS_Nocull_Wireframe -{ - FillMode = Wireframe; - CullMode = None; - FrontCounterClockwise = false; - DepthBias = 0; - SlopeScaledDepthBias = 0.f; - DepthBiasClamp = 0.f; - DepthClipEnable = false; - ScissorEnable = false; - MultisampleEnable = false; - AntialiasedLineEnable = false; -}; - -RasterizerState RS_Scissor -{ - FillMode = Solid; - CullMode = Back; - FrontCounterClockwise = false; - ScissorEnable = true; -}; - -DepthStencilState DSS_Default -{ - DepthEnable = true; - DepthWriteMask = all; - DepthFunc = less_equal; -}; - -DepthStencilState DSS_None -{ - DepthEnable = false; - DepthWriteMask = zero; -}; - -DepthStencilState DSS_Effect -{ - DepthEnable = true; - DepthWriteMask = zero; - DepthFunc = less_equal; - StencilEnable = false; -}; - -BlendState BS_None -{ - BlendEnable[0] = false; -}; - -BlendState BS_AlphaBlend // ALPHA_BLEND -{ - BlendEnable[0] = true; - BlendEnable[1] = true; - BlendEnable[2] = true; - BlendEnable[3] = true; - BlendEnable[4] = true; - BlendEnable[5] = true; - BlendEnable[6] = true; - BlendEnable[7] = true; - - // Ac * Aa + Bc * (1 - Aa); - SrcBlend = Src_Alpha; - DestBlend = Inv_Src_Alpha; - BlendOp = Add; -}; - -BlendState BS_Blend // ADDITIVE_BLEND -{ - BlendEnable[0] = true; - BlendEnable[1] = true; - BlendEnable[2] = true; - BlendEnable[3] = true; - BlendEnable[4] = true; - BlendEnable[5] = true; - BlendEnable[6] = true; - BlendEnable[7] = true; - - // Ac * (1) + Bc * (1); - SrcBlend = one; - DestBlend = one; - BlendOp = Add; -}; - -BlendState BS_UIBlend -{ - BlendEnable[0] = true; - BlendEnable[1] = true; - BlendEnable[2] = true; - BlendEnable[3] = true; - BlendEnable[4] = true; - BlendEnable[5] = true; - BlendEnable[6] = true; - BlendEnable[7] = true; - - SrcBlend = Src_Alpha; - DestBlend = Inv_Src_Alpha; - BlendOp = Add; - - SrcBlendAlpha = One; - DestBlendAlpha = Zero; - BlendOpAlpha = Add; - - RenderTargetWriteMask[0] = 0x0F; // RGBA 모두 출력 -}; - -BlendState BS_WB_Acc -{ - BlendEnable[0] = true; - BlendEnable[1] = true; - BlendEnable[2] = true; - BlendEnable[3] = true; - BlendEnable[4] = true; - BlendEnable[5] = true; - BlendEnable[6] = true; - BlendEnable[7] = true; - - SrcBlend[0] = one; - DestBlend[0] = one; - BlendOp[0] = Add; - - SrcBlend[1] = Inv_Src_Alpha; - DestBlend[1] = Zero; - BlendOp[1] = Add; - - - SrcBlend[2] = one; - DestBlend[2] = one; - BlendOp[2] = Add; -}; - -BlendState BS_WeightBlend -{ - BlendEnable[0] = true; - BlendEnable[1] = true; - BlendEnable[2] = true; - BlendEnable[3] = true; - BlendEnable[4] = true; - BlendEnable[5] = true; - BlendEnable[6] = true; - BlendEnable[7] = true; - - - SrcBlend[0] = Src_Alpha; - DestBlend[0] = Inv_Src_Alpha; - - BlendOp[0] = Add; - - - -}; - -float ShadowVisibility_hwPCF(Texture2D ShadowMap, float4 vLightClip, float2 vShadowMapSize, float bias) -{ - float2 uv = float2(vLightClip.x / vLightClip.w, -vLightClip.y / vLightClip.w) * 0.5f + 0.5f; - float fDepthCenter = saturate(vLightClip.z / vLightClip.w); - float2 vTexel = 1.f / vShadowMapSize; - - float fVisibility = 0.f; - for (int v = -1; v <= 1; ++v) - { - for (int u = -1; u <= 1; ++u) - { - float2 vOffset = float2(u, v) * vTexel; - float fDepth = ShadowMap.Sample(DefaultSampler, uv + vOffset).x; - fVisibility += (fDepthCenter - bias > fDepth) ? 0.f : 1.f; - } - } - return fVisibility / 9.f; -} - -float GetRimLight(float3 vCamPosition, float3 vPosition, float3 vNormal, float fRimPower, float fRimStrength) -{ - float fRimLight = (1 - dot(normalize(vCamPosition - vPosition), vNormal)); - fRimLight = pow(fRimLight, fRimPower); - fRimLight = fRimLight * fRimStrength; - return fRimLight; -} - -float2 Get_MovedUV(float2 vOriginalUV, float fDeltaU, float fDeltaV, uint iIndexU, uint iIndexV) -{ - float2 vDelta = float2(fDeltaU, fDeltaV); - float2 vOffset = float2(iIndexU * fDeltaU, iIndexV * fDeltaV); - return vOriginalUV * vDelta + vOffset; -} - -float2 UV_Cutting(float2 vUV, float2 vUVCutting, int iCurrentFrame) -{ - float2 UV = vUV; // 이미지의 UV값 - - int iTotalFrame = vUVCutting.x * vUVCutting.y; // 이미지의 최대 프레임 (몇 곱하기 몇인지) - - int iFrameX = iCurrentFrame % (int) vUVCutting.x; // 현재 x축의 위치(현재 이미지의 몇번째 칸을 보여줄 지) - int iFrameY = iCurrentFrame / (int) vUVCutting.x; // 현재 y축의 위치(현재 이미지의 몇번째 줄을 보여줄 지) - - float fFreamWidth = 1.0 / vUVCutting.x; // 1.0 나누기 이미지 갯수를 해서 한칸에 얼마나 갈지 정해준다. - float fFreamHeight = 1.0 / vUVCutting.y; // 1.0 나누기 이미지 갯수를 해서 한줄에 얼마나 갈지 정해준다. - - UV.x = UV.x * fFreamWidth + iFrameX * fFreamWidth; // 먼저 uv를 0~1이 아닌 0~fFrameWidth로 만든 다음에 한칸씩 옆으로 밀어준다. - UV.y = UV.y * fFreamHeight + iFrameY * fFreamHeight; // 먼저 uv를 0~1이 아닌 0~fFrameHeight로 만든 다음에 한줄씩 밑으로 내려준다. - - return UV; -} #endif // ENGINE_SHADER_DEFINES_HLSLI diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_States.hlsli b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_States.hlsli index 8c6fbe9e9..3b37f3b2c 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_States.hlsli +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_States.hlsli @@ -134,8 +134,8 @@ BlendState BS_WB_Acc DestBlend[0] = one; BlendOp[0] = Add; - SrcBlend[1] = Zero; - DestBlend[1] = Inv_Src_Alpha; + SrcBlend[1] = Inv_Src_Alpha; + DestBlend[1] = zero; BlendOp[1] = Add; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl index a02084c27..3e4b0bbd5 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl @@ -407,6 +407,7 @@ PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In) float fVisibility_Static = ShadowVisibility_hwPCF(g_PreShadowTexture, vPreShadowPosition, float2(g_iMaxShadowWidth, g_iMaxShadowHeight), 0.0005f); Out.vBackBuffer.rgb *= lerp(0.5f, 1.f, min(fVisibility_Dynamic, fVisibility_Static)); + //float fShadowDepth = g_ShadowTexture.Sample(DefaultSampler, vTexcoord).x; //float fPreShadowDepth = g_PreShadowTexture.Sample(DefaultSampler, vPreShadowTexcoord).x; //bool IsShadow = { false }; @@ -441,6 +442,7 @@ PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In) //} //[loop] // 변수로 루프돌리려면 반드시 필요함 + for (int i = -15; i < 16; ++i) { vTexcoord.x = In.vTexcoord.x; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_LastColor.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_LastColor.hlsl index 5c8f5c81a..cb79ebc0b 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_LastColor.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_LastColor.hlsl @@ -50,7 +50,7 @@ PS_OUT_BACKBUFFER PS_OUT_LASTCOLOR(PS_IN In) Out.vBackBuffer = float4(0.f, 0.f, 0.f, 0.f); - vector vColorTexture = g_ColorTexture.Sample(ClampSampler, In.vTexcoord); + vector vColorTexture = g_ColorTexture.Sample(DefaultSampler, In.vTexcoord); if (0.f == vColorTexture.a) { diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl index 59f96a378..19e505f62 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl @@ -158,11 +158,11 @@ VS_OUT VS_MAIN(VS_IN In, uint iGPUIndex : SV_InstanceID) { VS_OUT Out = (VS_OUT) 0; - row_major matrix matW, matWV, matWVP; + matrix matW, matWV, matWVP; - row_major matrix TransformMatrix = float4x4(In.vRight, In.vUp, In.vLook, In.vTranslation); + matrix TransformMatrix = float4x4(In.vRight, In.vUp, In.vLook, In.vTranslation); - matW = mul(g_WorldMatrix, TransformMatrix); + matW = mul(TransformMatrix, g_WorldMatrix); matWV = mul(matW, g_ViewMatrix); matWVP = mul(matWV, g_ProjMatrix); @@ -428,12 +428,11 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In) Out = BlendedWeight(vMtrlDiffuse, In.vProjPos.w); - if (vMtrlDiffuse.a / g_fDiffuseAlpha > g_fEmissiveCutAlpha) + if (vMtrlDiffuse.a / g_fDiffuseAlpha > g_fEmissiveCutAlpha) { - float3 vEmissiveColor= g_vEmissive.rgb * g_vEmissive.a + vEmissiveMtrl.rgb * (1 - g_vEmissive.a); + float3 vEmissiveColor = g_vEmissive.rgb * g_vEmissive.a + vEmissiveMtrl.rgb * (1 - g_vEmissive.a); Out.vColorTarget = vector(vEmissiveColor, vMtrlDiffuse.a); } - else Out.vColorTarget = vector(0.f, 0.f, 0.f, 0.f); @@ -456,7 +455,7 @@ VS_BLUR_OUT VS_BLUR(VS_IN In, uint iGPUIndex : SV_InstanceID) row_major matrix TransformMatrix = float4x4(In.vRight, In.vUp, In.vLook, In.vTranslation); - matW = mul(g_WorldMatrix, TransformMatrix); + matW = mul(TransformMatrix, g_WorldMatrix); matWV = mul(matW, g_ViewMatrix); matWVP = mul(matWV, g_ProjMatrix); @@ -483,7 +482,6 @@ struct PS_BLUR_IN struct PS_BLUR_OUT { float4 vDiffuse : SV_TARGET0; - float4 vBlurWeight : SV_TARGET1; }; @@ -492,7 +490,6 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In) PS_BLUR_OUT Out; - vector vMtrlDiffuse; vector vMtrlMask; vector vMtrlNoise; @@ -540,6 +537,8 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In) /* 최종 색깔 */ vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, UV); + + if (g_vColor.a > 0) vMtrlDiffuse += g_vColor; @@ -582,8 +581,6 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In) //디스토션(노이즈) 텍스쳐로 uv를 왜곡함 vMaskTexcoord = vMaskTexcoord + (vMtrlDistortion - 0.5f).r * g_fNoiseDistortionIntensity; - - } if (g_isMaskUVMove) @@ -599,9 +596,13 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In) { vMtrlMask.r = 1.f; } + + vMtrlDiffuse.a = saturate(vMtrlDiffuse.a * vMtrlMask.r); + + if (vMtrlDiffuse.a <= 0.f) discard; @@ -619,23 +620,21 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In) if (vMtrlDissolve.r < (In.vLifeTime.x / In.vLifeTime.y)) discard; } + } - vMtrlDiffuse.a *= g_fDiffuseAlpha; + //vMtrlDiffuse.a *= g_fDiffuseAlpha; - // 색깔 추가할 처리 (이미시브) + //// 색깔 추가할 처리 (이미시브) - float4 vEmissiveMtrl = vector(0.f, 0.f, 0.f, 0.f); + //float4 vEmissiveMtrl = vector(0.f, 0.f, 0.f, 0.f); - if (g_isEmissive == true) - { - vEmissiveMtrl = g_EmissiveTexture.Sample(DefaultSampler, In.vTexcoord); - } - - + //if (g_isEmissive == true) + //{ + // vEmissiveMtrl = g_EmissiveTexture.Sample(DefaultSampler, In.vTexcoord); + //} Out.vDiffuse = vMtrlDiffuse * g_fBlurIntensity; - Out.vBlurWeight.r = g_iBlurWeight / 32.f; return Out; } diff --git a/Jusin154_Team3D/Editor/Default/.bin b/Jusin154_Team3D/Editor/Default/.bin deleted file mode 100644 index 052ff3eb084ed0d32b06c4587e93a4faa9b67e65..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 372 zcmZQzKn4x=5FR>>t_CCz!^my?*sndrV9Z-~Cl3!9;kQyJ7T2WG3lo}uA77-s3?^Ie+5}cEnk{a(A?~$03 z7L-~X?;GULpo&vpNPJLgL1Jc6etdXlaY4MHQM?Nl)t-69C5d^-sqwz~DXBT}!M^b> N`MIe^dIkoD3;;Z!LhS$m diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj b/Jusin154_Team3D/Editor/Default/Editor.vcxproj index fa6eb585b..7c1e7d923 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj @@ -167,6 +167,8 @@ + + @@ -182,10 +184,14 @@ true true + true true + + true + false @@ -287,6 +293,8 @@ + + @@ -302,10 +310,14 @@ true true + true true + + true + false diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters index b195f888a..ef09aa706 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters @@ -315,7 +315,7 @@ {8882358e-c8eb-4222-a87e-01d902533b8f} - + {3614836d-9988-4ec0-95a8-f8ebc25a9a13} @@ -328,6 +328,18 @@ {a9862861-6eaa-4e04-b7f6-217a32db7db4} + + {80f4e763-20bb-47c1-b1de-ac11bc28bad8} + + + {d35cf4c8-1838-4cf3-80ff-69ef27435792} + + + {1b1b3388-cfea-4d6a-b93d-aa174317f573} + + + {7b7439b1-f2e5-4233-bf26-4db2b41307b7} + @@ -632,8 +644,7 @@ 02.GameObjects\Layer_Effect\Effect\05.NomalJap - - + 80.State\State_Combat\State_Skill2 @@ -645,7 +656,18 @@ 02.GameObjects\Broom - + + + 02.GameObjects\Dummys\DummyPhysX\PhysXHitBox + + + 02.GameObjects\Dummys\DummyPhysX\00.Callback\HitReport\HitBox + + + 02.GameObjects\Dummys\DummyPhysX\00.Callback\Behavior\HitBox + + + 02.GameObjects\Dummys\DummyPhysX\PhysXEffectHitBox @@ -959,7 +981,18 @@ 02.GameObjects\Broom - + + + 02.GameObjects\Dummys\DummyPhysX\PhysXHitBox + + + 02.GameObjects\Dummys\DummyPhysX\00.Callback\HitReport\HitBox + + + 02.GameObjects\Dummys\DummyPhysX\00.Callback\Behavior\HitBox + + + 02.GameObjects\Dummys\DummyPhysX\PhysXEffectHitBox diff --git a/Jusin154_Team3D/Editor/Private/CallBack_EffectHitBox_Behavior.cpp b/Jusin154_Team3D/Editor/Private/CallBack_EffectHitBox_Behavior.cpp new file mode 100644 index 000000000..140eb3454 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/CallBack_EffectHitBox_Behavior.cpp @@ -0,0 +1,97 @@ +#include "pch.h" +#include "CallBack_EffectHitBox_Behavior.h" +#include "GameInstance.h" + + +CCallBack_EffectHitBox_Behavior::CCallBack_EffectHitBox_Behavior() +{ +} + +CCallBack_EffectHitBox_Behavior::~CCallBack_EffectHitBox_Behavior() +{ +} + +PSX::PxControllerBehaviorFlags CCallBack_EffectHitBox_Behavior::getBehaviorFlags(const PSX::PxShape& shape, const PSX::PxActor& actor) +{ + if (nullptr == actor.userData) { + return PSX::PxControllerBehaviorFlags(0); + } + PSX::PxControllerBehaviorFlags eResults = PSX::PxControllerBehaviorFlags(0); + PhsXUserData* pActorData = static_cast(actor.userData); + switch (pActorData->eKind) + { + case PHYSX_KIND::BODY_STATIC: + eResults = PSX::PxControllerBehaviorFlag::eCCT_SLIDE | PSX::PxControllerBehaviorFlag::eCCT_CAN_RIDE_ON_OBJECT; + break; + case PHYSX_KIND::BODY_DYNAMIC: + switch (pActorData->iSubKind) + { + case 20: + eResults = PSX::PxControllerBehaviorFlag::eCCT_SLIDE; + break; + case 21: + eResults = PSX::PxControllerBehaviorFlag::eCCT_CAN_RIDE_ON_OBJECT; + break; + case 22: + eResults = PSX::PxControllerBehaviorFlag::eCCT_SLIDE | PSX::PxControllerBehaviorFlag::eCCT_CAN_RIDE_ON_OBJECT; + break; + case 23: + eResults = PSX::PxControllerBehaviorFlag::eCCT_CAN_RIDE_ON_OBJECT; + break; + case 24: + eResults = PSX::PxControllerBehaviorFlags(0); + break; + default: + break; + } + break; + case PHYSX_KIND::CCTActor: + // Action + break; + case PHYSX_KIND::OBSTACLEActor: + break; + default: + break; + } + + return eResults; +} + +PSX::PxControllerBehaviorFlags CCallBack_EffectHitBox_Behavior::getBehaviorFlags(const PSX::PxController& controller) +{ + // CCT끼리 부딪힐 때를 굳이 안 쓰면 0 리턴 + return PSX::PxControllerBehaviorFlags(0); +} + +PSX::PxControllerBehaviorFlags CCallBack_EffectHitBox_Behavior::getBehaviorFlags(const PSX::PxObstacle& obstacle) +{ + // Obstacle이 움직이는 발판이다? + // 여기서 ride/slide 세팅 + //return PSX::PxControllerBehaviorFlag::eCCT_CAN_RIDE_ON_OBJECT; + + return PSX::PxControllerBehaviorFlags(0); +} + +HRESULT CCallBack_EffectHitBox_Behavior::Initialize(CCharacter_Controller* pController, CRigidBody_Dynamic* pPartDynamicObject) +{ + m_pController = pController; + m_pPartDynamicBody = pPartDynamicObject; + m_pGameInstance = CGameInstance::GetInstance(); + SAFE_ADDREF(m_pController); + SAFE_ADDREF(m_pPartDynamicBody); + SAFE_ADDREF(m_pGameInstance); + return S_OK; +} + +HRESULT CCallBack_EffectHitBox_Behavior::Finalize() +{ + SAFE_RELEASE(m_pGameInstance); + SAFE_RELEASE(m_pPartDynamicBody); + SAFE_RELEASE(m_pController); + return S_OK; +} + +CCallBack_EffectHitBox_Behavior* CCallBack_EffectHitBox_Behavior::Create() +{ + return new CCallBack_EffectHitBox_Behavior(); +} diff --git a/Jusin154_Team3D/Editor/Private/CallBack_EffectHitBox_HitReport.cpp b/Jusin154_Team3D/Editor/Private/CallBack_EffectHitBox_HitReport.cpp new file mode 100644 index 000000000..f4d5a5677 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/CallBack_EffectHitBox_HitReport.cpp @@ -0,0 +1,148 @@ +#include "pch.h" +#include "CallBack_EffectHitBox_HitReport.h" +#include "GameInstance.h" +#include "GameObject.h" + +CCallBack_EffectHitBox_HitReport::CCallBack_EffectHitBox_HitReport() +{ +} + +CCallBack_EffectHitBox_HitReport::~CCallBack_EffectHitBox_HitReport() +{ +} + +void CCallBack_EffectHitBox_HitReport::onShapeHit(const PSX::PxControllerShapeHit& hit) +{ + PSX::PxController* pController = hit.controller; + PSX::PxExtendedVec3 vWorldPos = hit.worldPos; // 접촉지점 + PSX::PxVec3 vWorldNormal = hit.worldNormal; // 접촉노말 + PSX::PxVec3 vDir = hit.dir; // 시도한 move 방향 + _float fLength = hit.length; // 시도한 move 길이 + + PSX::PxShape* pShape = hit.shape; + PSX::PxRigidActor* pActor = hit.actor; + + + ON_COLLISION_INFO CollisionDesc = {}; + + if (nullptr != pController && nullptr != pActor) { + PhsXUserData* pTargetActorData = static_cast(pActor->userData); + PhsXUserData* pOwnerActorData = static_cast(pController->getActor()->userData); + if (nullptr == pTargetActorData) { // missing user data + return; + } + + switch (pTargetActorData->eKind) + { + case PHYSX_KIND::BODY_STATIC: + // action + break; + case PHYSX_KIND::BODY_DYNAMIC: + { + switch (pTargetActorData->iSubKind) + { + case 23: // 무거운데 올라갈 수 있는 벽 + + /* OnCollision 함수에 넘길 값 */ + + + CollisionDesc.vWorldPos = XMVectorSet( (_float)vWorldPos.x, (_float)vWorldPos.y, (_float)vWorldPos.z, 1.f); + memcpy(&CollisionDesc.vWorldNomal, &vWorldNormal, sizeof(_float3)); + memcpy(&CollisionDesc.vHitDir, &vDir, sizeof(_float3)); + CollisionDesc.fLength = fLength; + + pOwnerActorData->pOwner->Get_Owner()->OnCollision(pTargetActorData->pOwner , &CollisionDesc); + + break; + default: + { + PSX::PxRigidDynamic* pDynamic = static_cast(pActor); + pDynamic->addForce(vDir * fLength * 100000.f, PSX::PxForceMode::eIMPULSE); + } + break; + } + } break; + case PHYSX_KIND::CCTActor: + assert(false); + break; + case PHYSX_KIND::OBSTACLEActor: + break; + default: + break; + } + } +} + +void CCallBack_EffectHitBox_HitReport::onControllerHit(const PSX::PxControllersHit& hit) +{ + PSX::PxController* pController = hit.controller; + PSX::PxExtendedVec3 vWorldPos = hit.worldPos; // 접촉지점 + PSX::PxVec3 vWorldNormal = hit.worldNormal; // 접촉노말 + PSX::PxVec3 vDir = hit.dir; // 시도한 move 방향 + _float fLength = hit.length; // 시도한 move 길이 + + PSX::PxController* pOtherController = hit.other; // 다른 컨트롤러 + + if (nullptr != pController && nullptr != pOtherController) { + PhsXUserData* pActorData = static_cast(pOtherController->getActor()->userData); + assert(nullptr != pActorData); // missing user data + + switch (pActorData->eKind) + { + case PHYSX_KIND::BODY_STATIC: + assert(false); + break; + case PHYSX_KIND::BODY_DYNAMIC: + assert(false); + break; + case PHYSX_KIND::CCTActor: + // Action + break; + case PHYSX_KIND::OBSTACLEActor: + break; + default: + break; + } + } +} + +void CCallBack_EffectHitBox_HitReport::onObstacleHit(const PSX::PxControllerObstacleHit& hit) +{ + PSX::PxController* pController = hit.controller; + PSX::PxExtendedVec3 vWorldPos = hit.worldPos; // 접촉지점 + PSX::PxVec3 vWorldNormal = hit.worldNormal; // 접촉노말 + PSX::PxVec3 vDir = hit.dir; // 시도한 move 방향 + _float fLength = hit.length; // 시도한 move 길이 + + const void* pOtherController = hit.userData; // 장애물 + + //switch (pOtherController.member) + //{ + //default: + // break; + //} +} + +HRESULT CCallBack_EffectHitBox_HitReport::Initialize(CCharacter_Controller* pController, CRigidBody_Dynamic* pPartDynamicObject) +{ + m_pController = pController; + m_pPartDynamicBody = pPartDynamicObject; + m_pGameInstance = CGameInstance::GetInstance(); + SAFE_ADDREF(m_pController); + SAFE_ADDREF(m_pPartDynamicBody); + SAFE_ADDREF(m_pGameInstance); + return S_OK; +} + +HRESULT CCallBack_EffectHitBox_HitReport::Finalize() +{ + SAFE_RELEASE(m_pGameInstance); + SAFE_RELEASE(m_pPartDynamicBody); + SAFE_RELEASE(m_pController); + return S_OK; +} + +CCallBack_EffectHitBox_HitReport* CCallBack_EffectHitBox_HitReport::Create() +{ + return new CCallBack_EffectHitBox_HitReport(); +} diff --git a/Jusin154_Team3D/Editor/Private/Dummy_PhysXEffectHitBox.cpp b/Jusin154_Team3D/Editor/Private/Dummy_PhysXEffectHitBox.cpp new file mode 100644 index 000000000..e8be405fa --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/Dummy_PhysXEffectHitBox.cpp @@ -0,0 +1,200 @@ +#include "pch.h" +#include "Dummy_PhysXEffectHitBox.h" + +#include "GameInstance.h" + + +CDummy_PhysXEffectHitBox::CDummy_PhysXEffectHitBox(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CGameObject{ pDevice, pContext } +{ +} + +CDummy_PhysXEffectHitBox::CDummy_PhysXEffectHitBox(const CDummy_PhysXEffectHitBox& rhs) + : CGameObject(rhs) +{ +} + +HRESULT CDummy_PhysXEffectHitBox::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CDummy_PhysXEffectHitBox::Initialize(void* pArg) +{ + if (FAILED(__super::Initialize(pArg))) { + return E_FAIL; + } + + if (FAILED(Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} + +void CDummy_PhysXEffectHitBox::Priority_Update(_float fTimeDelta) +{ + m_pTransformCom->RewindMomentum(); +} + +void CDummy_PhysXEffectHitBox::Update(_float fTimeDelta) +{ + m_pTransformCom->AccumulateMomentum(XMLoadFloat3(&m_vDeltaPos)); + m_vLifeTime.x += fTimeDelta; + if (m_vLifeTime.x > m_vLifeTime.y) { + m_bDead = true; + } +} + +void CDummy_PhysXEffectHitBox::Late_Update(_float fTimeDelta) +{ + if (true == m_pCharacter_Controller->IsActive()) { + m_pCharacter_Controller->Move(fTimeDelta); + } + if (m_pGameInstance->isIn_WorldFrustum(Get_WorldPostion(), m_pTransformCom->Get_Radius())) { + m_pGameInstance->Add_RenderGroup(RENDER::BLEND, this); + } +} + +HRESULT CDummy_PhysXEffectHitBox::Render() +{ + //if (FAILED(Bind_ShaderResources())) { + // return E_FAIL; + //} + + //if (FAILED(m_pModelCom->Bind_Material(0, m_pShaderCom))) { + // return E_FAIL; + //} + //if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::DEFAULT)))) { + // return E_FAIL; + //} + + //if (FAILED(m_pModelCom->Render(0))) { + // return E_FAIL; + //} +#ifdef _DEBUG + if (FAILED(m_pCharacter_Controller->Render())) { + return E_FAIL; + } +#endif // _DEBUG + + + return S_OK; +} + +HRESULT CDummy_PhysXEffectHitBox::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + PHYSXDUMMY_DESC* pDesc = static_cast(pArg); + m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&pDesc->vPos), 1.f)); + m_pTransformCom->Rotation(pDesc->vRotRPY.x, pDesc->vRotRPY.y, pDesc->vRotRPY.z); + m_vDeltaPos = pDesc->vDeltaPos; + m_vLifeTime = pDesc->vLifeTime; + { // CCT + CCharacter_Controller::Character_Controller_DESC Desc{}; + + Desc.iSubKind = pDesc->iSubKind; + Desc.pTransform = m_pTransformCom; + Desc.eBodyType = ACTOR::BOX; + Desc.fContactOffset = 0.1f; + Desc.fMaterial = { 0.5f, 0.5f, 0.6f }; + Desc.bAutoStepping = { false }; + Desc.fStepOffset = { 0.05f }; + Desc.fRadius = 0.5f; + Desc.fHeight = 1.0f; + Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_EffectHitBox_HitReport::Create(); + Desc.pCallback_Behavior = m_pCallBack_Behavior = CCallBack_EffectHitBox_Behavior::Create(); + Desc.eClimbingMode = PSX::PxCapsuleClimbingMode::eEASY; + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_CCT_CAPSULE"), (CComponent**)&m_pCharacter_Controller, &Desc))) { + return E_FAIL; + } + } + m_pCharacter_Controller->Set_Position(m_pTransformCom->Get_State(STATE::POSITION)); + /* Com_Shader */ + if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH, + reinterpret_cast(&m_pShaderCom)))) { + return E_FAIL; + } + + if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_Box"), (CComponent**)&m_pModelCom))) { + return E_FAIL; + } + + + return S_OK; +} + +HRESULT CDummy_PhysXEffectHitBox::Bind_ShaderResources() +{ + 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; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) { + return E_FAIL; + } + + if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) { + return E_FAIL; + } + return S_OK; +} + +CDummy_PhysXEffectHitBox* CDummy_PhysXEffectHitBox::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CDummy_PhysXEffectHitBox* pInstance = new CDummy_PhysXEffectHitBox(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CDummy_PhysXEffectHitBox"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CDummy_PhysXEffectHitBox::Clone(void* pArg, CGameObject* pOwner) +{ + CDummy_PhysXEffectHitBox* pInstance = new CDummy_PhysXEffectHitBox(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CDummy_PhysXEffectHitBox"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CDummy_PhysXEffectHitBox::Free() +{ + if (nullptr == m_pGameInstance) { + m_pCharacter_Controller->SetActive(false); + PSX::PxExtendedVec3 pxControlllerPos = m_pCharacter_Controller->Get_Controller()->getPosition(); + PSX::PxTransform pxTransform((_float)pxControlllerPos.x, (_float)pxControlllerPos.y + 100.f, (_float)pxControlllerPos.z); + m_pCharacter_Controller->Set_Position(XMLoadFloat3((_float3*)&pxTransform.p)); + m_pGameInstance->Detach_Actor(*m_pCharacter_Controller->Get_Actor()); + + + } + __super::Free(); + if (nullptr != m_pCallBack_Behavior) { + m_pCallBack_Behavior->Finalize(); + } + if (nullptr != m_pCallBack_HitReport) { + m_pCallBack_HitReport->Finalize(); + } + SAFE_RELEASE(m_pCharacter_Controller); + Safe_Delete(m_pCallBack_Behavior); + Safe_Delete(m_pCallBack_HitReport); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pModelCom); +} + +void CDummy_PhysXEffectHitBox::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Editor/Private/Dummy_PhysXHitBox.cpp b/Jusin154_Team3D/Editor/Private/Dummy_PhysXHitBox.cpp new file mode 100644 index 000000000..e251d7ed5 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/Dummy_PhysXHitBox.cpp @@ -0,0 +1,170 @@ +#include "pch.h" +#include "Dummy_PhysXHitBox.h" + +#include "GameInstance.h" + + +CDummy_PhysXHitBox::CDummy_PhysXHitBox(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CGameObject{ pDevice, pContext } +{ +} + +CDummy_PhysXHitBox::CDummy_PhysXHitBox(const CDummy_PhysXHitBox& rhs) + : CGameObject(rhs) +{ +} + +HRESULT CDummy_PhysXHitBox::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CDummy_PhysXHitBox::Initialize(void* pArg) +{ + if (FAILED(__super::Initialize(pArg))) { + return E_FAIL; + } + + if (FAILED(Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} + +void CDummy_PhysXHitBox::Priority_Update(_float fTimeDelta) +{ + +} + +void CDummy_PhysXHitBox::Update(_float fTimeDelta) +{ + +} + +void CDummy_PhysXHitBox::Late_Update(_float fTimeDelta) +{ + if (m_pGameInstance->isIn_WorldFrustum(Get_WorldPostion(), m_pTransformCom->Get_Radius())) { + m_pGameInstance->Add_RenderGroup(RENDER::BLEND, this); + } +} + +HRESULT CDummy_PhysXHitBox::Render() +{ + //if (FAILED(Bind_ShaderResources())) { + // return E_FAIL; + //} + + //if (FAILED(m_pModelCom->Bind_Material(0, m_pShaderCom))) { + // return E_FAIL; + //} + //if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::DEFAULT)))) { + // return E_FAIL; + //} + + //if (FAILED(m_pModelCom->Render(0))) { + // return E_FAIL; + //} +#ifdef _DEBUG + if (FAILED(m_pRigidBody->Render())) { + return E_FAIL; + } +#endif // _DEBUG + + + return S_OK; +} + +HRESULT CDummy_PhysXHitBox::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + PHYSXDUMMY_DESC* pPhysXDummyDesc = static_cast(pArg); + + m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&pPhysXDummyDesc->vPos), 1.f)); + m_pTransformCom->Rotation(pPhysXDummyDesc->vRotRPY.x, pPhysXDummyDesc->vRotRPY.y, pPhysXDummyDesc->vRotRPY.z); + + + { // RIGID_BODY + CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; + Desc.iSubKind = pPhysXDummyDesc->iSubKind; + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX"), (CComponent**)&m_pRigidBody, &Desc))) { + return E_FAIL; + } + } + + /* Com_Shader */ + if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH, + reinterpret_cast(&m_pShaderCom)))) { + return E_FAIL; + } + + if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_Box"), (CComponent**)&m_pModelCom))) { + return E_FAIL; + } + + + return S_OK; +} + +HRESULT CDummy_PhysXHitBox::Bind_ShaderResources() +{ + 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; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) { + return E_FAIL; + } + + if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) { + return E_FAIL; + } + return S_OK; +} + +CDummy_PhysXHitBox* CDummy_PhysXHitBox::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CDummy_PhysXHitBox* pInstance = new CDummy_PhysXHitBox(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CDummy_PhysXHitBox"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CDummy_PhysXHitBox::Clone(void* pArg, CGameObject* pOwner) +{ + CDummy_PhysXHitBox* pInstance = new CDummy_PhysXHitBox(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CDummy_PhysXHitBox"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CDummy_PhysXHitBox::Free() +{ + if (nullptr != m_pRigidBody) { + m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor()); + } + + __super::Free(); + + SAFE_RELEASE(m_pRigidBody); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pModelCom); +} + +void CDummy_PhysXHitBox::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Editor/Private/Dummy_PhysXPlayable.cpp b/Jusin154_Team3D/Editor/Private/Dummy_PhysXPlayable.cpp index 8c1ad4266..3939b3eef 100644 --- a/Jusin154_Team3D/Editor/Private/Dummy_PhysXPlayable.cpp +++ b/Jusin154_Team3D/Editor/Private/Dummy_PhysXPlayable.cpp @@ -1,6 +1,8 @@ #include "pch.h" #include "Dummy_PhysXPlayable.h" +#include "Dummy_PhysXEffectHitBox.h" #include "GameInstance.h" +#include "NomalJap.h" CDummy_PhysXPlayable::CDummy_PhysXPlayable(ID3D11Device* pDevice, ID3D11DeviceContext* pContext): CGameObject(pDevice, pContext) @@ -48,6 +50,14 @@ void CDummy_PhysXPlayable::Update(_float fTimeDelta) m_pGameInstance->Attach_Actor(*m_pCharacter_Controller->Get_Actor()); } } + if (m_pGameInstance->Key_Up(DIK_O)) { + { + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(ENUM_CLASS(LEVEL::EFFECT), CURRENT_LEVEL, LAYER_HITBOX, nullptr, this))) { + assert(false); + return; + } + } + } m_pTransformCom->AccumulateMomentum(XMVectorSet(0.f, -GRAVITY * fTimeDelta, 0.f, 0.f)); m_pCharacter_Controller->Move(fTimeDelta); } diff --git a/Jusin154_Team3D/Editor/Private/Dummy_Plane.cpp b/Jusin154_Team3D/Editor/Private/Dummy_Plane.cpp index 9660686d7..d5811b35d 100644 --- a/Jusin154_Team3D/Editor/Private/Dummy_Plane.cpp +++ b/Jusin154_Team3D/Editor/Private/Dummy_Plane.cpp @@ -45,7 +45,7 @@ void CDummy_Plane::Update(_float fTimeDelta) void CDummy_Plane::Late_Update(_float fTimeDelta) { if (m_pGameInstance->isIn_WorldFrustum(Get_WorldPostion(), m_pTransformCom->Get_Radius())) { - m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this); + m_pGameInstance->Add_RenderGroup(RENDER::BLEND, this); } } diff --git a/Jusin154_Team3D/Editor/Private/EditEffect.cpp b/Jusin154_Team3D/Editor/Private/EditEffect.cpp index 84e573507..471cd2436 100644 --- a/Jusin154_Team3D/Editor/Private/EditEffect.cpp +++ b/Jusin154_Team3D/Editor/Private/EditEffect.cpp @@ -27,6 +27,8 @@ HRESULT CEditEffect::Initialize(void* pArg) if (FAILED(Ready_Components(pArg))) return E_FAIL; + + Set_Visible(false); return S_OK; } @@ -39,6 +41,9 @@ void CEditEffect::Priority_Update(_float fTimeDelta) void CEditEffect::Update(_float fTimeDelta) { + if (m_bVisible == false) + return; + if (m_pInstance_ModelCom == nullptr) return; @@ -53,13 +58,15 @@ void CEditEffect::Update(_float fTimeDelta) void CEditEffect::Late_Update(_float fTimeDelta) { + if (m_bVisible == false) + return; + if (m_pInstance_ModelCom == nullptr) return; XMStoreFloat4x4(&m_CombinedWorldMatrix , m_pTransformCom->Get_XMWorldMatrix() * m_pParentTransformCom->Get_XMWorldMatrix()); - if (m_EffectInfo.isBlur == true) { m_pGameInstance->Add_RenderGroup(RENDER::BLUR, this); @@ -385,6 +392,8 @@ void CEditEffect::Describe_Entity() { m_EffectInfo.eRenderOrder = static_cast(iCurrentItem); } + + GUI::Checkbox("Visible", &m_bVisible); m_pTransformCom->Describe_Entity(); @@ -609,7 +618,7 @@ void CEditEffect::Describe_Entity() GUI::Checkbox("Reverse Dissolve", &m_EffectInfo.isReverseDissolve); - _string strName = m_strDissolveName = m_pGameInstance->Asset_Description(ENUM_CLASS(LEVEL::EFFECT), "DISSOLVE_TEXTURE", (CComponent**)&m_pDissolve_TextureCom, nullptr, this); + _string strName = m_pGameInstance->Asset_Description(ENUM_CLASS(LEVEL::EFFECT), "DISSOLVE_TEXTURE", (CComponent**)&m_pDissolve_TextureCom, nullptr, this); if (strName != "") { m_strDissolveName = strName; diff --git a/Jusin154_Team3D/Editor/Private/EffectObject.cpp b/Jusin154_Team3D/Editor/Private/EffectObject.cpp index 230246b42..b3a9d8651 100644 --- a/Jusin154_Team3D/Editor/Private/EffectObject.cpp +++ b/Jusin154_Team3D/Editor/Private/EffectObject.cpp @@ -139,6 +139,7 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel) DWORD dwByte(0); if (!ReadFile(hFile, &m_EffectInfo, sizeof(EFFECT_INFO), &dwByte, nullptr)) { + CloseHandle(hFile); return E_FAIL; } @@ -149,6 +150,7 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel) { if (FAILED(Add_Component(g_iStaticLevel, &m_pLightCom, &m_EffectInfo.LightDesc))) { + CloseHandle(hFile); return E_FAIL; } } @@ -159,6 +161,7 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel) size_t iComponentLength = {}; if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) { + CloseHandle(hFile); return E_FAIL; } @@ -167,16 +170,22 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel) _char szName[MAX_PATH] = {}; if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) { + CloseHandle(hFile); return E_FAIL; } m_strDiffuseName = szName; + if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strDiffuseName), + reinterpret_cast(&m_pDiffuse_TextureCom)))) + { + CloseHandle(hFile); + return E_FAIL; + } + } - if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strDiffuseName), - reinterpret_cast(&m_pDiffuse_TextureCom)))) - return E_FAIL; + } if (m_EffectInfo.isNoise) @@ -185,6 +194,7 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel) if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) { + CloseHandle(hFile); return E_FAIL; } @@ -193,15 +203,18 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel) _char szName[MAX_PATH] = {}; if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) { + CloseHandle(hFile); return E_FAIL; } m_strNoiseName = szName; + + if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strNoiseName), + reinterpret_cast(&m_pNoise_TextureCom)))) + return E_FAIL; } - if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strNoiseName), - reinterpret_cast(&m_pNoise_TextureCom)))) - return E_FAIL; + } if (m_EffectInfo.isMasking) @@ -219,15 +232,21 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel) _char szName[MAX_PATH] = {}; if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) { + CloseHandle(hFile); return E_FAIL; } m_strMaskingName = szName; + + if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strMaskingName), + reinterpret_cast(&m_pMasking_TextureCom)))) + { + CloseHandle(hFile); + return E_FAIL; + } } - if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strMaskingName), - reinterpret_cast(&m_pMasking_TextureCom)))) - return E_FAIL; + } if (m_EffectInfo.isDissolve) @@ -235,6 +254,7 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel) size_t iComponentLength = {}; if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) { + CloseHandle(hFile); return E_FAIL; } @@ -243,15 +263,23 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel) _char szName[MAX_PATH] = {}; if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) { + CloseHandle(hFile); return E_FAIL; } m_strDissolveName = szName; + + if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strDissolveName), + reinterpret_cast(&m_pDissolve_TextureCom)))) + { + CloseHandle(hFile); + return E_FAIL; + } + + } - if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strDissolveName), - reinterpret_cast(&m_pDissolve_TextureCom)))) - return E_FAIL; + } if (m_EffectInfo.isEmissive) @@ -259,6 +287,7 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel) size_t iComponentLength = {}; if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) { + CloseHandle(hFile); return E_FAIL; } @@ -267,15 +296,21 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel) _char szName[MAX_PATH] = {}; if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) { + CloseHandle(hFile); return E_FAIL; } m_strEmissiveName = szName; + + if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strEmissiveName), + reinterpret_cast(&m_pEmissive_TextureCom)))) + { + CloseHandle(hFile); + return E_FAIL; + } } - if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strEmissiveName), - reinterpret_cast(&m_pEmissive_TextureCom)))) - return E_FAIL; + } if (m_EffectInfo.isDistortion) @@ -283,6 +318,7 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel) size_t iComponentLength = {}; if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) { + CloseHandle(hFile); return E_FAIL; } @@ -291,21 +327,28 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel) _char szName[MAX_PATH] = {}; if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) { + CloseHandle(hFile); return E_FAIL; } m_strDistortionName = szName; + + if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strDistortionName), + reinterpret_cast(&m_pDistortion_TextureCom)))) + { + CloseHandle(hFile); + return E_FAIL; + } } - if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strDistortionName), - reinterpret_cast(&m_pDistortion_TextureCom)))) - return E_FAIL; + } size_t iComponentLength = {}; if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) { + CloseHandle(hFile); return E_FAIL; } @@ -314,22 +357,27 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel) _char szName[MAX_PATH] = {}; if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)(DWORD)iComponentLength + 1), &dwByte, nullptr)) { + CloseHandle(hFile); return E_FAIL; } m_strModelName = szName; + + if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strModelName), + reinterpret_cast(&m_pInstance_ModelCom)))) + { + CloseHandle(hFile); + return E_FAIL;; + } } - if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strModelName), - reinterpret_cast(&m_pInstance_ModelCom)))) - return E_FAIL;; + m_pInstance_ModelCom->Load_InstanceModel(hFile); CloseHandle(hFile); - MessageBox(NULL, L"이펙트 로드 성공", L"System Message", MB_OK); return S_OK; } diff --git a/Jusin154_Team3D/Editor/Private/Effect_Container.cpp b/Jusin154_Team3D/Editor/Private/Effect_Container.cpp index bfe1d9cb2..1cb0fe226 100644 --- a/Jusin154_Team3D/Editor/Private/Effect_Container.cpp +++ b/Jusin154_Team3D/Editor/Private/Effect_Container.cpp @@ -34,8 +34,6 @@ HRESULT CEffect_Container::Initialize(void* pArg) if (FAILED(Ready_Child())) return E_FAIL; - - return S_OK; } @@ -55,6 +53,10 @@ void CEffect_Container::Late_Update(_float fTimeDelta) __super::Late_Update(fTimeDelta); } +void CEffect_Container::OnCollision(CGameObject* pOther, void* pDesc) +{ +} + #ifdef _DEBUG HRESULT CEffect_Container::Save_Package(const _char* pPath) @@ -141,6 +143,7 @@ HRESULT CEffect_Container::Load_Package(const _char* pPath) _int iObjectCount = {}; if (!ReadFile(hFile, &iObjectCount, sizeof(_int), &dwByte, nullptr)) { + CloseHandle(hFile); return E_FAIL; } @@ -149,12 +152,14 @@ HRESULT CEffect_Container::Load_Package(const _char* pPath) EFFECT_TYPE eEffectType = {}; if (!ReadFile(hFile, &eEffectType, sizeof(EFFECT_TYPE), &dwByte, nullptr)) { + CloseHandle(hFile); return E_FAIL; } size_t iFilePathLength = {}; if (!ReadFile(hFile, &iFilePathLength, sizeof(size_t), &dwByte, nullptr)) { + CloseHandle(hFile); return E_FAIL; } @@ -163,6 +168,7 @@ HRESULT CEffect_Container::Load_Package(const _char* pPath) if (iFilePathLength != 0) { if (!ReadFile(hFile, szFilePath, sizeof(_char) * ((DWORD)iFilePathLength + 1), &dwByte, nullptr)) { + CloseHandle(hFile); return E_FAIL; } } @@ -188,6 +194,7 @@ HRESULT CEffect_Container::Load_Package(const _char* pPath) if (FAILED(Add_PartObject("EffectObject" + i, ENUM_CLASS(LEVEL::EFFECT), &pEditEffect, &PartsDesc))) { + CloseHandle(hFile); return E_FAIL; } @@ -204,6 +211,7 @@ HRESULT CEffect_Container::Load_Package(const _char* pPath) if (FAILED(Add_PartObject("TrailObject" + i, ENUM_CLASS(LEVEL::EFFECT), &pTrailEffect, &PartsDesc))) { + CloseHandle(hFile); return E_FAIL; } @@ -222,7 +230,7 @@ HRESULT CEffect_Container::Load_Package(const _char* pPath) CloseHandle(hFile); - MessageBox(NULL, L"패키징 로드 성공", L"System Message", MB_OK); + return S_OK; } @@ -265,7 +273,7 @@ void CEffect_Container::Update_Event(_float fTimeDelta) m_fPreAccTime = m_fAccTime; m_fAccTime += fTimeDelta; - if (m_fAccTime >= m_fDelay && m_isDelayed == false) // 아직 딜레이되지 않았고 딜레이를 넘어섰다면 + if (m_fAccTime >= m_fDelay || m_isDelayed == false) // 아직 딜레이되지 않았고 딜레이를 넘어섰다면 { m_isDelayed = true; } @@ -283,6 +291,10 @@ void CEffect_Container::Update_Event(_float fTimeDelta) m_fPreAccTime = 0.f; m_isDelayed = false; } + else + { + m_bVisible = false; + } } diff --git a/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp b/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp index 90fc4eb93..dd458cfff 100644 --- a/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp +++ b/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp @@ -81,6 +81,7 @@ void CEffect_Editor::Update(_float fTimeDelta) if (m_pGameInstance->Key_Pressing(DIK_Z)) m_pTransformCom->Turn(XMVectorSet(0.f, 1.f, 0.f, 0.f), fTimeDelta); + Update_Event(fTimeDelta); } void CEffect_Editor::Late_Update(_float fTimeDelta) @@ -387,6 +388,8 @@ HRESULT CEffect_Editor::Load_Edit(const _char* pPath) Safe_Release(m_pEditEffect); return E_FAIL; } + else + MessageBox(NULL, L"이펙트 로드 성공", L"System Message", MB_OK); Safe_Release(m_pEditEffect); @@ -629,7 +632,11 @@ void CEffect_Editor::Describe_Entity() if (GUI::Button("LOAD PACKAGE")) { - Load_Package(m_strPackageSavePath.c_str()); + + if (SUCCEEDED(Load_Package(m_strPackageSavePath.c_str()))) + { + MessageBox(NULL, L"패키징 로드 성공", L"System Message", MB_OK); + } } GUI::InputTextMultiline("TRAIL FILE PATH", m_szTrailBuffer, sizeof(m_szTrailBuffer), ImVec2(250, 25)); diff --git a/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp b/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp index 69dfa26cb..61f00c69d 100644 --- a/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp +++ b/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp @@ -8,6 +8,11 @@ #include "Dummy_Cube.h" #include "MainLight.h" #include "Dummy_Plane.h" +#include "DummySkyBox.h" +#include "Dummy_PhysXBox.h" +#include "Dummy_PhysXPlayable.h" +#include "Dummy_PhysXMonster.h" +#include "Dummy_PhysXWall.h" CLevel_EffectViewer::CLevel_EffectViewer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID) : CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) } @@ -21,6 +26,10 @@ HRESULT CLevel_EffectViewer::Initialize() return E_FAIL; } + if (FAILED(Ready_Layer_PhysX(TEXT("Layer_PhysX")))) + { + return E_FAIL; + } if (FAILED(Ready_Layer_Camera(TEXT("Layer_Camera")))) { return E_FAIL; @@ -34,11 +43,14 @@ HRESULT CLevel_EffectViewer::Initialize() if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(ENUM_CLASS(LEVEL::EFFECT), NEXT_LEVEL, TEXT("Layer_Editor")))) return E_FAIL; + /*if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(ENUM_CLASS(LEVEL::EFFECT), NEXT_LEVEL, LAYER_CUBE))) + return E_FAIL;*/ + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(ENUM_CLASS(LEVEL::EFFECT), NEXT_LEVEL, LAYER_CUBE))) return E_FAIL; - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(ENUM_CLASS(LEVEL::EFFECT), NEXT_LEVEL, LAYER_CUBE))) - return E_FAIL; + //if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Sky")))) + // return E_FAIL; return S_OK; @@ -99,6 +111,49 @@ HRESULT CLevel_EffectViewer::Ready_Layer_Effect(const _wstring& strLayerTag) return S_OK; } +HRESULT CLevel_EffectViewer::Ready_Layer_PhysX(const _wstring& strLayerTag) +{ + for (int i = 0; i < 10; ++i) { + CDummy_PhysXBox::PHYSXDUMMY_DESC Desc{}; + Desc.vPos = { m_pGameInstance->Random_Float(0.f, 30.f), m_pGameInstance->Random_Float(3.f, 33.f), m_pGameInstance->Random_Float(0.f, 30.f) }; + Desc.vRotRPY = { m_pGameInstance->Random_Float(0.f, XM_2PI), m_pGameInstance->Random_Float(0.f, XM_2PI), m_pGameInstance->Random_Float(0.f, XM_2PI) }; + Desc.iSubKind = 0; + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_CUBE, &Desc))) { + return E_FAIL; + } + } + { + CDummy_PhysXWall::PHYSXDUMMY_DESC Desc{}; + Desc.vPos = { -15.f, 3.f, 15.f }; + Desc.vRotRPY = { 0.f, m_pGameInstance->Random_Float(0.f, XM_2PI), 0.f }; + Desc.iSubKind = 23; + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_CUBE, &Desc))) { + return E_FAIL; + } + } + { + CDummy_PhysXPlayable::PHYSXDUMMY_DESC Desc{}; + Desc.vPos = { 0.f, 100.f, 0.f }; + Desc.vRotRPY = { 0.f, 0.f, 0.f }; + Desc.iSubKind = 10; + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_PLAYER, &Desc))) { + return E_FAIL; + } + } + { + CDummy_PhysXMonster::PHYSXDUMMY_DESC Desc{}; + Desc.vPos = { 0.f, 150.f, 5.f }; + Desc.vRotRPY = { 12.f, 0.f, 0.f }; + Desc.iSubKind = 10; + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER, &Desc))) { + return E_FAIL; + } + } + return S_OK; +} + CLevel_EffectViewer* CLevel_EffectViewer::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID) diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp index 13570c0cf..57ff38713 100644 --- a/Jusin154_Team3D/Editor/Private/Loader.cpp +++ b/Jusin154_Team3D/Editor/Private/Loader.cpp @@ -90,6 +90,7 @@ #include "Dummy_PhysXPlatform.h" #include "Dummy_PhysXFreeDoor.h" #include "Dummy_PhysXWall.h" +#include "Dummy_PhysXEffectHitBox.h" //#include "Dummy_PhysXDoorFrame.h" //#include "Dummy_PhysXFixedDoor.h" //#include "Dummy_PhysXDoorSet.h" @@ -514,6 +515,55 @@ HRESULT CLoader::Loading_For_UI() } HRESULT CLoader::Loading_For_Effect() { + + m_strMessage = TEXT("PhysX Meshes Loading.."); + { // Dumping Box + CRigidBody_Dynamic::RIGIDBODY_PROTOTYPE_DYNAMIC_DESC Desc{}; + { + Desc.eType = ACTOR::BOX; + Desc.ePxRigidBodyFlags = { /*PSX::PxRigidBodyFlag::eKINEMATIC*/ }; + Desc.ePxShapeFlags = { PSX::PxShapeFlag::eVISUALIZATION | PSX::PxShapeFlag::eSCENE_QUERY_SHAPE | PSX::PxShapeFlag::eSIMULATION_SHAPE }; + Desc.ePxMaterialTypes = { PXMATERIAL::DEFAULT }; + Desc.vMatInfo = { 0.5f, 0.5f, 0.6f }; + Desc.fContactOffset = { 0.05f }; + Desc.vhalfGeometryInfo = { 1.f, 1.f, 1.f }; + Desc.fDensity = 10.f; + Desc.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY()); + Desc.eLockFlag = {}; + Desc.vAutoDamping = { }; + } + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) { + return E_FAIL; + } + } { // Heavy Wall + CRigidBody_Dynamic::RIGIDBODY_PROTOTYPE_DYNAMIC_DESC Desc{}; + { + Desc.eType = ACTOR::BOX; + Desc.ePxRigidBodyFlags = { /*PSX::PxRigidBodyFlag::eKINEMATIC*/ }; + Desc.ePxShapeFlags = { PSX::PxShapeFlag::eVISUALIZATION | PSX::PxShapeFlag::eSCENE_QUERY_SHAPE | PSX::PxShapeFlag::eSIMULATION_SHAPE }; + Desc.ePxMaterialTypes = { PXMATERIAL::DEFAULT }; + Desc.vMatInfo = { 0.5f, 0.5f, 0.6f }; + Desc.fContactOffset = { 0.05f }; + Desc.vhalfGeometryInfo = { 2.5f, 4.5f, 3.5f }; + Desc.fDensity = 10.f; + Desc.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY()); + Desc.eLockFlag = {}; + Desc.vAutoDamping = { 100.f, 100.f }; + } + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_HEAVY_WALL"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) { + return E_FAIL; + } + } + + { + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_CCT_CAPSULE"), CCharacter_Controller::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } + } + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Box"), + CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Box/Box.fbx", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixIdentity())))) { + return E_FAIL; + } m_strMessage = TEXT("Texture Loading.."); @@ -579,6 +629,11 @@ HRESULT CLoader::Loading_For_Effect() m_strMessage = TEXT("Model Loading.."); + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_SkyboxModel"), + CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/SkyBox/SkyBox.fbx", XMMatrixIdentity())))) + return E_FAIL; + Asset_FileLoad("../Bin/Resources/Models/Effect/ParticleMesh", L"Prototype_Instance_Model_", [&](_wstring wstrFileName, const _char* pFilePath) { if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::EFFECT), wstrFileName, @@ -632,6 +687,21 @@ HRESULT CLoader::Loading_For_Effect() m_strMessage = TEXT("Prototype Loading.."); + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CDummy_PhysXBox::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CDummy_PhysXEffectHitBox::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CDummy_PhysXPlayable::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CDummy_PhysXMonster::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CDummy_PhysXWall::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } if (FAILED(m_pGameInstance->Add_Prototype(ENUM_CLASS(LEVEL::EFFECT), CDebugCamera::Create(m_pDevice, m_pContext)))) { return E_FAIL; } @@ -648,9 +718,6 @@ HRESULT CLoader::Loading_For_Effect() return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(ENUM_CLASS(LEVEL::EFFECT), CDummy_Cube::Create(m_pDevice, m_pContext)))) - return E_FAIL; - if (FAILED(m_pGameInstance->Add_Prototype(ENUM_CLASS(LEVEL::EFFECT), CDummy_Plane::Create(m_pDevice, m_pContext)))) return E_FAIL; @@ -663,6 +730,14 @@ HRESULT CLoader::Loading_For_Effect() if (FAILED(m_pGameInstance->Add_Prototype(ENUM_CLASS(LEVEL::EFFECT), CNomalJap::Create(m_pDevice, m_pContext)))) return E_FAIL; + /* For.Prototype_GameObject_DummySkyBox */ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CDummySkyBox::Create(m_pDevice, m_pContext)))) + return E_FAIL; + + if (FAILED(m_pGameInstance->Add_Prototype(ENUM_CLASS(LEVEL::EFFECT), CDummy_Cube::Create(m_pDevice, m_pContext)))) + return E_FAIL; + + m_strMessage = TEXT("Loading Success!"); @@ -1203,6 +1278,7 @@ HRESULT CLoader::Loading_For_ObjectViewer() if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CDummySkyBox::Create(m_pDevice, m_pContext)))) return E_FAIL; + /* For.Prototype_GameObject_Terrain */ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CTerrain::Create(m_pDevice, m_pContext)))) return E_FAIL; diff --git a/Jusin154_Team3D/Editor/Private/NomalJap.cpp b/Jusin154_Team3D/Editor/Private/NomalJap.cpp index 959be1168..526842781 100644 --- a/Jusin154_Team3D/Editor/Private/NomalJap.cpp +++ b/Jusin154_Team3D/Editor/Private/NomalJap.cpp @@ -3,6 +3,7 @@ #include "GameInstance.h" #include "EditEffect.h" +#include "Dummy_PhysXEffectHitBox.h" CNomalJap::CNomalJap(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) @@ -34,9 +35,13 @@ HRESULT CNomalJap::Initialize(void* pArg) if (FAILED(Ready_Child())) return E_FAIL; + Load_Package("../Bin/Resources/Data/Effect/Package/Jap"); m_wstrEffectName = L"Nomal_Jap"; + m_PartObjects.begin()->second->Set_Visible(true); + + m_fDuration = 5.f; return S_OK; } @@ -48,12 +53,19 @@ void CNomalJap::Priority_Update(_float fTimeDelta) void CNomalJap::Update(_float fTimeDelta) { + if (m_bVisible == false) + return; + __super::Update(fTimeDelta); + Update_Event(fTimeDelta); } void CNomalJap::Late_Update(_float fTimeDelta) { + if (m_bVisible == false) + return; + __super::Late_Update(fTimeDelta); } @@ -68,13 +80,21 @@ HRESULT CNomalJap::Ready_Components(void* pArg) HRESULT CNomalJap::Ready_Child() { + CDummy_PhysXEffectHitBox::PHYSXDUMMY_DESC Desc{}; - //CPartObject::PARTOBJECT_DESC PartsDesc{}; + m_pTransformCom->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion()); - //PartsDesc.pParentTransform = m_pTransformCom; + XMStoreFloat3(&Desc.vPos, m_pOwner->Get_WorldPostion() + XMVectorSet(0.f, 0.f, 1.f, 0.f)); - //if (FAILED(Add_PartObject("EffectObject" + to_string(m_iNumPart++), ENUM_CLASS(LEVEL::EFFECT), &m_pEditEffect, &PartsDesc))) - // return E_FAIL; + Desc.vRotRPY = { 0.f, 0.f, 0.f }; + Desc.iSubKind = 70; + Desc.vDeltaPos = { 0.f, 0.f, 1.f }; + Desc.vLifeTime = { 0.f, 2.f }; + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, CURRENT_LEVEL, LAYER_HITBOX, &Desc, this))) { + assert(false); + return E_FAIL; + } return S_OK; } @@ -92,11 +112,6 @@ CNomalJap* CNomalJap::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContex return pInstance; } -void CNomalJap::Free() -{ - __super::Free(); - -} CGameObject* CNomalJap::Clone(void* pArg, CGameObject* pOwner) { @@ -111,6 +126,26 @@ CGameObject* CNomalJap::Clone(void* pArg, CGameObject* pOwner) return pInstance; } +void CNomalJap::OnCollision(CGameObject* pOther , void* pDesc) +{ + //CTransform* pOtherTransform = p + ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc); + + for (auto& pPair : m_PartObjects) + { + pPair.second->Set_Visible(true); + pPair.second->Get_Component()->Set_State(STATE::POSITION, CollisionDesc->vWorldPos); + } + + m_PartObjects.begin()->second->Set_Visible(false); +} + +void CNomalJap::Free() +{ + __super::Free(); + +} + void CNomalJap::Describe_Entity() { @@ -120,3 +155,5 @@ HRESULT CNomalJap::Bind_ShaderResources() { return S_OK; } + + diff --git a/Jusin154_Team3D/Editor/Public/CallBack_EffectHitBox_Behavior.h b/Jusin154_Team3D/Editor/Public/CallBack_EffectHitBox_Behavior.h new file mode 100644 index 000000000..45111b908 --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/CallBack_EffectHitBox_Behavior.h @@ -0,0 +1,47 @@ +#pragma once + +#include "Editor_Define.h" +#include "GameObject.h" + +NS_BEGIN(Engine) +class CGameInstance; +NS_END + +NS_BEGIN(Editor) + +class CCallBack_EffectHitBox_Behavior final : public PSX::PxControllerBehaviorCallback +{ + // 구현 예시 + // CCT는 RigidBody의 PxSimulationEventCallback에 안걸리고, 이 전용 콜백에서 처리되는 구조임 + // + // PxUserControllerHitReport = "무엇과 부딪혔는지 알려줌(이벤트 알림)" + // PxControllerBehaviorCallback = "부딪힌 것에 대해 어떤 행동 정책을 쓸지 물어봄(질의)" + // PxSimulationEventCallback = "씬 전체에 대한 글로벌 콜백(일반 물리 이벤트)" +private: + CCallBack_EffectHitBox_Behavior(); +public: + ~CCallBack_EffectHitBox_Behavior(); + +public: + // PxControllerBehaviorCallback을(를) 통해 상속됨 + // 충돌알림이 아닌, 행동정책 정해주기. CCT vs CCT는 지원안함 + // slopeLimit로 미끄러져 갈 수 있는지 없는지 이분법적인 계산 대신, 원하는 물체에 대해서만 미끄러운 표면으로 정의해줌 + // 주인이 되는 CCT가 이 물체에 대해 이 물체를 어떻게 해야 할까? -> (타고 올라갈까? Ride?) (미끄러져갈까? Slide?) ( 직접 내가 구현할까? user defined ride? ) + virtual PSX::PxControllerBehaviorFlags getBehaviorFlags(const PSX::PxShape& shape, const PSX::PxActor& actor) override; + + virtual PSX::PxControllerBehaviorFlags getBehaviorFlags(const PSX::PxController& controller) override; + + virtual PSX::PxControllerBehaviorFlags getBehaviorFlags(const PSX::PxObstacle& obstacle) override; + +public: + HRESULT Initialize(CCharacter_Controller* pController, CRigidBody_Dynamic* pPartDynamicObject); + HRESULT Finalize(); +private: + CCharacter_Controller* m_pController = { nullptr }; + CRigidBody_Dynamic* m_pPartDynamicBody = { nullptr }; + CGameInstance* m_pGameInstance = { nullptr }; + +public: + static CCallBack_EffectHitBox_Behavior* Create(); +}; +NS_END diff --git a/Jusin154_Team3D/Editor/Public/CallBack_EffectHitBox_HitReport.h b/Jusin154_Team3D/Editor/Public/CallBack_EffectHitBox_HitReport.h new file mode 100644 index 000000000..8b32963ae --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/CallBack_EffectHitBox_HitReport.h @@ -0,0 +1,46 @@ +#pragma once + +#include "Editor_Define.h" +#include "GameObject.h" + +NS_BEGIN(Engine) +class CGameInstance; +NS_END + +NS_BEGIN(Editor) + +class CCallBack_EffectHitBox_HitReport final : public PSX::PxUserControllerHitReport +{ + // 구현 예시 + // CCT는 RigidBody의 PxSimulationEventCallback에 안걸리고, 이 전용 콜백에서 처리되는 구조임 + // + // PxUserControllerHitReport = "무엇과 부딪혔는지 알려줌(이벤트 알림)" + // PxControllerBehaviorCallback = "부딪힌 것에 대해 어떤 행동 정책을 쓸지 물어봄(질의)" + // PxSimulationEventCallback = "씬 전체에 대한 글로벌 콜백(일반 물리 이벤트)" +private: + CCallBack_EffectHitBox_HitReport(); +public: + ~CCallBack_EffectHitBox_HitReport(); + +public: + // PxUserControllerHitReport을(를) 통해 상속됨 + // 충돌알림!! + // 주인이 되는 CCT가 이 물체에 대해 어떻게 반응해야 할까? + virtual void onShapeHit(const PSX::PxControllerShapeHit& hit) override; // statc, rigid 등과 부딪힌 경우 + + virtual void onControllerHit(const PSX::PxControllersHit& hit) override; // 다른 CCT와 부딪힌 경우 + + virtual void onObstacleHit(const PSX::PxControllerObstacleHit& hit) override; // 사용자 정의 장애물과 부딪힌 경우 + +public: + HRESULT Initialize(CCharacter_Controller* pController, CRigidBody_Dynamic* pPartDynamicObject); + HRESULT Finalize(); +private: + CCharacter_Controller* m_pController = { nullptr }; + CRigidBody_Dynamic* m_pPartDynamicBody = { nullptr }; + CGameInstance* m_pGameInstance = { nullptr }; + +public: + static CCallBack_EffectHitBox_HitReport* Create(); +}; +NS_END diff --git a/Jusin154_Team3D/Editor/Public/Dummy_PhysXEffectHitBox.h b/Jusin154_Team3D/Editor/Public/Dummy_PhysXEffectHitBox.h new file mode 100644 index 000000000..eaca4fb15 --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/Dummy_PhysXEffectHitBox.h @@ -0,0 +1,61 @@ +#pragma once + +#include "Editor_Define.h" +#include "GameObject.h" +#include "CallBack_EffectHitBox_Behavior.h" +#include "CallBack_EffectHitBox_HitReport.h" + +NS_BEGIN(Engine) +class CModel; +class CShader; +class CRigidBody; +NS_END + +NS_BEGIN(Editor) + +class CDummy_PhysXEffectHitBox final : public CGameObject +{ +public: + typedef struct tagPhysXDummyDesc + { + _float3 vPos = {}; + _float3 vRotRPY = {}; + _uint iSubKind = {}; + _float3 vDeltaPos = {}; + _float2 vLifeTime = {}; + }PHYSXDUMMY_DESC; +private: + CDummy_PhysXEffectHitBox(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CDummy_PhysXEffectHitBox(const CDummy_PhysXEffectHitBox& rhs); + virtual ~CDummy_PhysXEffectHitBox() = default; + +public: + virtual void Priority_Update(_float fTimeDelta) override; + virtual void Update(_float fTimeDelta) override; + virtual void Late_Update(_float fTimeDelta) override; + virtual HRESULT Render() override; + +private: + CCharacter_Controller* m_pCharacter_Controller = { nullptr }; + CModel* m_pModelCom = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CCallBack_EffectHitBox_Behavior* m_pCallBack_Behavior = { nullptr }; + CCallBack_EffectHitBox_HitReport* m_pCallBack_HitReport = { nullptr }; + _float3 m_vDeltaPos = {}; + _float2 m_vLifeTime = { }; + + +private: + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + virtual HRESULT Ready_Components(void* pArg) override; + virtual HRESULT Bind_ShaderResources() override; + +public: + static CDummy_PhysXEffectHitBox* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; + void Describe_Entity() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Editor/Public/Dummy_PhysXHitBox.h b/Jusin154_Team3D/Editor/Public/Dummy_PhysXHitBox.h new file mode 100644 index 000000000..300cb8182 --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/Dummy_PhysXHitBox.h @@ -0,0 +1,54 @@ +#pragma once + +#include "Editor_Define.h" +#include "GameObject.h" + +NS_BEGIN(Engine) +class CModel; +class CShader; +class CRigidBody; +NS_END + +NS_BEGIN(Editor) + +class CDummy_PhysXHitBox final : public CGameObject +{ +public: + typedef struct tagPhysXDummyDesc + { + _float3 vPos = {}; + _float3 vRotRPY = {}; + _uint iSubKind = {}; + }PHYSXDUMMY_DESC; +private: + CDummy_PhysXHitBox(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CDummy_PhysXHitBox(const CDummy_PhysXHitBox& rhs); + virtual ~CDummy_PhysXHitBox() = default; + +public: + virtual void Priority_Update(_float fTimeDelta) override; + virtual void Update(_float fTimeDelta) override; + virtual void Late_Update(_float fTimeDelta) override; + virtual HRESULT Render() override; + +private: + CRigidBody* m_pRigidBody = { nullptr }; + const PSX::PxRigidDynamic* m_pActor = { nullptr }; + CModel* m_pModelCom = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + + +private: + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + virtual HRESULT Ready_Components(void* pArg) override; + virtual HRESULT Bind_ShaderResources() override; + +public: + static CDummy_PhysXHitBox* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; + void Describe_Entity() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Editor/Public/Editor_Struct.h b/Jusin154_Team3D/Editor/Public/Editor_Struct.h index f7cec534e..3fe3489da 100644 --- a/Jusin154_Team3D/Editor/Public/Editor_Struct.h +++ b/Jusin154_Team3D/Editor/Public/Editor_Struct.h @@ -1,4 +1,4 @@ -#pragma once +#pragma once NS_BEGIN(Engine) class CTransform; @@ -27,4 +27,15 @@ typedef struct tagMapObjectLodDesc : public tagMapObject_Desc vector<_uint>* pModelPathIndices = { nullptr }; }MAPOBJECT_LOD_DESC; -NS_END \ No newline at end of file +typedef struct tagOnCollsionInfo +{ + _vector vWorldPos = {}; // 접촉지점 + _vector vWorldNomal = {}; // 접촉노말 + _vector vHitDir = {}; // 시도한 move 방향 + _float fLength = {}; // 작용된 힘 + +}ON_COLLISION_INFO; + + + +NS_END diff --git a/Jusin154_Team3D/Editor/Public/EffectObject.h b/Jusin154_Team3D/Editor/Public/EffectObject.h index e25614983..baf2b496a 100644 --- a/Jusin154_Team3D/Editor/Public/EffectObject.h +++ b/Jusin154_Team3D/Editor/Public/EffectObject.h @@ -56,7 +56,7 @@ class CEffectObject abstract : public CPartObject _float fDiffuseAlpha = { 1.f }; _float fBlurIntensity = {}; _float fNoiseDistortionIntensity = {}; - _float fEmissiveCutAlpha = {}; + _float fEmissiveCutAlpha = { 0.f }; LIGHT_DESC LightDesc = {}; RENDER eRenderOrder = { RENDER::EFFECT }; diff --git a/Jusin154_Team3D/Editor/Public/Effect_Container.h b/Jusin154_Team3D/Editor/Public/Effect_Container.h index f875f2383..2d635b102 100644 --- a/Jusin154_Team3D/Editor/Public/Effect_Container.h +++ b/Jusin154_Team3D/Editor/Public/Effect_Container.h @@ -19,7 +19,7 @@ class CEffect_Container abstract : public CContainerObject virtual void Priority_Update(_float fTimeDelta) override; virtual void Update(_float fTimeDelta) override; virtual void Late_Update(_float fTimeDelta) override; - + virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override; public: #ifdef _DEBUG HRESULT Save_Package(const _char* pPath); diff --git a/Jusin154_Team3D/Editor/Public/Level_EffectViewer.h b/Jusin154_Team3D/Editor/Public/Level_EffectViewer.h index fc83d6863..9d32f6815 100644 --- a/Jusin154_Team3D/Editor/Public/Level_EffectViewer.h +++ b/Jusin154_Team3D/Editor/Public/Level_EffectViewer.h @@ -1,4 +1,4 @@ -#pragma once +#pragma once #include "Editor_Define.h" #include "Level.h" @@ -16,16 +16,17 @@ class CLevel_EffectViewer final : public CLevel virtual HRESULT Render() override; private: - /* ÀÌ ·¹º§¿¡¼­ ¾²±âÀ§ÇÑ °´üµéÀ» »ý¼ºÇѴÙ. */ + /* 이 레벨에서 쓰기위한 객체들을 생성한다. */ virtual HRESULT Initialize() override; HRESULT Ready_Layer_Camera(const _wstring& strLayerTag); HRESULT Ready_Layer_Light(); HRESULT Ready_Layer_UI(const _wstring& strLayerTag); HRESULT Ready_Layer_Effect(const _wstring& strLayerTag); + HRESULT Ready_Layer_PhysX(const _wstring& strLayerTag); public: static CLevel_EffectViewer* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID); virtual void Free() override; }; -NS_END \ No newline at end of file +NS_END diff --git a/Jusin154_Team3D/Editor/Public/NomalJap.h b/Jusin154_Team3D/Editor/Public/NomalJap.h index 8873292dd..975723148 100644 --- a/Jusin154_Team3D/Editor/Public/NomalJap.h +++ b/Jusin154_Team3D/Editor/Public/NomalJap.h @@ -27,7 +27,7 @@ class CNomalJap final : public CEffect_Container 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 = {}; diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_Defines.hlsli b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_Defines.hlsli index 05b918dcc..3ce9b7364 100644 --- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_Defines.hlsli +++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_Defines.hlsli @@ -7,258 +7,6 @@ #include "Engine_Shader_States.hlsli" #include "Engine_Shader_Functions.hlsli" -float PI = 3.14592; -sampler DefaultSampler = sampler_state -{ - Filter = MIN_MAG_MIP_LINEAR; - AddressU = wrap; - AddressV = wrap; -}; - -sampler ClampSampler = sampler_state -{ - Filter = MIN_MAG_MIP_POINT; - AddressU = clamp; - AddressV = clamp; -}; - -sampler MirrorSampler = sampler_state -{ - Filter = MIN_MAG_MIP_LINEAR; - AddressU = mirror; - AddressV = mirror; -}; - -sampler BorderZeroSampler = sampler_state -{ - Filter = MIN_MAG_MIP_POINT; - AddressU = Border; - AddressV = Border; - BorderColor = float4(0, 0, 0, 0); -}; - -sampler PointSampler = sampler_state -{ - Filter = MIN_MAG_MIP_POINT; - AddressU = wrap; - AddressV = wrap; -}; - -RasterizerState RS_Default -{ - FillMode = Solid; - CullMode = Back; -}; - -RasterizerState RS_Nocull -{ - FillMode = Solid; - CullMode = None; - FrontCounterClockwise = false; - DepthClipEnable = false; -}; - -RasterizerState RS_Nocull_Wireframe -{ - FillMode = Wireframe; - CullMode = None; - FrontCounterClockwise = false; - DepthBias = 0; - SlopeScaledDepthBias = 0.f; - DepthBiasClamp = 0.f; - DepthClipEnable = false; - ScissorEnable = false; - MultisampleEnable = false; - AntialiasedLineEnable = false; -}; - -RasterizerState RS_Scissor -{ - FillMode = Solid; - CullMode = Back; - FrontCounterClockwise = false; - ScissorEnable = true; -}; - -DepthStencilState DSS_Default -{ - DepthEnable = true; - DepthWriteMask = all; - DepthFunc = less_equal; -}; - -DepthStencilState DSS_None -{ - DepthEnable = false; - DepthWriteMask = zero; -}; - -DepthStencilState DSS_Effect -{ - DepthEnable = true; - DepthWriteMask = zero; - DepthFunc = less_equal; - StencilEnable = false; -}; - -BlendState BS_None -{ - BlendEnable[0] = false; -}; - -BlendState BS_AlphaBlend // ALPHA_BLEND -{ - BlendEnable[0] = true; - BlendEnable[1] = true; - BlendEnable[2] = true; - BlendEnable[3] = true; - BlendEnable[4] = true; - BlendEnable[5] = true; - BlendEnable[6] = true; - BlendEnable[7] = true; - - // Ac * Aa + Bc * (1 - Aa); - SrcBlend = Src_Alpha; - DestBlend = Inv_Src_Alpha; - BlendOp = Add; -}; - -BlendState BS_Blend // ADDITIVE_BLEND -{ - BlendEnable[0] = true; - BlendEnable[1] = true; - BlendEnable[2] = true; - BlendEnable[3] = true; - BlendEnable[4] = true; - BlendEnable[5] = true; - BlendEnable[6] = true; - BlendEnable[7] = true; - - // Ac * (1) + Bc * (1); - SrcBlend = one; - DestBlend = one; - BlendOp = Add; -}; - -BlendState BS_UIBlend -{ - BlendEnable[0] = true; - BlendEnable[1] = true; - BlendEnable[2] = true; - BlendEnable[3] = true; - BlendEnable[4] = true; - BlendEnable[5] = true; - BlendEnable[6] = true; - BlendEnable[7] = true; - - SrcBlend = Src_Alpha; - DestBlend = Inv_Src_Alpha; - BlendOp = Add; - - SrcBlendAlpha = One; - DestBlendAlpha = Zero; - BlendOpAlpha = Add; - - RenderTargetWriteMask[0] = 0x0F; // RGBA 모두 출력 -}; - -BlendState BS_WB_Acc -{ - BlendEnable[0] = true; - BlendEnable[1] = true; - BlendEnable[2] = true; - BlendEnable[3] = true; - BlendEnable[4] = true; - BlendEnable[5] = true; - BlendEnable[6] = true; - BlendEnable[7] = true; - - SrcBlend[0] = one; - DestBlend[0] = one; - BlendOp[0] = Add; - - SrcBlend[1] = Inv_Src_Alpha; - DestBlend[1] = Zero; - BlendOp[1] = Add; - - - SrcBlend[2] = one; - DestBlend[2] = one; - BlendOp[2] = Add; -}; - -BlendState BS_WeightBlend -{ - BlendEnable[0] = true; - BlendEnable[1] = true; - BlendEnable[2] = true; - BlendEnable[3] = true; - BlendEnable[4] = true; - BlendEnable[5] = true; - BlendEnable[6] = true; - BlendEnable[7] = true; - - - SrcBlend[0] = Src_Alpha; - DestBlend[0] = Inv_Src_Alpha; - - BlendOp[0] = Add; - - - -}; - -float ShadowVisibility_hwPCF(Texture2D ShadowMap, float4 vLightClip, float2 vShadowMapSize, float bias) -{ - float2 uv = float2(vLightClip.x / vLightClip.w, -vLightClip.y / vLightClip.w) * 0.5f + 0.5f; - float fDepthCenter = saturate(vLightClip.z / vLightClip.w); - float2 vTexel = 1.f / vShadowMapSize; - - float fVisibility = 0.f; - for (int v = -1; v <= 1; ++v) - { - for (int u = -1; u <= 1; ++u) - { - float2 vOffset = float2(u, v) * vTexel; - float fDepth = ShadowMap.Sample(DefaultSampler, uv + vOffset).x; - fVisibility += (fDepthCenter - bias > fDepth) ? 0.f : 1.f; - } - } - return fVisibility / 9.f; -} - -float GetRimLight(float3 vCamPosition, float3 vPosition, float3 vNormal, float fRimPower, float fRimStrength) -{ - float fRimLight = (1 - dot(normalize(vCamPosition - vPosition), vNormal)); - fRimLight = pow(fRimLight, fRimPower); - fRimLight = fRimLight * fRimStrength; - return fRimLight; -} - -float2 Get_MovedUV(float2 vOriginalUV, float fDeltaU, float fDeltaV, uint iIndexU, uint iIndexV) -{ - float2 vDelta = float2(fDeltaU, fDeltaV); - float2 vOffset = float2(iIndexU * fDeltaU, iIndexV * fDeltaV); - return vOriginalUV * vDelta + vOffset; -} - -float2 UV_Cutting(float2 vUV, float2 vUVCutting, int iCurrentFrame) -{ - float2 UV = vUV; // 이미지의 UV값 - - int iTotalFrame = vUVCutting.x * vUVCutting.y; // 이미지의 최대 프레임 (몇 곱하기 몇인지) - - int iFrameX = iCurrentFrame % (int) vUVCutting.x; // 현재 x축의 위치(현재 이미지의 몇번째 칸을 보여줄 지) - int iFrameY = iCurrentFrame / (int) vUVCutting.x; // 현재 y축의 위치(현재 이미지의 몇번째 줄을 보여줄 지) - - float fFreamWidth = 1.0 / vUVCutting.x; // 1.0 나누기 이미지 갯수를 해서 한칸에 얼마나 갈지 정해준다. - float fFreamHeight = 1.0 / vUVCutting.y; // 1.0 나누기 이미지 갯수를 해서 한줄에 얼마나 갈지 정해준다. - - UV.x = UV.x * fFreamWidth + iFrameX * fFreamWidth; // 먼저 uv를 0~1이 아닌 0~fFrameWidth로 만든 다음에 한칸씩 옆으로 밀어준다. - UV.y = UV.y * fFreamHeight + iFrameY * fFreamHeight; // 먼저 uv를 0~1이 아닌 0~fFrameHeight로 만든 다음에 한줄씩 밑으로 내려준다. - - return UV; -} #endif // ENGINE_SHADER_DEFINES_HLSLI diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_States.hlsli b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_States.hlsli index 8c6fbe9e9..3b37f3b2c 100644 --- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_States.hlsli +++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_States.hlsli @@ -134,8 +134,8 @@ BlendState BS_WB_Acc DestBlend[0] = one; BlendOp[0] = Add; - SrcBlend[1] = Zero; - DestBlend[1] = Inv_Src_Alpha; + SrcBlend[1] = Inv_Src_Alpha; + DestBlend[1] = zero; BlendOp[1] = Add; diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl index a02084c27..3e4b0bbd5 100644 --- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl +++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl @@ -407,6 +407,7 @@ PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In) float fVisibility_Static = ShadowVisibility_hwPCF(g_PreShadowTexture, vPreShadowPosition, float2(g_iMaxShadowWidth, g_iMaxShadowHeight), 0.0005f); Out.vBackBuffer.rgb *= lerp(0.5f, 1.f, min(fVisibility_Dynamic, fVisibility_Static)); + //float fShadowDepth = g_ShadowTexture.Sample(DefaultSampler, vTexcoord).x; //float fPreShadowDepth = g_PreShadowTexture.Sample(DefaultSampler, vPreShadowTexcoord).x; //bool IsShadow = { false }; @@ -441,6 +442,7 @@ PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In) //} //[loop] // 변수로 루프돌리려면 반드시 필요함 + for (int i = -15; i < 16; ++i) { vTexcoord.x = In.vTexcoord.x; diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_LastColor.hlsl b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_LastColor.hlsl index 5c8f5c81a..cb79ebc0b 100644 --- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_LastColor.hlsl +++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_LastColor.hlsl @@ -50,7 +50,7 @@ PS_OUT_BACKBUFFER PS_OUT_LASTCOLOR(PS_IN In) Out.vBackBuffer = float4(0.f, 0.f, 0.f, 0.f); - vector vColorTexture = g_ColorTexture.Sample(ClampSampler, In.vTexcoord); + vector vColorTexture = g_ColorTexture.Sample(DefaultSampler, In.vTexcoord); if (0.f == vColorTexture.a) { diff --git a/Jusin154_Team3D/Engine/Private/Character_Controller.cpp b/Jusin154_Team3D/Engine/Private/Character_Controller.cpp index 223e115b0..8be681b12 100644 --- a/Jusin154_Team3D/Engine/Private/Character_Controller.cpp +++ b/Jusin154_Team3D/Engine/Private/Character_Controller.cpp @@ -319,6 +319,9 @@ CComponent* CCharacter_Controller::Clone(void* pArg, class CGameObject* pOwner) void CCharacter_Controller::Free() { + if (nullptr != m_pController) { + m_pController->release(); + } __super::Free(); } diff --git a/Jusin154_Team3D/Engine/Private/GameObject.cpp b/Jusin154_Team3D/Engine/Private/GameObject.cpp index 0415223fd..0c5d52f2f 100644 --- a/Jusin154_Team3D/Engine/Private/GameObject.cpp +++ b/Jusin154_Team3D/Engine/Private/GameObject.cpp @@ -53,7 +53,7 @@ void CGameObject::Late_Update(_float fTimeDelta) { } -void CGameObject::OnCollision(CGameObject* pOther) +void CGameObject::OnCollision(CGameObject* pOther , void* pDesc) { } void CGameObject::OnHit(CGameObject* pOther, CGameObject* pCaller) diff --git a/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp b/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp index 6bb1707e3..c9893dde6 100644 --- a/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp +++ b/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp @@ -406,6 +406,7 @@ HRESULT CPhysX_Manager::Initialize() if (FAILED(Connect_DebugServer())) { //ASSERT_NURI(false); + //ASSERT_JINWOO(false); } { // 씬 세팅 @@ -506,6 +507,37 @@ HRESULT CPhysX_Manager::Initialize() //} #endif // 기무리 +#ifdef 진우 + PlaneData.eKind = PHYSX_KIND::BODY_STATIC; + PlaneData.iSubKind = UINT_MAX; + PlaneData.pOwner = nullptr; + PlaneData.pBody = nullptr; + + m_pMaterials.reserve(ENUM_CLASS(PXMATERIAL::END)); + m_pMaterials.push_back(m_pPhysics->createMaterial(0.5f, 0.5f, 0.6f)); + PSX::PxRigidStatic* pGroundPlane = PxCreatePlane(*m_pPhysics, physx::PxPlane(0, 1, 0, 0), *m_pMaterials[ENUM_CLASS(PXMATERIAL::DEFAULT)]); + pGroundPlane->userData = &PlaneData; + pGroundPlane->setName("PHYSX_MANAGER_PLANE"); + m_pScene->addActor(*pGroundPlane);; + + //{ + // float halfExtent = .5f; + // physx::PxShape* shape = m_pPhysics->createShape(physx::PxSphereGeometry(halfExtent), *pMaterial); + // physx::PxU32 size = 30; + // physx::PxTransform pxTransform(physx::PxVec3(0)); + + // for (physx::PxU32 i = 0; i < size; i++) { + // for (physx::PxU32 j = 0; j < size - i; j++) { + // physx::PxTransform localTm(physx::PxVec3(physx::PxReal(j * 2) - physx::PxReal(size - i) + 100, physx::PxReal(i * 2 + 1), 0) * halfExtent); + // physx::PxRigidDynamic* body = m_pPhysics->createRigidDynamic(pxTransform.transform(localTm)); + // body->attachShape(*shape); + // physx::PxRigidBodyExt::updateMassAndInertia(*body, 10.0f); + // m_pScene->addActor(*body); + // } + // } + //} +#endif // 진우 + return S_OK; diff --git a/Jusin154_Team3D/Engine/Private/Renderer.cpp b/Jusin154_Team3D/Engine/Private/Renderer.cpp index 7de2341bf..07f23ed5d 100644 --- a/Jusin154_Team3D/Engine/Private/Renderer.cpp +++ b/Jusin154_Team3D/Engine/Private/Renderer.cpp @@ -65,9 +65,9 @@ void CRenderer::Render() Render_Blur(); Render_Combined(); Render_Effect(); - Render_WeightBlend(); Render_NonLight(); Render_Blend(); + Render_WeightBlend(); Render_LastColor(); Render_UI(); @@ -264,9 +264,6 @@ void CRenderer::Render_Combined() if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Blur_X"), m_pShader, "g_BlurXTexture"))) { return; } - if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Blur_Weight"), m_pShader, "g_BlurWeightTexture"))) { - return; - } } @@ -370,11 +367,6 @@ void CRenderer::Render_Blur() if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Blur"), m_pShader, "g_BlurTexture"))) { return; } - - if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Blur_Weight"), m_pShader, "g_BlurWeightTexture"))) { - return; - } - m_pShader->Begin(ENUM_CLASS(SHADER_PASS_DEFERRED::BLUR)); @@ -657,10 +649,6 @@ HRESULT CRenderer::Initialize() return E_FAIL; } - if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Blur"), TEXT("Target_Blur_Weight")))) { - return E_FAIL; - } - /* MRT_Blur_X */ if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Blur_X"), TEXT("Target_Blur_X")))) { return E_FAIL; diff --git a/Jusin154_Team3D/Engine/Public/Engine_Macro.h b/Jusin154_Team3D/Engine/Public/Engine_Macro.h index f75a7a74c..c9629aa3b 100644 --- a/Jusin154_Team3D/Engine/Public/Engine_Macro.h +++ b/Jusin154_Team3D/Engine/Public/Engine_Macro.h @@ -19,7 +19,7 @@ #ifdef 기무리 #undef ASSERT_NURI #define ASSERT_NURI(expression) assert(expression) -#elif kim05 +#elif 진우 #undef ASSERT_JINWOO #define ASSERT_JINWOO(expression) assert(expression) #elif 82103 diff --git a/Jusin154_Team3D/Engine/Public/GameObject.h b/Jusin154_Team3D/Engine/Public/GameObject.h index f4d6b9e3f..6ba99ef38 100644 --- a/Jusin154_Team3D/Engine/Public/GameObject.h +++ b/Jusin154_Team3D/Engine/Public/GameObject.h @@ -26,7 +26,7 @@ class ENGINE_DLL CGameObject abstract virtual _float Get_Depth(); // z 소팅 할 때 쓰시면 됨 // 내가 맞음 ( Collider_Manager가 부름 ) - virtual void OnCollision(CGameObject* pOther = nullptr); + virtual void OnCollision(CGameObject* pOther = nullptr ,void* pDesc = nullptr); // 내가 때림 ( 히트박스가 부름 ) virtual void OnHit(CGameObject* pOther, CGameObject* pCaller = nullptr); @@ -40,7 +40,7 @@ class ENGINE_DLL CGameObject abstract _uint Get_CollisionID() const { return m_iCollisionID; } _bool Get_Visible() const { return m_bVisible; } void Set_Visible(_bool bValue) { m_bVisible = bValue; } - const CGameObject* Get_Owner() const { return m_pOwner; } + CGameObject* Get_Owner() const { return m_pOwner; } public: HRESULT Add_Asset_Component(_uint iTargetLevel, const _wstring strPrototypeTag, CComponent** ppOut, void* pArg = nullptr); diff --git a/Jusin154_Team3D/Engine/Public/PhysX_Manager.h b/Jusin154_Team3D/Engine/Public/PhysX_Manager.h index c8b405f5c..67362819e 100644 --- a/Jusin154_Team3D/Engine/Public/PhysX_Manager.h +++ b/Jusin154_Team3D/Engine/Public/PhysX_Manager.h @@ -83,6 +83,10 @@ class CPhysX_Manager final : public CBase #ifdef 기무리 PhsXUserData PlaneData = {}; +#endif // 기무리 +#ifdef 진우 + PhsXUserData PlaneData = {}; + #endif // 기무리 From 1021970609297b2360ca0f07a11d192bd8b9daa7 Mon Sep 17 00:00:00 2001 From: kimnuri Date: Thu, 20 Nov 2025 19:36:53 +0900 Subject: [PATCH 3/7] [initial Comiit] --- Jusin154_Team3D/Client/Default/Client.vcxproj | 18 +- .../Client/Default/Client.vcxproj.filters | 75 +++++++++ .../Client/Private/Camera_Debug.cpp | 156 ++++++++++++++++++ .../Client/Private/Information.cpp | 33 ++++ .../Client/Private/Level_Field.cpp | 114 +++++++++++++ .../Client/Private/Level_GamePlay.cpp | 36 ++-- .../Client/Private/Level_Restart.cpp | 51 ++++++ Jusin154_Team3D/Client/Private/Light_Main.cpp | 116 +++++++++++++ Jusin154_Team3D/Client/Private/Loader.cpp | 34 ++++ Jusin154_Team3D/Client/Public/Camera_Debug.h | 48 ++++++ Jusin154_Team3D/Client/Public/Client_Define.h | 6 +- Jusin154_Team3D/Client/Public/Client_Enum.h | 14 +- Jusin154_Team3D/Client/Public/Client_Macro.h | 5 + Jusin154_Team3D/Client/Public/Client_Struct.h | 10 ++ Jusin154_Team3D/Client/Public/Information.h | 42 +++++ Jusin154_Team3D/Client/Public/Level_Field.h | 34 ++++ Jusin154_Team3D/Client/Public/Level_Restart.h | 29 ++++ Jusin154_Team3D/Client/Public/Light_Main.h | 41 +++++ Jusin154_Team3D/Client/Public/Loader.h | 1 + Jusin154_Team3D/Editor/Default/Editor.vcxproj | 2 - .../Editor/Default/Editor.vcxproj.filters | 16 +- .../Editor/Private/Information.cpp | 86 ---------- Jusin154_Team3D/Editor/Public/Information.h | 60 ------- .../Engine/Private/PhysX_Manager.cpp | 6 +- .../Engine/Public/Engine_Function.h | 2 +- .../Engine/Public/Instance_Model.h | 2 - 26 files changed, 847 insertions(+), 190 deletions(-) create mode 100644 Jusin154_Team3D/Client/Private/Camera_Debug.cpp create mode 100644 Jusin154_Team3D/Client/Private/Information.cpp create mode 100644 Jusin154_Team3D/Client/Private/Level_Field.cpp create mode 100644 Jusin154_Team3D/Client/Private/Level_Restart.cpp create mode 100644 Jusin154_Team3D/Client/Private/Light_Main.cpp create mode 100644 Jusin154_Team3D/Client/Public/Camera_Debug.h create mode 100644 Jusin154_Team3D/Client/Public/Client_Struct.h create mode 100644 Jusin154_Team3D/Client/Public/Information.h create mode 100644 Jusin154_Team3D/Client/Public/Level_Field.h create mode 100644 Jusin154_Team3D/Client/Public/Level_Restart.h create mode 100644 Jusin154_Team3D/Client/Public/Light_Main.h delete mode 100644 Jusin154_Team3D/Editor/Private/Information.cpp delete mode 100644 Jusin154_Team3D/Editor/Public/Information.h diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj index dbbcc6a86..b1ec0747c 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj @@ -110,7 +110,7 @@ Level3 true - EDITOR_PROJECT;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);%(PreprocessorDefinitions) + _DEBUG;_WINDOWS;%(PreprocessorDefinitions);%(PreprocessorDefinitions) true stdcpp17 ../Public/;../../EngineSDK/Inc/;../../EngineSDK/Inc/DirectXTK/;../../EngineSDK/Inc/fMod/;../../EngineSDK/Inc/IMGUI/;../../EngineSDK/Inc/FX11/;%(AdditionalIncludeDirectories) @@ -136,7 +136,7 @@ true true true - EDITOR_PROJECT;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);%(PreprocessorDefinitions) + NDEBUG;_WINDOWS;%(PreprocessorDefinitions);%(PreprocessorDefinitions) true stdcpp17 ../Public/;../../EngineSDK/Inc/;../../EngineSDK/Inc/DirectXTK/;../../EngineSDK/Inc/fMod/;../../EngineSDK/Inc/IMGUI/;../../EngineSDK/Inc/FX11/;%(AdditionalIncludeDirectories) @@ -157,12 +157,21 @@ + + + true + true + + + + + @@ -171,9 +180,14 @@ + + + + + diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters index 264f91f6e..ad2c3c07f 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters @@ -37,6 +37,24 @@ 01.Levels\02.GamePlay + + 99.Define + + + 03.Information + + + 01.Levels\10.Field + + + 01.Levels\99.Restart + + + 02.GameObjects\Environment\Lights + + + 02.GameObjects\Cameras\Debug + @@ -98,6 +116,48 @@ {a7d0a3fa-b3dc-40c6-b258-ffcde49b05c1} + + {1cfdfc05-0b0d-4c58-8c2d-58090efea4fd} + + + {621b87a7-54b8-4d90-84b2-fa8cd26cc396} + + + {caa3de9a-fe01-426c-9cea-195c2f9b18f6} + + + {b5bef783-5315-4488-ac64-cb98d16a84a9} + + + {31681680-d5de-43c9-bc2d-2c91ca58a593} + + + {1bfec6dc-f008-4d18-87d6-be38824b1272} + + + {3eb21e8e-e01c-47fe-828e-800212456eb5} + + + {9f952e5a-835c-4de9-b7b5-9a731912774d} + + + {c5b61cb3-bc5f-4429-8715-b309dcf054b2} + + + {2b209526-b728-4fba-a184-b9224d72903a} + + + {e12b3048-dd6d-41bf-b346-e4abdaa4f215} + + + {74f21f9b-30bf-412e-ba4e-526958ab2a52} + + + {8d89a59c-fbd2-4a4a-ab01-a70abb80cc49} + + + {708bbc88-47fb-42c5-b060-14cec7d646f2} + @@ -121,6 +181,21 @@ 01.Levels\02.GamePlay + + 03.Information + + + 01.Levels\10.Field + + + 01.Levels\99.Restart + + + 02.GameObjects\Environment\Lights + + + 02.GameObjects\Cameras\Debug + diff --git a/Jusin154_Team3D/Client/Private/Camera_Debug.cpp b/Jusin154_Team3D/Client/Private/Camera_Debug.cpp new file mode 100644 index 000000000..c82a2a622 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Camera_Debug.cpp @@ -0,0 +1,156 @@ +#include "pch.h" +#include "Camera_Debug.h" +#include "Shader.h" + +CCamera_Debug::CCamera_Debug(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CCamera(pDevice, pContext) +{ +} + +CCamera_Debug::CCamera_Debug(const CCamera_Debug& rhs) + : CCamera(rhs) +{ +} + +void CCamera_Debug::Priority_Update(_float fTimeDelta) +{ +} + +void CCamera_Debug::Update(_float fTimeDelta) +{ + Transition(fTimeDelta); + _float3 vCamPos = {}; + XMStoreFloat3(&vCamPos, m_pTransformCom->Get_State(STATE::POSITION)); + GUI::Text("Cam Coord %.2f, %.2f, %.2f", vCamPos.x, vCamPos.y, vCamPos.z); + if (m_pGameInstance->Key_Up(DIK_GRAVE)) { + m_bMovable = !m_bMovable; + } + if (m_pGameInstance->Mouse_Down(DIM_RBUTTON)) { + m_pGameInstance->Toggle_MouseCenter(); + } + if (m_bMovable) { +#pragma region Position + _float fSpeed = 5.f; + if (m_pGameInstance->Key_Pressing(DIK_W)) { + m_pTransformCom->Go_Straight(fTimeDelta * fSpeed); + } + if (m_pGameInstance->Key_Pressing(DIK_A)) { + m_pTransformCom->Go_Left(fTimeDelta * fSpeed); + } + if (m_pGameInstance->Key_Pressing(DIK_S)) { + m_pTransformCom->Go_Backward(fTimeDelta * fSpeed); + } + if (m_pGameInstance->Key_Pressing(DIK_D)) { + m_pTransformCom->Go_Right(fTimeDelta * fSpeed); + } + if (m_pGameInstance->Key_Pressing(DIK_SPACE)) { + m_pTransformCom->Go_Up(fTimeDelta * fSpeed); + } + if (m_pGameInstance->Key_Pressing(DIK_C)) { + m_pTransformCom->Go_Down(fTimeDelta * fSpeed); + } + if (m_pGameInstance->Key_Pressing(DIK_TAB)) { + Set_InitialPos(); + } + +#pragma endregion +#pragma region Angle + + _float3 fMove = m_pGameInstance->Get_MouseMove(); + m_pTransformCom->Turn(XMVectorSet(0.f, 1.f, 0.f, 0.f), fTimeDelta * fMove.x * m_fMouseSensor); + m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::RIGHT), fTimeDelta * fMove.y * m_fMouseSensor); + +#pragma endregion + + } + __super::Bind_Matrices(); +} + +void CCamera_Debug::Late_Update(_float fTimeDelta) +{ +} + +HRESULT CCamera_Debug::Render() +{ + return S_OK; +} + +HRESULT CCamera_Debug::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CCamera_Debug::Initialize(void* pArg) +{ + CAMERA_DEBUG_DESC* pDesc = static_cast(pArg); + m_fMouseSensor = pDesc->fMouseSensor; + + if (FAILED(__super::Initialize(pArg))) { + return E_FAIL; + } + + if (FAILED(Ready_Components(pArg))) { + return E_FAIL; + } + m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&pDesc->vEye), 1.f)); + m_pTransformCom->LookAt(XMVectorSetW(XMLoadFloat3(&pDesc->vAt), 1.f)); + m_matInitial = *m_pTransformCom->Get_WorldMatrixPtr(); + m_bActive = true; + + m_pGameInstance->Add_Camera(NEXT_LEVEL, this, m_pCameraKey); + m_pGameInstance->Bind_Camera(NEXT_LEVEL, m_pCameraKey, false); + return S_OK; +} + +HRESULT CCamera_Debug::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CCamera_Debug::Bind_ShaderResources() +{ + return S_OK; +} + +void CCamera_Debug::Set_InitialPos() +{ + m_pTransformCom->Set_WorldMatrix(m_matInitial); +} + +CCamera_Debug* CCamera_Debug::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CCamera_Debug* pInstance = new CCamera_Debug(pDevice, pContext); + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CCamera_Debug"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CCamera_Debug* CCamera_Debug::Clone(void* pArg, CGameObject* pOwner) +{ + CCamera_Debug* pInstance = new CCamera_Debug(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CCamera_Debug"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CCamera_Debug::Free() +{ + __super::Free(); +} + +void CCamera_Debug::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Client/Private/Information.cpp b/Jusin154_Team3D/Client/Private/Information.cpp new file mode 100644 index 000000000..25dc551fd --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Information.cpp @@ -0,0 +1,33 @@ +#include "pch.h" +#include "Information.h" +#include "GameInstance.h" + + +CInformation::CInformation() +{ +} + +HRESULT CInformation::Initialize_Information(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + m_pGameInstance = CGameInstance::GetInstance(); + m_pDevice = pDevice; + m_pContext = pContext; + SAFE_ADDREF(m_pGameInstance); + SAFE_ADDREF(m_pDevice); + SAFE_ADDREF(m_pContext); + return S_OK; +} + +void CInformation::Release_Information() +{ + +} + +void CInformation::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDevice); + SAFE_RELEASE(m_pContext); + SAFE_RELEASE(m_pGameInstance); +} diff --git a/Jusin154_Team3D/Client/Private/Level_Field.cpp b/Jusin154_Team3D/Client/Private/Level_Field.cpp new file mode 100644 index 000000000..43e23c39c --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Level_Field.cpp @@ -0,0 +1,114 @@ +#include "pch.h" +#include "Level_Field.h" +#include "GameInstance.h" +#include "Level_Loading.h" +#include "Layer.h" + +CLevel_Field::CLevel_Field(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID) + : CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) } +{ + +} + +HRESULT CLevel_Field::Initialize(void* pArg) +{ + if (FAILED(Ready_Lights())) { + return E_FAIL; + } + + if (FAILED(Ready_Markers())) { + return E_FAIL; + } + if (FAILED(Ready_Layer_UI(LAYER_UI))) { + return E_FAIL; + } + if (FAILED(Ready_Layer_Effect(LAYER_EFFECT))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CLevel_Field::Initialize() +{ + assert(false); + return E_FAIL; +} + +void CLevel_Field::Update(_float fTimeDelta) +{ + if (true == m_pGameInstance->Check_LevelShouldChange()) { + //if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::WOODS)))) { + // return; + //} + } +} + +HRESULT CLevel_Field::Render() +{ + SetWindowText(g_hWnd, TEXT("게임플레이레벨입니다")); + return S_OK; +} + +HRESULT CLevel_Field::Ready_Lights() +{ + LIGHT_DESC LightDesc{}; + + LightDesc.eType = LIGHT::DIRECTIONAL; + LightDesc.vDiffuse = _float4(0.8f, 0.8f, 0.8f, 0.f); + LightDesc.vAmbient = _float4(0.2f, 0.2f, 0.2f, 0.f); + LightDesc.vSpecular = _float4(0.f, 0.f, 0.f, 0.f); + //LightDesc.vDirection = _float4(1.f, -1.f, 1.f, 0.f); + + //if (FAILED(m_pGameInstance->On_Light(NEXT_LEVEL, TEXT("Main_Light"), LightDesc, nullptr))) { + // return E_FAIL; + //} + + + return S_OK; +} + +HRESULT CLevel_Field::Ready_Layer_UI(const _wstring& strLayerTag) +{ + return S_OK; +} + +HRESULT CLevel_Field::Ready_Layer_Camera() +{ + return S_OK; +} + +HRESULT CLevel_Field::Ready_Layer_Sound() +{ + return S_OK; +} + +HRESULT CLevel_Field::Ready_Markers() +{ + + return S_OK; +} + +HRESULT CLevel_Field::Ready_Layer_Effect(const _wstring& strLayerTag) +{ + return S_OK; +} + +pair> CLevel_Field::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID, void* pArg) +{ + CLevel_Field* pInstance = new CLevel_Field(pDevice, pContext, eLevelID); + + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Created : CLevel_Field"); + SAFE_RELEASE(pInstance); + } + + return { pInstance, [pInstance]() { pInstance->Ready_Layer_Camera(); pInstance->Ready_Layer_Sound(); } }; +} + +void CLevel_Field::Free() +{ + __super::Free(); + +} diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp index 418e8082c..766d6da10 100644 --- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp +++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp @@ -2,6 +2,8 @@ #include "Level_GamePlay.h" #include "GameInstance.h" #include "Level_Loading.h" +#include "Light_Main.h" +#include "Camera_Debug.h" #include "Layer.h" CLevel_GamePlay::CLevel_GamePlay(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID) @@ -52,19 +54,8 @@ HRESULT CLevel_GamePlay::Render() HRESULT CLevel_GamePlay::Ready_Lights() { - LIGHT_DESC LightDesc{}; - - LightDesc.eType = LIGHT::DIRECTIONAL; - LightDesc.vDiffuse = _float4(0.8f, 0.8f, 0.8f, 0.f); - LightDesc.vAmbient = _float4(0.2f, 0.2f, 0.2f, 0.f); - LightDesc.vSpecular = _float4(0.f, 0.f, 0.f, 0.f); - //LightDesc.vDirection = _float4(1.f, -1.f, 1.f, 0.f); - - //if (FAILED(m_pGameInstance->On_Light(NEXT_LEVEL, TEXT("Main_Light"), LightDesc, nullptr))) { - // return E_FAIL; - //} - assert(false); - + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, LAYER_LIGHT))) + return E_FAIL; return S_OK; } @@ -76,6 +67,25 @@ HRESULT CLevel_GamePlay::Ready_Layer_UI(const _wstring& strLayerTag) HRESULT CLevel_GamePlay::Ready_Layer_Camera() { + CCamera_Debug::CAMERA_DEBUG_DESC Camera_Desc{}; + Camera_Desc.fFovy = XMConvertToRadians(60.0f); + Camera_Desc.fNear = 0.1f; + Camera_Desc.fFar = 200.f; + Camera_Desc.vEye = _float3(0.f, 10.f, -10.f); + Camera_Desc.vAt = _float3(0.f, 0.f, 0.f); + Camera_Desc.fSpeedPerSec = 5.f; + Camera_Desc.pCameraKey = CAMERA_DEBUG; + Camera_Desc.fRotationPerSec = XMConvertToRadians(90.0f); + Camera_Desc.fMouseSensor = 0.1f; + + CCamera_Debug* pCamera = { nullptr }; + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_CAMERA, &Camera_Desc, nullptr, &pCamera))){ + return E_FAIL; + } + if (FAILED(m_pGameInstance->Bind_Camera(NEXT_LEVEL, CAMERA_DEBUG, true))) { + return E_FAIL; + } + return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Level_Restart.cpp b/Jusin154_Team3D/Client/Private/Level_Restart.cpp new file mode 100644 index 000000000..75fb7534d --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Level_Restart.cpp @@ -0,0 +1,51 @@ +#include "pch.h" +#include "Level_Restart.h" +#include "Information.h" +#include "GameInstance.h" +#include "Level_Loading.h" + + + +CLevel_Restart::CLevel_Restart(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID) + : CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) } +{ + +} + +HRESULT CLevel_Restart::Initialize() +{ + //m_eNextLevel = CInformation::GetInstance()->Get_RestartLevel(); + + return S_OK; +} + +void CLevel_Restart::Update(_float fTimeDelta) +{ + if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, m_eNextLevel)))) { + return; + } +} + +HRESULT CLevel_Restart::Render() +{ + return S_OK; +} + +pair> CLevel_Restart::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID) +{ + CLevel_Restart* pInstance = new CLevel_Restart(pDevice, pContext, eLevelID); + + if (FAILED(pInstance->Initialize())) + { + MSG_BOX("Failed to Created : CLevel_Restart"); + SAFE_RELEASE(pInstance); + } + + return { pInstance, nullptr }; +} + +void CLevel_Restart::Free() +{ + __super::Free(); + +} diff --git a/Jusin154_Team3D/Client/Private/Light_Main.cpp b/Jusin154_Team3D/Client/Private/Light_Main.cpp new file mode 100644 index 000000000..7c279f486 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Light_Main.cpp @@ -0,0 +1,116 @@ +#include "pch.h" +#include "Light_Main.h" +#include "GameInstance.h" + +CLight_Main::CLight_Main(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CGameObject(pDevice, pContext) +{ +} + +CLight_Main::CLight_Main(const CLight_Main& Prototype) + : CGameObject(Prototype) +{ +} + +HRESULT CLight_Main::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CLight_Main::Initialize(void* pArg) +{ + if (FAILED(__super::Initialize(pArg))) + return E_FAIL; + + + if (FAILED(Ready_Components())) + return E_FAIL; + + m_pTransformCom->Set_State(STATE::LOOK, XMVectorSet(1.f, -1.f, 1.f, 0.f)); + + return S_OK; +} + +void CLight_Main::Priority_Update(_float fTimeDelta) +{ + +} + +void CLight_Main::Update(_float fTimeDelta) +{ + +} + +void CLight_Main::Late_Update(_float fTimeDelta) +{ +} + +HRESULT CLight_Main::Render() +{ + return S_OK; +} + +HRESULT CLight_Main::Ready_Components() +{ + __super::Ready_Components(nullptr); + + LIGHT_DESC LightDesc{}; + + LightDesc.eType = LIGHT::DIRECTIONAL; + LightDesc.vDiffuse = _float4(0.8f, 0.8f, 0.8f, 0.f); + LightDesc.vAmbient = _float4(0.6f, 0.6f, 0.6f, 0.f); + LightDesc.vSpecular = _float4(0.f, 0.f, 0.f, 0.f); + LightDesc.pDirection = m_pTransformCom->Get_StatePtr(STATE::LOOK); + LightDesc.iLevel = NEXT_LEVEL; + + /* Com_Light*/ + if (FAILED(Add_Component(g_iStaticLevel, &m_pLightCom, &LightDesc))) + { + return E_FAIL; + } + + + return S_OK; +} + +HRESULT CLight_Main::Bind_ShaderResources() +{ + return S_OK; +} + +CLight_Main* CLight_Main::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CLight_Main* pInstance = new CLight_Main(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CLight_Main"); + Safe_Release(pInstance); + } + + return pInstance; +} + +CGameObject* CLight_Main::Clone(void* pArg, CGameObject* pOwner) +{ + CLight_Main* pInstance = new CLight_Main(*this); + + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CLight_Main"); + Safe_Release(pInstance); + } + + return pInstance; +} + +void CLight_Main::Free() +{ + __super::Free(); + + Safe_Release(m_pLightCom); +} + +void CLight_Main::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index 4abe2e521..4aa07b34f 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -2,6 +2,8 @@ #include "Loader.h" #include "GameInstance.h" #include "MainApp.h" +#include "Light_Main.h" +#include "Camera_Debug.h" CLoader::CLoader(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) : m_pDevice{ pDevice } @@ -51,6 +53,9 @@ HRESULT CLoader::Loading() case LEVEL::GAMEPLAY: hr = Loading_For_GamePlay(); break; + case LEVEL::FIELD: + hr = Loading_For_Field(); + break; default: break; } @@ -79,6 +84,14 @@ HRESULT CLoader::Loading_For_Logo() m_strMessage = TEXT("객체원형를(을) 로딩 중 입니다."); + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CCamera_Debug::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CLight_Main::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } + m_strMessage = TEXT("로딩이 완료되었습니다.."); m_isFinished = true; @@ -107,6 +120,27 @@ HRESULT CLoader::Loading_For_GamePlay() return S_OK; } +HRESULT CLoader::Loading_For_Field() +{ + m_strMessage = TEXT("텍스쳐를(을) 로딩 중 입니다."); + + m_strMessage = TEXT("모델를(을) 로딩 중 입니다."); + + m_strMessage = TEXT("셰이더를(을) 로딩 중 입니다."); + + m_strMessage = TEXT("이펙트를(을) 로딩 중 입니다."); + + m_strMessage = TEXT("객체원형를(을) 로딩 중 입니다."); + + m_strMessage = TEXT("정보를 불러오는 중입니다."); + + m_strMessage = TEXT("로딩이 완료되었습니다.."); + + m_isFinished = true; + + return S_OK; +} + CLoader* CLoader::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eNextLevelID) { CLoader* pInstance = new CLoader(pDevice, pContext); diff --git a/Jusin154_Team3D/Client/Public/Camera_Debug.h b/Jusin154_Team3D/Client/Public/Camera_Debug.h new file mode 100644 index 000000000..0662b8e1e --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Camera_Debug.h @@ -0,0 +1,48 @@ +#pragma once + +#include "Client_Define.h" +#include "Camera.h" + +NS_BEGIN(Client) + +class CCamera_Debug final : public CCamera +{ +public: + typedef struct tagCamera_Debug : public CCamera::CAMERA_DESC + { + _float3 vEye{}, vAt{}; + _float fMouseSensor{}; + }CAMERA_DEBUG_DESC; + +private: + CCamera_Debug(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CCamera_Debug(const CCamera_Debug& rhs); + virtual ~CCamera_Debug() = default; + +public: + virtual void Priority_Update(_float fTimeDelta) override; + virtual void Update(_float fTimeDelta) override; + virtual void Late_Update(_float fTimeDelta) override; + virtual HRESULT Render() override; + +private: + _bool m_bMovable = true; + _float m_fMouseSensor = {}; + _float4x4 m_matInitial = {}; + +private: + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + virtual HRESULT Ready_Components(void* pArg) override; + HRESULT Bind_ShaderResources() override; + void Set_InitialPos(); + +public: + static CCamera_Debug* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CCamera_Debug* Clone(void* pArg, CGameObject* pOwner) override; + virtual void Free() override; + void Describe_Entity() override; + +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Client_Define.h b/Jusin154_Team3D/Client/Public/Client_Define.h index e369c022d..fdd0675aa 100644 --- a/Jusin154_Team3D/Client/Public/Client_Define.h +++ b/Jusin154_Team3D/Client/Public/Client_Define.h @@ -1,4 +1,4 @@ -#pragma once +#pragma once #include #include "../Default/framework.h" @@ -7,8 +7,8 @@ namespace Client { - const unsigned int g_iWinSizeX = 1920; - const unsigned int g_iWinSizeY = 1080; + const unsigned int g_iWinSizeX = 1920; + const unsigned int g_iWinSizeY = 1080; } diff --git a/Jusin154_Team3D/Client/Public/Client_Enum.h b/Jusin154_Team3D/Client/Public/Client_Enum.h index 1a7388311..1096d0d07 100644 --- a/Jusin154_Team3D/Client/Public/Client_Enum.h +++ b/Jusin154_Team3D/Client/Public/Client_Enum.h @@ -1,15 +1,19 @@ -#pragma once +#pragma once namespace Client { - enum class LEVEL { STATIC, LOADING, LOGO, LOBY, GAMEPLAY, RESTART, END }; + enum class LEVEL { STATIC, LOADING, LOGO, INTRO, GAMEPLAY, FIELD, RESTART, END }; enum class COLLIDABLEOBJECT { PLAYER, MONSTER, HOSTILE_HITBOX, ALLY_HITBOX, NEUTRAL_HITBOX, ENVIRIONMENT, NPC, ITEM, TRIGGERBOX, REGION, NOCOLLIDE, END }; + enum class MAPOBJECT_TYPE { CONTAINER, ELEMENT_STATIC, ELEMENT_INTERACT }; enum class SHADER_PASS_ANIM { DEFAULT, SHADOW, CAPTURE, BLUR, END }; enum class SHADER_PASS_CUBE { DEFAULT, SHADOW, BLUR, END }; - enum class SHADER_PASS_MESH { DEFAULT, SHADOW, SKYBOX, ALPHABLEND, EFFECT_ALPHABLEND, EFFECT_BLEND, EFFECT_ALPHABLEND_CULL, EFFECT_BLEND_CULL, CAPTURE, BLUR, END }; + enum class SHADER_PASS_MESH { DEFAULT, SHADOW, SKYBOX, ALPHABLEND, EFFECT_ALPHABLEND, EFFECT_BLEND, EFFECT_ALPHABLEND_CULL, EFFECT_BLEND_CULL, CAPTURE, BLUR, EFFECT_ALPHABLEND_UVMOVE, MAPTOOL, GLASS, END }; enum class SHADER_PASS_NORTEX { DEFAULT, TERRAIN, END }; enum class SHADER_PASS_PARTICLE { EXPLOSION, END }; enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, END }; - enum class SHADER_PASS_UIEDITOR { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, END }; -} \ No newline at end of file + enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, END }; + enum class SHADER_PASS_UIEDITOR { DEFAULT, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, END }; + + enum class EFFECT_TYPE { EFFECT, TRAIL, END }; +} diff --git a/Jusin154_Team3D/Client/Public/Client_Macro.h b/Jusin154_Team3D/Client/Public/Client_Macro.h index b9f913fc8..074c0d74d 100644 --- a/Jusin154_Team3D/Client/Public/Client_Macro.h +++ b/Jusin154_Team3D/Client/Public/Client_Macro.h @@ -16,7 +16,9 @@ namespace Client { #define FX_NORTEX TEXT("FX_NORTEX") #define FX_CELL TEXT("FX_CELL") #define FX_PARTICLE TEXT("FX_PARTICLE") +#define FX_INSTANCE_MODEL TEXT("FX_INSTANCE_MODEL") #define FX_UIEDITOR TEXT("FX_UIEDITOR") +#define FX_UIINSTANCE TEXT("FX_UIINSTANCE") #pragma endregion #pragma region MACRO_PROTOTYPE @@ -26,6 +28,7 @@ namespace Client { #pragma endregion #pragma region OBJECT +#define CAMERA_DEBUG TEXT("CAMERA_DEBUG") #pragma endregion #pragma region COMPONENT @@ -48,7 +51,9 @@ namespace Client { #define LAYER_DOT TEXT("Layer_Dot") #define LAYER_CELL TEXT("Layer_Cell") #define LAYER_TRIGGER TEXT("Layer_Trigger") +#define LAYER_LIGHT TEXT("Layer_Light") +#define LAYER_MAPOBJECTMANAGER TEXT("Layer_MapObjectManager") #pragma endregion #pragma region MACRO_TEXTURE diff --git a/Jusin154_Team3D/Client/Public/Client_Struct.h b/Jusin154_Team3D/Client/Public/Client_Struct.h new file mode 100644 index 000000000..7eb5d8e59 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Client_Struct.h @@ -0,0 +1,10 @@ +#pragma once + +NS_BEGIN(Engine) +class CTransform; +NS_END + +NS_BEGIN(Client) + + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Information.h b/Jusin154_Team3D/Client/Public/Information.h new file mode 100644 index 000000000..c7c011f70 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Information.h @@ -0,0 +1,42 @@ +#pragma once + +#include "Client_Define.h" +#include "Base.h" + +NS_BEGIN(Engine) +class CGameInstance; +class CGameObject; +NS_END + +NS_BEGIN(Client) + +class CInformation final : public CBase +{ + DECLARE_SINGLETON(CInformation) +private: + CInformation(); + virtual ~CInformation() = default; +public: + HRESULT Initialize_Information(ID3D11Device* pDevice, ID3D11DeviceContext* pContex); + void Release_Information(); + + +private: + ID3D11Device* m_pDevice = { nullptr }; + ID3D11DeviceContext* m_pContext = { nullptr }; + class CGameInstance* m_pGameInstance = { nullptr }; + + class CPlayerInfo* m_pPlayerInfo = { nullptr }; + class CMonsterInfo* m_pMonsterInfo = { nullptr }; + class CNeutralInfo* m_pNeutralInfo = { nullptr }; + +private: +#ifdef _DEBUG + _string m_strLog = {}; +#endif // _DEBUG + +public: + virtual void Free() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Level_Field.h b/Jusin154_Team3D/Client/Public/Level_Field.h new file mode 100644 index 000000000..d4b52ca78 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Level_Field.h @@ -0,0 +1,34 @@ +#pragma once + +#include "Client_Define.h" +#include "Level.h" +NS_BEGIN(Engine) +NS_END +NS_BEGIN(Client) + +class CLevel_Field final : public CLevel +{ +private: + CLevel_Field(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID); + virtual ~CLevel_Field() = default; + +public: + virtual void Update(_float fTimeDelta) override; + virtual HRESULT Render() override; + +private: + virtual HRESULT Initialize() override; + HRESULT Initialize(void* pArg); + HRESULT Ready_Lights(); + HRESULT Ready_Markers(); + HRESULT Ready_Layer_UI(const _wstring& strLayerTag); + HRESULT Ready_Layer_Camera(); + HRESULT Ready_Layer_Sound(); + HRESULT Ready_Layer_Effect(const _wstring& strLayerTag); + +public: + static pair> Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID, void* pArg); + virtual void Free() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Level_Restart.h b/Jusin154_Team3D/Client/Public/Level_Restart.h new file mode 100644 index 000000000..4c6d1dedd --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Level_Restart.h @@ -0,0 +1,29 @@ +#pragma once + +#include "Client_Define.h" +#include "Level.h" +NS_BEGIN(Engine) +NS_END +NS_BEGIN(Client) + + +class CLevel_Restart final : public CLevel +{ +private: + CLevel_Restart(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID); + virtual ~CLevel_Restart() = default; + +public: + virtual void Update(_float fTimeDelta) override; + virtual HRESULT Render() override; + +private: + virtual HRESULT Initialize() override; +private: + LEVEL m_eNextLevel = {}; +public: + static pair> Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID); + virtual void Free() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Light_Main.h b/Jusin154_Team3D/Client/Public/Light_Main.h new file mode 100644 index 000000000..8b513af4d --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Light_Main.h @@ -0,0 +1,41 @@ +#pragma once + +#include "Client_Define.h" +#include "GameObject.h" + +NS_BEGIN(Engine) +class CLight; +NS_END + +NS_BEGIN(Client) + +class CLight_Main final : public CGameObject +{ +private: + CLight_Main(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CLight_Main(const CLight_Main& Prototype); + virtual ~CLight_Main() = default; + +public: + virtual void Priority_Update(_float fTimeDelta) override; + virtual void Update(_float fTimeDelta) override; + virtual void Late_Update(_float fTimeDelta) override; + virtual HRESULT Render() override; + +private: + CLight* m_pLightCom = { nullptr }; + +private: + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + HRESULT Ready_Components(); + HRESULT Bind_ShaderResources(); + +public: + static CLight_Main* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr) override; + virtual void Free() override; + virtual void Describe_Entity() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Loader.h b/Jusin154_Team3D/Client/Public/Loader.h index ab651f55d..9dcd8d2a3 100644 --- a/Jusin154_Team3D/Client/Public/Loader.h +++ b/Jusin154_Team3D/Client/Public/Loader.h @@ -34,6 +34,7 @@ class CLoader final : public CBase HRESULT Initialize(LEVEL eNextLevelID); HRESULT Loading_For_Logo(); HRESULT Loading_For_GamePlay(); + HRESULT Loading_For_Field(); public: static CLoader* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eNextLevelID); diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj b/Jusin154_Team3D/Editor/Default/Editor.vcxproj index 04b874e45..c87161d16 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj @@ -207,7 +207,6 @@ - @@ -327,7 +326,6 @@ - diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters index 4237eaa35..a9a36e2fb 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters @@ -16,9 +16,6 @@ {79dcc46a-5ae9-48bb-962b-8984b15e4f5a} - - {fc210c4d-b8a6-4ed4-b19c-4bd175232e5f} - {47a1f529-dd0e-4f37-9ada-5aa6731dea0b} @@ -315,7 +312,7 @@ {8882358e-c8eb-4222-a87e-01d902533b8f} - + {3614836d-9988-4ec0-95a8-f8ebc25a9a13} @@ -522,9 +519,6 @@ 02.GameObjects\Dummys\DummySkyBox - - 03.Information - 02.GameObjects\MainLight @@ -632,8 +626,7 @@ 02.GameObjects\Layer_Effect\Effect\05.NomalJap - - + 80.State\State_Combat\State_Skill2 @@ -645,7 +638,6 @@ 02.GameObjects\Broom - @@ -837,9 +829,6 @@ 02.GameObjects\Dummys\DummySkyBox - - 03.Information - 02.GameObjects\MainLight @@ -959,7 +948,6 @@ 02.GameObjects\Broom - diff --git a/Jusin154_Team3D/Editor/Private/Information.cpp b/Jusin154_Team3D/Editor/Private/Information.cpp deleted file mode 100644 index 35c5c8a6e..000000000 --- a/Jusin154_Team3D/Editor/Private/Information.cpp +++ /dev/null @@ -1,86 +0,0 @@ -#include "pch.h" - -#include "Information.h" - -IMPLEMENT_SINGLETON(CInformation) - - -HRESULT CInformation::Initialize_Info(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) -{ - m_pDevice = pDevice; - m_pContext = pContext; - SAFE_ADDREF(m_pDevice); - SAFE_ADDREF(m_pContext); - - - - return S_OK; -} - -HRESULT CInformation::Release_Info() -{ - if (nullptr == s_pInstance) { - return S_OK; - } - DestroyInstance(); - - //SAFE_RELEASE(); - //SAFE_RELEASE(); - - return S_OK; -} - -_bool CInformation::strListBox(const _char* Label, _int& iCurrentIndex, vector<_string>& contents) -{ - assert(iCurrentIndex < contents.size()); - assert(iCurrentIndex >= 0); - return GUI::ListBox(Label, &iCurrentIndex, [](void* data, _int iIndex)->const _char* - { - auto vec = static_cast*>(data); - return (*vec)[iIndex].c_str(); - }, &contents, (_int)(contents.size()) - ); -} - -_bool CInformation::wstrListBox(const _char* Label, _int& iCurrentIndex, vector<_wstring>& contents) -{ - assert(iCurrentIndex < contents.size()); - assert(iCurrentIndex >= 0); - return GUI::ListBox(Label, &iCurrentIndex, [](void* data, _int iIndex)->const _char* - { - auto vec = static_cast*>(data); - return CMyTools::ToString((*vec)[iIndex]).c_str(); - }, &contents, (_int)(contents.size()) - ); -} - -void CInformation::Log_Render() -{ - GUI::Begin("Log"); - GUI::Text(m_strLog.c_str()); - GUI::End(); -} - -void CInformation::Log_Push(const _char* pContents) -{ - m_strLog.append(_string("\n") + pContents); -} - -void CInformation::Log_Clear() -{ - m_strLog.clear(); -} - -CInformation::CInformation() -{ -} - -void CInformation::Free() -{ - __super::Free(); - - - - SAFE_RELEASE(m_pDevice); - SAFE_RELEASE(m_pContext); -} diff --git a/Jusin154_Team3D/Editor/Public/Information.h b/Jusin154_Team3D/Editor/Public/Information.h deleted file mode 100644 index dc4c393dd..000000000 --- a/Jusin154_Team3D/Editor/Public/Information.h +++ /dev/null @@ -1,60 +0,0 @@ -#pragma once - -#include "Base.h" -#include "Editor_Define.h" - -NS_BEGIN(Editor) - -typedef class CInformation final : public CBase -{ - DECLARE_SINGLETON(CInformation) -public: - HRESULT Initialize_Info(ID3D11Device* pDevice = nullptr, ID3D11DeviceContext* pContext = nullptr); - HRESULT Release_Info(); -#pragma region WHOLEPART - _bool strListBox(const _char* Label, _int& iCurrentIndex, vector<_string>& contents); - _bool wstrListBox(const _char* Label, _int& iCurrentIndex, vector<_wstring>& contents); - -#pragma endregion // 전역 - -#pragma region OBJECTVIEWER - -#pragma endregion -#pragma region MAPVIEWER - -#pragma endregion -#pragma region EFFECTVIEWER - -#pragma endregion -#pragma region UIVIEWER - -#pragma endregion -#pragma region PHYSXVIEWER - -#pragma endregion -#pragma region COMBINEDVIEWER - -#pragma endregion - -public: -#pragma region LOG - void Log_Render(); - void Log_Push(const _char* pContents); - void Log_Clear(); -#pragma endregion - -private: - ID3D11Device* m_pDevice = { nullptr }; - ID3D11DeviceContext* m_pContext = { nullptr }; - class CGameInstance* m_pGameInstance = { nullptr }; - - _string m_strLog = {}; - - -private: - CInformation(); - virtual ~CInformation() = default; - virtual void Free() override; -}INFO; - -NS_END \ No newline at end of file diff --git a/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp b/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp index 6bb1707e3..3151da03d 100644 --- a/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp +++ b/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp @@ -38,7 +38,7 @@ PSX::PxRigidDynamic* CPhysX_Manager::Add_DynamicActor(CRigidBody_Dynamic& RigidB pShape = PSX::PxRigidActorExt::createExclusiveShape(*pActorDynamic, geoHolder.capsule(), *m_pMaterials[ENUM_CLASS(RigidBody.Get_MaterialType())]); break; case ACTOR::SPHERE: - geoHolder = PSX::PxCapsuleGeometry(vVolume.x); + geoHolder = PSX::PxSphereGeometry(vVolume.x); pShape = PSX::PxRigidActorExt::createExclusiveShape(*pActorDynamic, geoHolder.sphere(), *m_pMaterials[ENUM_CLASS(RigidBody.Get_MaterialType())]); break; default: @@ -474,7 +474,7 @@ HRESULT CPhysX_Manager::Initialize() } // m_pScene->overlap();?????? - +#ifdef EDITOR_PROJECT #ifdef 기무리 PlaneData.eKind = PHYSX_KIND::BODY_STATIC; PlaneData.iSubKind = UINT_MAX; @@ -505,6 +505,8 @@ HRESULT CPhysX_Manager::Initialize() // } //} #endif // 기무리 +#endif // EDITOR_PROJECT + diff --git a/Jusin154_Team3D/Engine/Public/Engine_Function.h b/Jusin154_Team3D/Engine/Public/Engine_Function.h index 6ce4121da..64086a61a 100644 --- a/Jusin154_Team3D/Engine/Public/Engine_Function.h +++ b/Jusin154_Team3D/Engine/Public/Engine_Function.h @@ -24,7 +24,7 @@ void Safe_Delete_Array(T& Pointer) } template -unsigned long SAFE_ADDREF(T& pInstance) +unsigned long Safe_AddRef(T& pInstance) { unsigned long dwRefCnt = 0; diff --git a/Jusin154_Team3D/Engine/Public/Instance_Model.h b/Jusin154_Team3D/Engine/Public/Instance_Model.h index 201eaa47f..dee49ef0f 100644 --- a/Jusin154_Team3D/Engine/Public/Instance_Model.h +++ b/Jusin154_Team3D/Engine/Public/Instance_Model.h @@ -1,8 +1,6 @@ #pragma once #include "Component.h" -#include "Assimp/scene.h" - NS_BEGIN(Engine) class ENGINE_DLL CInstance_Model final : public CComponent From 32351e2b217394320807eeaa2424b45a8e70b50c Mon Sep 17 00:00:00 2001 From: kimnuri Date: Thu, 20 Nov 2025 21:40:31 +0900 Subject: [PATCH 4/7] [add] RestartLevel --- Jusin154_Team3D/Client/Default/Client.aps | Bin 0 -> 97048 bytes Jusin154_Team3D/Client/Default/Client.vcxproj | 10 +- .../Client/Default/Client.vcxproj.filters | 89 +++++++++++++----- .../Client/Private/InfoInstance.cpp | 68 +++++++++++++ .../Client/Private/Information.cpp | 33 ------- .../Client/Private/Level_Field.cpp | 37 ++++---- .../Client/Private/Level_GamePlay.cpp | 25 +++-- .../Client/Private/Level_Loading.cpp | 16 +++- Jusin154_Team3D/Client/Private/Level_Logo.cpp | 16 +++- .../Client/Private/Level_Restart.cpp | 22 ++++- Jusin154_Team3D/Client/Private/Loader.cpp | 24 +++++ Jusin154_Team3D/Client/Private/MainApp.cpp | 18 +++- Jusin154_Team3D/Client/Private/MapInfo.cpp | 50 ++++++++++ .../Client/Private/MonsterInfo.cpp | 50 ++++++++++ Jusin154_Team3D/Client/Private/PlayerInfo.cpp | 50 ++++++++++ Jusin154_Team3D/Client/Public/InfoInstance.h | 44 +++++++++ Jusin154_Team3D/Client/Public/Information.h | 42 --------- Jusin154_Team3D/Client/Public/Level_Field.h | 3 + .../Client/Public/Level_GamePlay.h | 9 +- Jusin154_Team3D/Client/Public/Level_Logo.h | 7 +- Jusin154_Team3D/Client/Public/Level_Restart.h | 4 + Jusin154_Team3D/Client/Public/Loader.h | 1 + Jusin154_Team3D/Client/Public/MainApp.h | 3 +- Jusin154_Team3D/Client/Public/MapInfo.h | 35 +++++++ Jusin154_Team3D/Client/Public/MonsterInfo.h | 35 +++++++ Jusin154_Team3D/Client/Public/PlayerInfo.h | 35 +++++++ Jusin154_Team3D/Editor/Default/.bin | Bin 372 -> 128 bytes .../Engine/Private/GameInstance.cpp | 1 - .../Engine/Private/Light_Manager.cpp | 7 +- Jusin154_Team3D/Engine/Public/Light_Manager.h | 8 +- 30 files changed, 589 insertions(+), 153 deletions(-) create mode 100644 Jusin154_Team3D/Client/Default/Client.aps create mode 100644 Jusin154_Team3D/Client/Private/InfoInstance.cpp delete mode 100644 Jusin154_Team3D/Client/Private/Information.cpp create mode 100644 Jusin154_Team3D/Client/Private/MapInfo.cpp create mode 100644 Jusin154_Team3D/Client/Private/MonsterInfo.cpp create mode 100644 Jusin154_Team3D/Client/Private/PlayerInfo.cpp create mode 100644 Jusin154_Team3D/Client/Public/InfoInstance.h delete mode 100644 Jusin154_Team3D/Client/Public/Information.h create mode 100644 Jusin154_Team3D/Client/Public/MapInfo.h create mode 100644 Jusin154_Team3D/Client/Public/MonsterInfo.h create mode 100644 Jusin154_Team3D/Client/Public/PlayerInfo.h diff --git a/Jusin154_Team3D/Client/Default/Client.aps b/Jusin154_Team3D/Client/Default/Client.aps new file mode 100644 index 0000000000000000000000000000000000000000..c2afa22ef1e8c6c59db678c24bb14432e6ed6594 GIT binary patch literal 97048 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 literal 0 HcmV?d00001 diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj index b1ec0747c..212e74446 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj @@ -165,7 +165,7 @@ true true - + @@ -174,6 +174,9 @@ + + + @@ -181,7 +184,7 @@ - + @@ -190,10 +193,13 @@ + + Create Create + diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters index ad2c3c07f..94624b871 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters @@ -40,8 +40,8 @@ 99.Define - - 03.Information + + 03.InfoInstance 01.Levels\10.Field @@ -49,12 +49,21 @@ 01.Levels\99.Restart - - 02.GameObjects\Environment\Lights - 02.GameObjects\Cameras\Debug + + 02.GameObjects\Environment\Lights\Main + + + 03.InfoInstance\00.PlayerInfo + + + 03.InfoInstance\01.MonsterInfo + + + 03.InfoInstance\02.MapInfo + @@ -92,9 +101,6 @@ {27434478-691e-42a8-83c7-ecd1a60f46ce} - - {cdfbb346-6cae-4094-93cd-b82685efa68e} - {7efd65d5-eb4d-4331-a746-f0fa2de6275b} @@ -116,15 +122,6 @@ {a7d0a3fa-b3dc-40c6-b258-ffcde49b05c1} - - {1cfdfc05-0b0d-4c58-8c2d-58090efea4fd} - - - {621b87a7-54b8-4d90-84b2-fa8cd26cc396} - - - {caa3de9a-fe01-426c-9cea-195c2f9b18f6} - {b5bef783-5315-4488-ac64-cb98d16a84a9} @@ -158,6 +155,45 @@ {708bbc88-47fb-42c5-b060-14cec7d646f2} + + {b24c78ef-dccc-41f0-a086-053ae6b7fbf4} + + + {603938cc-e4fe-44d8-890b-784174a86161} + + + {11250d84-e19c-4999-a5d6-d9f89123e7ae} + + + {b72a9bb0-1b21-416b-bd0c-ba943cd7cc9d} + + + {2814c935-13d9-4b9a-94ba-c9e470219a18} + + + {19ee2ea4-2d79-46bd-b857-c759e3ec6cf4} + + + {2561df42-3dfa-4045-a30c-85f44cd65e09} + + + {25ad4a41-5b06-4659-bd29-c0c4265a3277} + + + {5a667a7b-6c90-44f6-9c9f-aac3108b6561} + + + {cdfbb346-6cae-4094-93cd-b82685efa68e} + + + {1cfdfc05-0b0d-4c58-8c2d-58090efea4fd} + + + {621b87a7-54b8-4d90-84b2-fa8cd26cc396} + + + {413e6692-6e4a-4b00-8306-edf652bd876a} + @@ -181,8 +217,8 @@ 01.Levels\02.GamePlay - - 03.Information + + 03.InfoInstance 01.Levels\10.Field @@ -190,12 +226,21 @@ 01.Levels\99.Restart - - 02.GameObjects\Environment\Lights - 02.GameObjects\Cameras\Debug + + 02.GameObjects\Environment\Lights\Main + + + 03.InfoInstance\00.PlayerInfo + + + 03.InfoInstance\01.MonsterInfo + + + 03.InfoInstance\02.MapInfo + diff --git a/Jusin154_Team3D/Client/Private/InfoInstance.cpp b/Jusin154_Team3D/Client/Private/InfoInstance.cpp new file mode 100644 index 000000000..a7ba7db91 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/InfoInstance.cpp @@ -0,0 +1,68 @@ +#include "pch.h" +#include "InfoInstance.h" +#include "GameInstance.h" +#include "MapInfo.h" +#include "MonsterInfo.h" +#include "PlayerInfo.h" + +IMPLEMENT_SINGLETON(CInfoInstance) + +CInfoInstance::CInfoInstance() +{ +} + + +void CInfoInstance::Update(_float fTimeDelta) +{ + +} + +LEVEL CInfoInstance::Get_RestartLevel() +{ + return LEVEL::GAMEPLAY; +} + +HRESULT CInfoInstance::Initialize_Information(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + m_pGameInstance = CGameInstance::GetInstance(); + m_pDevice = pDevice; + m_pContext = pContext; + SAFE_ADDREF(m_pGameInstance); + SAFE_ADDREF(m_pDevice); + SAFE_ADDREF(m_pContext); + + m_pMapInfo = CMapInfo::Create(pDevice, pContext); + if (nullptr == m_pMapInfo) { + return E_FAIL; + } + m_pPlayerInfo = CPlayerInfo::Create(pDevice, pContext); + if (nullptr == m_pPlayerInfo) { + return E_FAIL; + } + m_pMonsterInfo = CMonsterInfo::Create(pDevice, pContext); + if (nullptr == m_pMonsterInfo) { + return E_FAIL; + } + + + return S_OK; +} + +void CInfoInstance::Release_Information() +{ + DestroyInstance(); + + + SAFE_RELEASE(m_pMapInfo); + SAFE_RELEASE(m_pPlayerInfo); + SAFE_RELEASE(m_pMonsterInfo); + SAFE_RELEASE(m_pDevice); + SAFE_RELEASE(m_pContext); + SAFE_RELEASE(m_pGameInstance); +} + +void CInfoInstance::Free() +{ + __super::Free(); + +} diff --git a/Jusin154_Team3D/Client/Private/Information.cpp b/Jusin154_Team3D/Client/Private/Information.cpp deleted file mode 100644 index 25dc551fd..000000000 --- a/Jusin154_Team3D/Client/Private/Information.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include "pch.h" -#include "Information.h" -#include "GameInstance.h" - - -CInformation::CInformation() -{ -} - -HRESULT CInformation::Initialize_Information(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) -{ - m_pGameInstance = CGameInstance::GetInstance(); - m_pDevice = pDevice; - m_pContext = pContext; - SAFE_ADDREF(m_pGameInstance); - SAFE_ADDREF(m_pDevice); - SAFE_ADDREF(m_pContext); - return S_OK; -} - -void CInformation::Release_Information() -{ - -} - -void CInformation::Free() -{ - __super::Free(); - - SAFE_RELEASE(m_pDevice); - SAFE_RELEASE(m_pContext); - SAFE_RELEASE(m_pGameInstance); -} diff --git a/Jusin154_Team3D/Client/Private/Level_Field.cpp b/Jusin154_Team3D/Client/Private/Level_Field.cpp index 43e23c39c..8101093b3 100644 --- a/Jusin154_Team3D/Client/Private/Level_Field.cpp +++ b/Jusin154_Team3D/Client/Private/Level_Field.cpp @@ -2,12 +2,15 @@ #include "Level_Field.h" #include "GameInstance.h" #include "Level_Loading.h" +#include "InfoInstance.h" +#include "Light_Main.h" #include "Layer.h" CLevel_Field::CLevel_Field(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID) : CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) } { - + m_pInfoInstance = CInfoInstance::GetInstance(); + SAFE_ADDREF(m_pInfoInstance); } HRESULT CLevel_Field::Initialize(void* pArg) @@ -37,34 +40,31 @@ HRESULT CLevel_Field::Initialize() void CLevel_Field::Update(_float fTimeDelta) { + if (m_pGameInstance->Mouse_Up(DIM_RBUTTON)) + { + m_pGameInstance->Set_LevelToChange(); + } + + m_pInfoInstance->Update(fTimeDelta); + if (true == m_pGameInstance->Check_LevelShouldChange()) { - //if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::WOODS)))) { - // return; - //} + if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::RESTART)))) { + return; + } } } HRESULT CLevel_Field::Render() { - SetWindowText(g_hWnd, TEXT("게임플레이레벨입니다")); + SetWindowText(g_hWnd, TEXT("필드레벨")); return S_OK; } HRESULT CLevel_Field::Ready_Lights() { - LIGHT_DESC LightDesc{}; - - LightDesc.eType = LIGHT::DIRECTIONAL; - LightDesc.vDiffuse = _float4(0.8f, 0.8f, 0.8f, 0.f); - LightDesc.vAmbient = _float4(0.2f, 0.2f, 0.2f, 0.f); - LightDesc.vSpecular = _float4(0.f, 0.f, 0.f, 0.f); - //LightDesc.vDirection = _float4(1.f, -1.f, 1.f, 0.f); - - //if (FAILED(m_pGameInstance->On_Light(NEXT_LEVEL, TEXT("Main_Light"), LightDesc, nullptr))) { - // return E_FAIL; - //} - - + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, LAYER_LIGHT))) { + return E_FAIL; + } return S_OK; } @@ -111,4 +111,5 @@ void CLevel_Field::Free() { __super::Free(); + SAFE_RELEASE(m_pInfoInstance); } diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp index 766d6da10..f3cd197f3 100644 --- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp +++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp @@ -4,12 +4,14 @@ #include "Level_Loading.h" #include "Light_Main.h" #include "Camera_Debug.h" +#include "InfoInstance.h" #include "Layer.h" CLevel_GamePlay::CLevel_GamePlay(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID) : CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) } { - + m_pInfoInstance = CInfoInstance::GetInstance(); + SAFE_ADDREF(m_pInfoInstance); } HRESULT CLevel_GamePlay::Initialize(void* pArg) @@ -17,7 +19,6 @@ HRESULT CLevel_GamePlay::Initialize(void* pArg) if (FAILED(Ready_Lights())) { return E_FAIL; } - if (FAILED(Ready_Markers())) { return E_FAIL; } @@ -39,10 +40,17 @@ HRESULT CLevel_GamePlay::Initialize() void CLevel_GamePlay::Update(_float fTimeDelta) { + if (m_pGameInstance->Mouse_Up(DIM_RBUTTON)) + { + m_pGameInstance->Set_LevelToChange(); + } + + m_pInfoInstance->Update(fTimeDelta); + if (true == m_pGameInstance->Check_LevelShouldChange()) { - //if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::WOODS)))) { - // return; - //} + if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::FIELD)))) { + return; + } } } @@ -54,8 +62,9 @@ HRESULT CLevel_GamePlay::Render() HRESULT CLevel_GamePlay::Ready_Lights() { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, LAYER_LIGHT))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, LAYER_LIGHT))){ return E_FAIL; + } return S_OK; } @@ -77,6 +86,9 @@ HRESULT CLevel_GamePlay::Ready_Layer_Camera() Camera_Desc.pCameraKey = CAMERA_DEBUG; Camera_Desc.fRotationPerSec = XMConvertToRadians(90.0f); Camera_Desc.fMouseSensor = 0.1f; + Camera_Desc.iPriority = 99; + Camera_Desc.pFollowTarget = { nullptr }; + Camera_Desc.pLookTarget = { nullptr }; CCamera_Debug* pCamera = { nullptr }; if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_CAMERA, &Camera_Desc, nullptr, &pCamera))){ @@ -122,4 +134,5 @@ void CLevel_GamePlay::Free() { __super::Free(); + SAFE_RELEASE(m_pInfoInstance); } diff --git a/Jusin154_Team3D/Client/Private/Level_Loading.cpp b/Jusin154_Team3D/Client/Private/Level_Loading.cpp index fcc85f885..f68a13049 100644 --- a/Jusin154_Team3D/Client/Private/Level_Loading.cpp +++ b/Jusin154_Team3D/Client/Private/Level_Loading.cpp @@ -1,4 +1,4 @@ -#include "pch.h" +#include "pch.h" #include "Level_Loading.h" #include "Loader.h" @@ -6,6 +6,8 @@ #include "Layer.h" #include "Level_Logo.h" #include "Level_GamePlay.h" +#include "Level_Restart.h" +#include "Level_Field.h" CLevel_Loading::CLevel_Loading(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID) : CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) } @@ -47,7 +49,17 @@ void CLevel_Loading::Update(_float fTimeDelta) { pairLevel = CLevel_GamePlay::Create(m_pDevice, m_pContext, m_eNextLevelID, nullptr); } break; + case LEVEL::FIELD: + { + pairLevel = CLevel_Field::Create(m_pDevice, m_pContext, m_eNextLevelID, nullptr); + } break; + case LEVEL::RESTART: + { + pairLevel = CLevel_Restart::Create(m_pDevice, m_pContext, m_eNextLevelID); + } break; + default: + assert(false); // E_IMPL break; } @@ -59,7 +71,7 @@ void CLevel_Loading::Update(_float fTimeDelta) return; } else /* FAILED */ { - assert(false); // ·¹º§ º¯°æ ½ÇÆÐ + assert(false); // 레벨 변경 실패 } } } diff --git a/Jusin154_Team3D/Client/Private/Level_Logo.cpp b/Jusin154_Team3D/Client/Private/Level_Logo.cpp index 7cd7f7049..6c6b50201 100644 --- a/Jusin154_Team3D/Client/Private/Level_Logo.cpp +++ b/Jusin154_Team3D/Client/Private/Level_Logo.cpp @@ -1,14 +1,16 @@ -#include "pch.h" +#include "pch.h" #include "Level_Logo.h" #include "GameInstance.h" #include "Level_Loading.h" +#include "InfoInstance.h" CLevel_Logo::CLevel_Logo(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID) : CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) } { - + m_pInfoInstance = CInfoInstance::GetInstance(); + SAFE_ADDREF(m_pInfoInstance); } HRESULT CLevel_Logo::Initialize() @@ -23,6 +25,12 @@ void CLevel_Logo::Update(_float fTimeDelta) { if (m_pGameInstance->Mouse_Up(DIM_RBUTTON)) { + m_pGameInstance->Set_LevelToChange(); + } + + m_pInfoInstance->Update(fTimeDelta); + + if (true == m_pGameInstance->Check_LevelShouldChange()) { if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::GAMEPLAY)))) { return; } @@ -31,7 +39,7 @@ void CLevel_Logo::Update(_float fTimeDelta) HRESULT CLevel_Logo::Render() { - SetWindowText(g_hWnd, TEXT("·ΰí·¹º§ÀԴϴÙ")); + SetWindowText(g_hWnd, TEXT("로고레벨입니다")); return S_OK; } @@ -57,5 +65,5 @@ void CLevel_Logo::Free() { __super::Free(); - + SAFE_RELEASE(m_pInfoInstance); } diff --git a/Jusin154_Team3D/Client/Private/Level_Restart.cpp b/Jusin154_Team3D/Client/Private/Level_Restart.cpp index 75fb7534d..91dc3500d 100644 --- a/Jusin154_Team3D/Client/Private/Level_Restart.cpp +++ b/Jusin154_Team3D/Client/Private/Level_Restart.cpp @@ -1,6 +1,6 @@ #include "pch.h" #include "Level_Restart.h" -#include "Information.h" +#include "InfoInstance.h" #include "GameInstance.h" #include "Level_Loading.h" @@ -9,25 +9,36 @@ CLevel_Restart::CLevel_Restart(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID) : CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) } { - + m_pInfoInstance = CInfoInstance::GetInstance(); + SAFE_ADDREF(m_pInfoInstance); } HRESULT CLevel_Restart::Initialize() { - //m_eNextLevel = CInformation::GetInstance()->Get_RestartLevel(); + m_eNextLevel = m_pInfoInstance->Get_RestartLevel(); return S_OK; } void CLevel_Restart::Update(_float fTimeDelta) { - if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, m_eNextLevel)))) { - return; + if (m_pGameInstance->Mouse_Up(DIM_RBUTTON)) + { + m_pGameInstance->Set_LevelToChange(); + } + + m_pInfoInstance->Update(fTimeDelta); + + if (true == m_pGameInstance->Check_LevelShouldChange()) { + if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, m_eNextLevel)))) { + return; + } } } HRESULT CLevel_Restart::Render() { + SetWindowText(g_hWnd, TEXT("리스타트레벨")); return S_OK; } @@ -48,4 +59,5 @@ void CLevel_Restart::Free() { __super::Free(); + SAFE_RELEASE(m_pInfoInstance); } diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index 4aa07b34f..9ffe64cfa 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -56,6 +56,9 @@ HRESULT CLoader::Loading() case LEVEL::FIELD: hr = Loading_For_Field(); break; + case LEVEL::RESTART: + hr = Loading_For_Restart(); + break; default: break; } @@ -141,6 +144,27 @@ HRESULT CLoader::Loading_For_Field() return S_OK; } +HRESULT CLoader::Loading_For_Restart() +{ + m_strMessage = TEXT("텍스쳐를(을) 로딩 중 입니다."); + + m_strMessage = TEXT("모델를(을) 로딩 중 입니다."); + + m_strMessage = TEXT("셰이더를(을) 로딩 중 입니다."); + + m_strMessage = TEXT("이펙트를(을) 로딩 중 입니다."); + + m_strMessage = TEXT("객체원형를(을) 로딩 중 입니다."); + + m_strMessage = TEXT("정보를 불러오는 중입니다."); + + m_strMessage = TEXT("로딩이 완료되었습니다.."); + + m_isFinished = true; + + return S_OK; +} + CLoader* CLoader::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eNextLevelID) { CLoader* pInstance = new CLoader(pDevice, pContext); diff --git a/Jusin154_Team3D/Client/Private/MainApp.cpp b/Jusin154_Team3D/Client/Private/MainApp.cpp index b9c13c960..e6c5d9540 100644 --- a/Jusin154_Team3D/Client/Private/MainApp.cpp +++ b/Jusin154_Team3D/Client/Private/MainApp.cpp @@ -1,14 +1,14 @@ -#include "pch.h" +#include "pch.h" #include "MainApp.h" #include "GameInstance.h" #include "Level_Loading.h" +#include "InfoInstance.h" #ifdef _DEBUG _float g_fTimeMult = 1.f; #endif // _DEBUG - CMainApp::CMainApp() : m_pGameInstance{ CGameInstance::GetInstance() } { @@ -74,7 +74,7 @@ HRESULT CMainApp::Render() m_pGameInstance->Draw(); GUI::Render(); - //m_pGameInstance->Render_Font(TEXT("HYHL"), TEXT("ÇǰïÇØ ¸ø ½á"), _float2(0.f, 0.f), XMVectorSet(1.f, 0.f, 0.f, 1.f)); + //m_pGameInstance->Render_Font(TEXT("HYHL"), TEXT("피곤해 못 써"), _float2(0.f, 0.f), XMVectorSet(1.f, 0.f, 0.f, 1.f)); ImGui_ImplDX11_RenderDrawData(GUI::GetDrawData()); m_pGameInstance->Render_End(); @@ -96,7 +96,14 @@ HRESULT CMainApp::Start_Level(LEVEL eLevelID) if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, eLevelID)))) { return E_FAIL; } - + m_pInfoInstance = CInfoInstance::GetInstance(); + if (nullptr == m_pInfoInstance) { + return E_FAIL; + } + SAFE_ADDREF(m_pInfoInstance); + if (FAILED(m_pInfoInstance->Initialize_Information(m_pDevice, m_pContext))) { + return E_FAIL; + } return S_OK; } @@ -157,6 +164,9 @@ void CMainApp::Free() { __super::Free(); + m_pInfoInstance->Release_Information(); + SAFE_RELEASE(m_pInfoInstance); + Release_IMGUI(); SAFE_RELEASE(m_pDevice); diff --git a/Jusin154_Team3D/Client/Private/MapInfo.cpp b/Jusin154_Team3D/Client/Private/MapInfo.cpp new file mode 100644 index 000000000..032d467fd --- /dev/null +++ b/Jusin154_Team3D/Client/Private/MapInfo.cpp @@ -0,0 +1,50 @@ +#include "pch.h" +#include "MapInfo.h" +#include "GameInstance.h" +#include "InfoInstance.h" + +CMapInfo::CMapInfo() +{ +} + +void CMapInfo::Update(_float fTimeDelta) +{ +} + +HRESULT CMapInfo::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex) +{ + m_pGameInstance = CGameInstance::GetInstance(); + m_pInfoInstance = CInfoInstance::GetInstance(); + m_pDevice = pDevice; + m_pContext = pContex; + + SAFE_ADDREF(m_pGameInstance); + SAFE_ADDREF(m_pInfoInstance); + SAFE_ADDREF(m_pDevice); + SAFE_ADDREF(m_pContext); + + + return S_OK; +} + +CMapInfo* CMapInfo::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContex) +{ + CMapInfo* pInstance = new CMapInfo(); + + if (FAILED(pInstance->Initialize(pDevice, pContex))) { + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CMapInfo::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pGameInstance); + SAFE_RELEASE(m_pInfoInstance); + SAFE_RELEASE(m_pDevice); + SAFE_RELEASE(m_pContext); + +} diff --git a/Jusin154_Team3D/Client/Private/MonsterInfo.cpp b/Jusin154_Team3D/Client/Private/MonsterInfo.cpp new file mode 100644 index 000000000..27d673a78 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/MonsterInfo.cpp @@ -0,0 +1,50 @@ +#include "pch.h" +#include "MonsterInfo.h" +#include "GameInstance.h" +#include "InfoInstance.h" + +CMonsterInfo::CMonsterInfo() +{ +} + +void CMonsterInfo::Update(_float fTimeDelta) +{ +} + +HRESULT CMonsterInfo::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex) +{ + m_pGameInstance = CGameInstance::GetInstance(); + m_pInfoInstance = CInfoInstance::GetInstance(); + m_pDevice = pDevice; + m_pContext = pContex; + + SAFE_ADDREF(m_pGameInstance); + SAFE_ADDREF(m_pInfoInstance); + SAFE_ADDREF(m_pDevice); + SAFE_ADDREF(m_pContext); + + + return S_OK; +} + +CMonsterInfo* CMonsterInfo::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContex) +{ + CMonsterInfo* pInstance = new CMonsterInfo(); + + if (FAILED(pInstance->Initialize(pDevice, pContex))) { + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CMonsterInfo::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pGameInstance); + SAFE_RELEASE(m_pInfoInstance); + SAFE_RELEASE(m_pDevice); + SAFE_RELEASE(m_pContext); + +} diff --git a/Jusin154_Team3D/Client/Private/PlayerInfo.cpp b/Jusin154_Team3D/Client/Private/PlayerInfo.cpp new file mode 100644 index 000000000..d355667a6 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/PlayerInfo.cpp @@ -0,0 +1,50 @@ +#include "pch.h" +#include "PlayerInfo.h" +#include "GameInstance.h" +#include "InfoInstance.h" + +CPlayerInfo::CPlayerInfo() +{ +} + +void CPlayerInfo::Update(_float fTimeDelta) +{ +} + +HRESULT CPlayerInfo::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex) +{ + m_pGameInstance = CGameInstance::GetInstance(); + m_pInfoInstance = CInfoInstance::GetInstance(); + m_pDevice = pDevice; + m_pContext = pContex; + + SAFE_ADDREF(m_pGameInstance); + SAFE_ADDREF(m_pInfoInstance); + SAFE_ADDREF(m_pDevice); + SAFE_ADDREF(m_pContext); + + + return S_OK; +} + +CPlayerInfo* CPlayerInfo::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContex) +{ + CPlayerInfo* pInstance = new CPlayerInfo(); + + if (FAILED(pInstance->Initialize(pDevice, pContex))) { + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CPlayerInfo::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pGameInstance); + SAFE_RELEASE(m_pInfoInstance); + SAFE_RELEASE(m_pDevice); + SAFE_RELEASE(m_pContext); + +} diff --git a/Jusin154_Team3D/Client/Public/InfoInstance.h b/Jusin154_Team3D/Client/Public/InfoInstance.h new file mode 100644 index 000000000..6fe77ff71 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/InfoInstance.h @@ -0,0 +1,44 @@ +#pragma once + +#include "Client_Define.h" +#include "Base.h" + +NS_BEGIN(Engine) +class CGameInstance; +class CGameObject; +NS_END + +NS_BEGIN(Client) + +class CInfoInstance final : public CBase +{ + DECLARE_SINGLETON(CInfoInstance) +private: + CInfoInstance(); + virtual ~CInfoInstance() = default; +public: + HRESULT Initialize_Information(ID3D11Device* pDevice, ID3D11DeviceContext* pContex); + void Release_Information(); + LEVEL Get_RestartLevel(); +public: + void Update(_float fTimeDelta); + + +private: + CGameInstance* m_pGameInstance = { nullptr }; + ID3D11Device* m_pDevice = { nullptr }; + ID3D11DeviceContext* m_pContext = { nullptr }; + + class CPlayerInfo* m_pPlayerInfo = { nullptr }; + class CMonsterInfo* m_pMonsterInfo = { nullptr }; + class CMapInfo* m_pMapInfo = { nullptr }; + +#ifdef _DEBUG + _string m_strLog = {}; +#endif // _DEBUG + +public: + virtual void Free() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Information.h b/Jusin154_Team3D/Client/Public/Information.h deleted file mode 100644 index c7c011f70..000000000 --- a/Jusin154_Team3D/Client/Public/Information.h +++ /dev/null @@ -1,42 +0,0 @@ -#pragma once - -#include "Client_Define.h" -#include "Base.h" - -NS_BEGIN(Engine) -class CGameInstance; -class CGameObject; -NS_END - -NS_BEGIN(Client) - -class CInformation final : public CBase -{ - DECLARE_SINGLETON(CInformation) -private: - CInformation(); - virtual ~CInformation() = default; -public: - HRESULT Initialize_Information(ID3D11Device* pDevice, ID3D11DeviceContext* pContex); - void Release_Information(); - - -private: - ID3D11Device* m_pDevice = { nullptr }; - ID3D11DeviceContext* m_pContext = { nullptr }; - class CGameInstance* m_pGameInstance = { nullptr }; - - class CPlayerInfo* m_pPlayerInfo = { nullptr }; - class CMonsterInfo* m_pMonsterInfo = { nullptr }; - class CNeutralInfo* m_pNeutralInfo = { nullptr }; - -private: -#ifdef _DEBUG - _string m_strLog = {}; -#endif // _DEBUG - -public: - virtual void Free() override; -}; - -NS_END diff --git a/Jusin154_Team3D/Client/Public/Level_Field.h b/Jusin154_Team3D/Client/Public/Level_Field.h index d4b52ca78..58603e37f 100644 --- a/Jusin154_Team3D/Client/Public/Level_Field.h +++ b/Jusin154_Team3D/Client/Public/Level_Field.h @@ -16,6 +16,9 @@ class CLevel_Field final : public CLevel virtual void Update(_float fTimeDelta) override; virtual HRESULT Render() override; +private: + class CInfoInstance* m_pInfoInstance = { nullptr }; + private: virtual HRESULT Initialize() override; HRESULT Initialize(void* pArg); diff --git a/Jusin154_Team3D/Client/Public/Level_GamePlay.h b/Jusin154_Team3D/Client/Public/Level_GamePlay.h index 877cdbbc0..4ed6cd481 100644 --- a/Jusin154_Team3D/Client/Public/Level_GamePlay.h +++ b/Jusin154_Team3D/Client/Public/Level_GamePlay.h @@ -1,4 +1,4 @@ -#pragma once +#pragma once #include "Client_Define.h" #include "Level.h" @@ -16,6 +16,10 @@ class CLevel_GamePlay final : public CLevel virtual void Update(_float fTimeDelta) override; virtual HRESULT Render() override; + +private: + class CInfoInstance* m_pInfoInstance = { nullptr }; + private: virtual HRESULT Initialize() override; HRESULT Initialize(void* pArg); @@ -25,10 +29,11 @@ class CLevel_GamePlay final : public CLevel HRESULT Ready_Layer_Camera(); HRESULT Ready_Layer_Sound(); HRESULT Ready_Layer_Effect(const _wstring& strLayerTag); + public: static pair> Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID, void* pArg); virtual void Free() override; }; -NS_END \ No newline at end of file +NS_END diff --git a/Jusin154_Team3D/Client/Public/Level_Logo.h b/Jusin154_Team3D/Client/Public/Level_Logo.h index da1546a74..7ace4888a 100644 --- a/Jusin154_Team3D/Client/Public/Level_Logo.h +++ b/Jusin154_Team3D/Client/Public/Level_Logo.h @@ -1,4 +1,4 @@ -#pragma once +#pragma once #include "Client_Define.h" #include "Level.h" @@ -15,6 +15,9 @@ class CLevel_Logo final : public CLevel virtual void Update(_float fTimeDelta) override; virtual HRESULT Render() override; +private: + class CInfoInstance* m_pInfoInstance = { nullptr }; + private: virtual HRESULT Initialize() override; HRESULT Ready_Layer_UI(const _wstring& strLayerTag); @@ -25,4 +28,4 @@ class CLevel_Logo final : public CLevel virtual void Free() override; }; -NS_END \ No newline at end of file +NS_END diff --git a/Jusin154_Team3D/Client/Public/Level_Restart.h b/Jusin154_Team3D/Client/Public/Level_Restart.h index 4c6d1dedd..2b996f08c 100644 --- a/Jusin154_Team3D/Client/Public/Level_Restart.h +++ b/Jusin154_Team3D/Client/Public/Level_Restart.h @@ -17,8 +17,12 @@ class CLevel_Restart final : public CLevel virtual void Update(_float fTimeDelta) override; virtual HRESULT Render() override; +private: + class CInfoInstance* m_pInfoInstance = { nullptr }; + private: virtual HRESULT Initialize() override; + private: LEVEL m_eNextLevel = {}; public: diff --git a/Jusin154_Team3D/Client/Public/Loader.h b/Jusin154_Team3D/Client/Public/Loader.h index 9dcd8d2a3..fe9223f44 100644 --- a/Jusin154_Team3D/Client/Public/Loader.h +++ b/Jusin154_Team3D/Client/Public/Loader.h @@ -35,6 +35,7 @@ class CLoader final : public CBase HRESULT Loading_For_Logo(); HRESULT Loading_For_GamePlay(); HRESULT Loading_For_Field(); + HRESULT Loading_For_Restart(); public: static CLoader* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eNextLevelID); diff --git a/Jusin154_Team3D/Client/Public/MainApp.h b/Jusin154_Team3D/Client/Public/MainApp.h index f65267e73..b168ae59f 100644 --- a/Jusin154_Team3D/Client/Public/MainApp.h +++ b/Jusin154_Team3D/Client/Public/MainApp.h @@ -1,4 +1,4 @@ -#pragma once +#pragma once #include "Client_Define.h" #include "Base.h" @@ -23,6 +23,7 @@ class CMainApp final : public CBase private: CGameInstance* m_pGameInstance = { nullptr }; + class CInfoInstance* m_pInfoInstance = { nullptr }; ID3D11Device* m_pDevice = { nullptr }; ID3D11DeviceContext* m_pContext = { nullptr }; diff --git a/Jusin154_Team3D/Client/Public/MapInfo.h b/Jusin154_Team3D/Client/Public/MapInfo.h new file mode 100644 index 000000000..51b82b9ff --- /dev/null +++ b/Jusin154_Team3D/Client/Public/MapInfo.h @@ -0,0 +1,35 @@ +#pragma once + +#include "Client_Define.h" +#include "Base.h" + +NS_BEGIN(Engine) +class CGameInstance; +class CGameObject; +NS_END + +NS_BEGIN(Client) + +class CMapInfo final : public CBase +{ +private: + CMapInfo(); + ~CMapInfo() = default; +public: + void Update(_float fTimeDelta); + +private: + CGameInstance* m_pGameInstance = { nullptr }; + class CInfoInstance* m_pInfoInstance = { nullptr }; + ID3D11Device* m_pDevice = { nullptr }; + ID3D11DeviceContext* m_pContext = { nullptr }; + +private: + HRESULT Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex); + +public: + static CMapInfo* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContex); + virtual void Free() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/MonsterInfo.h b/Jusin154_Team3D/Client/Public/MonsterInfo.h new file mode 100644 index 000000000..ab05fbb8f --- /dev/null +++ b/Jusin154_Team3D/Client/Public/MonsterInfo.h @@ -0,0 +1,35 @@ +#pragma once + +#include "Client_Define.h" +#include "Base.h" + +NS_BEGIN(Engine) +class CGameInstance; +class CGameObject; +NS_END + +NS_BEGIN(Client) + +class CMonsterInfo final : public CBase +{ +private: + CMonsterInfo(); + ~CMonsterInfo() = default; +public: + void Update(_float fTimeDelta); + +private: + CGameInstance* m_pGameInstance = { nullptr }; + class CInfoInstance* m_pInfoInstance = { nullptr }; + ID3D11Device* m_pDevice = { nullptr }; + ID3D11DeviceContext* m_pContext = { nullptr }; + +private: + HRESULT Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex); + +public: + static CMonsterInfo* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContex); + virtual void Free() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/PlayerInfo.h b/Jusin154_Team3D/Client/Public/PlayerInfo.h new file mode 100644 index 000000000..c76b406f2 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/PlayerInfo.h @@ -0,0 +1,35 @@ +#pragma once + +#include "Client_Define.h" +#include "Base.h" + +NS_BEGIN(Engine) +class CGameInstance; +class CGameObject; +NS_END + +NS_BEGIN(Client) + +class CPlayerInfo final : public CBase +{ +private: + CPlayerInfo(); + ~CPlayerInfo() = default; +public: + void Update(_float fTimeDelta); + +private: + CGameInstance* m_pGameInstance = { nullptr }; + class CInfoInstance* m_pInfoInstance = { nullptr }; + ID3D11Device* m_pDevice = { nullptr }; + ID3D11DeviceContext* m_pContext = { nullptr }; + +private: + HRESULT Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex); + +public: + static CPlayerInfo* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContex); + virtual void Free() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Editor/Default/.bin b/Jusin154_Team3D/Editor/Default/.bin index 052ff3eb084ed0d32b06c4587e93a4faa9b67e65..2b6446a323c60e852cea9527e5a4e7d7a22b4368 100644 GIT binary patch literal 128 zcmWN`yAi`65CGAfDrmss#32yshR>t_CCz!^my?*sndrV9Z-~Cl3!9;kQyJ7T2WG3lo}uA77-s3?^Ie+5}cEnk{a(A?~$03 z7L-~X?;GULpo&vpNPJLgL1Jc6etdXlaY4MHQM?Nl)t-69C5d^-sqwz~DXBT}!M^b> N`MIe^dIkoD3;;Z!LhS$m diff --git a/Jusin154_Team3D/Engine/Private/GameInstance.cpp b/Jusin154_Team3D/Engine/Private/GameInstance.cpp index 6fe14a25c..0009caed7 100644 --- a/Jusin154_Team3D/Engine/Private/GameInstance.cpp +++ b/Jusin154_Team3D/Engine/Private/GameInstance.cpp @@ -145,7 +145,6 @@ void CGameInstance::Clear_Resources(_uint iLevelIndex) m_pCamera_Manager->Clear_Cameras(iLevelIndex); m_pObject_Manager->Clear(iLevelIndex); m_pLight_Manager->Light_Clear(iLevelIndex); - } _float CGameInstance::Random_Normal() diff --git a/Jusin154_Team3D/Engine/Private/Light_Manager.cpp b/Jusin154_Team3D/Engine/Private/Light_Manager.cpp index 601ccdf56..19f6380eb 100644 --- a/Jusin154_Team3D/Engine/Private/Light_Manager.cpp +++ b/Jusin154_Team3D/Engine/Private/Light_Manager.cpp @@ -1,4 +1,4 @@ -#include "pch.h" +#include "pch.h" #include "Light_Manager.h" #include "Light.h" @@ -74,10 +74,9 @@ const LIGHT_DESC* CLight_Manager::Get_Light_Info(_uint _iCurrentLevel, _uint _iL } -HRESULT CLight_Manager::Render_Lights(_uint _iCurrentLevel, CShader* pShader, CVIBuffer* pVIBuffer) +HRESULT CLight_Manager::Render_Lights(_uint iCurrentLevel, CShader* pShader, CVIBuffer* pVIBuffer) { - - for (auto& pLight : m_Lights[_iCurrentLevel]) + for (auto& pLight : m_Lights[iCurrentLevel]) { pLight->Render(pShader, pVIBuffer); } diff --git a/Jusin154_Team3D/Engine/Public/Light_Manager.h b/Jusin154_Team3D/Engine/Public/Light_Manager.h index c028d0752..fad3c9aa8 100644 --- a/Jusin154_Team3D/Engine/Public/Light_Manager.h +++ b/Jusin154_Team3D/Engine/Public/Light_Manager.h @@ -1,4 +1,4 @@ -#pragma once +#pragma once #include "Base.h" @@ -9,8 +9,6 @@ class CLight_Manager final : public CBase private: CLight_Manager(); virtual ~CLight_Manager() = default; - - public: void Add_Light(_uint _iCurrentLevel, class CLight* _pLight); void Delete_Light(_uint _iCurrentLevel, class CLight* _pLight); @@ -18,7 +16,7 @@ class CLight_Manager final : public CBase const LIGHT_DESC* Get_Light_Info(_uint _iCurrentLevel ,_uint _iLightIndex); public: - HRESULT Render_Lights(_uint _iCurrentLevel, class CShader* pShader, class CVIBuffer* pVIBuffer); + HRESULT Render_Lights(_uint iCurrentLevel, class CShader* pShader, class CVIBuffer* pVIBuffer); private: HRESULT Initialize(_uint iNumLevels); @@ -31,4 +29,4 @@ class CLight_Manager final : public CBase virtual void Free() override; }; -NS_END \ No newline at end of file +NS_END From 22ba88fba5b09bcfe15d0e854a770306fab95f67 Mon Sep 17 00:00:00 2001 From: kimnuri Date: Thu, 20 Nov 2025 21:42:40 +0900 Subject: [PATCH 5/7] [add] .binFile --- Jusin154_Team3D/Editor/Default/.bin | Bin 372 -> 128 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/Jusin154_Team3D/Editor/Default/.bin b/Jusin154_Team3D/Editor/Default/.bin index 052ff3eb084ed0d32b06c4587e93a4faa9b67e65..2b6446a323c60e852cea9527e5a4e7d7a22b4368 100644 GIT binary patch literal 128 zcmWN`yAi`65CGAfDrmss#32yshR>t_CCz!^my?*sndrV9Z-~Cl3!9;kQyJ7T2WG3lo}uA77-s3?^Ie+5}cEnk{a(A?~$03 z7L-~X?;GULpo&vpNPJLgL1Jc6etdXlaY4MHQM?Nl)t-69C5d^-sqwz~DXBT}!M^b> N`MIe^dIkoD3;;Z!LhS$m From 12f99f4a95c3f18858c03424fd51638caa49ab01 Mon Sep 17 00:00:00 2001 From: GiJungSUk Date: Thu, 20 Nov 2025 21:47:35 +0900 Subject: [PATCH 6/7] 1120-21:27 commit --- .../Resources/Data/Effect/BasicParticle.bin | 3 -- .../Resources/Data/Effect/BasicParticle2.bin | 2 +- .../Resources/Data/Effect/BlustParticle.bin | 2 +- .../Resources/Data/Effect/ConfingoTest.bin | 3 -- .../Resources/Data/Effect/FireProjectile.bin | 2 +- .../Editor/Bin/Resources/Data/Effect/Ice.bin | 2 +- .../Resources/Data/Effect/JapProjectile.bin | 2 +- .../Data/Effect/LightProjectile1.bin | 2 +- .../Data/Effect/LightProjectile2.bin | 2 +- .../Data/Effect/LightProjectileCircle1.bin | 2 +- .../Data/Effect/LightProjectileMiddle.bin | 2 +- .../Resources/Data/Effect/MagicProjectile.bin | 2 +- .../Bin/Resources/Data/Effect/Projectile0.bin | 3 -- .../Bin/Resources/Data/Effect/SpreadRing.bin | 3 -- .../Editor/Bin/Resources/Data/Effect/Test.bin | 4 +- .../Bin/Resources/Data/Effect/Test2.bin | 3 -- .../Bin/Resources/Data/Effect/TrailTest.bin | 3 -- .../Data/Effect/임시공간/BaiscParticle.bin | 3 -- .../Data/Effect/임시공간/BasicParticle.bin | 3 -- .../Data/Effect/임시공간/BasicParticle2.bin | 4 +- .../Data/Effect/임시공간/BlustParticle.bin | 4 +- .../Data/Effect/임시공간/FireProjectile.bin | 4 +- .../Resources/Data/Effect/임시공간/Ice.bin | 4 +- .../Data/Effect/임시공간/JapImpact.bin | 3 ++ .../Data/Effect/임시공간/JapProjectile.bin | 3 ++ .../Data/Effect/임시공간/LightProjectile1.bin | 4 +- .../Data/Effect/임시공간/LightProjectile2.bin | 4 +- .../임시공간/LightProjectileCircle1.bin | 4 +- .../Effect/임시공간/LightProjectileMiddle.bin | 4 +- .../Data/Effect/임시공간/MagicProjectile.bin | 4 +- .../Resources/Data/Effect/임시공간/Smoke0.bin | 3 ++ .../Data/Effect/임시공간/SpreadRing.bin | 3 -- .../ShaderFiles/Shader_VtxModelInstance.hlsl | 39 ++++++++++++------- Jusin154_Team3D/Editor/Private/EditEffect.cpp | 18 ++++++++- .../Editor/Private/EffectObject.cpp | 9 +++-- Jusin154_Team3D/Editor/Private/NomalJap.cpp | 9 ++++- Jusin154_Team3D/Editor/Public/EditEffect.h | 3 +- Jusin154_Team3D/Editor/Public/EffectObject.h | 7 ++-- Jusin154_Team3D/Editor/Public/NomalJap.h | 4 +- .../Engine/Public/ContainerObject.h | 16 +++++++- 40 files changed, 118 insertions(+), 83 deletions(-) delete mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BasicParticle.bin delete mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/ConfingoTest.bin delete mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Projectile0.bin delete mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/SpreadRing.bin delete mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Test2.bin delete mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/TrailTest.bin delete mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/BaiscParticle.bin delete mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/BasicParticle.bin create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/JapImpact.bin create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/JapProjectile.bin create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Smoke0.bin delete mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/SpreadRing.bin diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BasicParticle.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BasicParticle.bin deleted file mode 100644 index 4ea0d36a9..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BasicParticle.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:97fe8d6e4c7c1b2461a92639a4683f746ff55dc7a821ce119ebe0d8a09373bfd -size 606 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BasicParticle2.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BasicParticle2.bin index d3e2ee6f1..6183fa29e 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BasicParticle2.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BasicParticle2.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a1b8dbceb9ca07dc22e4737226a682a7a8db90860fe75ee7451d90ba30941797 +oid sha256:2555c12dba2f21a7e6665e808215b101554346d4d4188a0492e820092cb14977 size 606 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BlustParticle.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BlustParticle.bin index 11d068b9d..a846374c5 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BlustParticle.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BlustParticle.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:632fe36b935690a2838c92bb8be312d5d763a171423cae41e99dcfd8ba0bd445 +oid sha256:78c6852c3ec3ad9c51c2d509e16ec3304fbd98540971931caeab1f1bc68c0697 size 606 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/ConfingoTest.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/ConfingoTest.bin deleted file mode 100644 index bc239d5c1..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/ConfingoTest.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:016da9c4fc0e164f3914a6d45abfaf0a45f2a421e90b8c360c0581fa5be78023 -size 555 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/FireProjectile.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/FireProjectile.bin index 382829e76..200c53dfb 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/FireProjectile.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/FireProjectile.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7ded4807087aa32efaf780f2466e9bcd25dbf771c61e58eeb30b4ec1fbc9f451 +oid sha256:bdb7c592a817c35876780fe2dab7490ec8c5849e3e952abe27a67da358111e0e size 636 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ice.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ice.bin index 7523b1838..edd508f8f 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ice.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ice.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ba8f4656956e753b0378a2d8f6ce2f8dfa73014e885a59e8890cdedfd28daad2 +oid sha256:35cd480b8bfa4770b41f97451a691de39f33b5a985890648f18daacf4cc348c7 size 529 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapProjectile.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapProjectile.bin index 049eb352e..c5fcd5952 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapProjectile.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapProjectile.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b219de38477c95013742c4d3110c679380c3e147589a067ab8d2aceaeaf0c440 +oid sha256:f4a18da098b58c4f873061ac055c96293ea49b224c2399554f6b66e75fed9e8a size 642 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectile1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectile1.bin index c15925e85..d0836eddc 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectile1.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectile1.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:937ae454ea27b326ccc519afd84314adab8c658009e609f8217c525d26cdfb72 +oid sha256:0176747fde1a4de3b5993b84176737660b36aec02e85c4e17a14ce87cfd30f5e size 595 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectile2.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectile2.bin index 5225655a0..40b1db580 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectile2.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectile2.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:51af73356e47c2cfed59bd5d09728335e3cee1311e0790610c68cf86d8f32f83 +oid sha256:be6c55af6431d3dc243574715c75817a5e42690c33bc08fbf72f692cf0de4fb7 size 605 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectileCircle1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectileCircle1.bin index 759a4f369..35a738020 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectileCircle1.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectileCircle1.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d81d1f57e021bd726103dbc896bca49c1cfcadac7366ca055b1067b9361132c1 +oid sha256:66d01cfcb231ffc12115f17e77894ddfe1cd179c5d16c7613fd689a7ddc05cb2 size 550 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectileMiddle.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectileMiddle.bin index 68b463e39..9c6a67e85 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectileMiddle.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectileMiddle.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:26f5717dbfd5055a0b606134b5dd343e3f77bc02c3acfb3bbf50d3ecc1015bfd +oid sha256:0e75c29761f461e275e42fb74cf608a11b31c76d0e1d504cf7926a1b9211db74 size 607 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MagicProjectile.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MagicProjectile.bin index ce9742895..78a0bf3a2 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MagicProjectile.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MagicProjectile.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7806c0cc6f06d1b5dde93aeb8da7b7e36ead2684b56d9697d445c4e1781bd975 +oid sha256:1a6a790f7299ea457a56c0c9a711e3b10ed2905eb86a10946be78704305a09cc size 634 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Projectile0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Projectile0.bin deleted file mode 100644 index 9119bfe76..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Projectile0.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1b72b06e1ce45740d09f46a051b0f99a4aaa53f057af0bc8ffbd74b78cd18b6f -size 633 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/SpreadRing.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/SpreadRing.bin deleted file mode 100644 index b74cb9d5d..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/SpreadRing.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:23ceeb532383f6a0506647edb2497de4827ac9d931e14be41ded9e5a77064dc6 -size 644 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Test.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Test.bin index ea52d381c..f12d2d4ac 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Test.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Test.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b80f4d457c7d8ce25daf73aa960db5d1a46b491d700a40f35e91a253546b0407 -size 588 +oid sha256:a9e94f9b76f314c1d3b6537ac73ab2035247c6cff7cca94ba355313569eba2d3 +size 642 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Test2.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Test2.bin deleted file mode 100644 index 74e029c11..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Test2.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b7e9b058b855b5c589651bd350a4af99b30664bd1ff684d4d2a96d34e683d36f -size 586 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/TrailTest.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/TrailTest.bin deleted file mode 100644 index a727116fa..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/TrailTest.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a855f032a53ad0b5a1efd023bb02e4ffa10df3deeced2e5fd049a15615adfefc -size 550 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/BaiscParticle.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/BaiscParticle.bin deleted file mode 100644 index 64103f049..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/BaiscParticle.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e51157f496aa53487d5ff04f60d1b871a4be3773ddc43cf36895d79f4ba2f27e -size 598 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/BasicParticle.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/BasicParticle.bin deleted file mode 100644 index 1b1e9059f..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/BasicParticle.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:99cde9fe783c6e2c4cad26263ae72294e0c87784961cdc69953467ae08ace0de -size 598 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/BasicParticle2.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/BasicParticle2.bin index 0e4cd0d00..d3e2ee6f1 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/BasicParticle2.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/BasicParticle2.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c047e6c3570b1d26e85ebdd12617172b050be798fb4ed1ec40b9335fff94e769 -size 598 +oid sha256:a1b8dbceb9ca07dc22e4737226a682a7a8db90860fe75ee7451d90ba30941797 +size 606 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/BlustParticle.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/BlustParticle.bin index 396ed3956..11d068b9d 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/BlustParticle.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/BlustParticle.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f640193ab520cf9c49e9c987cbe0f506d353d27e8a01a67a7e2c049af32cb421 -size 598 +oid sha256:632fe36b935690a2838c92bb8be312d5d763a171423cae41e99dcfd8ba0bd445 +size 606 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/FireProjectile.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/FireProjectile.bin index 96653610c..382829e76 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/FireProjectile.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/FireProjectile.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:59daade7d260f4a7cf9af81a3f09b2a00f6155b786ac7d30552a6d8376fdf5de -size 628 +oid sha256:7ded4807087aa32efaf780f2466e9bcd25dbf771c61e58eeb30b4ec1fbc9f451 +size 636 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Ice.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Ice.bin index 5708bf8d4..7523b1838 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Ice.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Ice.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:448d9913e85573500e2b86c046b8711a342f28597b9fa63048adf92cf7e458b1 -size 521 +oid sha256:ba8f4656956e753b0378a2d8f6ce2f8dfa73014e885a59e8890cdedfd28daad2 +size 529 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/JapImpact.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/JapImpact.bin new file mode 100644 index 000000000..105617a53 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/JapImpact.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:828c5c1282287b21341ca4cc866b70f4507da74bcfef21e80f56c1ed0c97a327 +size 659 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/JapProjectile.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/JapProjectile.bin new file mode 100644 index 000000000..049eb352e --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/JapProjectile.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b219de38477c95013742c4d3110c679380c3e147589a067ab8d2aceaeaf0c440 +size 642 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectile1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectile1.bin index 3e9ac4786..c15925e85 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectile1.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectile1.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:82890f11a1561ca32e8504d5dec11a18ef3dae00f490f70a9581a529b0ca2304 -size 587 +oid sha256:937ae454ea27b326ccc519afd84314adab8c658009e609f8217c525d26cdfb72 +size 595 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectile2.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectile2.bin index 55291ea6b..5225655a0 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectile2.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectile2.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:69c6354c06138ef2b34377e13964d14412600eb5b0f88b21d55e6571b34890c1 -size 597 +oid sha256:51af73356e47c2cfed59bd5d09728335e3cee1311e0790610c68cf86d8f32f83 +size 605 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectileCircle1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectileCircle1.bin index cd81664d3..759a4f369 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectileCircle1.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectileCircle1.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:022d6dcae155a8a1c369aa275ed56e533d5a3afb417b5fed9d6b9345ec05b008 -size 542 +oid sha256:d81d1f57e021bd726103dbc896bca49c1cfcadac7366ca055b1067b9361132c1 +size 550 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectileMiddle.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectileMiddle.bin index 41a49338d..68b463e39 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectileMiddle.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectileMiddle.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cab580f863401e8351fda8c05e5accb6c02b0424d678d65de802b7827ebdad5d -size 599 +oid sha256:26f5717dbfd5055a0b606134b5dd343e3f77bc02c3acfb3bbf50d3ecc1015bfd +size 607 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/MagicProjectile.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/MagicProjectile.bin index 2bdbb53ff..ce9742895 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/MagicProjectile.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/MagicProjectile.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:44e2ce0bc50ae9ef56e8b48444ee2d3795925e1776086701f9be47b9cb09ad0f -size 626 +oid sha256:7806c0cc6f06d1b5dde93aeb8da7b7e36ead2684b56d9697d445c4e1781bd975 +size 634 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Smoke0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Smoke0.bin new file mode 100644 index 000000000..070ef03e6 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Smoke0.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:642666d3fbe73ddb73f32e1d8647b81b79d90fe2cd00fbb315f117b546194fc8 +size 606 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/SpreadRing.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/SpreadRing.bin deleted file mode 100644 index b74cb9d5d..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/SpreadRing.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:23ceeb532383f6a0506647edb2497de4827ac9d931e14be41ded9e5a77064dc6 -size 644 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl index 19e505f62..01cc9d648 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl @@ -82,6 +82,7 @@ bool g_isMaskUVMove; bool g_isNoiseUVMove; bool g_isReverseDissolve; +bool g_isEmissiveDissolve; float g_fFar; @@ -427,14 +428,23 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In) discard; Out = BlendedWeight(vMtrlDiffuse, In.vProjPos.w); + - if (vMtrlDiffuse.a / g_fDiffuseAlpha > g_fEmissiveCutAlpha) + float fEmissiveCutAlpha = g_fEmissiveCutAlpha; + + if (g_isEmissiveDissolve == true) { - float3 vEmissiveColor = g_vEmissive.rgb * g_vEmissive.a + vEmissiveMtrl.rgb * (1 - g_vEmissive.a); - Out.vColorTarget = vector(vEmissiveColor, vMtrlDiffuse.a); + fEmissiveCutAlpha += (In.vLifeTime.x / In.vLifeTime.y) / 2; } - else - Out.vColorTarget = vector(0.f, 0.f, 0.f, 0.f); + + float fSmoothAlpha = smoothstep(fEmissiveCutAlpha - 0.1f, fEmissiveCutAlpha + 0.1f, vMtrlDiffuse.a); + + + + float3 vEmissiveColor = g_vEmissive.rgb * g_vEmissive.a + vEmissiveMtrl.rgb * (1 - g_vEmissive.a); + + Out.vColorTarget = vector(vEmissiveColor * fSmoothAlpha, vMtrlDiffuse.a); + return Out; } @@ -623,18 +633,21 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In) } - //vMtrlDiffuse.a *= g_fDiffuseAlpha; + vMtrlDiffuse.a *= g_fDiffuseAlpha; - //// 색깔 추가할 처리 (이미시브) + // 색깔 추가할 처리 (이미시브) - //float4 vEmissiveMtrl = vector(0.f, 0.f, 0.f, 0.f); + vector vEmissive; - //if (g_isEmissive == true) - //{ - // vEmissiveMtrl = g_EmissiveTexture.Sample(DefaultSampler, In.vTexcoord); - //} + float4 vEmissiveMtrl = vector(0.f, 0.f, 0.f, 0.f); - Out.vDiffuse = vMtrlDiffuse * g_fBlurIntensity; + float fSmoothAlpha = smoothstep(g_fEmissiveCutAlpha - 0.02f, g_fEmissiveCutAlpha + 0.02f, vMtrlDiffuse.a); + + float3 vEmissiveColor = g_vEmissive.rgb * g_vEmissive.a + vEmissiveMtrl.rgb * (1 - g_vEmissive.a); + + vEmissive = vector(vEmissiveColor * fSmoothAlpha, vMtrlDiffuse.a); + + Out.vDiffuse = vMtrlDiffuse * g_fBlurIntensity + vEmissive; return Out; } diff --git a/Jusin154_Team3D/Editor/Private/EditEffect.cpp b/Jusin154_Team3D/Editor/Private/EditEffect.cpp index 471cd2436..b0b1bd29d 100644 --- a/Jusin154_Team3D/Editor/Private/EditEffect.cpp +++ b/Jusin154_Team3D/Editor/Private/EditEffect.cpp @@ -65,8 +65,6 @@ void CEditEffect::Late_Update(_float fTimeDelta) return; - XMStoreFloat4x4(&m_CombinedWorldMatrix , m_pTransformCom->Get_XMWorldMatrix() * m_pParentTransformCom->Get_XMWorldMatrix()); - if (m_EffectInfo.isBlur == true) { m_pGameInstance->Add_RenderGroup(RENDER::BLUR, this); @@ -441,6 +439,7 @@ void CEditEffect::Describe_Entity() GUI::ColorEdit4("Emissive", (_float*)&m_EffectInfo.vEmissive); GUI::Checkbox("EmissiveTex", &m_EffectInfo.isEmissive); + GUI::Checkbox("EmissiveDissolve", &m_EffectInfo.isEmissiveDissolve); if (m_EffectInfo.isEmissive) { @@ -724,6 +723,21 @@ void CEditEffect::Describe_Entity() } + ImGui::Begin("Simple Plot"); + + // samples.data()와 개수, optional offset 인덱스 등 넘길 수 있음 + ImGui::PlotLines("Value", m_ValueVector.data(), (int)m_ValueVector.size(), 0, nullptr, FLT_MAX, FLT_MAX, ImVec2(0, 100)); + + GUI::InputFloat("InputValue", &m_fInputValue); + + if (GUI::Button("AddValue")) + { + m_ValueVector.push_back(m_fInputValue); + } + + ImGui::End(); + + GUI::Separator(); GUI::Spacing(); diff --git a/Jusin154_Team3D/Editor/Private/EffectObject.cpp b/Jusin154_Team3D/Editor/Private/EffectObject.cpp index b3a9d8651..e5e85b552 100644 --- a/Jusin154_Team3D/Editor/Private/EffectObject.cpp +++ b/Jusin154_Team3D/Editor/Private/EffectObject.cpp @@ -609,9 +609,8 @@ HRESULT CEffectObject::LoadPre(const _char* pFilePath, LEVEL eLevel) HRESULT CEffectObject::Bind_ShaderResources() { - if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", &m_CombinedWorldMatrix))) { + 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; @@ -660,8 +659,12 @@ HRESULT CEffectObject::Bind_ShaderResources() if (FAILED(m_pShaderCom->Bind_RawValue("g_isReverseDissolve", &m_EffectInfo.isReverseDissolve, sizeof(_bool)))) { return E_FAIL; } - + if (FAILED(m_pShaderCom->Bind_RawValue("g_isEmissiveDissolve", &m_EffectInfo.isEmissiveDissolve, sizeof(_bool)))) { + return E_FAIL; + } + + if (FAILED(m_pShaderCom->Bind_RawValue("g_vColor", &m_EffectInfo.vColor, sizeof(_float4)))) { return E_FAIL; diff --git a/Jusin154_Team3D/Editor/Private/NomalJap.cpp b/Jusin154_Team3D/Editor/Private/NomalJap.cpp index 526842781..6f32e0139 100644 --- a/Jusin154_Team3D/Editor/Private/NomalJap.cpp +++ b/Jusin154_Team3D/Editor/Private/NomalJap.cpp @@ -40,6 +40,7 @@ HRESULT CNomalJap::Initialize(void* pArg) m_wstrEffectName = L"Nomal_Jap"; m_PartObjects.begin()->second->Set_Visible(true); + m_PartObjects.begin()->second->Get_Component()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion()); m_fDuration = 5.f; @@ -91,7 +92,7 @@ HRESULT CNomalJap::Ready_Child() Desc.vDeltaPos = { 0.f, 0.f, 1.f }; Desc.vLifeTime = { 0.f, 2.f }; - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, CURRENT_LEVEL, LAYER_HITBOX, &Desc, this))) { + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, CURRENT_LEVEL, LAYER_HITBOX, &Desc, this , &m_pPhysHitBox))) { assert(false); return E_FAIL; } @@ -138,12 +139,18 @@ void CNomalJap::OnCollision(CGameObject* pOther , void* pDesc) } m_PartObjects.begin()->second->Set_Visible(false); + + m_pPhysHitBox->Set_Dead(); } void CNomalJap::Free() { __super::Free(); + //if(m_pPhysHitBox != nullptr) + // if (m_pPhysHitBox->Get_Depth() == false) + // SAFE_RELEASE(m_pPhysHitBox); + } void CNomalJap::Describe_Entity() diff --git a/Jusin154_Team3D/Editor/Public/EditEffect.h b/Jusin154_Team3D/Editor/Public/EditEffect.h index af347487a..57f04c84f 100644 --- a/Jusin154_Team3D/Editor/Public/EditEffect.h +++ b/Jusin154_Team3D/Editor/Public/EditEffect.h @@ -34,7 +34,8 @@ class CEditEffect final : public CEffectObject private: _int m_iSelectTextureNum = {}; - + vector<_float> m_ValueVector = {}; + _float m_fInputValue = {}; public: static CEditEffect* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Editor/Public/EffectObject.h b/Jusin154_Team3D/Editor/Public/EffectObject.h index baf2b496a..ec1d91554 100644 --- a/Jusin154_Team3D/Editor/Public/EffectObject.h +++ b/Jusin154_Team3D/Editor/Public/EffectObject.h @@ -65,6 +65,8 @@ class CEffectObject abstract : public CPartObject EFFECT_TYPE eEffectType = { EFFECT_TYPE::EFFECT }; + _bool isEmissiveDissolve = { false }; + }EFFECT_INFO; typedef struct tagPreEffectInfo @@ -111,10 +113,9 @@ class CEffectObject abstract : public CPartObject LIGHT_DESC LightDesc = {}; RENDER eRenderOrder = { RENDER::EFFECT }; - _bool isReverseDissolve = {}; - - + EFFECT_TYPE eEffectType = { EFFECT_TYPE::EFFECT }; + _bool isEmissiveDissolve = { false }; }PRE_EFFECT_INFO; diff --git a/Jusin154_Team3D/Editor/Public/NomalJap.h b/Jusin154_Team3D/Editor/Public/NomalJap.h index 975723148..bf19461b7 100644 --- a/Jusin154_Team3D/Editor/Public/NomalJap.h +++ b/Jusin154_Team3D/Editor/Public/NomalJap.h @@ -29,8 +29,8 @@ class CNomalJap final : public CEffect_Container HRESULT Bind_ShaderResources() override; virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override; private: - _wstring m_wstrEffectName = {}; - + _wstring m_wstrEffectName = {}; + class CDummy_PhysXEffectHitBox* m_pPhysHitBox = {}; public: static CNomalJap* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual void Free() override; diff --git a/Jusin154_Team3D/Engine/Public/ContainerObject.h b/Jusin154_Team3D/Engine/Public/ContainerObject.h index 0c9339555..f0d2f8f06 100644 --- a/Jusin154_Team3D/Engine/Public/ContainerObject.h +++ b/Jusin154_Team3D/Engine/Public/ContainerObject.h @@ -26,6 +26,20 @@ class ENGINE_DLL CContainerObject abstract : public CGameObject return nullptr; } + template + T* Get_PartObject() { + + for (auto& pPart : m_PartObjects) + { + if (typeid((*pPart.second)) == typeid(T)) + { + return dynamic_cast(pPart.second); + } + + } + return nullptr; + } + protected: unordered_map<_string, class CPartObject*> m_PartObjects; @@ -61,4 +75,4 @@ class ENGINE_DLL CContainerObject abstract : public CGameObject virtual void Free() override; }; -NS_END \ No newline at end of file +NS_END From 7124d17dd386c697b04ab5f29454ec2b695d310e Mon Sep 17 00:00:00 2001 From: GiJungSUk Date: Thu, 20 Nov 2025 21:55:49 +0900 Subject: [PATCH 7/7] push --- Jusin154_Team3D/Editor/Private/Dummy_Cube.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jusin154_Team3D/Editor/Private/Dummy_Cube.cpp b/Jusin154_Team3D/Editor/Private/Dummy_Cube.cpp index 42f0f3b85..7c38a9b85 100644 --- a/Jusin154_Team3D/Editor/Private/Dummy_Cube.cpp +++ b/Jusin154_Team3D/Editor/Private/Dummy_Cube.cpp @@ -42,9 +42,9 @@ void CDummy_Cube::Update(_float fTimeDelta) void CDummy_Cube::Late_Update(_float fTimeDelta) { - //if (m_pGameInstance->isIn_WorldFrustum(Get_WorldPostion(), m_pTransformCom->Get_Radius())) { - // m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this); - //} + if (m_pGameInstance->isIn_WorldFrustum(Get_WorldPostion(), m_pTransformCom->Get_Radius())) { + m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this); + } } HRESULT CDummy_Cube::Render()