diff --git a/.gitignore b/.gitignore
index 8ce467e13..5484ffc9a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -35,6 +35,7 @@ x64/
Release/
Debug/
Inc/
+enc_temp_folder/
Jusin154_Team3D/Client/Bin/Resources/
# Imgui 임시 파일
diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj
index 14e466596..f49384cbf 100644
--- a/Jusin154_Team3D/Client/Default/Client.vcxproj
+++ b/Jusin154_Team3D/Client/Default/Client.vcxproj
@@ -190,15 +190,18 @@ call Update_Resources.bat
+
+
+
-
-
+
+
@@ -456,6 +459,7 @@ call Update_Resources.bat
+
@@ -466,14 +470,17 @@ call Update_Resources.bat
+
+
+
-
-
+
+
diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
index 5ce7e472a..798841985 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,19 @@
02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Nomal_Hit
-
+
02.GameObjects\NPC\Ally\RandomNpc
-
+
+
+ 02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Rush
+
+
+ 02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Land
+
+
+ 02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_GroundPulse
+
@@ -1722,12 +1731,6 @@
{5bf233fa-6f9c-40d5-85c6-adbc7fcf7d28}
-
- {9c357e12-18b3-461e-b74c-76f85280796f}
-
-
- {8b69e309-b90b-47f6-8f2d-3dd778b468fe}
-
{d3ad8db7-ff00-498d-ba50-aa4c38a56d4a}
@@ -1751,10 +1754,25 @@
{15ea8015-5b0a-4678-bf02-55b042ef4de4}
-
+
{88b62177-01fc-424d-a444-4fb5fd4b2db5}
+
+ {9cf44fef-f3be-409e-b530-6aef90db5c0c}
+
+
+ {c756e70b-1ba2-4a25-a177-b50bbc1a332a}
+
+
+ {eb8e52f5-0283-4acf-8fbb-0e734b7580e9}
+
+
+ {9c357e12-18b3-461e-b74c-76f85280796f}
+
+
+ {8b69e309-b90b-47f6-8f2d-3dd778b468fe}
+
@@ -2511,11 +2529,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,10 +2561,22 @@
02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Nomal_Hit
-
+
02.GameObjects\NPC\Ally\RandomNpc
+
+ 02.GameObjects\Player\Robe
+
+
+ 02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Rush
+
+
+ 02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Land
+
+
+ 02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_GroundPulse
+
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 b14ed9223..bf5b7331b 100644
--- a/Jusin154_Team3D/Client/Private/Broom.cpp
+++ b/Jusin154_Team3D/Client/Private/Broom.cpp
@@ -53,7 +53,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);
@@ -87,6 +87,7 @@ void CBroom::Update(_float fTimeDelta)
if (!m_pParentUnit->IsAI()) {
PlayerInput(fTimeDelta);
+ m_pInfoInstance->Set_Broom_Booster_Timer(m_fTurboBoost);
}
else {
m_fAITime += fTimeDelta;
@@ -102,9 +103,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;
@@ -162,7 +163,7 @@ void CBroom::Late_Update(_float fTimeDelta)
HRESULT CBroom::Render()
{
- if (!m_pModelCom){
+ if (!m_pModelCom) {
return S_OK;
}
@@ -326,6 +327,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;
@@ -343,6 +345,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/EffectPool.cpp b/Jusin154_Team3D/Client/Private/EffectPool.cpp
index 8765c16ee..025be182d 100644
--- a/Jusin154_Team3D/Client/Private/EffectPool.cpp
+++ b/Jusin154_Team3D/Client/Private/EffectPool.cpp
@@ -49,7 +49,9 @@
#include "Ranrok_Charge.h"
#include "Ranrok_Hit.h"
#include "Ranrok_Impact.h"
-
+#include "Ranrok_Land.h"
+#include "Ranrok_GroundPulse.h"
+#include "Ranrok_Rush_Bottom.h"
CEffectPool::CEffectPool(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CGameObject(pDevice, pContext)
@@ -637,7 +639,35 @@ HRESULT CEffectPool::Ready_MonsterEffect()
))) return E_FAIL;
-
+ if (FAILED(Create_Effect(SKILL_TYPE::RANROK_LAND, 5, g_iStaticLevel, g_iStaticLevel, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
+
+ CRanrok_Land* pEffect = nullptr;
+
+ pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr);
+
+ return pEffect; }
+
+ ))) return E_FAIL;
+
+ if (FAILED(Create_Effect(SKILL_TYPE::RANROK_GROUNDPULSE, 5, g_iStaticLevel, g_iStaticLevel, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
+
+ CRanrok_GroundPulse* pEffect = nullptr;
+
+ pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr);
+
+ return pEffect; }
+
+ ))) return E_FAIL;
+
+ if (FAILED(Create_Effect(SKILL_TYPE::RANROK_RUSH_BOTTOM, 5, g_iStaticLevel, g_iStaticLevel, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
+
+ CRanrok_Rush_Bottom* pEffect = nullptr;
+
+ pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr);
+
+ return pEffect; }
+
+ ))) return E_FAIL;
return S_OK;
}
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/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp
index 514197bd1..fe46d92d1 100644
--- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp
+++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp
@@ -340,7 +340,7 @@ HRESULT CLevel_GamePlay::Ready_Background()
#endif //
#ifdef 기무리
isReady_Background = true;
- isReady_Hogsmeade = true;
+ isReady_Hogsmeade = false;
isReady_Hogwart = false;
#endif //
#ifdef 나
@@ -726,8 +726,8 @@ HRESULT CLevel_GamePlay::Ready_Layer_Player(const _wstring& strLayerTag)
isLoad_RandomNPC = true;
#endif //
#ifdef 기무리
- isLoad_NPC = true;
- isLoad_RandomNPC = true;
+ isLoad_NPC = false;
+ isLoad_RandomNPC = false;
#endif //
#ifdef 나
isLoad_RandomNPC = true;
diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp
index f998e2a39..8ee4ae956 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"
@@ -215,6 +215,9 @@
#include "Ranrok_Pulse.h"
#include "Ranrok_Hit.h"
#include "Ranrok_Impact.h"
+#include "Ranrok_Land.h"
+#include "Ranrok_GroundPulse.h"
+#include "Ranrok_Rush_Bottom.h"
#include "StunEffect.h"
#include "Box_Splesh.h"
@@ -406,7 +409,7 @@ HRESULT CLoader::Loading_For_GamePlay()
isLoad_Background = true;
isLoad_Hogwart = false;
isLoad_UI_SEQUANTIAL = false;
- isLoad_NPC = true;
+ isLoad_NPC = false;
isLoad_Monster = true;
#endif //
#ifdef 나
@@ -2401,6 +2404,15 @@ HRESULT CLoader::Loading_For_GamePlay()
return E_FAIL;
}
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRanrok_Land::Create(m_pDevice, m_pContext)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRanrok_GroundPulse::Create(m_pDevice, m_pContext)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRanrok_Rush_Bottom::Create(m_pDevice, m_pContext)))) {
+ return E_FAIL;
+ }
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CGoblin_Teleport::Create(m_pDevice, m_pContext)))) {
@@ -2862,12 +2874,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 2b3dc0930..b442840c7 100644
--- a/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp
+++ b/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp
@@ -152,6 +152,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"))) {
@@ -237,6 +247,9 @@ HRESULT CNPC_Ollivander::Initialize(void* pArg)
m_pModelCom->Set_AnimationIndex(0, true);
m_pCallBack_Behavior->Initialize(m_pCharacter_Controller);
m_pCallBack_HitReport->Initialize(m_pCharacter_Controller);
+
+ //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 17d0f9d39..4cd34a868 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));
}
@@ -330,9 +341,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);
}
@@ -587,15 +600,15 @@ HRESULT CPlayer::Ready_Parts()
//XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("broomSocket"));
#ifdef 기무리
- {
- CPlayerRobe::PlayerRobe_DESC Desc{};
- Desc.pModel = m_pModelCom;
- Desc.pParentTransform = m_pTransformCom;
- Desc.pSocketMatrix = m_pModelCom->Get_BoneMatrixPtr("Hips_Cloth");
- if (FAILED(Add_PartObject("RobePart", g_iStaticLevel, &m_pRobePart, &Desc))) {
- assert(false);
- }
- }
+ //{
+ // CPlayerRobe::PlayerRobe_DESC Desc{};
+ // Desc.pModel = m_pModelCom;
+ // Desc.pParentTransform = m_pTransformCom;
+ // Desc.pSocketMatrix = m_pModelCom->Get_BoneMatrixPtr("Hips_Cloth");
+ // if (FAILED(Add_PartObject("RobePart", g_iStaticLevel, &m_pRobePart, &Desc))) {
+ // assert(false);
+ // }
+ //}
#endif // 기무리
@@ -665,51 +678,51 @@ HRESULT CPlayer::Bind_ShaderParameters(_uint iMeshOrder)
fMixerFactor = 0.658333f;
iColorMixerMethod = 1;
break;
-#ifdef 기무리
-
- case PLAYER_MESH_ORDER::ROBE_CLOTH:
- {
- CMesh* pMesh = m_pModelCom->Get_Mesh(ENUM_CLASS(PLAYER_MESH_ORDER::ROBE_CLOTH));
- _uint MeshBoneCount = pMesh->Get_NumBone();
-
- for (_uint i = 0; i < MeshBoneCount; ++i)
- {
- XMStoreFloat4x4(&SkinMatrices[i], XMMatrixIdentity());
- }
-
- _uint temp = 0;
- vector<_uint> globalMask = m_pModelCom->Get_BoneMask(ENUM_CLASS(BLEND_BONE::HIPS_CLOTH));
- vector<_int> boneIndices = pMesh->Get_BoneIndices();
-
- for (_uint i = 0; i < MeshBoneCount; ++i)
- {
- _uint global = boneIndices[i];
- if (global == 38)
- continue;
- if (globalMask[global] == 1)
- {
- SkinMatrices[i] = m_pRobePart->Get_RobeJointAnchorMatrix(temp++);
- }
- }
-
- GUI::DragFloat("TempWeight", &m_fTempWeight, 0.01f);
-
- if (FAILED(m_pShaderCom->Bind_RawValue("g_TempWeight", &m_fTempWeight, sizeof(_float)))) {
- return E_FAIL;
- }
-
-
- if (FAILED(m_pShaderCom->Bind_Matrices(
- "g_BoneMatrices",
- SkinMatrices.data(),
- (_int)SkinMatrices.size()
- )))
- {
- return E_FAIL;
- }
- }
- break;
-#endif // _DEBUG
+//#ifdef 기무리
+//
+// case PLAYER_MESH_ORDER::ROBE_CLOTH:
+// {
+// CMesh* pMesh = m_pModelCom->Get_Mesh(ENUM_CLASS(PLAYER_MESH_ORDER::ROBE_CLOTH));
+// _uint MeshBoneCount = pMesh->Get_NumBone();
+//
+// for (_uint i = 0; i < MeshBoneCount; ++i)
+// {
+// XMStoreFloat4x4(&SkinMatrices[i], XMMatrixIdentity());
+// }
+//
+// _uint temp = 0;
+// vector<_uint> globalMask = m_pModelCom->Get_BoneMask(ENUM_CLASS(BLEND_BONE::HIPS_CLOTH));
+// vector<_int> boneIndices = pMesh->Get_BoneIndices();
+//
+// for (_uint i = 0; i < MeshBoneCount; ++i)
+// {
+// _uint global = boneIndices[i];
+// if (global == 38)
+// continue;
+// if (globalMask[global] == 1)
+// {
+// SkinMatrices[i] = m_pRobePart->Get_RobeJointAnchorMatrix(temp++);
+// }
+// }
+//
+// GUI::DragFloat("TempWeight", &m_fTempWeight, 0.01f);
+//
+// if (FAILED(m_pShaderCom->Bind_RawValue("g_TempWeight", &m_fTempWeight, sizeof(_float)))) {
+// return E_FAIL;
+// }
+//
+//
+// if (FAILED(m_pShaderCom->Bind_Matrices(
+// "g_BoneMatrices",
+// SkinMatrices.data(),
+// (_int)SkinMatrices.size()
+// )))
+// {
+// return E_FAIL;
+// }
+// }
+// break;
+//#endif // _DEBUG
default:
break;
diff --git a/Jusin154_Team3D/Client/Private/PlayerRobe.cpp b/Jusin154_Team3D/Client/Private/PlayerRobe.cpp
index 72906c3ac..17ce09cb6 100644
--- a/Jusin154_Team3D/Client/Private/PlayerRobe.cpp
+++ b/Jusin154_Team3D/Client/Private/PlayerRobe.cpp
@@ -2,31 +2,21 @@
#include "PlayerRobe.h"
#include "GameInstance.h"
-CPlayerRobe::CPlayerRobe(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
- : CPartObject(pDevice, pContext)
-{
-}
-
-CPlayerRobe::CPlayerRobe(const CPlayerRobe& Prototype)
- : CPartObject(Prototype)
-{
-}
void CPlayerRobe::Priority_Update(_float fTimeDelta)
{
#ifdef _DEBUG
#ifdef 기무리
- //Update_RobeJoints();
-#endif // 기무리
-
Describe_Entity();
+ Update_RobeJoints();
+#endif // 기무리
#endif // _DEBUG
}
void CPlayerRobe::Update(_float fTimeDelta)
{
- _matrix SocketMatrixFixed = (XMMatrixRotationZ(XM_PI) * XMLoadFloat4x4(m_pSocketMatrix)) *
- XMLoadFloat4x4(m_pParentTransformCom->Get_WorldMatrixPtr());
+ _matrix SocketMatrixFixed = (XMMatrixRotationZ(XM_PI) * XMLoadFloat4x4(m_pSocketMatrix))
+ * XMLoadFloat4x4(m_pParentTransformCom->Get_WorldMatrixPtr());
m_pRobeMainAnchor->Move_Kinematic(SocketMatrixFixed, false);
//m_pRobeMainAnchor->Get_Actor()->wakeUp();
@@ -44,7 +34,12 @@ HRESULT CPlayerRobe::Render()
{
#ifdef _DEBUG
#ifdef 기무리
- //Render_BonePhysX();
+ if (m_pGameInstance->Key_Up(DIK_8)) {
+ m_bRenderDebug = !m_bRenderDebug;
+ }
+ if (m_bRenderDebug) {
+ Render_BonePhysX();
+ }
#endif // 기무리
#endif // _DEBUG
return S_OK;
@@ -56,12 +51,6 @@ HRESULT CPlayerRobe::Update_RobeSocketPosition()
PSX::PxTransform pxTransform = {};
_matrix WorldMatrix = {};
_matrix OwnerInvWorldMatrix = m_pParentTransformCom->Get_WorldMatrixInv();
- //{
- // pxTransform = m_pRobeMainAnchor->Get_GlobalPosition();
- // WorldMatrix = XMMatrixAffineTransformation(XMVectorSet(1.f, 1.f, 1.f, 0.f), XMVectorZero(), XMLoadFloat4((_float4*)&pxTransform.q), XMVectorSetW(XMLoadFloat3((_float3*)&pxTransform.p), 1.f));
- // _fmatrix LocalMatrix = WorldMatrix * OwnerInvWorldMatrix;
- // m_pModelCom->Set_BoneCombinedTransformation("Hips_Cloth", LocalMatrix);
- //}
for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) {
pxTransform = m_pRobeJointAnchor[i]->Get_GlobalPosition();
WorldMatrix = XMMatrixAffineTransformation(XMVectorSet(1.f, 1.f, 1.f, 0.f), XMVectorZero(), XMLoadFloat4((_float4*)&pxTransform.q), XMVectorSetW(XMLoadFloat3((_float3*)&pxTransform.p), 1.f));
@@ -73,29 +62,6 @@ HRESULT CPlayerRobe::Update_RobeSocketPosition()
return S_OK;
}
-HRESULT CPlayerRobe::Helper_RouteJointGenerater(CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC& Desc_Body, ROUTE_DESC& Desc_Route, _matrix* xmAnchorMatricesWorld)
-{
-
- if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) {
- return E_FAIL;
- }
- m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(xmAnchorMatricesWorld[Desc_Route.iStartBoneIndex].r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true);
-
-
- PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iStartBoneIndex]->Get_Actor();
- PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor();
- PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor();
-
- PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y--
- PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++
-
- m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose);
-
- m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose);
-
- return S_OK;
-}
-
HRESULT CPlayerRobe::Update_LegsPosition()
{
_matrix WorldMatrix = m_pParentTransformCom->Get_XMWorldMatrix();
@@ -137,60 +103,73 @@ HRESULT CPlayerRobe::Update_LegsPosition()
}
#endif // _DEBUG
}
- m_pLower0Bound->Move_Kinematic(m_pParentTransformCom->Get_XMWorldMatrix(), false);
- m_pLower1Bound->Move_Kinematic(m_pParentTransformCom->Get_XMWorldMatrix(), false);
+ {
+
+ _vector vLegPos = XMVector4Transform(XMLoadFloat4((_float4*)&m_pLeftLegLocalMatrix->m[3][0]), WorldMatrix);
+ _vector vLegUp = XMVector4Transform(XMLoadFloat4((_float4*)&m_pLeftLegUpLocalMatrix->m[3][0]), WorldMatrix);
+ m_pLeftThigh->Set_CenterTransform(vLegPos, vLegUp, false);
+
+#ifdef _DEBUG
+ {
+ _vector vCenterWorldPos = (vLegPos + vLegUp ) * 0.5f;
+ _vector vRotQ = XMQuaternionIdentity();
+ _vector vDir = XMVectorSetW(vLegUp - vLegPos, 0.f);
+ _float vLength = XMVectorGetX(XMVector3Length(vDir));
+ if (vLength > FLT_EPSILON5) {
+ vDir = XMVector3Normalize(vDir);
+ vRotQ = CMyTools::MakeQuaternionFromTo(XMVectorSet(0.f, 1.f, 0.f, 0.f), vDir);
+ }
+ XMStoreFloat4x4(&m_LeftThighMatrix, XMMatrixRotationQuaternion(vRotQ) * XMMatrixTranslationFromVector(vCenterWorldPos));
+ }
+#endif // _DEBUG
+
+ vLegPos = XMVector4Transform(XMLoadFloat4((_float4*)&m_pRightLegLocalMatrix->m[3][0]), WorldMatrix);
+ vLegUp = XMVector4Transform(XMLoadFloat4((_float4*)&m_pRightLegUpLocalMatrix->m[3][0]), WorldMatrix);
+ m_pRightThigh->Set_CenterTransform(vLegPos, vLegUp, false);
+
+#ifdef _DEBUG
+ {
+ _vector vCenterWorldPos = (vLegPos + vLegUp) * 0.5f;
+ _vector vRotQ = XMQuaternionIdentity();
+ _vector vDir = XMVectorSetW(vLegUp - vLegPos, 0.f);
+ _float vLength = XMVectorGetX(XMVector3Length(vDir));
+ if (vLength > FLT_EPSILON5) {
+ vDir = XMVector3Normalize(vDir);
+ vRotQ = CMyTools::MakeQuaternionFromTo(XMVectorSet(0.f, 1.f, 0.f, 0.f), vDir);
+ }
+ XMStoreFloat4x4(&m_RightThighMatrix, XMMatrixRotationQuaternion(vRotQ) * XMMatrixTranslationFromVector(vCenterWorldPos));
+ }
+#endif // _DEBUG
+ }
+ m_pLower0Bound->Move_Kinematic(XMMatrixTranslationFromVector(XMVectorSet(0.f, -0.2f, 0.f, 0.f)) * XMLoadFloat4x4(m_pLower0BoundMatrix) * WorldMatrix, false);
+ m_pLower1Bound->Move_Kinematic(XMMatrixTranslationFromVector(XMVectorSet(0.f, -0.7f, 0.f, 0.f)) * XMLoadFloat4x4(m_pLower1BoundMatrix) * WorldMatrix, false);
return S_OK;
}
#ifdef _DEBUG
-HRESULT CPlayerRobe::Render_Legs()
+HRESULT CPlayerRobe::Render_Legs(_fmatrix LowerMatrix)
{
_float fHeight = 0.25f;
- _matrix WorldMatrix = XMLoadFloat4x4(&m_LeftLegMatrix);
_matrix ViewMatrix = m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW);
_matrix ProjMatrix = m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ);
_vector vColor = CMyTools::ColorRGB_A_HEXtoVECTOR(0xff0000, 1.f);
- m_pMainShape->Draw(WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true,
+ m_pMainShape->Draw(LowerMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true,
[this]() {
m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
});
- _matrix WorldUp = XMMatrixTranslationFromVector(WorldMatrix.r[1] * fHeight);
- _matrix WorldDown = XMMatrixTranslationFromVector(WorldMatrix.r[1] * -fHeight);
- m_pSubShape->Draw(WorldUp * WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true,
+ _matrix WorldUp = XMMatrixTranslationFromVector(LowerMatrix.r[1] * fHeight);
+ _matrix WorldDown = XMMatrixTranslationFromVector(LowerMatrix.r[1] * -fHeight);
+ m_pSubShape->Draw(WorldUp * LowerMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true,
[this]() {
m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
});
- m_pSubShape->Draw(WorldDown * WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true,
+ m_pSubShape->Draw(WorldDown * LowerMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true,
[this]() {
m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
});
-
- WorldMatrix = XMLoadFloat4x4(&m_RightLegMatrix);
-
- m_pMainShape->Draw(WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true,
- [this]() {
- m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
- });
- WorldUp = XMMatrixTranslationFromVector(WorldMatrix.r[1] * fHeight);
- WorldDown = XMMatrixTranslationFromVector(WorldMatrix.r[1] * -fHeight);
- m_pSubShape->Draw(WorldUp * WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true,
- [this]() {
- m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
- });
- m_pSubShape->Draw(WorldDown * WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true,
- [this]() {
- m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
- });
- m_pLower0Bound->Render([this]() {
- m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
- });
- m_pLower1Bound->Render([this]() {
- m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
- });
-
return S_OK;
}
HRESULT CPlayerRobe::Render_BonePhysX()
@@ -220,7 +199,10 @@ HRESULT CPlayerRobe::Render_BonePhysX()
m_pRobeMainAnchor->Render([this]() {
m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
});
- Render_Legs();
+ Render_Legs(XMLoadFloat4x4(&m_LeftLegMatrix));
+ Render_Legs(XMLoadFloat4x4(&m_RightLegMatrix));
+ Render_Legs(XMLoadFloat4x4(&m_LeftThighMatrix));
+ Render_Legs(XMLoadFloat4x4(&m_RightThighMatrix));
_vector vRouteColor = CMyTools::ColorRGB_A_HEXtoVECTOR(0x0000ff, 1.f);
for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) {
m_pRobeJointAnchor[i]->Render([this]() {
@@ -231,403 +213,134 @@ HRESULT CPlayerRobe::Render_BonePhysX()
if (pPrevDSS != nullptr) {
pPrevDSS->Release();
}
+ m_pLower0Bound->Render();
+ m_pLower1Bound->Render();
return S_OK;
}
#endif // _DEBUG
-HRESULT CPlayerRobe::Ready_Components()
+HRESULT CPlayerRobe::Update_RobeJoints()
{
- __super::Ready_Components(nullptr);
-
- _matrix socketWorld = /*XMMatrixRotationZ(XM_PIDIV2) * */XMLoadFloat4x4(m_pSocketMatrix) * m_pParentTransformCom->Get_XMWorldMatrix();
- _matrix xmAnchorMatricesWorld[ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END)] = { };
- for (_uint iBoneIndex = 0; iBoneIndex < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++iBoneIndex) {
- xmAnchorMatricesWorld[iBoneIndex] = XMLoadFloat4x4(&m_ReconstructedJointAnchorMatirces[iBoneIndex]) * socketWorld;
- }
-
- { //
- CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
- Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG);
- Desc.bAutoOwnerTranslation = false;
- if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_Leg"), (CComponent**)&m_pLeftLeg, &Desc))) {
- return E_FAIL;
- }
- }
- { //
- CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
- Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG);
- Desc.bAutoOwnerTranslation = false;
- if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_Leg"), (CComponent**)&m_pRightLeg, &Desc))) {
- return E_FAIL;
- }
- }
- { //
- CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
- Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG);
- Desc.bAutoOwnerTranslation = false;
- if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_LowerBound"), (CComponent**)&m_pLower0Bound, &Desc))) {
- return E_FAIL;
- }
- }
- { //
- CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
- Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG);
- Desc.bAutoOwnerTranslation = false;
- if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_LowerBound"), (CComponent**)&m_pLower1Bound, &Desc))) {
- return E_FAIL;
- }
- }
- { // RobeSocket
- { // Fixed_MainAnchor
- CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
- Desc.iSubKind = ENUM_CLASS(PXOBJECT::JOINT_ANCHOR);
- Desc.bAutoOwnerTranslation = false;
- if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ANCHOR"), (CComponent**)&m_pRobeMainAnchor, &Desc))) {
- return E_FAIL;
- }
- m_pRobeMainAnchor->Set_Kinematic(true);
- m_pRobeMainAnchor->Set_Transform(socketWorld, true);
-#ifdef _DEBUG
- m_pRobeMainAnchor->Set_Name("MainAnchor");
-#endif // _DEBUG
- }
- // SubAnchors
- for (_int i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) {
- CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
- Desc.iSubKind = ENUM_CLASS(PXOBJECT::JOINT_ANCHOR);
- Desc.bAutoOwnerTranslation = false;
- if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ANCHOR"), (CComponent**)&m_pRobeJointAnchor[i], &Desc))) {
- return E_FAIL;
- }
-
- m_pRobeJointAnchor[i]->Set_Transform(xmAnchorMatricesWorld[i], true);
-#ifdef _DEBUG
- m_pRobeJointAnchor[i]->Set_Name(PLAYER_JOINT_BONE_NAMES[i]);
-#endif // _DEBUG
- }
- }
- { // RobeRoute
- CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc_Body = {};
- ROUTE_DESC Desc_Route = {};
- Desc_Body.bAutoOwnerTranslation = false;
- Desc_Body.iSubKind = ENUM_CLASS(PXOBJECT::JOINT_ROUTE);
- /*Origin_Linked_Routes*/
- {
- {
- Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::ORIGIN_TO_RUP);
- Desc_Route.iStartBoneIndex = -1;
- Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTUP);
- Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_RUP_START);
- Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
- if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) {
- return E_FAIL;
- }
- m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(socketWorld.r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true);
-#ifdef _DEBUG
- m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_Name("Origin_Linked_Routes");
-#endif // _DEBUG
- { // Joint
- PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeMainAnchor->Get_Actor();
- PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor();
- PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor();
-
- PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y--
- PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++
-
- m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose);
- m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose);
- }
- }
- {
- Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::ORIGIN_TO_TUP);
- Desc_Route.iStartBoneIndex = -1;
- Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILUP);
- Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_TUP_START);
- Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
- if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) {
- return E_FAIL;
- }
- m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(socketWorld.r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true);
-#ifdef _DEBUG
- m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_Name("Origin_Linked_Routes");
-#endif // _DEBUG
- { // Joint
- PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeMainAnchor->Get_Actor();
- PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor();
- PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor();
-
- PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y--
- PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++
-
- m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose);
- m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose);
- }
- }
- {
- Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::ORIGIN_TO_LUP);
- Desc_Route.iStartBoneIndex = -1;
- Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTUP);
- Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_LUP_START);
- Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
- if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) {
- return E_FAIL;
- }
- m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(socketWorld.r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true);
-#ifdef _DEBUG
- m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_Name("Origin_Linked_Routes");
-#endif // _DEBUG
- { // Joint
- PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeMainAnchor->Get_Actor();
- PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor();
- PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor();
-
- PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y--
- PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++
-
- m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose);
- m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose);
- }
- }
- }
- /*UP_TO_MIDDLE*/
- {
- {
- Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::RUP_TO_RMIDDLE);
- Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTUP);
- Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHT);
- Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::RUP_TO_RMIDDLE_START);
- Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
- Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld);
- }
- {
- Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::TUP_TO_TMIDDLE);
- Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILUP);
- Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAIL);
- Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::TUP_TO_TMIDDLE_START);
- Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
- Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld);
- }
- {
- Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::LUP_TO_LMIDDLE);
- Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTUP);
- Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFT);
- Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::LUP_TO_LMIDDLE_START);
- Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
- Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld);
- }
- }
- /*MIDDLE_TO_DOWN*/
- {
- {
- Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::RMIDDLE_TO_RR);
- Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHT);
- Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTDOWNRIGHT);
- Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::RMIDDLE_TO_RR_START);
- Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
- Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld);
- }
- {
- Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::RMIDDLE_TO_R);
- Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHT);
- Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTDOWN);
- Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::RMIDDLE_TO_R_START);
- Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
- Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld);
- }
- {
- Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::TMIDDLE_TO_TR);
- Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAIL);
- Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILRIGHTDOWN);
- Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::TMIDDLE_TO_TR_START);
- Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
- Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld);
- }
- {
- Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::TMIDDLE_TO_TL);
- Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAIL);
- Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILLEFTDOWN);
- Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::TMIDDLE_TO_TL_START);
- Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
- Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld);
- }
- {
- Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::LMIDDLE_TO_L);
- Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFT);
- Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTDOWN);
- Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::LMIDDLE_TO_L_START);
- Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
- Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld);
- }
- {
- Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::LMIDDLE_TO_LL);
- Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFT);
- Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTDOWNLEFT);
- Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::LMIDDLE_TO_LL_START);
- Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
- Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld);
- }
- }
- }
- return S_OK;
-}
-
-HRESULT CPlayerRobe::Initialize_Prototype()
-{
- return S_OK;
-}
-
-HRESULT CPlayerRobe::Initialize(void* pArg)
-{
- PlayerRobe_DESC* pDesc = static_cast (pArg);
- m_pSocketMatrix = pDesc->pSocketMatrix;
- m_pModelCom = pDesc->pModel;
-
- m_ReconstructedJointAnchorMatirces.resize(ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END));
-
- m_iBoneNum = m_pModelCom->Get_MeshInfluencedBoneNum(ENUM_CLASS(PLAYER_MESH_ORDER::ROBE_CLOTH));
- m_PrevRobeBoneMatrices.resize(m_iBoneNum);
- if (FAILED(m_pModelCom->Capture_BoneMatrices(ENUM_CLASS(PLAYER_MESH_ORDER::ROBE_CLOTH), m_PrevRobeBoneMatrices))) {
- return E_FAIL;
- }
-
- m_pLeftFootLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("LeftFoot");
- m_pLeftLegLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("LeftLeg");
- m_pRightFootLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("RightFoot");
- m_pRightLegLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("RightLeg");
-
- XMStoreFloat4x4(&m_PreTransformMatrix, XMLoadFloat4x4(m_pModelCom->Get_PreTransformMatrixPtr()));
-
- for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) {
- m_RobeJointAnchorMatrices[i] = m_pModelCom->Get_BoneLocalMatrixPtr(PLAYER_JOINT_BONE_NAMES[i]);
- }
- for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i)
- {
- _uint iParentIndex = UINT_MAX;
- _bool bCopyPreTransform = false;
-
- switch ((PLAYER_JOINT_BONE_ORDER)i)
- {
- case PLAYER_JOINT_BONE_ORDER::RIGHTUP:
- case PLAYER_JOINT_BONE_ORDER::TAILUP:
- case PLAYER_JOINT_BONE_ORDER::LEFTUP:
- bCopyPreTransform = true;
- break;
-
- case PLAYER_JOINT_BONE_ORDER::RIGHT:
- iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTUP);
- break;
- case PLAYER_JOINT_BONE_ORDER::TAIL:
- iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILUP);
- break;
- case PLAYER_JOINT_BONE_ORDER::LEFT:
- iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTUP);
- break;
- case PLAYER_JOINT_BONE_ORDER::RIGHTDOWNRIGHT:
- case PLAYER_JOINT_BONE_ORDER::RIGHTDOWN:
- iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHT);
- break;
- case PLAYER_JOINT_BONE_ORDER::TAILRIGHTDOWN:
- case PLAYER_JOINT_BONE_ORDER::TAILLEFTDOWN:
- iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAIL);
- break;
- case PLAYER_JOINT_BONE_ORDER::LEFTDOWN:
- case PLAYER_JOINT_BONE_ORDER::LEFTDOWNLEFT:
- iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFT);
- break;
- default:
- assert(false);
- break;
- }
-
- if (true == bCopyPreTransform)
- {
- _matrix constructedMatrix = XMLoadFloat4x4(m_RobeJointAnchorMatrices[i]) * XMLoadFloat4x4(&m_PreTransformMatrix);
-
- XMStoreFloat4x4(&m_ReconstructedJointAnchorMatirces[i], constructedMatrix);
- continue;
- }
-
- _matrix constructedMatrix = XMLoadFloat4x4(m_RobeJointAnchorMatrices[i])
- * XMLoadFloat4x4(&m_ReconstructedJointAnchorMatirces[iParentIndex]);
-
- XMStoreFloat4x4(&m_ReconstructedJointAnchorMatirces[i], constructedMatrix);
- }
-
- if (FAILED(__super::Initialize(pArg))) {
- return E_FAIL;
- }
-
- if (FAILED(Ready_Components())) {
- return E_FAIL;
- }
-
- D6JOINTDESC JointDesc = D6JOINTDESC();
for (_uint i = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_RUP_START); i < ENUM_CLASS(PLAYER_JOINT_ORDER::END); ++i) {
- JointDesc.ApplyToJoint(*m_pDynamicJoints[i]);
- m_JointDescriptions[i] = JointDesc;
- }
+ m_JointDescriptions[i].InitFromJoint(*m_pDynamicJoints[i]);
+ switch (PLAYER_JOINT_ORDER(i))
+ {
+ /* From Origin */
+ {
+ case PLAYER_JOINT_ORDER::ORIGIN_TO_RUP_START:
+ case PLAYER_JOINT_ORDER::ORIGIN_TO_TUP_START:
+ case PLAYER_JOINT_ORDER::ORIGIN_TO_LUP_START:
+ case PLAYER_JOINT_ORDER::ORIGIN_TO_RSIDEUP_START:
+ case PLAYER_JOINT_ORDER::ORIGIN_TO_LSIDEUP_START:
+ m_JointDescriptions[i].iMotionTwist = 1;
+ m_JointDescriptions[i].iMotionSwing1 = 1;
+ m_JointDescriptions[i].iMotionSwing2 = 1;
+ m_JointDescriptions[i].fLinearLimit = 0.f;
+ m_JointDescriptions[i].fTwistAbsDeg = 0.f;
+ m_JointDescriptions[i].fSwingDeg = 40.f;
+ break;
+ case PLAYER_JOINT_ORDER::ORIGIN_TO_RUP_END:
+ case PLAYER_JOINT_ORDER::ORIGIN_TO_TUP_END:
+ case PLAYER_JOINT_ORDER::ORIGIN_TO_LUP_END:
+ case PLAYER_JOINT_ORDER::ORIGIN_TO_RSIDEUP_END:
+ case PLAYER_JOINT_ORDER::ORIGIN_TO_LSIDEUP_END:
+ m_JointDescriptions[i].iMotionTwist = 1;
+ m_JointDescriptions[i].iMotionSwing1 = 1;
+ m_JointDescriptions[i].iMotionSwing2 = 1;
+ m_JointDescriptions[i].fLinearLimit = 0.f;
+ m_JointDescriptions[i].fTwistAbsDeg = 0.f;
+ m_JointDescriptions[i].fSwingDeg = 40.f;
+ break;
+ }
+ /* From_Middle */
+ {
+ case PLAYER_JOINT_ORDER::RUP_TO_RMIDDLE_START:
+ case PLAYER_JOINT_ORDER::TUP_TO_TMIDDLE_START:
+ case PLAYER_JOINT_ORDER::LUP_TO_LMIDDLE_START:
+ case PLAYER_JOINT_ORDER::RSIDEUP_TO_RSIDE_START:
+ case PLAYER_JOINT_ORDER::LSIDEUP_TO_LSIDE_START:
+ m_JointDescriptions[i].iMotionTwist = 0;
+ m_JointDescriptions[i].iMotionSwing1 = 0;
+ m_JointDescriptions[i].iMotionSwing2 = 0;
+ m_JointDescriptions[i].fLinearLimit = 0.f;
+ m_JointDescriptions[i].fTwistAbsDeg = 0.f;
+ m_JointDescriptions[i].fSwingDeg = 10.f;
+ break;
-#ifdef _DEBUG
- m_pSubShape = (GeometricPrimitive::CreateSphere(m_pContext, 0.05f, 22, false, false));
- m_pMainShape = (GeometricPrimitive::CreateCylinder(m_pContext, 0.3f, 0.075f, 22, false));
- D3D11_DEPTH_STENCIL_DESC depthStencilDesc = {};
- depthStencilDesc.DepthEnable = FALSE;
- depthStencilDesc.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ZERO;
- depthStencilDesc.DepthFunc = D3D11_COMPARISON_ALWAYS;
- depthStencilDesc.StencilEnable = FALSE;
+ case PLAYER_JOINT_ORDER::RUP_TO_RMIDDLE_END:
+ case PLAYER_JOINT_ORDER::TUP_TO_TMIDDLE_END:
+ case PLAYER_JOINT_ORDER::LUP_TO_LMIDDLE_END:
+ case PLAYER_JOINT_ORDER::RSIDEUP_TO_RSIDE_END:
+ case PLAYER_JOINT_ORDER::LSIDEUP_TO_LSIDE_END:
+ m_JointDescriptions[i].iMotionTwist = 1;
+ m_JointDescriptions[i].iMotionSwing1 = 1;
+ m_JointDescriptions[i].iMotionSwing2 = 1;
+ m_JointDescriptions[i].fLinearLimit = 0.f;
+ m_JointDescriptions[i].fSwingDeg = 0.f;
+ m_JointDescriptions[i].fTwistAbsDeg = 0.f;
- HRESULT result = m_pDevice->CreateDepthStencilState(&depthStencilDesc, &m_pDepthStencilStateNone);
- if (FAILED(result)){
- return E_FAIL;
+ m_JointDescriptions[i].bEnableSlerpDrive = true;
+ m_JointDescriptions[i].fLinearStiffness = 10.f;
+ m_JointDescriptions[i].fSlerpDamping = 3.f;
+ m_JointDescriptions[i].fSlerpForceLimit = 40.f;
+ m_JointDescriptions[i].bSlerpAccel = true;
+ break;
+ }
+ /* From_Lower */
+ {
+ case PLAYER_JOINT_ORDER::RMIDDLE_TO_RR_START:
+ case PLAYER_JOINT_ORDER::RSIDE_TO_R_START:
+ m_JointDescriptions[i].iMotionTwist = 1;
+ m_JointDescriptions[i].iMotionSwing1 = 1;
+ m_JointDescriptions[i].iMotionSwing2 = 1;
+ m_JointDescriptions[i].fLinearLimit = 0.f;
+ m_JointDescriptions[i].fTwistAbsDeg = 15.f;
+ m_JointDescriptions[i].fSwingDeg = 15.f;
+ break;
+
+ case PLAYER_JOINT_ORDER::RSIDE_TO_R_END:
+ case PLAYER_JOINT_ORDER::RMIDDLE_TO_RR_END:
+ break;
+
+ case PLAYER_JOINT_ORDER::TMIDDLE_TO_TR_START:
+ case PLAYER_JOINT_ORDER::TMIDDLE_TO_TL_START:
+ m_JointDescriptions[i].iMotionTwist = 1;
+ m_JointDescriptions[i].iMotionSwing1 = 1;
+ m_JointDescriptions[i].iMotionSwing2 = 1;
+ m_JointDescriptions[i].fLinearLimit = 0.f;
+ m_JointDescriptions[i].fTwistAbsDeg = 15.f;
+ m_JointDescriptions[i].fSwingDeg = 15.f;
+ break;
+
+ case PLAYER_JOINT_ORDER::TMIDDLE_TO_TR_END:
+ case PLAYER_JOINT_ORDER::TMIDDLE_TO_TL_END:
+ break;
+
+ case PLAYER_JOINT_ORDER::LSIDE_TO_L_START:
+ case PLAYER_JOINT_ORDER::LMIDDLE_TO_LL_START:
+ m_JointDescriptions[i].iMotionTwist = 1;
+ m_JointDescriptions[i].iMotionSwing1 = 1;
+ m_JointDescriptions[i].iMotionSwing2 = 1;
+ m_JointDescriptions[i].fLinearLimit = 0.f;
+ m_JointDescriptions[i].fTwistAbsDeg = 15.f;
+ m_JointDescriptions[i].fSwingDeg = 15.f;
+ break;
+
+ case PLAYER_JOINT_ORDER::LSIDE_TO_L_END:
+ case PLAYER_JOINT_ORDER::LMIDDLE_TO_LL_END:
+ break;
+ }
+ default:
+ break;
+ }
+
+ //m_JointDescriptions[i].iMotionTwist = 0;
+ //m_JointDescriptions[i].iMotionSwing1 = 0;
+ //m_JointDescriptions[i].iMotionSwing2 = 0;
+ m_JointDescriptions[i].ApplyToJoint(*m_pDynamicJoints[i]);
}
-#endif // _DEBUG
return S_OK;
}
-
-CPlayerRobe* CPlayerRobe::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
-{
- CPlayerRobe* pInstance = new CPlayerRobe(pDevice, pContext);
-
- if (FAILED(pInstance->Initialize_Prototype()))
- {
- MSG_BOX("Failed to Created : CPlayerRobe");
- SAFE_RELEASE(pInstance);
- }
-
- return pInstance;
-}
-
-CGameObject* CPlayerRobe::Clone(void* pArg, CGameObject* pOwner)
-{
- CPlayerRobe* pInstance = new CPlayerRobe(*this);
- pInstance->m_pOwner = pOwner;
- if (FAILED(pInstance->Initialize(pArg)))
- {
- MSG_BOX("Failed to Cloned : CPlayerRobe");
- SAFE_RELEASE(pInstance);
- }
-
- return pInstance;
-}
-
-void CPlayerRobe::Free()
-{
- __super::Free();
-#ifdef _DEBUG
- SAFE_RELEASE(m_pDepthStencilStateNone);
-#endif // _DEBUG
- SAFE_RELEASE(m_pRightLeg);
- SAFE_RELEASE(m_pLower0Bound);
- SAFE_RELEASE(m_pLower1Bound);
- SAFE_RELEASE(m_pLeftLeg);
- SAFE_RELEASE(m_pRobeMainAnchor);
- for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::END); ++i) {
- SAFE_RELEASE(m_pRobeJointRoute[i]);
- }
- for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) {
- SAFE_RELEASE(m_pRobeJointAnchor[i]);
- }
-}
#ifdef _DEBUG
void CPlayerRobe::Describe_Entity()
diff --git a/Jusin154_Team3D/Client/Private/PlayerRobe_Initialize.cpp b/Jusin154_Team3D/Client/Private/PlayerRobe_Initialize.cpp
new file mode 100644
index 000000000..23fd682c4
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/PlayerRobe_Initialize.cpp
@@ -0,0 +1,548 @@
+#include "pch.h"
+#include "PlayerRobe.h"
+#include "GameInstance.h"
+
+CPlayerRobe::CPlayerRobe(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) : CPartObject(pDevice, pContext) { }
+CPlayerRobe::CPlayerRobe(const CPlayerRobe& Prototype) : CPartObject(Prototype) { }
+HRESULT CPlayerRobe::Helper_RouteJointGenerater(PHYSX_JOINT eType, CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC& Desc_Body, ROUTE_DESC& Desc_Route, _matrix* xmAnchorMatricesWorld)
+{
+ if (PHYSX_JOINT::D6 == eType) {
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) {
+ return E_FAIL;
+ }
+ m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(xmAnchorMatricesWorld[Desc_Route.iStartBoneIndex].r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true);
+
+ PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iStartBoneIndex]->Get_Actor();
+ PSX::PxRigidDynamic* routeRigidActor = m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor();
+ PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor();
+
+ PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y--
+ PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++
+
+ m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose);
+ m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose);
+ }
+ //else if (PHYSX_JOINT::FIXED == eType) {
+ // if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) {
+ // return E_FAIL;
+ // }
+ // m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(xmAnchorMatricesWorld[Desc_Route.iStartBoneIndex].r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true);
+
+ // PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iStartBoneIndex]->Get_Actor();
+ // PSX::PxRigidDynamic* routeRigidActor = m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor();
+ // PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor();
+
+ // PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y--
+ // PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++
+
+ // m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxFixedJoint(startAnchorRigidActor, routeRigidActor, startJointWorldPose);
+ // m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxFixedJoint(routeRigidActor, endAnchorRigidActor, endJointWorldPose);
+ //}
+
+ return S_OK;
+}
+HRESULT CPlayerRobe::Ready_Components()
+{
+ __super::Ready_Components(nullptr);
+
+ _matrix socketWorld = XMLoadFloat4x4(m_pSocketMatrix) * m_pParentTransformCom->Get_XMWorldMatrix();
+ _matrix xmAnchorMatricesWorld[ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END)] = { };
+ for (_uint iBoneIndex = 0; iBoneIndex < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++iBoneIndex) {
+ xmAnchorMatricesWorld[iBoneIndex] = XMLoadFloat4x4(&m_ReconstructedJointAnchorMatirces[iBoneIndex]) * socketWorld;
+ }
+#pragma region BASIC_COMP
+ { // LLEG
+ CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
+ Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG);
+ Desc.bAutoOwnerTranslation = false;
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_Leg"), (CComponent**)&m_pLeftLeg, &Desc))) {
+ return E_FAIL;
+ }
+ }
+ { // RLEG
+ CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
+ Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG);
+ Desc.bAutoOwnerTranslation = false;
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_Leg"), (CComponent**)&m_pRightLeg, &Desc))) {
+ return E_FAIL;
+ }
+ }
+
+ { // LTHIGH
+ CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
+ Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG);
+ Desc.bAutoOwnerTranslation = false;
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_Leg"), (CComponent**)&m_pLeftThigh, &Desc))) {
+ return E_FAIL;
+ }
+ }
+ { // RTHIGH
+ CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
+ Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG);
+ Desc.bAutoOwnerTranslation = false;
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_Leg"), (CComponent**)&m_pRightThigh, &Desc))) {
+ return E_FAIL;
+ }
+ }
+ { // L0BOUND
+ CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
+ Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG);
+ Desc.bAutoOwnerTranslation = false;
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_LowerBound"), (CComponent**)&m_pLower0Bound, &Desc))) {
+ return E_FAIL;
+ }
+ }
+ { // L1BOUND
+ CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
+ Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG);
+ Desc.bAutoOwnerTranslation = false;
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_LowerBound"), (CComponent**)&m_pLower1Bound, &Desc))) {
+ return E_FAIL;
+ }
+ }
+#pragma endregion
+#pragma region SOCKET
+#pragma region SOCKET_DECLARE
+ { // RobeSocket
+ { // Fixed_MainAnchor
+ CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
+ Desc.iSubKind = ENUM_CLASS(PXOBJECT::JOINT_ANCHOR);
+ Desc.bAutoOwnerTranslation = false;
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ANCHOR"), (CComponent**)&m_pRobeMainAnchor, &Desc))) {
+ return E_FAIL;
+ }
+ m_pRobeMainAnchor->Set_Kinematic(true);
+ m_pRobeMainAnchor->Set_Transform(socketWorld, true);
+#ifdef _DEBUG
+ m_pRobeMainAnchor->Set_Name("MainAnchor");
+#endif // _DEBUG
+ }
+ // SubAnchors
+ for (_int i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) {
+ CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
+ Desc.iSubKind = ENUM_CLASS(PXOBJECT::JOINT_ANCHOR);
+ Desc.bAutoOwnerTranslation = false;
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ANCHOR"), (CComponent**)&m_pRobeJointAnchor[i], &Desc))) {
+ return E_FAIL;
+ }
+
+ m_pRobeJointAnchor[i]->Set_Transform(xmAnchorMatricesWorld[i], true);
+#ifdef _DEBUG
+ m_pRobeJointAnchor[i]->Set_Name(PLAYER_JOINT_BONE_NAMES[i]);
+#endif // _DEBUG
+ }
+ }
+#pragma endregion
+ { // RobeRoute
+ CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc_Body = {};
+ ROUTE_DESC Desc_Route = {};
+ Desc_Body.bAutoOwnerTranslation = false;
+ Desc_Body.iSubKind = ENUM_CLASS(PXOBJECT::JOINT_ROUTE);
+ /*Origin_Linked_Routes*/
+ {
+ {
+ Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::ORIGIN_TO_RUP);
+ Desc_Route.iStartBoneIndex = -1;
+ Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTUP);
+ Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_RUP_START);
+ Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) {
+ return E_FAIL;
+ }
+ m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(socketWorld.r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true);
+ { // Joint
+ PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeMainAnchor->Get_Actor();
+ PSX::PxRigidDynamic* routeRigidActor = m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor();
+ PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor();
+
+ PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y--
+ PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++
+
+ m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose);
+ m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose);
+ }
+ }
+ {
+ Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::ORIGIN_TO_TUP);
+ Desc_Route.iStartBoneIndex = -1;
+ Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILUP);
+ Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_TUP_START);
+ Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) {
+ return E_FAIL;
+ }
+ m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(socketWorld.r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true);
+ { // Joint
+ PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeMainAnchor->Get_Actor();
+ PSX::PxRigidDynamic* routeRigidActor = m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor();
+ PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor();
+
+ PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y--
+ PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++
+
+ m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose);
+ m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose);
+ }
+ }
+ {
+ Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::ORIGIN_TO_LUP);
+ Desc_Route.iStartBoneIndex = -1;
+ Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTUP);
+ Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_LUP_START);
+ Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) {
+ return E_FAIL;
+ }
+ m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(socketWorld.r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true);
+ { // Joint
+ PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeMainAnchor->Get_Actor();
+ PSX::PxRigidDynamic* routeRigidActor = m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor();
+ PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor();
+
+ PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y--
+ PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++
+
+ m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose);
+ m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose);
+ }
+ }
+ {
+ Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::ORIGIN_TO_RSIDEUP);
+ Desc_Route.iStartBoneIndex = -1;
+ Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTSIDEUP);
+ Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_RSIDEUP_START);
+ Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) {
+ return E_FAIL;
+ }
+ m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(socketWorld.r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true);
+ { // Joint
+ PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeMainAnchor->Get_Actor();
+ PSX::PxRigidDynamic* routeRigidActor = m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor();
+ PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor();
+
+ PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y--
+ PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++
+
+ m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose);
+ m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose);
+ }
+ }
+ {
+ Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::ORIGIN_TO_LSIDEUP);
+ Desc_Route.iStartBoneIndex = -1;
+ Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTSIDEUP);
+ Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_LSIDEUP_START);
+ Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) {
+ return E_FAIL;
+ }
+ m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(socketWorld.r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true);
+ { // Joint
+ PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeMainAnchor->Get_Actor();
+ PSX::PxRigidDynamic* routeRigidActor = m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor();
+ PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor();
+
+ PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y--
+ PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeVerticalJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++
+
+ m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose);
+ m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose);
+ }
+ }
+ }
+ /*UP_TO_MIDDLE*/
+ {
+ {
+ Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::RUP_TO_RMIDDLE);
+ Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTUP);
+ Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHT);
+ Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::RUP_TO_RMIDDLE_START);
+ Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
+ Helper_RouteJointGenerater(PHYSX_JOINT::D6, Desc_Body, Desc_Route, xmAnchorMatricesWorld);
+ }
+ {
+ Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::TUP_TO_TMIDDLE);
+ Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILUP);
+ Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAIL);
+ Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::TUP_TO_TMIDDLE_START);
+ Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
+ Helper_RouteJointGenerater(PHYSX_JOINT::D6, Desc_Body, Desc_Route, xmAnchorMatricesWorld);
+ }
+ {
+ Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::LUP_TO_LMIDDLE);
+ Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTUP);
+ Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFT);
+ Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::LUP_TO_LMIDDLE_START);
+ Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
+ Helper_RouteJointGenerater(PHYSX_JOINT::D6, Desc_Body, Desc_Route, xmAnchorMatricesWorld);
+ }
+ {
+ Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::RSIDEUP_TO_RSIDE);
+ Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTSIDEUP);
+ Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTSIDE);
+ Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::RSIDEUP_TO_RSIDE_START);
+ Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
+ Helper_RouteJointGenerater(PHYSX_JOINT::D6, Desc_Body, Desc_Route, xmAnchorMatricesWorld);
+ }
+ {
+ Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::LSIDEUP_TO_LSIDE);
+ Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTSIDEUP);
+ Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTSIDE);
+ Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::LSIDEUP_TO_LSIDE_START);
+ Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
+ Helper_RouteJointGenerater(PHYSX_JOINT::D6, Desc_Body, Desc_Route, xmAnchorMatricesWorld);
+ }
+ }
+ /*MIDDLE_TO_DOWN*/
+ {
+ {
+ Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::RMIDDLE_TO_RR);
+ Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHT);
+ Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTDOWN);
+ Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::RMIDDLE_TO_RR_START);
+ Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
+ Helper_RouteJointGenerater(PHYSX_JOINT::D6, Desc_Body, Desc_Route, xmAnchorMatricesWorld);
+ }
+ {
+ Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::RSIDE_TO_R);
+ Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTSIDE);
+ Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTDOWNSIDE);
+ Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::RSIDE_TO_R_START);
+ Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
+ Helper_RouteJointGenerater(PHYSX_JOINT::D6, Desc_Body, Desc_Route, xmAnchorMatricesWorld);
+ }
+ {
+ Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::TMIDDLE_TO_TR);
+ Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAIL);
+ Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILRIGHTDOWN);
+ Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::TMIDDLE_TO_TR_START);
+ Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
+ Helper_RouteJointGenerater(PHYSX_JOINT::D6, Desc_Body, Desc_Route, xmAnchorMatricesWorld);
+ }
+ {
+ Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::TMIDDLE_TO_TL);
+ Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAIL);
+ Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILLEFTDOWN);
+ Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::TMIDDLE_TO_TL_START);
+ Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
+ Helper_RouteJointGenerater(PHYSX_JOINT::D6, Desc_Body, Desc_Route, xmAnchorMatricesWorld);
+ }
+ {
+ Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::LSIDE_TO_L);
+ Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTSIDE);
+ Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTDOWNSIDE);
+ Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::LSIDE_TO_L_START);
+ Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
+ Helper_RouteJointGenerater(PHYSX_JOINT::D6, Desc_Body, Desc_Route, xmAnchorMatricesWorld);
+ }
+ {
+ Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::LMIDDLE_TO_LL);
+ Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFT);
+ Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTDOWN);
+ Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::LMIDDLE_TO_LL_START);
+ Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
+ Helper_RouteJointGenerater(PHYSX_JOINT::D6, Desc_Body, Desc_Route, xmAnchorMatricesWorld);
+ }
+ {
+ Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::LMIDDLE_TO_LL);
+ Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFT);
+ Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTDOWN);
+ Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::LMIDDLE_TO_LL_START);
+ Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
+ Helper_RouteJointGenerater(PHYSX_JOINT::D6, Desc_Body, Desc_Route, xmAnchorMatricesWorld);
+ }
+ }
+ }
+#pragma endregion
+ return S_OK;
+}
+HRESULT CPlayerRobe::Initialize_Prototype() { return S_OK; }
+HRESULT CPlayerRobe::Initialize(void* pArg)
+{
+ PlayerRobe_DESC* pDesc = static_cast (pArg);
+ m_pSocketMatrix = pDesc->pSocketMatrix;
+ m_pModelCom = pDesc->pModel;
+
+ m_ReconstructedJointAnchorMatirces.resize(ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END));
+
+ m_iBoneNum = m_pModelCom->Get_MeshInfluencedBoneNum(ENUM_CLASS(PLAYER_MESH_ORDER::ROBE_CLOTH));
+ m_PrevRobeBoneMatrices.resize(m_iBoneNum);
+ if (FAILED(m_pModelCom->Capture_BoneMatrices(ENUM_CLASS(PLAYER_MESH_ORDER::ROBE_CLOTH), m_PrevRobeBoneMatrices))) {
+ return E_FAIL;
+ }
+
+ // Leg-Thigh
+ m_pLeftFootLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("LeftFoot");
+ m_pLeftLegLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("LeftLeg");
+ m_pRightFootLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("RightFoot");
+ m_pRightLegLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("RightLeg");
+ m_pLeftLegUpLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("LeftUpLeg");
+ m_pRightLegUpLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("RightUpLeg");
+
+ // Circle
+ m_pLower1BoundMatrix = m_pLower0BoundMatrix = m_pModelCom->Get_BoneMatrixPtr("Hips");
+
+#pragma region READY_INITIAL_COMBINED_TRANSFORMATIONMATRIX
+ XMStoreFloat4x4(&m_PreTransformMatrix, XMLoadFloat4x4(m_pModelCom->Get_PreTransformMatrixPtr()));
+ for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) {
+ m_RobeJointAnchorMatrices[i] = m_pModelCom->Get_BoneLocalMatrixPtr(PLAYER_JOINT_BONE_NAMES[i]);
+ }
+ for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i)
+ {
+ _uint iParentIndex = UINT_MAX;
+ _bool bCopyPreTransform = false;
+
+ switch ((PLAYER_JOINT_BONE_ORDER)i)
+ {
+ case PLAYER_JOINT_BONE_ORDER::RIGHTUP:
+ case PLAYER_JOINT_BONE_ORDER::TAILUP:
+ case PLAYER_JOINT_BONE_ORDER::LEFTUP:
+ case PLAYER_JOINT_BONE_ORDER::RIGHTSIDEUP:
+ case PLAYER_JOINT_BONE_ORDER::LEFTSIDEUP:
+ bCopyPreTransform = true;
+ break;
+
+ case PLAYER_JOINT_BONE_ORDER::RIGHT:
+ iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTUP);
+ break;
+ case PLAYER_JOINT_BONE_ORDER::TAIL:
+ iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILUP);
+ break;
+ case PLAYER_JOINT_BONE_ORDER::LEFT:
+ iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTUP);
+ break;
+ case PLAYER_JOINT_BONE_ORDER::RIGHTSIDE:
+ iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTSIDEUP);
+ break;
+ case PLAYER_JOINT_BONE_ORDER::LEFTSIDE:
+ iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTSIDEUP);
+ break;
+
+ case PLAYER_JOINT_BONE_ORDER::RIGHTDOWN:
+ iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHT);
+ break;
+ case PLAYER_JOINT_BONE_ORDER::TAILRIGHTDOWN:
+ case PLAYER_JOINT_BONE_ORDER::TAILLEFTDOWN:
+ iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAIL);
+ break;
+ case PLAYER_JOINT_BONE_ORDER::LEFTDOWN:
+ iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFT);
+ break;
+ case PLAYER_JOINT_BONE_ORDER::RIGHTDOWNSIDE:
+ iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTSIDE);
+ break;
+ case PLAYER_JOINT_BONE_ORDER::LEFTDOWNSIDE:
+ iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTSIDE);
+ break;
+ default:
+ assert(false);
+ break;
+ }
+
+ if (true == bCopyPreTransform)
+ {
+ _matrix constructedMatrix = XMLoadFloat4x4(m_RobeJointAnchorMatrices[i]) * XMLoadFloat4x4(&m_PreTransformMatrix);
+
+ XMStoreFloat4x4(&m_ReconstructedJointAnchorMatirces[i], constructedMatrix);
+ continue;
+ }
+
+ _matrix constructedMatrix = XMLoadFloat4x4(m_RobeJointAnchorMatrices[i])
+ * XMLoadFloat4x4(&m_ReconstructedJointAnchorMatirces[iParentIndex]);
+
+ XMStoreFloat4x4(&m_ReconstructedJointAnchorMatirces[i], constructedMatrix);
+ }
+#pragma endregion
+
+ if (FAILED(__super::Initialize(pArg))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(Ready_Components())) {
+ return E_FAIL;
+ }
+
+ D6JOINTDESC JointDesc = D6JOINTDESC();
+ for (_uint i = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_RUP_START); i < ENUM_CLASS(PLAYER_JOINT_ORDER::END); ++i) {
+ JointDesc.ApplyToJoint(*m_pDynamicJoints[i]);
+ m_JointDescriptions[i] = JointDesc;
+ }
+
+ Update_LegsPosition();
+ Update_RobeJoints();
+
+#ifdef _DEBUG
+ m_pSubShape = (GeometricPrimitive::CreateSphere(m_pContext, 0.05f, 22, false, false));
+ m_pMainShape = (GeometricPrimitive::CreateCylinder(m_pContext, 0.3f, 0.075f, 22, false));
+ D3D11_DEPTH_STENCIL_DESC depthStencilDesc = {};
+ depthStencilDesc.DepthEnable = FALSE;
+ depthStencilDesc.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ZERO;
+ depthStencilDesc.DepthFunc = D3D11_COMPARISON_ALWAYS;
+ depthStencilDesc.StencilEnable = FALSE;
+
+ HRESULT result = m_pDevice->CreateDepthStencilState(&depthStencilDesc, &m_pDepthStencilStateNone);
+ if (FAILED(result)){
+ return E_FAIL;
+ }
+#endif // _DEBUG
+ return S_OK;
+}
+
+CPlayerRobe* CPlayerRobe::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CPlayerRobe* pInstance = new CPlayerRobe(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CPlayerRobe");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CPlayerRobe::Clone(void* pArg, CGameObject* pOwner)
+{
+ CPlayerRobe* pInstance = new CPlayerRobe(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CPlayerRobe");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CPlayerRobe::Free()
+{
+ __super::Free();
+#ifdef _DEBUG
+ SAFE_RELEASE(m_pDepthStencilStateNone);
+#endif // _DEBUG
+ SAFE_RELEASE(m_pRightLeg);
+ SAFE_RELEASE(m_pLeftLeg);
+ SAFE_RELEASE(m_pLeftThigh);
+ SAFE_RELEASE(m_pRightThigh);
+ SAFE_RELEASE(m_pLower0Bound);
+ SAFE_RELEASE(m_pLower1Bound);
+ SAFE_RELEASE(m_pRobeMainAnchor);
+ for (_uint i = 0; i < ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::END); ++i) {
+ SAFE_RELEASE(m_pRobeVerticalJointRoute[i]);
+ }
+ for (_uint i = 0; i < ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::END); ++i) {
+ SAFE_RELEASE(m_pRobeFixedJointRoute[i]);
+ }
+ for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) {
+ SAFE_RELEASE(m_pRobeJointAnchor[i]);
+ }
+ if (nullptr != m_pMainShape) {
+ m_pMainShape.release();
+ m_pMainShape = nullptr;
+ }
+ if (nullptr != m_pSubShape) {
+ m_pSubShape.release();
+ m_pSubShape = nullptr;
+ }
+}
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/Ranrok.cpp b/Jusin154_Team3D/Client/Private/Ranrok.cpp
index 72a70b398..4e8d24960 100644
--- a/Jusin154_Team3D/Client/Private/Ranrok.cpp
+++ b/Jusin154_Team3D/Client/Private/Ranrok.cpp
@@ -399,10 +399,10 @@ void CRanrok::OnCollision(CGameObject* pOther, void* pDesc)
Add_Event(pairAnimInfo.first,
[&]() {m_bDisolve = true; },
- 0.75f);
+ 0.15f);
Add_Event(pairAnimInfo.first,
[&]() {m_pFSM->Change_State(FSMSTATE::TUCKED); },
- 0.95f);
+ 0.5f);
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
return;
}
@@ -415,10 +415,10 @@ void CRanrok::OnCollision(CGameObject* pOther, void* pDesc)
Add_Event(pairAnimInfo.first,
[&]() {m_bDisolve = true; },
- 0.75f);
+ 0.15f);
Add_Event(pairAnimInfo.first,
[&]() {m_pFSM->Change_State(FSMSTATE::TUCKED); },
- 0.95f);
+ 0.5f);
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
return;
}
@@ -432,10 +432,10 @@ void CRanrok::OnCollision(CGameObject* pOther, void* pDesc)
Add_Event(pairAnimInfo.first,
[&]() {m_bDisolve = true; },
- 0.75f);
+ 0.15f);
Add_Event(pairAnimInfo.first,
[&]() {m_pFSM->Change_State(FSMSTATE::TUCKED); },
- 0.95f);
+ 0.5f);
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
return;
}
@@ -660,6 +660,9 @@ HRESULT CRanrok::Render_Nonblend()
if (FAILED(m_pModelCom->Render(i))) {
return E_FAIL;
}
+ if (true == m_bDrawOutLine) {
+ m_pGameInstance->End_OutLine_Write();
+ }
}
/*if (m_bDrawOutLine) {
diff --git a/Jusin154_Team3D/Client/Private/Ranrok_Breath.cpp b/Jusin154_Team3D/Client/Private/Ranrok_Breath.cpp
index de8cf6b89..40b798602 100644
--- a/Jusin154_Team3D/Client/Private/Ranrok_Breath.cpp
+++ b/Jusin154_Team3D/Client/Private/Ranrok_Breath.cpp
@@ -6,6 +6,7 @@
#include "Wand.h"
#include "Player.h"
#include "InfoInstance.h"
+#include "Ranrok.h"
CRanrok_Breath::CRanrok_Breath(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CEffect_Container{ pDevice, pContext }
@@ -48,11 +49,13 @@ HRESULT CRanrok_Breath::Initialize(void* pArg)
m_pBreath_Black = Get_PartObject("Breath_Black");
m_pBreathSlog = Get_PartObject("BreathSlog");
m_pMouthFire = Get_PartObject("MouthFire");
+ m_pLand_Decal = Get_PartObject("Land_Decal");
SAFE_ADDREF(m_pBreath);
SAFE_ADDREF(m_pBreath_Black);
SAFE_ADDREF(m_pBreathSlog);
SAFE_ADDREF(m_pMouthFire);
+ SAFE_ADDREF(m_pLand_Decal);
m_fDuration = 5.f;
@@ -130,9 +133,9 @@ HRESULT CRanrok_Breath::Pre_Setting(CGameObject* pObject, void* pArg)
/* 브레스 시간 제어 */
- _float fBreathTime = *static_cast<_float*>(pArg);
+ BREATH_INFO BreathDesc = *static_cast(pArg);
- Set_BreathTime(fBreathTime);
+ Set_BreathTime(BreathDesc.fTime);
/* 초기 객체 비지블*/
@@ -146,7 +149,7 @@ HRESULT CRanrok_Breath::Pre_Setting(CGameObject* pObject, void* pArg)
/* 초기 객체 위치 초기화*/
- _matrix BoneMat = XMLoadFloat4x4(m_pOwner->Get_Component()->Get_BoneMatrixPtr("jaw"));
+ _matrix BoneMat = XMLoadFloat4x4(m_pOwner->Get_Component()->Get_BoneMatrixPtr("tongue_01"));
for (int i = 0; i < 3; ++i) {
BoneMat.r[i] = XMVector3Normalize(BoneMat.r[i]);
@@ -180,6 +183,33 @@ HRESULT CRanrok_Breath::Pre_Setting(CGameObject* pObject, void* pArg)
m_isParticleEnd = false;
m_isStartRayCast = false;
+
+
+
+ /* 바닥 페이즈 일때*/
+
+ if (static_cast(BreathDesc.iPase) == CRanrok::RANROK_PHASE::PHASE_GROUND)
+ {
+ m_pLand_Decal->Set_Visible(true);
+
+ _vector vOwnerPos = m_pOwner->Get_Component()->Get_Position();
+ CUnit* pPlayer = m_pInfoInstance->Get_NearestPlayerAlly(m_pOwner->Get_WorldPostion()).first;
+
+ if (pPlayer == nullptr)
+ return E_FAIL;
+
+ _vector vPlayer_FootPos = pPlayer->Get_Component()->Get_FootPosition();
+
+ XMStoreFloat4(&m_vTargetPos, vPlayer_FootPos);
+
+ _vector vCompute_Pos = XMVectorSetY(vOwnerPos, XMVectorGetY(vPlayer_FootPos));
+
+ m_pLand_Decal->Get_Component()->Set_State(STATE::POSITION, vCompute_Pos);
+
+ m_pLand_Decal->Get_Component()->Set_Loop(true);
+
+ }
+
return S_OK;
}
@@ -254,6 +284,7 @@ void CRanrok_Breath::OnCollision(CGameObject* pOther, void* pDesc)
pSplatterBottom0->Set_Visible(true);
pSplatterBottom0->Get_Component()->Set_State(STATE::POSITION, vPos + vDir * 3.f);
+ m_pLand_Decal->Get_Component()->Set_Loop(false);
XMStoreFloat4(&m_vPreCollisionPos, vPos);
}
@@ -304,7 +335,7 @@ void CRanrok_Breath::Free()
SAFE_RELEASE(m_pBreath_Black);
SAFE_RELEASE(m_pBreathSlog);
SAFE_RELEASE(m_pMouthFire);
-
+ SAFE_RELEASE(m_pLand_Decal);
//SAFE_RELEASE(m_pFireBall_Tail);
}
#ifdef _DEBUG
diff --git a/Jusin154_Team3D/Client/Private/Ranrok_GroundPulse.cpp b/Jusin154_Team3D/Client/Private/Ranrok_GroundPulse.cpp
new file mode 100644
index 000000000..9fb2039a4
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/Ranrok_GroundPulse.cpp
@@ -0,0 +1,207 @@
+#include "pch.h"
+#include "Ranrok_GroundPulse.h"
+
+#include "GameInstance.h"
+#include "EffectParts.h"
+#include "Wand.h"
+#include "Player.h"
+#include "InfoInstance.h"
+
+CRanrok_GroundPulse::CRanrok_GroundPulse(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CEffect_Container{ pDevice, pContext }
+{
+}
+
+CRanrok_GroundPulse::CRanrok_GroundPulse(const CRanrok_GroundPulse& rhs)
+ : CEffect_Container(rhs),
+ m_pInfoInstance(CInfoInstance::GetInstance())
+{
+ SAFE_ADDREF(m_pInfoInstance);
+}
+
+HRESULT CRanrok_GroundPulse::Initialize_Prototype()
+{
+
+ if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokGroundPulse")))
+ return E_FAIL;
+
+
+ return S_OK;
+
+}
+
+HRESULT CRanrok_GroundPulse::Initialize(void* pArg)
+{
+ if (FAILED(__super::Initialize(pArg)))
+ return E_FAIL;
+
+ if (FAILED(Ready_Components(pArg)))
+ return E_FAIL;
+
+ if (FAILED(Create_Effect()))
+ return E_FAIL;
+
+
+ m_wstrEffectName = L"RanrokGroundPulse";
+
+
+
+ m_fDuration = 10.f;
+
+
+ return S_OK;
+}
+
+void CRanrok_GroundPulse::Priority_Update(_float fTimeDelta)
+{
+ __super::Priority_Update(fTimeDelta);
+
+}
+
+void CRanrok_GroundPulse::Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Update(fTimeDelta);
+
+ Update_Event(fTimeDelta);
+
+
+
+
+
+}
+
+void CRanrok_GroundPulse::Late_Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Late_Update(fTimeDelta);
+
+
+}
+
+HRESULT CRanrok_GroundPulse::Pre_Setting(CGameObject* pObject, void* pArg)
+{
+ if (FAILED(__super::Pre_Setting(pObject, nullptr)))
+ return E_FAIL;
+
+
+ /* 초기 객체 비지블*/
+
+ CEffectParts* pBottomDecal = Get_PartObject("Bottom_Decal");
+ CEffectParts* pBottomSplatter = Get_PartObject("BottomSplatter");
+ CEffectParts* pRed_Sphere = Get_PartObject("Red_Sphere");
+ CEffectParts* pRock_PT = Get_PartObject("Rock_PT");
+ CEffectParts* pSmoke = Get_PartObject("Smoke");
+
+ pBottomDecal->Set_Visible(true);
+ pBottomSplatter->Set_Visible(true);
+ pRock_PT->Set_Visible(true);
+ pSmoke->Set_Visible(true);
+ pRed_Sphere->Set_Visible(true);
+
+
+ /* 초기 객체 위치 초기화*/
+
+ _vector vOwnerPos = m_pOwner->Get_Component()->Get_Position();
+
+ pRed_Sphere->Get_Component()->Set_WorldMatrix(m_pOwner->Get_Component()->Get_XMWorldMatrix());
+ pRed_Sphere->Get_Component()->Set_State(STATE::POSITION, vOwnerPos);
+
+ CUnit* pPlayer = m_pInfoInstance->Get_NearestPlayerAlly(m_pOwner->Get_WorldPostion()).first;
+
+ if (pPlayer == nullptr)
+ return E_FAIL;
+
+ _vector vPlayer_FootPos = pPlayer->Get_Component()->Get_FootPosition();
+
+ XMStoreFloat4(&m_vTargetPos, vPlayer_FootPos);
+
+ _vector vCompute_Pos = XMVectorSetY(vOwnerPos, XMVectorGetY(vPlayer_FootPos));
+
+ pBottomDecal->Get_Component()->Set_State(STATE::POSITION, vCompute_Pos);
+ pBottomSplatter->Get_Component()->Set_State(STATE::POSITION, vCompute_Pos);
+ pRock_PT->Get_Component()->Set_State(STATE::POSITION, vCompute_Pos);
+ pSmoke->Get_Component()->Set_State(STATE::POSITION, vCompute_Pos);
+
+
+ return S_OK;
+}
+
+HRESULT CRanrok_GroundPulse::Ready_Components(void* pArg)
+{
+ if (FAILED(__super::Ready_Components(pArg))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CRanrok_GroundPulse::Ready_Child()
+{
+ return S_OK;
+}
+
+CRanrok_GroundPulse* CRanrok_GroundPulse::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CRanrok_GroundPulse* pInstance = new CRanrok_GroundPulse(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CRanrok_GroundPulse");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+
+CGameObject* CRanrok_GroundPulse::Clone(void* pArg, CGameObject* pOwner)
+{
+ CRanrok_GroundPulse* pInstance = new CRanrok_GroundPulse(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CRanrok_GroundPulse");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CRanrok_GroundPulse::OnCollision(CGameObject* pOther, void* pDesc)
+{
+ if (m_bHit == false)
+ return;
+
+ ON_COLLISION_INFO CollisionDesc = *static_cast(pDesc);
+
+ _vector vPos = XMLoadFloat4(&CollisionDesc.vWorldPos);
+
+
+}
+
+void CRanrok_GroundPulse::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pInfoInstance);
+
+
+}
+#ifdef _DEBUG
+void CRanrok_GroundPulse::Describe_Entity()
+{
+
+}
+#endif
+
+HRESULT CRanrok_GroundPulse::Bind_ShaderResources()
+{
+ return S_OK;
+}
+
+
diff --git a/Jusin154_Team3D/Client/Private/Ranrok_Land.cpp b/Jusin154_Team3D/Client/Private/Ranrok_Land.cpp
new file mode 100644
index 000000000..2d82db520
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/Ranrok_Land.cpp
@@ -0,0 +1,201 @@
+#include "pch.h"
+#include "Ranrok_Land.h"
+
+#include "GameInstance.h"
+#include "EffectParts.h"
+#include "Wand.h"
+#include "Player.h"
+#include "InfoInstance.h"
+
+CRanrok_Land::CRanrok_Land(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CEffect_Container{ pDevice, pContext }
+{
+}
+
+CRanrok_Land::CRanrok_Land(const CRanrok_Land& rhs)
+ : CEffect_Container(rhs),
+ m_pInfoInstance(CInfoInstance::GetInstance())
+{
+ SAFE_ADDREF(m_pInfoInstance);
+}
+
+HRESULT CRanrok_Land::Initialize_Prototype()
+{
+
+ if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokLand")))
+ return E_FAIL;
+
+ return S_OK;
+
+}
+
+HRESULT CRanrok_Land::Initialize(void* pArg)
+{
+ if (FAILED(__super::Initialize(pArg)))
+ return E_FAIL;
+
+ if (FAILED(Ready_Components(pArg)))
+ return E_FAIL;
+
+ if (FAILED(Create_Effect()))
+ return E_FAIL;
+
+
+ m_wstrEffectName = L"RanrokLand";
+
+
+
+ m_fDuration = 5.f;
+
+
+ return S_OK;
+}
+
+void CRanrok_Land::Priority_Update(_float fTimeDelta)
+{
+ __super::Priority_Update(fTimeDelta);
+
+}
+
+void CRanrok_Land::Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Update(fTimeDelta);
+
+ Update_Event(fTimeDelta);
+
+
+
+
+
+}
+
+void CRanrok_Land::Late_Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Late_Update(fTimeDelta);
+
+
+}
+
+HRESULT CRanrok_Land::Pre_Setting(CGameObject* pObject, void* pArg)
+{
+ if (FAILED(__super::Pre_Setting(pObject, nullptr)))
+ return E_FAIL;
+
+
+ /* 초기 객체 비지블*/
+
+ CEffectParts* pBottom_Decal = Get_PartObject("Bottom_Decal");
+ CEffectParts* pRock_PT = Get_PartObject("Rock_PT");
+ CEffectParts* pSmoke = Get_PartObject("Smoke");
+
+
+ pBottom_Decal->Set_Visible(true);
+ pSmoke->Set_Visible(true);
+ pRock_PT->Set_Visible(true);
+
+
+ /* 초기 객체 위치 초기화*/
+
+
+ _vector vOwnerPos = m_pOwner->Get_Component()->Get_Position();
+
+
+ CUnit* pPlayer = m_pInfoInstance->Get_NearestPlayerAlly(m_pOwner->Get_WorldPostion()).first;
+
+ if (pPlayer == nullptr)
+ return E_FAIL;
+
+ _vector vPlayer_FootPos = pPlayer->Get_Component()->Get_FootPosition();
+
+ XMStoreFloat4(&m_vTargetPos, vPlayer_FootPos);
+
+
+ _vector vCompute_Pos = XMVectorSetY(vOwnerPos, XMVectorGetY(vPlayer_FootPos));
+
+ pBottom_Decal->Get_Component