diff --git a/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp b/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp index 31e9814d5..0b100f941 100644 --- a/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp +++ b/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp @@ -358,8 +358,8 @@ HRESULT CCamPosition_Shoulder::Ready_SubParts() return E_FAIL; } - m_pGameInstance->Add_Camera(g_iStaticLevel, m_pBinded_Camera, CAMERA_SHOULDER); - if (FAILED(m_pGameInstance->Bind_Camera(g_iStaticLevel, CAMERA_SHOULDER, true))) { + m_pGameInstance->Add_Camera(NEXT_LEVEL, m_pBinded_Camera, CAMERA_SHOULDER); + if (FAILED(m_pGameInstance->Bind_Camera(NEXT_LEVEL, CAMERA_SHOULDER, true))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/EffectPool.cpp b/Jusin154_Team3D/Client/Private/EffectPool.cpp index 39e3b7ffd..a8a992bdc 100644 --- a/Jusin154_Team3D/Client/Private/EffectPool.cpp +++ b/Jusin154_Team3D/Client/Private/EffectPool.cpp @@ -214,7 +214,7 @@ HRESULT CEffectPool::Bind_ShaderResources() HRESULT CEffectPool::Ready_Effect() { - if (FAILED(Create_Effect(SKILL_TYPE::JAP, 10, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + if (FAILED(Create_Effect(SKILL_TYPE::JAP, 10, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { CNomalJap* pEffect = nullptr; pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr); @@ -223,7 +223,7 @@ HRESULT CEffectPool::Ready_Effect() ))) return E_FAIL; - if (FAILED(Create_Effect(SKILL_TYPE::BOMBARDA, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* { + if (FAILED(Create_Effect(SKILL_TYPE::BOMBARDA, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* { CBombard* pEffect = nullptr; @@ -232,7 +232,7 @@ HRESULT CEffectPool::Ready_Effect() return pEffect; } ))) return E_FAIL; - if (FAILED(Create_Effect(SKILL_TYPE::DESCENDO, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* { + if (FAILED(Create_Effect(SKILL_TYPE::DESCENDO, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* { CDecendo* pEffect = nullptr; @@ -241,7 +241,7 @@ HRESULT CEffectPool::Ready_Effect() return pEffect; } ))) return E_FAIL; - if (FAILED(Create_Effect(SKILL_TYPE::PROTEGO, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* { + if (FAILED(Create_Effect(SKILL_TYPE::PROTEGO, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* { CProtego* pEffect = nullptr; @@ -250,7 +250,7 @@ HRESULT CEffectPool::Ready_Effect() return pEffect; } ))) return E_FAIL; - if (FAILED(Create_Effect(SKILL_TYPE::REVELIO, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* { + if (FAILED(Create_Effect(SKILL_TYPE::REVELIO, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* { CRevelio* pEffect = nullptr; @@ -259,7 +259,7 @@ HRESULT CEffectPool::Ready_Effect() return pEffect; } ))) return E_FAIL; - if (FAILED(Create_Effect(SKILL_TYPE::JAP_SIDE, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* { + if (FAILED(Create_Effect(SKILL_TYPE::JAP_SIDE, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* { CNomalJapSide* pEffect = nullptr; @@ -268,7 +268,7 @@ HRESULT CEffectPool::Ready_Effect() return pEffect; } ))) return E_FAIL; - if (FAILED(Create_Effect(SKILL_TYPE::LEVIOSO, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + if (FAILED(Create_Effect(SKILL_TYPE::LEVIOSO, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { CLevioso* pEffect = nullptr; @@ -278,7 +278,7 @@ HRESULT CEffectPool::Ready_Effect() ))) return E_FAIL; - if (FAILED(Create_Effect(SKILL_TYPE::LUMOS, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + if (FAILED(Create_Effect(SKILL_TYPE::LUMOS, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { CLumos* pEffect = nullptr; @@ -288,7 +288,7 @@ HRESULT CEffectPool::Ready_Effect() ))) return E_FAIL; - if (FAILED(Create_Effect(SKILL_TYPE::ACCIO, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + if (FAILED(Create_Effect(SKILL_TYPE::ACCIO, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { CAccio* pEffect = nullptr; @@ -298,7 +298,7 @@ HRESULT CEffectPool::Ready_Effect() ))) return E_FAIL; - if (FAILED(Create_Effect(SKILL_TYPE::BOMBARDA_SIDE, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + if (FAILED(Create_Effect(SKILL_TYPE::BOMBARDA_SIDE, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { CBombardSide* pEffect = nullptr; @@ -307,7 +307,7 @@ HRESULT CEffectPool::Ready_Effect() return pEffect; } ))) return E_FAIL; - if (FAILED(Create_Effect(SKILL_TYPE::LEVIOSO_SIDE, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + if (FAILED(Create_Effect(SKILL_TYPE::LEVIOSO_SIDE, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { CLeviosoSide* pEffect = nullptr; @@ -317,7 +317,7 @@ HRESULT CEffectPool::Ready_Effect() ))) return E_FAIL; - if (FAILED(Create_Effect(SKILL_TYPE::DESCENDO_SIDE, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + if (FAILED(Create_Effect(SKILL_TYPE::DESCENDO_SIDE, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { CDecendoSide* pEffect = nullptr; @@ -327,7 +327,7 @@ HRESULT CEffectPool::Ready_Effect() ))) return E_FAIL; - if (FAILED(Create_Effect(SKILL_TYPE::WAND_END, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + if (FAILED(Create_Effect(SKILL_TYPE::WAND_END, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { CWandEnd* pEffect = nullptr; @@ -337,7 +337,7 @@ HRESULT CEffectPool::Ready_Effect() ))) return E_FAIL; - if (FAILED(Create_Effect(SKILL_TYPE::BOX_SPLESH, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + if (FAILED(Create_Effect(SKILL_TYPE::BOX_SPLESH, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { CBox_Splesh* pEffect = nullptr; @@ -347,7 +347,7 @@ HRESULT CEffectPool::Ready_Effect() ))) return E_FAIL; - if (FAILED(Create_Effect(SKILL_TYPE::CHAIL_SPLESH, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + if (FAILED(Create_Effect(SKILL_TYPE::CHAIL_SPLESH, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { CChair_Splesh* pEffect = nullptr; @@ -357,7 +357,7 @@ HRESULT CEffectPool::Ready_Effect() ))) return E_FAIL; - if (FAILED(Create_Effect(SKILL_TYPE::BARRAL_SPLASH, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + if (FAILED(Create_Effect(SKILL_TYPE::BARRAL_SPLASH, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { CBarral_Splesh* pEffect = nullptr; @@ -367,7 +367,7 @@ HRESULT CEffectPool::Ready_Effect() ))) return E_FAIL; - if (FAILED(Create_Effect(SKILL_TYPE::SCREEN_WIND, 3, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + if (FAILED(Create_Effect(SKILL_TYPE::SCREEN_WIND, 3, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { CScreen_Wind* pEffect = nullptr; @@ -377,7 +377,7 @@ HRESULT CEffectPool::Ready_Effect() ))) return E_FAIL; - if (FAILED(Create_Effect(SKILL_TYPE::STUPEFY, 3, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + if (FAILED(Create_Effect(SKILL_TYPE::STUPEFY, 3, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { CStupefy* pEffect = nullptr; @@ -386,7 +386,7 @@ HRESULT CEffectPool::Ready_Effect() return pEffect; } ))) return E_FAIL; - if (FAILED(Create_Effect(SKILL_TYPE::LIGHTNING, 3, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + if (FAILED(Create_Effect(SKILL_TYPE::LIGHTNING, 3, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { CLightning* pEffect = nullptr; @@ -395,7 +395,7 @@ HRESULT CEffectPool::Ready_Effect() return pEffect; } ))) return E_FAIL; - if (FAILED(Create_Effect(SKILL_TYPE::LIGHTNING_SIDE, 3, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + if (FAILED(Create_Effect(SKILL_TYPE::LIGHTNING_SIDE, 3, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { CLightningSide* pEffect = nullptr; @@ -405,7 +405,7 @@ HRESULT CEffectPool::Ready_Effect() ))) return E_FAIL; - if (FAILED(Create_Effect(SKILL_TYPE::BLINK, 3, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + if (FAILED(Create_Effect(SKILL_TYPE::BLINK, 3, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { CBlink* pEffect = nullptr; @@ -414,7 +414,7 @@ HRESULT CEffectPool::Ready_Effect() return pEffect; } ))) return E_FAIL; - if (FAILED(Create_Effect(SKILL_TYPE::TRANSFORMATION, 3, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + if (FAILED(Create_Effect(SKILL_TYPE::TRANSFORMATION, 3, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { CTransformation* pEffect = nullptr; @@ -423,7 +423,7 @@ HRESULT CEffectPool::Ready_Effect() return pEffect; } ))) return E_FAIL; - if (FAILED(Create_Effect(SKILL_TYPE::TRANSFORMATION_SIDE, 3, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + if (FAILED(Create_Effect(SKILL_TYPE::TRANSFORMATION_SIDE, 3, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { CTransformationSide* pEffect = nullptr; @@ -440,7 +440,7 @@ HRESULT CEffectPool::Ready_MonsterEffect() { - if (FAILED(Create_Effect(SKILL_TYPE::TROLL_ATTACK, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + if (FAILED(Create_Effect(SKILL_TYPE::TROLL_ATTACK, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { CTrollSwing* pEffect = nullptr; @@ -449,7 +449,7 @@ HRESULT CEffectPool::Ready_MonsterEffect() return pEffect; } ))) return E_FAIL; - if (FAILED(Create_Effect(SKILL_TYPE::TROLL_NOMAL_SMOKE, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + if (FAILED(Create_Effect(SKILL_TYPE::TROLL_NOMAL_SMOKE, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { CTroll_Nomal_Smoke* pEffect = nullptr; @@ -458,7 +458,7 @@ HRESULT CEffectPool::Ready_MonsterEffect() return pEffect; } ))) return E_FAIL; - if (FAILED(Create_Effect(SKILL_TYPE::TROLL_RUSH_HIT, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + if (FAILED(Create_Effect(SKILL_TYPE::TROLL_RUSH_HIT, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { CTroll_Rush_Hit* pEffect = nullptr; @@ -468,7 +468,7 @@ HRESULT CEffectPool::Ready_MonsterEffect() ))) return E_FAIL; - if (FAILED(Create_Effect(SKILL_TYPE::GOBLIN_PROTEGO, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + if (FAILED(Create_Effect(SKILL_TYPE::GOBLIN_PROTEGO, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { CGoblin_Protego* pEffect = nullptr; @@ -477,7 +477,7 @@ HRESULT CEffectPool::Ready_MonsterEffect() return pEffect; } ))) return E_FAIL; - if (FAILED(Create_Effect(SKILL_TYPE::GOBLIN_ATTACK, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + if (FAILED(Create_Effect(SKILL_TYPE::GOBLIN_ATTACK, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { CGoblin_Attack* pEffect = nullptr; @@ -487,7 +487,7 @@ HRESULT CEffectPool::Ready_MonsterEffect() ))) return E_FAIL; - if (FAILED(Create_Effect(SKILL_TYPE::GOBLIN_MAGE_ATTACK, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + if (FAILED(Create_Effect(SKILL_TYPE::GOBLIN_MAGE_ATTACK, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { CMage_Nomal_Attack* pEffect = nullptr; @@ -497,7 +497,7 @@ HRESULT CEffectPool::Ready_MonsterEffect() ))) return E_FAIL; - if (FAILED(Create_Effect(SKILL_TYPE::GOBLIN_MAGE_DOWN, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + if (FAILED(Create_Effect(SKILL_TYPE::GOBLIN_MAGE_DOWN, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { CMage_Down_Attack* pEffect = nullptr; @@ -508,7 +508,7 @@ HRESULT CEffectPool::Ready_MonsterEffect() ))) return E_FAIL; - if (FAILED(Create_Effect(SKILL_TYPE::GOBLIN_MAGE_SIDE, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + if (FAILED(Create_Effect(SKILL_TYPE::GOBLIN_MAGE_SIDE, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { CMageSide* pEffect = nullptr; @@ -519,7 +519,7 @@ HRESULT CEffectPool::Ready_MonsterEffect() ))) return E_FAIL; - if (FAILED(Create_Effect(SKILL_TYPE::STUN, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + if (FAILED(Create_Effect(SKILL_TYPE::STUN, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { CStunEffect* pEffect = nullptr; @@ -529,7 +529,7 @@ HRESULT CEffectPool::Ready_MonsterEffect() ))) return E_FAIL; - if (FAILED(Create_Effect(SKILL_TYPE::GOBILN_TELEPORT, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + if (FAILED(Create_Effect(SKILL_TYPE::GOBILN_TELEPORT, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { CGoblin_Teleport* pEffect = nullptr; diff --git a/Jusin154_Team3D/Client/Private/Level_Field.cpp b/Jusin154_Team3D/Client/Private/Level_Field.cpp index 20f3c0f6f..536cb8a7d 100644 --- a/Jusin154_Team3D/Client/Private/Level_Field.cpp +++ b/Jusin154_Team3D/Client/Private/Level_Field.cpp @@ -3,6 +3,8 @@ #include "GameInstance.h" #include "Level_Loading.h" #include "InfoInstance.h" +#include "Player.h" +#include "EffectPool.h" #include "Light_Main.h" #include "Layer.h" #include "Camera_Debug.h" @@ -33,6 +35,13 @@ HRESULT CLevel_Field::Initialize(void* pArg) return E_FAIL; } + if (FAILED(Reday_Layer_EffectPool())) { + return E_FAIL; + } + + if (FAILED(Ready_Layer_Player(LAYER_PLAYER))) { + return E_FAIL; + } if (FAILED(Ready_Markers())) { return E_FAIL; } @@ -157,11 +166,11 @@ HRESULT CLevel_Field::Ready_Camera() return E_FAIL; } - m_pGameInstance->Add_Camera(g_iStaticLevel, pCamera, CAMERA_DEBUG); + m_pGameInstance->Add_Camera(NEXT_LEVEL, pCamera, CAMERA_DEBUG); #endif // _DEBUG - if (FAILED(m_pGameInstance->Bind_Camera(g_iStaticLevel, CAMERA_DEBUG, true))) { + if (FAILED(m_pGameInstance->Bind_Camera(NEXT_LEVEL, CAMERA_DEBUG, true))) { return E_FAIL; } return S_OK; @@ -208,6 +217,18 @@ HRESULT CLevel_Field::Ready_Markers() return S_OK; } +HRESULT CLevel_Field::Ready_Layer_Player(const _wstring& strLayerTag) +{ + CPlayer::PLAYERDESC playerDesc = {}; + playerDesc.vPos = _float4(-17.96f, 18.74f, 9.11f, 1.f); + playerDesc.vRotQ = _float4(0.f, 0.f, 0.f, 1.f); + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &playerDesc))) { + return E_FAIL; + } + + return S_OK; +} + HRESULT CLevel_Field::Ready_Layer_Effect(const _wstring& strLayerTag) { return S_OK; @@ -222,6 +243,14 @@ HRESULT CLevel_Field::Ready_Layer_Monster() return S_OK; } +HRESULT CLevel_Field::Reday_Layer_EffectPool() +{ + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_EFFECTPOOL))) { + return E_FAIL; + } + return S_OK; +} + pair> CLevel_Field::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID, void* pArg) { CLevel_Field* pInstance = new CLevel_Field(pDevice, pContext, eLevelID); diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp index 5c3aed936..b26fcaa24 100644 --- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp +++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp @@ -549,11 +549,11 @@ HRESULT CLevel_GamePlay::Ready_Layer_Camera() return E_FAIL; } - m_pGameInstance->Add_Camera(g_iStaticLevel, pCamera, CAMERA_DEBUG); + m_pGameInstance->Add_Camera(NEXT_LEVEL, pCamera, CAMERA_DEBUG); #endif // _DEBUG - if (FAILED(m_pGameInstance->Bind_Camera(g_iStaticLevel, CAMERA_SHOULDER, true))) { + if (FAILED(m_pGameInstance->Bind_Camera(NEXT_LEVEL, CAMERA_SHOULDER, true))) { return E_FAIL; } @@ -573,15 +573,16 @@ HRESULT CLevel_GamePlay::Ready_Markers() HRESULT CLevel_GamePlay::Ready_Layer_Player(const _wstring& strLayerTag) { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag))) { + CPlayer::PLAYERDESC playerDesc = {}; + playerDesc.vPos = _float4(-21.f, 0.f, -14.f, 1.f); + playerDesc.vRotQ = _float4(0.f, 0.f, 0.f, 1.f); + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &playerDesc))) { return E_FAIL; } - for (_uint i = 0; i < 1; ++i) { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag))) { - return E_FAIL; - } + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag))) { + return E_FAIL; } return S_OK; diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index bf7b52469..982067cb1 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -1870,7 +1870,7 @@ HRESULT CLoader::Loading_For_GamePlay() return E_FAIL; if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_GerboldOlivander_Model"), - CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))){ + CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity())))){ return E_FAIL; } @@ -1943,131 +1943,131 @@ HRESULT CLoader::Loading_For_GamePlay() return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CBombard::Create(m_pDevice, m_pContext)))) { + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CBombard::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CDecendo::Create(m_pDevice, m_pContext)))) { + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CDecendo::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CNomalJap::Create(m_pDevice, m_pContext)))) { + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CNomalJap::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CProtego::Create(m_pDevice, m_pContext)))) { + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CProtego::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CRevelio::Create(m_pDevice, m_pContext)))) { + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRevelio::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CNomalJapSide::Create(m_pDevice, m_pContext)))) { + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CNomalJapSide::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CLevioso::Create(m_pDevice, m_pContext)))) { + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CLevioso::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CLumos::Create(m_pDevice, m_pContext)))) { + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CLumos::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CAccio::Create(m_pDevice, m_pContext)))) { + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CAccio::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CLeviosoSide::Create(m_pDevice, m_pContext)))) { + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CLeviosoSide::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CBombardSide::Create(m_pDevice, m_pContext)))) { + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CBombardSide::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CDecendoSide::Create(m_pDevice, m_pContext)))) { + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CDecendoSide::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CTransformationSide::Create(m_pDevice, m_pContext)))) { + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CTransformationSide::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CTrollSwing::Create(m_pDevice, m_pContext)))) { + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CTrollSwing::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CTroll_Nomal_Smoke::Create(m_pDevice, m_pContext)))) { + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CTroll_Nomal_Smoke::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CTroll_Rush_Hit::Create(m_pDevice, m_pContext)))) { + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CTroll_Rush_Hit::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CGoblin_Protego::Create(m_pDevice, m_pContext)))) { + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CGoblin_Protego::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CGoblin_Attack::Create(m_pDevice, m_pContext)))) { + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CGoblin_Attack::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CMage_Down_Attack::Create(m_pDevice, m_pContext)))) { + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CMage_Down_Attack::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CMage_Nomal_Attack::Create(m_pDevice, m_pContext)))) { + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CMage_Nomal_Attack::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CMageSide::Create(m_pDevice, m_pContext)))) { + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CMageSide::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CStunEffect::Create(m_pDevice, m_pContext)))) { + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CStunEffect::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CBox_Splesh::Create(m_pDevice, m_pContext)))) { + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CBox_Splesh::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CBarral_Splesh::Create(m_pDevice, m_pContext)))) { + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CBarral_Splesh::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CChair_Splesh::Create(m_pDevice, m_pContext)))) { + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CChair_Splesh::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CWandEnd::Create(m_pDevice, m_pContext)))) { + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CWandEnd::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CStupefy::Create(m_pDevice, m_pContext)))) { + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CStupefy::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CLightning::Create(m_pDevice, m_pContext)))) { + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CLightning::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CLightningSide::Create(m_pDevice, m_pContext)))) { + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CLightningSide::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CBlink::Create(m_pDevice, m_pContext)))) { + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CBlink::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CTransformation::Create(m_pDevice, m_pContext)))) { + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CTransformation::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CGoblin_Teleport::Create(m_pDevice, m_pContext)))) { + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CGoblin_Teleport::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CScreen_Wind::Create(m_pDevice, m_pContext)))) { + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CScreen_Wind::Create(m_pDevice, m_pContext)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/MapElement_Chest.cpp b/Jusin154_Team3D/Client/Private/MapElement_Chest.cpp index 6cd26482f..e88df1c57 100644 --- a/Jusin154_Team3D/Client/Private/MapElement_Chest.cpp +++ b/Jusin154_Team3D/Client/Private/MapElement_Chest.cpp @@ -315,9 +315,9 @@ CGameObject* CMapElement_Chest::Clone(void* pArg, CGameObject* pOwner) void CMapElement_Chest::Free() { - if (nullptr != m_pRigidBody) { - m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor(), m_pGameInstance->Get_CurrentLevelID()); - } + //if (nullptr != m_pRigidBody) { + // m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor(), m_pGameInstance->Get_CurrentLevelID()); + //} __super::Free(); if (m_bCloned) diff --git a/Jusin154_Team3D/Client/Private/MapElement_Door.cpp b/Jusin154_Team3D/Client/Private/MapElement_Door.cpp index d38f2a2d6..3252956d8 100644 --- a/Jusin154_Team3D/Client/Private/MapElement_Door.cpp +++ b/Jusin154_Team3D/Client/Private/MapElement_Door.cpp @@ -299,7 +299,7 @@ CGameObject* CMapElement_Door::Clone(void* pArg, CGameObject* pOwner) void CMapElement_Door::Free() { if (nullptr != m_pRigidBody) { - m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor(), m_pGameInstance->Get_CurrentLevelID()); + m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor()); } __super::Free(); diff --git a/Jusin154_Team3D/Client/Private/MapElement_Interactable.cpp b/Jusin154_Team3D/Client/Private/MapElement_Interactable.cpp index 2755d98d4..8a4b63b17 100644 --- a/Jusin154_Team3D/Client/Private/MapElement_Interactable.cpp +++ b/Jusin154_Team3D/Client/Private/MapElement_Interactable.cpp @@ -483,7 +483,7 @@ CGameObject* CMapElement_Interactable::Clone(void* pArg, CGameObject* pOwner) void CMapElement_Interactable::Free() { if (nullptr != m_pRigidBody) { - m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor(), m_pGameInstance->Get_CurrentLevelID()); + m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor()); } __super::Free(); diff --git a/Jusin154_Team3D/Client/Private/MapElement_Static.cpp b/Jusin154_Team3D/Client/Private/MapElement_Static.cpp index 56f903606..f74831165 100644 --- a/Jusin154_Team3D/Client/Private/MapElement_Static.cpp +++ b/Jusin154_Team3D/Client/Private/MapElement_Static.cpp @@ -154,7 +154,7 @@ void CMapElement_Static::ReadyForPhysX() { CModel* pModel = m_pModelComs[iIndexLOD]; - if (FAILED(pModel->Ready_PhysXMeshes(m_pTransformCom->Get_XMWorldMatrix(), iLevel))) { + if (FAILED(pModel->Ready_PhysXMeshes(XMMatrixIdentity(), iLevel))) { assert(false); } } diff --git a/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp b/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp index 34d760c7c..64f579d26 100644 --- a/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp +++ b/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp @@ -25,15 +25,15 @@ void CNPC_Ollivander::Priority_Update(_float fTimeDelta) void CNPC_Ollivander::Update(_float fTimeDelta) { m_pFSM->Update_State(fTimeDelta); - if (m_pModelCom->IsFinishedAnim()) { - m_pModelCom->Set_AnimationIndex(m_pGameInstance->Random_Int(0, 19), false); - } m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom); __super::Update(fTimeDelta); #ifdef _DEBUG Describe_Entity(); #endif // _DEBUG + { // 세트 + m_pCharacter_Controller->Move(fTimeDelta); + } } void CNPC_Ollivander::Late_Update(_float fTimeDelta) @@ -42,6 +42,8 @@ void CNPC_Ollivander::Late_Update(_float fTimeDelta) m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this); + Set_Shadow(m_pGameInstance->IsIn_ShadowViewFrustum(m_pTransformCom->Get_State(STATE::POSITION), m_pTransformCom->Get_Radius())); + __super::Late_Update(fTimeDelta); } @@ -72,6 +74,7 @@ HRESULT CNPC_Ollivander::Render() } m_pModelCom->Bind_OutPut_SRV_VS(26, 0); + m_pModelCom->Bind_OutPut_SRV_VS_Prev(27, 0); if (FAILED(m_pModelCom->Render(i))) { return E_FAIL; @@ -159,13 +162,19 @@ HRESULT CNPC_Ollivander::Initialize(void* pArg) return E_FAIL; } m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(40.f, 4.f, 68.9f, 1.f)); - m_pModelCom->Set_AnimationIndex(m_pGameInstance->Random_Int(0, 19), false); + m_pModelCom->Set_AnimationIndex(0, true); return S_OK; } HRESULT CNPC_Ollivander::Ready_Components(void* pArg) { - if (FAILED(__super::Ready_Components(pArg))) { + CTransform::TRANSFORM_DESC Desc = {}; + + Desc.fSpeedPerSec = 10.f; + Desc.fRotationPerSec = XMConvertToRadians(180.0f); + Desc.fRadius = 10.f; + + if (FAILED(__super::Ready_Components(&Desc))) { return E_FAIL; } @@ -179,6 +188,28 @@ HRESULT CNPC_Ollivander::Ready_Components(void* pArg) return E_FAIL; } + { // CCT + CCharacter_Controller::Character_Controller_DESC Desc{}; + + Desc.iSubKind = ENUM_CLASS(PXOBJECT::OLLIVANDER); + Desc.pTransform = m_pTransformCom; + Desc.eBodyType = ACTOR::CAPSULE; + Desc.fContactOffset = 0.0001f; + Desc.fMaterial = { 1.2f, 1.0f, 0.0f }; + Desc.bAutoStepping = { false }; + Desc.fStepOffset = { 0.02f }; + Desc.fRadius = 0.5f; + Desc.fHeight = 0.6f; + Desc.pCallback_HitReport = nullptr; + Desc.pCallback_Behavior = nullptr; + Desc.eClimbingMode = PSX::PxCapsuleClimbingMode::eEASY; + Desc.fWalkableSlope = 45.f; + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_CCT_CAPSULE"), (CComponent**)&m_pCharacter_Controller, &Desc))) { + return E_FAIL; + } + m_pCharacter_Controller->SetGravity(true); + } + return S_OK; } @@ -209,30 +240,17 @@ CGameObject* CNPC_Ollivander::Clone(void* pArg, CGameObject* pOwner) void CNPC_Ollivander::Free() { __super::Free(); + + SAFE_RELEASE(m_pCharacter_Controller); + if (nullptr != m_pInfoInstance) { + CInfoInstance* pInfo = m_pInfoInstance; + m_pInfoInstance = nullptr; + } } #ifdef _DEBUG void CNPC_Ollivander::Describe_Entity() { - GUI::Begin("UNIT", 0, IMGUI_GLOBAL_BEGIN_FLAG); - if (GUI::CollapsingHeader("Ollivander")) { - m_pModelCom->Describe_Entity(); - if (ImGui::TreeNode("ANIM STATE")) { - - for (auto& pState : m_States) - { - if (ImGui::Button(to_string(pState.first).c_str())) - { - m_pFSM->Change_State(pState.first); - } - } - - GUI::Text(to_string(m_pModelCom->Get_CurrentTrackProgressRatio()).c_str()); - - ImGui::TreePop(); - } - } - GUI::End(); } #endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Player.cpp b/Jusin154_Team3D/Client/Private/Player.cpp index 511f2fd97..1aa8cf79d 100644 --- a/Jusin154_Team3D/Client/Private/Player.cpp +++ b/Jusin154_Team3D/Client/Private/Player.cpp @@ -95,10 +95,14 @@ HRESULT CPlayer::Initialize(void* pArg) m_pInfoInstance->Regist_PlayerAlly(this); m_pInfoInstance->Set_Damage(m_pStat->Get_Stat().fDamage); - - m_pCharacter_Controller->Set_Position(XMVectorSet(-21.f, 0.f, -14.f, 1.f)); - m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(-21.f, 0.f, -14.f, 1.f)); - + { + PLAYERDESC* pDesc = static_cast(pArg); + _vector vPos = XMLoadFloat4(&pDesc->vPos); + _vector vRotQ = XMLoadFloat4(&pDesc->vRotQ); + m_pCharacter_Controller->Set_Position(vPos); + m_pTransformCom->Set_State(STATE::POSITION, vPos); + m_pTransformCom->Rotation(vRotQ); + } #ifdef _DEBUG m_BasicEffect = make_unique(m_pDevice); diff --git a/Jusin154_Team3D/Client/Public/Level_Field.h b/Jusin154_Team3D/Client/Public/Level_Field.h index 4e131b6b6..880a29d7d 100644 --- a/Jusin154_Team3D/Client/Public/Level_Field.h +++ b/Jusin154_Team3D/Client/Public/Level_Field.h @@ -26,11 +26,13 @@ class CLevel_Field final : public CLevel HRESULT Ready_Layer_SkyBox(); HRESULT Ready_Background(); HRESULT Ready_Markers(); + HRESULT Ready_Layer_Player(const _wstring& strLayerTag); HRESULT Ready_Layer_UI(const _wstring& strLayerTag); HRESULT Ready_Layer_Camera(); HRESULT Ready_Layer_Sound(); HRESULT Ready_Layer_Effect(const _wstring& strLayerTag); HRESULT Ready_Layer_Monster(); + HRESULT Reday_Layer_EffectPool(); public: static pair> Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID, void* pArg); diff --git a/Jusin154_Team3D/Client/Public/NPC_Ollivander.h b/Jusin154_Team3D/Client/Public/NPC_Ollivander.h index 16a511bc8..5c69772c2 100644 --- a/Jusin154_Team3D/Client/Public/NPC_Ollivander.h +++ b/Jusin154_Team3D/Client/Public/NPC_Ollivander.h @@ -20,6 +20,7 @@ class CNPC_Ollivander final : public CUnit virtual HRESULT Render_Shadow(SHADOW eType) override; protected: CInfoInstance* m_pInfoInstance = { nullptr }; + CCharacter_Controller* m_pCharacter_Controller = { nullptr }; protected: virtual HRESULT Initialize_Prototype() override; diff --git a/Jusin154_Team3D/Client/Public/Player.h b/Jusin154_Team3D/Client/Public/Player.h index e7d27c801..3b298842c 100644 --- a/Jusin154_Team3D/Client/Public/Player.h +++ b/Jusin154_Team3D/Client/Public/Player.h @@ -7,6 +7,11 @@ NS_BEGIN(Client) class CPlayer final : public CUnit { +public: + typedef struct tagPlayerInitDesc { + _float4 vPos; + _float4 vRotQ; + }PLAYERDESC; private: CPlayer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); CPlayer(const CPlayer& Prototype); diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.bin index 459598ade..704035228 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:45edbad61d9d6f8891b2009ec64951195a58e0fa50134a9d3b3dd0c5e34bee30 -size 6393892 +oid sha256:93816fc5a683892c7619312ac2ea43b255efd70cbf30141fa615eb5480f3397e +size 6556632 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.fbx index 838440947..d43881cfc 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.fbx +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7fd7b3d203725b7044f2a72e4c7fda5981befcc2c607bfca596b0b6c0797c417 -size 3160204 +oid sha256:0102d6f855f46901fc5f1b291a29f46af1d4cac3baceafeed3a495d1dbbbc5f8 +size 3901724 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander_Anim.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander_Anim.bin deleted file mode 100644 index 16e04855b..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander_Anim.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4c3d337a05c5621c027dec7cfd5345c13b8c46b243a072d4c8cf5c11d0d34039 -size 12951064 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander_Anim.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander_Anim.fbx deleted file mode 100644 index 0aa5ad418..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander_Anim.fbx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:436a9c2d497061156640f0f2011616d41e0eacb3763eb86d18442bf4e2b4a193 -size 19497756 diff --git a/Jusin154_Team3D/Editor/Private/Dummy_PhysXBox.cpp b/Jusin154_Team3D/Editor/Private/Dummy_PhysXBox.cpp index 40902a74e..a25c08546 100644 --- a/Jusin154_Team3D/Editor/Private/Dummy_PhysXBox.cpp +++ b/Jusin154_Team3D/Editor/Private/Dummy_PhysXBox.cpp @@ -164,7 +164,7 @@ CGameObject* CDummy_PhysXBox::Clone(void* pArg, CGameObject* pOwner) void CDummy_PhysXBox::Free() { if (nullptr != m_pRigidBody) { - m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor(), m_pGameInstance->Get_CurrentLevelID()); + m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor()); } __super::Free(); diff --git a/Jusin154_Team3D/Editor/Private/Dummy_PhysXWall.cpp b/Jusin154_Team3D/Editor/Private/Dummy_PhysXWall.cpp index 7935ae394..a0b89ec34 100644 --- a/Jusin154_Team3D/Editor/Private/Dummy_PhysXWall.cpp +++ b/Jusin154_Team3D/Editor/Private/Dummy_PhysXWall.cpp @@ -154,7 +154,7 @@ CGameObject* CDummy_PhysXWall::Clone(void* pArg, CGameObject* pOwner) void CDummy_PhysXWall::Free() { if (nullptr != m_pRigidBody) { - m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor(), m_pGameInstance->Get_CurrentLevelID()); + m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor()); } __super::Free(); diff --git a/Jusin154_Team3D/Editor/Private/MapElement_Chest.cpp b/Jusin154_Team3D/Editor/Private/MapElement_Chest.cpp index 4ab6ed7d5..f738d0e23 100644 --- a/Jusin154_Team3D/Editor/Private/MapElement_Chest.cpp +++ b/Jusin154_Team3D/Editor/Private/MapElement_Chest.cpp @@ -329,7 +329,7 @@ CGameObject* CMapElement_Chest::Clone(void* pArg, CGameObject* pOwner) void CMapElement_Chest::Free() { if (nullptr != m_pRigidBody) { - m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor(), m_pGameInstance->Get_CurrentLevelID()); + m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor()); } __super::Free(); diff --git a/Jusin154_Team3D/Editor/Private/MapElement_Door.cpp b/Jusin154_Team3D/Editor/Private/MapElement_Door.cpp index 374b2e7a3..f76e1a9e3 100644 --- a/Jusin154_Team3D/Editor/Private/MapElement_Door.cpp +++ b/Jusin154_Team3D/Editor/Private/MapElement_Door.cpp @@ -214,7 +214,7 @@ CGameObject* CMapElement_Door::Clone(void* pArg, CGameObject* pOwner) void CMapElement_Door::Free() { if (nullptr != m_pRigidBody) { - m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor(), m_pGameInstance->Get_CurrentLevelID()); + m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor()); } __super::Free(); diff --git a/Jusin154_Team3D/Editor/Private/MapElement_Interactable.cpp b/Jusin154_Team3D/Editor/Private/MapElement_Interactable.cpp index e249f9b7e..89277aade 100644 --- a/Jusin154_Team3D/Editor/Private/MapElement_Interactable.cpp +++ b/Jusin154_Team3D/Editor/Private/MapElement_Interactable.cpp @@ -209,7 +209,7 @@ CGameObject* CMapElement_Interactable::Clone(void* pArg, CGameObject* pOwner) void CMapElement_Interactable::Free() { if (nullptr != m_pRigidBody) { - m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor(), m_pGameInstance->Get_CurrentLevelID()); + m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor()); } __super::Free(); diff --git a/Jusin154_Team3D/Engine/Private/GameInstance.cpp b/Jusin154_Team3D/Engine/Private/GameInstance.cpp index 436b86087..718d6a0e5 100644 --- a/Jusin154_Team3D/Engine/Private/GameInstance.cpp +++ b/Jusin154_Team3D/Engine/Private/GameInstance.cpp @@ -1044,9 +1044,9 @@ void CGameInstance::Detach_Actor(PSX::PxActor& Actor, _uint iLevel) { m_pPhysX_Manager->Detach_Actor(Actor, iLevel); } -void CGameInstance::Release_Actor(PSX::PxActor& Actor, _uint iLevel) +void CGameInstance::Release_Actor(PSX::PxActor& Actor) { - m_pPhysX_Manager->Detach_Actor(Actor, iLevel); + m_pPhysX_Manager->Release_Actor(Actor); } HRESULT CGameInstance::ConvertToTriMeshes(vector& Meshes, vector& pxTriMeshes, _fmatrix WorldMatrix) { diff --git a/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp b/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp index 700a137c2..37cc85f7d 100644 --- a/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp +++ b/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp @@ -67,7 +67,8 @@ PSX::PxRigidDynamic* CPhysX_Manager::Add_DynamicActor(CRigidBody_Dynamic& RigidB PSX::PxRigidStatic* CPhysX_Manager::Add_StaticActor(CRigidBody_Static& RigidBody, _uint iLevel) { _matrix WorldMatrix = RigidBody.Get_TransformPtr()->Get_XMWorldMatrix(); - PSX::PxTransform pxWorldMatrix = XMWorldToPx_NoScale(WorldMatrix); + PSX::PxTransform pxWorldMatrix = XMWorldToPx_NoScale(WorldMatrix); + // PxRigidStatic 씬의 정적 바디 인터페이스 PSX::PxRigidStatic* pActor = m_pPhysics->createRigidStatic(pxWorldMatrix); @@ -494,18 +495,24 @@ unordered_set::iterator CPhysX_Manager::Detach_Actor(PSX::PxActor return iterOut; } -void CPhysX_Manager::Release_Actor(PSX::PxActor& Actor, _uint iLevel) +void CPhysX_Manager::Release_Actor(PSX::PxActor& Actor) { // 혹시 활성화 맵에 들어있을 수도 있으니 검사 - unordered_set::iterator iterResult = Detach_Actor(Actor, iLevel); - if (m_pRestBodies[iLevel].end() != iterResult) { // 방금 전까지만 해도 활성화 중이었던 액터 라면 - m_pRestBodies[iLevel].erase(iterResult); // 바로 지워줌 + unordered_set::iterator iterResult = {}; + _uint iReleasedLevel = UINT_MAX; + for (_uint iLevel = 0; iLevel < m_iMaxLevel; ++iLevel) { + iterResult = Detach_Actor(Actor, iLevel); + if (m_pRestBodies[iLevel].end() != iterResult) { // 방금 전까지만 해도 활성화 중이었던 액터 라면 + m_pRestBodies[iLevel].erase(iterResult); // 바로 지워줌 + iReleasedLevel = iLevel; + break; + } } - else { - m_pActiveBodys[iLevel].erase(&Actor); - m_pRestBodies[iLevel].erase(&Actor); + if (UINT_MAX == iReleasedLevel) { + m_pActiveBodys[iReleasedLevel].erase(&Actor); + m_pRestBodies[iReleasedLevel].erase(&Actor); } - Actor.release(); + //Actor.release(); } PSX::PxController* CPhysX_Manager::Add_CapsuleController(PSX::PxCapsuleControllerDesc& Desc) @@ -647,7 +654,7 @@ HRESULT CPhysX_Manager::Initialize(_uint iLevel) PlaneData.pOwner = nullptr; PlaneData.pBody = nullptr; - PSX::PxRigidStatic* pGroundPlane = PxCreatePlane(*m_pPhysics, physx::PxPlane(0, 1, 0, 50), *m_pMaterials[ENUM_CLASS(PXMATERIAL::DEFAULT)]); + PSX::PxRigidStatic* pGroundPlane = PxCreatePlane(*m_pPhysics, physx::PxPlane(0, 1, 0, 85), *m_pMaterials[ENUM_CLASS(PXMATERIAL::DEFAULT)]); pGroundPlane->userData = &PlaneData; pGroundPlane->setName("PHYSX_MANAGER_PLANE"); m_pScene->addActor(*pGroundPlane); diff --git a/Jusin154_Team3D/Engine/Private/VIBuffer_Terrain.cpp b/Jusin154_Team3D/Engine/Private/VIBuffer_Terrain.cpp index 960749a85..a4624b6ac 100644 --- a/Jusin154_Team3D/Engine/Private/VIBuffer_Terrain.cpp +++ b/Jusin154_Team3D/Engine/Private/VIBuffer_Terrain.cpp @@ -393,9 +393,11 @@ HRESULT CVIBuffer_Terrain::Initialize(void* pArg) void CVIBuffer_Terrain::ConvertToHeightField(const _tchar* pStaticKey) { + PSX::PxHeightFieldDesc Desc{}; + Desc.format = PSX::PxHeightFieldFormat::eS16_TM; + vector pxSamples = {}; pxSamples.resize(m_iNumVerticesZ * m_iNumVerticesX); - for (_uint iRow = 0; iRow < m_iNumVerticesZ; ++iRow) { for (_uint iCol = 0; iCol < m_iNumVerticesX; ++iCol) { _uint iIndex = iRow * m_iNumVerticesX + iCol; @@ -411,11 +413,9 @@ void CVIBuffer_Terrain::ConvertToHeightField(const _tchar* pStaticKey) pxSample.clearTessFlag(); } } + Desc.nbRows = m_iNumVerticesX; + Desc.nbColumns = m_iNumVerticesZ; - PSX::PxHeightFieldDesc Desc{}; - Desc.format = PSX::PxHeightFieldFormat::eS16_TM; - Desc.nbRows = m_iNumVerticesZ; - Desc.nbColumns = m_iNumVerticesX; Desc.samples.data = pxSamples.data(); Desc.samples.stride = sizeof(PSX::PxHeightFieldSample); @@ -426,7 +426,6 @@ void CVIBuffer_Terrain::ConvertToHeightField(const _tchar* pStaticKey) else { m_pGameInstance->RegistHeight(pStaticKey, Desc, m_pGameInstance->Get_NextLevelID()); } - } _bool CVIBuffer_Terrain::Picking(_fmatrix WorldMatrix, _float3* pOut) diff --git a/Jusin154_Team3D/Engine/Public/Engine_Enum.h b/Jusin154_Team3D/Engine/Public/Engine_Enum.h index 34afc696f..f9d34fdee 100644 --- a/Jusin154_Team3D/Engine/Public/Engine_Enum.h +++ b/Jusin154_Team3D/Engine/Public/Engine_Enum.h @@ -184,6 +184,7 @@ enum class PXOBJECT : _uint { #pragma endregion #pragma region NPC NPC = 500, + OLLIVANDER, #pragma endregion #pragma region ITEM diff --git a/Jusin154_Team3D/Engine/Public/GameInstance.h b/Jusin154_Team3D/Engine/Public/GameInstance.h index 15f7b7479..5979532e8 100644 --- a/Jusin154_Team3D/Engine/Public/GameInstance.h +++ b/Jusin154_Team3D/Engine/Public/GameInstance.h @@ -223,7 +223,7 @@ class ENGINE_DLL CGameInstance final : public CBase void ReleaseController(_uint iControllerIndex); void Attach_Actor(PSX::PxActor& Actor, _uint iLevel); void Detach_Actor(PSX::PxActor& pActor, _uint iLevel); - void Release_Actor(PSX::PxActor& Actor, _uint iLevel); + void Release_Actor(PSX::PxActor& Actor); HRESULT ConvertToTriMeshes(vector& Meshes, vector& pxTriMeshes, _fmatrix WorldMatrix = XMMatrixIdentity()); #ifdef EDITOR_PROJECT HRESULT SaveTriMeshes(const _char* pPath, vector& TriMeshes); diff --git a/Jusin154_Team3D/Engine/Public/PhysX_Manager.h b/Jusin154_Team3D/Engine/Public/PhysX_Manager.h index 5d56c7dbc..a5897fa25 100644 --- a/Jusin154_Team3D/Engine/Public/PhysX_Manager.h +++ b/Jusin154_Team3D/Engine/Public/PhysX_Manager.h @@ -51,7 +51,7 @@ class CPhysX_Manager final : public CBase void ClearScene(_uint iLevel); void Attach_Actor(PSX::PxActor& Actor, _uint iLevel); unordered_set::iterator Detach_Actor(PSX::PxActor& Actor, _uint iLevel); - void Release_Actor(PSX::PxActor& Actor, _uint iLevel); + void Release_Actor(PSX::PxActor& Actor); #pragma endregion #pragma region CHARACTER_CONTROLLER /* dev-treadmill.tistory.com/158 */