From 9112e02d53d62dcadae49e7c2ee8f46a6417288a Mon Sep 17 00:00:00 2001 From: qordlsgur <127704460+qordlsgur@users.noreply.github.com> Date: Tue, 2 Dec 2025 16:57:03 +0900 Subject: [PATCH] =?UTF-8?q?[Add]=20=ED=81=B4=EB=9D=BC=EC=9D=B4=EC=96=B8?= =?UTF-8?q?=ED=8A=B8=EC=97=90=20=EC=B6=94=EA=B0=80=20=ED=9B=84=20=ED=99=95?= =?UTF-8?q?=EC=9D=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jusin154_Team3D/Client/Default/Client.vcxproj | 2 + .../Client/Default/Client.vcxproj.filters | 9 ++ .../Client/Private/Current_Slot_Number.cpp | 1 + .../Client/Private/Current_Spell_Slot.cpp | 1 + .../Client/Private/Eessential_Spell.cpp | 1 + .../Client/Private/Eessential_Spell_Slot.cpp | 1 + .../Client/Private/InfoInstance.cpp | 23 ++++ .../Client/Private/Level_GamePlay.cpp | 8 +- Jusin154_Team3D/Client/Private/Loader.cpp | 7 + .../Client/Private/Player_States.cpp | 6 + Jusin154_Team3D/Client/Private/Skill_Data.cpp | 108 ++++----------- Jusin154_Team3D/Client/Private/Spell_Anim.cpp | 10 +- .../Client/Private/Spell_Header.cpp | 1 + .../Client/Private/Spell_Header_Line.cpp | 1 + .../Client/Private/Spell_Hover.cpp | 1 + .../Client/Private/Spell_Hover_Effect.cpp | 1 + Jusin154_Team3D/Client/Private/Spell_List.cpp | 1 + .../Client/Private/Spell_List_Image.cpp | 1 + .../Client/Private/Spell_Panel.cpp | 13 +- .../Client/Private/Spell_Preview.cpp | 1 + .../Client/Private/Spell_State.cpp | 2 + .../Client/Private/Spell_Vidio_Border.cpp | 2 + Jusin154_Team3D/Client/Private/UI_Manager.cpp | 129 ++++++++++++++++++ Jusin154_Team3D/Client/Public/Client_Struct.h | 23 ++-- Jusin154_Team3D/Client/Public/InfoInstance.h | 6 +- Jusin154_Team3D/Client/Public/Skill_Data.h | 52 +++---- Jusin154_Team3D/Client/Public/Spell_Anim.h | 4 + Jusin154_Team3D/Client/Public/Spell_Panel.h | 5 +- Jusin154_Team3D/Client/Public/UI_Manager.h | 55 ++++++++ 29 files changed, 333 insertions(+), 142 deletions(-) create mode 100644 Jusin154_Team3D/Client/Private/UI_Manager.cpp create mode 100644 Jusin154_Team3D/Client/Public/UI_Manager.h diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj index 76223b2ea..1989f0f3d 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj @@ -261,6 +261,7 @@ call Update_Resources.bat + @@ -373,6 +374,7 @@ call Update_Resources.bat + diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters index 98dedc08b..44d41dfee 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters @@ -328,6 +328,9 @@ 02.GameObjects\Environment\03.MapElement\Light + + 02.GameObjects\UI\UI_Manager + @@ -707,6 +710,9 @@ {00b37924-ab02-4287-b67e-80375a8d3268} + + {9cc8fea6-837e-4f68-b116-134c9dc68a26} + @@ -1030,6 +1036,9 @@ 02.GameObjects\UI\Spell_Canvas\Spell_Panel\Current_Slot_Number + + 02.GameObjects\UI\UI_Manager + diff --git a/Jusin154_Team3D/Client/Private/Current_Slot_Number.cpp b/Jusin154_Team3D/Client/Private/Current_Slot_Number.cpp index 62b9c3fee..e084a8135 100644 --- a/Jusin154_Team3D/Client/Private/Current_Slot_Number.cpp +++ b/Jusin154_Team3D/Client/Private/Current_Slot_Number.cpp @@ -47,6 +47,7 @@ HRESULT CCurrent_Slot_Number::Initialize(void* pArg) m_pVIBufferCom->Set_Pos(-805.f, 380.f, m_fOffSetX, m_fOffSetY, m_iCols); m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); m_pVIBufferCom->Set_ImageUV(pUVDesc); + m_bActive = true; return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Current_Spell_Slot.cpp b/Jusin154_Team3D/Client/Private/Current_Spell_Slot.cpp index 7828ca304..ed1b5f8a7 100644 --- a/Jusin154_Team3D/Client/Private/Current_Spell_Slot.cpp +++ b/Jusin154_Team3D/Client/Private/Current_Spell_Slot.cpp @@ -47,6 +47,7 @@ HRESULT CCurrent_Spell_Slot::Initialize(void* pArg) m_pVIBufferCom->Set_Cloned(true); m_pVIBufferCom->Set_Pos(-780.f, 340.f, m_fOffSetX, m_fOffSetY, m_iCols); m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); + m_bActive = true; return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Eessential_Spell.cpp b/Jusin154_Team3D/Client/Private/Eessential_Spell.cpp index 97b5f2e73..c07574d2f 100644 --- a/Jusin154_Team3D/Client/Private/Eessential_Spell.cpp +++ b/Jusin154_Team3D/Client/Private/Eessential_Spell.cpp @@ -49,6 +49,7 @@ HRESULT CEessential_Spell::Initialize(void* pArg) m_pVIBufferCom->Set_Pos(-731.f, -300.f, m_fOffSetX, m_fOffSetY, m_iCols); m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); m_pVIBufferCom->Set_ImageUV(pUVDesc); + m_bActive = true; return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Eessential_Spell_Slot.cpp b/Jusin154_Team3D/Client/Private/Eessential_Spell_Slot.cpp index 57ffb8784..97ed2abec 100644 --- a/Jusin154_Team3D/Client/Private/Eessential_Spell_Slot.cpp +++ b/Jusin154_Team3D/Client/Private/Eessential_Spell_Slot.cpp @@ -48,6 +48,7 @@ HRESULT CEessential_Spell_Slot::Initialize(void* pArg) m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); m_fDelayTime = 0.5f; m_iPerSpell_Slot = -1; + m_bActive = true; return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/InfoInstance.cpp b/Jusin154_Team3D/Client/Private/InfoInstance.cpp index b56166cc9..59911012c 100644 --- a/Jusin154_Team3D/Client/Private/InfoInstance.cpp +++ b/Jusin154_Team3D/Client/Private/InfoInstance.cpp @@ -4,6 +4,7 @@ #include "MapInfo.h" #include "MonsterInfo.h" #include "PlayerInfo.h" +#include "Skill_Data.h" IMPLEMENT_SINGLETON(CInfoInstance) @@ -17,6 +18,7 @@ void CInfoInstance::Update(_float fTimeDelta) m_pPlayerInfo->Update(fTimeDelta); m_pMonsterInfo->Update(fTimeDelta); m_pMapInfo->Update(fTimeDelta); + m_pSkillInfo->Update(fTimeDelta); } void CInfoInstance::Change_Level() @@ -24,6 +26,7 @@ void CInfoInstance::Change_Level() m_pPlayerInfo->Change_Level(); m_pMonsterInfo->Change_Level(); m_pMapInfo->Change_Level(); + m_pSkillInfo->Change_Level(); } void CInfoInstance::Update_CameraCoordinateSystem(_float3& vLook, _float3& vRight) @@ -86,6 +89,21 @@ HRESULT CInfoInstance::Load_LightElements(const _char* pFilePath) return m_pMapInfo->Load_LightElements(pFilePath); } #pragma endregion + +#pragma region SPELL_INFO +HRESULT CInfoInstance::Load_SpellInfo(const _char* pFilePath) +{ + return m_pSkillInfo->Load_SpellInfo(pFilePath); +} +SPELL_INFO CInfoInstance::Get_Spell_Info(_int Spell_Info) +{ + return m_pSkillInfo->Get_Info(Spell_Info); +} +void CInfoInstance::Change_Canvas() +{ + +} +#pragma endregion LEVEL CInfoInstance::Get_RestartLevel() { return LEVEL::GAMEPLAY; @@ -112,6 +130,10 @@ HRESULT CInfoInstance::Initialize_Information(ID3D11Device* pDevice, ID3D11Devic if (nullptr == m_pMonsterInfo) { return E_FAIL; } + m_pSkillInfo = CSkill_Data::Create(pDevice, pContext); + if (nullptr == m_pSkillInfo) { + return E_FAIL; + } return S_OK; @@ -125,6 +147,7 @@ void CInfoInstance::Release_Information() SAFE_RELEASE(m_pMapInfo); SAFE_RELEASE(m_pPlayerInfo); SAFE_RELEASE(m_pMonsterInfo); + SAFE_RELEASE(m_pSkillInfo); SAFE_RELEASE(m_pDevice); SAFE_RELEASE(m_pContext); SAFE_RELEASE(m_pGameInstance); diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp index bd9ce3478..8dfe63d34 100644 --- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp +++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp @@ -5,8 +5,7 @@ #include "Light_Main.h" #include "Camera_Debug.h" #include "InfoInstance.h" -#include "GamePlay_Canvas.h" -#include "Spell_Canvas.h" +#include "UI_Manager.h" #include "Layer.h" #include "SkyBox.h" #include "Broom.h" @@ -150,10 +149,7 @@ HRESULT CLevel_GamePlay::Ready_Background() HRESULT CLevel_GamePlay::Ready_Layer_UI(const _wstring& strLayerTag) { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI))) { - return E_FAIL; - } - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI))) { + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index 87d9fbe2f..a5a1016c9 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -28,6 +28,8 @@ #pragma region UI +#include "UI_Manager.h" + #include "GamePlay_Canvas.h" #include "Loading_Panel.h" #include "LoadingWidget.h" @@ -1577,6 +1579,11 @@ HRESULT CLoader::Loading_For_GamePlay() m_strMessage = TEXT("객체원형를(을) 로딩 중 입니다."); + /* For.Prototype_GameObject_UI_Manager*/ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CUI_Manager::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } + /* For.Prototype_GameObject_GamePlay_Canvas*/ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CGamePlay_Canvas::Create(m_pDevice, m_pContext)))) { return E_FAIL; diff --git a/Jusin154_Team3D/Client/Private/Player_States.cpp b/Jusin154_Team3D/Client/Private/Player_States.cpp index 2b9aa349e..04168c47a 100644 --- a/Jusin154_Team3D/Client/Private/Player_States.cpp +++ b/Jusin154_Team3D/Client/Private/Player_States.cpp @@ -1,6 +1,8 @@ #include "pch.h" #include "Player.h" +#include "InfoInstance.h" + #include "GameInstance.h" #include "CamPosition_Socket.h" #include "Camera_Gaze.h" @@ -74,6 +76,7 @@ HRESULT CPlayer::InputAction() || m_pGameInstance->Key_Down(DIK_Z) || m_pGameInstance->Key_Down(DIK_G) || m_pGameInstance->Key_Down(DIK_B) + || m_pGameInstance->Key_Down(DIK_T) ) { return S_OK; @@ -188,6 +191,9 @@ HRESULT CPlayer::Behavior_IdleExitCheck(_float fTimeDelta) else if (m_pGameInstance->Key_Down(DIK_B)) { m_pFSM->Change_State(FSMSTATE::BROOM_RIDE); } + else if (m_pGameInstance->Key_Down(DIK_T)) { + m_pInfoInstance->Change_Canvas(); + } return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/Skill_Data.cpp b/Jusin154_Team3D/Client/Private/Skill_Data.cpp index 16dd73e6b..ee9ce30fc 100644 --- a/Jusin154_Team3D/Client/Private/Skill_Data.cpp +++ b/Jusin154_Team3D/Client/Private/Skill_Data.cpp @@ -6,28 +6,34 @@ ; -CSkill_Data::CSkill_Data(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) - :CGameObject(pDevice, pContext) +CSkill_Data::CSkill_Data() { } -CSkill_Data::CSkill_Data(const CSkill_Data& rhs) - :CGameObject(rhs) +HRESULT CSkill_Data::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex) { -} -HRESULT CSkill_Data::Initialize_Prototype() -{ return S_OK; } -HRESULT CSkill_Data::Initialize(void* pArg) +const SPELL_INFO& CSkill_Data::Get_Info(_uint SpellID) const { - auto* pInfo = static_cast(pArg); + return SpellInfo[SpellID]; +} +void CSkill_Data::Update(_float fTimeDelta) +{ +} + +void CSkill_Data::Change_Level() +{ +} + +HRESULT CSkill_Data::Load_SpellInfo(const _char* pFilePath) +{ tinyxml2::XMLDocument doc; - tinyxml2::XMLError Error = doc.LoadFile("../Bin/Resources/Data/UI/Spell/SpellInfo.xml"); + tinyxml2::XMLError Error = doc.LoadFile(pFilePath); if (Error != tinyxml2::XML_SUCCESS) return E_FAIL; @@ -47,70 +53,32 @@ HRESULT CSkill_Data::Initialize(void* pArg) continue; } - pInfo[id].iSpell_ID = id; - pInfo[id].pSpell_Name = CMyTools::ToWstring(pSpell->Attribute("Spell_Name")); - pInfo[id].pImage_Name = CMyTools::ToWstring(pSpell->Attribute("Image_Name")); - pSpell->QueryIntAttribute("Spell_Type", &pInfo[id].iSpell_Type); - pSpell->QueryIntAttribute("Skill_Type", &pInfo[id].iSkill_Type); - pSpell->QueryFloatAttribute("Spell_Cooltime", &pInfo[id].fSpell_CoolTime); - pSpell->QueryFloatAttribute("Duration", &pInfo[id].fDuration); - pSpell->QueryIntAttribute("AnimNum", &pInfo[id].iAnimNum); - pInfo[id].pSpellInfo = CMyTools::ToWstring(pSpell->Attribute("SpellInfo")); + SpellInfo[id].iSpell_ID = id; + SpellInfo[id].pSpell_Name = CMyTools::ToWstring(pSpell->Attribute("Spell_Name")); + SpellInfo[id].pImage_Name = CMyTools::ToWstring(pSpell->Attribute("Image_Name")); + pSpell->QueryIntAttribute("Spell_Type", &SpellInfo[id].iSpell_Type); + pSpell->QueryIntAttribute("Skill_Type", &SpellInfo[id].iSkill_Type); + pSpell->QueryFloatAttribute("Spell_Cooltime", &SpellInfo[id].fSpell_CoolTime); + pSpell->QueryFloatAttribute("Duration", &SpellInfo[id].fDuration); + pSpell->QueryIntAttribute("AnimNum", &SpellInfo[id].iAnimNum); + SpellInfo[id].pSpellInfo = CMyTools::ToWstring(pSpell->Attribute("SpellInfo")); int lock = 0, equip = 0; pSpell->QueryIntAttribute("Spell_Lock", &lock); pSpell->QueryIntAttribute("Equip_Spell", &equip); - pInfo[id].bSpell_Lock = lock != 0; - pInfo[id].bEquip_Spell = equip != 0; + SpellInfo[id].bSpell_Lock = lock != 0; + SpellInfo[id].bEquip_Spell = equip != 0; pSpell = pSpell->NextSiblingElement("Spell"); } - //pInfo = SpellInfo; - return S_OK; -} - -//const CUIObject::SPELLINFO& CSkill_Data::Get_Info(_uint SpellID) const -//{ -// return SpellInfo[SpellID]; -//} - -void CSkill_Data::Priority_Update(_float fTimeDelta) -{ -} - -void CSkill_Data::Update(_float fTimeDelta) -{ -} - -void CSkill_Data::Late_Update(_float fTimeDelta) -{ -} - -HRESULT CSkill_Data::Render() -{ - return S_OK; -} - -_vector CSkill_Data::Get_WorldPostion() -{ - return _vector(); -} - -HRESULT CSkill_Data::Bind_ShaderResources() -{ - return S_OK; -} - -HRESULT CSkill_Data::Ready_Components(void* pArg) -{ return S_OK; } CSkill_Data* CSkill_Data::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) { - CSkill_Data* pInstance = new CSkill_Data(pDevice, pContext); + CSkill_Data* pInstance = new CSkill_Data(); - if (FAILED(pInstance->Initialize_Prototype())) + if (FAILED(pInstance->Initialize(pDevice, pContext))) { MSG_BOX("Failed to Created : CSkill_Data"); SAFE_RELEASE(pInstance); @@ -119,25 +87,7 @@ CSkill_Data* CSkill_Data::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pCo return pInstance; } -CGameObject* CSkill_Data::Clone(void* pArg, CGameObject* pOwner) -{ - CSkill_Data* pInstance = new CSkill_Data(*this); - pInstance->m_pOwner = pOwner; - if (FAILED(pInstance->Initialize(pArg))) - { - MSG_BOX("Failed to Cloned : CSkill_Data"); - SAFE_RELEASE(pInstance); - } - - return pInstance; -} - void CSkill_Data::Free() { __super::Free(); - -} - -void CSkill_Data::Describe_Entity() -{ } diff --git a/Jusin154_Team3D/Client/Private/Spell_Anim.cpp b/Jusin154_Team3D/Client/Private/Spell_Anim.cpp index cf6daec60..ae831bcc0 100644 --- a/Jusin154_Team3D/Client/Private/Spell_Anim.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_Anim.cpp @@ -1,6 +1,7 @@ #include "pch.h" #include "Spell_Anim.h" #include "GameInstance.h" +#include "InfoInstance.h" CSpell_Anim::CSpell_Anim(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) :CElementObject(pDevice, pContext) @@ -8,7 +9,9 @@ CSpell_Anim::CSpell_Anim(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) } CSpell_Anim::CSpell_Anim(const CSpell_Anim& rhs) - :CElementObject(rhs) + :CElementObject(rhs), + m_pInfoInstance(CInfoInstance::GetInstance()) + { } @@ -48,6 +51,7 @@ HRESULT CSpell_Anim::Initialize(void* pArg) static_cast(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); }); static_cast(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); }); static_cast(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); }); + m_bActive = true; return S_OK; } @@ -160,8 +164,8 @@ void CSpell_Anim::Set_FadeIn() void CSpell_Anim::Change_Image(_int SpellID) { - _wstring pImageName = static_cast(m_pOwner)->Get_Info(SpellID).pImage_Name; - m_iTotalFrames = static_cast(m_pOwner)->Get_Info(SpellID).iAnimNum; + _wstring pImageName = m_pInfoInstance->Get_Spell_Info(SpellID).pImage_Name; + m_iTotalFrames = m_pInfoInstance->Get_Spell_Info(SpellID).iAnimNum; if (m_pDiffuse_TextureCom) { Remove_Component(); diff --git a/Jusin154_Team3D/Client/Private/Spell_Header.cpp b/Jusin154_Team3D/Client/Private/Spell_Header.cpp index f0a2db064..5625e7645 100644 --- a/Jusin154_Team3D/Client/Private/Spell_Header.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_Header.cpp @@ -46,6 +46,7 @@ HRESULT CSpell_Header::Initialize(void* pArg) static_cast(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); }); static_cast(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); }); static_cast(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); }); + m_bActive = true; return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Spell_Header_Line.cpp b/Jusin154_Team3D/Client/Private/Spell_Header_Line.cpp index 1bd1c8aa5..fc5d96073 100644 --- a/Jusin154_Team3D/Client/Private/Spell_Header_Line.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_Header_Line.cpp @@ -41,6 +41,7 @@ HRESULT CSpell_Header_Line::Initialize(void* pArg) m_fAlphaTime = 5.f; static_cast(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); }); static_cast(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); }); + m_bActive = true; return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Spell_Hover.cpp b/Jusin154_Team3D/Client/Private/Spell_Hover.cpp index 999d66fdc..3e018dd98 100644 --- a/Jusin154_Team3D/Client/Private/Spell_Hover.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_Hover.cpp @@ -47,6 +47,7 @@ HRESULT CSpell_Hover::Initialize(void* pArg) m_pVIBufferCom->Set_Pos(-185.f, 375.f, m_fOffSetX, m_fOffSetY, m_iCols); m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); static_cast(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); }); + m_bActive = true; return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Spell_Hover_Effect.cpp b/Jusin154_Team3D/Client/Private/Spell_Hover_Effect.cpp index 5ed2de67a..ab130ff64 100644 --- a/Jusin154_Team3D/Client/Private/Spell_Hover_Effect.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_Hover_Effect.cpp @@ -48,6 +48,7 @@ HRESULT CSpell_Hover_Effect::Initialize(void* pArg) m_pVIBufferCom->Set_Pos(-185.f, 375.f, m_fOffSetX, m_fOffSetY, m_iCols); m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); static_cast(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); }); + m_bActive = true; return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Spell_List.cpp b/Jusin154_Team3D/Client/Private/Spell_List.cpp index c88354197..7353cba51 100644 --- a/Jusin154_Team3D/Client/Private/Spell_List.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_List.cpp @@ -49,6 +49,7 @@ HRESULT CSpell_List::Initialize(void* pArg) m_fDelayTime = 0.5f; m_iPerSpell_Slot = -1; Color(); + m_bActive = true; return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Spell_List_Image.cpp b/Jusin154_Team3D/Client/Private/Spell_List_Image.cpp index 2d03173e0..26d8fa5a0 100644 --- a/Jusin154_Team3D/Client/Private/Spell_List_Image.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_List_Image.cpp @@ -48,6 +48,7 @@ HRESULT CSpell_List_Image::Initialize(void* pArg) m_pVIBufferCom->Set_Pos(-185.f, 375.f, m_fOffSetX, m_fOffSetY, m_iCols); m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); m_pVIBufferCom->Set_ImageUV(pUVDesc); + m_bActive = true; return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Spell_Panel.cpp b/Jusin154_Team3D/Client/Private/Spell_Panel.cpp index 955948fb1..242fe64c9 100644 --- a/Jusin154_Team3D/Client/Private/Spell_Panel.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_Panel.cpp @@ -14,8 +14,8 @@ #include "Current_Slot_Number.h" #include "Spell_Header.h" #include "Spell_Header_Line.h" -//#include "Spell_Data.h" #include "Spell_Anim.h" +#include "InfoInstance.h" CSpell_Panel::CSpell_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) :CPanelObject(pDevice, pContext) @@ -23,7 +23,8 @@ CSpell_Panel::CSpell_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) } CSpell_Panel::CSpell_Panel(const CSpell_Panel& rhs) - :CPanelObject(rhs) + :CPanelObject(rhs), + m_pInfoInstance(CInfoInstance::GetInstance()) { } @@ -58,7 +59,10 @@ HRESULT CSpell_Panel::Initialize(void* pArg) m_iSpellType = -1; m_iPendingSpell = -1; m_fDelayTime = 1.f; + m_bActive = true; + Add_Function(TEXT("Hover"), [this](void* p) {this->Slot_Chack(p); }); + return S_OK; } @@ -132,11 +136,12 @@ _vector CSpell_Panel::Get_WorldPostion() return m_pTransformCom->Get_State(STATE::POSITION); } -const CUIObject::SPELLINFO CSpell_Panel::Get_Info(_int Index) +const Client::SPELL_INFO CSpell_Panel::Get_SpellInfo(_int SkillID) { - return m_Info[Index]; + return m_pInfoInstance->Get_Spell_Info(SkillID); } + void CSpell_Panel::Slot_Chack(void* pArg) { CUIObject::HOVER_INFO* Info = static_cast(pArg); diff --git a/Jusin154_Team3D/Client/Private/Spell_Preview.cpp b/Jusin154_Team3D/Client/Private/Spell_Preview.cpp index 662d64f78..4ab5944e2 100644 --- a/Jusin154_Team3D/Client/Private/Spell_Preview.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_Preview.cpp @@ -49,6 +49,7 @@ HRESULT CSpell_Preview::Initialize(void* pArg) m_fSortZ = 0.02f; static_cast(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); }); static_cast(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); }); + m_bActive = true; return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Spell_State.cpp b/Jusin154_Team3D/Client/Private/Spell_State.cpp index a183e12cf..60391a3ed 100644 --- a/Jusin154_Team3D/Client/Private/Spell_State.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_State.cpp @@ -46,6 +46,8 @@ HRESULT CSpell_State::Initialize(void* pArg) m_pVIBufferCom->Set_Cloned(true); m_pVIBufferCom->Set_Pos(-185.f, 375.f, m_fOffSetX, m_fOffSetY, m_iCols); m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); + m_bActive = true; + return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Spell_Vidio_Border.cpp b/Jusin154_Team3D/Client/Private/Spell_Vidio_Border.cpp index 32ce2c9e2..0f2cd9760 100644 --- a/Jusin154_Team3D/Client/Private/Spell_Vidio_Border.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_Vidio_Border.cpp @@ -48,6 +48,8 @@ HRESULT CSpell_Vidio_Border::Initialize(void* pArg) static_cast(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); }); static_cast(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); }); static_cast(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); }); + m_bActive = true; + return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/UI_Manager.cpp b/Jusin154_Team3D/Client/Private/UI_Manager.cpp new file mode 100644 index 000000000..33cc10f85 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/UI_Manager.cpp @@ -0,0 +1,129 @@ +#include "pch.h" +#include "UI_Manager.h" +#include "GameInstance.h" +#include "GamePlay_Canvas.h" +#include "Spell_Canvas.h" + +CUI_Manager::CUI_Manager(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CUIObject(pDevice, pContext) +{ +} + +CUI_Manager::CUI_Manager(const CUI_Manager& rhs) + :CUIObject(rhs) +{ +} + +HRESULT CUI_Manager::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CUI_Manager::Initialize(void* pArg) +{ + if (FAILED(Ready_Components(pArg))) + { + return E_FAIL; + } + m_bCanvas_Change = false; + return S_OK; +} + +void CUI_Manager::Priority_Update(_float fTimeDelta) +{ +} + +void CUI_Manager::Update(_float fTimeDelta) +{ + if (m_pGameInstance->Key_Down(DIK_T)) + { + m_bCanvas_Change = !m_bCanvas_Change; + } + + if (m_bCanvas_Change == false) + { + static_cast(m_pGamePlay_Canves)->Visible(true); + static_cast(m_pSpell_Panel)->Visible(false); + } + else + { + static_cast(m_pSpell_Panel)->Visible(true); + static_cast(m_pGamePlay_Canves)->Visible(false); + } +} + +void CUI_Manager::Late_Update(_float fTimeDelta) +{ +} + +HRESULT CUI_Manager::Render() +{ + return S_OK; +} + +_vector CUI_Manager::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CUI_Manager::Bind_ShaderResources() +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CUI_Manager::Ready_Components(void* pArg) +{ + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pGamePlay_Canves)))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Panel)))) { + return E_FAIL; + } + + return S_OK; +} + +void CUI_Manager::Clear_Penel() +{ +} + +CUI_Manager* CUI_Manager::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CUI_Manager* pInstance = new CUI_Manager(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CUI_Manager"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CUI_Manager::Clone(void* pArg, CGameObject* pOwner) +{ + CUI_Manager* pInstance = new CUI_Manager(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CUI_Manager"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CUI_Manager::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pVIBufferCom); +} + +void CUI_Manager::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Client/Public/Client_Struct.h b/Jusin154_Team3D/Client/Public/Client_Struct.h index 498525f3d..f865b6be1 100644 --- a/Jusin154_Team3D/Client/Public/Client_Struct.h +++ b/Jusin154_Team3D/Client/Public/Client_Struct.h @@ -18,15 +18,16 @@ namespace Client typedef struct tagSpellInfo { - _uint iSpell_ID{}; - _wstring pSpell_Name; - _uint iSpell_Type{}; - _uint iSkill_Type{}; - _float fSpell_CoolTime{}; - _float fDuration{}; - _uint iAnimNum{}; - _wstring pSpellInfo; - _bool bSpell_Lock = false; - _bool bEquip_Spell = false; - }SPELLINFO; + _int iSpell_ID{}; + _wstring pSpell_Name; + _wstring pImage_Name; + _int iSpell_Type{}; + _int iSkill_Type{}; + _float fSpell_CoolTime{}; + _float fDuration{}; + _int iAnimNum{}; + _wstring pSpellInfo; + _bool bSpell_Lock = false; + _bool bEquip_Spell = false; + }SPELL_INFO; }; diff --git a/Jusin154_Team3D/Client/Public/InfoInstance.h b/Jusin154_Team3D/Client/Public/InfoInstance.h index 41b803282..989107d77 100644 --- a/Jusin154_Team3D/Client/Public/InfoInstance.h +++ b/Jusin154_Team3D/Client/Public/InfoInstance.h @@ -44,9 +44,9 @@ class CInfoInstance final : public CBase #pragma endregion #pragma region Spell_INFO HRESULT Load_SpellInfo(const _char* pFilePath); + SPELL_INFO Get_Spell_Info(_int Spell_Info); + void Change_Canvas(); #pragma endregion - - private: CGameInstance* m_pGameInstance = { nullptr }; ID3D11Device* m_pDevice = { nullptr }; @@ -55,6 +55,8 @@ class CInfoInstance final : public CBase class CPlayerInfo* m_pPlayerInfo = { nullptr }; class CMonsterInfo* m_pMonsterInfo = { nullptr }; class CMapInfo* m_pMapInfo = { nullptr }; + class CSkill_Data* m_pSkillInfo= { nullptr }; + #ifdef _DEBUG _string m_strLog = {}; diff --git a/Jusin154_Team3D/Client/Public/Skill_Data.h b/Jusin154_Team3D/Client/Public/Skill_Data.h index d5f45f0cd..00b539a71 100644 --- a/Jusin154_Team3D/Client/Public/Skill_Data.h +++ b/Jusin154_Team3D/Client/Public/Skill_Data.h @@ -1,62 +1,44 @@ #pragma once #include "Client_Define.h" -#include "GameObject.h" +#include "Base.h" NS_BEGIN(Engine) class CGameInstance; +class CUIObject; NS_END NS_BEGIN(Client) -class CSkill_Data final : public CGameObject +class CSkill_Data final : public CBase { public: - typedef struct tagSpellInfo - { - _int iSpell_ID{}; - _string pSpell_Name; - _string pImage_Name; - _int iSpell_Type{}; - _int iSkill_Type{}; - _float fSpell_CoolTime{}; - _float fDuration{}; - _int iAnimNum{}; - _string pSpellInfo; - _bool bSpell_Lock = false; - _bool bEquip_Spell = false; - }SPELLINFO; + private: - CSkill_Data(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); - CSkill_Data(const CSkill_Data& rhs); - virtual ~CSkill_Data() = default; + CSkill_Data(); + ~CSkill_Data() = default; public: - virtual void Priority_Update(_float fTimeDelta); - virtual void Update(_float fTimeDelta); - virtual void Late_Update(_float fTimeDelta); - virtual HRESULT Render() override; - virtual _vector Get_WorldPostion() override; + void Update(_float fTimeDelta); + void Change_Level(); -private: - virtual HRESULT Bind_ShaderResources() override; - virtual HRESULT Ready_Components(void* pArg) override; - virtual HRESULT Initialize_Prototype() override; - virtual HRESULT Initialize(void* pArg) override; public: - //const SPELLINFO& Get_Info(_uint SpellID) const; + HRESULT Load_SpellInfo(const _char* pFilePath); + +public: + const SPELL_INFO& Get_Info(_uint SpellID) const; private: - CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; - CGameObject* m_pSpell_Panel = { nullptr }; + SPELL_INFO SpellInfo[34] = {}; + +private: + HRESULT Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex); + - SPELLINFO SpellInfo = {}; public: static CSkill_Data* 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/Client/Public/Spell_Anim.h b/Jusin154_Team3D/Client/Public/Spell_Anim.h index a40ce3957..65efe6eb7 100644 --- a/Jusin154_Team3D/Client/Public/Spell_Anim.h +++ b/Jusin154_Team3D/Client/Public/Spell_Anim.h @@ -39,11 +39,15 @@ class CSpell_Anim final : public CElementObject virtual HRESULT Initialize(void* pArg) override; private: + CInfoInstance* m_pInfoInstance = { nullptr }; + CTexture* m_pDiffuse_TextureCom = { nullptr }; CTexture* m_pDesendo_TextureCom = { nullptr }; CShader* m_pShaderCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + _int m_iTotalFrames{}; // 전체 프레임 수 _float m_fFrameTime{}; // 한 프레임당 시간(초) _int m_iCurrentFrame{}; // 현재 보여줄 프레임 diff --git a/Jusin154_Team3D/Client/Public/Spell_Panel.h b/Jusin154_Team3D/Client/Public/Spell_Panel.h index 9b98c857a..daab8a2ca 100644 --- a/Jusin154_Team3D/Client/Public/Spell_Panel.h +++ b/Jusin154_Team3D/Client/Public/Spell_Panel.h @@ -27,7 +27,7 @@ class CSpell_Panel final : public CPanelObject virtual _vector Get_WorldPostion() override; public: - virtual const SPELLINFO Get_Info(_int Index) override; + const SPELL_INFO Get_SpellInfo(_int SkillID); private: void Slot_Chack(void* pArg); @@ -41,6 +41,8 @@ class CSpell_Panel final : public CPanelObject virtual HRESULT Initialize(void* pArg) override; private: + CInfoInstance* m_pInfoInstance = { nullptr }; + CTexture* m_pDiffuse_TextureCom = { nullptr }; CShader* m_pShaderCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; @@ -63,7 +65,6 @@ class CSpell_Panel final : public CPanelObject _int m_iHoverSlot[2] = { -1,-1 }; - SPELLINFO m_Info[34] = {}; CUIObject::HOVER_INFO m_Hover; _int m_iPendingSpell = -1; diff --git a/Jusin154_Team3D/Client/Public/UI_Manager.h b/Jusin154_Team3D/Client/Public/UI_Manager.h new file mode 100644 index 000000000..f2771c59e --- /dev/null +++ b/Jusin154_Team3D/Client/Public/UI_Manager.h @@ -0,0 +1,55 @@ +#pragma once + +#include "Client_Define.h" +#include "UIObject.h" + +NS_BEGIN(Engine) +class CTexture; +class CShader; +class CVIBuffer_Rect; +NS_END + +NS_BEGIN(Client) + +class CUI_Manager final : public CUIObject +{ +private: + CUI_Manager(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CUI_Manager(const CUI_Manager& rhs); + virtual ~CUI_Manager() = default; + +public: + virtual void Priority_Update(_float fTimeDelta); + virtual void Update(_float fTimeDelta); + virtual void Late_Update(_float fTimeDelta); + virtual HRESULT Render() override; + virtual _vector Get_WorldPostion() override; + +private: + virtual HRESULT Bind_ShaderResources() override; + virtual HRESULT Ready_Components(void* pArg) override; + //virtual HRESULT Ready_Panel(void* pArg) override; + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + +public: + void Clear_Penel(); + +private: + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + CGameObject* m_pGamePlay_Canves= { nullptr }; + CGameObject* m_pSpell_Panel = { nullptr }; + _bool m_bCanvas_Change = { false }; + +public: + static CUI_Manager* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; +#ifdef _DEBUG + void Describe_Entity() override; +#endif // _DEBUG + +}; + +NS_END;