@@ -35,6 +35,7 @@ x64/
|
||||
Release/
|
||||
Debug/
|
||||
Inc/
|
||||
enc_temp_folder/
|
||||
Jusin154_Team3D/Client/Bin/Resources/
|
||||
|
||||
# Imgui 임시 파일
|
||||
|
||||
@@ -10,12 +10,16 @@ HINSTANCE g_hInstance;
|
||||
HWND g_hWnd;
|
||||
WCHAR szTitle[MAX_LOADSTRING];
|
||||
WCHAR szWindowClass[MAX_LOADSTRING];
|
||||
_bool g_bFullscreen = false;
|
||||
RECT g_rcWindowed = {};
|
||||
|
||||
|
||||
|
||||
ATOM MyRegisterClass(HINSTANCE hInstance);
|
||||
BOOL InitInstance(HINSTANCE, int);
|
||||
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
|
||||
INT_PTR CALLBACK About(HWND, UINT, WPARAM, LPARAM);
|
||||
void ToggleFullscreen();
|
||||
extern IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
|
||||
@@ -197,30 +201,24 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
|
||||
g_hWnd = hWnd;
|
||||
|
||||
#ifndef _DEBUG
|
||||
//int screenX = GetSystemMetrics(SM_CXSCREEN);
|
||||
//int screenY = GetSystemMetrics(SM_CYSCREEN);
|
||||
{
|
||||
g_bFullscreen = true;
|
||||
|
||||
//HWND hWnd = CreateWindowW(
|
||||
// szWindowClass,
|
||||
// szTitle,
|
||||
// WS_POPUP,
|
||||
// 0, 0,
|
||||
// screenX, screenY,
|
||||
// nullptr,
|
||||
// nullptr,
|
||||
// hInstance,
|
||||
// nullptr
|
||||
//);
|
||||
SetWindowLong(g_hWnd, GWL_STYLE, GetWindowLong(g_hWnd, GWL_STYLE) & ~WS_OVERLAPPEDWINDOW);
|
||||
|
||||
//if (!hWnd)
|
||||
// return FALSE;
|
||||
_int screenX = GetSystemMetrics(SM_CXSCREEN);
|
||||
_int screenY = GetSystemMetrics(SM_CYSCREEN);
|
||||
|
||||
//g_hWnd = hWnd;
|
||||
SetWindowPos(
|
||||
g_hWnd,
|
||||
HWND_TOP,
|
||||
0, 0,
|
||||
screenX, screenY,
|
||||
SWP_NOOWNERZORDER | SWP_FRAMECHANGED
|
||||
);
|
||||
}
|
||||
#endif
|
||||
|
||||
//ShowWindow(hWnd, SW_SHOW);
|
||||
//UpdateWindow(hWnd);
|
||||
|
||||
#endif // !_DEBUG
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -235,9 +233,61 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
case WM_DESTROY:
|
||||
PostQuitMessage(0);
|
||||
break;
|
||||
case WM_SYSKEYDOWN:
|
||||
{
|
||||
if (wParam == VK_RETURN && (lParam & (1 << 29)))
|
||||
{
|
||||
ToggleFullscreen();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
return DefWindowProc(hWnd, message, wParam, lParam);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void ToggleFullscreen()
|
||||
{
|
||||
DWORD style = GetWindowLong(g_hWnd, GWL_STYLE);
|
||||
|
||||
if (!g_bFullscreen)
|
||||
{
|
||||
GetWindowRect(g_hWnd, &g_rcWindowed);
|
||||
|
||||
SetWindowLong(g_hWnd, GWL_STYLE, style & ~WS_OVERLAPPEDWINDOW);
|
||||
|
||||
_int screenX = GetSystemMetrics(SM_CXSCREEN);
|
||||
_int screenY = GetSystemMetrics(SM_CYSCREEN);
|
||||
|
||||
SetWindowPos(
|
||||
g_hWnd,
|
||||
HWND_TOP,
|
||||
0, 0,
|
||||
screenX, screenY,
|
||||
SWP_NOOWNERZORDER | SWP_FRAMECHANGED
|
||||
);
|
||||
|
||||
g_bFullscreen = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
SetWindowLong(g_hWnd, GWL_STYLE, style | WS_OVERLAPPEDWINDOW);
|
||||
|
||||
SetWindowPos(
|
||||
g_hWnd,
|
||||
HWND_NOTOPMOST,
|
||||
g_rcWindowed.left,
|
||||
g_rcWindowed.top,
|
||||
g_rcWindowed.right - g_rcWindowed.left,
|
||||
g_rcWindowed.bottom - g_rcWindowed.top,
|
||||
SWP_NOOWNERZORDER | SWP_FRAMECHANGED
|
||||
);
|
||||
|
||||
g_bFullscreen = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,7 +179,9 @@ call Update_Resources.bat
|
||||
<ClInclude Include="..\Public\Goblin_Assassin.h" />
|
||||
<ClInclude Include="..\Public\Goblin_Assassin_Spector.h" />
|
||||
<ClInclude Include="..\Public\Goblin_Sword.h" />
|
||||
<ClInclude Include="..\Public\Human_Duelist.h" />
|
||||
<ClInclude Include="..\public\InstancedProp_Light.h" />
|
||||
<ClInclude Include="..\Public\RandomNpc.h" />
|
||||
<ClInclude Include="..\Public\Ranrok_Breath.h" />
|
||||
<ClInclude Include="..\Public\Ranrok_Charge.h" />
|
||||
<ClInclude Include="..\Public\Ranrok_FireBall.h" />
|
||||
@@ -189,13 +191,18 @@ call Update_Resources.bat
|
||||
<ClInclude Include="..\public\Dialogue_Font.h" />
|
||||
<ClInclude Include="..\public\NPCInteraction.h" />
|
||||
<ClInclude Include="..\public\PointLight.h" />
|
||||
<ClInclude Include="..\Public\Ranrok_GroundPulse.h" />
|
||||
<ClInclude Include="..\Public\Ranrok_Hit.h" />
|
||||
<ClInclude Include="..\Public\Ranrok_Impact.h" />
|
||||
<ClInclude Include="..\Public\Ranrok_Land.h" />
|
||||
<ClInclude Include="..\Public\Ranrok_Point.h" />
|
||||
<ClInclude Include="..\Public\PlayerRobe.h" />
|
||||
<ClInclude Include="..\Public\Player_ENUM.h" />
|
||||
<ClInclude Include="..\Public\Ranrok_Pulse.h" />
|
||||
<ClInclude Include="..\Public\Ranrok_Rush_Bottom.h" />
|
||||
<ClInclude Include="..\Public\ReparoObject.h" />
|
||||
<ClInclude Include="..\Public\Ride_BboosterBar.h" />
|
||||
<ClInclude Include="..\Public\Ride_Bbooster_Slot.h" />
|
||||
<ClInclude Include="..\Public\Ride_BoosterBar.h" />
|
||||
<ClInclude Include="..\Public\Ride_Booster_Slot.h" />
|
||||
<ClInclude Include="..\Public\Ride_HpBar.h" />
|
||||
<ClInclude Include="..\Public\Ride_HpSlot.h" />
|
||||
<ClInclude Include="..\Public\Ride_Info.h" />
|
||||
@@ -452,7 +459,11 @@ call Update_Resources.bat
|
||||
<ClCompile Include="..\Private\Goblin_Assassin_Spector.cpp" />
|
||||
<ClCompile Include="..\Private\Goblin_Assassin_States.cpp" />
|
||||
<ClCompile Include="..\Private\Goblin_Sword.cpp" />
|
||||
<ClCompile Include="..\Private\Human_Duelist.cpp" />
|
||||
<ClCompile Include="..\Private\Human_Duelist_States.cpp" />
|
||||
<ClCompile Include="..\private\InstancedProp_Light.cpp" />
|
||||
<ClCompile Include="..\Private\PlayerRobe_Initialize.cpp" />
|
||||
<ClCompile Include="..\Private\RandomNpc.cpp" />
|
||||
<ClCompile Include="..\Private\Ranrok_Breath.cpp" />
|
||||
<ClCompile Include="..\Private\Ranrok_Charge.cpp" />
|
||||
<ClCompile Include="..\Private\Ranrok_FireBall.cpp" />
|
||||
@@ -462,12 +473,17 @@ call Update_Resources.bat
|
||||
<ClCompile Include="..\private\Dialogue_Font.cpp" />
|
||||
<ClCompile Include="..\private\NPCInteraction.cpp" />
|
||||
<ClCompile Include="..\private\PointLight.cpp" />
|
||||
<ClCompile Include="..\Private\Ranrok_GroundPulse.cpp" />
|
||||
<ClCompile Include="..\Private\Ranrok_Hit.cpp" />
|
||||
<ClCompile Include="..\Private\Ranrok_Impact.cpp" />
|
||||
<ClCompile Include="..\Private\Ranrok_Land.cpp" />
|
||||
<ClCompile Include="..\Private\Ranrok_Point.cpp" />
|
||||
<ClCompile Include="..\Private\PlayerRobe.cpp" />
|
||||
<ClCompile Include="..\Private\Ranrok_Pulse.cpp" />
|
||||
<ClCompile Include="..\Private\Ranrok_Rush_Bottom.cpp" />
|
||||
<ClCompile Include="..\Private\ReparoObject.cpp" />
|
||||
<ClCompile Include="..\Private\Ride_BboosterBar.cpp" />
|
||||
<ClCompile Include="..\Private\Ride_Bbooster_Slot.cpp" />
|
||||
<ClCompile Include="..\Private\Ride_BoosterBar.cpp" />
|
||||
<ClCompile Include="..\Private\Ride_Booster_Slot.cpp" />
|
||||
<ClCompile Include="..\Private\Ride_HpBar.cpp" />
|
||||
<ClCompile Include="..\Private\Ride_HpSlot.cpp" />
|
||||
<ClCompile Include="..\Private\Ride_Info.cpp" />
|
||||
|
||||
@@ -809,11 +809,11 @@
|
||||
<ClInclude Include="..\Public\State_Fear.h">
|
||||
<Filter>04.Mechanic\State\Focus\Fear</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Ride_Bbooster_Slot.h">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_Bbooster_Slot</Filter>
|
||||
<ClInclude Include="..\Public\Ride_Booster_Slot.h">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_Booster_Slot</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Ride_BboosterBar.h">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_BboosterBar</Filter>
|
||||
<ClInclude Include="..\Public\Ride_BoosterBar.h">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_BoosterBar</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Ride_HpBar.h">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_HpBar</Filter>
|
||||
@@ -836,6 +836,27 @@
|
||||
<ClInclude Include="..\Public\Camera_Model.h">
|
||||
<Filter>02.GameObjects\Cameras\Camera_Model</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Ranrok_Impact.h">
|
||||
<Filter>02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrol_Impact</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Ranrok_Hit.h">
|
||||
<Filter>02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Nomal_Hit</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\RandomNpc.h">
|
||||
<Filter>02.GameObjects\NPC\Ally\RandomNpc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Ranrok_Rush_Bottom.h">
|
||||
<Filter>02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Rush</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Ranrok_Land.h">
|
||||
<Filter>02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Land</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Ranrok_GroundPulse.h">
|
||||
<Filter>02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_GroundPulse</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Human_Duelist.h">
|
||||
<Filter>02.GameObjects\NPC\Hostile\Human_Duelist</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Client.ico">
|
||||
@@ -1713,12 +1734,6 @@
|
||||
<Filter Include="02.GameObjects\UI\GamePlay_Canvas\Ride_Panel">
|
||||
<UniqueIdentifier>{5bf233fa-6f9c-40d5-85c6-adbc7fcf7d28}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_Bbooster_Slot">
|
||||
<UniqueIdentifier>{9c357e12-18b3-461e-b74c-76f85280796f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_BboosterBar">
|
||||
<UniqueIdentifier>{8b69e309-b90b-47f6-8f2d-3dd778b468fe}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_HpBar">
|
||||
<UniqueIdentifier>{d3ad8db7-ff00-498d-ba50-aa4c38a56d4a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@@ -1737,6 +1752,33 @@
|
||||
<Filter Include="02.GameObjects\Cameras\Camera_Model">
|
||||
<UniqueIdentifier>{40504926-63cc-4132-ade2-5a789e1a82a6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Nomal_Hit">
|
||||
<UniqueIdentifier>{b537dfd4-fcad-401f-a49a-8fdafeb91ab7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrol_Impact">
|
||||
<UniqueIdentifier>{15ea8015-5b0a-4678-bf02-55b042ef4de4}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\NPC\Ally\RandomNpc">
|
||||
<UniqueIdentifier>{88b62177-01fc-424d-a444-4fb5fd4b2db5}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\NPC\Hostile\Human_Duelist">
|
||||
<UniqueIdentifier>{9bd903be-dc05-4dd6-9abc-d676be0b7f7e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Land">
|
||||
<UniqueIdentifier>{9cf44fef-f3be-409e-b530-6aef90db5c0c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_GroundPulse">
|
||||
<UniqueIdentifier>{c756e70b-1ba2-4a25-a177-b50bbc1a332a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Rush">
|
||||
<UniqueIdentifier>{eb8e52f5-0283-4acf-8fbb-0e734b7580e9}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_Booster_Slot">
|
||||
<UniqueIdentifier>{9c357e12-18b3-461e-b74c-76f85280796f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_BoosterBar">
|
||||
<UniqueIdentifier>{8b69e309-b90b-47f6-8f2d-3dd778b468fe}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Client.cpp">
|
||||
@@ -2493,11 +2535,11 @@
|
||||
<ClCompile Include="..\Private\State_Fear.cpp">
|
||||
<Filter>04.Mechanic\State\Focus\Fear</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Ride_Bbooster_Slot.cpp">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_Bbooster_Slot</Filter>
|
||||
<ClCompile Include="..\Private\Ride_Booster_Slot.cpp">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_Booster_Slot</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Ride_BboosterBar.cpp">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_BboosterBar</Filter>
|
||||
<ClCompile Include="..\Private\Ride_BoosterBar.cpp">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_BoosterBar</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Ride_HpBar.cpp">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_HpBar</Filter>
|
||||
@@ -2520,6 +2562,33 @@
|
||||
<ClCompile Include="..\Private\Camera_Model.cpp">
|
||||
<Filter>02.GameObjects\Cameras\Camera_Model</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Ranrok_Impact.cpp">
|
||||
<Filter>02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrol_Impact</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Ranrok_Hit.cpp">
|
||||
<Filter>02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Nomal_Hit</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\RandomNpc.cpp">
|
||||
<Filter>02.GameObjects\NPC\Ally\RandomNpc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Human_Duelist.cpp">
|
||||
<Filter>02.GameObjects\NPC\Hostile\Human_Duelist</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Human_Duelist_States.cpp">
|
||||
<Filter>02.GameObjects\NPC\Hostile\Human_Duelist</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\PlayerRobe_Initialize.cpp">
|
||||
<Filter>02.GameObjects\Player\Robe</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Ranrok_Rush_Bottom.cpp">
|
||||
<Filter>02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Rush</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Ranrok_Land.cpp">
|
||||
<Filter>02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Land</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Ranrok_GroundPulse.cpp">
|
||||
<Filter>02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_GroundPulse</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\Private\Goblin_States.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<CSpell_Slot>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CSpell_Slot**>(&m_pSpell_Slot))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Slot>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast <CSpell_Slot**>(&m_pSpell_Slot))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Spell_Slot"), m_pSpell_Slot);
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Overlay>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Overlay**>(&m_pSpell_Overlay1))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Overlay>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Overlay**>(&m_pSpell_Overlay1))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Spell_Overlay1"), m_pSpell_Overlay1);
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Overlay>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Overlay**>(&m_pSpell_Overlay2))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Overlay>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Overlay**>(&m_pSpell_Overlay2))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
static_cast<CUIObject*>(m_pSpell_Overlay2)->MoveX(481.f);
|
||||
Add_Element(TEXT("Spell_Overlay2"), m_pSpell_Overlay2);
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Overlay>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Overlay**>(&m_pSpell_Overlay3))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Overlay>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Overlay**>(&m_pSpell_Overlay3))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
static_cast<CUIObject*>(m_pSpell_Overlay3)->MoveX(582.f);
|
||||
Add_Element(TEXT("Spell_Overlay3"), m_pSpell_Overlay3);
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Overlay>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Overlay**>(&m_pSpell_Overlay4))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Overlay>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Overlay**>(&m_pSpell_Overlay4))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
static_cast<CUIObject*>(m_pSpell_Overlay4)->MoveX(683.f);
|
||||
Add_Element(TEXT("Spell_Overlay4"), m_pSpell_Overlay4);
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSlot_Number>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSlot_Number**>(&m_pSlot_Number))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSlot_Number>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CSlot_Number**>(&m_pSlot_Number))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Slot_Number"), m_pSlot_Number);
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CHpBarBG>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CHpBarBG**>(&m_pHpBarBG))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CHpBarBG>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CHpBarBG**>(&m_pHpBarBG))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("HpBarBG"), m_pHpBarBG);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMagic_Meter>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CMagic_Meter**>(&m_pMagic_Meter1))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMagic_Meter>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CMagic_Meter**>(&m_pMagic_Meter1))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMagic_Meter>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CMagic_Meter**>(&m_pMagic_Meter2))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMagic_Meter>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CMagic_Meter**>(&m_pMagic_Meter2))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMagic_Meter>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CMagic_Meter**>(&m_pMagic_Meter3))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMagic_Meter>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CMagic_Meter**>(&m_pMagic_Meter3))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMagic_Meter>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CMagic_Meter**>(&m_pMagic_Meter4))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMagic_Meter>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CMagic_Meter**>(&m_pMagic_Meter4))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMagic_Meter>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CMagic_Meter**>(&m_pLastMagic_Meter))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMagic_Meter>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CMagic_Meter**>(&m_pLastMagic_Meter))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMagic_Icon>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CMagic_Icon**>(&m_pMagic_Icon))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMagic_Icon>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CMagic_Icon**>(&m_pMagic_Icon))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Magic_Icon"), m_pMagic_Icon);
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_UI>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_UI**>(&m_pSpell_UI))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_UI>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_UI**>(&m_pSpell_UI))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Spell_UI"), m_pSpell_UI);
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CPotion>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CPotion**>(&m_pPotion))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CPotion>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CPotion**>(&m_pPotion))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Potion"), m_pPotion);
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMagic_Item>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CMagic_Item**>(&m_pMagic_Item))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMagic_Item>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CMagic_Item**>(&m_pMagic_Item))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -64,9 +64,6 @@ void CAvadakedavra::Update(_float fTimeDelta)
|
||||
|
||||
Update_Event(fTimeDelta);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void CAvadakedavra::Late_Update(_float fTimeDelta)
|
||||
@@ -90,7 +87,6 @@ void CAvadakedavra::Late_Update(_float fTimeDelta)
|
||||
|
||||
OnCollision(this, &CollisionInfo);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
HRESULT CAvadakedavra::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
|
||||
@@ -29,6 +29,10 @@ HRESULT CBroom::Initialize(void* pArg)
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (pArg) {
|
||||
m_iIndex = *static_cast<_int*>(pArg);
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(Ready_Components())) {
|
||||
return E_FAIL;
|
||||
@@ -49,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<CUnit*>(m_pOwner);
|
||||
|
||||
@@ -81,8 +85,10 @@ void CBroom::Update(_float fTimeDelta)
|
||||
|
||||
Update_CameraCoordinateSystem();
|
||||
|
||||
if(!m_pParentUnit->IsAI())
|
||||
PlayerInput();
|
||||
if (!m_pParentUnit->IsAI()) {
|
||||
PlayerInput(fTimeDelta);
|
||||
m_pInfoInstance->Set_Broom_Booster_Timer(m_fTurboBoost);
|
||||
}
|
||||
else {
|
||||
m_fAITime += fTimeDelta;
|
||||
|
||||
@@ -97,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;
|
||||
@@ -133,8 +139,6 @@ void CBroom::Update(_float fTimeDelta)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void CBroom::Late_Update(_float fTimeDelta)
|
||||
@@ -159,7 +163,7 @@ void CBroom::Late_Update(_float fTimeDelta)
|
||||
|
||||
HRESULT CBroom::Render()
|
||||
{
|
||||
if (!m_pModelCom){
|
||||
if (!m_pModelCom) {
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -224,8 +228,26 @@ HRESULT CBroom::Ready_Components()
|
||||
|
||||
__super::Ready_Components(&Desc);
|
||||
|
||||
switch (m_iIndex)
|
||||
{
|
||||
case 0:
|
||||
m_strModelPrototypeTag = TEXT("Prototype_Component_Broom_Model");
|
||||
break;
|
||||
case 1:
|
||||
m_strModelPrototypeTag = TEXT("Prototype_Component_SK_MoonTrimmerBroom_Model");
|
||||
break;
|
||||
case 2:
|
||||
m_strModelPrototypeTag = TEXT("Prototype_Component_DarkWizardBroom_Model");
|
||||
break;
|
||||
case 3:
|
||||
m_strModelPrototypeTag = TEXT("Prototype_Component_WildFireBroom_Model");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* Com_Model */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_Broom_Model"),
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_strModelPrototypeTag,
|
||||
reinterpret_cast<CComponent**>(&m_pModelCom)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -278,8 +300,10 @@ void CBroom::Update_CameraCoordinateSystem()
|
||||
}
|
||||
|
||||
|
||||
void CBroom::PlayerInput()
|
||||
void CBroom::PlayerInput(_float fTimeDelta)
|
||||
{
|
||||
if (!m_bRide)
|
||||
return;
|
||||
m_Input = {};
|
||||
|
||||
m_Input.Z = m_pGameInstance->Key_Pressing(DIK_W) ? 1.f : 0.f;
|
||||
@@ -295,7 +319,35 @@ void CBroom::PlayerInput()
|
||||
m_bHoverToggle = !m_bHoverToggle;
|
||||
}
|
||||
|
||||
m_Input.bTurbo = m_pGameInstance->Mouse_Pressing(DIM_LBUTTON);
|
||||
if (m_pGameInstance->Mouse_Pressing(DIM_LBUTTON))
|
||||
{
|
||||
if (m_fTurboBoost != 0.f) {
|
||||
m_fTurboBoost -= fTimeDelta;
|
||||
if (m_fTurboBoost <= 0.f) {
|
||||
m_fTurboBoost = 0.f;
|
||||
}
|
||||
m_Input.bTurbo = true;
|
||||
m_pInfoInstance->Event_CallBack(TEXT("BroomBooster"), &m_Input.bTurbo);
|
||||
}
|
||||
else {
|
||||
m_Input.bTurbo = false;
|
||||
}
|
||||
m_fTurboBoostChargeDelay = 0.f;
|
||||
}
|
||||
else {
|
||||
m_fTurboBoostChargeDelay += fTimeDelta;
|
||||
if (m_fTurboBoostChargeDelay >= 1.f)
|
||||
{
|
||||
m_fTurboBoost += fTimeDelta;
|
||||
if (m_fTurboBoost >= 5.f)
|
||||
{
|
||||
m_fTurboBoost = 5.f;
|
||||
}
|
||||
}
|
||||
m_Input.bTurbo = false;
|
||||
m_pInfoInstance->Event_CallBack(TEXT("BroomBooster"), &m_Input.bTurbo);
|
||||
}
|
||||
|
||||
m_bTurbo = m_Input.bTurbo;
|
||||
}
|
||||
|
||||
|
||||
@@ -166,10 +166,12 @@ void CBroomRaceManager::Describe_Entity()
|
||||
{
|
||||
MSG_BOX("Failed Load RaceRing");
|
||||
}
|
||||
|
||||
for (_uint i = 0; i < 3; i++)
|
||||
CBroomRacerAI::RacerDesc Desc = {};
|
||||
for (_uint i = 1; i < 4; i++)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroomRacerAI>(g_iStaticLevel, NEXT_LEVEL, LAYER_RACERAI, this)))
|
||||
Desc.pRacerManager = this;
|
||||
Desc.iIndex = i;
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroomRacerAI>(g_iStaticLevel, NEXT_LEVEL, LAYER_RACERAI, &Desc)))
|
||||
return;
|
||||
}
|
||||
m_pGameInstance->Get_Layer(NEXT_LEVEL, LAYER_PLAYER)->Get_Object<CPlayer>()->Set_RaceInfo();
|
||||
@@ -269,6 +271,8 @@ void CBroomRaceManager::Check_RingPassed()
|
||||
|
||||
for (auto& racer : m_Racers)
|
||||
{
|
||||
if (racer.curRing >= (_uint)m_pRaceRings.size())
|
||||
continue;
|
||||
CRaceRing* pRing = m_pRaceRings[racer.curRing];
|
||||
|
||||
_vector ringPos = pRing->Get_WorldPostion();
|
||||
@@ -277,7 +281,6 @@ void CBroomRaceManager::Check_RingPassed()
|
||||
pRing->Get_Component<CTransform>()->Get_State(STATE::RIGHT);
|
||||
ringFwd = XMVector3Normalize(ringFwd);
|
||||
|
||||
|
||||
_vector currPos = racer.pAI ? racer.pAI->Get_WorldPostion() : racer.pRacer->Get_WorldPostion();
|
||||
|
||||
_vector prevPos = XMLoadFloat4(&racer.prevPos);
|
||||
@@ -306,14 +309,24 @@ void CBroomRaceManager::Check_RingPassed()
|
||||
|
||||
if (dist <= PASS_RADIUS)
|
||||
{
|
||||
if (racer.pRacer) {
|
||||
pRing->Set_Target(false);
|
||||
}
|
||||
racer.curRing++;
|
||||
|
||||
racer.curRing = (racer.curRing + 1) % m_pRaceRings.size();
|
||||
if (racer.curRing >= m_pRaceRings.size())
|
||||
{
|
||||
racer.curRing = (_uint)m_pRaceRings.size();
|
||||
|
||||
if (racer.pRacer) {
|
||||
m_pRaceRings[racer.curRing]->Set_Target(true);
|
||||
if (racer.pAI) {
|
||||
racer.pAI->Get_Broom()->Set_Hover(true);
|
||||
racer.pAI->Get_Broom()->Set_Move(false);
|
||||
}
|
||||
else if (racer.pRacer) {
|
||||
m_iLastRing++;
|
||||
racer.pRacer->Get_Broom()->Set_Hover(true);
|
||||
racer.pRacer->Get_Broom()->Set_Move(false);
|
||||
}
|
||||
|
||||
XMStoreFloat4(&racer.prevPos, currPos);
|
||||
continue;
|
||||
}
|
||||
|
||||
racer.pAI ? SetTargetRing(racer.pAI) : SetTargetRing(racer.pRacer);
|
||||
@@ -328,7 +341,6 @@ void CBroomRaceManager::Finish()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void CBroomRaceManager::SetTargetRing(CGameObject* pRacer)
|
||||
{
|
||||
for (auto& racer : m_Racers)
|
||||
@@ -337,11 +349,6 @@ void CBroomRaceManager::SetTargetRing(CGameObject* pRacer)
|
||||
{
|
||||
if (racer.pAI == pRacer)
|
||||
{
|
||||
if (racer.curRing == m_pRaceRings.size() - 1 ) {
|
||||
racer.pAI->Get_Broom()->Set_Hover(true);
|
||||
racer.pAI->Get_Broom()->Set_Move(false);
|
||||
}
|
||||
|
||||
if (racer.pAI)
|
||||
{
|
||||
racer.pAI->Set_RaceRing(m_pRaceRings[racer.curRing]);
|
||||
@@ -352,16 +359,12 @@ void CBroomRaceManager::SetTargetRing(CGameObject* pRacer)
|
||||
{
|
||||
if (racer.pRacer == pRacer)
|
||||
{
|
||||
if (racer.curRing == m_pRaceRings.size() - 1) {
|
||||
racer.pRacer->Get_Broom()->Set_Hover(true);
|
||||
racer.pRacer->Get_Broom()->Set_Move(false);
|
||||
}
|
||||
racer.pRacer->Set_RaceRing(m_pRaceRings[racer.curRing]);
|
||||
m_pInfoInstance->Event_CallBack(TEXT("CurrentRing"));
|
||||
m_iLastRing++;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -431,6 +434,7 @@ HRESULT CBroomRaceManager::Load_RaceRing()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,6 +44,8 @@ HRESULT CBroomRacerAI::Initialize(void* pArg)
|
||||
|
||||
m_bAI = true;
|
||||
|
||||
m_iIndex = static_cast<RacerDesc*>(pArg)->iIndex;
|
||||
|
||||
if (FAILED(Ready_Parts())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -88,7 +90,7 @@ HRESULT CBroomRacerAI::Initialize(void* pArg)
|
||||
|
||||
m_pBroom->Set_Ride(true);
|
||||
|
||||
m_pBroomRaceManager = static_cast<CBroomRaceManager*>(pArg);
|
||||
m_pBroomRaceManager = static_cast<RacerDesc*>(pArg)->pRacerManager;
|
||||
|
||||
CBroomRaceManager::RacerInfo Info;
|
||||
|
||||
@@ -269,7 +271,7 @@ HRESULT CBroomRacerAI::Ready_Components()
|
||||
m_strModelPrototypeTag = TEXT("Prototype_Component_Npc_Model");
|
||||
break;
|
||||
case 2:
|
||||
m_strModelPrototypeTag = TEXT("Prototype_Component_Ghost_Peeves_Model");
|
||||
m_strModelPrototypeTag = TEXT("Prototype_Component_ChiyoKogawa_Model");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -311,7 +313,7 @@ HRESULT CBroomRacerAI::Ready_Components()
|
||||
|
||||
HRESULT CBroomRacerAI::Ready_Parts()
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroom>(g_iStaticLevel, NEXT_LEVEL, LAYER_ITEM, nullptr, this, &m_pBroom))) {
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroom>(g_iStaticLevel, NEXT_LEVEL, LAYER_ITEM, &m_iIndex, this, &m_pBroom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -350,35 +352,22 @@ HRESULT CBroomRacerAI::Bind_ShaderParameters(_uint iMeshOrder)
|
||||
_float fMixerFactor = { FLT_MAX };
|
||||
_uint iColorMixerMethod = { 0 };
|
||||
|
||||
switch (MESH_ORDER(iMeshOrder))
|
||||
switch (m_pModelCom->Get_UsingPass(iMeshOrder, m_pShaderCom))
|
||||
{
|
||||
case MESH_ORDER::HAIR_MAIN:
|
||||
case MESH_ORDER::HEAD_EYELASH:
|
||||
case MESH_ORDER::HAIR_SUB:
|
||||
bUseColorMixer = true;
|
||||
iColorParam = 0x2E2E2E;
|
||||
fMixerFactor = 0.9f;
|
||||
iColorMixerMethod = 1;
|
||||
break;
|
||||
case MESH_ORDER::LOWER:
|
||||
bUseColorMixer = true;
|
||||
iColorParam = 0x292557;
|
||||
fMixerFactor = 0.5f;
|
||||
iColorMixerMethod = 1;
|
||||
break;
|
||||
case MESH_ORDER::SHOES:
|
||||
bUseColorMixer = true;
|
||||
iColorParam = 0x614242;
|
||||
fMixerFactor = 0.5f;
|
||||
iColorMixerMethod = 1;
|
||||
break;
|
||||
case MESH_ORDER::UPPER:
|
||||
bUseColorMixer = true;
|
||||
iColorParam = 0xBFAC29;
|
||||
fMixerFactor = 0.658333f;
|
||||
iColorMixerMethod = 1;
|
||||
break;
|
||||
default:
|
||||
case 23:
|
||||
if (m_strModelPrototypeTag == TEXT("Prototype_Component_F_Student_Model"))
|
||||
{
|
||||
bUseColorMixer = true;
|
||||
iColorParam = 0x2E2E2E;
|
||||
fMixerFactor = 0.00f;
|
||||
iColorMixerMethod = 1;
|
||||
}
|
||||
else {
|
||||
bUseColorMixer = true;
|
||||
iColorParam = 0x2E2E2E;
|
||||
fMixerFactor = 0.9f;
|
||||
iColorMixerMethod = 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (true == bUseColorMixer) {
|
||||
|
||||
@@ -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<CBroom_Flag>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CBroom_Flag**>(&m_pBroom_Flag))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroom_Flag>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast <CBroom_Flag**>(&m_pBroom_Flag))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Broom_Flag"), m_pBroom_Flag);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroom_Circle>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CBroom_Circle**>(&m_pBroom_Circle))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroom_Circle>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast <CBroom_Circle**>(&m_pBroom_Circle))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Broom_Circle"), m_pBroom_Circle);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroom_Scoreboard>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CBroom_Scoreboard**>(&m_pBroom_Scoreboard))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroom_Scoreboard>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast <CBroom_Scoreboard**>(&m_pBroom_Scoreboard))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Broom_Scoreboard"), m_pBroom_Scoreboard);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroom_Finish>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CBroom_Finish**>(&m_pBroom_Finish))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroom_Finish>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast <CBroom_Finish**>(&m_pBroom_Finish))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Broom_Fiish"), m_pBroom_Finish);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroom_Record>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CBroom_Record**>(&m_pBroom_Record))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroom_Record>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast <CBroom_Record**>(&m_pBroom_Record))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Broom_Record"), m_pBroom_Record);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroom_Exit>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CBroom_Exit**>(&m_pBroom_Exit))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroom_Exit>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast <CBroom_Exit**>(&m_pBroom_Exit))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Broom_Exit"), m_pBroom_Exit);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroom_Trophy>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CBroom_Trophy**>(&m_pBroom_Trophy))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroom_Trophy>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast <CBroom_Trophy**>(&m_pBroom_Trophy))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -360,6 +360,7 @@ void CBroom::Behavior_Broom_FlyEnter()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
m_pFSM->Enable_State(FSMSTATE::FLY);
|
||||
m_pModelCom->Set_BlendDuration(0.8f);
|
||||
m_bHoverToggle = false;
|
||||
pairAnimInfo = pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false);
|
||||
@@ -443,23 +444,23 @@ HRESULT CBroom::Behavior_Broom_FlyExitCheck(_float fTimeDelta)
|
||||
|
||||
if (vInput.x < 0.f)
|
||||
{
|
||||
if (vInput.z <= 0.f)
|
||||
/*if (vInput.z <= 0.f)
|
||||
{
|
||||
m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta * 0.5f);
|
||||
}
|
||||
else {
|
||||
m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta * 0.3f);
|
||||
m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta * 0.4f);
|
||||
}
|
||||
else {*/
|
||||
m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta * 0.2f);
|
||||
//}
|
||||
}
|
||||
else if (vInput.x > 0.f)
|
||||
{
|
||||
if (vInput.z <= 0.f)
|
||||
/*if (vInput.z <= 0.f)
|
||||
{
|
||||
m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta * 0.5f);
|
||||
}
|
||||
else {
|
||||
m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta * 0.3f);
|
||||
m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta * 0.4f);
|
||||
}
|
||||
else {*/
|
||||
m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta * 0.2f);
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
@@ -469,7 +470,6 @@ HRESULT CBroom::Behavior_Broom_FlyExitCheck(_float fTimeDelta)
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_UP_B];
|
||||
else
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_DOWN_B];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false);
|
||||
}
|
||||
else if (ax >= az)
|
||||
{
|
||||
@@ -489,7 +489,6 @@ HRESULT CBroom::Behavior_Broom_FlyExitCheck(_float fTimeDelta)
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B];
|
||||
}
|
||||
}
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -500,12 +499,12 @@ HRESULT CBroom::Behavior_Broom_FlyExitCheck(_float fTimeDelta)
|
||||
else {
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B];
|
||||
}
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false);
|
||||
}
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second,1.f,false,0.1f);
|
||||
}
|
||||
else {
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -552,12 +551,14 @@ HRESULT CBroom::Behavior_Broom_FlyExitCheck(_float fTimeDelta)
|
||||
void CBroom::Behavior_Broom_FlyExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::FLY);
|
||||
m_pModelCom->Set_BlendDuration(0.3f);
|
||||
}
|
||||
|
||||
void CBroom::Behavior_Broom_TurboFlyEnter()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
m_pFSM->Enable_State(FSMSTATE::TURBOFLY);
|
||||
m_pModelCom->Set_BlendDuration(0.8f);
|
||||
m_bTurbo = true;
|
||||
m_bHoverToggle = false;
|
||||
pairAnimInfo = pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B];
|
||||
@@ -747,6 +748,7 @@ HRESULT CBroom::Behavior_Broom_TurboFlyExitCheck(_float fTimeDelta)
|
||||
void CBroom::Behavior_Broom_TurboFlyExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::TURBOFLY);
|
||||
m_pModelCom->Set_BlendDuration(0.3f);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -69,23 +69,42 @@ void CCamPosition_Shoulder::Priority_Update(_float fTimeDelta)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (true == m_bMovable) {
|
||||
m_vAccRotDegrees.y += m_pGameInstance->Get_MouseMove().x * m_fMouseSensor;
|
||||
m_vAccRotDegrees.x += m_pGameInstance->Get_MouseMove().y * m_fMouseSensor;
|
||||
CMyTools::AdjustAccumulateDegreePitchYawDegree(m_vAccRotDegrees);
|
||||
}
|
||||
{
|
||||
_vector vLookTargetPos = Calc_LookTargetPos();
|
||||
m_pLookTransform->Set_State(STATE::POSITION, vLookTargetPos);
|
||||
m_pFollowTransform->Set_State(STATE::POSITION, Calc_FollowTargetPos(vLookTargetPos));
|
||||
|
||||
_float focalRatioLerpAlpha = fTimeDelta * m_fFocalRatioLerpSpeed;
|
||||
if (focalRatioLerpAlpha > 1.f)
|
||||
{
|
||||
focalRatioLerpAlpha = 1.f;
|
||||
if (false == m_bPlayAnim) {
|
||||
m_pBinded_Camera->Sync_Follow(false);
|
||||
if (true == m_bMovable) {
|
||||
m_vAccRotDegrees.y += m_pGameInstance->Get_MouseMove().x * m_fMouseSensor;
|
||||
m_vAccRotDegrees.x += m_pGameInstance->Get_MouseMove().y * m_fMouseSensor;
|
||||
CMyTools::AdjustAccumulateDegreePitchYawDegree(m_vAccRotDegrees);
|
||||
}
|
||||
{
|
||||
_vector vLookTargetPos = Calc_LookTargetPos();
|
||||
m_pLookTransform->Set_State(STATE::POSITION, vLookTargetPos);
|
||||
m_pFollowTransform->Set_State(STATE::POSITION, Calc_FollowTargetPos(vLookTargetPos));
|
||||
|
||||
m_vFocalRatio.x = CMyTools::Lerp_f1D(m_vFocalRatio.x, m_fFocalRatioTargetValue, focalRatioLerpAlpha);
|
||||
_float focalRatioLerpAlpha = fTimeDelta * m_fFocalRatioLerpSpeed;
|
||||
if (focalRatioLerpAlpha > 1.f)
|
||||
{
|
||||
focalRatioLerpAlpha = 1.f;
|
||||
}
|
||||
|
||||
m_vFocalRatio.x = CMyTools::Lerp_f1D(m_vFocalRatio.x, m_fFocalRatioTargetValue, focalRatioLerpAlpha);
|
||||
}
|
||||
}
|
||||
else {
|
||||
_bool bFinish = m_pModelCom->Play_Animation(fTimeDelta, nullptr);
|
||||
if (bFinish) {
|
||||
m_pBinded_Camera->Sync_Follow(false);
|
||||
m_pModelCom->Set_AnimationIndex(UINT_MAX);
|
||||
m_pBinded_Camera->EnableTransition(0.45f);
|
||||
m_bPlayAnim = false;
|
||||
}
|
||||
_matrix OwnerMatrix = m_pParentTransformCom->Get_XMWorldMatrix();
|
||||
_matrix LookMatrix = XMLoadFloat4x4(m_pLookAtAnimMatrix);
|
||||
_matrix CamMatrix = XMLoadFloat4x4(m_pFollowAnimMatrix);
|
||||
m_pLookTransform->Set_State(STATE::POSITION, (LookMatrix * OwnerMatrix).r[3]);
|
||||
m_pFollowTransform->Set_WorldMatrix(CamMatrix * OwnerMatrix);
|
||||
m_pFollowTransform->Set_State(STATE::POSITION, Calc_AnimFollowTargetPos(m_pFollowTransform->Get_State(STATE::POSITION)));
|
||||
m_pBinded_Camera->Sync_Follow(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,7 +143,7 @@ void CCamPosition_Shoulder::Update(_float fTimeDelta)
|
||||
if (m_pGameInstance->Mouse_Down(DIM_MBUTTON)) {
|
||||
m_pGameInstance->Toggle_MouseCenter();
|
||||
}
|
||||
if (m_pGameInstance->Key_Up(DIK_P)) {
|
||||
if (false == m_bPlayAnim && m_pGameInstance->Key_Up(DIK_P)) {
|
||||
m_bRightShoulderActive = !m_bRightShoulderActive;
|
||||
|
||||
m_vShoulderLerpDegree.x = m_fFollowTargetIncludedAngleDegree;
|
||||
@@ -138,7 +157,7 @@ void CCamPosition_Shoulder::Update(_float fTimeDelta)
|
||||
m_vShoulderLerpTimer.x = 0.f;
|
||||
m_bShoulderLerp = true;
|
||||
}
|
||||
if (m_pGameInstance->Mouse_Pressing(DIM_RBUTTON)) {
|
||||
if (false == m_bPlayAnim && m_pGameInstance->Mouse_Pressing(DIM_RBUTTON)) {
|
||||
m_pBinded_Camera->ZoomIn(fTimeDelta);
|
||||
m_bZoomIn = true;
|
||||
}
|
||||
@@ -212,24 +231,45 @@ _vector CCamPosition_Shoulder::Calc_FollowTargetPos(_fvector vLookTargetWorldPos
|
||||
_vector vHeadPos = vDestPos + XMVectorSet(0.f, m_fHeadHeight, 0.f, 0.f);
|
||||
_vector vDir = vHeadPos - vLookTargetWorldPos;
|
||||
_float fLengthSQ = XMVectorGetX(XMVector3LengthSq(vDir));
|
||||
|
||||
if (fLengthSQ < FLT_EPSILON)
|
||||
{
|
||||
|
||||
if (fLengthSQ < FLT_EPSILON) {
|
||||
vDir = XMVectorSet(0.f, 0.f, 1.f, 0.f);
|
||||
vDir = XMVector3Rotate(vDir, fRotQ);
|
||||
}
|
||||
else
|
||||
|
||||
vDir = XMVector3Normalize(vDir);
|
||||
vDir = XMVector3Rotate(vDir, fRotQ);
|
||||
|
||||
return Calc_BestPosition(vLookTargetWorldPos, vDir, fBestFollowTargetDistance);
|
||||
}
|
||||
_vector CCamPosition_Shoulder::Calc_AnimFollowTargetPos(_fvector vGreedPos)
|
||||
{
|
||||
_vector vDestPos = Calc_DampingParentPos();
|
||||
_vector vHeadPos = vDestPos + XMVectorSet(0.f, m_fHeadHeight, 0.f, 0.f);
|
||||
_vector vDir = vGreedPos - vHeadPos;
|
||||
_float fLength = XMVectorGetX(XMVector3Length(vDir));
|
||||
_vector vDiff = vDir;
|
||||
if (fLength < FLT_EPSILON5) {
|
||||
vDir = XMVectorSet(0.f, 0.f, 1.f, 0.f);
|
||||
}
|
||||
|
||||
vDir = XMVector3Normalize(vDir);
|
||||
|
||||
return Calc_BestPosition(vHeadPos, vDir, fLength);
|
||||
}
|
||||
_vector CCamPosition_Shoulder::Calc_BestPosition(_fvector vCastingPosition, _gvector vCastingDirection, _float fGreedDistance)
|
||||
{
|
||||
_float fZeroSafeDistance = fGreedDistance;
|
||||
if (fZeroSafeDistance < FLT_EPSILON3)
|
||||
{
|
||||
vDir = XMVector3Normalize(vDir);
|
||||
vDir = XMVector3Rotate(vDir, fRotQ);
|
||||
fZeroSafeDistance = FLT_EPSILON3;
|
||||
}
|
||||
|
||||
m_BufferHit = {};
|
||||
_bool bHit = m_pGameInstance->SphereCast( 0.25f, vLookTargetWorldPos, vDir, fBestFollowTargetDistance,
|
||||
PSX::PxHitFlag::eDEFAULT, PSX::PxQueryFlag::eSTATIC/*|PSX::PxQueryFlag::eDYNAMIC*/, m_BufferHit);
|
||||
_bool bHit = m_pGameInstance->SphereCast(0.25f, vCastingPosition, vCastingDirection, fZeroSafeDistance,
|
||||
PSX::PxHitFlag::eDEFAULT, PSX::PxQueryFlag::eSTATIC/*|PSX::PxQueryFlag::eDYNAMIC*/, m_BufferHit);
|
||||
|
||||
if (false == bHit) {
|
||||
return vLookTargetWorldPos + vDir * fBestFollowTargetDistance;
|
||||
return vCastingPosition + vCastingDirection * fZeroSafeDistance;
|
||||
}
|
||||
|
||||
vector<PSX::PxSweepHit> sweepHits;
|
||||
@@ -253,7 +293,7 @@ _vector CCamPosition_Shoulder::Calc_FollowTargetPos(_fvector vLookTargetWorldPos
|
||||
_float fCameraSurfaceOffset = 0.05f;
|
||||
_float fCameraMinDistance = 0.20f;
|
||||
_float fDistance = { };
|
||||
_float fFinalTargetDistance = fBestFollowTargetDistance;
|
||||
_float fFinalTargetDistance = fZeroSafeDistance;
|
||||
for (auto& hit : sweepHits)
|
||||
{
|
||||
fDistance = hit.distance - fCameraSurfaceOffset;
|
||||
@@ -266,23 +306,18 @@ _vector CCamPosition_Shoulder::Calc_FollowTargetPos(_fvector vLookTargetWorldPos
|
||||
}
|
||||
}
|
||||
|
||||
_float fSafeDistance = fBestFollowTargetDistance;
|
||||
if (fSafeDistance < FLT_EPSILON3)
|
||||
{
|
||||
fSafeDistance = FLT_EPSILON3;
|
||||
}
|
||||
|
||||
_float fBestFocalRatio = m_vFocalRatio.y * fFinalTargetDistance / fSafeDistance;
|
||||
_float fBestFocalRatio = m_vFocalRatio.y * fFinalTargetDistance / fZeroSafeDistance;
|
||||
|
||||
if (fBestFocalRatio < m_fFocalRatioMin) {
|
||||
fBestFocalRatio = m_fFocalRatioMin;
|
||||
} else if (fBestFocalRatio > m_vFocalRatio.y) {
|
||||
}
|
||||
else if (fBestFocalRatio > m_vFocalRatio.y) {
|
||||
fBestFocalRatio = m_vFocalRatio.y;
|
||||
}
|
||||
|
||||
m_fFocalRatioTargetValue = fBestFocalRatio;
|
||||
|
||||
return vLookTargetWorldPos + vDir * fFinalTargetDistance;
|
||||
return vCastingPosition + vCastingDirection * fFinalTargetDistance;
|
||||
}
|
||||
_vector CCamPosition_Shoulder::Calc_DampingParentPos()
|
||||
{
|
||||
@@ -297,6 +332,11 @@ void CCamPosition_Shoulder::Set_CameraShake(_float fXShock, _float fYShock)
|
||||
m_vAccRealDegrees.x = fXShock;
|
||||
m_vAccRealDegrees.y = fYShock;
|
||||
}
|
||||
void CCamPosition_Shoulder::Set_CameraAnim(_uint iIndex)
|
||||
{
|
||||
m_bPlayAnim = true;
|
||||
m_pModelCom->Set_AnimationIndex(iIndex,false);
|
||||
}
|
||||
_vector CCamPosition_Shoulder::Get_ShoulderGlobalPos()
|
||||
{
|
||||
// Right/Left 숄더를 로컬 X 부호로 결정
|
||||
@@ -329,6 +369,21 @@ HRESULT CCamPosition_Shoulder::Ready_Components(void* pArg)
|
||||
if (FAILED(__super::Ready_Components(&DescTransfrom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_Camera_Model"),
|
||||
reinterpret_cast<CComponent**>(&m_pModelCom)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pModelCom->Get_BoneMatrixPtr("ctrl_1");
|
||||
m_pModelCom->Get_BoneMatrixPtr("ctrl_2");
|
||||
m_pModelCom->Get_BoneMatrixPtr("ctl_shake");
|
||||
m_pFollowAnimMatrix = m_pModelCom->Get_BoneMatrixPtr("skt_cam");
|
||||
m_pModelCom->Get_BoneMatrixPtr("root");
|
||||
m_pModelCom->Get_BoneMatrixPtr("lookat");
|
||||
m_pLookAtAnimMatrix = m_pModelCom->Get_BoneMatrixPtr("lookat_target");
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
HRESULT CCamPosition_Shoulder::Ready_SubParts()
|
||||
@@ -400,6 +455,7 @@ void CCamPosition_Shoulder::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pModelCom);
|
||||
SAFE_RELEASE(m_pTarget_LookPart);
|
||||
SAFE_RELEASE(m_pTarget_FollowPart);
|
||||
}
|
||||
@@ -416,6 +472,19 @@ void CCamPosition_Shoulder::Describe_Entity()
|
||||
GUI::SliderFloat("m_fDefaultCameraBackToFrontRatio", &m_fDefaultCameraBackToFrontRatio, -1.f, 1.f);
|
||||
GUI::SliderFloat("m_vFocalRatio", &m_vFocalRatio.x, 0.f, 1.f);
|
||||
GUI::SliderFloat("m_fCameraFowardDistance", &m_fCameraFowardDistance, 0.f, 4.f);
|
||||
|
||||
if (GUI::TreeNode("AnimList")) {
|
||||
for (_int i = 0; i < m_pModelCom->Get_AnimSize(); i++)
|
||||
{
|
||||
if (GUI::Button(m_pModelCom->Get_AnimList(i)))
|
||||
{
|
||||
m_bPlayAnim = true;
|
||||
m_pModelCom->Set_AnimationIndex(i, true);
|
||||
}
|
||||
}
|
||||
|
||||
GUI::TreePop();
|
||||
}
|
||||
}
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
@@ -35,6 +35,9 @@ void CCamera_Gaze::Priority_Update(_float fTimeDelta)
|
||||
else {
|
||||
m_pTransformCom->LookAt(m_pLookTarget->Get_Component<CTransform>()->Get_State(STATE::POSITION));
|
||||
}
|
||||
if (m_bSyncFollow) {
|
||||
m_pTransformCom->Set_WorldMatrix(m_pFollowTarget->Get_Component<CTransform>()->Get_XMWorldMatrix());
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -98,6 +101,11 @@ void CCamera_Gaze::Enable_LookLerp()
|
||||
XMStoreFloat3(&m_vLookPos_Dest, vLookTargetPos);
|
||||
}
|
||||
|
||||
void CCamera_Gaze::Sync_Follow(_bool bSync)
|
||||
{
|
||||
m_bSyncFollow = bSync;
|
||||
}
|
||||
|
||||
void CCamera_Gaze::Toggle_Priority()
|
||||
{
|
||||
if (m_iPriority == 55) {
|
||||
|
||||
@@ -43,15 +43,26 @@ void CCamera_Model::Update(_float fTimeDelta)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
Describe_Entity();
|
||||
_matrix matBoneSKT = m_pModelCom->Get_BoneMatrix(m_pModelCom->Get_BoneIndex("ctrl_1"));
|
||||
_matrix matBoneSKT = m_pModelCom->Get_BoneMatrix(m_pModelCom->Get_BoneIndex("skt_cam"));
|
||||
m_pTransformCom->Set_WorldMatrix(matBoneSKT);
|
||||
|
||||
//("ctrl_1");
|
||||
//("ctrl_2");
|
||||
//("ctl_shake");
|
||||
//("skt_cam");
|
||||
//("root");
|
||||
//("lookat");
|
||||
//("lookat_target");
|
||||
|
||||
#endif // _DEBUG
|
||||
}
|
||||
|
||||
void CCamera_Model::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONLIGHT, this);
|
||||
#endif // _DEBUG
|
||||
}
|
||||
|
||||
HRESULT CCamera_Model::Render()
|
||||
@@ -60,21 +71,71 @@ HRESULT CCamera_Model::Render()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
|
||||
RENDER eType = m_pGameInstance->Get_CurrentRenderPass();
|
||||
if (RENDER::NONBLEND == eType) {
|
||||
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
|
||||
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
{
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
{
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::DEFAULT)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::WIREFRAME)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (RENDER::NONLIGHT == eType) {
|
||||
#ifdef _DEBUG
|
||||
m_Batch->Begin();
|
||||
|
||||
_vector vRight = m_pTransformCom->Get_State(STATE::RIGHT);
|
||||
_vector vUp = m_pTransformCom->Get_State(STATE::UP);
|
||||
_vector vLook = m_pTransformCom->Get_State(STATE::LOOK);
|
||||
_vector vPosition = m_pTransformCom->Get_State(STATE::POSITION);
|
||||
_matrix ViewMatrix = m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW);
|
||||
_matrix ProjMatrix = m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ);
|
||||
static _float fLength = 1.f;
|
||||
GUI::DragFloat("Length", &fLength, 0.1f, 0.1f, 10.f, "%.1f");
|
||||
m_Batch->DrawLine(
|
||||
VertexPositionColor(vPosition, DirectX::Colors::GhostWhite),
|
||||
VertexPositionColor(vPosition + vRight * fLength, DirectX::Colors::Green)
|
||||
);
|
||||
m_Batch->DrawLine(
|
||||
VertexPositionColor(vPosition, DirectX::Colors::GhostWhite),
|
||||
VertexPositionColor(vPosition + vUp * fLength, DirectX::Colors::Red)
|
||||
);
|
||||
m_Batch->DrawLine(
|
||||
VertexPositionColor(vPosition, DirectX::Colors::GhostWhite),
|
||||
VertexPositionColor(vPosition + vLook * fLength, DirectX::Colors::Blue)
|
||||
);
|
||||
_vector vColor = CMyTools::ColorRGB_A_HEXtoVECTOR(0xff0000, 1.f);
|
||||
_matrix WorldMatrix;
|
||||
WorldMatrix = XMLoadFloat4x4(m_CtrlCam);
|
||||
m_pSubShape->Draw(WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true);
|
||||
WorldMatrix = XMLoadFloat4x4(m_LookAtMatrix);
|
||||
m_pSubShape->Draw(WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true);
|
||||
WorldMatrix = XMLoadFloat4x4(m_LookAtTargetMatrix);
|
||||
m_pSubShape->Draw(WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true);
|
||||
vColor = CMyTools::ColorRGB_A_HEXtoVECTOR(0x000ff0, 1.f);
|
||||
WorldMatrix = XMLoadFloat4x4(m_Ctrl1);
|
||||
m_pSubShape->Draw(WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true);
|
||||
WorldMatrix = XMLoadFloat4x4(m_Ctrl2);
|
||||
m_pSubShape->Draw(WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true);
|
||||
WorldMatrix = XMLoadFloat4x4(m_CtrlShake);
|
||||
m_pSubShape->Draw(WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true);
|
||||
WorldMatrix = XMLoadFloat4x4(m_RootMatrix);
|
||||
m_pSubShape->Draw(WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true);
|
||||
|
||||
m_Batch->End();
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
@@ -88,7 +149,9 @@ HRESULT CCamera_Model::Initialize_Prototype()
|
||||
HRESULT CCamera_Model::Initialize(void* pArg)
|
||||
{
|
||||
CAMERA_MODEL_DESC* pDesc = static_cast<CAMERA_MODEL_DESC*>(pArg);
|
||||
|
||||
m_pUnitPtr = pDesc->pUnitPtr;
|
||||
m_pFollowTarget = pDesc->pFollowTarget;
|
||||
m_pLookTarget = pDesc->pLookTarget;
|
||||
if (FAILED(__super::Initialize(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -96,10 +159,20 @@ HRESULT CCamera_Model::Initialize(void* pArg)
|
||||
if (FAILED(Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pModelCom->Set_DisableRootMotionScale(true);
|
||||
m_matInitial = *m_pTransformCom->Get_WorldMatrixPtr();
|
||||
m_bActive = true;
|
||||
|
||||
#ifdef _DEBUG
|
||||
m_BasicEffect = make_unique<BasicEffect>(m_pDevice);
|
||||
m_BasicEffect->SetVertexColorEnabled(true);
|
||||
m_BasicEffect->SetView(m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW));
|
||||
m_BasicEffect->SetProjection(m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ));
|
||||
|
||||
m_pSubShape = (GeometricPrimitive::CreateSphere(m_pContext, 0.25f, 12, false, false));
|
||||
m_Batch = make_unique<PrimitiveBatch<VertexPositionColor>>(m_pContext);
|
||||
#endif // _DEBUG
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -119,8 +192,16 @@ HRESULT CCamera_Model::Ready_Components(void* pArg)
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
m_Ctrl1 = m_pModelCom->Get_BoneMatrixPtr("ctrl_1");
|
||||
m_Ctrl2 = m_pModelCom->Get_BoneMatrixPtr("ctrl_2");
|
||||
m_CtrlShake = m_pModelCom->Get_BoneMatrixPtr("ctl_shake");
|
||||
m_CtrlCam = m_pModelCom->Get_BoneMatrixPtr("skt_cam");
|
||||
m_RootMatrix = m_pModelCom->Get_BoneMatrixPtr("root");
|
||||
m_LookAtMatrix = m_pModelCom->Get_BoneMatrixPtr("lookat");
|
||||
m_LookAtTargetMatrix = m_pModelCom->Get_BoneMatrixPtr("lookat_target");
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -184,7 +265,6 @@ void CCamera_Model::Describe_Entity()
|
||||
{
|
||||
_float3 vPosition = {};
|
||||
GUI::Begin("CameraAnim List");
|
||||
//GUI::Text("%f", m_pModelCom->Get_CurrentTrackProgressRatio());
|
||||
|
||||
for (_int i = 0; i < m_pModelCom->Get_AnimSize(); i++)
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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<CDialogue>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CDialogue**>(&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<CDialogue>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CDialogue**>(&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<DIALOGUEINFO*>(pArg);
|
||||
|
||||
CDialogue* Dialogue = m_DialoguInfo.back();
|
||||
m_DialoguInfo.pop_back();
|
||||
DIALOGUEINFO pInfo = *reinterpret_cast<DIALOGUEINFO*>(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<NPCINTERACTIONINFO*>(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
|
||||
|
||||
@@ -1106,6 +1106,10 @@ HRESULT CEffectObject::Bind_ShaderResources()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_isNonSoftEffect", &m_EffectInfo.isNonSoftEffect, sizeof(_bool)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (m_pDiffuse_TextureCom != nullptr)
|
||||
|
||||
@@ -47,7 +47,11 @@
|
||||
#include "Ranrok_Point.h"
|
||||
#include "Ranrok_Pulse.h"
|
||||
#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)
|
||||
@@ -158,9 +162,9 @@ void CEffectPool::Priority_Update(_float fTimeDelta)
|
||||
#if 진우
|
||||
|
||||
|
||||
(*m_EffectList[ENUM_CLASS(SKILL_TYPE::AVADAKEDAVRA_SIDE)].begin())->Describe_Entity();
|
||||
//(*m_EffectList[ENUM_CLASS(SKILL_TYPE::AVADAKEDAVRA_SIDE)].begin())->Describe_Entity();
|
||||
|
||||
Describe_Entity();
|
||||
//Describe_Entity();
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@@ -614,8 +618,56 @@ HRESULT CEffectPool::Ready_MonsterEffect()
|
||||
return pEffect; }
|
||||
|
||||
))) return E_FAIL;
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::RANROK_HIT, 5, g_iStaticLevel, g_iStaticLevel, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CRanrok_Hit* pEffect = nullptr;
|
||||
|
||||
pEffect = m_pGameInstance->Clone_Prototype<CRanrok_Hit>(iPrototypeLevel, nullptr);
|
||||
|
||||
return pEffect; }
|
||||
|
||||
))) return E_FAIL;
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::RANROK_IMPACT, 5, g_iStaticLevel, g_iStaticLevel, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CRanrok_Impact* pEffect = nullptr;
|
||||
|
||||
pEffect = m_pGameInstance->Clone_Prototype<CRanrok_Impact>(iPrototypeLevel, nullptr);
|
||||
|
||||
return pEffect; }
|
||||
|
||||
))) 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<CRanrok_Land>(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<CRanrok_GroundPulse>(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<CRanrok_Rush_Bottom>(iPrototypeLevel, nullptr);
|
||||
|
||||
return pEffect; }
|
||||
|
||||
))) return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -665,6 +665,7 @@ _int CEffect_Container::CollisionCheck()
|
||||
case PXOBJECT::MONSTER:
|
||||
case PXOBJECT::GOBLIN_WARRIOR:
|
||||
case PXOBJECT::GOBLIN_MAGICIAN:
|
||||
case PXOBJECT::GOBLIN_ASSASSIN:
|
||||
case PXOBJECT::TROLL:
|
||||
case PXOBJECT::RANROK:
|
||||
case PXOBJECT::WALL:
|
||||
@@ -864,6 +865,8 @@ ON_COLLISION_INFO CEffect_Container::MonsterSweepTarget(_fvector StartPos, _fvec
|
||||
{
|
||||
PHYSX_USERDATA* pUserData = static_cast<PHYSX_USERDATA*>(pActor->userData);
|
||||
tagCollInfo.pObject = pUserData->pOwner;
|
||||
tagCollInfo.eHitType = ENUM_CLASS(HIT_TYPE::HIT_PROJECTILE);
|
||||
tagCollInfo.fDamage = 10.f;
|
||||
|
||||
switch (pUserData->eKind)
|
||||
{
|
||||
|
||||
@@ -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<CEnemy_HpBar>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CEnemy_HpBar**>(&m_pEnemy_HpBar))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CEnemy_HpBar>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CEnemy_HpBar**>(&m_pEnemy_HpBar))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Enemy_HpBar"), m_pEnemy_HpBar);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CEnemy_Info>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CEnemy_Info**>(&m_pEnemy_Info))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CEnemy_Info>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CEnemy_Info**>(&m_pEnemy_Info))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Enemy_Info"), m_pEnemy_Info);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBoss_HpBar>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CBoss_HpBar**>(&m_pBoss_HpBar))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBoss_HpBar>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CBoss_HpBar**>(&m_pBoss_HpBar))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -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<CLoading_Panel>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CLoading_Panel**>(&m_pLoading_Panel))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CLoading_Panel>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CLoading_Panel**>(&m_pLoading_Panel))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Panel(TEXT("LoadingPanel"), m_pLoading_Panel);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMiniMap_Panel>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CMiniMap_Panel**>(&m_pMinimap_Panel))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMiniMap_Panel>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CMiniMap_Panel**>(&m_pMinimap_Panel))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Panel(TEXT("MinimapPanel"), m_pMinimap_Panel);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMission_Panel>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CMission_Panel**>(&m_pMission_Panel))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMission_Panel>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CMission_Panel**>(&m_pMission_Panel))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Panel(TEXT("MissionPanel"), m_pMission_Panel);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CAction_Panel>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CAction_Panel**>(&m_pAction_Panel))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CAction_Panel>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CAction_Panel**>(&m_pAction_Panel))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Panel(TEXT("ActionPanel"), m_pAction_Panel);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CEnemy_Panel>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CEnemy_Panel**>(&m_pEnemy_Panel))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CEnemy_Panel>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CEnemy_Panel**>(&m_pEnemy_Panel))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Panel(TEXT("Enemy_Panel"), m_pEnemy_Panel);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroom_Panel>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CBroom_Panel**>(&m_pBroom_Panel))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroom_Panel>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CBroom_Panel**>(&m_pBroom_Panel))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Panel(TEXT("Broom_Panel"), m_pBroom_Panel);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRide_Panel>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CRide_Panel**>(&m_pRide_Panel))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRide_Panel>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CRide_Panel**>(&m_pRide_Panel))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -81,6 +81,9 @@ HRESULT CGoblin::Initialize(void* pArg)
|
||||
if (pSender == this)
|
||||
return;
|
||||
|
||||
if (isDead())
|
||||
return;
|
||||
|
||||
m_pFSM->Change_State(FSMSTATE::FEAR);
|
||||
});
|
||||
|
||||
|
||||
@@ -72,6 +72,9 @@ HRESULT CGoblin_Assassin::Initialize(void* pArg)
|
||||
if (pSender == this)
|
||||
return;
|
||||
|
||||
if (isDead())
|
||||
return;
|
||||
|
||||
m_pFSM->Change_State(FSMSTATE::FEAR);
|
||||
});
|
||||
|
||||
@@ -92,6 +95,14 @@ void CGoblin_Assassin::Update(_float fTimeDelta)
|
||||
|
||||
m_pFSM->Update_State(fTimeDelta);
|
||||
|
||||
m_vCaptureTimer.x += fTimeDelta;
|
||||
if (m_vCaptureTimer.y < m_vCaptureTimer.x) {
|
||||
m_vCaptureTimer.x = 0.f;
|
||||
if (FAILED(m_pModelCom->Capture_BoneBuffer(m_pMotionTrailCom, *m_pTransformCom->Get_WorldMatrixPtr()))) {
|
||||
assert(false);
|
||||
}
|
||||
}
|
||||
|
||||
m_pModelCom->Play_Animation(fTimeDelta * m_fEasing, m_pTransformCom);
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
@@ -222,6 +233,10 @@ HRESULT CGoblin_Assassin::Render()
|
||||
m_pShaderCom->Bind_RawValue("g_fDisolveRatio", &zero, sizeof(_float));
|
||||
}
|
||||
|
||||
if (FAILED(m_pMotionTrailCom->Render(m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -328,6 +343,34 @@ HRESULT CGoblin_Assassin::Render_Shadow(SHADOW eType)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CGoblin_Assassin::Render_MotionTrail(ID3D11ShaderResourceView* pSRV)
|
||||
{
|
||||
|
||||
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Bind_Matrices(
|
||||
"g_OffsetMatrix",
|
||||
m_pModelCom->Get_OffsetMatrix(i).data(),
|
||||
(_int)m_pModelCom->Get_OffsetMatrix(i).size())))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom)))
|
||||
return E_FAIL;
|
||||
|
||||
m_pContext->VSSetShaderResources(26, 1, &pSRV);
|
||||
|
||||
if (FAILED(m_pModelCom->Render(i)))
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CGoblin_Assassin::Get_LockOnPos()
|
||||
{
|
||||
if (nullptr != m_pCharacter_Controller && true == m_pCharacter_Controller->IsActive()) {
|
||||
@@ -494,6 +537,18 @@ HRESULT CGoblin_Assassin::Ready_Components()
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("STAT_GOBLIN_ASSASSIN"), (CComponent**)&m_pStat))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
CMotion_Trail::MOTIONTRAIL_RENDERFUNC funcDesc{};
|
||||
funcDesc.funcRenderCall = [this](ID3D11ShaderResourceView* pSRV) { Render_MotionTrail(pSRV); };
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_Goblin_Assassin_MotionTrail"), (CComponent**)&m_pMotionTrailCom, &funcDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -640,7 +695,7 @@ void CGoblin_Assassin::Free()
|
||||
if (nullptr != m_pCallBack_HitReport) {
|
||||
m_pCallBack_HitReport->Finalize();
|
||||
}
|
||||
|
||||
SAFE_RELEASE(m_pMotionTrailCom);
|
||||
SAFE_RELEASE(m_pCharacter_Controller);
|
||||
SAFE_RELEASE(m_pRigidBody);
|
||||
SAFE_RELEASE(m_pSmoke);
|
||||
@@ -649,6 +704,7 @@ void CGoblin_Assassin::Free()
|
||||
SAFE_RELEASE(m_pEffectPool);
|
||||
Safe_Delete(m_pCallBack_Behavior);
|
||||
Safe_Delete(m_pCallBack_HitReport);
|
||||
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
|
||||
@@ -315,6 +315,11 @@ HRESULT CGoblin_Assassin_Spector::Bind_ShaderResources()
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
_float Intensity = 0.f;
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fMBIntensity", &Intensity, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -241,8 +241,30 @@ void CGoblin_Assassin::Behavior_SlashEnter()
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
m_pFSM->Enable_State(FSMSTATE::SLASH);
|
||||
|
||||
_float fDisAmount = {1.f};
|
||||
|
||||
if (m_fTargetDistance <= 4.f)
|
||||
{
|
||||
fDisAmount = 1.f;
|
||||
}
|
||||
else if (m_fTargetDistance <= 7.f)
|
||||
{
|
||||
fDisAmount = 1.5f;
|
||||
}
|
||||
else if (m_fTargetDistance <= 10.f)
|
||||
{
|
||||
fDisAmount = 2.f;
|
||||
}
|
||||
else if (m_fTargetDistance <= 13.f)
|
||||
{
|
||||
fDisAmount = 2.5f;
|
||||
}
|
||||
else if (m_fTargetDistance <= 16.f)
|
||||
{
|
||||
fDisAmount = 3.f;
|
||||
}
|
||||
pairAnimInfo = m_Animation[STATEANIM::SLASH];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second,1.5f,false,1.3f);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, fDisAmount,false,1.3f);
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {
|
||||
@@ -304,23 +326,20 @@ void CGoblin_Assassin::Behavior_DashEnter()
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second,1.f,false,1.f,false);
|
||||
m_fSkillCoolTime[ENUM_CLASS(GOBLIN_ASSASSIN_SKILL::DASH)] = m_fMaxSkillCoolTime[ENUM_CLASS(GOBLIN_ASSASSIN_SKILL::DASH)];
|
||||
|
||||
_float2 Dir8[5] =
|
||||
_float2 Dir8[8] =
|
||||
{
|
||||
{ 0, 1 }, { 1, 1 }, { 1, 0 },
|
||||
{ -1, 0 }, { -1, 1 },
|
||||
{ -1, 0 }, { -1, 1 }, { 0, -1 },
|
||||
{ 1, -1 }, { -1, -1 }
|
||||
};
|
||||
|
||||
_int iIndex = m_pGameInstance->Real_Random_Int(0, 4);
|
||||
_int iIndex = m_pGameInstance->Real_Random_Int(0, 7);
|
||||
_float2 dir = Dir8[iIndex];
|
||||
|
||||
_vector vRight = m_pTransformCom->Get_State(STATE::RIGHT);
|
||||
_vector vLook = m_pTransformCom->Get_State(STATE::LOOK);
|
||||
|
||||
_vector vDash =
|
||||
XMVector3Normalize(
|
||||
vRight * dir.x +
|
||||
vLook * dir.y
|
||||
);
|
||||
_vector vDash = XMVector3Normalize(vRight * dir.x + vLook * dir.y);
|
||||
|
||||
XMStoreFloat4(&m_vDashDir, vDash);
|
||||
}
|
||||
|
||||
@@ -204,23 +204,41 @@ void CGoblin_Dagger::Dagger_Hit()
|
||||
|
||||
PHYSX_USERDATA* pUserData = static_cast<PHYSX_USERDATA*>(pActor->userData);
|
||||
tagCollInfo.pObject = pUserData->pOwner;
|
||||
switch (PXOBJECT(pUserData->iSubKind))
|
||||
tagCollInfo.eHitType = ENUM_CLASS(HIT_TYPE::HIT_PROJECTILE);
|
||||
tagCollInfo.fDamage = 10.f;
|
||||
|
||||
switch (pUserData->eKind)
|
||||
{
|
||||
case Engine::PXOBJECT::PLAYER:
|
||||
{
|
||||
if (false == m_bVisible) {
|
||||
break;
|
||||
case PHYSX_KIND::BODY_DYNAMIC:
|
||||
switch (PXOBJECT(pUserData->iSubKind))
|
||||
{
|
||||
case PXOBJECT::SKILL_PROTEGO:
|
||||
{
|
||||
if (false == m_bVisible) {
|
||||
break;
|
||||
}
|
||||
m_bVisible = false;
|
||||
pUserData->pOwner->OnCollision(this, &tagCollInfo);
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case PHYSX_KIND::CCTActor:
|
||||
{
|
||||
switch (PXOBJECT(pUserData->iSubKind))
|
||||
{
|
||||
case Engine::PXOBJECT::PLAYER:
|
||||
{
|
||||
if (false == m_bVisible) {
|
||||
break;
|
||||
}
|
||||
m_bVisible = false;
|
||||
pUserData->pOwner->OnCollision(this, &tagCollInfo);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
m_bVisible = false;
|
||||
CStat* pStat = pUserData->pCharacter->Get_Owner()->Get_Component<CStat>();
|
||||
pStat->Get_Damage(10.f);
|
||||
pUserData->pOwner->OnCollision(this, &tagCollInfo);
|
||||
}
|
||||
break;
|
||||
case Engine::PXOBJECT::ALLY_HITBOX:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -77,6 +77,9 @@ HRESULT CGoblin_Mage::Initialize(void* pArg)
|
||||
if (pSender == this)
|
||||
return;
|
||||
|
||||
if (isDead())
|
||||
return;
|
||||
|
||||
m_pFSM->Change_State(FSMSTATE::FEAR);
|
||||
});
|
||||
|
||||
|
||||
@@ -296,6 +296,10 @@ HRESULT CGoblin_Spector::Bind_ShaderResources()
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
_float Intensity = 0.f;
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fMBIntensity", &Intensity, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@ HRESULT CGoblin::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||
|
||||
if (m_fTargetDistance >= 7.f)
|
||||
if (m_fTargetDistance >= 6.f)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
@@ -178,6 +178,8 @@ HRESULT CGoblin::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
|
||||
for (_uint i = 0; i < ENUM_CLASS(GOBLIN_SKILL::END); i++)
|
||||
{
|
||||
if (i == ENUM_CLASS(GOBLIN_SKILL::THROW))
|
||||
continue;
|
||||
if (m_fSkillCoolTime[i] == 0.f)
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||
|
||||
@@ -0,0 +1,597 @@
|
||||
#include "pch.h"
|
||||
#include "Human_Duelist.h"
|
||||
|
||||
#include "CallBack_Playable_Behavior.h"
|
||||
#include "CallBack_Playable_HitReport.h"
|
||||
#include "Character_Controller.h"
|
||||
#include "EffectPool.h"
|
||||
#include "GameInstance.h"
|
||||
#include "InfoInstance.h"
|
||||
#include "Layer.h"
|
||||
#include "Wand.h"
|
||||
#include "Mesh.h"
|
||||
|
||||
CHuman_Duelist::CHuman_Duelist(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CUnit(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CHuman_Duelist::CHuman_Duelist(const CHuman_Duelist& Prototype)
|
||||
: CUnit(Prototype),
|
||||
m_pInfoInstance(CInfoInstance::GetInstance())
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CHuman_Duelist::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CHuman_Duelist::Initialize(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_Components())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_Parts())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
Add_FSM();
|
||||
|
||||
Load_AnimXML("../Bin/Resources/Data/AnimList/Human_Duelist.xml");
|
||||
|
||||
{
|
||||
CFSM::FSM_DESC FSMDesc{};
|
||||
FSMDesc.pStates = &m_States;
|
||||
FSMDesc.pStateMask = &m_iStateMask;
|
||||
|
||||
m_pFSM->Bind_States(FSMDesc);
|
||||
m_pFSM->Change_State(FSMSTATE::IDLE);
|
||||
}
|
||||
|
||||
m_pCallBack_Behavior->Initialize(m_pCharacter_Controller, m_pRigidBody);
|
||||
m_pCallBack_HitReport->Initialize(m_pCharacter_Controller, m_pRigidBody);
|
||||
|
||||
m_pEffectPool = m_pGameInstance->Get_Layer(NEXT_LEVEL, TEXT("Layer_EffectPool"))->Get_Object<CEffectPool>();
|
||||
SAFE_ADDREF(m_pEffectPool);
|
||||
|
||||
m_pInfoInstance->Regist_PlayerAlly(this);
|
||||
m_pInfoInstance->Set_Damage(m_pStat->Get_Stat().fDamage);
|
||||
{
|
||||
PLAYERDESC* pDesc = static_cast<PLAYERDESC*>(pArg);
|
||||
_vector vPos = XMLoadFloat4(&pDesc->vPos);
|
||||
_vector vRotQ = XMLoadFloat4(&pDesc->vRotQ);
|
||||
m_pCharacter_Controller->Set_Position(vPos);
|
||||
m_pTransformCom->Set_State(STATE::POSITION, vPos);
|
||||
m_pTransformCom->Rotation(vRotQ);
|
||||
}
|
||||
|
||||
m_bAI = false;
|
||||
|
||||
m_pModelCom->Set_DisableRootMotionScale(true);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CHuman_Duelist::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
SetGravity();
|
||||
m_pTransformCom->RewindMomentum();
|
||||
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
|
||||
}
|
||||
|
||||
void CHuman_Duelist::Update(_float fTimeDelta)
|
||||
{
|
||||
m_pFSM->Update_State(fTimeDelta);
|
||||
|
||||
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
|
||||
|
||||
Play_Event();
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
#ifdef _DEBUG
|
||||
Describe_Entity();
|
||||
#endif // _DEBUG
|
||||
|
||||
{ // 세트
|
||||
m_pCallBack_HitReport->BeginFrame();
|
||||
m_pCharacter_Controller->Move(fTimeDelta);
|
||||
m_pCallBack_HitReport->Set_CurrentSlop();
|
||||
}
|
||||
|
||||
m_pInfoInstance->Set_PlayerPos(m_pTransformCom->Get_State(STATE::POSITION));
|
||||
}
|
||||
|
||||
void CHuman_Duelist::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pCharacter_Controller->Get_FootPosition());
|
||||
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONLIGHT, this);
|
||||
#endif // _DEBUG
|
||||
|
||||
Set_Shadow(m_pGameInstance->IsIn_ShadowViewFrustum(m_pTransformCom->Get_State(STATE::POSITION), m_pTransformCom->Get_Radius()));
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
|
||||
HRESULT CHuman_Duelist::Render()
|
||||
{
|
||||
if (!m_bVisible) {
|
||||
return S_OK;
|
||||
}
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
_float fIntensity = 0.f;
|
||||
m_pShaderCom->Bind_RawValue("g_fMBIntensity", &fIntensity, sizeof(_float));
|
||||
RENDER eType = m_pGameInstance->Get_CurrentRenderPass();
|
||||
if (RENDER::NONBLEND == eType) {
|
||||
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
|
||||
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
{
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrices(
|
||||
"g_OffsetMatrix", m_pModelCom->Get_OffsetMatrix(i).data(),
|
||||
(_int)m_pModelCom->Get_OffsetMatrix(i).size())))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Bind_ShaderParameters(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
|
||||
m_pModelCom->Bind_OutPut_SRV_VS_Prev(27, 0);
|
||||
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
//m_pCharacter_Controller->Render();
|
||||
#endif // _DEBUG
|
||||
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (RENDER::NONLIGHT == eType) {
|
||||
//m_pRigidBody->Render();
|
||||
}
|
||||
#endif
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CHuman_Duelist::Render_Shadow(SHADOW eType)
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_Shadow_Resource(m_pShaderCom, "g_ViewMatrix", D3DTS::VIEW, eType))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_Shadow_Resource(m_pShaderCom, "g_ProjMatrix", D3DTS::PROJ, eType))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
|
||||
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Bind_Matrices("g_OffsetMatrix",
|
||||
m_pModelCom->Get_OffsetMatrix(i).data(),
|
||||
(_int)m_pModelCom->Get_OffsetMatrix(i).size())))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Bind_ShaderParameters(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (i == ENUM_CLASS(PLAYER_MESH_ORDER::ROBE_CLOTH)) {
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_NPC_PBR_ANIM::SHADOW_LEGACY)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_NPC_PBR_ANIM::SHADOW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
|
||||
m_pModelCom->Bind_OutPut_SRV_VS_Prev(27, 0);
|
||||
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
void CHuman_Duelist::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
{
|
||||
_int iCurrAnim = m_pModelCom->Get_AnimIndex();
|
||||
|
||||
ON_COLLISION_INFO* CollisionDesc = static_cast<ON_COLLISION_INFO*>(pDesc);
|
||||
if (CollisionDesc) {
|
||||
Check_HitAngle(XMLoadFloat4(&CollisionDesc->vHitDir));
|
||||
m_eHitType = CollisionDesc->eHitType;
|
||||
m_pStat->Get_Damage(CollisionDesc->fDamage);
|
||||
}
|
||||
else {
|
||||
m_fHitDegree = -1.f;
|
||||
}
|
||||
|
||||
if (m_eHitType != ENUM_CLASS(HIT_TYPE::HIT_NONE))
|
||||
m_pFSM->Change_State(FSMSTATE::HIT);
|
||||
}
|
||||
void CHuman_Duelist::OnHit(CGameObject* pOther, CGameObject* pCaller)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
HRESULT CHuman_Duelist::Ready_Components()
|
||||
{
|
||||
CTransform::TRANSFORM_DESC Desc = {};
|
||||
|
||||
Desc.fSpeedPerSec = 10.f;
|
||||
Desc.fRotationPerSec = XMConvertToRadians(180.0f);
|
||||
Desc.fRadius = 10.f;
|
||||
|
||||
if (FAILED(__super::Ready_Components(&Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_strModelPrototypeTag = TEXT("Prototype_Component_M_Student_Model");
|
||||
|
||||
/* Com_Model */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_strModelPrototypeTag,
|
||||
reinterpret_cast<CComponent**>(&m_pModelCom)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* Com_Shader */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_NPC_PBR_ANIM,
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
LightDesc.eType = LIGHT::POINT;
|
||||
LightDesc.fRange = 10.f;
|
||||
LightDesc.iLevel = NEXT_LEVEL;
|
||||
LightDesc.pPosition = m_pTransformCom->Get_StatePtr(STATE::POSITION);
|
||||
LightDesc.vAmbient = CMyTools::ColorRGB_A_HEXtoFLOAT4(0xffffff, 1.f);
|
||||
LightDesc.vDiffuse = CMyTools::ColorRGB_A_HEXtoFLOAT4(0xffffff, 1.f);
|
||||
LightDesc.vSpecular = CMyTools::ColorRGB_A_HEXtoFLOAT4(0xffffff, 1.f);
|
||||
if (FAILED(Add_Component<CLight>(g_iStaticLevel, &m_pLightCom, &LightDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pStat = m_pInfoInstance->Get_PlayerStatPtr();
|
||||
m_Components.push_back(m_pStat);
|
||||
SAFE_ADDREF(m_pStat);
|
||||
|
||||
{ // CCT
|
||||
CCharacter_Controller::Character_Controller_DESC Desc{};
|
||||
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::PLAYER);
|
||||
Desc.pTransform = m_pTransformCom;
|
||||
Desc.eBodyType = ACTOR::CAPSULE;
|
||||
Desc.fContactOffset = 0.001f;
|
||||
Desc.fMaterial = { 1.2f, 1.0f, 0.0f };
|
||||
Desc.bAutoStepping = { false };
|
||||
Desc.fStepOffset = { 0.02f };
|
||||
Desc.fRadius = 0.5f;
|
||||
Desc.fHeight = 0.6f;
|
||||
Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_Playable_HitReport::Create();
|
||||
Desc.pCallback_Behavior = m_pCallBack_Behavior = CCallBack_Playable_Behavior::Create();
|
||||
Desc.eClimbingMode = PSX::PxCapsuleClimbingMode::eEASY;
|
||||
Desc.fWalkableSlope = 45.f;
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_CCT_CAPSULE"), (CComponent**)&m_pCharacter_Controller, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pCharacter_Controller->SetGravity(false);
|
||||
}
|
||||
|
||||
{ // DO
|
||||
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::PLAYER);
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX"), (CComponent**)&m_pRigidBody, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pGameInstance->Detach_Actor(*m_pRigidBody->Get_Actor(), NEXT_LEVEL);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CHuman_Duelist::Ready_Parts()
|
||||
{
|
||||
CWand::WAND_DESC WandDesc{};
|
||||
WandDesc.pParentTransform = m_pTransformCom;
|
||||
WandDesc.pSocketMatrices = m_pModelCom->Get_BoneMatrixPtr("SKT_RightHand");
|
||||
|
||||
if (FAILED(Add_PartObject<CWand>("Wand", g_iStaticLevel, nullptr, &WandDesc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CHuman_Duelist::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevViewMatrix", D3DTS::VIEW))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevProjMatrix", D3DTS::PROJ))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CHuman_Duelist::Bind_ShaderParameters(_uint iMeshOrder)
|
||||
{
|
||||
_bool bUseColorMixer = false;
|
||||
|
||||
_uint iColorParam = { UINT_MAX };
|
||||
_float fMixerFactor = { FLT_MAX };
|
||||
_uint iColorMixerMethod = { 0 };
|
||||
|
||||
switch (PLAYER_MESH_ORDER(iMeshOrder))
|
||||
{
|
||||
case PLAYER_MESH_ORDER::HAIR_MAIN:
|
||||
case PLAYER_MESH_ORDER::HEAD_EYELASH:
|
||||
case PLAYER_MESH_ORDER::HAIR_SUB:
|
||||
bUseColorMixer = true;
|
||||
iColorParam = 0x2E2E2E;
|
||||
fMixerFactor = 0.9f;
|
||||
iColorMixerMethod = 1;
|
||||
break;
|
||||
case PLAYER_MESH_ORDER::LOWER:
|
||||
bUseColorMixer = true;
|
||||
iColorParam = 0x292557;
|
||||
fMixerFactor = 0.5f;
|
||||
iColorMixerMethod = 1;
|
||||
break;
|
||||
case PLAYER_MESH_ORDER::SHOES:
|
||||
bUseColorMixer = true;
|
||||
iColorParam = 0x614242;
|
||||
fMixerFactor = 0.5f;
|
||||
iColorMixerMethod = 1;
|
||||
break;
|
||||
case PLAYER_MESH_ORDER::UPPER:
|
||||
bUseColorMixer = true;
|
||||
iColorParam = 0xBFAC29;
|
||||
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
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (true == bUseColorMixer) {
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iPackedBlendColor", &iColorParam, sizeof(_uint)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fMixerFactor", &fMixerFactor, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iColorMixerMethod", &iColorMixerMethod, sizeof(_uint)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
void CHuman_Duelist::SetGravity()
|
||||
{
|
||||
PSX::PxControllerCollisionFlags eCollisionFlags = m_pCharacter_Controller->Get_CollisionFlags();
|
||||
eCollisionFlags;
|
||||
if (false == eCollisionFlags.isSet(PSX::PxControllerCollisionFlag::Enum::eCOLLISION_DOWN)
|
||||
&& false == eCollisionFlags.isSet(PSX::PxControllerCollisionFlag::Enum::eCOLLISION_SIDES)) {
|
||||
if (false == m_pFSM->IsEnable(FSMSTATE::JUMP) && m_eHitType != ENUM_CLASS(HIT_TYPE::HIT_HEAVY)) { // 벽에 닿지 않았는데 점프 중이 아닐 땐 중력 on
|
||||
m_pCharacter_Controller->SetGravity(true);
|
||||
}
|
||||
else { // 점프 중일 땐 off
|
||||
m_pCharacter_Controller->SetGravity(false);
|
||||
}
|
||||
}
|
||||
else { // 벽에 닿는중일 땐 항상 중력 off
|
||||
m_pCharacter_Controller->SetGravity(false);
|
||||
}
|
||||
}
|
||||
|
||||
_matrix CHuman_Duelist::Get_WandPos()
|
||||
{
|
||||
CWand* pWand = Get_PartObject<CWand>();
|
||||
|
||||
if (pWand == nullptr)
|
||||
return _matrix();
|
||||
|
||||
return pWand->Get_WorldMatrix();
|
||||
}
|
||||
|
||||
CHuman_Duelist* CHuman_Duelist::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CHuman_Duelist* pInstance = new CHuman_Duelist(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CHuman_Duelist");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CHuman_Duelist::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CHuman_Duelist* pInstance = new CHuman_Duelist(*this);
|
||||
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CHuman_Duelist");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CHuman_Duelist::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
|
||||
if (nullptr != m_pInfoInstance) {
|
||||
CInfoInstance* pInfo = m_pInfoInstance;
|
||||
m_pInfoInstance = nullptr;
|
||||
pInfo->Deregist_PlayerAlly(this);
|
||||
}
|
||||
|
||||
if (nullptr != m_pCallBack_Behavior) {
|
||||
m_pCallBack_Behavior->Finalize();
|
||||
}
|
||||
if (nullptr != m_pCallBack_HitReport) {
|
||||
m_pCallBack_HitReport->Finalize();
|
||||
}
|
||||
SAFE_RELEASE(m_pCharacter_Controller);
|
||||
SAFE_RELEASE(m_pRigidBody);
|
||||
SAFE_RELEASE(m_pLightCom);
|
||||
SAFE_RELEASE(m_pStat);
|
||||
Safe_Delete(m_pCallBack_Behavior);
|
||||
Safe_Delete(m_pCallBack_HitReport);
|
||||
SAFE_RELEASE(m_pEffectPool);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CHuman_Duelist::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("UNIT", 0, IMGUI_GLOBAL_BEGIN_FLAG);
|
||||
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
|
||||
if (GUI::CollapsingHeader("HUMAN_DUELIST_DESC")) {
|
||||
if (true == GUI::Button("ShaderRefresh")) {
|
||||
m_pShaderCom->Shader_Refresh();
|
||||
}
|
||||
m_pCharacter_Controller->Describe_Entity();
|
||||
_float4 vMomentum = {};
|
||||
XMStoreFloat4(&vMomentum, m_pTransformCom->Get_CurrentMomentum());
|
||||
GUI::Text("%.2f %.2f %.2f %.2f ", vMomentum.x, vMomentum.y, vMomentum.z, vMomentum.w);
|
||||
_char label[256];
|
||||
for (auto& iter : m_KeyFrames)
|
||||
{
|
||||
sprintf_s(label, "%s %.2f", iter.first.c_str(), iter.second);
|
||||
|
||||
GUI::Text(label);
|
||||
}
|
||||
|
||||
_float3 Pos;
|
||||
XMStoreFloat3(&Pos, Get_WorldPostion());
|
||||
|
||||
float Pos3[3] = { Pos.x, Pos.y, Pos.z };
|
||||
GUI::DragFloat3("Pos", Pos3);
|
||||
|
||||
|
||||
_float RotR, RotU, RotL;
|
||||
RotR = XMVectorGetX(m_pTransformCom->Get_State(STATE::RIGHT));
|
||||
RotU = XMVectorGetY(m_pTransformCom->Get_State(STATE::UP));
|
||||
RotL = XMVectorGetZ(m_pTransformCom->Get_State(STATE::LOOK));
|
||||
|
||||
float Rot3[3] = { RotR, RotU,RotL };
|
||||
GUI::DragFloat3("Rot", Rot3);
|
||||
|
||||
|
||||
string AnimList = m_pModelCom->Get_AnimList(m_pModelCom->Get_AnimIndex());
|
||||
GUI::Text(AnimList.c_str());
|
||||
|
||||
GUI::Text("AnimTrack %.2f", m_pModelCom->Get_CurrentTrackPosition());
|
||||
GUI::Text("AnimRatio %.2f", m_pModelCom->Get_CurrentTrackProgressRatio());
|
||||
GUI::Text("AnimSpeed %.2f", m_pModelCom->Get_AnimSpeed());
|
||||
|
||||
GUI::Checkbox("Render", &m_bVisible);
|
||||
|
||||
GUI::Text("%d", m_iStateMask);
|
||||
GUI::Text("HP : %f, %f", m_pStat->Get_Stat().fCurrentHp, m_pStat->Get_Stat().fMaxHp);
|
||||
GUI::SameLine(); if (GUI::Button("FULL")) { m_pStat->Set_Stat(ENUM_CLASS(STAT::CURRENTHP), m_pStat->Get_Stat().fMaxHp); }
|
||||
|
||||
m_pLightCom->Describe_Entity();
|
||||
}
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
@@ -0,0 +1,190 @@
|
||||
#include "pch.h"
|
||||
#include "Human_Duelist.h"
|
||||
|
||||
#include "InfoInstance.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "Wand.h"
|
||||
#include "Character_Controller.h"
|
||||
#include "CallBack_Playable_Behavior.h"
|
||||
#include "CallBack_Playable_HitReport.h"
|
||||
|
||||
#pragma region STATE
|
||||
#include "State_Idle.h"
|
||||
#include "State_Move.h"
|
||||
#include "State_Combat.h"
|
||||
#include "State_LightAttack.h"
|
||||
#include "State_Spell.h"
|
||||
#include "State_Shield.h"
|
||||
#include "State_Hit.h"
|
||||
#pragma endregion
|
||||
|
||||
#include "EffectPool.h"
|
||||
|
||||
void CHuman_Duelist::Behavior_IdleEnter()
|
||||
{
|
||||
m_pFSM->Enable_State(FSMSTATE::IDLE);
|
||||
}
|
||||
|
||||
HRESULT CHuman_Duelist::Behavior_IdleExitCheck(_float fTimeDelta)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CHuman_Duelist::Behavior_IdleExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::IDLE);
|
||||
}
|
||||
|
||||
void CHuman_Duelist::Behavior_CombatEnter()
|
||||
{
|
||||
m_pFSM->Enable_State(FSMSTATE::COMBAT);
|
||||
}
|
||||
|
||||
HRESULT CHuman_Duelist::Behavior_CombatExitCheck()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CHuman_Duelist::Behavior_CombatExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::COMBAT);
|
||||
}
|
||||
|
||||
void CHuman_Duelist::Behavior_LightAttackEnter()
|
||||
{
|
||||
m_pFSM->Enable_State(FSMSTATE::LIGHT_ATTACK);
|
||||
}
|
||||
|
||||
HRESULT CHuman_Duelist::Behavior_LightAttackExitCheck(_float fTimeDelta)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CHuman_Duelist::Behavior_LightAttackExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::LIGHT_ATTACK);
|
||||
}
|
||||
|
||||
void CHuman_Duelist::Behavior_SpellEnter()
|
||||
{
|
||||
m_pFSM->Enable_State(FSMSTATE::SPELL);
|
||||
}
|
||||
|
||||
HRESULT CHuman_Duelist::Behavior_SpellExitCheck()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CHuman_Duelist::Behavior_SpellExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::SPELL);
|
||||
}
|
||||
|
||||
void CHuman_Duelist::Behavior_ShieldEnter()
|
||||
{
|
||||
m_pFSM->Enable_State(FSMSTATE::SHIELD);
|
||||
}
|
||||
|
||||
HRESULT CHuman_Duelist::Behavior_ShieldExitCheck()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CHuman_Duelist::Behavior_ShieldExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::SHIELD);
|
||||
}
|
||||
|
||||
void CHuman_Duelist::Behavior_HitEnter()
|
||||
{
|
||||
m_pFSM->Enable_State(FSMSTATE::HIT);
|
||||
}
|
||||
|
||||
HRESULT CHuman_Duelist::Behavior_HitExitCheck()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CHuman_Duelist::Behavior_HitExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::HIT);
|
||||
}
|
||||
|
||||
|
||||
void CHuman_Duelist::Add_FSM()
|
||||
{
|
||||
#pragma region Behavior_Movement_NotFocus
|
||||
{
|
||||
CState_Idle::STATE_IDLE_DESC Desc{};
|
||||
Desc.pOwner = this;
|
||||
Desc.funcEnterEvent = [this]() { Behavior_IdleEnter(); };
|
||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_IdleExitCheck(fTimedelta); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_IdleExit(); };
|
||||
Desc.funcPriorityUpdate = nullptr;
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::IDLE, CState_Idle::Create(&Desc));
|
||||
}
|
||||
#pragma endregion
|
||||
#pragma region Behavior_Combat
|
||||
{
|
||||
CState_Combat::STATE_COMBAT_DESC Desc{};
|
||||
Desc.pOwner = this;
|
||||
Desc.funcEnterEvent = [this]() { Behavior_CombatEnter(); };
|
||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_CombatExitCheck(); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_CombatExit(); };
|
||||
Desc.funcPriorityUpdate = nullptr;
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::COMBAT, CState_Combat::Create(&Desc));
|
||||
}
|
||||
|
||||
{
|
||||
CState_LightAttack::STATE_LIGHTATTACK_DESC Desc{};
|
||||
Desc.pOwner = this;
|
||||
Desc.funcEnterEvent = [this]() { Behavior_LightAttackEnter(); };
|
||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_LightAttackExitCheck(fTimedelta); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_LightAttackExit(); };
|
||||
Desc.funcPriorityUpdate = nullptr;
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::LIGHT_ATTACK, CState_LightAttack::Create(&Desc));
|
||||
}
|
||||
|
||||
{
|
||||
CState_Spell::STATE_SPELL_DESC Desc{};
|
||||
Desc.pOwner = this;
|
||||
Desc.funcEnterEvent = [this]() { Behavior_SpellEnter(); };
|
||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_SpellExitCheck(); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_SpellExit(); };
|
||||
Desc.funcPriorityUpdate = nullptr;
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::SPELL, CState_Spell::Create(&Desc));
|
||||
}
|
||||
|
||||
{
|
||||
CState_Shield::STATE_SHIELD_DESC Desc{};
|
||||
Desc.pOwner = this;
|
||||
Desc.funcEnterEvent = [this]() { Behavior_ShieldEnter(); };
|
||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_ShieldExitCheck(); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_ShieldExit(); };
|
||||
Desc.funcPriorityUpdate = nullptr;
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::SHIELD, CState_Shield::Create(&Desc));
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
#pragma region Behavior_Hit
|
||||
{
|
||||
CState_Hit::STATE_HIT_DESC Desc{};
|
||||
Desc.pOwner = this;
|
||||
Desc.funcEnterEvent = [this]() { Behavior_HitEnter(); };
|
||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_HitExitCheck(); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_HitExit(); };
|
||||
Desc.funcPriorityUpdate = nullptr;
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::HIT, CState_Hit::Create(&Desc));
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
@@ -105,10 +107,18 @@ HRESULT CInfoInstance::Deregist_ActiveMonster(CMonster* pUnit)
|
||||
|
||||
void CInfoInstance::Get_LockOnInfo(LOCKON_INFO& Info)
|
||||
{
|
||||
if (false == m_bSearchLockOnTarget) {
|
||||
return;
|
||||
}
|
||||
Info.pUnit = m_pMonsterInfo->Get_LockOnUnit();
|
||||
Info.pInteractive = m_pInteractiveInfo->Get_LockOnUnit();
|
||||
}
|
||||
|
||||
void CInfoInstance::Set_SearchLockOnFlag(_bool bLockOn)
|
||||
{
|
||||
m_bSearchLockOnTarget = bLockOn;
|
||||
}
|
||||
|
||||
pair<CUnit*, CTransform*> CInfoInstance::Get_NearestPlayerAlly(_fvector vPos)
|
||||
{
|
||||
return m_pMonsterInfo->Get_NearestPlayerAlly(vPos);
|
||||
@@ -329,9 +339,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 +380,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 +448,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 +526,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);
|
||||
|
||||
@@ -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) }
|
||||
{
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
#pragma region ACTOR
|
||||
#include "Player.h"
|
||||
#include "Human_Duelist.h"
|
||||
#include "Troll.h"
|
||||
#include "Goblin.h"
|
||||
#include "Goblin_Mage.h"
|
||||
@@ -32,6 +33,7 @@
|
||||
#include "NPC_EleazarFig.h"
|
||||
#include "BroomRacerAI.h"
|
||||
#include "Ranrok.h"
|
||||
#include "RandomNpc.h"
|
||||
#pragma endregion
|
||||
|
||||
|
||||
@@ -102,9 +104,11 @@ HRESULT CLevel_GamePlay::Initialize(void* pArg)
|
||||
if (FAILED(Ready_Layer_SkyBox(TEXT("Layer_SkyBox")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_Layer_Player(LAYER_PLAYER))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_Layer_Monster())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -326,9 +330,9 @@ HRESULT CLevel_GamePlay::Ready_Background()
|
||||
isReady_Hogwart = true;
|
||||
#endif // gimch
|
||||
#ifdef Bin
|
||||
isReady_Background = true;
|
||||
isReady_Hogsmeade = true;
|
||||
isReady_Hogwart = true;
|
||||
isReady_Background = false;
|
||||
isReady_Hogsmeade = false;
|
||||
isReady_Hogwart = false;
|
||||
#endif //
|
||||
#ifdef 진우
|
||||
isReady_Background = false;
|
||||
@@ -337,8 +341,8 @@ HRESULT CLevel_GamePlay::Ready_Background()
|
||||
#endif //
|
||||
#ifdef 기무리
|
||||
isReady_Background = true;
|
||||
isReady_Hogsmeade = true;
|
||||
isReady_Hogwart = true;
|
||||
isReady_Hogsmeade = false;
|
||||
isReady_Hogwart = false;
|
||||
#endif //
|
||||
#ifdef 나
|
||||
isReady_Background = true;
|
||||
@@ -714,21 +718,24 @@ HRESULT CLevel_GamePlay::Ready_Layer_Player(const _wstring& strLayerTag)
|
||||
}
|
||||
|
||||
_bool isLoad_NPC = { true };
|
||||
_bool isLoad_RandomNPC = { true };
|
||||
#ifdef _DEBUG
|
||||
#ifdef gimch
|
||||
|
||||
isLoad_RandomNPC = true;
|
||||
#endif // gimch
|
||||
#ifdef 진우
|
||||
|
||||
isLoad_RandomNPC = true;
|
||||
#endif //
|
||||
#ifdef 기무리
|
||||
isLoad_NPC = true;
|
||||
isLoad_NPC = false;
|
||||
isLoad_RandomNPC = false;
|
||||
#endif //
|
||||
#ifdef 나
|
||||
|
||||
isLoad_RandomNPC = true;
|
||||
#endif //
|
||||
#ifdef Bin
|
||||
isLoad_NPC = true;
|
||||
isLoad_RandomNPC = true;
|
||||
#endif // Bin
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -751,6 +758,34 @@ HRESULT CLevel_GamePlay::Ready_Layer_Player(const _wstring& strLayerTag)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (true == isLoad_NPC)
|
||||
{
|
||||
for (_uint i = 0; i < 11; i++)
|
||||
{
|
||||
{
|
||||
CRandomNpc::NPCDESC NPCDesc{};
|
||||
_float X = m_pGameInstance->Real_Random_Float(22.f, 29.f);
|
||||
_float Z = m_pGameInstance->Real_Random_Float(20.f, 29.f);
|
||||
NPCDesc.vPos = _float4(X, 1.f, Z, 1.f);
|
||||
NPCDesc.vRotQ = _float4(0.f, 0.f, 0.f, 1.f);
|
||||
NPCDesc.iIndex = i;
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRandomNpc>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &NPCDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//CPlayer::PLAYERDESC playerDesc = {};
|
||||
//playerDesc.vPos = _float4(-21.f, 0.f, -14.f, 1.f);
|
||||
//playerDesc.vRotQ = _float4(0.f, 0.f, 0.f, 1.f);
|
||||
//if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CHuman_Duelist>(g_iStaticLevel, NEXT_LEVEL, strLayerTag))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -797,7 +832,7 @@ HRESULT CLevel_GamePlay::Ready_Layer_Monster()
|
||||
|
||||
#endif //
|
||||
#ifdef Bin
|
||||
|
||||
isLoad_Monster = true;
|
||||
#endif // Bin
|
||||
#endif // _DEBUG
|
||||
if (true == isLoad_Monster) {
|
||||
@@ -831,6 +866,8 @@ HRESULT CLevel_GamePlay::Ready_Layer_Monster()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
#if 진우
|
||||
#else
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#pragma region ACTOR
|
||||
|
||||
#include "Player.h"
|
||||
#include "Human_Duelist.h"
|
||||
#include "PlayerRobe.h"
|
||||
#include "Goblin.h"
|
||||
#include "Goblin_Mage.h"
|
||||
@@ -41,6 +42,7 @@
|
||||
#include "NPC_EleazarFig.h"
|
||||
#include "BroomRacerAI.h"
|
||||
#include "Ranrok.h"
|
||||
#include "RandomNpc.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#include "Camera_Model.h"
|
||||
@@ -152,8 +154,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"
|
||||
|
||||
@@ -212,6 +214,11 @@
|
||||
#include "Ranrok_Point.h"
|
||||
#include "Ranrok_Charge.h"
|
||||
#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"
|
||||
@@ -401,9 +408,9 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
#endif //
|
||||
#ifdef 기무리
|
||||
isLoad_Background = true;
|
||||
isLoad_Hogwart = true;
|
||||
isLoad_UI_SEQUANTIAL = true;
|
||||
isLoad_NPC = true;
|
||||
isLoad_Hogwart = false;
|
||||
isLoad_UI_SEQUANTIAL = false;
|
||||
isLoad_NPC = false;
|
||||
isLoad_Monster = true;
|
||||
#endif //
|
||||
#ifdef 나
|
||||
@@ -412,9 +419,9 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
isLoad_UI_SEQUANTIAL = false;
|
||||
#endif //
|
||||
#ifdef Bin
|
||||
isLoad_Background = true;
|
||||
isLoad_Hogwart = true;
|
||||
isLoad_UI_SEQUANTIAL = true;
|
||||
isLoad_Background = false;
|
||||
isLoad_Hogwart = false;
|
||||
isLoad_UI_SEQUANTIAL = false;
|
||||
#endif // Bin
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -1936,6 +1943,23 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
Desc1.vLocalTranslation = { 0.f, 0.f, 0.f };
|
||||
}
|
||||
|
||||
CRigidBody_Dynamic::RIGIDBODY_PROTOTYPE_DYNAMIC_DESC RanrokDesc{};
|
||||
{
|
||||
RanrokDesc.eType = ACTOR::BOX;
|
||||
RanrokDesc.ePxRigidBodyFlags = { /*PSX::PxRigidBodyFlag::eKINEMATIC*/ };
|
||||
RanrokDesc.ePxShapeFlags = { PSX::PxShapeFlag::eVISUALIZATION | PSX::PxShapeFlag::eSCENE_QUERY_SHAPE | PSX::PxShapeFlag::eSIMULATION_SHAPE };
|
||||
RanrokDesc.ePxMaterialTypes = { PXMATERIAL::DEFAULT };
|
||||
RanrokDesc.vMatInfo = { 0.5f, 0.5f, 0.6f };
|
||||
RanrokDesc.fContactOffset = { 0.05f };
|
||||
RanrokDesc.vhalfGeometryInfo = { 0.5f, 0.5f, 0.5f };
|
||||
RanrokDesc.fDensity = 1.f;
|
||||
RanrokDesc.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY());
|
||||
RanrokDesc.eLockFlag = {};
|
||||
RanrokDesc.vAutoDamping = { 1.f, 1.f };
|
||||
RanrokDesc.vLocalRotQ = { 0.f, 0.f, 0.f, 1.f };
|
||||
RanrokDesc.vLocalTranslation = { 0.f, 5.f, 0.f };
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_HEAVY_WALL"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -1945,7 +1969,9 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_SHIELD"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc1)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_RANROK"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, RanrokDesc)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
Desc.ePxRigidBodyFlags = { PSX::PxRigidBodyFlag::eKINEMATIC };
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX_KIN"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
|
||||
return E_FAIL;
|
||||
@@ -2008,8 +2034,67 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_ChiyoKogawa_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/ChiyoKogawa/ChiyoKogawa.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_MatildaWeasely_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/MatildaWeasely/MatildaWeasely.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_SatyavatiShah_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/SatyavatiShah/SatyavatiShah.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Ghost_Peeves_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/Ghost_Peeves/Ghost_Peeves.bin", XMMatrixScaling(0.1f, 0.1f, 0.1f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/Ghost_Peeves/Ghost_Peeves.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_PhineasBlack_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/PhineasBlack/PhineasBlack.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_M_Student_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/M_Student/M_Student.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_F_Student_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/F_Student/F_Student.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Elf_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/Elf/Elf.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Kitchen_Female_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/Elf/Kitchen_Female/Kitchen_Female.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_BaiHowin_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/BaiHowin/BaiHowin.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_GeorgeOsric_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/GeorgeOsric/GeorgeOsric.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_DinahHecat_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/DinahHecat/DinahHecat.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_MudiwaOnai_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/MudiwaOnai/MudiwaOnai.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
@@ -2036,11 +2121,10 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Professor_EleazarFig_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Ghost_Peeves_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/Ghost_Peeves/Ghost_Peeves.bin", XMMatrixScaling(0.1f, 0.1f, 0.1f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
@@ -2068,7 +2152,7 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Camera_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Camera/Camera.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationX(XMConvertToRadians(-90.f)) * XMMatrixIdentity())))) {
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Camera/Camera.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
@@ -2092,6 +2176,18 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Object/Broom/Broom.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_SK_MoonTrimmerBroom_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Object/Broom/MoonTrimmerBroom/SK_MoonTrimmerBroom.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_DarkWizardBroom_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Object/Broom/DarkWizardBroom/DarkWizardBroom.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_WildFireBroom_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Object/Broom/WildFireBroom/WildFireBroom.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Troll_Weapon_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Object/SubTroll_Weapon/SK_WPN_Troll_Club07.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationX(XMConvertToRadians(-90.f)) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
@@ -2300,6 +2396,24 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CRanrok_Hit>(g_iStaticLevel, CRanrok_Hit::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CRanrok_Impact>(g_iStaticLevel, CRanrok_Impact::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CRanrok_Land>(g_iStaticLevel, CRanrok_Land::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CRanrok_GroundPulse>(g_iStaticLevel, CRanrok_GroundPulse::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CRanrok_Rush_Bottom>(g_iStaticLevel, CRanrok_Rush_Bottom::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CGoblin_Teleport>(g_iStaticLevel, CGoblin_Teleport::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
@@ -2760,12 +2874,12 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
return E_FAIL;
|
||||
}
|
||||
/* For.Prototype_GameObject_SpellLearn_Ride_Bbooster_Slot*/
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CRide_Bbooster_Slot>(g_iStaticLevel, CRide_Bbooster_Slot::Create(m_pDevice, m_pContext))))
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CRide_Booster_Slot>(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<CRide_BboosterBar>(g_iStaticLevel, CRide_BboosterBar::Create(m_pDevice, m_pContext))))
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CRide_BoosterBar>(g_iStaticLevel, CRide_BoosterBar::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -3164,6 +3278,10 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CPlayer>(g_iStaticLevel, CPlayer::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_Human_Duelist */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CHuman_Duelist>(g_iStaticLevel, CHuman_Duelist::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_BroomRacerAI */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CBroomRacerAI>(g_iStaticLevel, CBroomRacerAI::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
@@ -3207,6 +3325,11 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* For.Prototype_GameObject_RandomNpc */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CRandomNpc>(g_iStaticLevel, CRandomNpc::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CCamera_Model>(g_iStaticLevel, CCamera_Model::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
@@ -3332,6 +3455,17 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
CModel* pModelOriginal = (CModel*)m_pGameInstance->Find_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_Assassin_Model"));
|
||||
CMotion_Trail::MODELCAPTURE_DESC Desc{};
|
||||
Desc.fMaxCaptureLifeTime = 2.f;
|
||||
Desc.iMaximumCapture = 4;
|
||||
Desc.iNumBones = pModelOriginal->Get_BoneAbsoluteCount();
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_Assassin_MotionTrail"), CMotion_Trail::Create(m_pDevice, m_pContext, &Desc)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
m_strMessage = TEXT("로딩이 완료되었습니다..");
|
||||
|
||||
m_isFinished = true;
|
||||
|
||||
@@ -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<CLoadingWidget>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CLoadingWidget**>(&m_pLoadingWidget))))
|
||||
//if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CLoadingWidget>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CLoadingWidget**>(&m_pLoadingWidget))))
|
||||
//{
|
||||
// return E_FAIL;
|
||||
//}
|
||||
//Add_Element(TEXT("LoadingWidget"), m_pLoadingWidget);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CLoadingWidget_Flame>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CLoadingWidget_Flame**>(&m_pLoadingWidget_Flame))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CLoadingWidget_Flame>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CLoadingWidget_Flame**>(&m_pLoadingWidget_Flame))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ void CMapElement_Chest::Update(_float fTimeDelta)
|
||||
#ifdef _DEBUG
|
||||
/*if(CHEST_STATE::OPENED != m_eCurState)
|
||||
{
|
||||
_vector vPlayerPos = m_pGameInstance->Get_Layer(g_iStaticLevel, LAYER_PLAYER)->Get_Object<CPlayer>()->Get_WorldPostion();
|
||||
_vector vPlayerPos = m_pGameInstance->Get_Layer(g_iStaticLevel, LAYER_PLAYER)->Get_Object<CHuman_Duelist>()->Get_WorldPostion();
|
||||
|
||||
_float fDistance = XMVectorGetX(XMVector3Length(vPlayerPos - m_pTransformCom->Get_State(STATE::POSITION)));
|
||||
|
||||
@@ -161,12 +161,12 @@ HRESULT CMapElement_Chest::Render()
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
if (FAILED(m_pRigidBody->Render())) {
|
||||
/*if (FAILED(m_pRigidBody->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}*/
|
||||
#endif // _DEBUG
|
||||
|
||||
if (FAILED(m_pLid->Render(m_iShaderPass_Index)))
|
||||
if (FAILED(m_pLid->Render(m_iShaderPass_Index)))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
|
||||
@@ -100,6 +100,9 @@ void CMapElement_Door::Late_Update(_float fTimeDelta)
|
||||
|
||||
HRESULT CMapElement_Door::Render()
|
||||
{
|
||||
if (m_bDead == true) {
|
||||
return S_OK;
|
||||
}
|
||||
if (FAILED(Bind_ShaderResources()))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
@@ -387,6 +387,12 @@ ON_COLLISION_INFO CMapElement_Interactable::CollisionCheck(_fvector StartPos, _f
|
||||
m_bHit = true;
|
||||
}
|
||||
break;
|
||||
case PXOBJECT::GOBLIN_ASSASSIN:
|
||||
{
|
||||
pUserData->pOwner->OnCollision(this, &tagCollInfo);
|
||||
m_bHit = true;
|
||||
}
|
||||
break;
|
||||
case PXOBJECT::TROLL:
|
||||
{
|
||||
pUserData->pOwner->OnCollision(this, &tagCollInfo);
|
||||
|
||||
@@ -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<CMiniMap_TrimBorder>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CMiniMap_TrimBorder**>(&m_pMiniMap_TrimBorder))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMiniMap_TrimBorder>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast <CMiniMap_TrimBorder**>(&m_pMiniMap_TrimBorder))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("MiniMap_TrimBorder"), m_pMiniMap_TrimBorder);
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CNoMountIcon>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CNoMountIcon**>(&m_pNoMountIcon))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CNoMountIcon>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast <CNoMountIcon**>(&m_pNoMountIcon))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "NPCInteraction.h"
|
||||
#include "GameInstance.h"
|
||||
#include "Unit.h"
|
||||
#include "InfoInstance.h"
|
||||
|
||||
CNPCInteraction::CNPCInteraction(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CGameObject(pDevice, pContext)
|
||||
@@ -9,7 +10,8 @@ CNPCInteraction::CNPCInteraction(ID3D11Device* pDevice, ID3D11DeviceContext* pCo
|
||||
}
|
||||
|
||||
CNPCInteraction::CNPCInteraction(const CNPCInteraction& rhs)
|
||||
: CGameObject(rhs)
|
||||
: CGameObject(rhs),
|
||||
m_pInfoInstance(CInfoInstance::GetInstance())
|
||||
{
|
||||
}
|
||||
|
||||
@@ -36,12 +38,15 @@ HRESULT CNPCInteraction::Initialize(void* pArg)
|
||||
|
||||
m_fViewPort = _float2(_float(g_iWinSizeX), _float(g_iWinSizeY));
|
||||
|
||||
|
||||
//m_fX = 630.f;
|
||||
//m_fY = -125.f;
|
||||
m_fAlpha = 1.f;
|
||||
m_vNine_Slice = _float4(160.f, 256.f, 32.f, 32.f);
|
||||
m_fFontSize = 0.f;
|
||||
Set_ImageSizePosition();
|
||||
Set_ImageSizePosition();
|
||||
m_pInfoInstance->Add_Event(TEXT("NPCInteractionOn"), [this](void* p) {this->NpcInfo(p); });
|
||||
m_pInfoInstance->Add_Event(TEXT("NPCInteractionOff"), [this](void* p) {this->ActiveOff(); });
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -78,48 +83,63 @@ void CNPCInteraction::Set_ImageSizePosition()
|
||||
m_vImagePosi1 = _float4(25.f, 15.f, 35.f, 35.f);
|
||||
}
|
||||
|
||||
void CNPCInteraction::NpcInfo(_wstring Name)
|
||||
void CNPCInteraction::ActiveOff()
|
||||
{
|
||||
m_NpcName = Name;
|
||||
m_bActive = false;
|
||||
m_pInfo.pOwner = nullptr;
|
||||
}
|
||||
|
||||
void CNPCInteraction::NpcInfo(void* pArg)
|
||||
{
|
||||
NPCINTERACTIONINFO* Info = reinterpret_cast<NPCINTERACTIONINFO*>(pArg);
|
||||
|
||||
m_bActive = true;
|
||||
|
||||
m_pInfo.pOwner = Info->pOwner;
|
||||
m_pInfo.pNPCName = Info->pNPCName;
|
||||
m_pInfo.fNPCPosition = Info->fNPCPosition;
|
||||
|
||||
_vector MonsterPos = static_cast<CUnit*>(Info->pOwner)->Get_WorldPostion();
|
||||
_vector HeadPos = MonsterPos + XMVectorSet(0.5f, 2.f, 0.f, 0.f);
|
||||
XMStoreFloat4(&m_pInfo.fNPCPosition, HeadPos);
|
||||
}
|
||||
|
||||
void CNPCInteraction::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
_vector MonsterPos = static_cast<CUnit*>(m_pOwner)->Get_WorldPostion();
|
||||
if (m_pInfo.pOwner != nullptr)
|
||||
{
|
||||
_vector MonsterPos = static_cast<CUnit*>(m_pInfo.pOwner)->Get_WorldPostion();
|
||||
_vector HeadPos = XMVectorAdd(MonsterPos, XMVectorSet(0.5f, 2.f, 0.f, 0.f));
|
||||
XMStoreFloat4(&m_pInfo.fNPCPosition, HeadPos);
|
||||
|
||||
_float fOffsetX = 0.5f; // 적절한 X 오프셋 값 (몬스터 머리 옆으로 올리기 위함)
|
||||
_float fOffsetY = 2.f; // 적절한 Y 오프셋 값 (몬스터 머리 위로 올리기 위함)
|
||||
_vector ScreenPos = XMVector3Project(
|
||||
HeadPos,
|
||||
0.f, 0.f,
|
||||
g_iWinSizeX, g_iWinSizeY,
|
||||
0.f, 1.f,
|
||||
m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ),
|
||||
m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW),
|
||||
XMMatrixIdentity()
|
||||
);
|
||||
|
||||
_vector HeadPos = XMVectorAdd(MonsterPos, XMVectorSet(fOffsetX, fOffsetY, 0.f, 0.f));
|
||||
ScreenPos = ScreenPos + XMVectorSet(m_fFontSize, -50.f, 0.f, 0.f);
|
||||
|
||||
XMStoreFloat4(&m_vPosition, HeadPos);
|
||||
_vector WorldOffsetPos = XMVector3Unproject(
|
||||
ScreenPos,
|
||||
0.f, 0.f,
|
||||
g_iWinSizeX, g_iWinSizeY,
|
||||
0.f, 1.f,
|
||||
m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ),
|
||||
m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW),
|
||||
XMMatrixIdentity()
|
||||
);
|
||||
|
||||
_vector ScreenPos = XMVector3Project(
|
||||
HeadPos,
|
||||
0.f, 0.f,
|
||||
g_iWinSizeX, g_iWinSizeY,
|
||||
0.f, 1.f,
|
||||
m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ),
|
||||
m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW),
|
||||
XMMatrixIdentity()
|
||||
);
|
||||
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.fNPCPosition));
|
||||
}
|
||||
|
||||
ScreenPos = ScreenPos + XMVectorSet(m_fFontSize, -50.f, 0.f, 0.f);
|
||||
|
||||
_vector WorldOffsetPos = XMVector3Unproject(
|
||||
ScreenPos,
|
||||
0.f, 0.f,
|
||||
g_iWinSizeX, g_iWinSizeY,
|
||||
0.f, 1.f,
|
||||
m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ),
|
||||
m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW),
|
||||
XMMatrixIdentity()
|
||||
);
|
||||
|
||||
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_vPosition));
|
||||
}
|
||||
|
||||
void CNPCInteraction::Update(_float fTimeDelta)
|
||||
@@ -132,7 +152,9 @@ void CNPCInteraction::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible != true)
|
||||
return;
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
|
||||
if (m_bActive == true)
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
}
|
||||
|
||||
HRESULT CNPCInteraction::Render()
|
||||
@@ -160,7 +182,7 @@ HRESULT CNPCInteraction::Render()
|
||||
m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW),
|
||||
m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ),
|
||||
TEXT("Font_size20"),
|
||||
m_NpcName.c_str(),
|
||||
m_pInfo.pNPCName.c_str(),
|
||||
XMLoadFloat4(&m_vFontPosition));
|
||||
|
||||
m_pGameInstance->Perspective_Render_Text(
|
||||
@@ -168,17 +190,12 @@ HRESULT CNPCInteraction::Render()
|
||||
m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ),
|
||||
TEXT("Font_size15"),
|
||||
TEXT("대화하기"),
|
||||
XMLoadFloat4(&m_vPosition));
|
||||
XMLoadFloat4(&m_pInfo.fNPCPosition));
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CNPCInteraction::Get_WorldPostion()
|
||||
{
|
||||
return m_pOwner->Get_WorldPostion();
|
||||
}
|
||||
|
||||
HRESULT CNPCInteraction::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) {
|
||||
|
||||
@@ -36,12 +36,17 @@ void CNPC_EleazarFig::Update(_float fTimeDelta)
|
||||
#ifdef _DEBUG
|
||||
Describe_Entity();
|
||||
#endif // _DEBUG
|
||||
{ // 세트
|
||||
m_pCallBack_HitReport->BeginFrame();
|
||||
m_pCharacter_Controller->Move(fTimeDelta);
|
||||
m_pCallBack_HitReport->Set_CurrentSlop();
|
||||
}
|
||||
}
|
||||
|
||||
void CNPC_EleazarFig::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pCharacter_Controller->Get_FootPosition());
|
||||
m_pRigidBody->Set_Position(m_pTransformCom->Get_State(STATE::POSITION), true);
|
||||
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
|
||||
Set_Shadow(m_pGameInstance->IsIn_ShadowViewFrustum(m_pTransformCom->Get_State(STATE::POSITION), m_pTransformCom->Get_Radius()));
|
||||
@@ -177,9 +182,13 @@ HRESULT CNPC_EleazarFig::Initialize(void* pArg)
|
||||
|
||||
_vector vPos = XMLoadFloat4(&pDesc->vPos);
|
||||
m_pTransformCom->Set_State(STATE::POSITION, vPos);
|
||||
m_pCharacter_Controller->Set_Position(vPos);
|
||||
m_pTransformCom->Rotation(XMLoadFloat4(&pDesc->vRotQ));
|
||||
|
||||
m_pModelCom->Set_AnimationIndex(0, true);
|
||||
m_pCallBack_Behavior->Initialize(m_pCharacter_Controller);
|
||||
m_pCallBack_HitReport->Initialize(m_pCharacter_Controller);
|
||||
m_bNpc = true;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -204,6 +213,27 @@ HRESULT CNPC_EleazarFig::Ready_Components(void* pArg)
|
||||
reinterpret_cast<CComponent**>(&m_pModelCom)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
{ // CCT
|
||||
CCharacter_Controller::Character_Controller_DESC Desc{};
|
||||
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::OLLIVANDER);
|
||||
Desc.pTransform = m_pTransformCom;
|
||||
Desc.eBodyType = ACTOR::CAPSULE;
|
||||
Desc.fContactOffset = 0.0001f;
|
||||
Desc.fMaterial = { 1.2f, 1.0f, 0.0f };
|
||||
Desc.bAutoStepping = { false };
|
||||
Desc.fStepOffset = { 0.02f };
|
||||
Desc.fRadius = 0.2f;
|
||||
Desc.fHeight = 0.3f;
|
||||
Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_NonPlayable_HitReport::Create();
|
||||
Desc.pCallback_Behavior = m_pCallBack_Behavior = CCallBack_NonPlayable_Behavior::Create();
|
||||
Desc.eClimbingMode = PSX::PxCapsuleClimbingMode::eEASY;
|
||||
Desc.fWalkableSlope = 45.f;
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_CCT_CAPSULE"), (CComponent**)&m_pCharacter_Controller, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pCharacter_Controller->SetGravity(true);
|
||||
}
|
||||
{ // DO
|
||||
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::ELEAZARFIG);
|
||||
@@ -244,11 +274,20 @@ void CNPC_EleazarFig::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pCharacter_Controller);
|
||||
SAFE_RELEASE(m_pRigidBody);
|
||||
if (nullptr != m_pInfoInstance) {
|
||||
CInfoInstance* pInfo = m_pInfoInstance;
|
||||
m_pInfoInstance = nullptr;
|
||||
}
|
||||
if (nullptr != m_pCallBack_Behavior) {
|
||||
m_pCallBack_Behavior->Finalize();
|
||||
}
|
||||
if (nullptr != m_pCallBack_HitReport) {
|
||||
m_pCallBack_HitReport->Finalize();
|
||||
}
|
||||
Safe_Delete(m_pCallBack_Behavior);
|
||||
Safe_Delete(m_pCallBack_HitReport);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
#include "GameInstance.h"
|
||||
#include "InfoInstance.h"
|
||||
#include "Player.h"
|
||||
#include "CallBack_NonPlayable_Behavior.h"
|
||||
#include "CallBack_NonPlayable_HitReport.h"
|
||||
#include "NPCInteraction.h"
|
||||
|
||||
CNPC_Ollivander::CNPC_Ollivander(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
@@ -35,13 +37,20 @@ void CNPC_Ollivander::Update(_float fTimeDelta)
|
||||
#ifdef _DEBUG
|
||||
Describe_Entity();
|
||||
#endif // _DEBUG
|
||||
{ // 세트
|
||||
m_pCallBack_HitReport->BeginFrame();
|
||||
m_pCharacter_Controller->Move(fTimeDelta);
|
||||
m_pCallBack_HitReport->Set_CurrentSlop();
|
||||
}
|
||||
|
||||
m_pNPCInteraction->Set_Visible(0 < m_iEntered);
|
||||
m_pRigidBody->Set_Position(m_pTransformCom->Get_State(STATE::POSITION), true);
|
||||
// m_pNPCInteraction->Set_Visible(0 < m_iEntered);
|
||||
}
|
||||
|
||||
void CNPC_Ollivander::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pCharacter_Controller->Get_FootPosition());
|
||||
m_pRigidBody->Set_Position(m_pTransformCom->Get_State(STATE::POSITION), true);
|
||||
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
|
||||
Set_Shadow(m_pGameInstance->IsIn_ShadowViewFrustum(m_pTransformCom->Get_State(STATE::POSITION), m_pTransformCom->Get_Radius()));
|
||||
@@ -71,6 +80,9 @@ HRESULT CNPC_Ollivander::Render()
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Bind_ShaderParameters(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -135,6 +147,21 @@ void CNPC_Ollivander::OnRayCollision(CGameObject* pCaster, _uint iCastedOrder, _
|
||||
}
|
||||
}
|
||||
|
||||
_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"))) {
|
||||
@@ -161,6 +188,41 @@ HRESULT CNPC_Ollivander::Bind_ShaderResources()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CNPC_Ollivander::Bind_ShaderParameters(_uint iMeshOrder)
|
||||
{
|
||||
_bool bUseColorMixer = false;
|
||||
|
||||
_uint iColorParam = { UINT_MAX };
|
||||
_float fMixerFactor = { FLT_MAX };
|
||||
_uint iColorMixerMethod = { 0 };
|
||||
|
||||
switch (m_pModelCom->Get_UsingPass(iMeshOrder, m_pShaderCom))
|
||||
{
|
||||
case 23:
|
||||
{
|
||||
bUseColorMixer = true;
|
||||
iColorParam = 0x2E2E2E;
|
||||
fMixerFactor = 0.9f;
|
||||
iColorMixerMethod = 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (true == bUseColorMixer) {
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iPackedBlendColor", &iColorParam, sizeof(_uint)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fMixerFactor", &fMixerFactor, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iColorMixerMethod", &iColorMixerMethod, sizeof(_uint)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CNPC_Ollivander::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
@@ -179,9 +241,16 @@ HRESULT CNPC_Ollivander::Initialize(void* pArg)
|
||||
|
||||
_vector vPos = XMLoadFloat4(&pDesc->vPos);
|
||||
m_pTransformCom->Set_State(STATE::POSITION, vPos);
|
||||
m_pCharacter_Controller->Set_Position(vPos);
|
||||
m_pTransformCom->Rotation(XMLoadFloat4(&pDesc->vRotQ));
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -207,6 +276,27 @@ HRESULT CNPC_Ollivander::Ready_Components(void* pArg)
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
{ // CCT
|
||||
CCharacter_Controller::Character_Controller_DESC Desc{};
|
||||
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::OLLIVANDER);
|
||||
Desc.pTransform = m_pTransformCom;
|
||||
Desc.eBodyType = ACTOR::CAPSULE;
|
||||
Desc.fContactOffset = 0.0001f;
|
||||
Desc.fMaterial = { 1.2f, 1.0f, 0.0f };
|
||||
Desc.bAutoStepping = { false };
|
||||
Desc.fStepOffset = { 0.02f };
|
||||
Desc.fRadius = 0.2f;
|
||||
Desc.fHeight = 0.3f;
|
||||
Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_NonPlayable_HitReport::Create();
|
||||
Desc.pCallback_Behavior = m_pCallBack_Behavior = CCallBack_NonPlayable_Behavior::Create();
|
||||
Desc.eClimbingMode = PSX::PxCapsuleClimbingMode::eEASY;
|
||||
Desc.fWalkableSlope = 45.f;
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_CCT_CAPSULE"), (CComponent**)&m_pCharacter_Controller, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pCharacter_Controller->SetGravity(true);
|
||||
}
|
||||
{ // DO
|
||||
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::OLLIVANDER);
|
||||
@@ -221,11 +311,11 @@ HRESULT CNPC_Ollivander::Ready_Components(void* pArg)
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CNPCInteraction>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, &m_pNPCInteraction))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
//if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CNPCInteraction>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, &m_pNPCInteraction))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
|
||||
m_pNPCInteraction->NpcInfo(m_pNpcStat->Get_Stat().pNpc_Name);
|
||||
//m_pNPCInteraction->NpcInfo(m_pNpcStat->Get_Stat().pNpc_Name);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -258,12 +348,21 @@ void CNPC_Ollivander::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pCharacter_Controller);
|
||||
SAFE_RELEASE(m_pNpcStat);
|
||||
SAFE_RELEASE(m_pRigidBody);
|
||||
if (nullptr != m_pInfoInstance) {
|
||||
CInfoInstance* pInfo = m_pInfoInstance;
|
||||
m_pInfoInstance = nullptr;
|
||||
}
|
||||
if (nullptr != m_pCallBack_Behavior) {
|
||||
m_pCallBack_Behavior->Finalize();
|
||||
}
|
||||
if (nullptr != m_pCallBack_HitReport) {
|
||||
m_pCallBack_HitReport->Finalize();
|
||||
}
|
||||
Safe_Delete(m_pCallBack_Behavior);
|
||||
Safe_Delete(m_pCallBack_HitReport);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
|
||||
@@ -54,6 +54,9 @@ HRESULT CPlayer::Initialize(void* pArg)
|
||||
#if 진우
|
||||
m_isDebugMode = true; // 디버그 무적 모드
|
||||
#endif
|
||||
#if 나
|
||||
m_isDebugMode = true; // 디버그 무적 모드
|
||||
#endif
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -111,7 +114,7 @@ HRESULT CPlayer::Initialize(void* pArg)
|
||||
m_bAI = false;
|
||||
|
||||
XMLoadFloat4x4(m_pBroomModel->Get_BoneMatrixPtr("broomSocket"));
|
||||
m_fRayDistance = 60.f;
|
||||
m_fRayDistance = 5.f;
|
||||
m_pModelCom->Set_DisableRootMotionScale(true);
|
||||
|
||||
return S_OK;
|
||||
@@ -154,8 +157,15 @@ void CPlayer::Update(_float fTimeDelta)
|
||||
|
||||
CheckMouseInput();
|
||||
|
||||
m_pInfoInstance->Set_PlayerPos(m_pTransformCom->Get_State(STATE::POSITION));
|
||||
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));
|
||||
}
|
||||
|
||||
void CPlayer::Late_Update(_float fTimeDelta)
|
||||
@@ -187,18 +197,8 @@ void CPlayer::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
m_pTransformCom->LookAt_Horizontal_Lerp(m_LockOnInfo.pUnit->Get_WorldPostion(), fTimeDelta, 5.f);
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
_vector look = XMVector3Normalize(m_pTransformCom->Get_State(STATE::LOOK));
|
||||
|
||||
_vector worldUp = XMVectorSet(0.f, 1.f, 0.f, 0.f);
|
||||
|
||||
_vector right = XMVector3Normalize(XMVector3Cross(worldUp, look));
|
||||
_vector up = XMVector3Normalize(XMVector3Cross(look, right));
|
||||
|
||||
m_pTransformCom->Set_State(STATE::RIGHT, right);
|
||||
m_pTransformCom->Set_State(STATE::UP, up);
|
||||
m_pTransformCom->Set_State(STATE::LOOK, look);
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
Player_PixRot();
|
||||
}
|
||||
|
||||
|
||||
@@ -222,10 +222,8 @@ HRESULT CPlayer::Render()
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrices(
|
||||
"g_OffsetMatrix",
|
||||
m_pModelCom->Get_OffsetMatrix(i).data(),
|
||||
(_int)m_pModelCom->Get_OffsetMatrix(i).size()
|
||||
)))
|
||||
"g_OffsetMatrix", m_pModelCom->Get_OffsetMatrix(i).data(),
|
||||
(_int)m_pModelCom->Get_OffsetMatrix(i).size())))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -287,8 +285,11 @@ void CPlayer::Update_CameraShake(_float fTimeDelta)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CPlayer::Update_RaycastElements()
|
||||
{
|
||||
CGameObject* pFoundNPC = nullptr;
|
||||
|
||||
if (E_FAIL == m_pGameInstance->IsBinded_Camera(CAMERA_SHOULDER)) {
|
||||
m_iRayHitCount = 0;
|
||||
return E_FAIL;
|
||||
@@ -298,28 +299,83 @@ HRESULT CPlayer::Update_RaycastElements()
|
||||
vector<PSX::PxRaycastHit> m_vRayHits = {};
|
||||
m_vRayHits.resize(12);
|
||||
_bool bHit = m_pGameInstance->RayCast(vCameraPos, vCameraDir, m_fRayDistance, m_vRayHits.data(), (_uint)m_vRayHits.size(), m_iRayHitCount);
|
||||
if (true == bHit) {
|
||||
if (true == bHit)
|
||||
{
|
||||
NPCINTERACTIONINFO Info{};
|
||||
|
||||
CMyTools::SortHitsByDistance(m_vRayHits);
|
||||
for (_uint i = 0; i < m_iRayHitCount; ++i) {
|
||||
if (nullptr != m_vRayHits[i].actor->userData) {
|
||||
PHYSX_USERDATA* pData = (PHYSX_USERDATA*)m_vRayHits[i].actor->userData;
|
||||
switch (pData->eKind)
|
||||
{
|
||||
case PHYSX_KIND::BODY_STATIC:
|
||||
break;
|
||||
case PHYSX_KIND::BODY_DYNAMIC:
|
||||
pData->pBody->OnRayCollision(this, i, m_vRayHits[i].distance, _float3(m_vRayHits[i].position.x, m_vRayHits[i].position.y, m_vRayHits[i].position.z));
|
||||
break;
|
||||
case PHYSX_KIND::CCTActor:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
for (_uint i = 0; i < m_iRayHitCount; ++i)
|
||||
{
|
||||
if (nullptr == m_vRayHits[i].actor->userData)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
PHYSX_USERDATA* pData = (PHYSX_USERDATA*)m_vRayHits[i].actor->userData;
|
||||
|
||||
if (pData->eKind != PHYSX_KIND::BODY_DYNAMIC)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
pData->pBody->OnRayCollision(this, i, m_vRayHits[i].distance, _float3(m_vRayHits[i].position.x, m_vRayHits[i].position.y, m_vRayHits[i].position.z));
|
||||
|
||||
CUnit* Npc = dynamic_cast<CUnit*>(pData->pOwner);
|
||||
|
||||
if (!Npc)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!Npc->Get_Npc())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
pFoundNPC = Npc;
|
||||
break;
|
||||
}
|
||||
|
||||
if (pFoundNPC)
|
||||
{
|
||||
if (m_pCurrentNpcInteraction != pFoundNPC)
|
||||
{
|
||||
m_pCurrentNpcInteraction = pFoundNPC;
|
||||
|
||||
Info.pOwner = pFoundNPC;
|
||||
Info.pNPCName = static_cast<CUnit*>(pFoundNPC)->Get_Name();
|
||||
Info.pName = static_cast<CUnit*>(pFoundNPC)->Get_NpcName();
|
||||
_float4 Pos{};
|
||||
XMStoreFloat4(&Pos, static_cast<CUnit*>(pFoundNPC)->Get_WorldPostion());
|
||||
Info.fNPCPosition = Pos;
|
||||
Info.iTextID = static_cast<CUnit*>(pFoundNPC)->Get_TextID();
|
||||
m_bNpcInteraction = true;
|
||||
m_pInfoInstance->Event_CallBack(TEXT("NPCInteractionOn"), &Info);
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
if (m_pCurrentNpcInteraction)
|
||||
{
|
||||
m_bNpcInteraction = false;
|
||||
m_pCurrentNpcInteraction = nullptr;
|
||||
m_pInfoInstance->Event_CallBack(TEXT("NPCInteractionOff"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
if (m_pCurrentNpcInteraction)
|
||||
{
|
||||
m_bNpcInteraction = false;
|
||||
m_pCurrentNpcInteraction = nullptr;
|
||||
m_pInfoInstance->Event_CallBack(TEXT("NPCInteractionOff"));
|
||||
}
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CPlayer::Render_Shadow(SHADOW eType)
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) {
|
||||
@@ -345,13 +401,11 @@ HRESULT CPlayer::Render_Shadow(SHADOW eType)
|
||||
if (FAILED(Bind_ShaderParameters(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (i == ENUM_CLASS(PLAYER_MESH_ORDER::ROBE_CLOTH)){
|
||||
#ifdef 기무리
|
||||
if (i == ENUM_CLASS(PLAYER_MESH_ORDER::ROBE_CLOTH)) {
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_NPC_PBR_ANIM::SHADOW_LEGACY)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
#endif // 기무리
|
||||
|
||||
}
|
||||
else {
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_NPC_PBR_ANIM::SHADOW)))) {
|
||||
@@ -370,10 +424,10 @@ HRESULT CPlayer::Render_Shadow(SHADOW eType)
|
||||
void CPlayer::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
{
|
||||
_int iCurrAnim = m_pModelCom->Get_AnimIndex();
|
||||
if (m_pFSM->IsEnable(FSMSTATE::DODGE | FSMSTATE::BLINK) ||
|
||||
if (m_pFSM->IsEnable(FSMSTATE::DODGE | FSMSTATE::BLINK) ||
|
||||
m_bShield ||
|
||||
iCurrAnim == m_Animation[STATEANIM::AVADA_KEDAVRA].first||
|
||||
iCurrAnim == m_Animation[STATEANIM::ANCIENT_LIGHTNING].first ||
|
||||
iCurrAnim == m_Animation[STATEANIM::AVADA_KEDAVRA].first ||
|
||||
iCurrAnim == m_Animation[STATEANIM::ANCIENT_LIGHTNING].first ||
|
||||
iCurrAnim == m_Animation[STATEANIM::ANCIENT_THROW].first)
|
||||
return;
|
||||
|
||||
@@ -391,8 +445,8 @@ void CPlayer::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
else {
|
||||
m_fHitDegree = -1.f;
|
||||
}
|
||||
|
||||
if(m_eHitType !=ENUM_CLASS(HIT_TYPE::HIT_NONE))
|
||||
|
||||
if (m_eHitType != ENUM_CLASS(HIT_TYPE::HIT_NONE))
|
||||
m_pFSM->Change_State(FSMSTATE::HIT);
|
||||
}
|
||||
void CPlayer::OnHit(CGameObject* pOther, CGameObject* pCaller)
|
||||
@@ -473,7 +527,6 @@ HRESULT CPlayer::Ready_Components()
|
||||
m_pStat = m_pInfoInstance->Get_PlayerStatPtr();
|
||||
m_Components.push_back(m_pStat);
|
||||
SAFE_ADDREF(m_pStat);
|
||||
SAFE_ADDREF(m_pStat);
|
||||
|
||||
{ // CCT
|
||||
CCharacter_Controller::Character_Controller_DESC Desc{};
|
||||
@@ -548,15 +601,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<CPlayerRobe>("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<CPlayerRobe>("RobePart", g_iStaticLevel, &m_pRobePart, &Desc))) {
|
||||
// assert(false);
|
||||
// }
|
||||
//}
|
||||
|
||||
#endif // 기무리
|
||||
|
||||
@@ -626,51 +679,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 // 기무리
|
||||
//#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;
|
||||
@@ -738,6 +791,31 @@ void CPlayer::SetGravity()
|
||||
}
|
||||
}
|
||||
|
||||
void CPlayer::Player_PixRot()
|
||||
{
|
||||
_int iCurrAnim = m_pModelCom->Get_AnimIndex();
|
||||
if (iCurrAnim == m_Animation[STATEANIM::AVADA_KEDAVRA].first ||
|
||||
iCurrAnim == m_Animation[STATEANIM::BROOM_DISMOUNT].first)
|
||||
{
|
||||
_vector vUp = XMVectorSet(0.f, 1.f, 0.f, 0.f);
|
||||
|
||||
_vector vLook = m_pTransformCom->Get_State(STATE::LOOK);
|
||||
vLook = XMVectorSetY(vLook, 0.f);
|
||||
|
||||
if (XMVector3LengthSq(vLook).m128_f32[0] < 1e-6f)
|
||||
vLook = XMVectorSet(0.f, 0.f, 1.f, 0.f);
|
||||
|
||||
vLook = XMVector3Normalize(vLook);
|
||||
|
||||
_vector vRight = XMVector3Normalize(XMVector3Cross(vUp, vLook));
|
||||
vLook = XMVector3Cross(vRight, vUp);
|
||||
|
||||
m_pTransformCom->Set_State(STATE::RIGHT, vRight);
|
||||
m_pTransformCom->Set_State(STATE::UP, vUp);
|
||||
m_pTransformCom->Set_State(STATE::LOOK, vLook);
|
||||
}
|
||||
}
|
||||
|
||||
void CPlayer::Update_CameraCoordinateSystem(_float fTimeDelta)
|
||||
{
|
||||
_vector xmvCameraLook = XMVector3Normalize(XMVectorSetY(m_pGameInstance->Get_CameraLook(), 0.f));
|
||||
@@ -950,6 +1028,17 @@ void CPlayer::Describe_Entity()
|
||||
|
||||
GUI::Text("Angle %.2f", degree);
|
||||
|
||||
_vector vRight = m_pTransformCom->Get_State(STATE::RIGHT);
|
||||
_vector vUp = m_pTransformCom->Get_State(STATE::UP);
|
||||
_vector vLook = m_pTransformCom->Get_State(STATE::LOOK);
|
||||
|
||||
auto dotRU = XMVectorGetX(XMVector3Dot(vRight, vUp));
|
||||
auto dotUL = XMVectorGetX(XMVector3Dot(vUp, vLook));
|
||||
auto dotLR = XMVectorGetX(XMVector3Dot(vLook, vRight));
|
||||
|
||||
GUI::Text("dot RU %.4f | UL %.4f | LR %.4f\n", dotRU, dotUL, dotLR);
|
||||
|
||||
|
||||
m_pLightCom->Describe_Entity();
|
||||
}
|
||||
GUI::End();
|
||||
|
||||
@@ -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,6 +213,8 @@ HRESULT CPlayerRobe::Render_BonePhysX()
|
||||
if (pPrevDSS != nullptr) {
|
||||
pPrevDSS->Release();
|
||||
}
|
||||
m_pLower0Bound->Render();
|
||||
m_pLower1Bound->Render();
|
||||
return S_OK;
|
||||
}
|
||||
#endif // _DEBUG
|
||||
@@ -242,499 +226,121 @@ HRESULT CPlayerRobe::Update_RobeJoints()
|
||||
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:
|
||||
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 = 5.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:
|
||||
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 = 5.f;
|
||||
break;
|
||||
|
||||
|
||||
{
|
||||
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:
|
||||
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;
|
||||
|
||||
case PLAYER_JOINT_ORDER::RUP_TO_RMIDDLE_END:
|
||||
case PLAYER_JOINT_ORDER::TUP_TO_TMIDDLE_END:
|
||||
case PLAYER_JOINT_ORDER::LUP_TO_LMIDDLE_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;
|
||||
|
||||
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;
|
||||
{
|
||||
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;
|
||||
|
||||
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;
|
||||
|
||||
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::RMIDDLE_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::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::RMIDDLE_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::RSIDE_TO_R_END:
|
||||
case PLAYER_JOINT_ORDER::RMIDDLE_TO_RR_END:
|
||||
break;
|
||||
|
||||
case PLAYER_JOINT_ORDER::TMIDDLE_TO_TR_END:
|
||||
case PLAYER_JOINT_ORDER::TMIDDLE_TO_TL_END:
|
||||
break;
|
||||
case PLAYER_JOINT_ORDER::LMIDDLE_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::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::LMIDDLE_TO_L_END:
|
||||
case PLAYER_JOINT_ORDER::LMIDDLE_TO_LL_END:
|
||||
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]);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
HRESULT CPlayerRobe::Ready_Components()
|
||||
{
|
||||
__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<PlayerRobe_DESC*> (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;
|
||||
}
|
||||
//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_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()
|
||||
|
||||
@@ -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<PlayerRobe_DESC*> (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;
|
||||
}
|
||||
}
|
||||
@@ -74,17 +74,14 @@ HRESULT CPlayer::InputAction()
|
||||
|| m_pGameInstance->Key_Down(DIK_Z)
|
||||
|| m_pGameInstance->Key_Down(DIK_G)
|
||||
|| m_pGameInstance->Key_Down(DIK_B)
|
||||
//|| m_pGameInstance->Key_Down(DIK_T)
|
||||
//|| m_pGameInstance->Key_Down(DIK_TAB)
|
||||
//|| m_pGameInstance->Key_Down(DIK_ESCAPE)
|
||||
|| m_pGameInstance->Key_Down(DIK_F)
|
||||
)
|
||||
{
|
||||
//if (m_pGameInstance->Key_Down(DIK_T)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_T));
|
||||
//if (m_pGameInstance->Key_Down(DIK_TAB)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_TAB));
|
||||
|
||||
if (m_pGameInstance->Key_Down(DIK_X)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_X));
|
||||
if (m_pGameInstance->Key_Down(DIK_G)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_G));
|
||||
if (m_pGameInstance->Key_Down(DIK_Z)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_Z));
|
||||
//if (m_pGameInstance->Key_Down(DIK_ESCAPE)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_ESPACE));
|
||||
if (m_pGameInstance->Key_Down(DIK_F)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_F));
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
@@ -1573,6 +1570,7 @@ HRESULT CPlayer::Behavior_SpellExitCheck()
|
||||
void CPlayer::Behavior_SpellExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::SPELL);
|
||||
m_pInfoInstance->Set_SearchLockOnFlag(true);
|
||||
m_pModelCom->Set_BlendDuration(0.3f);
|
||||
Reset_Event();
|
||||
m_bLookAt = false;
|
||||
@@ -1599,6 +1597,8 @@ void CPlayer::Behavior_AncientSpellEnter()
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::LIGHTNING_SIDE, Get_PartObject<CWand>());
|
||||
},
|
||||
0.18f);
|
||||
|
||||
Get_PartObject<CCamPosition_Shoulder>()->Set_CameraAnim(17);
|
||||
}
|
||||
|
||||
HRESULT CPlayer::Behavior_AncientSpellExitCheck()
|
||||
@@ -2233,11 +2233,7 @@ HRESULT CPlayer::Behavior_Broom_FlyExitCheck(_float fTimeDelta)
|
||||
|
||||
if (iCurrAnimIndex != pairAnimInfo.first)
|
||||
{
|
||||
m_pModelCom->Set_AnimationIndex(
|
||||
pairAnimInfo.first,
|
||||
pairAnimInfo.second,
|
||||
1.f, false, 1.f, true, true
|
||||
);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, false, 1.f, false, true);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -2246,11 +2242,7 @@ HRESULT CPlayer::Behavior_Broom_FlyExitCheck(_float fTimeDelta)
|
||||
|
||||
if (iCurrAnimIndex != pairAnimInfo.first)
|
||||
{
|
||||
m_pModelCom->Set_AnimationIndex(
|
||||
pairAnimInfo.first,
|
||||
pairAnimInfo.second,
|
||||
1.f, false, 1.f, true, true
|
||||
);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, false, 1.f, false, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2683,20 +2675,24 @@ void CPlayer::Add_SpellEvent(_uint AnimIndex,_float fRatio)
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
break;
|
||||
case ENUM_CLASS(SKILL_TYPE::AVADAKEDAVRA):
|
||||
m_pInfoInstance->Set_SearchLockOnFlag(false);
|
||||
pairAnimInfo = m_Animation[STATEANIM::AVADA_KEDAVRA];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, false,1.f,false);
|
||||
if (m_LockOnInfo.pUnit)
|
||||
m_pTransformCom->LookAt(m_LockOnInfo.pUnit->Get_WorldPostion());
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::AVADAKEDAVRA, this); },
|
||||
0.45f);
|
||||
0.3f);
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::AVADAKEDAVRA_SIDE, Get_PartObject<CWand>()); },
|
||||
0.f);
|
||||
Info.pText = TEXT("아바다 케다브라!");
|
||||
m_pInfoInstance->Event_CallBack(TEXT("Dialogue"), &Info);
|
||||
|
||||
Get_PartObject<CCamPosition_Shoulder>()->Set_CameraAnim(6);
|
||||
|
||||
break;
|
||||
case ENUM_CLASS(SKILL_TYPE::REPARO):
|
||||
{
|
||||
@@ -3100,10 +3096,19 @@ void CPlayer::Add_FSM()
|
||||
Desc.funcPriorityUpdate = [this](_float fTimeDelta) {
|
||||
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||
if (!m_bOnce) {
|
||||
m_pBroomTransform->Set_WorldMatrix(m_pTransformCom->Get_XMWorldMatrix());
|
||||
m_pBroomTransform->Set_State(STATE::POSITION, m_pTransformCom->Get_State(STATE::POSITION) + XMVectorSet(0.f,2.f,0.f,0.f));
|
||||
m_pBroomTransform->Set_State(
|
||||
STATE::POSITION,
|
||||
m_pTransformCom->Get_State(STATE::POSITION) + XMVectorSet(0.f, 2.f, 0.f, 0.f)
|
||||
);
|
||||
|
||||
m_pBroomTransform->Set_State(STATE::LOOK, m_pTransformCom->Get_State(STATE::LOOK));
|
||||
m_pBroomTransform->Set_State(STATE::UP, m_pTransformCom->Get_State(STATE::UP));
|
||||
m_pBroomTransform->Set_State(STATE::RIGHT, m_pTransformCom->Get_State(STATE::RIGHT));
|
||||
|
||||
_float3 vScale = { 0.3f,0.3f,0.3f };
|
||||
_float3 vPlayerScale = { 1.f,1.f,1.f };
|
||||
m_pBroomTransform->Set_Scale(vScale);
|
||||
m_pTransformCom->Set_Scale(vPlayerScale);
|
||||
m_bOnce = true;
|
||||
m_pInfoInstance->Event_CallBack(TEXT("BroomRide"), &m_bOnce);
|
||||
}
|
||||
@@ -3114,6 +3119,8 @@ void CPlayer::Add_FSM()
|
||||
{
|
||||
m_pBroomTransform->Set_Scale(m_BroomScale);
|
||||
}
|
||||
_float3 vPlayerScale = { 1.f,1.f,1.f };
|
||||
m_pTransformCom->Set_Scale(vPlayerScale);
|
||||
Attach_Broom();
|
||||
};
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
|
||||
@@ -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<CQuest_Panel>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CQuest_Panel**>(&m_pQuest_Panel))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CQuest_Panel>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast <CQuest_Panel**>(&m_pQuest_Panel))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -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<CUIObject*>(m_pOwner)->Add_Function(TEXT("QuestPanelClose"), [this](void* p) {this->Slot_Hover(*reinterpret_cast<_int*>(p)); });
|
||||
//static_cast<CUIObject*>(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<CQuest_Slot>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CQuest_Slot**>(&m_pQuest_Slot))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CQuest_Slot>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CQuest_Slot**>(&m_pQuest_Slot))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Quest_Slot"), m_pQuest_Slot);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CQuest_Info>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CQuest_Info**>(&m_pQuest_Info))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CQuest_Info>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CQuest_Info**>(&m_pQuest_Info))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Quest_Info"), m_pQuest_Info);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CQuest_Info_Header>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CQuest_Info_Header**>(&m_pQuest_Info_Header))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CQuest_Info_Header>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CQuest_Info_Header**>(&m_pQuest_Info_Header))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Quest_Info_Header"), m_pQuest_Info_Header);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CQuest_Info_Line>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CQuest_Info_Line**>(&m_pQuest_Info_Line))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CQuest_Info_Line>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CQuest_Info_Line**>(&m_pQuest_Info_Line))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Quest_Info_Line"), m_pQuest_Info_Line);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CQuest_Entry_Line>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CQuest_Entry_Line**>(&m_pQuest_Entry_Line))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CQuest_Entry_Line>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CQuest_Entry_Line**>(&m_pQuest_Entry_Line))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Quest_Entry_Line"), m_pQuest_Entry_Line);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CQuest_Status>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CQuest_Status**>(&m_pQuest_Status1))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CQuest_Status>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CQuest_Status**>(&m_pQuest_Status1))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Quest_Status1"), m_pQuest_Status1);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CQuest_Status>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CQuest_Status**>(&m_pQuest_Status2))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CQuest_Status>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CQuest_Status**>(&m_pQuest_Status2))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Quest_Status2"), m_pQuest_Status2);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CQuest_Status>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CQuest_Status**>(&m_pQuest_Status3))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CQuest_Status>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CQuest_Status**>(&m_pQuest_Status3))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,430 @@
|
||||
#include "pch.h"
|
||||
#include "RandomNpc.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "InfoInstance.h"
|
||||
#include "Player.h"
|
||||
#include "NPCInteraction.h"
|
||||
#include "CallBack_NonPlayable_Behavior.h"
|
||||
#include "CallBack_NonPlayable_HitReport.h"
|
||||
|
||||
CRandomNpc::CRandomNpc(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CUnit(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CRandomNpc::CRandomNpc(const CRandomNpc& Prototype)
|
||||
: CUnit(Prototype),
|
||||
m_pInfoInstance(CInfoInstance::GetInstance())
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CRandomNpc::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CRandomNpc::Initialize(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
NPCDESC* pDesc = static_cast<NPCDESC*>(pArg);
|
||||
m_iIndex = pDesc->iIndex;
|
||||
|
||||
if (FAILED(Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
_vector vPos = XMLoadFloat4(&pDesc->vPos);
|
||||
m_pTransformCom->Set_State(STATE::POSITION, vPos);
|
||||
m_pCharacter_Controller->Set_Position(vPos);
|
||||
m_pTransformCom->Rotation(XMLoadFloat4(&pDesc->vRotQ));
|
||||
|
||||
m_pModelCom->Set_AnimationIndex(0, true);
|
||||
m_pCallBack_Behavior->Initialize(m_pCharacter_Controller);
|
||||
m_pCallBack_HitReport->Initialize(m_pCharacter_Controller);
|
||||
m_bNpc = true;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CRandomNpc::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
m_pTransformCom->RewindMomentum();
|
||||
m_iEntered -= 1;
|
||||
if (m_iEntered < 0) {
|
||||
m_iEntered = 0;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CRandomNpc::Update(_float fTimeDelta)
|
||||
{
|
||||
m_pFSM->Update_State(fTimeDelta);
|
||||
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
|
||||
__super::Update(fTimeDelta);
|
||||
#ifdef _DEBUG
|
||||
Describe_Entity();
|
||||
#endif // _DEBUG
|
||||
{ // 세트
|
||||
m_pCallBack_HitReport->BeginFrame();
|
||||
m_pCharacter_Controller->Move(fTimeDelta);
|
||||
m_pCallBack_HitReport->Set_CurrentSlop();
|
||||
}
|
||||
|
||||
m_pRigidBody->Set_Position(m_pTransformCom->Get_State(STATE::POSITION), true);
|
||||
|
||||
m_pInfoInstance->Set_PlayerPos(m_pTransformCom->Get_State(STATE::POSITION));
|
||||
}
|
||||
|
||||
void CRandomNpc::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pCharacter_Controller->Get_FootPosition());
|
||||
m_pRigidBody->Set_Position(m_pTransformCom->Get_State(STATE::POSITION), true);
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
|
||||
Set_Shadow(m_pGameInstance->IsIn_ShadowViewFrustum(m_pTransformCom->Get_State(STATE::POSITION), m_pTransformCom->Get_Radius()));
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
HRESULT CRandomNpc::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
|
||||
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Bind_Matrices(
|
||||
"g_OffsetMatrix",
|
||||
m_pModelCom->Get_OffsetMatrix(i).data(),
|
||||
(_int)m_pModelCom->Get_OffsetMatrix(i).size()
|
||||
)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Bind_ShaderParameters(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
|
||||
m_pModelCom->Bind_OutPut_SRV_VS_Prev(27, 0);
|
||||
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CRandomNpc::Render_Shadow(SHADOW eType)
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_Shadow_Resource(m_pShaderCom, "g_ViewMatrix", D3DTS::VIEW, eType))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_Shadow_Resource(m_pShaderCom, "g_ProjMatrix", D3DTS::PROJ, eType))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
|
||||
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Bind_Matrices(
|
||||
"g_OffsetMatrix",
|
||||
m_pModelCom->Get_OffsetMatrix(i).data(),
|
||||
(_int)m_pModelCom->Get_OffsetMatrix(i).size()
|
||||
)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_NPC_PBR_ANIM::SHADOW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
|
||||
m_pModelCom->Bind_OutPut_SRV_VS_Prev(27, 0);
|
||||
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CRandomNpc::OnRayCollision(CGameObject* pCaster, _uint iCastedOrder, _float fDistance, _float3 vCastedWorldPos)
|
||||
{
|
||||
CPlayer* pPlayer = dynamic_cast<CPlayer*>(pCaster);
|
||||
if (nullptr == pPlayer) {
|
||||
return;
|
||||
}
|
||||
if (fDistance < m_fEncounterDistance) {
|
||||
m_iEntered = 4;
|
||||
}
|
||||
}
|
||||
|
||||
_wstring CRandomNpc::Get_Name()
|
||||
{
|
||||
return m_pNpcStat->Get_Stat().pNpc_Name;
|
||||
}
|
||||
|
||||
HRESULT CRandomNpc::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevViewMatrix", D3DTS::VIEW))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevProjMatrix", D3DTS::PROJ))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CRandomNpc::Bind_ShaderParameters(_uint iMeshOrder)
|
||||
{
|
||||
_bool bUseColorMixer = false;
|
||||
|
||||
_uint iColorParam = { UINT_MAX };
|
||||
_float fMixerFactor = { FLT_MAX };
|
||||
_uint iColorMixerMethod = { 0 };
|
||||
|
||||
switch (m_pModelCom->Get_UsingPass(iMeshOrder,m_pShaderCom))
|
||||
{
|
||||
case 23:
|
||||
if (m_strModelPrototypeTag == TEXT("Prototype_Component_F_Student_Model"))
|
||||
{
|
||||
bUseColorMixer = true;
|
||||
iColorParam = 0x2E2E2E;
|
||||
fMixerFactor = 0.00f;
|
||||
iColorMixerMethod = 1;
|
||||
}
|
||||
else {
|
||||
bUseColorMixer = true;
|
||||
iColorParam = 0x2E2E2E;
|
||||
fMixerFactor = 0.9f;
|
||||
iColorMixerMethod = 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (true == bUseColorMixer) {
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iPackedBlendColor", &iColorParam, sizeof(_uint)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fMixerFactor", &fMixerFactor, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iColorMixerMethod", &iColorMixerMethod, sizeof(_uint)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CRandomNpc::Ready_Components(void* pArg)
|
||||
{
|
||||
CTransform::TRANSFORM_DESC Desc = {};
|
||||
|
||||
Desc.fSpeedPerSec = 10.f;
|
||||
Desc.fRotationPerSec = XMConvertToRadians(180.0f);
|
||||
Desc.fRadius = 10.f;
|
||||
|
||||
if (FAILED(__super::Ready_Components(&Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
switch (m_iIndex)
|
||||
{
|
||||
case 0:
|
||||
m_strModelPrototypeTag = TEXT("Prototype_Component_MatildaWeasely_Model");
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("MATILDAWEASELY"), (CComponent**)&m_pNpcStat))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
m_strModelPrototypeTag = TEXT("Prototype_Component_SatyavatiShah_Model");
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("SATYAVATI"), (CComponent**)&m_pNpcStat))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
m_strModelPrototypeTag = TEXT("Prototype_Component_Ghost_Peeves_Model");
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PEEVES"), (CComponent**)&m_pNpcStat))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
m_strModelPrototypeTag = TEXT("Prototype_Component_PhineasBlack_Model");
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHINEASBLACK"), (CComponent**)&m_pNpcStat))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
m_strModelPrototypeTag = TEXT("Prototype_Component_Kitchen_Female_Model");
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("KITCHENFEMALE"), (CComponent**)&m_pNpcStat))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
m_strModelPrototypeTag = TEXT("Prototype_Component_F_Student_Model");
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("F_STUDENT"), (CComponent**)&m_pNpcStat))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
m_strModelPrototypeTag = TEXT("Prototype_Component_Elf_Model");
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("ELF"), (CComponent**)&m_pNpcStat))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
m_strModelPrototypeTag = TEXT("Prototype_Component_BaiHowin_Model");
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("BAIHOWIN"), (CComponent**)&m_pNpcStat))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
m_strModelPrototypeTag = TEXT("Prototype_Component_GeorgeOsric_Model");
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("GEORGEOSRIC"), (CComponent**)&m_pNpcStat))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
break;
|
||||
case 9:
|
||||
m_strModelPrototypeTag = TEXT("Prototype_Component_DinahHecat_Model");
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("DINAHHECAT"), (CComponent**)&m_pNpcStat))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
break;
|
||||
case 10:
|
||||
m_strModelPrototypeTag = TEXT("Prototype_Component_MudiwaOnai_Model");
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("MUDIWAONAI"), (CComponent**)&m_pNpcStat))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
/* Com_Model */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_strModelPrototypeTag,
|
||||
reinterpret_cast<CComponent**>(&m_pModelCom)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* Com_Shader */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_NPC_PBR_ANIM,
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
{ // CCT
|
||||
CCharacter_Controller::Character_Controller_DESC Desc{};
|
||||
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::OLLIVANDER);
|
||||
Desc.pTransform = m_pTransformCom;
|
||||
Desc.eBodyType = ACTOR::CAPSULE;
|
||||
Desc.fContactOffset = 0.0001f;
|
||||
Desc.fMaterial = { 1.2f, 1.0f, 0.0f };
|
||||
Desc.bAutoStepping = { false };
|
||||
Desc.fStepOffset = { 0.02f };
|
||||
Desc.fRadius = 0.2f;
|
||||
Desc.fHeight = 0.3f;
|
||||
Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_NonPlayable_HitReport::Create();
|
||||
Desc.pCallback_Behavior = m_pCallBack_Behavior = CCallBack_NonPlayable_Behavior::Create();
|
||||
Desc.eClimbingMode = PSX::PxCapsuleClimbingMode::eEASY;
|
||||
Desc.fWalkableSlope = 45.f;
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_CCT_CAPSULE"), (CComponent**)&m_pCharacter_Controller, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pCharacter_Controller->SetGravity(true);
|
||||
}
|
||||
{ // DO
|
||||
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::OLLIVANDER);
|
||||
Desc.bAutoOwnerTranslation = false;
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_NPC_HITBOX"), (CComponent**)&m_pRigidBody, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CRandomNpc* CRandomNpc::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CRandomNpc* pInstance = new CRandomNpc(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CRandomNpc");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CRandomNpc::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CRandomNpc* pInstance = new CRandomNpc(*this);
|
||||
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CRandomNpc");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CRandomNpc::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pCharacter_Controller);
|
||||
SAFE_RELEASE(m_pNpcStat);
|
||||
SAFE_RELEASE(m_pRigidBody);
|
||||
if (nullptr != m_pInfoInstance) {
|
||||
CInfoInstance* pInfo = m_pInfoInstance;
|
||||
m_pInfoInstance = nullptr;
|
||||
}
|
||||
if (nullptr != m_pCallBack_Behavior) {
|
||||
m_pCallBack_Behavior->Finalize();
|
||||
}
|
||||
if (nullptr != m_pCallBack_HitReport) {
|
||||
m_pCallBack_HitReport->Finalize();
|
||||
}
|
||||
Safe_Delete(m_pCallBack_Behavior);
|
||||
Safe_Delete(m_pCallBack_HitReport);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CRandomNpc::Describe_Entity()
|
||||
{
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "TrailObject.h"
|
||||
#include "MapElement_Interactable.h"
|
||||
|
||||
|
||||
#pragma region STATE
|
||||
#include "State_Idle.h"
|
||||
#include "State_Move.h"
|
||||
@@ -108,14 +109,17 @@ void CRanrok::Update(_float fTimeDelta)
|
||||
|
||||
m_pFSM->Update_State(fTimeDelta);
|
||||
|
||||
m_vCaptureTimer.x += fTimeDelta;
|
||||
if (m_vCaptureTimer.y < m_vCaptureTimer.x) {
|
||||
m_vCaptureTimer.x = 0.f;
|
||||
if (FAILED(m_pModelCom->Capture_BoneBuffer(m_pMotionTrailCom, *m_pTransformCom->Get_WorldMatrixPtr()))) {
|
||||
assert(false);
|
||||
if (m_bMotionTrail) {
|
||||
m_vCaptureTimer.x += fTimeDelta;
|
||||
if (m_vCaptureTimer.y < m_vCaptureTimer.x) {
|
||||
m_vCaptureTimer.x = 0.f;
|
||||
if (FAILED(m_pModelCom->Capture_BoneBuffer(m_pMotionTrailCom, *m_pTransformCom->Get_WorldMatrixPtr()))) {
|
||||
assert(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
@@ -161,6 +165,28 @@ void CRanrok::Update(_float fTimeDelta)
|
||||
|
||||
Update_Disolve(fTimeDelta,0.8f);
|
||||
|
||||
|
||||
#pragma region TRAIL_UPDATE
|
||||
|
||||
_matrix WorldMat = m_pTransformCom->Get_XMWorldMatrix();
|
||||
|
||||
_matrix LeftEyeMatrix = {};
|
||||
_matrix RightEyeMatrix = {};
|
||||
|
||||
LeftEyeMatrix = XMLoadFloat4x4(m_pLeftEye_BoneMat);
|
||||
RightEyeMatrix = XMLoadFloat4x4(m_pRightEye_BoneMat);
|
||||
|
||||
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
LeftEyeMatrix.r[i] = XMVector3Normalize(LeftEyeMatrix.r[i]);
|
||||
RightEyeMatrix.r[i] = XMVector3Normalize(RightEyeMatrix.r[i]);
|
||||
}
|
||||
|
||||
m_pLeftEye_Trail->Trail_Update(LeftEyeMatrix * WorldMat, fTimeDelta);
|
||||
m_pRightEye_Trail->Trail_Update(RightEyeMatrix * WorldMat, fTimeDelta);
|
||||
|
||||
#pragma endregion
|
||||
|
||||
}
|
||||
|
||||
void CRanrok::Late_Update(_float fTimeDelta)
|
||||
@@ -275,13 +301,18 @@ HRESULT CRanrok::Render_MotionTrail(ID3D11ShaderResourceView* pSRV)
|
||||
|
||||
_vector CRanrok::Get_LockOnPos()
|
||||
{
|
||||
_vector Offset = XMVectorZero();
|
||||
//if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_AIR))
|
||||
//{
|
||||
// Offset = XMVectorSetY(Offset, 10.f);
|
||||
//}
|
||||
if (nullptr != m_pCharacter_Controller && true == m_pCharacter_Controller->IsActive()) {
|
||||
return m_pCharacter_Controller->Get_Position();
|
||||
return m_pCharacter_Controller->Get_Position() + Offset;
|
||||
}
|
||||
else if (nullptr != m_pRigidBody) {
|
||||
return m_pRigidBody->Get_Position();
|
||||
return m_pRigidBody->Get_Position() + Offset;
|
||||
}
|
||||
return Get_WorldPostion();
|
||||
return Get_WorldPostion() + Offset;
|
||||
}
|
||||
|
||||
void CRanrok::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
@@ -296,7 +327,7 @@ void CRanrok::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
ON_COLLISION_INFO* CollisionDesc = static_cast<ON_COLLISION_INFO*>(pDesc);
|
||||
|
||||
|
||||
//m_DamageInfo.vTarget_Pos = m_pCharacter_Controller->Get_HeadPosition();
|
||||
XMStoreFloat4(&m_DamageInfo.vTarget_Pos, m_pCharacter_Controller->Get_HeadPosition());
|
||||
|
||||
CEffect_Container* pEffect_Container = dynamic_cast<CEffect_Container*>(pOther);
|
||||
|
||||
@@ -334,6 +365,8 @@ void CRanrok::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
m_eHitSpell = ENUM_CLASS(SKILL_TYPE::ANCIENT_MAGIC);
|
||||
break;
|
||||
}
|
||||
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_HIT, this, &CollisionDesc->vWorldPos);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -348,37 +381,67 @@ void CRanrok::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
}
|
||||
|
||||
|
||||
/*m_DamageInfo.fDamage = damagePair.first;
|
||||
m_pInfoInstance->Event_CallBack(TEXT("Monster_Hit"), &m_DamageInfo);*/
|
||||
m_DamageInfo.fDamage = damagePair.first;
|
||||
m_pInfoInstance->Event_CallBack(TEXT("Monster_Hit"), &m_DamageInfo);
|
||||
if (0 == damagePair.second) {
|
||||
m_pFSM->Change_State(FSMSTATE::DEAD);
|
||||
return;
|
||||
}
|
||||
|
||||
_float curr = Get_HpRatio();
|
||||
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
if (m_fPrevHpRatio > 0.85f && curr <= 0.85f)
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::TUCKED);
|
||||
pairAnimInfo = m_Animation[STATEANIM::HIT_BWD2];
|
||||
m_fPrevHpRatio = curr;
|
||||
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_IMPACT, this, &CollisionDesc->vWorldPos);
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[&]() {m_bDisolve = true; },
|
||||
0.15f);
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[&]() {m_pFSM->Change_State(FSMSTATE::TUCKED); },
|
||||
0.5f);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
return;
|
||||
}
|
||||
else if (m_fPrevHpRatio > 0.7f && curr <= 0.7f)
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::TUCKED);
|
||||
pairAnimInfo = m_Animation[STATEANIM::HIT_BWD2];
|
||||
m_fPrevHpRatio = curr;
|
||||
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_IMPACT, this, &CollisionDesc->vWorldPos);
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[&]() {m_bDisolve = true; },
|
||||
0.15f);
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[&]() {m_pFSM->Change_State(FSMSTATE::TUCKED); },
|
||||
0.5f);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
return;
|
||||
}
|
||||
else if (m_fPrevHpRatio > 0.5f && curr <= 0.5f)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::HIT_BWD2];
|
||||
m_ePhase = ENUM_CLASS(RANROK_PHASE::PHASE_GROUND);
|
||||
m_pFSM->Change_State(FSMSTATE::TUCKED);
|
||||
m_fPrevHpRatio = curr;
|
||||
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_IMPACT, this, &CollisionDesc->vWorldPos);
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[&]() {m_bDisolve = true; },
|
||||
0.15f);
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[&]() {m_pFSM->Change_State(FSMSTATE::TUCKED); },
|
||||
0.5f);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
return;
|
||||
}
|
||||
m_fPrevHpRatio = curr;
|
||||
|
||||
if (IsHitStateDisabled() && IsHitSpellDisabled()) {
|
||||
if (!IsHitStateDisabled() || IsHitSpellDisabled()) {
|
||||
m_pFSM->Change_State(FSMSTATE::HIT);
|
||||
}
|
||||
}
|
||||
@@ -437,7 +500,7 @@ HRESULT CRanrok::Ready_Components()
|
||||
{ // DO
|
||||
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::RANROK);
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX"), (CComponent**)&m_pRigidBody, &Desc))) {
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_RANROK"), (CComponent**)&m_pRigidBody, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pGameInstance->Detach_Actor(*m_pRigidBody->Get_Actor(), NEXT_LEVEL);
|
||||
@@ -460,6 +523,78 @@ HRESULT CRanrok::Ready_Components()
|
||||
|
||||
HRESULT CRanrok::Ready_Parts()
|
||||
{
|
||||
#pragma region EFFECT
|
||||
/* EFFECT */
|
||||
|
||||
CPartObject::PARTOBJECT_DESC PartsDesc{};
|
||||
|
||||
PartsDesc.pParentTransform = m_pTransformCom;
|
||||
|
||||
|
||||
|
||||
if (FAILED(Add_PartObject<CEffectParts>("LeftSmoke", g_iStaticLevel, &m_pLeftSmoke, &PartsDesc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pLeftSmoke->Load("../Bin/Resources/Data/Effect/Ranrok/RanrokSmoke/Smoke", static_cast<LEVEL>(g_iStaticLevel));
|
||||
m_pLeftSmoke->FollowParents(m_pModelCom->Get_BoneMatrixPtr("wrist_left_target"));
|
||||
|
||||
if (FAILED(Add_PartObject<CEffectParts>("RightSmoke", g_iStaticLevel, &m_pRightSmoke, &PartsDesc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pRightSmoke->Load("../Bin/Resources/Data/Effect/Ranrok/RanrokSmoke/Smoke", static_cast<LEVEL>(g_iStaticLevel));
|
||||
m_pRightSmoke->FollowParents(m_pModelCom->Get_BoneMatrixPtr("wrist_right_target"));
|
||||
|
||||
if (FAILED(Add_PartObject<CEffectParts>("BottomSmoke", g_iStaticLevel, &m_pBottomSmoke, &PartsDesc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pBottomSmoke->Load("../Bin/Resources/Data/Effect/Ranrok/RanrokSmoke/Smoke_Bottom", static_cast<LEVEL>(g_iStaticLevel));
|
||||
m_pBottomSmoke->FollowParents(m_pModelCom->Get_BoneMatrixPtr("hip"));
|
||||
|
||||
if (FAILED(Add_PartObject<CEffectParts>("LeftParticle", g_iStaticLevel, &m_pLeftPt, &PartsDesc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pLeftPt->Load("../Bin/Resources/Data/Effect/Ranrok/RanrokSide/Side_PT", static_cast<LEVEL>(g_iStaticLevel));
|
||||
m_pLeftPt->FollowParents(m_pModelCom->Get_BoneMatrixPtr("indexmiddlewing_04_right"));
|
||||
|
||||
|
||||
if (FAILED(Add_PartObject<CEffectParts>("RightParticle", g_iStaticLevel, &m_pRightPt, &PartsDesc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pRightPt->Load("../Bin/Resources/Data/Effect/Ranrok/RanrokSide/Side_PT", static_cast<LEVEL>(g_iStaticLevel));
|
||||
m_pRightPt->FollowParents(m_pModelCom->Get_BoneMatrixPtr("indexmiddlewing_04_left"));
|
||||
|
||||
|
||||
|
||||
|
||||
if (FAILED(Add_PartObject<CTrailObject>("Left_Trail", g_iStaticLevel, &m_pLeftEye_Trail, &PartsDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pLeftEye_Trail->Load_Trail("../Bin/Resources/Data/Effect/Ranrok/RanrokSide/Eye_Trail", static_cast<LEVEL>(g_iStaticLevel));
|
||||
m_pLeftEye_Trail->Set_Visible(true);
|
||||
|
||||
if (FAILED(Add_PartObject<CTrailObject>("Right_Trail", g_iStaticLevel, &m_pRightEye_Trail, &PartsDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pRightEye_Trail->Load_Trail("../Bin/Resources/Data/Effect/Ranrok/RanrokSide/Eye_Trail", static_cast<LEVEL>(g_iStaticLevel));
|
||||
m_pRightEye_Trail->Set_Visible(true);
|
||||
|
||||
m_pLeftEye_BoneMat = m_pModelCom->Get_BoneMatrixPtr("eye_left");
|
||||
m_pRightEye_BoneMat = m_pModelCom->Get_BoneMatrixPtr("eye_right");
|
||||
|
||||
#pragma endregion
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -525,11 +660,14 @@ 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) {
|
||||
/*if (m_bDrawOutLine) {
|
||||
Render_OutLine();
|
||||
}
|
||||
}*/
|
||||
|
||||
#ifdef _DEBUG
|
||||
if (true == m_pCharacter_Controller->IsActive()) {
|
||||
@@ -557,9 +695,14 @@ HRESULT CRanrok::Render_Nonblend()
|
||||
m_pShaderCom->Bind_RawValue("g_bDisolve", &bDisolve, sizeof(_bool));
|
||||
m_pShaderCom->Bind_RawValue("g_fDisolveRatio", &zero, sizeof(_float));
|
||||
}
|
||||
if (FAILED(m_pMotionTrailCom->Render(m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
|
||||
#ifndef 진우
|
||||
if (m_bMotionTrail) {
|
||||
if (FAILED(m_pMotionTrailCom->Render(m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -806,6 +949,14 @@ void CRanrok::Free()
|
||||
SAFE_RELEASE(m_pRigidBody);
|
||||
SAFE_RELEASE(m_pEffectPool);
|
||||
SAFE_RELEASE(m_pRanrok_Point);
|
||||
SAFE_RELEASE(m_pRightSmoke);
|
||||
SAFE_RELEASE(m_pLeftSmoke);
|
||||
SAFE_RELEASE(m_pBottomSmoke);
|
||||
SAFE_RELEASE(m_pLeftEye_Trail);
|
||||
SAFE_RELEASE(m_pRightEye_Trail);
|
||||
SAFE_RELEASE(m_pRightPt);
|
||||
SAFE_RELEASE(m_pLeftPt);
|
||||
|
||||
Safe_Delete(m_pCallBack_Behavior);
|
||||
Safe_Delete(m_pCallBack_HitReport);
|
||||
}
|
||||
|
||||
@@ -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<CEffectParts>("Breath_Black");
|
||||
m_pBreathSlog = Get_PartObject<CEffectParts>("BreathSlog");
|
||||
m_pMouthFire = Get_PartObject<CEffectParts>("MouthFire");
|
||||
m_pLand_Decal = Get_PartObject<CEffectParts>("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<BREATH_INFO*>(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<CModel>()->Get_BoneMatrixPtr("jaw"));
|
||||
_matrix BoneMat = XMLoadFloat4x4(m_pOwner->Get_Component<CModel>()->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<CRanrok::RANROK_PHASE>(BreathDesc.iPase) == CRanrok::RANROK_PHASE::PHASE_GROUND)
|
||||
{
|
||||
m_pLand_Decal->Set_Visible(true);
|
||||
|
||||
_vector vOwnerPos = m_pOwner->Get_Component<CCharacter_Controller>()->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<CCharacter_Controller>()->Get_FootPosition();
|
||||
|
||||
XMStoreFloat4(&m_vTargetPos, vPlayer_FootPos);
|
||||
|
||||
_vector vCompute_Pos = XMVectorSetY(vOwnerPos, XMVectorGetY(vPlayer_FootPos));
|
||||
|
||||
m_pLand_Decal->Get_Component<CTransform>()->Set_State(STATE::POSITION, vCompute_Pos);
|
||||
|
||||
m_pLand_Decal->Get_Component<CInstance_Model>()->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<CTransform>()->Set_State(STATE::POSITION, vPos + vDir * 3.f);
|
||||
m_pLand_Decal->Get_Component<CInstance_Model>()->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
|
||||
|
||||
@@ -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<CEffectParts>("Bottom_Decal");
|
||||
CEffectParts* pBottomSplatter = Get_PartObject<CEffectParts>("BottomSplatter");
|
||||
CEffectParts* pRed_Sphere = Get_PartObject<CEffectParts>("Red_Sphere");
|
||||
CEffectParts* pRock_PT = Get_PartObject<CEffectParts>("Rock_PT");
|
||||
CEffectParts* pSmoke = Get_PartObject<CEffectParts>("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<CCharacter_Controller>()->Get_Position();
|
||||
|
||||
pRed_Sphere->Get_Component<CTransform>()->Set_WorldMatrix(m_pOwner->Get_Component<CTransform>()->Get_XMWorldMatrix());
|
||||
pRed_Sphere->Get_Component<CTransform>()->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<CCharacter_Controller>()->Get_FootPosition();
|
||||
|
||||
XMStoreFloat4(&m_vTargetPos, vPlayer_FootPos);
|
||||
|
||||
_vector vCompute_Pos = XMVectorSetY(vOwnerPos, XMVectorGetY(vPlayer_FootPos));
|
||||
|
||||
pBottomDecal->Get_Component<CTransform>()->Set_State(STATE::POSITION, vCompute_Pos);
|
||||
pBottomSplatter->Get_Component<CTransform>()->Set_State(STATE::POSITION, vCompute_Pos);
|
||||
pRock_PT->Get_Component<CTransform>()->Set_State(STATE::POSITION, vCompute_Pos);
|
||||
pSmoke->Get_Component<CTransform>()->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<ON_COLLISION_INFO*>(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;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,188 @@
|
||||
#include "pch.h"
|
||||
#include "Ranrok_Hit.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "EffectParts.h"
|
||||
#include "Wand.h"
|
||||
#include "Player.h"
|
||||
#include "InfoInstance.h"
|
||||
|
||||
CRanrok_Hit::CRanrok_Hit(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CEffect_Container{ pDevice, pContext }
|
||||
{
|
||||
}
|
||||
|
||||
CRanrok_Hit::CRanrok_Hit(const CRanrok_Hit& rhs)
|
||||
: CEffect_Container(rhs),
|
||||
m_pInfoInstance(CInfoInstance::GetInstance())
|
||||
{
|
||||
SAFE_ADDREF(m_pInfoInstance);
|
||||
}
|
||||
|
||||
HRESULT CRanrok_Hit::Initialize_Prototype()
|
||||
{
|
||||
|
||||
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokHit")))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
|
||||
}
|
||||
|
||||
HRESULT CRanrok_Hit::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"RanrokHit";
|
||||
|
||||
|
||||
|
||||
m_fDuration = 5.f;
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CRanrok_Hit::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
|
||||
}
|
||||
|
||||
void CRanrok_Hit::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
|
||||
Update_Event(fTimeDelta);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void CRanrok_Hit::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
|
||||
|
||||
}
|
||||
|
||||
HRESULT CRanrok_Hit::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Pre_Setting(pObject, nullptr)))
|
||||
return E_FAIL;
|
||||
|
||||
_float4 vHitPos = *static_cast<_float4*>(pArg);
|
||||
|
||||
/* 초기 객체 비지블*/
|
||||
|
||||
CEffectParts* pHit_PT_R = Get_PartObject<CEffectParts>("Hit_PT_R");
|
||||
CEffectParts* pRock_PT = Get_PartObject<CEffectParts>("Rock_PT");
|
||||
CEffectParts* pSplatter_Hit = Get_PartObject<CEffectParts>("Splatter_Hit");
|
||||
|
||||
|
||||
pSplatter_Hit->Set_Visible(true);
|
||||
pHit_PT_R->Set_Visible(true);
|
||||
pRock_PT->Set_Visible(true);
|
||||
|
||||
|
||||
/* 초기 객체 위치 초기화*/
|
||||
|
||||
_vector vHittingPos = XMLoadFloat4(&vHitPos);
|
||||
|
||||
pSplatter_Hit->Get_Component<CTransform>()->Set_State(STATE::POSITION, vHittingPos);
|
||||
pHit_PT_R->Get_Component<CTransform>()->Set_State(STATE::POSITION, vHittingPos);
|
||||
pRock_PT->Get_Component<CTransform>()->Set_State(STATE::POSITION, vHittingPos);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CRanrok_Hit::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CRanrok_Hit::Ready_Child()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CRanrok_Hit* CRanrok_Hit::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CRanrok_Hit* pInstance = new CRanrok_Hit(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CRanrok_Hit");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
|
||||
CGameObject* CRanrok_Hit::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CRanrok_Hit* pInstance = new CRanrok_Hit(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CRanrok_Hit");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CRanrok_Hit::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
{
|
||||
if (m_bHit == false)
|
||||
return;
|
||||
|
||||
ON_COLLISION_INFO CollisionDesc = *static_cast<ON_COLLISION_INFO*>(pDesc);
|
||||
|
||||
_vector vPos = XMLoadFloat4(&CollisionDesc.vWorldPos);
|
||||
|
||||
|
||||
}
|
||||
|
||||
void CRanrok_Hit::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pInfoInstance);
|
||||
|
||||
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
void CRanrok_Hit::Describe_Entity()
|
||||
{
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
HRESULT CRanrok_Hit::Bind_ShaderResources()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,192 @@
|
||||
#include "pch.h"
|
||||
#include "Ranrok_Impact.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "EffectParts.h"
|
||||
#include "Wand.h"
|
||||
#include "Player.h"
|
||||
#include "InfoInstance.h"
|
||||
|
||||
CRanrok_Impact::CRanrok_Impact(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CEffect_Container{ pDevice, pContext }
|
||||
{
|
||||
}
|
||||
|
||||
CRanrok_Impact::CRanrok_Impact(const CRanrok_Impact& rhs)
|
||||
: CEffect_Container(rhs),
|
||||
m_pInfoInstance(CInfoInstance::GetInstance())
|
||||
{
|
||||
SAFE_ADDREF(m_pInfoInstance);
|
||||
}
|
||||
|
||||
HRESULT CRanrok_Impact::Initialize_Prototype()
|
||||
{
|
||||
|
||||
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokBigHit")))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
|
||||
}
|
||||
|
||||
HRESULT CRanrok_Impact::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"RanrokImpact";
|
||||
|
||||
|
||||
|
||||
m_fDuration = 5.f;
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CRanrok_Impact::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
|
||||
}
|
||||
|
||||
void CRanrok_Impact::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
|
||||
Update_Event(fTimeDelta);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void CRanrok_Impact::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
|
||||
|
||||
}
|
||||
|
||||
HRESULT CRanrok_Impact::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Pre_Setting(pObject, nullptr)))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
/* 초기 객체 비지블*/
|
||||
CEffectParts* pHit_PT0 = Get_PartObject<CEffectParts>("Hit_PT0");
|
||||
CEffectParts* pHit_Pulse = Get_PartObject<CEffectParts>("Hit_Pulse");
|
||||
CEffectParts* pRock_PT = Get_PartObject<CEffectParts>("Rock_PT");
|
||||
CEffectParts* pSplash_Hit = Get_PartObject<CEffectParts>("Splash_Hit");
|
||||
CEffectParts* pSpline0 = Get_PartObject<CEffectParts>("Spline0");
|
||||
CEffectParts* pSpline1 = Get_PartObject<CEffectParts>("Spline1");
|
||||
|
||||
pHit_PT0->Set_Visible(true);
|
||||
pHit_Pulse->Set_Visible(true);
|
||||
pRock_PT->Set_Visible(true);
|
||||
pSplash_Hit->Set_Visible(true);
|
||||
pSpline0->Set_Visible(true);
|
||||
pSpline1->Set_Visible(true);
|
||||
|
||||
/* 초기 객체 위치 초기화*/
|
||||
|
||||
_vector vOwnerPos = m_pOwner->Get_Component<CCharacter_Controller>()->Get_Position();
|
||||
|
||||
pHit_PT0->Get_Component<CTransform>()->Set_State(STATE::POSITION, vOwnerPos);
|
||||
pHit_Pulse->Get_Component<CTransform>()->Set_State(STATE::POSITION, vOwnerPos);
|
||||
pRock_PT->Get_Component<CTransform>()->Set_State(STATE::POSITION, vOwnerPos);
|
||||
pSplash_Hit->Get_Component<CTransform>()->Set_State(STATE::POSITION, vOwnerPos);
|
||||
pSpline0->Get_Component<CTransform>()->Set_State(STATE::POSITION, vOwnerPos);
|
||||
pSpline1->Get_Component<CTransform>()->Set_State(STATE::POSITION, vOwnerPos);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CRanrok_Impact::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CRanrok_Impact::Ready_Child()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CRanrok_Impact* CRanrok_Impact::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CRanrok_Impact* pInstance = new CRanrok_Impact(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CRanrok_Impact");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
|
||||
CGameObject* CRanrok_Impact::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CRanrok_Impact* pInstance = new CRanrok_Impact(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CRanrok_Impact");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CRanrok_Impact::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
{
|
||||
if (m_bHit == false)
|
||||
return;
|
||||
|
||||
ON_COLLISION_INFO CollisionDesc = *static_cast<ON_COLLISION_INFO*>(pDesc);
|
||||
|
||||
_vector vPos = XMLoadFloat4(&CollisionDesc.vWorldPos);
|
||||
|
||||
|
||||
}
|
||||
|
||||
void CRanrok_Impact::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pInfoInstance);
|
||||
|
||||
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
void CRanrok_Impact::Describe_Entity()
|
||||
{
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
HRESULT CRanrok_Impact::Bind_ShaderResources()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -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<CEffectParts>("Bottom_Decal");
|
||||
CEffectParts* pRock_PT = Get_PartObject<CEffectParts>("Rock_PT");
|
||||
CEffectParts* pSmoke = Get_PartObject<CEffectParts>("Smoke");
|
||||
|
||||
|
||||
pBottom_Decal->Set_Visible(true);
|
||||
pSmoke->Set_Visible(true);
|
||||
pRock_PT->Set_Visible(true);
|
||||
|
||||
|
||||
/* 초기 객체 위치 초기화*/
|
||||
|
||||
|
||||
_vector vOwnerPos = m_pOwner->Get_Component<CCharacter_Controller>()->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<CCharacter_Controller>()->Get_FootPosition();
|
||||
|
||||
XMStoreFloat4(&m_vTargetPos, vPlayer_FootPos);
|
||||
|
||||
|
||||
_vector vCompute_Pos = XMVectorSetY(vOwnerPos, XMVectorGetY(vPlayer_FootPos));
|
||||
|
||||
pBottom_Decal->Get_Component<CTransform>()->Set_State(STATE::POSITION, vCompute_Pos);
|
||||
pSmoke->Get_Component<CTransform>()->Set_State(STATE::POSITION, vCompute_Pos);
|
||||
pRock_PT->Get_Component<CTransform>()->Set_State(STATE::POSITION, vCompute_Pos);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CRanrok_Land::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CRanrok_Land::Ready_Child()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CRanrok_Land* CRanrok_Land::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CRanrok_Land* pInstance = new CRanrok_Land(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CRanrok_Land");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
|
||||
CGameObject* CRanrok_Land::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CRanrok_Land* pInstance = new CRanrok_Land(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CRanrok_Land");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CRanrok_Land::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
{
|
||||
if (m_bHit == false)
|
||||
return;
|
||||
|
||||
ON_COLLISION_INFO CollisionDesc = *static_cast<ON_COLLISION_INFO*>(pDesc);
|
||||
|
||||
_vector vPos = XMLoadFloat4(&CollisionDesc.vWorldPos);
|
||||
|
||||
|
||||
}
|
||||
|
||||
void CRanrok_Land::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pInfoInstance);
|
||||
|
||||
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
void CRanrok_Land::Describe_Entity()
|
||||
{
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
HRESULT CRanrok_Land::Bind_ShaderResources()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ HRESULT CRanrok_Pulse::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
CEffectParts* pSmoke = Get_PartObject<CEffectParts>("Smoke");
|
||||
|
||||
pBottomDecal->Set_Visible(true);
|
||||
pBottomSplatter->Set_Visible(true);
|
||||
//pBottomSplatter->Set_Visible(true);
|
||||
pBottomSplatter2->Set_Visible(true);
|
||||
pRock_PT->Set_Visible(true);
|
||||
pSmoke->Set_Visible(true);
|
||||
|
||||
@@ -0,0 +1,202 @@
|
||||
#include "pch.h"
|
||||
#include "Ranrok_Rush_Bottom.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "EffectParts.h"
|
||||
#include "Wand.h"
|
||||
#include "Player.h"
|
||||
#include "InfoInstance.h"
|
||||
|
||||
CRanrok_Rush_Bottom::CRanrok_Rush_Bottom(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CEffect_Container{ pDevice, pContext }
|
||||
{
|
||||
}
|
||||
|
||||
CRanrok_Rush_Bottom::CRanrok_Rush_Bottom(const CRanrok_Rush_Bottom& rhs)
|
||||
: CEffect_Container(rhs),
|
||||
m_pInfoInstance(CInfoInstance::GetInstance())
|
||||
{
|
||||
SAFE_ADDREF(m_pInfoInstance);
|
||||
}
|
||||
|
||||
HRESULT CRanrok_Rush_Bottom::Initialize_Prototype()
|
||||
{
|
||||
|
||||
|
||||
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokRushBottom")))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
|
||||
}
|
||||
|
||||
HRESULT CRanrok_Rush_Bottom::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"Ranrok_Rush_Bottom";
|
||||
|
||||
|
||||
|
||||
m_fDuration = 3.f;
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CRanrok_Rush_Bottom::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
|
||||
}
|
||||
|
||||
void CRanrok_Rush_Bottom::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
|
||||
Update_Event(fTimeDelta);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void CRanrok_Rush_Bottom::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
|
||||
|
||||
}
|
||||
|
||||
HRESULT CRanrok_Rush_Bottom::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Pre_Setting(pObject, nullptr)))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
/* 초기 객체 비지블*/
|
||||
|
||||
CEffectParts* pRush_Decal = Get_PartObject<CEffectParts>("Rush_Decal");
|
||||
CEffectParts* pRock_PT = Get_PartObject<CEffectParts>("Rock_PT");
|
||||
CEffectParts* pSmoke = Get_PartObject<CEffectParts>("Smoke");
|
||||
|
||||
|
||||
pRush_Decal->Set_Visible(true);
|
||||
pSmoke->Set_Visible(true);
|
||||
pRock_PT->Set_Visible(true);
|
||||
|
||||
|
||||
/* 초기 객체 위치 초기화*/
|
||||
|
||||
|
||||
_vector vBonePos = XMLoadFloat4(static_cast<_float4*>(pArg));
|
||||
|
||||
|
||||
CUnit* pPlayer = m_pInfoInstance->Get_NearestPlayerAlly(m_pOwner->Get_WorldPostion()).first;
|
||||
|
||||
if (pPlayer == nullptr)
|
||||
return E_FAIL;
|
||||
|
||||
_vector vPlayer_FootPos = pPlayer->Get_Component<CCharacter_Controller>()->Get_FootPosition();
|
||||
|
||||
XMStoreFloat4(&m_vTargetPos, vPlayer_FootPos);
|
||||
|
||||
|
||||
_vector vCompute_Pos = XMVectorSetY(vBonePos, XMVectorGetY(vPlayer_FootPos));
|
||||
|
||||
pRush_Decal->Get_Component<CTransform>()->Set_State(STATE::POSITION, vCompute_Pos);
|
||||
pSmoke->Get_Component<CTransform>()->Set_State(STATE::POSITION, vCompute_Pos);
|
||||
pRock_PT->Get_Component<CTransform>()->Set_State(STATE::POSITION, vCompute_Pos);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CRanrok_Rush_Bottom::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CRanrok_Rush_Bottom::Ready_Child()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CRanrok_Rush_Bottom* CRanrok_Rush_Bottom::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CRanrok_Rush_Bottom* pInstance = new CRanrok_Rush_Bottom(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CRanrok_Rush_Bottom");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
|
||||
CGameObject* CRanrok_Rush_Bottom::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CRanrok_Rush_Bottom* pInstance = new CRanrok_Rush_Bottom(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CRanrok_Rush_Bottom");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CRanrok_Rush_Bottom::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
{
|
||||
if (m_bHit == false)
|
||||
return;
|
||||
|
||||
ON_COLLISION_INFO CollisionDesc = *static_cast<ON_COLLISION_INFO*>(pDesc);
|
||||
|
||||
_vector vPos = XMLoadFloat4(&CollisionDesc.vWorldPos);
|
||||
|
||||
|
||||
}
|
||||
|
||||
void CRanrok_Rush_Bottom::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pInfoInstance);
|
||||
|
||||
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
void CRanrok_Rush_Bottom::Describe_Entity()
|
||||
{
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
HRESULT CRanrok_Rush_Bottom::Bind_ShaderResources()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
#include "Player.h"
|
||||
#include "Effect_Container.h"
|
||||
#include "EffectPool.h"
|
||||
#include "EffectParts.h"
|
||||
#include "TrailObject.h"
|
||||
#include "Ranrok_Breath.h"
|
||||
|
||||
#pragma region STATE
|
||||
#include "State_Idle.h"
|
||||
@@ -350,9 +353,13 @@ void CRanrok::Behavior_FireBreathEnter()
|
||||
Add_Event(m_Animation[STATEANIM::FIREBREATH_A].first,
|
||||
[this]() {
|
||||
|
||||
_float fBreathTime = 1.f;
|
||||
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_BREATH, this, &fBreathTime);
|
||||
CRanrok_Breath::BREATH_INFO BreathDesc;
|
||||
|
||||
BreathDesc.fTime = 1.f;
|
||||
BreathDesc.iPase = ENUM_CLASS(m_ePhase);
|
||||
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_BREATH, this, &BreathDesc);
|
||||
|
||||
}, 0.1f);
|
||||
|
||||
@@ -368,8 +375,13 @@ void CRanrok::Behavior_FireBreathEnter()
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {
|
||||
_float fBreathTime = 5.f;
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_BREATH, this, &fBreathTime);
|
||||
CRanrok_Breath::BREATH_INFO BreathDesc;
|
||||
|
||||
BreathDesc.fTime = 2.f;
|
||||
BreathDesc.iPase = ENUM_CLASS(m_ePhase);
|
||||
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_BREATH, this, &BreathDesc);
|
||||
|
||||
m_bLookAt = false;
|
||||
}, 0.2f);
|
||||
|
||||
@@ -455,9 +467,13 @@ void CRanrok::Behavior_FireSweepEnter()
|
||||
Add_Event(m_Animation[STATEANIM::FIRESWEEP_A].first,
|
||||
[this]() {
|
||||
|
||||
_float fBreathTime = 3.f;
|
||||
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_BREATH, this, &fBreathTime);
|
||||
CRanrok_Breath::BREATH_INFO BreathDesc;
|
||||
|
||||
BreathDesc.fTime = 2.5f;
|
||||
BreathDesc.iPase = ENUM_CLASS(m_ePhase);
|
||||
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_BREATH, this, &BreathDesc);
|
||||
|
||||
}, 0.08f);
|
||||
|
||||
@@ -474,8 +490,13 @@ void CRanrok::Behavior_FireSweepEnter()
|
||||
|
||||
Add_Event(m_Animation[STATEANIM::FIRESWEEP_G].first,
|
||||
[this]() {
|
||||
_float fBreathTime = 5.f;
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_BREATH, this, &fBreathTime);
|
||||
|
||||
CRanrok_Breath::BREATH_INFO BreathDesc;
|
||||
|
||||
BreathDesc.fTime = 3.f;
|
||||
BreathDesc.iPase = ENUM_CLASS(m_ePhase);
|
||||
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_BREATH, this, &BreathDesc);
|
||||
m_bLookAt = false;
|
||||
}, 0.2f);
|
||||
|
||||
@@ -625,6 +646,7 @@ void CRanrok::Behavior_SwipeEnter()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
m_pFSM->Enable_State(FSMSTATE::SWIPE);
|
||||
|
||||
if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_GROUND))
|
||||
{
|
||||
if (m_fCross > 0.f)
|
||||
@@ -634,9 +656,12 @@ void CRanrok::Behavior_SwipeEnter()
|
||||
else {
|
||||
pairAnimInfo = m_Animation[STATEANIM::GROUND_SWIPE_R];
|
||||
}
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second,1.5f);
|
||||
|
||||
}
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {m_bMotionTrail = true; },
|
||||
0.3f);
|
||||
m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::SWIPE)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::SWIPE)];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
@@ -658,6 +683,7 @@ HRESULT CRanrok::Behavior_SwipeExitCheck(_float fTimeDelta)
|
||||
void CRanrok::Behavior_SwipeExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::SWIPE);
|
||||
m_bMotionTrail = false;
|
||||
}
|
||||
// FireBurst 란록은 평상시에 맞지않는데 특정 구체를 파괴해서 란록한테 피해를 입히면 버스트상태가 해제되고 이제 마법에 맞는다. 그리고 특정시간이 지나면 이 파이어버스트 상태가 되면서 다시 맞지않는다.
|
||||
void CRanrok::Behavior_SkillEnter()
|
||||
@@ -688,9 +714,34 @@ void CRanrok::Behavior_RushEnter()
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
m_pFSM->Enable_State(FSMSTATE::RUSH);
|
||||
pairAnimInfo = m_Animation[STATEANIM::RUSH_LOOP];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second,2.f);
|
||||
m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::RUSH)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::RUSH)];
|
||||
m_bLookAt = false;
|
||||
|
||||
Add_Event(m_Animation[STATEANIM::RUSH_LOOP].first,
|
||||
[this]() {
|
||||
|
||||
_matrix LeftBoneMat = XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("wrist_left_target")) * m_pTransformCom->Get_XMWorldMatrix();
|
||||
|
||||
_float4 vLeftPos;
|
||||
XMStoreFloat4(&vLeftPos, LeftBoneMat.r[3]);
|
||||
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_RUSH_BOTTOM, this, &vLeftPos);
|
||||
|
||||
}, 0.5f, true);
|
||||
|
||||
Add_Event(m_Animation[STATEANIM::RUSH_LOOP].first,
|
||||
[this]() {
|
||||
|
||||
_matrix RightBoneMat = XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("wrist_right_target")) * m_pTransformCom->Get_XMWorldMatrix();
|
||||
|
||||
_float4 vRightPos;
|
||||
XMStoreFloat4(&vRightPos, RightBoneMat.r[3]);
|
||||
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_RUSH_BOTTOM, this, &vRightPos);
|
||||
|
||||
}, 0.8f, true);
|
||||
|
||||
}
|
||||
|
||||
HRESULT CRanrok::Behavior_RushExitCheck(_float fTimeDelta)
|
||||
@@ -755,6 +806,9 @@ HRESULT CRanrok::Behavior_RushExitCheck(_float fTimeDelta)
|
||||
m_pFSM->Change_State(FSMSTATE::GROUND);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -775,16 +829,31 @@ void CRanrok::Behavior_PulseEnter()
|
||||
m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::PULSE)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::PULSE)];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() { CameraShake(10.f, 2.f, 5.f, 1.2f);
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_PURSE, this);
|
||||
},
|
||||
0.39f);
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_CHARGE, this);
|
||||
}, 0.f);
|
||||
m_pLeftSmoke->Set_Visible(false);
|
||||
m_pRightSmoke->Set_Visible(false);
|
||||
m_pBottomSmoke->Set_Visible(false);
|
||||
|
||||
}, 0.01f);
|
||||
|
||||
if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_AIR))
|
||||
{
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {
|
||||
CameraShake(10.f, 2.f, 5.f, 1.2f);
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_PURSE, this);
|
||||
}, 0.39f);
|
||||
}
|
||||
else
|
||||
{
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {
|
||||
CameraShake(10.f, 2.f, 5.f, 1.2f);
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_GROUNDPULSE, this);
|
||||
}, 0.39f);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -802,6 +871,10 @@ HRESULT CRanrok::Behavior_PulseExitCheck(_float fTimeDelta)
|
||||
else {
|
||||
m_pFSM->Change_State(FSMSTATE::LAND);
|
||||
}
|
||||
|
||||
m_pLeftSmoke->Set_Visible(true);
|
||||
m_pRightSmoke->Set_Visible(true);
|
||||
m_pBottomSmoke->Set_Visible(true);
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
@@ -824,6 +897,10 @@ void CRanrok::Behavior_TuckedEnter()
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_POINT, this, nullptr, &m_pRanrok_Point);
|
||||
|
||||
m_pLeftEye_Trail->Set_Visible(false);
|
||||
m_pRightEye_Trail->Set_Visible(false);
|
||||
|
||||
}, 0.05f);
|
||||
|
||||
}
|
||||
@@ -832,7 +909,7 @@ HRESULT CRanrok::Behavior_TuckedExitCheck(_float fTimeDelta)
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
_int iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||
if (m_fDisolveTime >= 0.1f) {
|
||||
if (m_fDisolveTime >= 0.25f) {
|
||||
MoveTo(fTimeDelta);
|
||||
}
|
||||
|
||||
@@ -861,8 +938,14 @@ HRESULT CRanrok::Behavior_TuckedExitCheck(_float fTimeDelta)
|
||||
void CRanrok::Behavior_TuckedExit()
|
||||
{
|
||||
/* 이펙트를 서서히 사라지게 하기위해 도착 이후에 나오는 이펙트를 아래로 떨굼 */
|
||||
m_pRanrok_Point->Setting_Pos(XMVectorSet(0.f, -500.f, 0.f, 1.f));
|
||||
SAFE_RELEASE(m_pRanrok_Point);
|
||||
if (m_bTucked == true)
|
||||
{
|
||||
m_pRanrok_Point->Setting_Pos(XMVectorSet(0.f, -500.f, 0.f, 1.f));
|
||||
SAFE_RELEASE(m_pRanrok_Point);
|
||||
}
|
||||
|
||||
m_pLeftEye_Trail->Set_Visible(true);
|
||||
m_pRightEye_Trail->Set_Visible(true);
|
||||
|
||||
m_pFSM->Disable_State(FSMSTATE::TUCKED);
|
||||
m_bTucked = false;
|
||||
@@ -882,8 +965,11 @@ void CRanrok::Behavior_LandEnter()
|
||||
pairAnimInfo = m_Animation[STATEANIM::LAND];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second,1.f,false,fAnimSpeed);
|
||||
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() { CameraShake(30.f, 5.f, 10.f, 1.2f); },
|
||||
[this]() {
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_LAND, this);
|
||||
CameraShake(30.f, 5.f, 10.f, 1.2f); },
|
||||
0.53f);
|
||||
}
|
||||
|
||||
@@ -908,6 +994,7 @@ void CRanrok::Behavior_HitEnter()
|
||||
m_pFSM->Enable_State(FSMSTATE::HIT);
|
||||
|
||||
m_bLookAt = false;
|
||||
|
||||
if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_AIR))
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::HIT_BWD]; // 스몰
|
||||
|
||||
+37
-27
@@ -1,23 +1,24 @@
|
||||
#include "pch.h"
|
||||
#include "Ride_BboosterBar.h"
|
||||
#include "Ride_BoosterBar.h"
|
||||
#include "GameInstance.h"
|
||||
#include "InfoInstance.h"
|
||||
|
||||
CRide_BboosterBar::CRide_BboosterBar(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
CRide_BoosterBar::CRide_BoosterBar(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CRide_BboosterBar::CRide_BboosterBar(const CRide_BboosterBar& rhs)
|
||||
CRide_BoosterBar::CRide_BoosterBar(const CRide_BoosterBar& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CRide_BboosterBar::Initialize_Prototype()
|
||||
HRESULT CRide_BoosterBar::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CRide_BboosterBar::Initialize(void* pArg)
|
||||
HRESULT CRide_BoosterBar::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
@@ -41,8 +42,8 @@ HRESULT CRide_BboosterBar::Initialize(void* pArg)
|
||||
m_fAlpha = 1.f;
|
||||
m_fAlphaTime = 10.f;
|
||||
m_vNine_Slice = _float4(27.f, 125.f, m_fSizeY * 0.5f, m_fSizeY * 0.5f);
|
||||
m_fMaxGauge = 100.f;
|
||||
m_fCurrentGauge = m_fMaxGauge;
|
||||
m_fMaxGauge = 5.f;
|
||||
m_fCurrentGauge = 5.f;
|
||||
m_fTargetGauge = m_fMaxGauge;
|
||||
m_fMoveSpeed = 5.f;
|
||||
m_fGaugeBGSize = _float2(144.f, 24.f);
|
||||
@@ -52,17 +53,27 @@ HRESULT CRide_BboosterBar::Initialize(void* pArg)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CRide_BboosterBar::Active(_float fTimeDelta)
|
||||
void CRide_BoosterBar::Active(_float fTimeDelta)
|
||||
{
|
||||
m_fCurrentGauge = CMyTools::Lerp_f1D(m_fCurrentGauge, m_fTargetGauge, fTimeDelta * m_fMoveSpeed);
|
||||
}
|
||||
|
||||
void CRide_BboosterBar::NonActive(_float fTimeDelta)
|
||||
void CRide_BoosterBar::NonActive(_float fTimeDelta)
|
||||
{
|
||||
m_fCurrentGauge = CMyTools::Lerp_f1D(m_fTargetGauge, m_fCurrentGauge, fTimeDelta * m_fMoveSpeed);
|
||||
}
|
||||
|
||||
void CRide_BboosterBar::Priority_Update(_float fTimeDelta)
|
||||
void CRide_BoosterBar::Set_Gauge(_float fTime)
|
||||
{
|
||||
m_fTargetGauge = fTime;
|
||||
}
|
||||
|
||||
void CRide_BoosterBar::Booster(_bool bBooster)
|
||||
{
|
||||
m_bBooster = bBooster;
|
||||
}
|
||||
|
||||
void CRide_BoosterBar::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
@@ -71,7 +82,7 @@ void CRide_BboosterBar::Priority_Update(_float fTimeDelta)
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CRide_BboosterBar::Update(_float fTimeDelta)
|
||||
void CRide_BoosterBar::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
@@ -113,9 +124,8 @@ void CRide_BboosterBar::Update(_float fTimeDelta)
|
||||
|
||||
m_fGaugeBar = m_fCurrentGauge / m_fMaxGauge;
|
||||
|
||||
if (m_pGameInstance->Mouse_Pressing(DIM_LBUTTON))
|
||||
if (m_bBooster == true)
|
||||
{
|
||||
m_fTargetGauge -= fTimeDelta * m_fTimeMult;
|
||||
m_iClick = 1;
|
||||
}
|
||||
else
|
||||
@@ -130,7 +140,7 @@ void CRide_BboosterBar::Update(_float fTimeDelta)
|
||||
|
||||
if (m_iClick == 0)
|
||||
{
|
||||
m_fTargetGauge += fTimeDelta * m_fTimeMult;
|
||||
//m_fTargetGauge += fTimeDelta;
|
||||
}
|
||||
|
||||
if (m_iClick == 1)
|
||||
@@ -150,7 +160,7 @@ void CRide_BboosterBar::Update(_float fTimeDelta)
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CRide_BboosterBar::Late_Update(_float fTimeDelta)
|
||||
void CRide_BoosterBar::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
@@ -162,7 +172,7 @@ void CRide_BboosterBar::Late_Update(_float fTimeDelta)
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CRide_BboosterBar::Render()
|
||||
HRESULT CRide_BoosterBar::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
@@ -180,12 +190,12 @@ HRESULT CRide_BboosterBar::Render()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CRide_BboosterBar::Get_WorldPostion()
|
||||
_vector CRide_BoosterBar::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CRide_BboosterBar::Bind_ShaderResources()
|
||||
HRESULT CRide_BoosterBar::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
{
|
||||
@@ -270,7 +280,7 @@ HRESULT CRide_BboosterBar::Bind_ShaderResources()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CRide_BboosterBar::Ready_Components(void* pArg)
|
||||
HRESULT CRide_BoosterBar::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
@@ -295,33 +305,33 @@ HRESULT CRide_BboosterBar::Ready_Components(void* pArg)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CRide_BboosterBar* CRide_BboosterBar::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
CRide_BoosterBar* CRide_BoosterBar::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CRide_BboosterBar* pInstance = new CRide_BboosterBar(pDevice, pContext);
|
||||
CRide_BoosterBar* pInstance = new CRide_BoosterBar(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CRide_BboosterBar");
|
||||
MSG_BOX("Failed to Created : CRide_BoosterBar");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CRide_BboosterBar::Clone(void* pArg, CGameObject* pOwner)
|
||||
CGameObject* CRide_BoosterBar::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CRide_BboosterBar* pInstance = new CRide_BboosterBar(*this);
|
||||
CRide_BoosterBar* pInstance = new CRide_BoosterBar(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CRide_BboosterBar");
|
||||
MSG_BOX("Failed to Cloned : CRide_BoosterBar");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CRide_BboosterBar::Free()
|
||||
void CRide_BoosterBar::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
@@ -333,7 +343,7 @@ void CRide_BboosterBar::Free()
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CRide_BboosterBar::Describe_Entity()
|
||||
void CRide_BoosterBar::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
+20
-20
@@ -1,22 +1,22 @@
|
||||
#include "pch.h"
|
||||
#include "Ride_Bbooster_Slot.h"
|
||||
#include "Ride_Booster_Slot.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CRide_Bbooster_Slot::CRide_Bbooster_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
CRide_Booster_Slot::CRide_Booster_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CRide_Bbooster_Slot::CRide_Bbooster_Slot(const CRide_Bbooster_Slot& rhs)
|
||||
CRide_Booster_Slot::CRide_Booster_Slot(const CRide_Booster_Slot& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CRide_Bbooster_Slot::Initialize_Prototype()
|
||||
HRESULT CRide_Booster_Slot::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
HRESULT CRide_Bbooster_Slot::Initialize(void* pArg)
|
||||
HRESULT CRide_Booster_Slot::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
@@ -44,7 +44,7 @@ HRESULT CRide_Bbooster_Slot::Initialize(void* pArg)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CRide_Bbooster_Slot::Priority_Update(_float fTimeDelta)
|
||||
void CRide_Booster_Slot::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
@@ -52,7 +52,7 @@ void CRide_Bbooster_Slot::Priority_Update(_float fTimeDelta)
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
void CRide_Bbooster_Slot::Update(_float fTimeDelta)
|
||||
void CRide_Booster_Slot::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
@@ -88,7 +88,7 @@ void CRide_Bbooster_Slot::Update(_float fTimeDelta)
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CRide_Bbooster_Slot::Late_Update(_float fTimeDelta)
|
||||
void CRide_Booster_Slot::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
@@ -100,7 +100,7 @@ void CRide_Bbooster_Slot::Late_Update(_float fTimeDelta)
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CRide_Bbooster_Slot::Render()
|
||||
HRESULT CRide_Booster_Slot::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
@@ -118,12 +118,12 @@ HRESULT CRide_Bbooster_Slot::Render()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CRide_Bbooster_Slot::Get_WorldPostion()
|
||||
_vector CRide_Booster_Slot::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CRide_Bbooster_Slot::Bind_ShaderResources()
|
||||
HRESULT CRide_Booster_Slot::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
{
|
||||
@@ -180,7 +180,7 @@ HRESULT CRide_Bbooster_Slot::Bind_ShaderResources()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CRide_Bbooster_Slot::Ready_Components(void* pArg)
|
||||
HRESULT CRide_Booster_Slot::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
@@ -205,33 +205,33 @@ HRESULT CRide_Bbooster_Slot::Ready_Components(void* pArg)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CRide_Bbooster_Slot* CRide_Bbooster_Slot::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
CRide_Booster_Slot* CRide_Booster_Slot::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CRide_Bbooster_Slot* pInstance = new CRide_Bbooster_Slot(pDevice, pContext);
|
||||
CRide_Booster_Slot* pInstance = new CRide_Booster_Slot(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CRide_Bbooster_Slot");
|
||||
MSG_BOX("Failed to Created : CRide_Booster_Slot");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CRide_Bbooster_Slot::Clone(void* pArg, CGameObject* pOwner)
|
||||
CGameObject* CRide_Booster_Slot::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CRide_Bbooster_Slot* pInstance = new CRide_Bbooster_Slot(*this);
|
||||
CRide_Booster_Slot* pInstance = new CRide_Booster_Slot(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CRide_Bbooster_Slot");
|
||||
MSG_BOX("Failed to Cloned : CRide_Booster_Slot");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CRide_Bbooster_Slot::Free()
|
||||
void CRide_Booster_Slot::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
@@ -243,7 +243,7 @@ void CRide_Bbooster_Slot::Free()
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CRide_Bbooster_Slot::Describe_Entity()
|
||||
void CRide_Booster_Slot::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
@@ -4,10 +4,11 @@
|
||||
#include "Ride_Info_Key.h"
|
||||
#include "Ride_Info.h"
|
||||
#include "Ride_InfoBG.h"
|
||||
#include "Ride_Bbooster_Slot.h"
|
||||
#include "Ride_BboosterBar.h"
|
||||
#include "Ride_Booster_Slot.h"
|
||||
#include "Ride_BoosterBar.h"
|
||||
#include "Ride_HpBar.h"
|
||||
#include "Ride_HpSlot.h"
|
||||
#include "InfoInstance.h"
|
||||
|
||||
CRide_Panel::CRide_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CPanelObject(pDevice, pContext)
|
||||
@@ -15,7 +16,9 @@ CRide_Panel::CRide_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
}
|
||||
|
||||
CRide_Panel::CRide_Panel(const CRide_Panel& rhs)
|
||||
:CPanelObject(rhs)
|
||||
:CPanelObject(rhs),
|
||||
m_pInfoInstance(CInfoInstance::GetInstance())
|
||||
|
||||
{
|
||||
}
|
||||
|
||||
@@ -57,9 +60,21 @@ HRESULT CRide_Panel::Initialize(void* pArg)
|
||||
m_vLerp_Position = _float4(1750.f, m_fY, 0.f, 1.f);
|
||||
static_cast<CUIObject*>(m_pRide_Info)->Visible(false);
|
||||
static_cast<CUIObject*>(m_pRide_InfoBG)->Visible(false);
|
||||
m_pInfoInstance->Add_Event(TEXT("BroomBooster"), [this](void* p) {this->Booster(*reinterpret_cast<_bool*>(p)); });
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CRide_Panel::Booster(_bool bBooster)
|
||||
{
|
||||
m_bBooster = bBooster;
|
||||
static_cast<CRide_BoosterBar*>(m_pRide_BoosterBar)->Booster(m_bBooster);
|
||||
}
|
||||
|
||||
void CRide_Panel::Set_Gauge()
|
||||
{
|
||||
static_cast<CRide_BoosterBar*>(m_pRide_BoosterBar)->Set_Gauge(m_pInfoInstance->Get_Broom_Booster_Timer());
|
||||
}
|
||||
|
||||
void CRide_Panel::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
@@ -124,6 +139,8 @@ void CRide_Panel::Update(_float fTimeDelta)
|
||||
static_cast<CUIObject*>(m_pRide_InfoBG)->Set_Hover(true);
|
||||
}
|
||||
|
||||
Set_Gauge();
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
@@ -168,43 +185,43 @@ HRESULT CRide_Panel::Ready_Components(void* pArg)
|
||||
|
||||
HRESULT CRide_Panel::Ready_Element(void* pArg)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRide_InfoBG>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CRide_InfoBG**>(&m_pRide_InfoBG))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRide_InfoBG>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast <CRide_InfoBG**>(&m_pRide_InfoBG))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Ride_InfoBG"), m_pRide_InfoBG);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRide_Info_Key>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CRide_Info_Key**>(&m_pRide_Info_Key))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRide_Info_Key>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast <CRide_Info_Key**>(&m_pRide_Info_Key))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Ride_Info_Key"), m_pRide_Info_Key);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRide_Info>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CRide_Info**>(&m_pRide_Info))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRide_Info>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast <CRide_Info**>(&m_pRide_Info))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Ride_Info"), m_pRide_Info);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRide_Bbooster_Slot>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CRide_Bbooster_Slot**>(&m_pRide_Bbooster_Slot))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRide_Booster_Slot>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast <CRide_Booster_Slot**>(&m_pRide_Booster_Slot))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Ride_Bbooster_Slot"), m_pRide_Bbooster_Slot);
|
||||
Add_Element(TEXT("Ride_Bbooster_Slot"), m_pRide_Booster_Slot);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRide_BboosterBar>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CRide_BboosterBar**>(&m_pRide_BboosterBar))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRide_BoosterBar>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast <CRide_BoosterBar**>(&m_pRide_BoosterBar))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Ride_BboosterBar"), m_pRide_BboosterBar);
|
||||
Add_Element(TEXT("Ride_BboosterBar"), m_pRide_BoosterBar);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRide_HpBar>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CRide_HpBar**>(&m_pRide_HpBar))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRide_HpBar>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast <CRide_HpBar**>(&m_pRide_HpBar))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Ride_HpBar"), m_pRide_HpBar);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRide_HpSlot>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CRide_HpSlot**>(&m_pRide_HpSlot))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRide_HpSlot>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast <CRide_HpSlot**>(&m_pRide_HpSlot))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ HRESULT CSpellLearn_Canvas::Ready_Components(void* pArg)
|
||||
|
||||
HRESULT CSpellLearn_Canvas::Ready_Panel(void* pArg)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpellLearn_Panel>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CSpellLearn_Panel**>(&m_pSpellLearn_Panel))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpellLearn_Panel>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast <CSpellLearn_Panel**>(&m_pSpellLearn_Panel))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -303,37 +303,37 @@ HRESULT CSpellLearn_Panel::Ready_Components(void* pArg)
|
||||
|
||||
HRESULT CSpellLearn_Panel::Ready_Element(void* pArg)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpellLearn_Name>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpellLearn_Name**>(&m_pSpellLearn_Name))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpellLearn_Name>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CSpellLearn_Name**>(&m_pSpellLearn_Name))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("SpellLearn_Name"), m_pSpellLearn_Name);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpellLearn>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpellLearn**>(&m_pSpellLearn))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpellLearn>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CSpellLearn**>(&m_pSpellLearn))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("SpellLearn"), m_pSpellLearn);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpellLearn_MovePointer>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpellLearn_MovePointer**>(&m_pSpellLearn_MovePointer))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpellLearn_MovePointer>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CSpellLearn_MovePointer**>(&m_pSpellLearn_MovePointer))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("SpellLearn_MovePointer"), m_pSpellLearn_MovePointer);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpellLearn_ChaserPointer>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpellLearn_ChaserPointer**>(&m_pSpellLearn_ChaserPointer))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpellLearn_ChaserPointer>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CSpellLearn_ChaserPointer**>(&m_pSpellLearn_ChaserPointer))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("SPellLeam_ChaserPointer"), m_pSpellLearn_ChaserPointer);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpellLearn_Slot>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpellLearn_Slot**>(&m_pSpellLearn_Slot))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpellLearn_Slot>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CSpellLearn_Slot**>(&m_pSpellLearn_Slot))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("SpellLearn_Slot"), m_pSpellLearn_Slot);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpellLearn_Overlay>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpellLearn_Overlay**>(&m_pSpellLearn_Overlay))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpellLearn_Overlay>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CSpellLearn_Overlay**>(&m_pSpellLearn_Overlay))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -341,7 +341,7 @@ HRESULT CSpellLearn_Panel::Ready_Element(void* pArg)
|
||||
|
||||
for (_int i = 0; i < 3; ++i)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpellLearn_Booster>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpellLearn_Booster**>(&m_pSpellLearn_Booster))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpellLearn_Booster>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CSpellLearn_Booster**>(&m_pSpellLearn_Booster))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ HRESULT CSpell_Canvas::Ready_Components(void* pArg)
|
||||
|
||||
HRESULT CSpell_Canvas::Ready_Panel(void* pArg)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Panel>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CSpell_Panel**>(&m_pSpell_Panel))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Panel>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast <CSpell_Panel**>(&m_pSpell_Panel))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -240,91 +240,91 @@ HRESULT CSpell_Panel::Ready_Components(void* pArg)
|
||||
|
||||
HRESULT CSpell_Panel::Ready_Element(void* pArg)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CCurrent_Spell_Slot>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CCurrent_Spell_Slot**>(&m_pCurrent_Spell_Slot))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CCurrent_Spell_Slot>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CCurrent_Spell_Slot**>(&m_pCurrent_Spell_Slot))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Current_Spell_Slot"), m_pCurrent_Spell_Slot);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_List>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_List**>(&m_pSpell_List))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_List>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_List**>(&m_pSpell_List))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Spell_List"), m_pSpell_List);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CEessential_Spell_Slot>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CEessential_Spell_Slot**>(&m_pEessential_Spell_Slot))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CEessential_Spell_Slot>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CEessential_Spell_Slot**>(&m_pEessential_Spell_Slot))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Eessential_Spell_Slot"), m_pEessential_Spell_Slot);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CEessential_Spell>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CEessential_Spell**>(&m_pEessential_Spell))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CEessential_Spell>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CEessential_Spell**>(&m_pEessential_Spell))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Eessential_Spell"), m_pEessential_Spell);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_List_Image>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_List_Image**>(&m_pSpell_List_Image))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_List_Image>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_List_Image**>(&m_pSpell_List_Image))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Spell_List_Image"), m_pSpell_List_Image);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_State>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_State**>(&m_pSpell_State))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_State>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_State**>(&m_pSpell_State))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Spell_State"), m_pSpell_State);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Hover>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Hover**>(&m_pSpell_Hover))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Hover>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Hover**>(&m_pSpell_Hover))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Spell_Hover"), m_pSpell_Hover);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Hover_Effect>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Hover_Effect**>(&m_pSpell_Hover_Effect))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Hover_Effect>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Hover_Effect**>(&m_pSpell_Hover_Effect))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Spell_Hover_Effect"), m_pSpell_Hover_Effect);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Preview>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Preview**>(&m_pSpell_Preview))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Preview>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Preview**>(&m_pSpell_Preview))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Spell_Preview"), m_pSpell_Preview);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Vidio_Border>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Vidio_Border**>(&m_pSpell_Vidio_Border))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Vidio_Border>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Vidio_Border**>(&m_pSpell_Vidio_Border))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Spell_Vidio_Border"), m_pSpell_Vidio_Border);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CCurrent_Slot_Number>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CCurrent_Slot_Number**>(&m_pCurrent_Slot_Number))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CCurrent_Slot_Number>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CCurrent_Slot_Number**>(&m_pCurrent_Slot_Number))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Current_Slot_Number"), m_pCurrent_Slot_Number);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Header>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Header**>(&m_pSpell_Header))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Header>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Header**>(&m_pSpell_Header))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Spell_Header"), m_pSpell_Header);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Header_Line>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Header_Line**>(&m_pSpell_Header_Line))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Header_Line>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Header_Line**>(&m_pSpell_Header_Line))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Spell_Header_Line"), m_pSpell_Header_Line);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Anim>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Anim**>(&m_pSpell_Anim))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Anim>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Anim**>(&m_pSpell_Anim))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Spell_Anim"), m_pSpell_Anim);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Drag>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Drag**>(&m_pSpell_Drag))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Drag>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Drag**>(&m_pSpell_Drag))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -354,9 +354,6 @@ HRESULT CTrailObject::Render()
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(m_TrailInfo.eShaderPass))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Bind_DepthStencil(m_pShaderCom, "g_DepthStencilTexture")))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pTrailCom->Render()))
|
||||
return E_FAIL;
|
||||
|
||||
@@ -381,8 +378,6 @@ HRESULT CTrailObject::Render_Blur()
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_POSTEX::TRAIL_BLUR))))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
|
||||
if (FAILED(m_pTrailCom->Render()))
|
||||
return E_FAIL;
|
||||
|
||||
@@ -473,6 +468,15 @@ HRESULT CTrailObject::Bind_ShaderResources()
|
||||
if (FAILED(m_pTrailCom->Bind_Resources()))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Depth"), m_pShaderCom, "g_DepthTexture"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -126,21 +126,37 @@ void CTroll_Rock::RockHit()
|
||||
tagCollInfo.pObject = pUserData->pOwner;
|
||||
tagCollInfo.eHitType = ENUM_CLASS(HIT_TYPE::HIT_HEAVY);
|
||||
tagCollInfo.fDamage = 10.f;
|
||||
switch (PXOBJECT(pUserData->iSubKind))
|
||||
switch (pUserData->eKind)
|
||||
{
|
||||
case Engine::PXOBJECT::PLAYER:
|
||||
{
|
||||
if (false == m_bVisible) {
|
||||
break;
|
||||
case PHYSX_KIND::BODY_DYNAMIC:
|
||||
switch (PXOBJECT(pUserData->iSubKind))
|
||||
{
|
||||
case PXOBJECT::SKILL_PROTEGO:
|
||||
{
|
||||
if (false == m_bVisible) {
|
||||
break;
|
||||
}
|
||||
m_bVisible = false;
|
||||
pUserData->pOwner->OnCollision(this, &tagCollInfo);
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case PHYSX_KIND::CCTActor:
|
||||
{
|
||||
switch (PXOBJECT(pUserData->iSubKind))
|
||||
{
|
||||
case Engine::PXOBJECT::PLAYER:
|
||||
{
|
||||
if (false == m_bVisible) {
|
||||
break;
|
||||
}
|
||||
m_bVisible = false;
|
||||
pUserData->pOwner->OnCollision(this, &tagCollInfo);
|
||||
}
|
||||
break;
|
||||
}
|
||||
m_bVisible = false;
|
||||
pUserData->pOwner->OnCollision(this, &tagCollInfo);
|
||||
}
|
||||
break;
|
||||
case Engine::PXOBJECT::ALLY_HITBOX:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,8 +117,14 @@ HRESULT CTroll::Behavior_IdleBreakExitCheck()
|
||||
if (m_fTargetDistance >= 6.f)
|
||||
{
|
||||
if (m_pModelCom->IsFinishedAnim()) {
|
||||
m_pFSM->Change_State(FSMSTATE::MOVE);
|
||||
return E_FAIL;
|
||||
if (m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::RUSH)] == 0.f) {
|
||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||
return E_FAIL;
|
||||
}
|
||||
else {
|
||||
m_pFSM->Change_State(FSMSTATE::MOVE);
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -143,7 +149,7 @@ void CTroll::Behavior_MoveEnter()
|
||||
|
||||
m_pFSM->Enable_State(FSMSTATE::JOG);
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_START];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second,1.f,false,1.2f);
|
||||
|
||||
}
|
||||
|
||||
@@ -161,13 +167,20 @@ HRESULT CTroll::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
if (fRatio >= 0.9f)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, false, 1.2f);
|
||||
}
|
||||
}
|
||||
|
||||
if (m_fTargetDistance <= 18.f && m_fTargetDistance >= 14.f) {
|
||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||
return E_FAIL;
|
||||
if (m_fTargetDistance <= 6.f) {
|
||||
|
||||
for (_uint i = 0; i < ENUM_CLASS(TROLL_SKILL::END); i++)
|
||||
{
|
||||
if (m_fSkillCoolTime[i] == 0.f)
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -179,7 +192,7 @@ HRESULT CTroll::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
{
|
||||
m_bLookAt = true;
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, false, 1.2f);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
@@ -207,13 +220,13 @@ HRESULT CTroll::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
_float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio();
|
||||
if (fRatio >= 0.9f) {
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, false, 1.2f);
|
||||
}
|
||||
}
|
||||
else if (iCurrAnimIndex != m_Animation[STATEANIM::JOG_FWD].first)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_START];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, false, 1.2f);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
@@ -520,7 +533,7 @@ void CTroll::Behavior_SlamEnter()
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::TROLL_ATTACK, this);
|
||||
}, 0.3f);
|
||||
|
||||
Set_Easing(pairAnimInfo.first, 0.1f, 0.42f, 1.8f);
|
||||
Set_Easing(pairAnimInfo.first, 0.2f, 0.42f, 1.5f);
|
||||
|
||||
Set_Easing(pairAnimInfo.first, 0.42f, 0.45f, 0.5f);
|
||||
|
||||
@@ -641,15 +654,19 @@ void CTroll::Behavior_HitEnter()
|
||||
{
|
||||
m_pFSM->Enable_State(FSMSTATE::HIT);
|
||||
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||
_float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio();
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
|
||||
m_bLookAt = false;
|
||||
if (iCurrAnimIndex == m_Animation[STATEANIM::SLAM].first)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::HIT_FACE];
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {CameraShake(10.f, 2.f, 3.f, 0.3f); },
|
||||
0.1f);
|
||||
if (fRatio <= 0.75f) {
|
||||
pairAnimInfo = m_Animation[STATEANIM::HIT_FACE];
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {CameraShake(10.f, 2.f, 3.f, 0.3f); },
|
||||
0.1f);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
}
|
||||
else {
|
||||
_int RandIndex = m_pGameInstance->Real_Random_Int(0, 2);
|
||||
@@ -665,8 +682,9 @@ void CTroll::Behavior_HitEnter()
|
||||
pairAnimInfo = m_Animation[STATEANIM::HIT_BWD3];
|
||||
break;
|
||||
}
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
|
||||
}
|
||||
|
||||
HRESULT CTroll::Behavior_HitExitCheck()
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "Dialogue_Font.h"
|
||||
#include "SpellLearn_Canvas.h"
|
||||
#include "Interaction_Key.h"
|
||||
#include "NPCInteraction.h"
|
||||
#include "Broom_TargetGate.h"
|
||||
|
||||
CUI_Manager::CUI_Manager(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
@@ -57,6 +58,7 @@ HRESULT CUI_Manager::Initialize(void* pArg)
|
||||
m_fSortZ = 0.f;
|
||||
m_pInfoInstance->Set_UISTATE(m_eType);
|
||||
m_pInfoInstance->Add_Event(TEXT("Canvas_Change"), [this](void* p) {this->Canvas_Change(*reinterpret_cast<UI_STATE*>(p)); });
|
||||
m_pInfoInstance->Add_Event(TEXT("NpcInteract"), [this](void* p) {this->NpcInteract(*reinterpret_cast<_bool*>(p)); });
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -73,6 +75,10 @@ void CUI_Manager::Canvas_Change(UI_STATE eType)
|
||||
static_cast<CCanvasObject*>(m_pSpell_Canvas)->Visible(false);
|
||||
static_cast<CCanvasObject*>(m_pQuest_Canvas)->Visible(false);
|
||||
static_cast<CCanvasObject*>(m_pSpellLearn_Canvas)->Visible(false);
|
||||
static_cast<CGameObject*>(m_pInteraction_Key)->Set_Visible(true);
|
||||
static_cast<CGameObject*>(m_pNPCInteraction)->Set_Visible(true);
|
||||
static_cast<CGameObject*>(m_pBroom_TargetGate)->Set_Visible(true);
|
||||
static_cast<CGameObject*>(m_pDamage_Font)->Set_Visible(true);
|
||||
break;
|
||||
|
||||
case UI_STATE::SPELL:
|
||||
@@ -99,6 +105,19 @@ void CUI_Manager::Canvas_Change(UI_STATE eType)
|
||||
static_cast<CCanvasObject*>(m_pGamePlay_Canves)->Visible(false);
|
||||
break;
|
||||
|
||||
case UI_STATE::NPC_INTERACT:
|
||||
m_pMouse_Cursor->Set_Visible(false);
|
||||
m_pCamera_LockOn->Set_Visible(false);
|
||||
static_cast<CCanvasObject*>(m_pGamePlay_Canves)->Visible(false);
|
||||
static_cast<CCanvasObject*>(m_pSpell_Canvas)->Visible(false);
|
||||
static_cast<CCanvasObject*>(m_pQuest_Canvas)->Visible(false);
|
||||
static_cast<CCanvasObject*>(m_pSpellLearn_Canvas)->Visible(false);
|
||||
static_cast<CGameObject*>(m_pInteraction_Key)->Set_Visible(false);
|
||||
static_cast<CGameObject*>(m_pNPCInteraction)->Set_Visible(false);
|
||||
static_cast<CGameObject*>(m_pBroom_TargetGate)->Set_Visible(false);
|
||||
static_cast<CGameObject*>(m_pDamage_Font)->Set_Visible(false);
|
||||
break;
|
||||
|
||||
default:
|
||||
return;
|
||||
}
|
||||
@@ -151,6 +170,7 @@ void CUI_Manager::Update(_float fTimeDelta)
|
||||
if (m_bActive == false)
|
||||
{
|
||||
m_bActive = true;
|
||||
m_bAlphaZero = true;
|
||||
if (m_eType == UI_STATE::GAMEPLAYER)
|
||||
{
|
||||
m_eType = UI_STATE::QUEST;
|
||||
@@ -163,6 +183,7 @@ void CUI_Manager::Update(_float fTimeDelta)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (m_eType == UI_STATE::GAMEPLAYER || m_eType == UI_STATE::SPELLLNEARN)
|
||||
{
|
||||
if (m_pGameInstance->Key_Down(DIK_ESCAPE))
|
||||
@@ -170,6 +191,7 @@ void CUI_Manager::Update(_float fTimeDelta)
|
||||
if (m_bActive == false)
|
||||
{
|
||||
m_bActive = true;
|
||||
m_bAlphaZero = true;
|
||||
if (m_eType == UI_STATE::GAMEPLAYER)
|
||||
{
|
||||
m_eType = UI_STATE::SPELLLNEARN;
|
||||
@@ -182,6 +204,27 @@ void CUI_Manager::Update(_float fTimeDelta)
|
||||
}
|
||||
}
|
||||
|
||||
if (m_eType == UI_STATE::GAMEPLAYER && m_bNPCInteract == true)
|
||||
{
|
||||
if (m_eType == UI_STATE::GAMEPLAYER)
|
||||
{
|
||||
Canvas_Change(UI_STATE::NPC_INTERACT);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
if (m_bActive == false)
|
||||
{
|
||||
m_bActive = true;
|
||||
m_bAlphaZero = true;
|
||||
if (m_eType == UI_STATE::GAMEPLAYER)
|
||||
{
|
||||
m_eType = UI_STATE::NPC_INTERACT;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bActive == true && m_bHover == false)
|
||||
{
|
||||
if (m_fAlpha <= 1.f)
|
||||
@@ -189,8 +232,9 @@ void CUI_Manager::Update(_float fTimeDelta)
|
||||
m_fAlpha += fTimeDelta * m_fAlphaTime;
|
||||
}
|
||||
|
||||
if (m_fAlpha > 1.f)
|
||||
if (m_fAlpha > 1.f && m_bAlphaZero == true)
|
||||
{
|
||||
m_bAlphaZero = false;
|
||||
m_fAlpha = 1.f;
|
||||
m_bFadeIn = true;
|
||||
Canvas_Change(m_eType);
|
||||
@@ -321,6 +365,11 @@ HRESULT CUI_Manager::Ready_Components(void* pArg)
|
||||
}
|
||||
Add_Canvas(TEXT("Quest_Canvas"), m_pQuest_Canvas);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpellLearn_Canvas>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CSpellLearn_Canvas**>(&m_pSpellLearn_Canvas)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Canvas(TEXT("SpellLearn_Canvas"), m_pSpellLearn_Canvas);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMouse_Cursor>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CMouse_Cursor**>(&m_pMouse_Cursor)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -346,12 +395,12 @@ HRESULT CUI_Manager::Ready_Components(void* pArg)
|
||||
}
|
||||
Add_Canvas(TEXT("Interaction_Key"), m_pInteraction_Key);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpellLearn_Canvas>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CSpellLearn_Canvas**>(&m_pSpellLearn_Canvas)))) {
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CNPCInteraction>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CNPCInteraction**>(&m_pNPCInteraction)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Canvas(TEXT("SpellLearn_Canvas"), m_pSpellLearn_Canvas);
|
||||
Add_Canvas(TEXT("NPCInteraction"), m_pNPCInteraction);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroom_TargetGate>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CBroom_TargetGate**>(&m_pBroom_TargetGate))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroom_TargetGate>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast <CBroom_TargetGate**>(&m_pBroom_TargetGate))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -387,6 +436,11 @@ CGameObject* CUI_Manager::Find_Canvas(const _wstring& Name)
|
||||
return iter->second;
|
||||
}
|
||||
|
||||
void CUI_Manager::NpcInteract(_bool bInteract)
|
||||
{
|
||||
m_bNPCInteract = bInteract;
|
||||
}
|
||||
|
||||
CUI_Manager* CUI_Manager::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CUI_Manager* pInstance = new CUI_Manager(pDevice, pContext);
|
||||
|
||||
@@ -74,6 +74,7 @@ class CAction_Panel final : public CPanelObject
|
||||
CGameObject* m_pMagic_Item = { nullptr };
|
||||
|
||||
vector<CGameObject*> m_Magic_Meters;
|
||||
//vector<CGameObject*> m_pSlot;
|
||||
|
||||
public:
|
||||
static CAction_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
@@ -39,6 +39,8 @@ class CBroom final : public CUnit
|
||||
void Set_AISpeed(_float speedMul, _float accelMul);
|
||||
void Set_Move(_bool bMove) { m_bMove = bMove; }
|
||||
_bool Get_Move() { return m_bMove; }
|
||||
void Add_TurboBoost(_float fAmount) { m_fTurboBoost += fAmount; }
|
||||
_float Get_TurboBoost() { return m_fTurboBoost; }
|
||||
HRESULT Ready_Child();
|
||||
|
||||
private:
|
||||
@@ -64,6 +66,8 @@ class CBroom final : public CUnit
|
||||
_float m_fDecel = 1.f;
|
||||
_float m_fTurnDecel = 0.3f;
|
||||
_float m_fVerticalSpeed = 0.f;
|
||||
_float m_fTurboBoost = {5.f};
|
||||
_float m_fTurboBoostChargeDelay = {};
|
||||
|
||||
_float m_fFlyAccel = 1.f;
|
||||
_float m_fFlyDecel = 1.f;
|
||||
@@ -72,6 +76,9 @@ class CBroom final : public CUnit
|
||||
_float m_fTurboDecel = 0.6f;
|
||||
|
||||
_bool m_bMove = { true };
|
||||
|
||||
|
||||
_int m_iIndex = {};
|
||||
|
||||
#pragma region AI
|
||||
_float m_fAISpeedMul = 1.f;
|
||||
@@ -96,7 +103,7 @@ class CBroom final : public CUnit
|
||||
HRESULT Bind_ShaderResources();
|
||||
|
||||
void Update_CameraCoordinateSystem();
|
||||
void PlayerInput();
|
||||
void PlayerInput(_float fTimeDelta);
|
||||
|
||||
public:
|
||||
static CBroom* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
@@ -7,6 +7,12 @@ NS_BEGIN(Client)
|
||||
|
||||
class CBroomRacerAI final : public CUnit
|
||||
{
|
||||
public:
|
||||
struct RacerDesc
|
||||
{
|
||||
class CBroomRaceManager* pRacerManager = {nullptr};
|
||||
_int iIndex = { 0 };
|
||||
};
|
||||
enum MESH_ORDER {
|
||||
HEAD_EYE_OCC,
|
||||
HEAD_FACE,
|
||||
@@ -101,7 +107,8 @@ class CBroomRacerAI final : public CUnit
|
||||
_float m_LaneOffsetX = 0.f;
|
||||
_float m_LaneOffsetY = 0.f;
|
||||
_float m_TurnGain = 1.f;
|
||||
_float m_HeightGain =1.f;
|
||||
_float m_HeightGain = 1.f;
|
||||
_int m_iIndex = {};
|
||||
|
||||
void Behavior_Broom_Ride_MoveEnter();
|
||||
HRESULT Behavior_Broom_Ride_MoveExitCheck(_float fTimeDelta);
|
||||
|
||||
@@ -7,6 +7,9 @@ NS_BEGIN(Client)
|
||||
|
||||
class CCamPosition_Shoulder final : public CCamPosition
|
||||
{
|
||||
enum class CAMERARIG_ROOT {
|
||||
|
||||
};
|
||||
public:
|
||||
typedef struct tagCameraShoulder_Desc : public CCamPosition::CAMERAPOSITION_DESC
|
||||
{
|
||||
@@ -25,7 +28,7 @@ class CCamPosition_Shoulder final : public CCamPosition
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
_vector Get_ShoulderGlobalPos();
|
||||
void Set_CameraShake(_float fXShock, _float fYShock);
|
||||
|
||||
void Set_CameraAnim(_uint iIndex);
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
@@ -33,6 +36,8 @@ class CCamPosition_Shoulder final : public CCamPosition
|
||||
HRESULT Ready_SubParts();
|
||||
_vector Calc_LookTargetPos();
|
||||
_vector Calc_FollowTargetPos(_fvector vLookTargetWorldPos);
|
||||
_vector Calc_AnimFollowTargetPos(_fvector vGreedPos);
|
||||
_vector Calc_BestPosition(_fvector vCastingPosition, _gvector vCastingDirection, _float fGreedDistance);
|
||||
_vector Calc_DampingParentPos();
|
||||
|
||||
#pragma region Base
|
||||
@@ -46,6 +51,7 @@ class CCamPosition_Shoulder final : public CCamPosition
|
||||
_float2 m_vAccRotDegrees = { 0.f, 0.f };
|
||||
_float2 m_vAccRealDegrees = { 0.f, 0.f };
|
||||
_float3 m_vShoulderLocalPos = { 1.f, 2.f, 2.f };
|
||||
_bool m_bPlayAnim = { false };
|
||||
#pragma endregion
|
||||
#pragma region Lerp
|
||||
_bool m_bStartGame = { true };
|
||||
@@ -76,11 +82,14 @@ class CCamPosition_Shoulder final : public CCamPosition
|
||||
_bool m_bMovable = { true };
|
||||
|
||||
const _float4* m_pParentPos = { nullptr };
|
||||
const _float4x4* m_pFollowAnimMatrix = { nullptr };
|
||||
const _float4x4* m_pLookAtAnimMatrix = { nullptr };
|
||||
CTransform* m_pLookTransform = { nullptr };
|
||||
CTransform* m_pFollowTransform = { nullptr };
|
||||
CCamPosition_Target* m_pTarget_LookPart = { nullptr };
|
||||
CCamPosition_Target* m_pTarget_FollowPart = { nullptr };
|
||||
class CCamera_Gaze* m_pBinded_Camera = { nullptr };
|
||||
class CModel* m_pModelCom = { nullptr };
|
||||
|
||||
public:
|
||||
static CCamPosition_Shoulder* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
@@ -22,6 +22,7 @@ class CCamera_Gaze final : public CCamera
|
||||
void Update_LerpTimer(_float fTimeDelta);
|
||||
void Enable_FollowLerp();
|
||||
void Enable_LookLerp();
|
||||
void Sync_Follow(_bool bSink);
|
||||
void Toggle_Priority();
|
||||
void Toggle_AIPriority();
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
@@ -32,7 +33,7 @@ class CCamera_Gaze final : public CCamera
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
HRESULT Bind_ShaderResources() override;
|
||||
|
||||
_bool m_bSyncFollow = { false };
|
||||
private:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
|
||||
|
||||
@@ -10,6 +10,9 @@ class CCamera_Model final : public CCamera
|
||||
public:
|
||||
typedef struct tagCamera_Model : public CCamera::CAMERA_DESC
|
||||
{
|
||||
class CUnit* pUnitPtr = { nullptr };
|
||||
class CUnit* pFollowTarget = { nullptr };
|
||||
class CUnit* pLookTarget = { nullptr };
|
||||
}CAMERA_MODEL_DESC;
|
||||
private:
|
||||
CCamera_Model(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
@@ -23,11 +26,25 @@ class CCamera_Model final : public CCamera
|
||||
virtual HRESULT Render() override;
|
||||
|
||||
private:
|
||||
class CModel* m_pModelCom = { nullptr };
|
||||
class CShader* m_pShaderCom = { nullptr };
|
||||
class CUnit* m_pUnitPtr = { nullptr };
|
||||
class CModel* m_pModelCom = { nullptr };
|
||||
class CShader* m_pShaderCom = { nullptr };
|
||||
_bool m_bMovable = true;
|
||||
_float4x4 m_matInitial = {};
|
||||
const _float4x4* m_Ctrl1 = { nullptr };
|
||||
const _float4x4* m_Ctrl2 = { nullptr };
|
||||
const _float4x4* m_CtrlShake = { nullptr };
|
||||
const _float4x4* m_CtrlCam = { nullptr };
|
||||
const _float4x4* m_RootMatrix = { nullptr };
|
||||
const _float4x4* m_LookAtMatrix = { nullptr };
|
||||
const _float4x4* m_LookAtTargetMatrix = { nullptr };
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
unique_ptr<GeometricPrimitive> m_pSubShape = { nullptr };
|
||||
unique_ptr<BasicEffect> m_BasicEffect;
|
||||
unique_ptr<PrimitiveBatch<VertexPositionColor>> m_Batch;
|
||||
#endif // _DEBUG
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
@@ -7,11 +7,11 @@ namespace Client
|
||||
enum class MAPOBJECT_RENDER_TYPE { NORMAL, DECAL, GLASS };
|
||||
|
||||
enum class SHADER_PASS_ANIM { DEFAULT, SHADOW, CAPTURE, BLUR, HAIR, EYELASH, OUTLINE_WRITE, OUTLINE_READ,SPECTOR, END };
|
||||
enum class SHADER_PASS_MESH { DEFAULT, SHADOW, SKYBOX, ALPHABLEND, EFFECT_ALPHABLEND, EFFECT_BLEND, EFFECT_ALPHABLEND_CULL, EFFECT_BLEND_CULL, CAPTURE, BLUR, EFFECT_ALPHABLEND_UVMOVE, MAPTOOL, GLASS, OUTLINE_WRITE, OUTLINE_READ, BLOOM, WATER, LAND, NONMRO,SPECTOR_WEAPON, GLASS_CUBE, LEVIOSO, DECAL, END };
|
||||
enum class SHADER_PASS_MESH { DEFAULT, SHADOW, SKYBOX, ALPHABLEND, EFFECT_ALPHABLEND, EFFECT_BLEND, EFFECT_ALPHABLEND_CULL, EFFECT_BLEND_CULL, CAPTURE, BLUR, EFFECT_ALPHABLEND_UVMOVE, MAPTOOL, GLASS, OUTLINE_WRITE, OUTLINE_READ, BLOOM, WATER, LAND, NONMRO,SPECTOR_WEAPON, GLASS_CUBE, LEVIOSO, DECAL, WIREFRAME, END };
|
||||
enum class SHADER_PASS_NORTEX { DEFAULT, TERRAIN, ENV_TERRAIN_ANISO, SHADOW, END };
|
||||
enum class SHADER_PASS_PARTICLE { EXPLOSION, END };
|
||||
enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, TRAIL_BLEND, TRAILWB_FOR_BLEND, TRAIL_BLUR, TRAIL_BLOOM, END };
|
||||
enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, BLEND, BLEND_NOWORLD, BLOOM, BLOOM_NOWORLD, BLUR_NO_EMMISVE, BLUR_NO_WORLD_NO_EMISSIVE, WEIGHTBLEND_FOR_BLEND, DEPTH_STOP, WB_CULLING, SCREEN_FX, DISTORTION, NONPOS, NONPOS_BLUR , BLUR_MESH, BLUR_CULLING, BLUR_CULLING_NO_EMISSIVE, BLOOM_CULLING, DEFAULT_NONPOS, NONWB_NONPOS ,DECAL, DECAL_WB ,DECAL_BLUR , BLEND_CULLING,END};
|
||||
enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, TRAIL_BLEND, TRAILWB_FOR_BLEND, TRAIL_BLUR, TRAIL_BLOOM, TRAIL_WB, END };
|
||||
enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, BLEND, BLEND_NOWORLD, BLOOM, BLOOM_NOWORLD, BLUR_NO_EMMISVE, BLUR_NO_WORLD_NO_EMISSIVE, WEIGHTBLEND_FOR_BLEND, DEPTH_STOP, WB_CULLING, SCREEN_FX, DISTORTION, NONPOS, NONPOS_BLUR , BLUR_MESH, BLUR_CULLING, BLUR_CULLING_NO_EMISSIVE, BLOOM_CULLING, DEFAULT_NONPOS, NONWB_NONPOS ,DECAL, DECAL_WB ,DECAL_BLUR , BLEND_CULLING, DECAL_BLEND, END};
|
||||
enum class SHADER_PASS_UIEDITOR {
|
||||
DEFAULT, COLOR, LOGO, LOGO_TEXT, LOGO_GLOW, ALPHABLEND, CLAMP, CURSOR,
|
||||
LODING, HOLD_ROTATION, MISSION, QUESTTYPE, UVMULT, NINECLICE,
|
||||
@@ -36,7 +36,7 @@ namespace Client
|
||||
PLAYER_HAIR_DAOTHV_ToSRO, PLAYER_Suit_DSRON_ToSRO, PLAYER_EyeLash_DAOTHV_ToSRO, PLAYER_Eye_ToSRO, PLAYER_Robe_ToMRO, SHADOW, SHADOW_LEGACY
|
||||
, END
|
||||
};
|
||||
enum class UI_STATE { GAMEPLAYER, SPELL, QUEST, INVENTORY, SPELLLNEARN, END };
|
||||
enum class UI_STATE { GAMEPLAYER, SPELL, QUEST, INVENTORY, SPELLLNEARN, NPC_INTERACT, END };
|
||||
|
||||
enum class QUESTTYPE { MAIN, SUB, END };
|
||||
enum class QUESTSTATE {NONE, ACCEPTED, CLEARED, END };
|
||||
@@ -78,7 +78,8 @@ namespace Client
|
||||
|
||||
/*란록*/
|
||||
|
||||
RANROK_FIREBALL, RANROK_BREATH, RANROK_POINT, RANROK_PURSE, RANROK_CHARGE,
|
||||
RANROK_FIREBALL, RANROK_BREATH, RANROK_POINT, RANROK_PURSE, RANROK_CHARGE, RANROK_HIT , RANROK_IMPACT, RANROK_LAND, RANROK_RUSH_BOTTOM,
|
||||
RANROK_GROUNDPULSE,
|
||||
|
||||
END
|
||||
};
|
||||
@@ -90,8 +91,8 @@ namespace Client
|
||||
enum class KEYINPUT
|
||||
{
|
||||
INPUT_1 = 1, INPUT_2, INPUT_3, INPUT_4,
|
||||
INPUT_T, INPUT_G, INPUT_X, INPUT_Z, INPUT_ESPACE,
|
||||
INPUT_TAB,
|
||||
INPUT_T, INPUT_G, INPUT_X, INPUT_Z, INPUT_F,
|
||||
INPUT_ESPACE, INPUT_TAB,
|
||||
DIM_RBUTTON_UP, DIM_RBUTTON_DOWN,
|
||||
END
|
||||
};
|
||||
|
||||
@@ -55,8 +55,9 @@ namespace Client
|
||||
|
||||
typedef struct NpcDialogue
|
||||
{
|
||||
_wstring pNpcName;
|
||||
_int iNpcID{};
|
||||
vector<CURRENTDIALOGUEINFO> Info;
|
||||
unordered_map<_int, CURRENTDIALOGUEINFO> Info;
|
||||
}NPCDIALOGUEINFO;
|
||||
|
||||
typedef struct tagLockOnInfo {
|
||||
@@ -65,6 +66,15 @@ namespace Client
|
||||
class CMapElement_Chest* pChest = { nullptr };
|
||||
}LOCKON_INFO;
|
||||
|
||||
typedef struct tegNPCInteractionInfo
|
||||
{
|
||||
CGameObject* pOwner = { nullptr };
|
||||
_wstring pNPCName;
|
||||
_wstring pName;
|
||||
_float4 fNPCPosition{};
|
||||
_int iTextID{};
|
||||
}NPCINTERACTIONINFO;
|
||||
|
||||
typedef struct tagUnitInfo
|
||||
{
|
||||
_wstring pUnit_Name;
|
||||
@@ -258,7 +268,7 @@ namespace Client
|
||||
_bool isBlurDissolve = {};
|
||||
_bool isNomalMap = {};
|
||||
_bool isNoDissolveSmoothStep = {};
|
||||
_bool isPadding3 = {};
|
||||
_bool isNonSoftEffect = {};
|
||||
|
||||
_float2 vDissolveSmoothRange = { 0.1f , 0.1f };
|
||||
_float2 vPadding0 = {};
|
||||
|
||||
@@ -25,14 +25,14 @@ class CDialogue_Data final : public CBase
|
||||
HRESULT Load_SpellInfo(const _char* pFilePath);
|
||||
|
||||
public:
|
||||
const NPCDIALOGUEINFO& Get_Info(_uint DialogueID) const;
|
||||
const NPCDIALOGUEINFO& Get_Info(_wstring NpcName) const;
|
||||
|
||||
private:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
|
||||
_int m_iDialogue_Count{};
|
||||
vector<NPCDIALOGUEINFO> m_DialogueInfo;
|
||||
|
||||
map<_wstring, NPCDIALOGUEINFO> m_DialogueInfo;
|
||||
NPCDIALOGUEINFO Dummy{};
|
||||
private:
|
||||
HRESULT Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex);
|
||||
|
||||
|
||||
@@ -41,6 +41,10 @@ class CDialogue_Font final : public CGameObject
|
||||
public:
|
||||
void Add_Text(void* pArg);
|
||||
|
||||
private:
|
||||
void NpcInfo(void* pArg);
|
||||
void NpcInteract(_bool bInteract);
|
||||
|
||||
private:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
|
||||
@@ -49,6 +53,11 @@ class CDialogue_Font final : public CGameObject
|
||||
vector<class CDialogue*> m_DialoguInfo;
|
||||
deque<class CDialogue*> m_pCurrentDialogue;
|
||||
|
||||
_bool m_bNpcInteract = { false };
|
||||
_bool m_bCurrentInteract = { false };
|
||||
_wstring m_pNpcName;
|
||||
_int m_iTextID{};
|
||||
|
||||
public:
|
||||
static CDialogue_Font* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
|
||||
@@ -75,7 +75,7 @@ class CGoblin final : public CMonster
|
||||
virtual void Add_FSM();
|
||||
|
||||
_float m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::END)] = {};
|
||||
_float m_fMaxSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::END)] = { 5.f,2.f,15.f };
|
||||
_float m_fMaxSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::END)] = { 10.f,2.f,15.f };
|
||||
|
||||
_bool m_bStep = { true };
|
||||
_float m_fTpTime = {};
|
||||
|
||||
@@ -28,6 +28,7 @@ class CGoblin_Assassin final : public CMonster
|
||||
virtual HRESULT Render() override;
|
||||
virtual HRESULT Render_OutLine();
|
||||
virtual HRESULT Render_Shadow(SHADOW eType) override;
|
||||
HRESULT Render_MotionTrail(ID3D11ShaderResourceView* pSRV);
|
||||
virtual _vector Get_LockOnPos() override;
|
||||
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr)override;
|
||||
virtual void OnHit(CGameObject* pOther, CGameObject* pCaller = nullptr)override;
|
||||
@@ -74,7 +75,7 @@ class CGoblin_Assassin final : public CMonster
|
||||
virtual void Add_FSM();
|
||||
|
||||
_float m_fSkillCoolTime[ENUM_CLASS(GOBLIN_ASSASSIN_SKILL::END)] = {};
|
||||
_float m_fMaxSkillCoolTime[ENUM_CLASS(GOBLIN_ASSASSIN_SKILL::END)] = { 8.f,15.f };
|
||||
_float m_fMaxSkillCoolTime[ENUM_CLASS(GOBLIN_ASSASSIN_SKILL::END)] = { 10.f,15.f };
|
||||
|
||||
_bool m_bStep = { true };
|
||||
_float m_fTpTime = {};
|
||||
@@ -95,7 +96,7 @@ class CGoblin_Assassin final : public CMonster
|
||||
_float m_fMoveDecisionLimit = 1.2f;
|
||||
|
||||
_float4 m_vDashDir = {};
|
||||
|
||||
_float2 m_vCaptureTimer = { 0.f, 0.1f };
|
||||
|
||||
void Behavior_IdleEnter();
|
||||
HRESULT Behavior_IdleExitCheck();
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "Unit.h"
|
||||
#include "Player_ENUM.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CHuman_Duelist final : public CUnit
|
||||
{
|
||||
public:
|
||||
typedef struct tagPlayerInitDesc {
|
||||
_float4 vPos;
|
||||
_float4 vRotQ;
|
||||
}PLAYERDESC;
|
||||
private:
|
||||
CHuman_Duelist(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CHuman_Duelist(const CHuman_Duelist& Prototype);
|
||||
virtual ~CHuman_Duelist() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
virtual HRESULT Render_Shadow(SHADOW eType) override;
|
||||
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr)override;
|
||||
virtual void OnHit(CGameObject* pOther, CGameObject* pCaller = nullptr)override;
|
||||
void Set_SpellHit(_bool bHit) { m_bSpellHit = bHit; }
|
||||
void Set_Shield(_bool bShield) { m_bShield = bShield; }
|
||||
_matrix Get_WandPos();
|
||||
private:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
|
||||
CCharacter_Controller* m_pCharacter_Controller = { nullptr };
|
||||
CRigidBody_Dynamic* m_pRigidBody = { nullptr };
|
||||
class CCallBack_Playable_Behavior* m_pCallBack_Behavior = { nullptr };
|
||||
class CCallBack_Playable_HitReport* m_pCallBack_HitReport = { nullptr };
|
||||
CLight* m_pLightCom = { nullptr };
|
||||
LIGHT_DESC LightDesc = {};
|
||||
|
||||
CStat* m_pStat = { nullptr };
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
HRESULT Ready_Components();
|
||||
HRESULT Ready_Parts();
|
||||
HRESULT Bind_ShaderResources();
|
||||
HRESULT Bind_ShaderParameters(_uint iMeshOrder);
|
||||
void SetGravity();
|
||||
void Add_SpellEvent(_uint AnimIndex, _float fRatio);
|
||||
|
||||
|
||||
public:
|
||||
static CHuman_Duelist* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr) override;
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
virtual void Describe_Entity() override;
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
#pragma region STATE
|
||||
|
||||
private:
|
||||
|
||||
virtual void Add_FSM();
|
||||
|
||||
_bool m_bLookAt = { false };
|
||||
_bool m_bSpellHit = {};
|
||||
_bool m_bShield = { false };
|
||||
_float m_fCross = 0.f;
|
||||
_float m_fabsDir = 0.f;
|
||||
|
||||
void Behavior_IdleEnter();
|
||||
HRESULT Behavior_IdleExitCheck(_float fTimeDelta);
|
||||
void Behavior_IdleExit();
|
||||
|
||||
void Behavior_CombatEnter();
|
||||
HRESULT Behavior_CombatExitCheck();
|
||||
void Behavior_CombatExit();
|
||||
|
||||
void Behavior_LightAttackEnter();
|
||||
HRESULT Behavior_LightAttackExitCheck(_float fTimeDelta);
|
||||
void Behavior_LightAttackExit();
|
||||
|
||||
void Behavior_SpellEnter();
|
||||
HRESULT Behavior_SpellExitCheck();
|
||||
void Behavior_SpellExit();
|
||||
|
||||
void Behavior_ShieldEnter();
|
||||
HRESULT Behavior_ShieldExitCheck();
|
||||
void Behavior_ShieldExit();
|
||||
|
||||
void Behavior_HitEnter();
|
||||
HRESULT Behavior_HitExitCheck();
|
||||
void Behavior_HitExit();
|
||||
|
||||
#pragma endregion
|
||||
|
||||
private:
|
||||
class CEffectPool* m_pEffectPool = nullptr;
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -46,6 +46,7 @@ DECLARE_SINGLETON(CInfoInstance)
|
||||
HRESULT Deregist_ActiveMonster(class CMonster* pUnit);
|
||||
|
||||
void Get_LockOnInfo(LOCKON_INFO& Info);
|
||||
void Set_SearchLockOnFlag(_bool bLockOn);
|
||||
pair<CUnit*, CTransform*> Get_NearestPlayerAlly(_fvector vPos);
|
||||
class CMonster* Get_TargetMonster();
|
||||
#pragma endregion
|
||||
@@ -86,7 +87,8 @@ DECLARE_SINGLETON(CInfoInstance)
|
||||
_int Get_SpellLearnIndex();
|
||||
#pragma endregion
|
||||
#pragma region Dialogue_Font
|
||||
void Set_Font(void* pArg);
|
||||
//void Set_Font(void* pArg);
|
||||
const NPCDIALOGUEINFO& Get_Dialogue(_wstring NpcName) const;
|
||||
#pragma endregion
|
||||
HRESULT Regist_ActiveInteractive(class CMapElement_Interactable* pInteractive);
|
||||
HRESULT Deregist_ActiveInteractive(class CMapElement_Interactable* pInteractive);
|
||||
@@ -96,6 +98,8 @@ DECLARE_SINGLETON(CInfoInstance)
|
||||
#pragma region BroomManager
|
||||
void Set_Broom_Timer(_float fTimer);
|
||||
_float Get_Broom_Timer();
|
||||
void Set_Broom_Booster_Timer(_float fTimer);
|
||||
_float Get_Broom_Booster_Timer();
|
||||
#pragma endregion
|
||||
private:
|
||||
CGameInstance* m_pGameInstance = { nullptr };
|
||||
@@ -111,6 +115,7 @@ DECLARE_SINGLETON(CInfoInstance)
|
||||
class CDamage_Font* m_pDamage_Font = { nullptr };
|
||||
class CSpellLearn_Data* m_pSpellLearn_Data = { nullptr };
|
||||
class CDialogue_Font* m_pDialogue_Font = { nullptr };
|
||||
class CDialogue_Data* m_pDialogue_Data = { nullptr };
|
||||
|
||||
_vector m_pPlayerPos{};
|
||||
|
||||
@@ -118,6 +123,8 @@ DECLARE_SINGLETON(CInfoInstance)
|
||||
_int m_eSpell = ENUM_CLASS(SKILL_TYPE::END);
|
||||
|
||||
_float m_fBroom_Timer{};
|
||||
_float m_fBroom_Booster{};
|
||||
_bool m_bSearchLockOnTarget = { true };
|
||||
|
||||
_float m_fDamage{};
|
||||
UI_STATE m_eUI_State = { UI_STATE::END };
|
||||
|
||||
@@ -17,7 +17,6 @@ class CNPCInteraction final : public CGameObject
|
||||
virtual void Update(_float fTimeDelta);
|
||||
virtual void Late_Update(_float fTimeDelta);
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
|
||||
private:
|
||||
@@ -29,17 +28,21 @@ class CNPCInteraction final : public CGameObject
|
||||
private:
|
||||
_float4 ComputeUV(_tchar Alphabat);
|
||||
void Set_ImageSizePosition();
|
||||
|
||||
void ActiveOff();
|
||||
public:
|
||||
void NpcInfo(_wstring Name);
|
||||
void NpcInfo(void* pArg);
|
||||
|
||||
private:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom1 = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom2 = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
class CUnit* m_pUnit = { nullptr };
|
||||
|
||||
_float4 m_vFontPosition{};
|
||||
_float4 m_vFontPosition1{};
|
||||
|
||||
@@ -58,7 +61,9 @@ class CNPCInteraction final : public CGameObject
|
||||
_float2 m_fViewPort{};
|
||||
|
||||
_float m_fFontSize{};
|
||||
_bool m_bActive{};
|
||||
|
||||
NPCINTERACTIONINFO m_pInfo{};
|
||||
public:
|
||||
static CNPCInteraction* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
|
||||
@@ -26,7 +26,10 @@ class CNPC_EleazarFig final : public CUnit
|
||||
virtual void OnRayCollision(CGameObject* pCaster, _uint iCastedOrder, _float fDistance, _float3 vCastedWorldPos)override;
|
||||
protected:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
CCharacter_Controller* m_pCharacter_Controller = { nullptr };
|
||||
CRigidBody_Dynamic* m_pRigidBody = { nullptr };
|
||||
class CCallBack_NonPlayable_Behavior* m_pCallBack_Behavior = { nullptr };
|
||||
class CCallBack_NonPlayable_HitReport* m_pCallBack_HitReport = { nullptr };
|
||||
CUnit* m_pPlayerAllyUnit = { nullptr };
|
||||
|
||||
|
||||
|
||||
@@ -25,13 +25,23 @@ class CNPC_Ollivander final : public CUnit
|
||||
virtual HRESULT Render() override;
|
||||
virtual HRESULT Render_Shadow(SHADOW eType) override;
|
||||
virtual void OnRayCollision(CGameObject* pCaster, _uint iCastedOrder, _float fDistance, _float3 vCastedWorldPos)override;
|
||||
virtual _wstring Get_Name() override;
|
||||
virtual _wstring Get_NpcName() override;
|
||||
void Set_TextID(_int ID) { m_iNpc_DialogueTextID = ID; }
|
||||
virtual _int Get_TextID() override;
|
||||
|
||||
protected:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
CCharacter_Controller* m_pCharacter_Controller = { nullptr };
|
||||
CRigidBody_Dynamic* m_pRigidBody = { nullptr };
|
||||
class CCallBack_NonPlayable_Behavior* m_pCallBack_Behavior = { nullptr };
|
||||
class CCallBack_NonPlayable_HitReport* m_pCallBack_HitReport = { nullptr };
|
||||
CUnit* m_pPlayerAllyUnit = { nullptr };
|
||||
CNPC_Ollivander* m_pNPC_Ollivander = { nullptr };
|
||||
|
||||
class CNPCInteraction* m_pNPCInteraction = { nullptr };
|
||||
_int m_iNpc_DialogueTextID{};
|
||||
|
||||
|
||||
CNPCStat* m_pNpcStat = { nullptr };
|
||||
_int m_iEntered = { 0 };
|
||||
@@ -42,6 +52,7 @@ class CNPC_Ollivander final : public CUnit
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
HRESULT Ready_Components(void* pArg);
|
||||
HRESULT Bind_ShaderResources() override;
|
||||
HRESULT Bind_ShaderParameters(_uint iMeshOrder);
|
||||
|
||||
public:
|
||||
static CNPC_Ollivander* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
@@ -50,10 +50,14 @@ class CPlayer final : public CUnit
|
||||
class CMapElement_Interactable* m_pGrapInteractive = { nullptr };
|
||||
_float m_fDirectionRadian = 0.f;
|
||||
|
||||
CGameObject* m_pCurrentNpcInteraction = { nullptr };
|
||||
|
||||
_bool m_bSprintToggle = { false };
|
||||
_bool m_bWalkToggle = { false };
|
||||
_bool m_bCameraShake = { false };
|
||||
|
||||
_bool m_bNpcInteraction = { false };
|
||||
|
||||
_float3 m_vCameraLookDir = { 0.f, 0.f, 1.f, };
|
||||
_float3 m_vCameraRightDir = { 1.f, 0.f, 0.f };
|
||||
_float2 m_vGrapInteratableLerp = { 0.f, TIMER_SHORT_LERP };
|
||||
@@ -99,6 +103,7 @@ class CPlayer final : public CUnit
|
||||
void SetGravity();
|
||||
void Add_SpellEvent(_uint AnimIndex, _float fRatio);
|
||||
void Play_SpellHitAnim();
|
||||
void Player_PixRot();
|
||||
|
||||
void Update_CameraCoordinateSystem(_float fTimeDelta);
|
||||
#ifdef _DEBUG
|
||||
|
||||
@@ -40,8 +40,12 @@ class CPlayerRobe final : public CPartObject
|
||||
const _float4x4* m_pSocketMatrix = { nullptr };
|
||||
const _float4x4* m_pLeftFootLocalMatrix = { nullptr };
|
||||
const _float4x4* m_pLeftLegLocalMatrix = { nullptr };
|
||||
const _float4x4* m_pLeftLegUpLocalMatrix = { nullptr };
|
||||
const _float4x4* m_pRightFootLocalMatrix = { nullptr };
|
||||
const _float4x4* m_pRightLegLocalMatrix = { nullptr };
|
||||
const _float4x4* m_pRightLegUpLocalMatrix = { nullptr };
|
||||
const _float4x4* m_pLower0BoundMatrix = { nullptr };
|
||||
const _float4x4* m_pLower1BoundMatrix = { nullptr };
|
||||
const _float4x4* m_RobeJointAnchorMatrices[ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END)] = { nullptr };
|
||||
vector<_float4x4> m_ReconstructedJointAnchorMatirces = { };
|
||||
//_float4x4 m_ReconstructedJointAnchorMatirces[ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END)] = { };
|
||||
@@ -50,12 +54,17 @@ class CPlayerRobe final : public CPartObject
|
||||
_int m_iBoneNum = -1;
|
||||
CRigidBody_Dynamic* m_pRightLeg = { nullptr };
|
||||
CRigidBody_Dynamic* m_pLeftLeg = { nullptr };
|
||||
CRigidBody_Dynamic* m_pLeftThigh = { nullptr };
|
||||
CRigidBody_Dynamic* m_pRightThigh = { nullptr };
|
||||
CRigidBody_Dynamic* m_pLower0Bound = { nullptr };
|
||||
CRigidBody_Dynamic* m_pLower1Bound = { nullptr };
|
||||
CRigidBody_Dynamic* m_pRobeMainAnchor = { nullptr };
|
||||
CRigidBody_Dynamic* m_pRobeJointRoute[ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::END)] = { nullptr };
|
||||
|
||||
CRigidBody_Dynamic* m_pRobeVerticalJointRoute[ENUM_CLASS(PLAYER_ROUTE_VERTICAL_ORDER::END)] = { nullptr };
|
||||
CRigidBody_Dynamic* m_pRobeFixedJointRoute[ENUM_CLASS(PLAYER_ROUTE_HORIZONTAL_ORDER::END)] = { nullptr };
|
||||
CRigidBody_Dynamic* m_pRobeJointAnchor[ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END)] = { nullptr };
|
||||
PSX::PxD6Joint* m_pDynamicJoints[ENUM_CLASS(PLAYER_JOINT_ORDER::END)] = { nullptr };
|
||||
PSX::PxFixedJoint* m_pFixedJoints[ENUM_CLASS(PLAYER_JOINT_HORIZONTAL_ORDER::END)] = { nullptr };
|
||||
D6JOINTDESC m_JointDescriptions[ENUM_CLASS(PLAYER_JOINT_ORDER::END)] = { };
|
||||
|
||||
vector<_float4x4> m_PrevRobeBoneMatrices = { };
|
||||
@@ -65,6 +74,9 @@ class CPlayerRobe final : public CPartObject
|
||||
ID3D11DepthStencilState* m_pDepthStencilStateNone = { nullptr };
|
||||
_float4x4 m_LeftLegMatrix = {};
|
||||
_float4x4 m_RightLegMatrix = {};
|
||||
_float4x4 m_LeftThighMatrix = {};
|
||||
_float4x4 m_RightThighMatrix = {};
|
||||
_bool m_bRenderDebug = { true };
|
||||
#endif // _DEBUG
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
@@ -73,11 +85,11 @@ class CPlayerRobe final : public CPartObject
|
||||
HRESULT Bind_ShaderResources() { return S_OK; }
|
||||
|
||||
HRESULT Update_LegsPosition();
|
||||
HRESULT Helper_RouteJointGenerater(PHYSX_JOINT eType, CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC& Desc_Body, ROUTE_DESC& Desc_Route, _matrix* xmAnchorMatricesWorld);
|
||||
HRESULT Update_RobeJoints();
|
||||
HRESULT Helper_RouteJointGenerater(CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC& Desc_Body, ROUTE_DESC& Desc_Route, _matrix* xmAnchorMatricesWorld);
|
||||
#ifdef _DEBUG
|
||||
HRESULT Render_BonePhysX();
|
||||
HRESULT Render_Legs();
|
||||
HRESULT Render_Legs(_fmatrix LowerMatrix);
|
||||
#endif // _DEBUG
|
||||
public:
|
||||
static CPlayerRobe* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
@@ -23,44 +23,90 @@ enum class PLAYER_MESH_ORDER {
|
||||
END
|
||||
};
|
||||
|
||||
static const _char* PLAYER_JOINT_BONE_NAMES[12] = {
|
||||
static const _char* PLAYER_JOINT_BONE_NAMES[16] = {
|
||||
"RightUpLeg_Cloth"
|
||||
, "RightLeg_Cloth"
|
||||
, "RightDownLeg_Cloth"
|
||||
, "RightDownRightLeg_Cloth"
|
||||
|
||||
, "LeftUpLeg_Cloth"
|
||||
, "LeftLeg_Cloth"
|
||||
, "LeftDownLeg_Cloth"
|
||||
, "LeftDownLeftLeg_Cloth"
|
||||
|
||||
, "TailUp_Cloth"
|
||||
, "Tail_Cloth"
|
||||
, "TailLeftDown_Cloth"
|
||||
, "TailRightDown_Cloth"
|
||||
|
||||
, "RightSideUpLeg_Cloth"
|
||||
, "RightSideLeg_Cloth"
|
||||
, "RightDownSideLeg_Cloth"
|
||||
|
||||
, "LeftSideUpLeg_Cloth"
|
||||
, "LeftSideLeg_Cloth"
|
||||
, "LeftDownSideLeg_Cloth"
|
||||
};
|
||||
|
||||
enum class PLAYER_JOINT_BONE_ORDER {
|
||||
RIGHTUP
|
||||
, RIGHT
|
||||
, RIGHTDOWN
|
||||
, RIGHTDOWNRIGHT
|
||||
|
||||
, LEFTUP
|
||||
, LEFT
|
||||
, LEFTDOWN
|
||||
, LEFTDOWNLEFT
|
||||
|
||||
, TAILUP
|
||||
, TAIL
|
||||
, TAILLEFTDOWN
|
||||
, TAILRIGHTDOWN
|
||||
|
||||
, RIGHTSIDEUP
|
||||
, RIGHTSIDE
|
||||
, RIGHTDOWNSIDE
|
||||
|
||||
, LEFTSIDEUP
|
||||
, LEFTSIDE
|
||||
, LEFTDOWNSIDE
|
||||
|
||||
, END
|
||||
};
|
||||
|
||||
enum class PLAYER_JOINT_HORIZONTAL_ORDER {
|
||||
|
||||
#pragma region UP_HORIZONTAL
|
||||
UP_R_RS_START
|
||||
, UP_R_RS_END
|
||||
, UP_RS_T_START
|
||||
, UP_RS_T_END
|
||||
, UP_T_LS_START
|
||||
, UP_T_LS_END
|
||||
, UP_LS_L_START
|
||||
, UP_LS_L_END
|
||||
#pragma endregion
|
||||
#pragma region MIDDLE_HORIZONTAL
|
||||
, MIDDLE_R_RS_START
|
||||
, MIDDLE_R_RS_END
|
||||
, MIDDLE_RS_T_START
|
||||
, MIDDLE_RS_T_END
|
||||
, MIDDLE_T_LS_START
|
||||
, MIDDLE_T_LS_END
|
||||
, MIDDLE_LS_L_START
|
||||
, MIDDLE_LS_L_END
|
||||
#pragma endregion
|
||||
#pragma region DOWN_HORIZONTAL
|
||||
, DOWN_R_RS_START
|
||||
, DOWN_R_RS_END
|
||||
, DOWN_RS_T_START
|
||||
, DOWN_RS_T_END
|
||||
, DOWN_T_LS_START
|
||||
, DOWN_T_LS_END
|
||||
, DOWN_LS_L_START
|
||||
, DOWN_LS_L_END
|
||||
#pragma endregion
|
||||
, END
|
||||
};
|
||||
enum class PLAYER_JOINT_ORDER {
|
||||
#pragma region ORIGIN_TO_UP
|
||||
ORIGIN_TO_RUP_START
|
||||
, ORIGIN_TO_RUP_END
|
||||
|
||||
@@ -70,7 +116,13 @@ enum class PLAYER_JOINT_ORDER {
|
||||
, ORIGIN_TO_LUP_START
|
||||
, ORIGIN_TO_LUP_END
|
||||
|
||||
|
||||
, ORIGIN_TO_RSIDEUP_START
|
||||
, ORIGIN_TO_RSIDEUP_END
|
||||
|
||||
, ORIGIN_TO_LSIDEUP_START
|
||||
, ORIGIN_TO_LSIDEUP_END
|
||||
#pragma endregion
|
||||
#pragma region UP_TO_MIDDLE
|
||||
, RUP_TO_RMIDDLE_START
|
||||
, RUP_TO_RMIDDLE_END
|
||||
|
||||
@@ -80,44 +132,61 @@ enum class PLAYER_JOINT_ORDER {
|
||||
, LUP_TO_LMIDDLE_START
|
||||
, LUP_TO_LMIDDLE_END
|
||||
|
||||
, RSIDEUP_TO_RSIDE_START
|
||||
, RSIDEUP_TO_RSIDE_END
|
||||
|
||||
, LSIDEUP_TO_LSIDE_START
|
||||
, LSIDEUP_TO_LSIDE_END
|
||||
#pragma endregion
|
||||
#pragma region MIDDLE_TO_BOTTOM
|
||||
, RMIDDLE_TO_RR_START
|
||||
, RMIDDLE_TO_RR_END
|
||||
|
||||
, RMIDDLE_TO_R_START
|
||||
, RMIDDLE_TO_R_END
|
||||
|
||||
, TMIDDLE_TO_TR_START
|
||||
, TMIDDLE_TO_TR_END
|
||||
|
||||
, TMIDDLE_TO_TL_START
|
||||
, TMIDDLE_TO_TL_END
|
||||
|
||||
, LMIDDLE_TO_L_START
|
||||
, LMIDDLE_TO_L_END
|
||||
|
||||
, LMIDDLE_TO_LL_START
|
||||
, LMIDDLE_TO_LL_END
|
||||
|
||||
, RSIDE_TO_R_START
|
||||
, RSIDE_TO_R_END
|
||||
|
||||
, LSIDE_TO_L_START
|
||||
, LSIDE_TO_L_END
|
||||
#pragma endregion
|
||||
, END
|
||||
};
|
||||
|
||||
enum class PLAYER_JOINT_ROUTE_ORDER {
|
||||
enum class PLAYER_ROUTE_HORIZONTAL_ORDER {
|
||||
da,
|
||||
END
|
||||
};
|
||||
|
||||
enum class PLAYER_ROUTE_VERTICAL_ORDER {
|
||||
ORIGIN_TO_RUP
|
||||
, ORIGIN_TO_TUP
|
||||
, ORIGIN_TO_LUP
|
||||
, ORIGIN_TO_RSIDEUP
|
||||
, ORIGIN_TO_LSIDEUP
|
||||
|
||||
, RUP_TO_RMIDDLE
|
||||
, TUP_TO_TMIDDLE
|
||||
, LUP_TO_LMIDDLE
|
||||
|
||||
, RSIDEUP_TO_RSIDE
|
||||
, LSIDEUP_TO_LSIDE
|
||||
|
||||
, RMIDDLE_TO_RR
|
||||
, RMIDDLE_TO_R
|
||||
, TMIDDLE_TO_TR
|
||||
, TMIDDLE_TO_TL
|
||||
, LMIDDLE_TO_L
|
||||
, LMIDDLE_TO_LL
|
||||
|
||||
, RSIDE_TO_R
|
||||
, LSIDE_TO_L
|
||||
|
||||
, END
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "Unit.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CRandomNpc final : public CUnit
|
||||
{
|
||||
public:
|
||||
typedef struct tagNpcInitDesc {
|
||||
_float4 vPos;
|
||||
_float4 vRotQ;
|
||||
_int iIndex;
|
||||
}NPCDESC;
|
||||
protected:
|
||||
CRandomNpc(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CRandomNpc(const CRandomNpc& Prototype);
|
||||
virtual ~CRandomNpc() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
virtual HRESULT Render_Shadow(SHADOW eType) override;
|
||||
virtual void OnRayCollision(CGameObject* pCaster, _uint iCastedOrder, _float fDistance, _float3 vCastedWorldPos)override;
|
||||
|
||||
virtual _wstring Get_Name() override;
|
||||
protected:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
CCharacter_Controller* m_pCharacter_Controller = { nullptr };
|
||||
CRigidBody_Dynamic* m_pRigidBody = { nullptr };
|
||||
class CCallBack_NonPlayable_Behavior* m_pCallBack_Behavior = { nullptr };
|
||||
class CCallBack_NonPlayable_HitReport* m_pCallBack_HitReport = { nullptr };
|
||||
CUnit* m_pPlayerAllyUnit = { nullptr };
|
||||
CRandomNpc* m_pNPC_Ollivander = { nullptr };
|
||||
|
||||
/*class CNPCInteraction* m_pNPCInteraction = { nullptr };*/
|
||||
|
||||
CNPCStat* m_pNpcStat = { nullptr };
|
||||
_int m_iEntered = { 0 };
|
||||
_float2 m_vEnteringTimer = { 0.f, 1.f };
|
||||
_float m_fEncounterDistance = { 8.f };
|
||||
_int m_iIndex = {};
|
||||
protected:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
HRESULT Ready_Components(void* pArg);
|
||||
HRESULT Bind_ShaderResources() override;
|
||||
HRESULT Bind_ShaderParameters(_uint iMeshOrder);
|
||||
|
||||
public:
|
||||
static CRandomNpc* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr);
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
virtual void Describe_Entity() override;
|
||||
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -31,7 +31,7 @@ class CRanrok final : public CMonster
|
||||
BODY,
|
||||
END
|
||||
};
|
||||
|
||||
public:
|
||||
enum class RANROK_PHASE
|
||||
{
|
||||
PHASE_AIR,
|
||||
@@ -113,12 +113,28 @@ class CRanrok final : public CMonster
|
||||
_float m_fHeadAimWeight = {};
|
||||
_float m_fPrevHpRatio = {};
|
||||
_int m_iBreathRand = {};
|
||||
_bool m_bMotionTrail = {};
|
||||
|
||||
_float2 m_vCaptureTimer = { 0.f, 0.3f };
|
||||
_float2 m_vCaptureTimer = { 0.f, 0.1f };
|
||||
|
||||
class CEffect_Container* m_pRanrok_Point = { nullptr };
|
||||
_float m_fTuckedSpeed = { 90.f };
|
||||
|
||||
|
||||
class CEffectParts* m_pLeftSmoke = { nullptr };
|
||||
class CEffectParts* m_pRightSmoke = { nullptr };
|
||||
class CEffectParts* m_pBottomSmoke = { nullptr };
|
||||
|
||||
class CEffectParts* m_pRightPt = { nullptr };
|
||||
class CEffectParts* m_pLeftPt = { nullptr };
|
||||
|
||||
class CTrailObject* m_pRightEye_Trail = { nullptr };
|
||||
class CTrailObject* m_pLeftEye_Trail = { nullptr };
|
||||
|
||||
|
||||
const _float4x4* m_pLeftEye_BoneMat = { nullptr };
|
||||
const _float4x4* m_pRightEye_BoneMat = { nullptr };
|
||||
|
||||
void Behavior_IdleEnter();
|
||||
HRESULT Behavior_IdleExitCheck();
|
||||
void Behavior_IdleExit();
|
||||
|
||||
@@ -10,6 +10,13 @@ NS_BEGIN(Client)
|
||||
|
||||
class CRanrok_Breath final : public CEffect_Container
|
||||
{
|
||||
public:
|
||||
typedef struct tagBreathInfo
|
||||
{
|
||||
_float fTime;
|
||||
_int iPase;
|
||||
}BREATH_INFO;
|
||||
|
||||
private:
|
||||
CRanrok_Breath(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CRanrok_Breath(const CRanrok_Breath& rhs);
|
||||
@@ -38,6 +45,7 @@ class CRanrok_Breath final : public CEffect_Container
|
||||
class CEffectParts* m_pBreath_Black = { nullptr };
|
||||
class CEffectParts* m_pBreathSlog = { nullptr };
|
||||
class CEffectParts* m_pMouthFire = { nullptr };
|
||||
class CEffectParts* m_pLand_Decal = { nullptr };
|
||||
|
||||
_float3 m_vLook = {};
|
||||
_float m_fLinearSpeed = 0.8f;
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "Effect_Container.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CRanrok_GroundPulse final : public CEffect_Container
|
||||
{
|
||||
private:
|
||||
CRanrok_GroundPulse(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CRanrok_GroundPulse(const CRanrok_GroundPulse& rhs);
|
||||
virtual ~CRanrok_GroundPulse() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
|
||||
public:
|
||||
virtual HRESULT Pre_Setting(CGameObject* pObject, void* pArg = nullptr) override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
HRESULT Ready_Child();
|
||||
HRESULT Bind_ShaderResources() override;
|
||||
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
|
||||
private:
|
||||
_wstring m_wstrEffectName = {};
|
||||
|
||||
|
||||
_float3 m_vLook = {};
|
||||
_float m_fLinearSpeed = 0.8f;
|
||||
|
||||
_float4 m_vStartPos = { 0.f, 0.f, 0.f, 1.f };
|
||||
_float4 m_vTargetPos = { 0.f, 0.f, 10.f, 1.f };
|
||||
private:
|
||||
class CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
public:
|
||||
static CRanrok_GroundPulse* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual void Free() override;
|
||||
CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // DEBUG
|
||||
|
||||
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,58 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "Effect_Container.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CRanrok_Hit final : public CEffect_Container
|
||||
{
|
||||
private:
|
||||
CRanrok_Hit(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CRanrok_Hit(const CRanrok_Hit& rhs);
|
||||
virtual ~CRanrok_Hit() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
|
||||
public:
|
||||
virtual HRESULT Pre_Setting(CGameObject* pObject, void* pArg = nullptr) override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
HRESULT Ready_Child();
|
||||
HRESULT Bind_ShaderResources() override;
|
||||
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
|
||||
private:
|
||||
_wstring m_wstrEffectName = {};
|
||||
|
||||
class CEffectParts* m_pGooRod_0 = { nullptr };
|
||||
class CEffectParts* m_pSmoke = { nullptr };
|
||||
class CEffectParts* m_pSpread_PT = { nullptr };
|
||||
|
||||
_float3 m_vLook = {};
|
||||
_float m_fLinearSpeed = 0.8f;
|
||||
|
||||
_float4 m_vStartPos = { 0.f, 0.f, 0.f, 1.f };
|
||||
_float4 m_vTargetPos = { 0.f, 0.f, 10.f, 1.f };
|
||||
private:
|
||||
class CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
public:
|
||||
static CRanrok_Hit* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual void Free() override;
|
||||
CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // DEBUG
|
||||
|
||||
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,58 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "Effect_Container.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CRanrok_Impact final : public CEffect_Container
|
||||
{
|
||||
private:
|
||||
CRanrok_Impact(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CRanrok_Impact(const CRanrok_Impact& rhs);
|
||||
virtual ~CRanrok_Impact() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
|
||||
public:
|
||||
virtual HRESULT Pre_Setting(CGameObject* pObject, void* pArg = nullptr) override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
HRESULT Ready_Child();
|
||||
HRESULT Bind_ShaderResources() override;
|
||||
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
|
||||
private:
|
||||
_wstring m_wstrEffectName = {};
|
||||
|
||||
class CEffectParts* m_pGooRod_0 = { nullptr };
|
||||
class CEffectParts* m_pSmoke = { nullptr };
|
||||
class CEffectParts* m_pSpread_PT = { nullptr };
|
||||
|
||||
_float3 m_vLook = {};
|
||||
_float m_fLinearSpeed = 0.8f;
|
||||
|
||||
_float4 m_vStartPos = { 0.f, 0.f, 0.f, 1.f };
|
||||
_float4 m_vTargetPos = { 0.f, 0.f, 10.f, 1.f };
|
||||
private:
|
||||
class CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
public:
|
||||
static CRanrok_Impact* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual void Free() override;
|
||||
CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // DEBUG
|
||||
|
||||
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,58 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "Effect_Container.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CRanrok_Land final : public CEffect_Container
|
||||
{
|
||||
private:
|
||||
CRanrok_Land(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CRanrok_Land(const CRanrok_Land& rhs);
|
||||
virtual ~CRanrok_Land() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
|
||||
public:
|
||||
virtual HRESULT Pre_Setting(CGameObject* pObject, void* pArg = nullptr) override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
HRESULT Ready_Child();
|
||||
HRESULT Bind_ShaderResources() override;
|
||||
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
|
||||
private:
|
||||
_wstring m_wstrEffectName = {};
|
||||
|
||||
class CEffectParts* m_pGooRod_0 = { nullptr };
|
||||
class CEffectParts* m_pSmoke = { nullptr };
|
||||
class CEffectParts* m_pSpread_PT = { nullptr };
|
||||
|
||||
_float3 m_vLook = {};
|
||||
_float m_fLinearSpeed = 0.8f;
|
||||
|
||||
_float4 m_vStartPos = { 0.f, 0.f, 0.f, 1.f };
|
||||
_float4 m_vTargetPos = { 0.f, 0.f, 10.f, 1.f };
|
||||
private:
|
||||
class CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
public:
|
||||
static CRanrok_Land* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual void Free() override;
|
||||
CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // DEBUG
|
||||
|
||||
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,58 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "Effect_Container.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CRanrok_Rush_Bottom final : public CEffect_Container
|
||||
{
|
||||
private:
|
||||
CRanrok_Rush_Bottom(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CRanrok_Rush_Bottom(const CRanrok_Rush_Bottom& rhs);
|
||||
virtual ~CRanrok_Rush_Bottom() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
|
||||
public:
|
||||
virtual HRESULT Pre_Setting(CGameObject* pObject, void* pArg = nullptr) override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
HRESULT Ready_Child();
|
||||
HRESULT Bind_ShaderResources() override;
|
||||
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
|
||||
private:
|
||||
_wstring m_wstrEffectName = {};
|
||||
|
||||
class CEffectParts* m_pGooRod_0 = { nullptr };
|
||||
class CEffectParts* m_pSmoke = { nullptr };
|
||||
class CEffectParts* m_pSpread_PT = { nullptr };
|
||||
|
||||
_float3 m_vLook = {};
|
||||
_float m_fLinearSpeed = 0.8f;
|
||||
|
||||
_float4 m_vStartPos = { 0.f, 0.f, 0.f, 1.f };
|
||||
_float4 m_vTargetPos = { 0.f, 0.f, 10.f, 1.f };
|
||||
private:
|
||||
class CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
public:
|
||||
static CRanrok_Rush_Bottom* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual void Free() override;
|
||||
CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // DEBUG
|
||||
|
||||
|
||||
};
|
||||
|
||||
NS_END
|
||||
+11
-5
@@ -11,12 +11,12 @@ NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CRide_BboosterBar final : public CElementObject
|
||||
class CRide_BoosterBar final : public CElementObject
|
||||
{
|
||||
private:
|
||||
CRide_BboosterBar(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CRide_BboosterBar(const CRide_BboosterBar& rhs);
|
||||
virtual ~CRide_BboosterBar() = default;
|
||||
CRide_BoosterBar(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CRide_BoosterBar(const CRide_BoosterBar& rhs);
|
||||
virtual ~CRide_BoosterBar() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
@@ -35,6 +35,10 @@ class CRide_BboosterBar final : public CElementObject
|
||||
void Active(_float fTimeDelta);
|
||||
void NonActive(_float fTimeDelta);
|
||||
|
||||
public:
|
||||
void Set_Gauge(_float fTime);
|
||||
void Booster(_bool bBooster);
|
||||
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom1 = { nullptr };
|
||||
@@ -54,8 +58,10 @@ class CRide_BboosterBar final : public CElementObject
|
||||
|
||||
_int m_iClick{};
|
||||
|
||||
_bool m_bBooster = { false };
|
||||
|
||||
public:
|
||||
static CRide_BboosterBar* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
static CRide_BoosterBar* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
+5
-5
@@ -11,12 +11,12 @@ NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CRide_Bbooster_Slot final : public CElementObject
|
||||
class CRide_Booster_Slot final : public CElementObject
|
||||
{
|
||||
private:
|
||||
CRide_Bbooster_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CRide_Bbooster_Slot(const CRide_Bbooster_Slot& rhs);
|
||||
virtual ~CRide_Bbooster_Slot() = default;
|
||||
CRide_Booster_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CRide_Booster_Slot(const CRide_Booster_Slot& rhs);
|
||||
virtual ~CRide_Booster_Slot() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
@@ -41,7 +41,7 @@ class CRide_Bbooster_Slot final : public CElementObject
|
||||
|
||||
_float4 m_fImagePosi{};
|
||||
public:
|
||||
static CRide_Bbooster_Slot* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
static CRide_Booster_Slot* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user