From 972be00fd6c82eadd97266ba915412678c84064a Mon Sep 17 00:00:00 2001 From: Chanbin Kim <127280695+JinhoBa@users.noreply.github.com> Date: Sun, 11 Jan 2026 21:17:07 +0900 Subject: [PATCH] =?UTF-8?q?[add]=20Chest=20=EC=83=81=ED=98=B8=EC=9E=91?= =?UTF-8?q?=EC=9A=A9=20=EC=97=B0=EA=B2=B0=20[fix]=20Layer=5FPlayer=20->=20?= =?UTF-8?q?Layer=5F=5FPlayer=20=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Client/Private/Level_GamePlay.cpp | 10 +++++----- Jusin154_Team3D/Client/Private/Loader.cpp | 10 +++++----- .../Client/Private/MapElement_Chest.cpp | 20 +++++++++++++++++-- Jusin154_Team3D/Client/Private/Player.cpp | 20 +++++++++++++++++++ .../Client/Private/Player_States.cpp | 1 + Jusin154_Team3D/Client/Public/Client_Macro.h | 4 ++-- .../Client/Public/MapElement_Chest.h | 1 + Jusin154_Team3D/Client/Public/Player.h | 1 + .../SK_FloatingBalloonTarget_.bin | 3 +++ .../Shader_Volumetric_Compute.hlsl | 4 ++-- Jusin154_Team3D/Editor/Public/Editor_Macro.h | 2 +- .../Shader_Volumetric_Compute.hlsl | 4 ++-- 12 files changed, 61 insertions(+), 19 deletions(-) create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Models/MapMesh/Game/RiggedObjects/Props/FloatingBalloonTarget/SK_FloatingBalloonTarget_.bin diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp index 4e796129a..abcc9a877 100644 --- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp +++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp @@ -316,8 +316,8 @@ HRESULT CLevel_GamePlay::Ready_Background() #ifdef gimch isReady_Background = true; - isReady_Hogsmeade = false; - isReady_Hogwart = true; + isReady_Hogsmeade = true; + isReady_Hogwart = false; #endif // gimch #ifdef Bin isReady_Background = false; @@ -528,7 +528,7 @@ HRESULT CLevel_GamePlay::Ready_Layer_Hogsmeade() CInfoInstance::GetInstance()->Load_DoorElemet("Element_Door_Info", LAYER_HOGSMEADE); /* Chests */ - CInfoInstance::GetInstance()->Load_ChestElemet("Element_Chest_Info", LAYER_HOGSMEADE); + CInfoInstance::GetInstance()->Load_ChestElemet("Element_Chest_Info", LAYER_HIDDEN); /* Hogsmeade Unified*/ CUnified::UNIFIED_DESC Desc = {}; @@ -1104,8 +1104,8 @@ HRESULT CLevel_GamePlay::Ready_Layer_Npc() _bool isLoad_RandomNPC = { true }; #ifdef _DEBUG #ifdef gimch - isLoad_NPC = true; - isLoad_RandomNPC = true; + isLoad_NPC = false; + isLoad_RandomNPC = false; #endif // gimch #ifdef 진우 isLoad_RandomNPC = true; diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index c89518e27..f537db746 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -470,7 +470,7 @@ HRESULT CLoader::Loading_For_GamePlay() #ifdef _DEBUG #ifdef gimch isLoad_Background = true; - isLoad_Hogwart = true; + isLoad_Hogwart = false; isLoad_UI_SEQUANTIAL = false; isLoad_NPC = true; isLoad_DataClassroom = false; @@ -3609,10 +3609,10 @@ HRESULT CLoader::Loading_For_GamePlay() #pragma endregion - ///* For.Prototype_Component_FloatingBalloon */ - //if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_FloatingBalloon"), - // CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "C:/MeshTable/Game/RiggedObjects/Props/FloatingBalloonTarget/SK_FloatingBalloonTarget_.fbx")))) - // return E_FAIL; + /* For.Prototype_Component_FloatingBalloon */ + if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_FloatingBalloon"), + CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "C:/MeshTable/Game/RiggedObjects/Props/FloatingBalloonTarget/SK_FloatingBalloonTarget_.bin")))) + return E_FAIL; /* For.Prototype_Component_Hogwart_Lake */ if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_Hogwart_Lake"), diff --git a/Jusin154_Team3D/Client/Private/MapElement_Chest.cpp b/Jusin154_Team3D/Client/Private/MapElement_Chest.cpp index bef6474df..2cfcc1010 100644 --- a/Jusin154_Team3D/Client/Private/MapElement_Chest.cpp +++ b/Jusin154_Team3D/Client/Private/MapElement_Chest.cpp @@ -128,8 +128,8 @@ void CMapElement_Chest::Late_Update(_float fTimeDelta) if (CMapElement_Chest::CHEST_STATE::FOUND == m_eCurState) { - m_pGameInstance->Add_RenderGroup(RENDER::NONLIGHT, this); - m_pGameInstance->Add_RenderGroup(RENDER::BLUR, this); + //m_pGameInstance->Add_RenderGroup(RENDER::NONLIGHT, this); + m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this); } else m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this); @@ -180,9 +180,25 @@ void CMapElement_Chest::OnRayCollision(CGameObject* pCaster, _uint iCastedOrder, } if (fDistance < m_fEncounterDistance) { m_iEntered = 4; + if (m_pGameInstance->Key_Down(DIK_F) && m_eCurState != CHEST_STATE::OPENED) + { + m_eCurState = CHEST_STATE::OPENED; + } } } +_bool CMapElement_Chest::IsScannable(_fvector vPosition) +{ + _float fDistance = XMVectorGetX(XMVector3Length(m_pTransformCom->Get_State(STATE::POSITION) - vPosition)); + + if (fDistance <= 20.f && m_eCurState == CHEST_STATE::IDLE) + { + m_eCurState = CHEST_STATE::FOUND; + } + + return false; +} + HRESULT CMapElement_Chest::Ready_Components(void* pArg) { if (FAILED(__super::Ready_Components(pArg))) { diff --git a/Jusin154_Team3D/Client/Private/Player.cpp b/Jusin154_Team3D/Client/Private/Player.cpp index 741b68688..77a31ee57 100644 --- a/Jusin154_Team3D/Client/Private/Player.cpp +++ b/Jusin154_Team3D/Client/Private/Player.cpp @@ -21,6 +21,7 @@ #include "Mesh.h" #include "Effect_Container.h" #include "ThestralCarriage.h" +#include "MapElement_Chest.h" CPlayer::CPlayer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) : CUnit(pDevice, pContext) @@ -901,6 +902,25 @@ void CPlayer::Player_PixRot() } } +void CPlayer::Find_HiddenObjects() +{ + CLayer* pLayer = m_pGameInstance->Get_Layer(NEXT_LEVEL, LAYER_HIDDEN); + + if (nullptr == pLayer) + return; + + const list* pHiddenObjects = pLayer->Get_Objects(); + + for (auto& pObject : *pHiddenObjects) + { + CMapElement_Chest* pChest = dynamic_cast(pObject); + if (nullptr != pChest) + if (pChest->IsScannable(m_pTransformCom->Get_State(STATE::POSITION))) + return; + } + +} + void CPlayer::Update_CameraCoordinateSystem(_float fTimeDelta) { _vector xmvCameraLook = XMVector3Normalize(XMVectorSetY(m_pGameInstance->Get_CameraLook(), 0.f)); diff --git a/Jusin154_Team3D/Client/Private/Player_States.cpp b/Jusin154_Team3D/Client/Private/Player_States.cpp index 3a53df81f..c72019d42 100644 --- a/Jusin154_Team3D/Client/Private/Player_States.cpp +++ b/Jusin154_Team3D/Client/Private/Player_States.cpp @@ -1063,6 +1063,7 @@ void CPlayer::Behavior_CombatEnter() pairAnimInfo = m_Animation[STATEANIM::SKILL]; m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); m_pEffectPool->Use_Skill(SKILL_TYPE::REVELIO, this); + Find_HiddenObjects(); } else if (m_pGameInstance->Key_Down(DIK_Q)) { diff --git a/Jusin154_Team3D/Client/Public/Client_Macro.h b/Jusin154_Team3D/Client/Public/Client_Macro.h index 358d0821e..d911d4b87 100644 --- a/Jusin154_Team3D/Client/Public/Client_Macro.h +++ b/Jusin154_Team3D/Client/Public/Client_Macro.h @@ -49,7 +49,7 @@ namespace Client { #define LAYER_HOGSMEADE TEXT("Layer_Hogsmeade") #define LAYER_HOGWART TEXT("Layer_Hogwart") #define LAYER_MARKER TEXT("Layer_Marker") -#define LAYER_PLAYER TEXT("Layer_Player") +#define LAYER_PLAYER TEXT("Layer__Player") #define LAYER_CAMERA TEXT("Layer_Camera") #define LAYER_MONSTER TEXT("Layer_Monster") #define LAYER_UI TEXT("Layer_UI") @@ -65,7 +65,7 @@ namespace Client { #define LAYER_INTERACTABLE TEXT("Layer_Interactable") #define LAYER_UNIFIED TEXT("Layer_Unified") #define LAYER_DOOR TEXT("Layer_Door") -#define LAYER_HIDDEN TEXT("Layer_HIDDEN") +#define LAYER_HIDDEN TEXT("Layer__HIDDEN") #define LAYER_RING TEXT("Layer_Ring") #define LAYER_RACERAI TEXT("Layer_RacerAI") #define LAYER_DADA_INT TEXT("Layer_DADA_INT") diff --git a/Jusin154_Team3D/Client/Public/MapElement_Chest.h b/Jusin154_Team3D/Client/Public/MapElement_Chest.h index 1b75562ff..9b9685789 100644 --- a/Jusin154_Team3D/Client/Public/MapElement_Chest.h +++ b/Jusin154_Team3D/Client/Public/MapElement_Chest.h @@ -39,6 +39,7 @@ class CMapElement_Chest final : public CMapElement virtual void Late_Update(_float fTimeDelta) override; virtual HRESULT Render() override; virtual void OnRayCollision(CGameObject* pCaster, _uint iCastedOrder, _float fDistance, _float3 vCastedWorldPos)override; + _bool IsScannable(_fvector vPosition); private: ELEMENT_INTERACTABLE_ID m_eInteractableID = { ELEMENT_INTERACTABLE_ID::END }; diff --git a/Jusin154_Team3D/Client/Public/Player.h b/Jusin154_Team3D/Client/Public/Player.h index 19917576d..39c29834b 100644 --- a/Jusin154_Team3D/Client/Public/Player.h +++ b/Jusin154_Team3D/Client/Public/Player.h @@ -107,6 +107,7 @@ class CPlayer final : public CUnit void Add_SpellEvent(_uint AnimIndex, _float fRatio); void Play_SpellHitAnim(); void Player_PixRot(); + void Find_HiddenObjects(); void Update_CameraCoordinateSystem(_float fTimeDelta); #ifdef _DEBUG diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/MapMesh/Game/RiggedObjects/Props/FloatingBalloonTarget/SK_FloatingBalloonTarget_.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/MapMesh/Game/RiggedObjects/Props/FloatingBalloonTarget/SK_FloatingBalloonTarget_.bin new file mode 100644 index 000000000..ff180a747 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/MapMesh/Game/RiggedObjects/Props/FloatingBalloonTarget/SK_FloatingBalloonTarget_.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:50c2c25a297be029e4d5fbe7eabd5ccad5c668c9ed5a71749b7db348ae1c1616 +size 341534 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Volumetric_Compute.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Volumetric_Compute.hlsl index fd31f29b0..227440d7d 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Volumetric_Compute.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Volumetric_Compute.hlsl @@ -77,13 +77,13 @@ void CS_MAIN( uint3 DispatchThreadID : SV_DispatchThreadID) { float visibility = 1.f; + // Directional if (0.f < length(g_LightBuffer[i].vDirection)) { lightDir = normalize(g_LightBuffer[i].vDirection); visibility = ComputeShadowVisibility(vWorldPosition); - } - else + else // Point { lightDir = vWorldPosition - g_LightBuffer[i].vPosition.xyz; visibility = ComputePointLightVisible(lightDir, g_LightBuffer[i].fRange); diff --git a/Jusin154_Team3D/Editor/Public/Editor_Macro.h b/Jusin154_Team3D/Editor/Public/Editor_Macro.h index b3dfbe6d3..0478ea88c 100644 --- a/Jusin154_Team3D/Editor/Public/Editor_Macro.h +++ b/Jusin154_Team3D/Editor/Public/Editor_Macro.h @@ -43,7 +43,7 @@ namespace Editor { #define LAYER_EDITOR_CAMERA TEXT("Layer_Editor_Camera") #define LAYER_BACKGROUND TEXT("Layer_BackGround") #define LAYER_MARKER TEXT("Layer_Marker") -#define LAYER_PLAYER TEXT("Layer_Player") +#define LAYER_PLAYER TEXT("Layer__Player") #define LAYER_CAMERA TEXT("Layer_Camera") #define LAYER_MONSTER TEXT("Layer_Monster") #define LAYER_UI TEXT("Layer_UI") diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Volumetric_Compute.hlsl b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Volumetric_Compute.hlsl index fd31f29b0..227440d7d 100644 --- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Volumetric_Compute.hlsl +++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Volumetric_Compute.hlsl @@ -77,13 +77,13 @@ void CS_MAIN( uint3 DispatchThreadID : SV_DispatchThreadID) { float visibility = 1.f; + // Directional if (0.f < length(g_LightBuffer[i].vDirection)) { lightDir = normalize(g_LightBuffer[i].vDirection); visibility = ComputeShadowVisibility(vWorldPosition); - } - else + else // Point { lightDir = vWorldPosition - g_LightBuffer[i].vPosition.xyz; visibility = ComputePointLightVisible(lightDir, g_LightBuffer[i].fRange);