diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj index 14e466596..456378909 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj @@ -197,8 +197,8 @@ call Update_Resources.bat - - + + @@ -472,8 +472,8 @@ call Update_Resources.bat - - + + diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters index 5ce7e472a..46ac96442 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters @@ -809,11 +809,11 @@ 04.Mechanic\State\Focus\Fear - - 02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_Bbooster_Slot + + 02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_Booster_Slot - - 02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_BboosterBar + + 02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_BoosterBar 02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_HpBar @@ -841,10 +841,10 @@ 02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Nomal_Hit - + 02.GameObjects\NPC\Ally\RandomNpc - + @@ -1722,12 +1722,6 @@ {5bf233fa-6f9c-40d5-85c6-adbc7fcf7d28} - - {9c357e12-18b3-461e-b74c-76f85280796f} - - - {8b69e309-b90b-47f6-8f2d-3dd778b468fe} - {d3ad8db7-ff00-498d-ba50-aa4c38a56d4a} @@ -1751,10 +1745,16 @@ {15ea8015-5b0a-4678-bf02-55b042ef4de4} - + {88b62177-01fc-424d-a444-4fb5fd4b2db5} + + {9c357e12-18b3-461e-b74c-76f85280796f} + + + {8b69e309-b90b-47f6-8f2d-3dd778b468fe} + @@ -2511,11 +2511,11 @@ 04.Mechanic\State\Focus\Fear - - 02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_Bbooster_Slot + + 02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_Booster_Slot - - 02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_BboosterBar + + 02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_BoosterBar 02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_HpBar @@ -2543,7 +2543,7 @@ 02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Nomal_Hit - + 02.GameObjects\NPC\Ally\RandomNpc diff --git a/Jusin154_Team3D/Client/Private/Action_Panel.cpp b/Jusin154_Team3D/Client/Private/Action_Panel.cpp index 08df3b239..cb63d3bbe 100644 --- a/Jusin154_Team3D/Client/Private/Action_Panel.cpp +++ b/Jusin154_Team3D/Client/Private/Action_Panel.cpp @@ -296,82 +296,82 @@ HRESULT CAction_Panel::Ready_Components(void* pArg) HRESULT CAction_Panel::Ready_Element(void* pArg) { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pSpell_Slot)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pSpell_Slot)))) { return E_FAIL; } Add_Element(TEXT("Spell_Slot"), m_pSpell_Slot); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Overlay1)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Overlay1)))) { return E_FAIL; } Add_Element(TEXT("Spell_Overlay1"), m_pSpell_Overlay1); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Overlay2)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Overlay2)))) { return E_FAIL; } static_cast(m_pSpell_Overlay2)->MoveX(481.f); Add_Element(TEXT("Spell_Overlay2"), m_pSpell_Overlay2); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Overlay3)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Overlay3)))) { return E_FAIL; } static_cast(m_pSpell_Overlay3)->MoveX(582.f); Add_Element(TEXT("Spell_Overlay3"), m_pSpell_Overlay3); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Overlay4)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Overlay4)))) { return E_FAIL; } static_cast(m_pSpell_Overlay4)->MoveX(683.f); Add_Element(TEXT("Spell_Overlay4"), m_pSpell_Overlay4); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSlot_Number)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSlot_Number)))) { return E_FAIL; } Add_Element(TEXT("Slot_Number"), m_pSlot_Number); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pHpBarBG)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pHpBarBG)))) { return E_FAIL; } Add_Element(TEXT("HpBarBG"), m_pHpBarBG); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMagic_Meter1)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMagic_Meter1)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMagic_Meter2)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMagic_Meter2)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMagic_Meter3)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMagic_Meter3)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMagic_Meter4)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMagic_Meter4)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pLastMagic_Meter)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pLastMagic_Meter)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMagic_Icon)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMagic_Icon)))) { return E_FAIL; } Add_Element(TEXT("Magic_Icon"), m_pMagic_Icon); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_UI)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_UI)))) { return E_FAIL; } Add_Element(TEXT("Spell_UI"), m_pSpell_UI); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pPotion)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pPotion)))) { return E_FAIL; } Add_Element(TEXT("Potion"), m_pPotion); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMagic_Item)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMagic_Item)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/Broom.cpp b/Jusin154_Team3D/Client/Private/Broom.cpp index 65a9953b5..b6e7762e8 100644 --- a/Jusin154_Team3D/Client/Private/Broom.cpp +++ b/Jusin154_Team3D/Client/Private/Broom.cpp @@ -49,7 +49,7 @@ HRESULT CBroom::Initialize(void* pArg) m_pFSM->Change_State(FSMSTATE::IDLE); } - m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(0.f,-100.f, 0.f, 1.f)); + m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(0.f, -100.f, 0.f, 1.f)); m_pParentUnit = dynamic_cast(m_pOwner); @@ -83,6 +83,7 @@ void CBroom::Update(_float fTimeDelta) if (!m_pParentUnit->IsAI()) { PlayerInput(fTimeDelta); + m_pInfoInstance->Set_Broom_Booster_Timer(m_fTurboBoost); } else { m_fAITime += fTimeDelta; @@ -98,9 +99,9 @@ void CBroom::Update(_float fTimeDelta) m_bHoverToggle = true; m_fSpeed = 0.f; - if(m_pWindEffect != nullptr) + if (m_pWindEffect != nullptr) { - if(m_pWindEffect->Get_Visible() == true) // 전 프레임에 트루였다면 + if (m_pWindEffect->Get_Visible() == true) // 전 프레임에 트루였다면 { m_pWindEffect->Set_Visible(false); m_pWindEffect->Get_Effect_Info()->fSoftMask = 1.f; @@ -158,7 +159,7 @@ void CBroom::Late_Update(_float fTimeDelta) HRESULT CBroom::Render() { - if (!m_pModelCom){ + if (!m_pModelCom) { return S_OK; } @@ -304,6 +305,7 @@ void CBroom::PlayerInput(_float fTimeDelta) m_fTurboBoost = 0.f; } m_Input.bTurbo = true; + m_pInfoInstance->Event_CallBack(TEXT("BroomBooster"), &m_Input.bTurbo); } else { m_Input.bTurbo = false; @@ -321,6 +323,7 @@ void CBroom::PlayerInput(_float fTimeDelta) } } m_Input.bTurbo = false; + m_pInfoInstance->Event_CallBack(TEXT("BroomBooster"), &m_Input.bTurbo); } m_bTurbo = m_Input.bTurbo; diff --git a/Jusin154_Team3D/Client/Private/Broom_Panel.cpp b/Jusin154_Team3D/Client/Private/Broom_Panel.cpp index 938ac1392..18370b3da 100644 --- a/Jusin154_Team3D/Client/Private/Broom_Panel.cpp +++ b/Jusin154_Team3D/Client/Private/Broom_Panel.cpp @@ -142,43 +142,43 @@ HRESULT CBroom_Panel::Ready_Components(void* pArg) HRESULT CBroom_Panel::Ready_Element(void* pArg) { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pBroom_Flag)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pBroom_Flag)))) { return E_FAIL; } Add_Element(TEXT("Broom_Flag"), m_pBroom_Flag); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pBroom_Circle)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pBroom_Circle)))) { return E_FAIL; } Add_Element(TEXT("Broom_Circle"), m_pBroom_Circle); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pBroom_Scoreboard)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pBroom_Scoreboard)))) { return E_FAIL; } Add_Element(TEXT("Broom_Scoreboard"), m_pBroom_Scoreboard); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pBroom_Finish)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pBroom_Finish)))) { return E_FAIL; } Add_Element(TEXT("Broom_Fiish"), m_pBroom_Finish); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pBroom_Record)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pBroom_Record)))) { return E_FAIL; } Add_Element(TEXT("Broom_Record"), m_pBroom_Record); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pBroom_Exit)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pBroom_Exit)))) { return E_FAIL; } Add_Element(TEXT("Broom_Exit"), m_pBroom_Exit); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pBroom_Trophy)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pBroom_Trophy)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/Dialogue_Data.cpp b/Jusin154_Team3D/Client/Private/Dialogue_Data.cpp index e32387fbb..f71bc98f4 100644 --- a/Jusin154_Team3D/Client/Private/Dialogue_Data.cpp +++ b/Jusin154_Team3D/Client/Private/Dialogue_Data.cpp @@ -11,7 +11,7 @@ CDialogue_Data::CDialogue_Data() HRESULT CDialogue_Data::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex) { - Load_SpellInfo("../Bin/Resources/Data/UI/Dialogue/Dialogue.xml"); + Load_SpellInfo("../Bin/Resources/Data/Dialogue/Dialogue.xml"); return S_OK; } @@ -33,6 +33,9 @@ HRESULT CDialogue_Data::Load_SpellInfo(const _char* pFilePath) while (pDialogue) { NpcDialogue npc{}; + const char* NpcName = pDialogue->Attribute("NpcName"); + if (pDialogue) npc.pNpcName = CMyTools::ToWstring(NpcName); + pDialogue->QueryIntAttribute("NpcID", &npc.iNpcID); tinyxml2::XMLElement* pLine = pDialogue->FirstChildElement("Line"); @@ -68,19 +71,25 @@ HRESULT CDialogue_Data::Load_SpellInfo(const _char* pFilePath) pChoice = pChoice->NextSiblingElement("Choice"); } - npc.Info.push_back(line); + npc.Info.emplace(line.iLineID, line); pLine = pLine->NextSiblingElement("Line"); } - m_DialogueInfo.push_back(npc); + m_DialogueInfo.emplace(npc.pNpcName, npc); pDialogue = pDialogue->NextSiblingElement("Dialogue"); } return S_OK; } -const NPCDIALOGUEINFO& CDialogue_Data::Get_Info(_uint DialogueID) const +const NPCDIALOGUEINFO& CDialogue_Data::Get_Info(_wstring NpcName) const { - return m_DialogueInfo[DialogueID]; + auto iter = m_DialogueInfo.find(NpcName); + if (iter == m_DialogueInfo.end()) + { + return Dummy; + } + + return iter->second; } CDialogue_Data* CDialogue_Data::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) diff --git a/Jusin154_Team3D/Client/Private/Dialogue_Font.cpp b/Jusin154_Team3D/Client/Private/Dialogue_Font.cpp index 0099970ac..6ce9e85f9 100644 --- a/Jusin154_Team3D/Client/Private/Dialogue_Font.cpp +++ b/Jusin154_Team3D/Client/Private/Dialogue_Font.cpp @@ -5,154 +5,184 @@ #include "Dialogue.h" CDialogue_Font::CDialogue_Font(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) - :CGameObject(pDevice, pContext) + :CGameObject(pDevice, pContext) { } CDialogue_Font::CDialogue_Font(const CDialogue_Font& rhs) - :CGameObject(rhs), - m_pInfoInstance(CInfoInstance::GetInstance()) + :CGameObject(rhs), + m_pInfoInstance(CInfoInstance::GetInstance()) { } HRESULT CDialogue_Font::Initialize_Prototype() { - return S_OK; + return S_OK; } HRESULT CDialogue_Font::Initialize(void* pArg) { - m_pInfoInstance->Add_Event(TEXT("Dialogue"), [this](void* p) {this->Add_Text(p); }); + m_pInfoInstance->Add_Event(TEXT("Dialogue"), [this](void* p) {this->Add_Text(p); }); - for (_int i = 0; i < 5; ++i) - { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pDialogue)))) { - return E_FAIL; - } + m_pInfoInstance->Add_Event(TEXT("NpcInteract"), [this](void* p) {this->NpcInteract(*reinterpret_cast<_bool*>(p)); }); + m_pInfoInstance->Add_Event(TEXT("NPCInteractionOn"), [this](void* p) {this->NpcInfo(p); }); - m_pDialogue->Visible(true); - m_DialoguInfo.push_back(m_pDialogue); - } + for (_int i = 0; i < 5; ++i) + { + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pDialogue)))) { + return E_FAIL; + } - return S_OK; + m_pDialogue->Visible(true); + m_DialoguInfo.push_back(m_pDialogue); + } + + return S_OK; } - void CDialogue_Font::Priority_Update(_float fTimeDelta) { } void CDialogue_Font::Update(_float fTimeDelta) { - if (!m_pCurrentDialogue.empty()) - { - for (auto it = m_pCurrentDialogue.begin(); it != m_pCurrentDialogue.end();) - { - if ((*it)->Get_Hover() == false) - { - (*it)->Visible(false); - m_DialoguInfo.push_back((*it)); - it = m_pCurrentDialogue.erase(it); - } - else - { - it++; - } - } - } + if (!m_pCurrentDialogue.empty()) + { + for (auto it = m_pCurrentDialogue.begin(); it != m_pCurrentDialogue.end();) + { + if ((*it)->Get_Hover() == false) + { + (*it)->Visible(false); + m_DialoguInfo.push_back((*it)); + it = m_pCurrentDialogue.erase(it); + } + else + { + it++; + } + } + } + + if (m_bNpcInteract != m_bCurrentInteract) + { + m_bCurrentInteract = m_bNpcInteract; + m_pInfoInstance->Get_Dialogue(m_pNpcName); + } + + if (m_bNpcInteract == false) + { + if (m_bCurrentInteract == true) + m_bCurrentInteract = false; + } + } void CDialogue_Font::Late_Update(_float fTimeDelta) { - if (!m_DialoguInfo.empty()) - { - m_pGameInstance->Add_RenderGroup(RENDER::UI_OVERLAY, this); - } + if (!m_DialoguInfo.empty()) + { + m_pGameInstance->Add_RenderGroup(RENDER::UI_OVERLAY, this); + } } HRESULT CDialogue_Font::Render() { - if (!m_pCurrentDialogue.empty()) - { - for (auto it : m_pCurrentDialogue) - { - it->Render(); - } - } - return S_OK; + if (!m_pCurrentDialogue.empty()) + { + for (auto it : m_pCurrentDialogue) + { + it->Render(); + } + } + + + + return S_OK; } _vector CDialogue_Font::Get_WorldPostion() { - return _vector(); + return _vector(); } HRESULT CDialogue_Font::Bind_ShaderResources() { - return S_OK; + return S_OK; } HRESULT CDialogue_Font::Ready_Components(void* pArg) { - return S_OK; + return S_OK; } void CDialogue_Font::Add_Text(void* pArg) { - if (m_DialoguInfo.empty() == true) - return; + if (m_DialoguInfo.empty() == true) + return; - DIALOGUEINFO pInfo = *reinterpret_cast(pArg); - - CDialogue* Dialogue = m_DialoguInfo.back(); - m_DialoguInfo.pop_back(); + DIALOGUEINFO pInfo = *reinterpret_cast(pArg); - for (auto& it : m_pCurrentDialogue) - { - it->Up(); - } - - pInfo.fTime = 2.5f; - Dialogue->SizeUpdate(pInfo.pName, pInfo.pText); - Dialogue->Visible(true); - Dialogue->Set_Time(pInfo.fTime); + CDialogue* Dialogue = m_DialoguInfo.back(); + m_DialoguInfo.pop_back(); - m_pCurrentDialogue.push_front(Dialogue); + for (auto& it : m_pCurrentDialogue) + { + it->Up(); + } + + pInfo.fTime = 2.5f; + Dialogue->SizeUpdate(pInfo.pName, pInfo.pText); + Dialogue->Visible(true); + Dialogue->Set_Time(pInfo.fTime); + + m_pCurrentDialogue.push_front(Dialogue); +} + +void CDialogue_Font::NpcInfo(void* pArg) +{ + NPCINTERACTIONINFO* Info = reinterpret_cast(pArg); + m_pNpcName = Info->pName; + m_iTextID = Info->iTextID; +} + +void CDialogue_Font::NpcInteract(_bool bInteract) +{ + m_bNpcInteract = bInteract; } CDialogue_Font* CDialogue_Font::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) { - CDialogue_Font* pInstance = new CDialogue_Font(pDevice, pContext); + CDialogue_Font* pInstance = new CDialogue_Font(pDevice, pContext); - if (FAILED(pInstance->Initialize_Prototype())) - { - MSG_BOX("Failed to Created : CDialogue_Font"); - SAFE_RELEASE(pInstance); - } + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CDialogue_Font"); + SAFE_RELEASE(pInstance); + } - return pInstance; + return pInstance; } CGameObject* CDialogue_Font::Clone(void* pArg, CGameObject* pOwner) { - CDialogue_Font* pInstance = new CDialogue_Font(*this); - pInstance->m_pOwner = pOwner; - if (FAILED(pInstance->Initialize(pArg))) - { - MSG_BOX("Failed to Cloned : CDialogue_Font"); - SAFE_RELEASE(pInstance); - } + CDialogue_Font* pInstance = new CDialogue_Font(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CDialogue_Font"); + SAFE_RELEASE(pInstance); + } - return pInstance; + return pInstance; } void CDialogue_Font::Free() { - __super::Free(); + __super::Free(); - m_DialoguInfo.clear(); + m_DialoguInfo.clear(); } #ifdef _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Enemy_Panel.cpp b/Jusin154_Team3D/Client/Private/Enemy_Panel.cpp index 34b99e202..abae5f8ce 100644 --- a/Jusin154_Team3D/Client/Private/Enemy_Panel.cpp +++ b/Jusin154_Team3D/Client/Private/Enemy_Panel.cpp @@ -137,19 +137,19 @@ HRESULT CEnemy_Panel::Ready_Components(void* pArg) HRESULT CEnemy_Panel::Ready_Element(void* pArg) { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pEnemy_HpBar)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pEnemy_HpBar)))) { return E_FAIL; } Add_Element(TEXT("Enemy_HpBar"), m_pEnemy_HpBar); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pEnemy_Info)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pEnemy_Info)))) { return E_FAIL; } Add_Element(TEXT("Enemy_Info"), m_pEnemy_Info); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pBoss_HpBar)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pBoss_HpBar)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/GamePlay_Canvas.cpp b/Jusin154_Team3D/Client/Private/GamePlay_Canvas.cpp index fc6dbdfe1..3c74f95c1 100644 --- a/Jusin154_Team3D/Client/Private/GamePlay_Canvas.cpp +++ b/Jusin154_Team3D/Client/Private/GamePlay_Canvas.cpp @@ -111,43 +111,43 @@ HRESULT CGamePlay_Canvas::Ready_Components(void* pArg) HRESULT CGamePlay_Canvas::Ready_Panel(void* pArg) { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pLoading_Panel)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pLoading_Panel)))) { return E_FAIL; } Add_Panel(TEXT("LoadingPanel"), m_pLoading_Panel); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMinimap_Panel)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMinimap_Panel)))) { return E_FAIL; } Add_Panel(TEXT("MinimapPanel"), m_pMinimap_Panel); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMission_Panel)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMission_Panel)))) { return E_FAIL; } Add_Panel(TEXT("MissionPanel"), m_pMission_Panel); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pAction_Panel)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pAction_Panel)))) { return E_FAIL; } Add_Panel(TEXT("ActionPanel"), m_pAction_Panel); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pEnemy_Panel)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pEnemy_Panel)))) { return E_FAIL; } Add_Panel(TEXT("Enemy_Panel"), m_pEnemy_Panel); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pBroom_Panel)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pBroom_Panel)))) { return E_FAIL; } Add_Panel(TEXT("Broom_Panel"), m_pBroom_Panel); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pRide_Panel)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pRide_Panel)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/InfoInstance.cpp b/Jusin154_Team3D/Client/Private/InfoInstance.cpp index 5dc08865d..ea6a68cef 100644 --- a/Jusin154_Team3D/Client/Private/InfoInstance.cpp +++ b/Jusin154_Team3D/Client/Private/InfoInstance.cpp @@ -12,6 +12,7 @@ #include "NPCStat.h" #include "Player.h" #include "Dialogue_Font.h" +#include "Dialogue_Data.h" IMPLEMENT_SINGLETON(CInfoInstance) @@ -35,6 +36,7 @@ void CInfoInstance::Change_Level() m_pMapInfo->Change_Level(); m_pSkillInfo->Change_Level(); m_pInteractiveInfo->Change_Level(); + UI_Event.clear(); } CStat* CInfoInstance::Get_PlayerStatPtr() @@ -329,9 +331,14 @@ _int CInfoInstance::Get_SpellLearnIndex() return m_pSpellLearn_Data->Get_Index(); } -void CInfoInstance::Set_Font(void* pArg) +//void CInfoInstance::Set_Font(void* pArg) +//{ +// m_pDialogue_Font->Add_Text(pArg); +//} + +const NPCDIALOGUEINFO& CInfoInstance::Get_Dialogue(_wstring NpcName) const { - m_pDialogue_Font->Add_Text(pArg); + return m_pDialogue_Data->Get_Info(NpcName); } HRESULT CInfoInstance::Regist_ActiveInteractive(CMapElement_Interactable* pInteractive) @@ -365,6 +372,16 @@ _float CInfoInstance::Get_Broom_Timer() return m_fBroom_Timer; } +void CInfoInstance::Set_Broom_Booster_Timer(_float fTimer) +{ + m_fBroom_Booster = fTimer; +} + +_float CInfoInstance::Get_Broom_Booster_Timer() +{ + return m_fBroom_Booster; +} + #pragma endregion LEVEL CInfoInstance::Get_RestartLevel() { @@ -423,6 +440,10 @@ HRESULT CInfoInstance::Initialize_Information(ID3D11Device* pDevice, ID3D11Devic if (nullptr == m_pDialogue_Font) { return E_FAIL; } + m_pDialogue_Data = CDialogue_Data::Create(pDevice, pContext); + if (nullptr == m_pDialogue_Data) { + return E_FAIL; + } return S_OK; } @@ -497,6 +518,7 @@ void CInfoInstance::Release_Information() DestroyInstance(); + SAFE_RELEASE(m_pDialogue_Data); SAFE_RELEASE(m_pDialogue_Font); SAFE_RELEASE(m_pSpellLearn_Data); SAFE_RELEASE(m_pMapInfo); diff --git a/Jusin154_Team3D/Client/Private/Level_Field.cpp b/Jusin154_Team3D/Client/Private/Level_Field.cpp index 34abda90b..fcb69dc65 100644 --- a/Jusin154_Team3D/Client/Private/Level_Field.cpp +++ b/Jusin154_Team3D/Client/Private/Level_Field.cpp @@ -11,6 +11,9 @@ #include "Terrain.h" #include "SkyBox.h" #include "Ranrok.h" +#include "UI_Manager.h" + + CLevel_Field::CLevel_Field(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID) : CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) } { diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index 30a8a39e3..d04b300cc 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -153,8 +153,8 @@ #include "Ride_Info_Key.h" #include "Ride_Info.h" #include "Ride_InfoBG.h" -#include "Ride_Bbooster_Slot.h" -#include "Ride_BboosterBar.h" +#include "Ride_Booster_Slot.h" +#include "Ride_BoosterBar.h" #include "Ride_HpBar.h" #include "Ride_HpSlot.h" @@ -2826,12 +2826,12 @@ HRESULT CLoader::Loading_For_GamePlay() return E_FAIL; } /* For.Prototype_GameObject_SpellLearn_Ride_Bbooster_Slot*/ - if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRide_Bbooster_Slot::Create(m_pDevice, m_pContext)))) + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRide_Booster_Slot::Create(m_pDevice, m_pContext)))) { return E_FAIL; } /* For.Prototype_GameObject_SpellLearn_Ride_BboosterBar*/ - if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRide_BboosterBar::Create(m_pDevice, m_pContext)))) + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRide_BoosterBar::Create(m_pDevice, m_pContext)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/Loading_Panel.cpp b/Jusin154_Team3D/Client/Private/Loading_Panel.cpp index 55973eb04..f4b8b8ed9 100644 --- a/Jusin154_Team3D/Client/Private/Loading_Panel.cpp +++ b/Jusin154_Team3D/Client/Private/Loading_Panel.cpp @@ -101,13 +101,13 @@ HRESULT CLoading_Panel::Ready_Components(void* pArg) HRESULT CLoading_Panel::Ready_Element(void* pArg) { - //if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pLoadingWidget)))) + //if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pLoadingWidget)))) //{ // return E_FAIL; //} //Add_Element(TEXT("LoadingWidget"), m_pLoadingWidget); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pLoadingWidget_Flame)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pLoadingWidget_Flame)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/MiniMap_Panel.cpp b/Jusin154_Team3D/Client/Private/MiniMap_Panel.cpp index 9e6c91082..22744c680 100644 --- a/Jusin154_Team3D/Client/Private/MiniMap_Panel.cpp +++ b/Jusin154_Team3D/Client/Private/MiniMap_Panel.cpp @@ -98,12 +98,12 @@ HRESULT CMiniMap_Panel::Ready_Components(void* pArg) HRESULT CMiniMap_Panel::Ready_Element(void* pArg) { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pMiniMap_TrimBorder)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pMiniMap_TrimBorder)))) { return E_FAIL; } Add_Element(TEXT("MiniMap_TrimBorder"), m_pMiniMap_TrimBorder); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pNoMountIcon)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pNoMountIcon)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/NPCInteraction.cpp b/Jusin154_Team3D/Client/Private/NPCInteraction.cpp index 398411a21..d3154d442 100644 --- a/Jusin154_Team3D/Client/Private/NPCInteraction.cpp +++ b/Jusin154_Team3D/Client/Private/NPCInteraction.cpp @@ -97,11 +97,11 @@ void CNPCInteraction::NpcInfo(void* pArg) m_pInfo.pOwner = Info->pOwner; m_pInfo.pNPCName = Info->pNPCName; - m_pInfo.pNPCPosition = Info->pNPCPosition; + m_pInfo.fNPCPosition = Info->fNPCPosition; _vector MonsterPos = static_cast(Info->pOwner)->Get_WorldPostion(); _vector HeadPos = MonsterPos + XMVectorSet(0.5f, 2.f, 0.f, 0.f); - XMStoreFloat4(&m_pInfo.pNPCPosition, HeadPos); + XMStoreFloat4(&m_pInfo.fNPCPosition, HeadPos); } void CNPCInteraction::Priority_Update(_float fTimeDelta) @@ -110,7 +110,7 @@ void CNPCInteraction::Priority_Update(_float fTimeDelta) { _vector MonsterPos = static_cast(m_pInfo.pOwner)->Get_WorldPostion(); _vector HeadPos = XMVectorAdd(MonsterPos, XMVectorSet(0.5f, 2.f, 0.f, 0.f)); - XMStoreFloat4(&m_pInfo.pNPCPosition, HeadPos); + XMStoreFloat4(&m_pInfo.fNPCPosition, HeadPos); _vector ScreenPos = XMVector3Project( HeadPos, @@ -137,7 +137,7 @@ void CNPCInteraction::Priority_Update(_float fTimeDelta) XMStoreFloat4(&m_vFontPosition, WorldOffsetPos); m_fSize = _float3(m_fSize.x, m_fOrigin_Size.y, m_fOrigin_Size.z); m_fFontSize = 0; - m_pTransformCom->Set_State(STATE::POSITION, XMLoadFloat4(&m_pInfo.pNPCPosition)); + m_pTransformCom->Set_State(STATE::POSITION, XMLoadFloat4(&m_pInfo.fNPCPosition)); } } @@ -190,7 +190,7 @@ HRESULT CNPCInteraction::Render() m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ), TEXT("Font_size15"), TEXT("대화하기"), - XMLoadFloat4(&m_pInfo.pNPCPosition)); + XMLoadFloat4(&m_pInfo.fNPCPosition)); return S_OK; diff --git a/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp b/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp index 5454e0b4f..9673806bc 100644 --- a/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp +++ b/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp @@ -140,6 +140,16 @@ _wstring CNPC_Ollivander::Get_Name() return m_pNpcStat->Get_Stat().pNpc_Name; } +_wstring CNPC_Ollivander::Get_NpcName() +{ + return m_pNpcStat->Get_Stat().pName; +} + +_int CNPC_Ollivander::Get_TextID() +{ + return m_iNpc_DialogueTextID; +} + HRESULT CNPC_Ollivander::Bind_ShaderResources() { if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) { @@ -188,6 +198,8 @@ HRESULT CNPC_Ollivander::Initialize(void* pArg) m_pModelCom->Set_AnimationIndex(0, true); + //m_pInfoInstance->Add_Event(TEXT("NPCDialogue"), [this](void* p) {this->Get_TextID(*reinterpret_cast<_int*>(p)); }); + m_bNpc = true; return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Player.cpp b/Jusin154_Team3D/Client/Private/Player.cpp index c24ad49eb..38b5a352c 100644 --- a/Jusin154_Team3D/Client/Private/Player.cpp +++ b/Jusin154_Team3D/Client/Private/Player.cpp @@ -54,6 +54,9 @@ HRESULT CPlayer::Initialize(void* pArg) #if 진우 m_isDebugMode = true; // 디버그 무적 모드 #endif +#if 나 + m_isDebugMode = true; // 디버그 무적 모드 +#endif #endif // _DEBUG @@ -154,6 +157,14 @@ void CPlayer::Update(_float fTimeDelta) CheckMouseInput(); + if (m_pGameInstance->Key_Down(DIK_F)) + { + if (m_bNpcInteraction == true) + { + m_pInfoInstance->Event_CallBack(TEXT("NpcInteract"), &m_bNpcInteraction); + } + } + m_pInfoInstance->Set_PlayerPos(m_pTransformCom->Get_State(STATE::POSITION)); } @@ -345,9 +356,11 @@ HRESULT CPlayer::Update_RaycastElements() Info.pOwner = pFoundNPC; Info.pNPCName = static_cast(pFoundNPC)->Get_Name(); + Info.pName = static_cast(pFoundNPC)->Get_NpcName(); _float4 Pos{}; XMStoreFloat4(&Pos, static_cast(pFoundNPC)->Get_WorldPostion()); - Info.pNPCPosition = Pos; + Info.fNPCPosition = Pos; + Info.iTextID = static_cast(pFoundNPC)->Get_TextID(); m_bNpcInteraction = true; m_pInfoInstance->Event_CallBack(TEXT("NPCInteractionOn"), &Info); } diff --git a/Jusin154_Team3D/Client/Private/Quest_Canvas.cpp b/Jusin154_Team3D/Client/Private/Quest_Canvas.cpp index accca3075..9c413d948 100644 --- a/Jusin154_Team3D/Client/Private/Quest_Canvas.cpp +++ b/Jusin154_Team3D/Client/Private/Quest_Canvas.cpp @@ -90,7 +90,7 @@ HRESULT CQuest_Canvas::Ready_Components(void* pArg) HRESULT CQuest_Canvas::Ready_Panel(void* pArg) { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pQuest_Panel)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pQuest_Panel)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/Quest_Panel.cpp b/Jusin154_Team3D/Client/Private/Quest_Panel.cpp index 41e723493..b3a5ebf2f 100644 --- a/Jusin154_Team3D/Client/Private/Quest_Panel.cpp +++ b/Jusin154_Team3D/Client/Private/Quest_Panel.cpp @@ -53,7 +53,7 @@ HRESULT CQuest_Panel::Initialize(void* pArg) ElementAllVisible(true); Set_Status(); Add_Function(TEXT("Click"), [this](void* p) {this->Slot_Hover(*reinterpret_cast<_int*>(p)); }); - static_cast(m_pOwner)->Add_Function(TEXT("QuestPanelClose"), [this](void* p) {this->Slot_Hover(*reinterpret_cast<_int*>(p)); }); + //static_cast(m_pOwner)->Add_Function(TEXT("QuestPanelClose"), [this](void* p) {this->Slot_Hover(*reinterpret_cast<_int*>(p)); }); return S_OK; } @@ -170,49 +170,49 @@ HRESULT CQuest_Panel::Ready_Components(void* pArg) HRESULT CQuest_Panel::Ready_Element(void* pArg) { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Slot)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Slot)))) { return E_FAIL; } Add_Element(TEXT("Quest_Slot"), m_pQuest_Slot); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Info)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Info)))) { return E_FAIL; } Add_Element(TEXT("Quest_Info"), m_pQuest_Info); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Info_Header)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Info_Header)))) { return E_FAIL; } Add_Element(TEXT("Quest_Info_Header"), m_pQuest_Info_Header); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Info_Line)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Info_Line)))) { return E_FAIL; } Add_Element(TEXT("Quest_Info_Line"), m_pQuest_Info_Line); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Entry_Line)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Entry_Line)))) { return E_FAIL; } Add_Element(TEXT("Quest_Entry_Line"), m_pQuest_Entry_Line); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Status1)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Status1)))) { return E_FAIL; } Add_Element(TEXT("Quest_Status1"), m_pQuest_Status1); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Status2)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Status2)))) { return E_FAIL; } Add_Element(TEXT("Quest_Status2"), m_pQuest_Status2); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Status3)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Status3)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/Ride_BboosterBar.cpp b/Jusin154_Team3D/Client/Private/Ride_BoosterBar.cpp similarity index 80% rename from Jusin154_Team3D/Client/Private/Ride_BboosterBar.cpp rename to Jusin154_Team3D/Client/Private/Ride_BoosterBar.cpp index 638a37e2a..cde44a9b1 100644 --- a/Jusin154_Team3D/Client/Private/Ride_BboosterBar.cpp +++ b/Jusin154_Team3D/Client/Private/Ride_BoosterBar.cpp @@ -1,23 +1,24 @@ #include "pch.h" -#include "Ride_BboosterBar.h" +#include "Ride_BoosterBar.h" #include "GameInstance.h" +#include "InfoInstance.h" -CRide_BboosterBar::CRide_BboosterBar(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +CRide_BoosterBar::CRide_BoosterBar(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) :CElementObject(pDevice, pContext) { } -CRide_BboosterBar::CRide_BboosterBar(const CRide_BboosterBar& rhs) +CRide_BoosterBar::CRide_BoosterBar(const CRide_BoosterBar& rhs) :CElementObject(rhs) { } -HRESULT CRide_BboosterBar::Initialize_Prototype() +HRESULT CRide_BoosterBar::Initialize_Prototype() { return S_OK; } -HRESULT CRide_BboosterBar::Initialize(void* pArg) +HRESULT CRide_BoosterBar::Initialize(void* pArg) { CUIObject::UIOBJECT_DESC Desc{}; @@ -41,8 +42,8 @@ HRESULT CRide_BboosterBar::Initialize(void* pArg) m_fAlpha = 1.f; m_fAlphaTime = 10.f; m_vNine_Slice = _float4(27.f, 125.f, m_fSizeY * 0.5f, m_fSizeY * 0.5f); - m_fMaxGauge = 100.f; - m_fCurrentGauge = m_fMaxGauge; + m_fMaxGauge = 5.f; + m_fCurrentGauge = 5.f; m_fTargetGauge = m_fMaxGauge; m_fMoveSpeed = 5.f; m_fGaugeBGSize = _float2(144.f, 24.f); @@ -52,17 +53,27 @@ HRESULT CRide_BboosterBar::Initialize(void* pArg) return S_OK; } -void CRide_BboosterBar::Active(_float fTimeDelta) +void CRide_BoosterBar::Active(_float fTimeDelta) { m_fCurrentGauge = CMyTools::Lerp_f1D(m_fCurrentGauge, m_fTargetGauge, fTimeDelta * m_fMoveSpeed); } -void CRide_BboosterBar::NonActive(_float fTimeDelta) +void CRide_BoosterBar::NonActive(_float fTimeDelta) { m_fCurrentGauge = CMyTools::Lerp_f1D(m_fTargetGauge, m_fCurrentGauge, fTimeDelta * m_fMoveSpeed); } -void CRide_BboosterBar::Priority_Update(_float fTimeDelta) +void CRide_BoosterBar::Set_Gauge(_float fTime) +{ + m_fTargetGauge = fTime; +} + +void CRide_BoosterBar::Booster(_bool bBooster) +{ + m_bBooster = bBooster; +} + +void CRide_BoosterBar::Priority_Update(_float fTimeDelta) { if (!__super::Chack_Visible()) { @@ -71,7 +82,7 @@ void CRide_BboosterBar::Priority_Update(_float fTimeDelta) __super::Priority_Update(fTimeDelta); } -void CRide_BboosterBar::Update(_float fTimeDelta) +void CRide_BoosterBar::Update(_float fTimeDelta) { if (!__super::Chack_Visible()) { @@ -113,9 +124,8 @@ void CRide_BboosterBar::Update(_float fTimeDelta) m_fGaugeBar = m_fCurrentGauge / m_fMaxGauge; - if (m_pGameInstance->Mouse_Pressing(DIM_LBUTTON)) + if (m_bBooster == true) { - m_fTargetGauge -= fTimeDelta * m_fTimeMult; m_iClick = 1; } else @@ -130,7 +140,7 @@ void CRide_BboosterBar::Update(_float fTimeDelta) if (m_iClick == 0) { - m_fTargetGauge += fTimeDelta * m_fTimeMult; + //m_fTargetGauge += fTimeDelta; } if (m_iClick == 1) @@ -150,7 +160,7 @@ void CRide_BboosterBar::Update(_float fTimeDelta) __super::Update(fTimeDelta); } -void CRide_BboosterBar::Late_Update(_float fTimeDelta) +void CRide_BoosterBar::Late_Update(_float fTimeDelta) { if (!__super::Chack_Visible()) { @@ -162,7 +172,7 @@ void CRide_BboosterBar::Late_Update(_float fTimeDelta) } } -HRESULT CRide_BboosterBar::Render() +HRESULT CRide_BoosterBar::Render() { if (FAILED(Bind_ShaderResources())) { return E_FAIL; @@ -180,12 +190,12 @@ HRESULT CRide_BboosterBar::Render() return S_OK; } -_vector CRide_BboosterBar::Get_WorldPostion() +_vector CRide_BoosterBar::Get_WorldPostion() { return m_pTransformCom->Get_State(STATE::POSITION); } -HRESULT CRide_BboosterBar::Bind_ShaderResources() +HRESULT CRide_BoosterBar::Bind_ShaderResources() { if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) { @@ -270,7 +280,7 @@ HRESULT CRide_BboosterBar::Bind_ShaderResources() return S_OK; } -HRESULT CRide_BboosterBar::Ready_Components(void* pArg) +HRESULT CRide_BoosterBar::Ready_Components(void* pArg) { if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) { @@ -295,33 +305,33 @@ HRESULT CRide_BboosterBar::Ready_Components(void* pArg) return S_OK; } -CRide_BboosterBar* CRide_BboosterBar::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +CRide_BoosterBar* CRide_BoosterBar::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) { - CRide_BboosterBar* pInstance = new CRide_BboosterBar(pDevice, pContext); + CRide_BoosterBar* pInstance = new CRide_BoosterBar(pDevice, pContext); if (FAILED(pInstance->Initialize_Prototype())) { - MSG_BOX("Failed to Created : CRide_BboosterBar"); + MSG_BOX("Failed to Created : CRide_BoosterBar"); SAFE_RELEASE(pInstance); } return pInstance; } -CGameObject* CRide_BboosterBar::Clone(void* pArg, CGameObject* pOwner) +CGameObject* CRide_BoosterBar::Clone(void* pArg, CGameObject* pOwner) { - CRide_BboosterBar* pInstance = new CRide_BboosterBar(*this); + CRide_BoosterBar* pInstance = new CRide_BoosterBar(*this); pInstance->m_pOwner = pOwner; if (FAILED(pInstance->Initialize(pArg))) { - MSG_BOX("Failed to Cloned : CRide_BboosterBar"); + MSG_BOX("Failed to Cloned : CRide_BoosterBar"); SAFE_RELEASE(pInstance); } return pInstance; } -void CRide_BboosterBar::Free() +void CRide_BoosterBar::Free() { __super::Free(); @@ -333,7 +343,7 @@ void CRide_BboosterBar::Free() } #ifdef _DEBUG -void CRide_BboosterBar::Describe_Entity() +void CRide_BoosterBar::Describe_Entity() { } #endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Ride_Bbooster_Slot.cpp b/Jusin154_Team3D/Client/Private/Ride_Booster_Slot.cpp similarity index 79% rename from Jusin154_Team3D/Client/Private/Ride_Bbooster_Slot.cpp rename to Jusin154_Team3D/Client/Private/Ride_Booster_Slot.cpp index 27f2e36bb..7c1c07873 100644 --- a/Jusin154_Team3D/Client/Private/Ride_Bbooster_Slot.cpp +++ b/Jusin154_Team3D/Client/Private/Ride_Booster_Slot.cpp @@ -1,22 +1,22 @@ #include "pch.h" -#include "Ride_Bbooster_Slot.h" +#include "Ride_Booster_Slot.h" #include "GameInstance.h" -CRide_Bbooster_Slot::CRide_Bbooster_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +CRide_Booster_Slot::CRide_Booster_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) :CElementObject(pDevice, pContext) { } -CRide_Bbooster_Slot::CRide_Bbooster_Slot(const CRide_Bbooster_Slot& rhs) +CRide_Booster_Slot::CRide_Booster_Slot(const CRide_Booster_Slot& rhs) :CElementObject(rhs) { } -HRESULT CRide_Bbooster_Slot::Initialize_Prototype() +HRESULT CRide_Booster_Slot::Initialize_Prototype() { return S_OK; } -HRESULT CRide_Bbooster_Slot::Initialize(void* pArg) +HRESULT CRide_Booster_Slot::Initialize(void* pArg) { CUIObject::UIOBJECT_DESC Desc{}; @@ -44,7 +44,7 @@ HRESULT CRide_Bbooster_Slot::Initialize(void* pArg) return S_OK; } -void CRide_Bbooster_Slot::Priority_Update(_float fTimeDelta) +void CRide_Booster_Slot::Priority_Update(_float fTimeDelta) { if (!__super::Chack_Visible()) { @@ -52,7 +52,7 @@ void CRide_Bbooster_Slot::Priority_Update(_float fTimeDelta) } __super::Priority_Update(fTimeDelta); } -void CRide_Bbooster_Slot::Update(_float fTimeDelta) +void CRide_Booster_Slot::Update(_float fTimeDelta) { if (!__super::Chack_Visible()) { @@ -88,7 +88,7 @@ void CRide_Bbooster_Slot::Update(_float fTimeDelta) __super::Update(fTimeDelta); } -void CRide_Bbooster_Slot::Late_Update(_float fTimeDelta) +void CRide_Booster_Slot::Late_Update(_float fTimeDelta) { if (!__super::Chack_Visible()) { @@ -100,7 +100,7 @@ void CRide_Bbooster_Slot::Late_Update(_float fTimeDelta) } } -HRESULT CRide_Bbooster_Slot::Render() +HRESULT CRide_Booster_Slot::Render() { if (FAILED(Bind_ShaderResources())) { return E_FAIL; @@ -118,12 +118,12 @@ HRESULT CRide_Bbooster_Slot::Render() return S_OK; } -_vector CRide_Bbooster_Slot::Get_WorldPostion() +_vector CRide_Booster_Slot::Get_WorldPostion() { return m_pTransformCom->Get_State(STATE::POSITION); } -HRESULT CRide_Bbooster_Slot::Bind_ShaderResources() +HRESULT CRide_Booster_Slot::Bind_ShaderResources() { if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) { @@ -180,7 +180,7 @@ HRESULT CRide_Bbooster_Slot::Bind_ShaderResources() return S_OK; } -HRESULT CRide_Bbooster_Slot::Ready_Components(void* pArg) +HRESULT CRide_Booster_Slot::Ready_Components(void* pArg) { if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) { @@ -205,33 +205,33 @@ HRESULT CRide_Bbooster_Slot::Ready_Components(void* pArg) return S_OK; } -CRide_Bbooster_Slot* CRide_Bbooster_Slot::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +CRide_Booster_Slot* CRide_Booster_Slot::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) { - CRide_Bbooster_Slot* pInstance = new CRide_Bbooster_Slot(pDevice, pContext); + CRide_Booster_Slot* pInstance = new CRide_Booster_Slot(pDevice, pContext); if (FAILED(pInstance->Initialize_Prototype())) { - MSG_BOX("Failed to Created : CRide_Bbooster_Slot"); + MSG_BOX("Failed to Created : CRide_Booster_Slot"); SAFE_RELEASE(pInstance); } return pInstance; } -CGameObject* CRide_Bbooster_Slot::Clone(void* pArg, CGameObject* pOwner) +CGameObject* CRide_Booster_Slot::Clone(void* pArg, CGameObject* pOwner) { - CRide_Bbooster_Slot* pInstance = new CRide_Bbooster_Slot(*this); + CRide_Booster_Slot* pInstance = new CRide_Booster_Slot(*this); pInstance->m_pOwner = pOwner; if (FAILED(pInstance->Initialize(pArg))) { - MSG_BOX("Failed to Cloned : CRide_Bbooster_Slot"); + MSG_BOX("Failed to Cloned : CRide_Booster_Slot"); SAFE_RELEASE(pInstance); } return pInstance; } -void CRide_Bbooster_Slot::Free() +void CRide_Booster_Slot::Free() { __super::Free(); @@ -243,7 +243,7 @@ void CRide_Bbooster_Slot::Free() } #ifdef _DEBUG -void CRide_Bbooster_Slot::Describe_Entity() +void CRide_Booster_Slot::Describe_Entity() { } #endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Ride_Panel.cpp b/Jusin154_Team3D/Client/Private/Ride_Panel.cpp index 7d5e9cb5d..9c7a6276c 100644 --- a/Jusin154_Team3D/Client/Private/Ride_Panel.cpp +++ b/Jusin154_Team3D/Client/Private/Ride_Panel.cpp @@ -4,10 +4,11 @@ #include "Ride_Info_Key.h" #include "Ride_Info.h" #include "Ride_InfoBG.h" -#include "Ride_Bbooster_Slot.h" -#include "Ride_BboosterBar.h" +#include "Ride_Booster_Slot.h" +#include "Ride_BoosterBar.h" #include "Ride_HpBar.h" #include "Ride_HpSlot.h" +#include "InfoInstance.h" CRide_Panel::CRide_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) :CPanelObject(pDevice, pContext) @@ -15,7 +16,9 @@ CRide_Panel::CRide_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) } CRide_Panel::CRide_Panel(const CRide_Panel& rhs) - :CPanelObject(rhs) + :CPanelObject(rhs), + m_pInfoInstance(CInfoInstance::GetInstance()) + { } @@ -57,9 +60,21 @@ HRESULT CRide_Panel::Initialize(void* pArg) m_vLerp_Position = _float4(1750.f, m_fY, 0.f, 1.f); static_cast(m_pRide_Info)->Visible(false); static_cast(m_pRide_InfoBG)->Visible(false); + m_pInfoInstance->Add_Event(TEXT("BroomBooster"), [this](void* p) {this->Booster(*reinterpret_cast<_bool*>(p)); }); return S_OK; } +void CRide_Panel::Booster(_bool bBooster) +{ + m_bBooster = bBooster; + static_cast(m_pRide_BoosterBar)->Booster(m_bBooster); +} + +void CRide_Panel::Set_Gauge() +{ + static_cast(m_pRide_BoosterBar)->Set_Gauge(m_pInfoInstance->Get_Broom_Booster_Timer()); +} + void CRide_Panel::Priority_Update(_float fTimeDelta) { if (!__super::Chack_Visible()) @@ -124,6 +139,8 @@ void CRide_Panel::Update(_float fTimeDelta) static_cast(m_pRide_InfoBG)->Set_Hover(true); } + Set_Gauge(); + __super::Update(fTimeDelta); } @@ -168,43 +185,43 @@ HRESULT CRide_Panel::Ready_Components(void* pArg) HRESULT CRide_Panel::Ready_Element(void* pArg) { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_InfoBG)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_InfoBG)))) { return E_FAIL; } Add_Element(TEXT("Ride_InfoBG"), m_pRide_InfoBG); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_Info_Key)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_Info_Key)))) { return E_FAIL; } Add_Element(TEXT("Ride_Info_Key"), m_pRide_Info_Key); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_Info)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_Info)))) { return E_FAIL; } Add_Element(TEXT("Ride_Info"), m_pRide_Info); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_Bbooster_Slot)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_Booster_Slot)))) { return E_FAIL; } - Add_Element(TEXT("Ride_Bbooster_Slot"), m_pRide_Bbooster_Slot); + Add_Element(TEXT("Ride_Bbooster_Slot"), m_pRide_Booster_Slot); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_BboosterBar)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_BoosterBar)))) { return E_FAIL; } - Add_Element(TEXT("Ride_BboosterBar"), m_pRide_BboosterBar); + Add_Element(TEXT("Ride_BboosterBar"), m_pRide_BoosterBar); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_HpBar)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_HpBar)))) { return E_FAIL; } Add_Element(TEXT("Ride_HpBar"), m_pRide_HpBar); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_HpSlot)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_HpSlot)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/SpellLearn_Canvas.cpp b/Jusin154_Team3D/Client/Private/SpellLearn_Canvas.cpp index 36d8e4dd0..3fd849dcf 100644 --- a/Jusin154_Team3D/Client/Private/SpellLearn_Canvas.cpp +++ b/Jusin154_Team3D/Client/Private/SpellLearn_Canvas.cpp @@ -87,7 +87,7 @@ HRESULT CSpellLearn_Canvas::Ready_Components(void* pArg) HRESULT CSpellLearn_Canvas::Ready_Panel(void* pArg) { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pSpellLearn_Panel)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pSpellLearn_Panel)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/SpellLearn_Panel.cpp b/Jusin154_Team3D/Client/Private/SpellLearn_Panel.cpp index 71b6b8009..d16532b7c 100644 --- a/Jusin154_Team3D/Client/Private/SpellLearn_Panel.cpp +++ b/Jusin154_Team3D/Client/Private/SpellLearn_Panel.cpp @@ -303,37 +303,37 @@ HRESULT CSpellLearn_Panel::Ready_Components(void* pArg) HRESULT CSpellLearn_Panel::Ready_Element(void* pArg) { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_Name)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_Name)))) { return E_FAIL; } Add_Element(TEXT("SpellLearn_Name"), m_pSpellLearn_Name); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn)))) { return E_FAIL; } Add_Element(TEXT("SpellLearn"), m_pSpellLearn); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_MovePointer)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_MovePointer)))) { return E_FAIL; } Add_Element(TEXT("SpellLearn_MovePointer"), m_pSpellLearn_MovePointer); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_ChaserPointer)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_ChaserPointer)))) { return E_FAIL; } Add_Element(TEXT("SPellLeam_ChaserPointer"), m_pSpellLearn_ChaserPointer); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_Slot)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_Slot)))) { return E_FAIL; } Add_Element(TEXT("SpellLearn_Slot"), m_pSpellLearn_Slot); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_Overlay)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_Overlay)))) { return E_FAIL; } @@ -341,7 +341,7 @@ HRESULT CSpellLearn_Panel::Ready_Element(void* pArg) for (_int i = 0; i < 3; ++i) { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_Booster)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_Booster)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/Spell_Canvas.cpp b/Jusin154_Team3D/Client/Private/Spell_Canvas.cpp index 756b5f9af..50f88e5ba 100644 --- a/Jusin154_Team3D/Client/Private/Spell_Canvas.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_Canvas.cpp @@ -86,7 +86,7 @@ HRESULT CSpell_Canvas::Ready_Components(void* pArg) HRESULT CSpell_Canvas::Ready_Panel(void* pArg) { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pSpell_Panel)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pSpell_Panel)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/Spell_Panel.cpp b/Jusin154_Team3D/Client/Private/Spell_Panel.cpp index 4d1ad1088..3decb0b0a 100644 --- a/Jusin154_Team3D/Client/Private/Spell_Panel.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_Panel.cpp @@ -240,91 +240,91 @@ HRESULT CSpell_Panel::Ready_Components(void* pArg) HRESULT CSpell_Panel::Ready_Element(void* pArg) { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pCurrent_Spell_Slot)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pCurrent_Spell_Slot)))) { return E_FAIL; } Add_Element(TEXT("Current_Spell_Slot"), m_pCurrent_Spell_Slot); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_List)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_List)))) { return E_FAIL; } Add_Element(TEXT("Spell_List"), m_pSpell_List); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pEessential_Spell_Slot)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pEessential_Spell_Slot)))) { return E_FAIL; } Add_Element(TEXT("Eessential_Spell_Slot"), m_pEessential_Spell_Slot); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pEessential_Spell)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pEessential_Spell)))) { return E_FAIL; } Add_Element(TEXT("Eessential_Spell"), m_pEessential_Spell); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_List_Image)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_List_Image)))) { return E_FAIL; } Add_Element(TEXT("Spell_List_Image"), m_pSpell_List_Image); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_State)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_State)))) { return E_FAIL; } Add_Element(TEXT("Spell_State"), m_pSpell_State); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Hover)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Hover)))) { return E_FAIL; } Add_Element(TEXT("Spell_Hover"), m_pSpell_Hover); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Hover_Effect)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Hover_Effect)))) { return E_FAIL; } Add_Element(TEXT("Spell_Hover_Effect"), m_pSpell_Hover_Effect); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Preview)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Preview)))) { return E_FAIL; } Add_Element(TEXT("Spell_Preview"), m_pSpell_Preview); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Vidio_Border)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Vidio_Border)))) { return E_FAIL; } Add_Element(TEXT("Spell_Vidio_Border"), m_pSpell_Vidio_Border); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pCurrent_Slot_Number)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pCurrent_Slot_Number)))) { return E_FAIL; } Add_Element(TEXT("Current_Slot_Number"), m_pCurrent_Slot_Number); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Header)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Header)))) { return E_FAIL; } Add_Element(TEXT("Spell_Header"), m_pSpell_Header); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Header_Line)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Header_Line)))) { return E_FAIL; } Add_Element(TEXT("Spell_Header_Line"), m_pSpell_Header_Line); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Anim)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Anim)))) { return E_FAIL; } Add_Element(TEXT("Spell_Anim"), m_pSpell_Anim); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Drag)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Drag)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/UI_Manager.cpp b/Jusin154_Team3D/Client/Private/UI_Manager.cpp index fda823657..4d45f7164 100644 --- a/Jusin154_Team3D/Client/Private/UI_Manager.cpp +++ b/Jusin154_Team3D/Client/Private/UI_Manager.cpp @@ -58,6 +58,7 @@ HRESULT CUI_Manager::Initialize(void* pArg) m_fSortZ = 0.f; m_pInfoInstance->Set_UISTATE(m_eType); m_pInfoInstance->Add_Event(TEXT("Canvas_Change"), [this](void* p) {this->Canvas_Change(*reinterpret_cast(p)); }); + m_pInfoInstance->Add_Event(TEXT("NpcInteract"), [this](void* p) {this->NpcInteract(*reinterpret_cast<_bool*>(p)); }); return S_OK; } @@ -74,6 +75,10 @@ void CUI_Manager::Canvas_Change(UI_STATE eType) static_cast(m_pSpell_Canvas)->Visible(false); static_cast(m_pQuest_Canvas)->Visible(false); static_cast(m_pSpellLearn_Canvas)->Visible(false); + static_cast(m_pInteraction_Key)->Set_Visible(true); + static_cast(m_pNPCInteraction)->Set_Visible(true); + static_cast(m_pBroom_TargetGate)->Set_Visible(true); + static_cast(m_pDamage_Font)->Set_Visible(true); break; case UI_STATE::SPELL: @@ -100,6 +105,19 @@ void CUI_Manager::Canvas_Change(UI_STATE eType) static_cast(m_pGamePlay_Canves)->Visible(false); break; + case UI_STATE::NPC_INTERACT: + m_pMouse_Cursor->Set_Visible(false); + m_pCamera_LockOn->Set_Visible(false); + static_cast(m_pGamePlay_Canves)->Visible(false); + static_cast(m_pSpell_Canvas)->Visible(false); + static_cast(m_pQuest_Canvas)->Visible(false); + static_cast(m_pSpellLearn_Canvas)->Visible(false); + static_cast(m_pInteraction_Key)->Set_Visible(false); + static_cast(m_pNPCInteraction)->Set_Visible(false); + static_cast(m_pBroom_TargetGate)->Set_Visible(false); + static_cast(m_pDamage_Font)->Set_Visible(false); + break; + default: return; } @@ -152,6 +170,7 @@ void CUI_Manager::Update(_float fTimeDelta) if (m_bActive == false) { m_bActive = true; + m_bAlphaZero = true; if (m_eType == UI_STATE::GAMEPLAYER) { m_eType = UI_STATE::QUEST; @@ -164,6 +183,7 @@ void CUI_Manager::Update(_float fTimeDelta) } } } + if (m_eType == UI_STATE::GAMEPLAYER || m_eType == UI_STATE::SPELLLNEARN) { if (m_pGameInstance->Key_Down(DIK_ESCAPE)) @@ -171,6 +191,7 @@ void CUI_Manager::Update(_float fTimeDelta) if (m_bActive == false) { m_bActive = true; + m_bAlphaZero = true; if (m_eType == UI_STATE::GAMEPLAYER) { m_eType = UI_STATE::SPELLLNEARN; @@ -183,6 +204,27 @@ void CUI_Manager::Update(_float fTimeDelta) } } + if (m_eType == UI_STATE::GAMEPLAYER && m_bNPCInteract == true) + { + if (m_eType == UI_STATE::GAMEPLAYER) + { + Canvas_Change(UI_STATE::NPC_INTERACT); + } + + else + { + if (m_bActive == false) + { + m_bActive = true; + m_bAlphaZero = true; + if (m_eType == UI_STATE::GAMEPLAYER) + { + m_eType = UI_STATE::NPC_INTERACT; + } + } + } + } + if (m_bActive == true && m_bHover == false) { if (m_fAlpha <= 1.f) @@ -190,8 +232,9 @@ void CUI_Manager::Update(_float fTimeDelta) m_fAlpha += fTimeDelta * m_fAlphaTime; } - if (m_fAlpha > 1.f) + if (m_fAlpha > 1.f && m_bAlphaZero == true) { + m_bAlphaZero = false; m_fAlpha = 1.f; m_bFadeIn = true; Canvas_Change(m_eType); @@ -322,6 +365,11 @@ HRESULT CUI_Manager::Ready_Components(void* pArg) } Add_Canvas(TEXT("Quest_Canvas"), m_pQuest_Canvas); + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_Canvas)))) { + return E_FAIL; + } + Add_Canvas(TEXT("SpellLearn_Canvas"), m_pSpellLearn_Canvas); + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMouse_Cursor)))) { return E_FAIL; } @@ -352,12 +400,7 @@ HRESULT CUI_Manager::Ready_Components(void* pArg) } Add_Canvas(TEXT("NPCInteraction"), m_pNPCInteraction); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_Canvas)))) { - return E_FAIL; - } - Add_Canvas(TEXT("SpellLearn_Canvas"), m_pSpellLearn_Canvas); - - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pBroom_TargetGate)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast (&m_pBroom_TargetGate)))) { return E_FAIL; } @@ -393,6 +436,11 @@ CGameObject* CUI_Manager::Find_Canvas(const _wstring& Name) return iter->second; } +void CUI_Manager::NpcInteract(_bool bInteract) +{ + m_bNPCInteract = bInteract; +} + CUI_Manager* CUI_Manager::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) { CUI_Manager* pInstance = new CUI_Manager(pDevice, pContext); diff --git a/Jusin154_Team3D/Client/Public/Action_Panel.h b/Jusin154_Team3D/Client/Public/Action_Panel.h index eeaa2609b..3fb8710b9 100644 --- a/Jusin154_Team3D/Client/Public/Action_Panel.h +++ b/Jusin154_Team3D/Client/Public/Action_Panel.h @@ -74,6 +74,7 @@ class CAction_Panel final : public CPanelObject CGameObject* m_pMagic_Item = { nullptr }; vector m_Magic_Meters; + //vector m_pSlot; public: static CAction_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); diff --git a/Jusin154_Team3D/Client/Public/Client_Enum.h b/Jusin154_Team3D/Client/Public/Client_Enum.h index 373602168..3b33f5275 100644 --- a/Jusin154_Team3D/Client/Public/Client_Enum.h +++ b/Jusin154_Team3D/Client/Public/Client_Enum.h @@ -36,7 +36,7 @@ namespace Client PLAYER_HAIR_DAOTHV_ToSRO, PLAYER_Suit_DSRON_ToSRO, PLAYER_EyeLash_DAOTHV_ToSRO, PLAYER_Eye_ToSRO, PLAYER_Robe_ToMRO, SHADOW, SHADOW_LEGACY , END }; - enum class UI_STATE { GAMEPLAYER, SPELL, QUEST, INVENTORY, SPELLLNEARN, END }; + enum class UI_STATE { GAMEPLAYER, SPELL, QUEST, INVENTORY, SPELLLNEARN, NPC_INTERACT, END }; enum class QUESTTYPE { MAIN, SUB, END }; enum class QUESTSTATE {NONE, ACCEPTED, CLEARED, END }; diff --git a/Jusin154_Team3D/Client/Public/Client_Struct.h b/Jusin154_Team3D/Client/Public/Client_Struct.h index e202943a2..f397d777f 100644 --- a/Jusin154_Team3D/Client/Public/Client_Struct.h +++ b/Jusin154_Team3D/Client/Public/Client_Struct.h @@ -55,8 +55,9 @@ namespace Client typedef struct NpcDialogue { + _wstring pNpcName; _int iNpcID{}; - vector Info; + unordered_map<_int, CURRENTDIALOGUEINFO> Info; }NPCDIALOGUEINFO; typedef struct tagLockOnInfo { @@ -69,7 +70,9 @@ namespace Client { CGameObject* pOwner = { nullptr }; _wstring pNPCName; - _float4 pNPCPosition{}; + _wstring pName; + _float4 fNPCPosition{}; + _int iTextID{}; }NPCINTERACTIONINFO; typedef struct tagUnitInfo diff --git a/Jusin154_Team3D/Client/Public/Dialogue_Data.h b/Jusin154_Team3D/Client/Public/Dialogue_Data.h index a9abb91a3..0e33c3d1e 100644 --- a/Jusin154_Team3D/Client/Public/Dialogue_Data.h +++ b/Jusin154_Team3D/Client/Public/Dialogue_Data.h @@ -25,14 +25,14 @@ class CDialogue_Data final : public CBase HRESULT Load_SpellInfo(const _char* pFilePath); public: - const NPCDIALOGUEINFO& Get_Info(_uint DialogueID) const; + const NPCDIALOGUEINFO& Get_Info(_wstring NpcName) const; private: CInfoInstance* m_pInfoInstance = { nullptr }; _int m_iDialogue_Count{}; - vector m_DialogueInfo; - + map<_wstring, NPCDIALOGUEINFO> m_DialogueInfo; + NPCDIALOGUEINFO Dummy{}; private: HRESULT Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex); diff --git a/Jusin154_Team3D/Client/Public/Dialogue_Font.h b/Jusin154_Team3D/Client/Public/Dialogue_Font.h index 6257c3ead..0f36f010b 100644 --- a/Jusin154_Team3D/Client/Public/Dialogue_Font.h +++ b/Jusin154_Team3D/Client/Public/Dialogue_Font.h @@ -41,6 +41,10 @@ class CDialogue_Font final : public CGameObject public: void Add_Text(void* pArg); +private: + void NpcInfo(void* pArg); + void NpcInteract(_bool bInteract); + private: CInfoInstance* m_pInfoInstance = { nullptr }; @@ -49,6 +53,11 @@ class CDialogue_Font final : public CGameObject vector m_DialoguInfo; deque m_pCurrentDialogue; + _bool m_bNpcInteract = { false }; + _bool m_bCurrentInteract = { false }; + _wstring m_pNpcName; + _int m_iTextID{}; + public: static CDialogue_Font* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Client/Public/InfoInstance.h b/Jusin154_Team3D/Client/Public/InfoInstance.h index db4f62a8f..e7a51c7c7 100644 --- a/Jusin154_Team3D/Client/Public/InfoInstance.h +++ b/Jusin154_Team3D/Client/Public/InfoInstance.h @@ -86,7 +86,8 @@ DECLARE_SINGLETON(CInfoInstance) _int Get_SpellLearnIndex(); #pragma endregion #pragma region Dialogue_Font - void Set_Font(void* pArg); + //void Set_Font(void* pArg); + const NPCDIALOGUEINFO& Get_Dialogue(_wstring NpcName) const; #pragma endregion HRESULT Regist_ActiveInteractive(class CMapElement_Interactable* pInteractive); HRESULT Deregist_ActiveInteractive(class CMapElement_Interactable* pInteractive); @@ -96,6 +97,8 @@ DECLARE_SINGLETON(CInfoInstance) #pragma region BroomManager void Set_Broom_Timer(_float fTimer); _float Get_Broom_Timer(); + void Set_Broom_Booster_Timer(_float fTimer); + _float Get_Broom_Booster_Timer(); #pragma endregion private: CGameInstance* m_pGameInstance = { nullptr }; @@ -111,6 +114,7 @@ DECLARE_SINGLETON(CInfoInstance) class CDamage_Font* m_pDamage_Font = { nullptr }; class CSpellLearn_Data* m_pSpellLearn_Data = { nullptr }; class CDialogue_Font* m_pDialogue_Font = { nullptr }; + class CDialogue_Data* m_pDialogue_Data = { nullptr }; _vector m_pPlayerPos{}; @@ -118,6 +122,7 @@ DECLARE_SINGLETON(CInfoInstance) _int m_eSpell = ENUM_CLASS(SKILL_TYPE::END); _float m_fBroom_Timer{}; + _float m_fBroom_Booster{}; _float m_fDamage{}; UI_STATE m_eUI_State = { UI_STATE::END }; diff --git a/Jusin154_Team3D/Client/Public/NPC_Ollivander.h b/Jusin154_Team3D/Client/Public/NPC_Ollivander.h index ae5211035..1657e9d20 100644 --- a/Jusin154_Team3D/Client/Public/NPC_Ollivander.h +++ b/Jusin154_Team3D/Client/Public/NPC_Ollivander.h @@ -26,6 +26,9 @@ class CNPC_Ollivander final : public CUnit virtual HRESULT Render_Shadow(SHADOW eType) override; virtual void OnRayCollision(CGameObject* pCaster, _uint iCastedOrder, _float fDistance, _float3 vCastedWorldPos)override; virtual _wstring Get_Name() override; + virtual _wstring Get_NpcName() override; + void Set_TextID(_int ID) { m_iNpc_DialogueTextID = ID; } + virtual _int Get_TextID() override; protected: CInfoInstance* m_pInfoInstance = { nullptr }; @@ -34,6 +37,8 @@ class CNPC_Ollivander final : public CUnit CNPC_Ollivander* m_pNPC_Ollivander = { nullptr }; class CNPCInteraction* m_pNPCInteraction = { nullptr }; + _int m_iNpc_DialogueTextID{}; + CNPCStat* m_pNpcStat = { nullptr }; _int m_iEntered = { 0 }; diff --git a/Jusin154_Team3D/Client/Public/Ride_BboosterBar.h b/Jusin154_Team3D/Client/Public/Ride_BoosterBar.h similarity index 77% rename from Jusin154_Team3D/Client/Public/Ride_BboosterBar.h rename to Jusin154_Team3D/Client/Public/Ride_BoosterBar.h index 345927288..8ff3509e4 100644 --- a/Jusin154_Team3D/Client/Public/Ride_BboosterBar.h +++ b/Jusin154_Team3D/Client/Public/Ride_BoosterBar.h @@ -11,12 +11,12 @@ NS_END NS_BEGIN(Client) -class CRide_BboosterBar final : public CElementObject +class CRide_BoosterBar final : public CElementObject { private: - CRide_BboosterBar(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); - CRide_BboosterBar(const CRide_BboosterBar& rhs); - virtual ~CRide_BboosterBar() = default; + CRide_BoosterBar(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CRide_BoosterBar(const CRide_BoosterBar& rhs); + virtual ~CRide_BoosterBar() = default; public: virtual void Priority_Update(_float fTimeDelta); @@ -35,6 +35,10 @@ class CRide_BboosterBar final : public CElementObject void Active(_float fTimeDelta); void NonActive(_float fTimeDelta); +public: + void Set_Gauge(_float fTime); + void Booster(_bool bBooster); + private: CTexture* m_pDiffuse_TextureCom = { nullptr }; CTexture* m_pDiffuse_TextureCom1 = { nullptr }; @@ -54,8 +58,10 @@ class CRide_BboosterBar final : public CElementObject _int m_iClick{}; + _bool m_bBooster = { false }; + public: - static CRide_BboosterBar* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + static CRide_BoosterBar* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; virtual void Free() override; #ifdef _DEBUG diff --git a/Jusin154_Team3D/Client/Public/Ride_Bbooster_Slot.h b/Jusin154_Team3D/Client/Public/Ride_Booster_Slot.h similarity index 77% rename from Jusin154_Team3D/Client/Public/Ride_Bbooster_Slot.h rename to Jusin154_Team3D/Client/Public/Ride_Booster_Slot.h index 2288ec2d2..dabe50c7e 100644 --- a/Jusin154_Team3D/Client/Public/Ride_Bbooster_Slot.h +++ b/Jusin154_Team3D/Client/Public/Ride_Booster_Slot.h @@ -11,12 +11,12 @@ NS_END NS_BEGIN(Client) -class CRide_Bbooster_Slot final : public CElementObject +class CRide_Booster_Slot final : public CElementObject { private: - CRide_Bbooster_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); - CRide_Bbooster_Slot(const CRide_Bbooster_Slot& rhs); - virtual ~CRide_Bbooster_Slot() = default; + CRide_Booster_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CRide_Booster_Slot(const CRide_Booster_Slot& rhs); + virtual ~CRide_Booster_Slot() = default; public: virtual void Priority_Update(_float fTimeDelta); @@ -41,7 +41,7 @@ class CRide_Bbooster_Slot final : public CElementObject _float4 m_fImagePosi{}; public: - static CRide_Bbooster_Slot* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + static CRide_Booster_Slot* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; virtual void Free() override; #ifdef _DEBUG diff --git a/Jusin154_Team3D/Client/Public/Ride_Panel.h b/Jusin154_Team3D/Client/Public/Ride_Panel.h index 523f1ac7a..3c07eaad2 100644 --- a/Jusin154_Team3D/Client/Public/Ride_Panel.h +++ b/Jusin154_Team3D/Client/Public/Ride_Panel.h @@ -30,16 +30,24 @@ class CRide_Panel final : public CPanelObject virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; -private: - CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; +public: + void Booster(_bool bBooster); + void Set_Gauge(); + +private: + CInfoInstance* m_pInfoInstance = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + CGameObject* m_pRide_Info_Key = { nullptr }; + CGameObject* m_pRide_InfoBG = { nullptr }; + CGameObject* m_pRide_Info = { nullptr }; + CGameObject* m_pRide_Booster_Slot = { nullptr }; + CGameObject* m_pRide_BoosterBar = { nullptr }; + CGameObject* m_pRide_HpBar = { nullptr }; + CGameObject* m_pRide_HpSlot = { nullptr }; + + _bool m_bBooster = { false }; + _float m_fBoosterTimer{}; - CGameObject* m_pRide_Info_Key = { nullptr }; - CGameObject* m_pRide_InfoBG = { nullptr }; - CGameObject* m_pRide_Info = { nullptr }; - CGameObject* m_pRide_Bbooster_Slot = { nullptr }; - CGameObject* m_pRide_BboosterBar = { nullptr }; - CGameObject* m_pRide_HpBar = { nullptr }; - CGameObject* m_pRide_HpSlot = { nullptr }; public: static CRide_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Client/Public/UI_Manager.h b/Jusin154_Team3D/Client/Public/UI_Manager.h index 8c47fe56e..3f7fb53a7 100644 --- a/Jusin154_Team3D/Client/Public/UI_Manager.h +++ b/Jusin154_Team3D/Client/Public/UI_Manager.h @@ -45,6 +45,8 @@ class CUI_Manager final : public CUIObject void Add_Canvas(_wstring Name, class CGameObject* pCanvas); CGameObject* Find_Canvas(const _wstring& Name); + void NpcInteract(_bool bInteract); + private: CInfoInstance* m_pInfoInstance = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; @@ -76,6 +78,10 @@ class CUI_Manager final : public CUIObject _bool m_bCgangede = { false }; _bool m_bSpellLearn = { false }; + _bool m_bNPCInteract = { false }; + + _bool m_bAlphaZero = { false }; + public: static CUI_Manager* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Dialogue/Dialogue.xml b/Jusin154_Team3D/Editor/Bin/Resources/Data/Dialogue/Dialogue.xml index d49d0319b..bf2fec570 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Dialogue/Dialogue.xml +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Dialogue/Dialogue.xml @@ -1,11 +1,59 @@  - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Stat/NpcStat.xml b/Jusin154_Team3D/Editor/Bin/Resources/Data/Stat/NpcStat.xml index 364c376e4..35c8645be 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Stat/NpcStat.xml +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Stat/NpcStat.xml @@ -1,12 +1,12 @@  - - - - - - - - - + + + + + + + + + \ No newline at end of file diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj b/Jusin154_Team3D/Editor/Default/Editor.vcxproj index f6306c34a..b39779bd1 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj @@ -220,8 +220,8 @@ call Update_Shaders.bat - - + + @@ -494,8 +494,8 @@ call Update_Shaders.bat - - + + diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters index c6cf5fb68..8b296e780 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters @@ -637,12 +637,6 @@ {8ada79e8-727c-40c3-95dc-ce34b8924e69} - - {906987cf-14ce-4676-8ca7-a68b6b2c29b6} - - - {12d83369-3413-478f-920e-c3c0ddeabfe8} - {353f9458-6fe9-4159-a1c6-1f3a85cffda9} @@ -751,6 +745,12 @@ {d276d751-77aa-423e-9499-c63875e36266} + + {906987cf-14ce-4676-8ca7-a68b6b2c29b6} + + + {12d83369-3413-478f-920e-c3c0ddeabfe8} + @@ -1497,11 +1497,11 @@ 50.UI\GamePlay_Canvas\Ride_Panel\Ride_HpBar - - 50.UI\GamePlay_Canvas\Ride_Panel\Ride_Bbooster_Slot + + 50.UI\GamePlay_Canvas\Ride_Panel\Ride_Booster_Slot - - 50.UI\GamePlay_Canvas\Ride_Panel\Ride_BboosterBar + + 50.UI\GamePlay_Canvas\Ride_Panel\Ride_BoosterBar 50.UI\GamePlay_Canvas\Ride_Panel\Ride_HpSlot @@ -2275,11 +2275,11 @@ 50.UI\GamePlay_Canvas\Ride_Panel\Ride_HpBar - - 50.UI\GamePlay_Canvas\Ride_Panel\Ride_Bbooster_Slot + + 50.UI\GamePlay_Canvas\Ride_Panel\Ride_Booster_Slot - - 50.UI\GamePlay_Canvas\Ride_Panel\Ride_BboosterBar + + 50.UI\GamePlay_Canvas\Ride_Panel\Ride_BoosterBar 50.UI\GamePlay_Canvas\Ride_Panel\Ride_HpSlot diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp index c125b1433..95d1cfca6 100644 --- a/Jusin154_Team3D/Editor/Private/Loader.cpp +++ b/Jusin154_Team3D/Editor/Private/Loader.cpp @@ -139,8 +139,8 @@ #include "Ride_Info_Key.h" #include "Ride_Info.h" #include "Ride_InfoBG.h" -#include "Ride_Bbooster_Slot.h" -#include "Ride_BboosterBar.h" +#include "Ride_Booster_Slot.h" +#include "Ride_BoosterBar.h" #include "Ride_HpBar.h" #include "Ride_HpSlot.h" @@ -1238,11 +1238,11 @@ HRESULT CLoader::Loading_For_UI() { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRide_Bbooster_Slot::Create(m_pDevice, m_pContext)))) + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRide_Booster_Slot::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRide_BboosterBar::Create(m_pDevice, m_pContext)))) + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRide_BoosterBar::Create(m_pDevice, m_pContext)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Editor/Private/Ride_BboosterBar.cpp b/Jusin154_Team3D/Editor/Private/Ride_BoosterBar.cpp similarity index 83% rename from Jusin154_Team3D/Editor/Private/Ride_BboosterBar.cpp rename to Jusin154_Team3D/Editor/Private/Ride_BoosterBar.cpp index 7e1c71227..bea793fdb 100644 --- a/Jusin154_Team3D/Editor/Private/Ride_BboosterBar.cpp +++ b/Jusin154_Team3D/Editor/Private/Ride_BoosterBar.cpp @@ -1,23 +1,23 @@ #include "pch.h" -#include "Ride_BboosterBar.h" +#include "Ride_BoosterBar.h" #include "GameInstance.h" -CRide_BboosterBar::CRide_BboosterBar(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +CRide_BoosterBar::CRide_BoosterBar(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) :CElementObject(pDevice, pContext) { } -CRide_BboosterBar::CRide_BboosterBar(const CRide_BboosterBar& rhs) +CRide_BoosterBar::CRide_BoosterBar(const CRide_BoosterBar& rhs) :CElementObject(rhs) { } -HRESULT CRide_BboosterBar::Initialize_Prototype() +HRESULT CRide_BoosterBar::Initialize_Prototype() { return S_OK; } -HRESULT CRide_BboosterBar::Initialize(void* pArg) +HRESULT CRide_BoosterBar::Initialize(void* pArg) { CUIObject::UIOBJECT_DESC Desc{}; @@ -52,17 +52,17 @@ HRESULT CRide_BboosterBar::Initialize(void* pArg) return S_OK; } -void CRide_BboosterBar::Active(_float fTimeDelta) +void CRide_BoosterBar::Active(_float fTimeDelta) { m_fCurrentGauge = CMyTools::Lerp_f1D(m_fCurrentGauge, m_fTargetGauge, fTimeDelta * m_fMoveSpeed); } -void CRide_BboosterBar::NonActive(_float fTimeDelta) +void CRide_BoosterBar::NonActive(_float fTimeDelta) { m_fCurrentGauge = CMyTools::Lerp_f1D(m_fTargetGauge, m_fCurrentGauge, fTimeDelta * m_fMoveSpeed); } -void CRide_BboosterBar::Priority_Update(_float fTimeDelta) +void CRide_BoosterBar::Priority_Update(_float fTimeDelta) { if (!__super::Chack_Visible()) { @@ -71,7 +71,7 @@ void CRide_BboosterBar::Priority_Update(_float fTimeDelta) __super::Priority_Update(fTimeDelta); } -void CRide_BboosterBar::Update(_float fTimeDelta) +void CRide_BoosterBar::Update(_float fTimeDelta) { if (!__super::Chack_Visible()) { @@ -150,7 +150,7 @@ void CRide_BboosterBar::Update(_float fTimeDelta) __super::Update(fTimeDelta); } -void CRide_BboosterBar::Late_Update(_float fTimeDelta) +void CRide_BoosterBar::Late_Update(_float fTimeDelta) { if (!__super::Chack_Visible()) { @@ -162,7 +162,7 @@ void CRide_BboosterBar::Late_Update(_float fTimeDelta) } } -HRESULT CRide_BboosterBar::Render() +HRESULT CRide_BoosterBar::Render() { if (FAILED(Bind_ShaderResources())) { return E_FAIL; @@ -180,12 +180,12 @@ HRESULT CRide_BboosterBar::Render() return S_OK; } -_vector CRide_BboosterBar::Get_WorldPostion() +_vector CRide_BoosterBar::Get_WorldPostion() { return m_pTransformCom->Get_State(STATE::POSITION); } -HRESULT CRide_BboosterBar::Bind_ShaderResources() +HRESULT CRide_BoosterBar::Bind_ShaderResources() { if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) { @@ -270,7 +270,7 @@ HRESULT CRide_BboosterBar::Bind_ShaderResources() return S_OK; } -HRESULT CRide_BboosterBar::Ready_Components(void* pArg) +HRESULT CRide_BoosterBar::Ready_Components(void* pArg) { if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) { @@ -295,33 +295,33 @@ HRESULT CRide_BboosterBar::Ready_Components(void* pArg) return S_OK; } -CRide_BboosterBar* CRide_BboosterBar::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +CRide_BoosterBar* CRide_BoosterBar::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) { - CRide_BboosterBar* pInstance = new CRide_BboosterBar(pDevice, pContext); + CRide_BoosterBar* pInstance = new CRide_BoosterBar(pDevice, pContext); if (FAILED(pInstance->Initialize_Prototype())) { - MSG_BOX("Failed to Created : CRide_BboosterBar"); + MSG_BOX("Failed to Created : CRide_BoosterBar"); SAFE_RELEASE(pInstance); } return pInstance; } -CGameObject* CRide_BboosterBar::Clone(void* pArg, CGameObject* pOwner) +CGameObject* CRide_BoosterBar::Clone(void* pArg, CGameObject* pOwner) { - CRide_BboosterBar* pInstance = new CRide_BboosterBar(*this); + CRide_BoosterBar* pInstance = new CRide_BoosterBar(*this); pInstance->m_pOwner = pOwner; if (FAILED(pInstance->Initialize(pArg))) { - MSG_BOX("Failed to Cloned : CRide_BboosterBar"); + MSG_BOX("Failed to Cloned : CRide_BoosterBar"); SAFE_RELEASE(pInstance); } return pInstance; } -void CRide_BboosterBar::Free() +void CRide_BoosterBar::Free() { __super::Free(); @@ -332,6 +332,6 @@ void CRide_BboosterBar::Free() SAFE_RELEASE(m_pVIBufferCom); } -void CRide_BboosterBar::Describe_Entity() +void CRide_BoosterBar::Describe_Entity() { } diff --git a/Jusin154_Team3D/Editor/Private/Ride_Bbooster_Slot.cpp b/Jusin154_Team3D/Editor/Private/Ride_Booster_Slot.cpp similarity index 79% rename from Jusin154_Team3D/Editor/Private/Ride_Bbooster_Slot.cpp rename to Jusin154_Team3D/Editor/Private/Ride_Booster_Slot.cpp index 4710d7fee..18e84498f 100644 --- a/Jusin154_Team3D/Editor/Private/Ride_Bbooster_Slot.cpp +++ b/Jusin154_Team3D/Editor/Private/Ride_Booster_Slot.cpp @@ -1,22 +1,22 @@ #include "pch.h" -#include "Ride_Bbooster_Slot.h" +#include "Ride_Booster_Slot.h" #include "GameInstance.h" -CRide_Bbooster_Slot::CRide_Bbooster_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +CRide_Booster_Slot::CRide_Booster_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) :CElementObject(pDevice, pContext) { } -CRide_Bbooster_Slot::CRide_Bbooster_Slot(const CRide_Bbooster_Slot& rhs) +CRide_Booster_Slot::CRide_Booster_Slot(const CRide_Booster_Slot& rhs) :CElementObject(rhs) { } -HRESULT CRide_Bbooster_Slot::Initialize_Prototype() +HRESULT CRide_Booster_Slot::Initialize_Prototype() { return S_OK; } -HRESULT CRide_Bbooster_Slot::Initialize(void* pArg) +HRESULT CRide_Booster_Slot::Initialize(void* pArg) { CUIObject::UIOBJECT_DESC Desc{}; @@ -44,7 +44,7 @@ HRESULT CRide_Bbooster_Slot::Initialize(void* pArg) return S_OK; } -void CRide_Bbooster_Slot::Priority_Update(_float fTimeDelta) +void CRide_Booster_Slot::Priority_Update(_float fTimeDelta) { if (!__super::Chack_Visible()) { @@ -52,7 +52,7 @@ void CRide_Bbooster_Slot::Priority_Update(_float fTimeDelta) } __super::Priority_Update(fTimeDelta); } -void CRide_Bbooster_Slot::Update(_float fTimeDelta) +void CRide_Booster_Slot::Update(_float fTimeDelta) { if (!__super::Chack_Visible()) { @@ -88,7 +88,7 @@ void CRide_Bbooster_Slot::Update(_float fTimeDelta) __super::Update(fTimeDelta); } -void CRide_Bbooster_Slot::Late_Update(_float fTimeDelta) +void CRide_Booster_Slot::Late_Update(_float fTimeDelta) { if (!__super::Chack_Visible()) { @@ -100,7 +100,7 @@ void CRide_Bbooster_Slot::Late_Update(_float fTimeDelta) } } -HRESULT CRide_Bbooster_Slot::Render() +HRESULT CRide_Booster_Slot::Render() { if (FAILED(Bind_ShaderResources())) { return E_FAIL; @@ -118,12 +118,12 @@ HRESULT CRide_Bbooster_Slot::Render() return S_OK; } -_vector CRide_Bbooster_Slot::Get_WorldPostion() +_vector CRide_Booster_Slot::Get_WorldPostion() { return m_pTransformCom->Get_State(STATE::POSITION); } -HRESULT CRide_Bbooster_Slot::Bind_ShaderResources() +HRESULT CRide_Booster_Slot::Bind_ShaderResources() { if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) { @@ -180,7 +180,7 @@ HRESULT CRide_Bbooster_Slot::Bind_ShaderResources() return S_OK; } -HRESULT CRide_Bbooster_Slot::Ready_Components(void* pArg) +HRESULT CRide_Booster_Slot::Ready_Components(void* pArg) { if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) { @@ -205,33 +205,33 @@ HRESULT CRide_Bbooster_Slot::Ready_Components(void* pArg) return S_OK; } -CRide_Bbooster_Slot* CRide_Bbooster_Slot::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +CRide_Booster_Slot* CRide_Booster_Slot::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) { - CRide_Bbooster_Slot* pInstance = new CRide_Bbooster_Slot(pDevice, pContext); + CRide_Booster_Slot* pInstance = new CRide_Booster_Slot(pDevice, pContext); if (FAILED(pInstance->Initialize_Prototype())) { - MSG_BOX("Failed to Created : CRide_Bbooster_Slot"); + MSG_BOX("Failed to Created : CRide_Booster_Slot"); SAFE_RELEASE(pInstance); } return pInstance; } -CGameObject* CRide_Bbooster_Slot::Clone(void* pArg, CGameObject* pOwner) +CGameObject* CRide_Booster_Slot::Clone(void* pArg, CGameObject* pOwner) { - CRide_Bbooster_Slot* pInstance = new CRide_Bbooster_Slot(*this); + CRide_Booster_Slot* pInstance = new CRide_Booster_Slot(*this); pInstance->m_pOwner = pOwner; if (FAILED(pInstance->Initialize(pArg))) { - MSG_BOX("Failed to Cloned : CRide_Bbooster_Slot"); + MSG_BOX("Failed to Cloned : CRide_Booster_Slot"); SAFE_RELEASE(pInstance); } return pInstance; } -void CRide_Bbooster_Slot::Free() +void CRide_Booster_Slot::Free() { __super::Free(); @@ -242,6 +242,6 @@ void CRide_Bbooster_Slot::Free() SAFE_RELEASE(m_pVIBufferCom); } -void CRide_Bbooster_Slot::Describe_Entity() +void CRide_Booster_Slot::Describe_Entity() { } diff --git a/Jusin154_Team3D/Editor/Private/Ride_Panel.cpp b/Jusin154_Team3D/Editor/Private/Ride_Panel.cpp index 19e1d762e..0e4a565ad 100644 --- a/Jusin154_Team3D/Editor/Private/Ride_Panel.cpp +++ b/Jusin154_Team3D/Editor/Private/Ride_Panel.cpp @@ -4,8 +4,8 @@ #include "Ride_Info_Key.h" #include "Ride_Info.h" #include "Ride_InfoBG.h" -#include "Ride_Bbooster_Slot.h" -#include "Ride_BboosterBar.h" +#include "Ride_Booster_Slot.h" +#include "Ride_BoosterBar.h" #include "Ride_HpBar.h" #include "Ride_HpSlot.h" @@ -186,17 +186,17 @@ HRESULT CRide_Panel::Ready_Element(void* pArg) } Add_Element(TEXT("Ride_Info"), m_pRide_Info); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_Bbooster_Slot)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_Booster_Slot)))) { return E_FAIL; } - Add_Element(TEXT("Ride_Bbooster_Slot"), m_pRide_Bbooster_Slot); + Add_Element(TEXT("Ride_Bbooster_Slot"), m_pRide_Booster_Slot); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_BboosterBar)))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_BoosterBar)))) { return E_FAIL; } - Add_Element(TEXT("Ride_BboosterBar"), m_pRide_BboosterBar); + Add_Element(TEXT("Ride_BboosterBar"), m_pRide_BoosterBar); if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_HpBar)))) { diff --git a/Jusin154_Team3D/Editor/Public/Ride_BboosterBar.h b/Jusin154_Team3D/Editor/Public/Ride_BoosterBar.h similarity index 80% rename from Jusin154_Team3D/Editor/Public/Ride_BboosterBar.h rename to Jusin154_Team3D/Editor/Public/Ride_BoosterBar.h index 0e46616bd..cd5aa8f70 100644 --- a/Jusin154_Team3D/Editor/Public/Ride_BboosterBar.h +++ b/Jusin154_Team3D/Editor/Public/Ride_BoosterBar.h @@ -5,12 +5,12 @@ NS_BEGIN(Editor) -class CRide_BboosterBar final : public CElementObject +class CRide_BoosterBar final : public CElementObject { private: - CRide_BboosterBar(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); - CRide_BboosterBar(const CRide_BboosterBar& rhs); - virtual ~CRide_BboosterBar() = default; + CRide_BoosterBar(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CRide_BoosterBar(const CRide_BoosterBar& rhs); + virtual ~CRide_BoosterBar() = default; public: virtual void Priority_Update(_float fTimeDelta); @@ -49,7 +49,7 @@ class CRide_BboosterBar final : public CElementObject _int m_iClick{}; public: - static CRide_BboosterBar* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + static CRide_BoosterBar* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; virtual void Free() override; void Describe_Entity() override; diff --git a/Jusin154_Team3D/Editor/Public/Ride_Bbooster_Slot.h b/Jusin154_Team3D/Editor/Public/Ride_Booster_Slot.h similarity index 75% rename from Jusin154_Team3D/Editor/Public/Ride_Bbooster_Slot.h rename to Jusin154_Team3D/Editor/Public/Ride_Booster_Slot.h index a558437ce..9952a85f4 100644 --- a/Jusin154_Team3D/Editor/Public/Ride_Bbooster_Slot.h +++ b/Jusin154_Team3D/Editor/Public/Ride_Booster_Slot.h @@ -5,12 +5,12 @@ NS_BEGIN(Editor) -class CRide_Bbooster_Slot final : public CElementObject +class CRide_Booster_Slot final : public CElementObject { private: - CRide_Bbooster_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); - CRide_Bbooster_Slot(const CRide_Bbooster_Slot& rhs); - virtual ~CRide_Bbooster_Slot() = default; + CRide_Booster_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CRide_Booster_Slot(const CRide_Booster_Slot& rhs); + virtual ~CRide_Booster_Slot() = default; public: virtual void Priority_Update(_float fTimeDelta); @@ -35,7 +35,7 @@ class CRide_Bbooster_Slot final : public CElementObject _float4 m_fImagePosi{}; public: - static CRide_Bbooster_Slot* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + static CRide_Booster_Slot* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; virtual void Free() override; void Describe_Entity() override; diff --git a/Jusin154_Team3D/Editor/Public/Ride_Panel.h b/Jusin154_Team3D/Editor/Public/Ride_Panel.h index c10b00c4f..4613fe132 100644 --- a/Jusin154_Team3D/Editor/Public/Ride_Panel.h +++ b/Jusin154_Team3D/Editor/Public/Ride_Panel.h @@ -32,8 +32,8 @@ class CRide_Panel final : public CPanelObject CGameObject* m_pRide_Info_Key = { nullptr }; CGameObject* m_pRide_InfoBG = { nullptr }; CGameObject* m_pRide_Info = { nullptr }; - CGameObject* m_pRide_Bbooster_Slot = { nullptr }; - CGameObject* m_pRide_BboosterBar = { nullptr }; + CGameObject* m_pRide_Booster_Slot = { nullptr }; + CGameObject* m_pRide_BoosterBar = { nullptr }; CGameObject* m_pRide_HpBar = { nullptr }; CGameObject* m_pRide_HpSlot = { nullptr }; public: diff --git a/Jusin154_Team3D/Engine/Private/NPCStat.cpp b/Jusin154_Team3D/Engine/Private/NPCStat.cpp index fcb9499a4..8eb63279b 100644 --- a/Jusin154_Team3D/Engine/Private/NPCStat.cpp +++ b/Jusin154_Team3D/Engine/Private/NPCStat.cpp @@ -18,6 +18,7 @@ HRESULT CNPCStat::Initialize_Prototype(tinyxml2::XMLNode* pChild) auto pElement = pChild->ToElement(); pElement->QueryIntAttribute("ID", &m_NpcInfo.iID); m_NpcInfo.pNpc_Name = CMyTools::ToWstring(pElement->Attribute("Name")); + m_NpcInfo.pName = CMyTools::ToWstring(pElement->Attribute("NpcName")); pElement->QueryIntAttribute("TAG", &m_NpcInfo.iNpcType); pElement->QueryFloatAttribute("SizeX", &m_NpcInfo.fFontPos); return S_OK; diff --git a/Jusin154_Team3D/Engine/Private/Unit.cpp b/Jusin154_Team3D/Engine/Private/Unit.cpp index 33800e52a..b6f39e760 100644 --- a/Jusin154_Team3D/Engine/Private/Unit.cpp +++ b/Jusin154_Team3D/Engine/Private/Unit.cpp @@ -113,6 +113,16 @@ _wstring CUnit::Get_Name() return _wstring(); } +_wstring CUnit::Get_NpcName() +{ + return _wstring(); +} + +_int CUnit::Get_TextID() +{ + return _int(); +} + HRESULT CUnit::Ready_Components(void *pArg) { if (FAILED(__super::Ready_Components(pArg))) { diff --git a/Jusin154_Team3D/Engine/Public/NPCStat.h b/Jusin154_Team3D/Engine/Public/NPCStat.h index 97ab4669c..775c7295e 100644 --- a/Jusin154_Team3D/Engine/Public/NPCStat.h +++ b/Jusin154_Team3D/Engine/Public/NPCStat.h @@ -10,6 +10,7 @@ class ENGINE_DLL CNPCStat final : public CComponent { _int iID{}; _wstring pNpc_Name; + _wstring pName; _int iNpcType{}; _float fFontPos{}; }NPCINFO; diff --git a/Jusin154_Team3D/Engine/Public/Unit.h b/Jusin154_Team3D/Engine/Public/Unit.h index db04d0401..5d49d9084 100644 --- a/Jusin154_Team3D/Engine/Public/Unit.h +++ b/Jusin154_Team3D/Engine/Public/Unit.h @@ -54,6 +54,8 @@ class ENGINE_DLL CUnit abstract : public CContainerObject virtual _bool Get_Npc() { return m_bNpc; } virtual _wstring Get_Name(); + virtual _wstring Get_NpcName(); + virtual _int Get_TextID(); #pragma endregion protected: