diff --git a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl index 5465e90a7..d70673f30 100644 --- a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl +++ b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl @@ -4,6 +4,8 @@ matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix; Texture2D g_DepthTexture; +float3 g_CamaraPosition; + int g_iImageCountX; int g_iImageCountY; @@ -56,11 +58,16 @@ Texture2D g_Texture2; Texture2D g_Texture3; Texture2D g_Texture4; Texture2D g_Texture5; +Texture2D g_Texture6; Texture2D g_DiffuseTexture; Texture2D g_MaskingTexture; int g_iHover; +int g_iStep1 = 0; +int g_iStep2 = 0; +int g_iStep3 = 0; + struct VS_IN { float3 vPosition : POSITION; @@ -1483,6 +1490,156 @@ PS_OUT PS_Boss_HpBer(PS_IN In) return Out; } +struct VS_IN3D +{ + float3 vPosition : POSITION; + float2 vTexcoord : TEXCOORD0; +}; + +struct VS_OUT3D +{ + float4 vPosition : SV_Position; + float2 vTexcoord : TEXCOORD0; +}; + +VS_OUT3D VS_MAIN3D(VS_IN3D In) +{ + VS_OUT3D Out; + + matrix matViewProj = mul(g_ViewMatrix, g_ProjMatrix); + + float2 Offset = In.vTexcoord - 0.5f; + float3 worldCenter = float3(g_WorldMatrix._41, g_WorldMatrix._42, g_WorldMatrix._43); + + + float3 vLook = normalize(g_CamaraPosition - worldCenter); + + vLook.y = 0.f; + vLook = normalize(vLook); + + float3 upDir = float3(0.f, 1.f, 0.f); + + float3 rightDir = normalize(cross(vLook, upDir)); + + float3 dirRight = rightDir * g_fCurrent_Size.x * Offset.x; + float3 dirUp = upDir * g_fCurrent_Size.y * Offset.y; + + float3 vertexPos = worldCenter + dirRight + dirUp; + + Out.vPosition = mul(float4(vertexPos, 1.f), matViewProj); + Out.vTexcoord = 1.f - In.vTexcoord; + return Out; +} + + +PS_OUT PS_Enemy_Detection(PS_IN In) +{ + PS_OUT Out; + + float4 Color = float4(1.f, 1.f, 1.f, 0.f * g_fAlpha); + + if (g_iStep1 != 0) + { + float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size; + float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size; + float2 Imagelocal = (In.vTexcoord - Imagetexpos1) / Imagetexsize1; + bool inside1 = all(Imagelocal >= 0.0f && Imagelocal <= 1.0f); + if (inside1) + { + float4 tex3 = g_Texture1.Sample(ClampSampler, Imagelocal); + + float2 Imagetexpos2 = g_fImageSipos1.xy / g_fCurrent_Size; + float2 Imagetexsize2 = g_fImageSipos1.zw / g_fCurrent_Size; + float2 Imagelocal2 = (In.vTexcoord - Imagetexpos2) / Imagetexsize2; + + Color = lerp(Color, tex3, tex3.a); + + float4 tex4 = g_Texture2.Sample(ClampSampler, Imagelocal2); + float4 tex5 = g_Texture3.Sample(ClampSampler, Imagelocal2); + + float4 Color1 = tex4; + + Color1 = lerp(tex4, tex5, tex5.a); + + Imagelocal2.y = 1.f - Imagelocal2.y; + + if (Imagelocal2.y >= g_fTime) + { + Color1.a = 0.f; + } + + Color = lerp(Color, Color1, Color1.a); + + Color.a *= g_fAlpha; + Out.vColor = Color; + + return Out; + } + } + if (g_iStep2 != 0) + { + float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size; + float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size; + float2 Imagelocal = (In.vTexcoord - Imagetexpos1) / Imagetexsize1; + bool inside1 = all(Imagelocal >= 0.0f && Imagelocal <= 1.0f); + if (inside1) + { + float4 tex3 = g_Texture1.Sample(ClampSampler, Imagelocal); + + float2 Imagetexpos2 = g_fImageSipos1.xy / g_fCurrent_Size; + float2 Imagetexsize2 = g_fImageSipos1.zw / g_fCurrent_Size; + float2 Imagelocal2 = (In.vTexcoord - Imagetexpos2) / Imagetexsize2; + + float4 tex4 = g_Texture2.Sample(ClampSampler, Imagelocal2); + float4 tex6 = g_Texture4.Sample(ClampSampler, Imagelocal2); + Color = lerp(Color, tex3, tex3.a); + float4 Color1 = tex4; + Color1 = lerp(tex4, tex6, tex6); + Color1.rgb *= float3(1.f, 1.f, 0.f); + Imagelocal2.y = 1.f - Imagelocal2.y; + if (Imagelocal2.y >= g_fTime) + { + Color1.a = 0.f; + } + Color = lerp(Color, Color1, Color1.a); + + Color.a *= g_fAlpha; + + Out.vColor = Color; + + return Out; + } + } + if (g_iStep3 != 0) + { + float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord); + Color = tex1; + Color.rgb *= float3(1.f, 0.f, 0.f); + + float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size; + float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size; + float2 Imagelocal = (In.vTexcoord - Imagetexpos1) / Imagetexsize1; + bool inside1 = all(Imagelocal >= 0.0f && Imagelocal <= 1.0f); + if (inside1) + { + float4 tex7 = g_Texture5.Sample(ClampSampler, Imagelocal); + + Color = lerp(Color, tex7, tex7.a); + + Color.a *= g_fAlpha; + Out.vColor = Color; + + return Out; + } + + } + + Color.a *= g_fAlpha; + Out.vColor = Color; + + return Out; +} + technique11 PosTexTechnique11 { pass Default @@ -1793,4 +1950,14 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Boss_HpBer(); } + pass PS_Enemy_Detection + { + SetRasterizerState(RS_Nocull); + SetDepthStencilState(DSS_Default, 0); + SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN3D(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_Enemy_Detection(); + } + } diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj index 5324d0bfb..b9fad64cb 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj @@ -160,6 +160,8 @@ call Update_Resources.bat + + @@ -170,6 +172,7 @@ call Update_Resources.bat + @@ -189,8 +192,18 @@ call Update_Resources.bat + + + + + + + + + + @@ -326,6 +339,8 @@ call Update_Resources.bat + + @@ -336,6 +351,7 @@ call Update_Resources.bat + @@ -355,10 +371,20 @@ call Update_Resources.bat + + + + + + + + + + diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters index 630cdf7ce..87d452564 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters @@ -497,6 +497,18 @@ 04.Mechanic\Damage + + 02.GameObjects\Effect\MonsterEffect\Goblin_Mage\Mage_Down_Attack + + + 02.GameObjects\Effect\MonsterEffect\Goblin_Mage\MageSide + + + 02.GameObjects\Effect\MonsterEffect\Goblin_Mage\Mage_Nomal_Attack + + + 02.GameObjects\Effect\State_Effect\Stun + 04.Mechanic\State\Broom_Player\State_Broom_Ride_Move @@ -508,10 +520,37 @@ 04.Mechanic\State\Broom\Fly - + 02.GameObjects\UI\GamePlay_Canvas\Enemy_Penel\Boss_HpBar + + 02.GameObjects\Effect\PropsEffect\Box + + + 02.GameObjects\Effect\PropsEffect\Chair + + + 02.GameObjects\Effect\PropsEffect\Barral + + + 04.Mechanic\State\Broom_Player\State_Broom_Hover + + + 04.Mechanic\State\Broom_Player\State_Broom_Fly + + + 02.GameObjects\Cameras\MiniMap_Camera + + + 02.GameObjects\UI\Enemy_Detection + + + 02.GameObjects\NPC\Ally\Shopper + + + 04.Mechanic\State\State_Combat\State_Shield + @@ -1056,6 +1095,24 @@ {36962dce-8c99-4c54-9189-2a49785a211e} + + {13977e62-6b05-41de-9919-20a06cd336e5} + + + {bb1ae3a9-b8e7-49bf-83b4-811b627d0818} + + + {743a4a75-9482-4c8e-9c55-cab0daffffe9} + + + {920aabfe-6033-4a5c-b562-35b20bd2e0a6} + + + {5af878d0-07f2-4626-95bb-fd86abc64914} + + + {c9370e36-317e-45e7-a8c7-98a623864824} + {48b905c1-b91e-44ca-a61b-86633826768b} @@ -1073,10 +1130,40 @@ {537c9208-b8e7-4e3b-a818-27335e3f0469} - + {b49a3671-96d0-47b8-833f-28190d549b0f} + + {215b093d-648c-4cca-a69b-f4005b34ee06} + + + {b3c9f1a4-afb1-45ba-8d8b-034267607976} + + + {c2841516-9f72-4c72-aa50-652b4ff33b5a} + + + {3103c6e1-60cb-438b-a3eb-844b919ccd43} + + + {24f6903f-8f6b-46ff-a387-ecb44d673887} + + + {f24321bb-6750-4baa-b19a-bf5a3c2a8909} + + + {dbf4ff12-e5eb-439a-aa02-e5a424453b08} + + + {34a4beb9-ccb9-4847-ae45-af4e7dc25d94} + + + {fd4a0869-2491-4fec-9df9-3aedbac96171} + + + {02cb243a-f63e-4e55-9d55-b47e31a4c13e} + @@ -1518,6 +1605,18 @@ 04.Mechanic\Damage + + 02.GameObjects\Effect\MonsterEffect\Goblin_Mage\Mage_Down_Attack + + + 02.GameObjects\Effect\MonsterEffect\Goblin_Mage\MageSide + + + 02.GameObjects\Effect\MonsterEffect\Goblin_Mage\Mage_Nomal_Attack + + + 02.GameObjects\Effect\State_Effect\Stun + 04.Mechanic\State\Broom_Player\State_Broom_Ride_Move @@ -1529,10 +1628,37 @@ 04.Mechanic\State\Broom\Fly - + 02.GameObjects\UI\GamePlay_Canvas\Enemy_Penel\Boss_HpBar + + 02.GameObjects\Effect\PropsEffect\Box + + + 02.GameObjects\Effect\PropsEffect\Barral + + + 02.GameObjects\Effect\PropsEffect\Chair + + + 04.Mechanic\State\Broom_Player\State_Broom_Hover + + + 04.Mechanic\State\Broom_Player\State_Broom_Fly + + + 02.GameObjects\Cameras\MiniMap_Camera + + + 02.GameObjects\UI\Enemy_Detection + + + 04.Mechanic\State\State_Combat\State_Shield + + + 02.GameObjects\NPC\Ally\Shopper + diff --git a/Jusin154_Team3D/Client/Private/Action_Panel.cpp b/Jusin154_Team3D/Client/Private/Action_Panel.cpp index 410766887..7f2fc0aea 100644 --- a/Jusin154_Team3D/Client/Private/Action_Panel.cpp +++ b/Jusin154_Team3D/Client/Private/Action_Panel.cpp @@ -65,6 +65,7 @@ HRESULT CAction_Panel::Initialize(void* pArg) m_pInfoInstance->Add_Event(TEXT("GetSpell"), [this](void* p) {this->Spell_Setting(p); }); m_pInfoInstance->Add_Event(TEXT("Monster_Hit"), [this](void* p) {this->Magic_Meter_Update(); }); m_pInfoInstance->Add_Event(TEXT("Ancient_Magic_Throw"), [this](void* p) {this->Ancient_Magic_Throw(); }); + m_pInfoInstance->Add_Event(TEXT("Use_Potion"), [this](void* p) {this->Use_Potion(); }); return S_OK; } @@ -267,6 +268,18 @@ void CAction_Panel::Spell_Setting(void* pArg) } } +void CAction_Panel::Use_Potion() +{ + if (m_pInfoInstance->Get_PlayerStatPtr()->Get_Stat().fCurrentHp >= m_pInfoInstance->Get_PlayerStatPtr()->Get_Stat().fMaxHp) + return; + + _float Heal = static_cast(m_pPotion)->Use_Potion(); + if (Heal == -1) + return; + + m_pInfoInstance->Get_PlayerStatPtr()->Add_Hp(Heal); +} + HRESULT CAction_Panel::Bind_ShaderResources() { return S_OK; diff --git a/Jusin154_Team3D/Client/Private/Barral_Splesh.cpp b/Jusin154_Team3D/Client/Private/Barral_Splesh.cpp new file mode 100644 index 000000000..49a0f1db5 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Barral_Splesh.cpp @@ -0,0 +1,186 @@ +#include "pch.h" +#include "Barral_Splesh.h" + +#include "GameInstance.h" +#include "EffectParts.h" +#include "Wand.h" +#include "Player.h" + +CBarral_Splesh::CBarral_Splesh(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CEffect_Container{ pDevice, pContext } +{ +} + +CBarral_Splesh::CBarral_Splesh(const CBarral_Splesh& rhs) + : CEffect_Container(rhs) +{ +} + +HRESULT CBarral_Splesh::Initialize_Prototype() +{ + + return S_OK; + +} + +HRESULT CBarral_Splesh::Initialize(void* pArg) +{ + if (FAILED(__super::Initialize(pArg))) + return E_FAIL; + + if (FAILED(Ready_Components(pArg))) + return E_FAIL; + + + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Barral"))) + return E_FAIL; + + + m_wstrEffectName = L"Barral_Splesh"; + + + m_fDuration = 5.f; + + return S_OK; +} + +void CBarral_Splesh::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); + +} + +void CBarral_Splesh::Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Update(fTimeDelta); + + Update_Event(fTimeDelta); + + +} + +void CBarral_Splesh::Late_Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Late_Update(fTimeDelta); + + +} + +HRESULT CBarral_Splesh::Pre_Setting(CGameObject* pObject, void* pArg) +{ + + if (FAILED(__super::Pre_Setting(pObject, nullptr))) + return E_FAIL; + + CEffectParts* pWood_PT0 = Get_PartObject("Wood_PT0"); + CEffectParts* pWood_PT1 = Get_PartObject("Wood_PT1"); + CEffectParts* pWood_PT2 = Get_PartObject("Wood_PT2"); + CEffectParts* pWater_Splesh = Get_PartObject("Water_Splesh"); + + + _vector vPos = m_pOwner->Get_WorldPostion(); + + pWood_PT0->Get_Component()->Set_State(STATE::POSITION, vPos); + pWood_PT1->Get_Component()->Set_State(STATE::POSITION, vPos); + pWood_PT2->Get_Component()->Set_State(STATE::POSITION, vPos); + pWater_Splesh->Get_Component()->Set_State(STATE::POSITION, vPos); + + + pWood_PT0->Set_Visible(true); + pWood_PT1->Set_Visible(true); + pWood_PT2->Set_Visible(true); + pWater_Splesh->Set_Visible(true); + + + return S_OK; +} + +HRESULT CBarral_Splesh::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CBarral_Splesh::Ready_Child() +{ + return S_OK; +} + +CBarral_Splesh* CBarral_Splesh::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CBarral_Splesh* pInstance = new CBarral_Splesh(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CBarral_Splesh"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + + +CGameObject* CBarral_Splesh::Clone(void* pArg, CGameObject* pOwner) +{ + CBarral_Splesh* pInstance = new CBarral_Splesh(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CBarral_Splesh"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CBarral_Splesh::OnCollision(CGameObject* pOther, void* pDesc) +{ + _int iIndex = CollisionCheck(); + + if (iIndex < 0) + return; + + if (m_isCollisionEnter == true) + return; + + m_isCollisionEnter = true; + + _vector vPos = XMVectorSet(m_Hitbuffer.touches[iIndex].position.x, m_Hitbuffer.touches[iIndex].position.y, m_Hitbuffer.touches[iIndex].position.z, 1.f); + + + for (auto& pPair : m_PartObjects) + { + pPair.second->Set_Visible(true); + pPair.second->Get_Component()->Set_State(STATE::POSITION, vPos); + } + + +} + +void CBarral_Splesh::Free() +{ + __super::Free(); + +} +#ifdef _DEBUG +void CBarral_Splesh::Describe_Entity() +{ + +} +#endif + +HRESULT CBarral_Splesh::Bind_ShaderResources() +{ + return S_OK; +} + + diff --git a/Jusin154_Team3D/Client/Private/Box_Splesh.cpp b/Jusin154_Team3D/Client/Private/Box_Splesh.cpp new file mode 100644 index 000000000..4d516417d --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Box_Splesh.cpp @@ -0,0 +1,182 @@ +#include "pch.h" +#include "Box_Splesh.h" + +#include "GameInstance.h" +#include "EffectParts.h" +#include "Wand.h" +#include "Player.h" + +CBox_Splesh::CBox_Splesh(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CEffect_Container{ pDevice, pContext } +{ +} + +CBox_Splesh::CBox_Splesh(const CBox_Splesh& rhs) + : CEffect_Container(rhs) +{ +} + +HRESULT CBox_Splesh::Initialize_Prototype() +{ + + return S_OK; + +} + +HRESULT CBox_Splesh::Initialize(void* pArg) +{ + if (FAILED(__super::Initialize(pArg))) + return E_FAIL; + + if (FAILED(Ready_Components(pArg))) + return E_FAIL; + + + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Box"))) + return E_FAIL; + + + m_wstrEffectName = L"Box_Splesh"; + + + m_fDuration = 5.f; + + return S_OK; +} + +void CBox_Splesh::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); + +} + +void CBox_Splesh::Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Update(fTimeDelta); + + Update_Event(fTimeDelta); + + +} + +void CBox_Splesh::Late_Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Late_Update(fTimeDelta); + + +} + +HRESULT CBox_Splesh::Pre_Setting(CGameObject* pObject, void* pArg) +{ + + if (FAILED(__super::Pre_Setting(pObject, nullptr))) + return E_FAIL; + + CEffectParts* pPaper = Get_PartObject("Paper"); + CEffectParts* pSmoke = Get_PartObject("Smoke"); + + + + _vector vPos = m_pOwner->Get_WorldPostion(); + + pPaper->Get_Component()->Set_State(STATE::POSITION, vPos); + pSmoke->Get_Component()->Set_State(STATE::POSITION, vPos); + + + pPaper->Set_Visible(true); + pSmoke->Set_Visible(true); + + + + return S_OK; +} + +HRESULT CBox_Splesh::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CBox_Splesh::Ready_Child() +{ + return S_OK; +} + +CBox_Splesh* CBox_Splesh::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CBox_Splesh* pInstance = new CBox_Splesh(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CBarral_Splesh"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + + +CGameObject* CBox_Splesh::Clone(void* pArg, CGameObject* pOwner) +{ + CBox_Splesh* pInstance = new CBox_Splesh(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CBarral_Splesh"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CBox_Splesh::OnCollision(CGameObject* pOther, void* pDesc) +{ + _int iIndex = CollisionCheck(); + + if (iIndex < 0) + return; + + if (m_isCollisionEnter == true) + return; + + m_isCollisionEnter = true; + + _vector vPos = XMVectorSet(m_Hitbuffer.touches[iIndex].position.x, m_Hitbuffer.touches[iIndex].position.y, m_Hitbuffer.touches[iIndex].position.z, 1.f); + + + for (auto& pPair : m_PartObjects) + { + pPair.second->Set_Visible(true); + pPair.second->Get_Component()->Set_State(STATE::POSITION, vPos); + } + + +} + +void CBox_Splesh::Free() +{ + __super::Free(); + +} +#ifdef _DEBUG +void CBox_Splesh::Describe_Entity() +{ + +} +#endif + +HRESULT CBox_Splesh::Bind_ShaderResources() +{ + return S_OK; +} + + diff --git a/Jusin154_Team3D/Client/Private/Broom.cpp b/Jusin154_Team3D/Client/Private/Broom.cpp index 202b43f12..35ab613d9 100644 --- a/Jusin154_Team3D/Client/Private/Broom.cpp +++ b/Jusin154_Team3D/Client/Private/Broom.cpp @@ -57,6 +57,14 @@ void CBroom::Update(_float fTimeDelta) { Update_CameraCoordinateSystem(); + if (!m_bRide) + { + m_bHoverToggle = true; + m_fSpeed = 0.f; + + m_pFSM->Change_State(FSMSTATE::IDLE); + } + m_pFSM->Update_State(fTimeDelta); m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom); @@ -94,11 +102,10 @@ HRESULT CBroom::Render() if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) { return E_FAIL; } - if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_ANIM::DEFAULT)))) { + if (FAILED(m_pModelCom->Begin(i, m_pShaderCom))) { return E_FAIL; } - if (FAILED(m_pModelCom->Render(i))) { return E_FAIL; } @@ -124,7 +131,7 @@ HRESULT CBroom::Ready_Components() } /* Com_Shader */ - if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_ANIMMESH, + if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_NPC_PBR_ANIM, reinterpret_cast(&m_pShaderCom)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/Broom_States.cpp b/Jusin154_Team3D/Client/Private/Broom_States.cpp index 107dd43e1..ebb0a07e6 100644 --- a/Jusin154_Team3D/Client/Private/Broom_States.cpp +++ b/Jusin154_Team3D/Client/Private/Broom_States.cpp @@ -18,7 +18,6 @@ HRESULT CBroom::InputAction() m_pGameInstance->Key_Pressing(DIK_SPACE) || m_pGameInstance->Key_Pressing(DIK_LCONTROL) || m_pGameInstance->Key_Pressing(DIK_E) - || m_pGameInstance->Key_Pressing(DIK_R) || m_pGameInstance->Key_Pressing(DIK_Q) || m_pGameInstance->Key_Down(DIK_LSHIFT) || m_pGameInstance->Key_Pressing(DIK_C) @@ -26,6 +25,7 @@ HRESULT CBroom::InputAction() || m_pGameInstance->Key_Pressing(DIK_Z) || m_pGameInstance->Key_Pressing(DIK_G) || m_pGameInstance->Key_Pressing(DIK_B) + || m_pGameInstance->Key_Pressing(DIK_N) ) { return S_OK; @@ -138,14 +138,6 @@ HRESULT CBroom::Behavior_MoveExitCheck(_float fTimeDelta) pair<_uint, _bool> pairAnimInfo = {}; _uint iCurrentAnimIndex = m_pModelCom->Get_AnimIndex(); - if (!m_bRide) - { - m_bHoverToggle = true; - - m_pFSM->Change_State(FSMSTATE::IDLE); - return E_FAIL; - } - if (SUCCEEDED(InputMove()) || SUCCEEDED(InputAction())) { if (m_pGameInstance->Key_Pressing(DIK_W)) @@ -168,6 +160,10 @@ HRESULT CBroom::Behavior_MoveExitCheck(_float fTimeDelta) { m_pFSM->Change_State(FSMSTATE::HOVER); } + else if (m_pGameInstance->Key_Pressing(DIK_N)) + { + m_pFSM->Change_State(FSMSTATE::HOVER); + } else if (m_pGameInstance->Key_Down(DIK_LSHIFT)) { m_bHoverToggle = false; @@ -197,7 +193,7 @@ HRESULT CBroom::Behavior_Broom_HoverExitCheck(_float fTimeDelta) _bool bFwd = m_pGameInstance->Key_Pressing(DIK_W); _bool bLft = m_pGameInstance->Key_Pressing(DIK_A); _bool bRht = m_pGameInstance->Key_Pressing(DIK_D); - _bool bDown = m_pGameInstance->Key_Pressing(DIK_LCONTROL); + _bool bDown = m_pGameInstance->Key_Pressing(DIK_LCONTROL) || m_pGameInstance->Key_Pressing(DIK_N); _bool bUp = m_pGameInstance->Key_Pressing(DIK_SPACE); if (m_bHoverToggle) @@ -354,7 +350,7 @@ HRESULT CBroom::Behavior_Broom_FlyExitCheck(_float fTimeDelta) _bool bFwd = m_pGameInstance->Key_Pressing(DIK_W); _bool bLft = m_pGameInstance->Key_Pressing(DIK_A); _bool bRht = m_pGameInstance->Key_Pressing(DIK_D); - _bool bDown = m_pGameInstance->Key_Pressing(DIK_LCONTROL); + _bool bDown = m_pGameInstance->Key_Pressing(DIK_LCONTROL) || m_pGameInstance->Key_Pressing(DIK_N); _bool bUp = m_pGameInstance->Key_Pressing(DIK_SPACE); _bool bShift = m_pGameInstance->Key_Down(DIK_LSHIFT); @@ -413,24 +409,24 @@ HRESULT CBroom::Behavior_Broom_FlyExitCheck(_float fTimeDelta) _bool bHasInput = !(vInput.x == 0 && vInput.y == 0 && vInput.z == 0); _vector vDir = XMVector3Normalize(XMLoadFloat3(&vInput)); - if (vInput.z >= 0.f) - { - Camera_InterpTurn(fTimeDelta * 0.2f); - } - - if (vInput.x < 0.f) { - if (vInput.z < 0.f) + if (vInput.z <= 0.f) { - Camera_InterpTurn(fTimeDelta * 0.3f); + Camera_InterpTurn(fTimeDelta * 0.4f); + } + else { + Camera_InterpTurn(fTimeDelta * 0.2f); } } else if (vInput.x > 0.f) { - if (vInput.z < 0.f) + if (vInput.z <= 0.f) { - Camera_InterpTurn(fTimeDelta * 0.3f); + Camera_InterpTurn(fTimeDelta * 0.4f); + } + else { + Camera_InterpTurn(fTimeDelta * 0.2f); } } @@ -530,9 +526,6 @@ void CBroom::Camera_InterpTurn(_float fTimeDelta) { _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex(); - //if (iCurrAnimIndex != m_Animation[STATEANIM::BROOM_FLY_B].first) - // return; - _vector xmvCurLook = XMVector4Normalize( XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f)); _float2 vCurLook = { XMVectorGetX(xmvCurLook),XMVectorGetZ(xmvCurLook) }; @@ -658,7 +651,7 @@ void CBroom::Set_Anim() m_Animation[STATEANIM::BROOM_FLY_DOWN_B] = { 13,true }; m_Animation[STATEANIM::BROOM_FLY_LEFT_B] = { 15,true }; m_Animation[STATEANIM::BROOM_FLY_RIGHT_B] = { 16,true }; - m_Animation[STATEANIM::BROOM_FLY_UP_B] = { 17,true }; + m_Animation[STATEANIM::BROOM_FLY_UP_B] = { 17,true }; //Mount 29 //호버 스탑 6 //호버 제자리 24 diff --git a/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp b/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp index 4f74576ba..d59ff7c5e 100644 --- a/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp +++ b/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp @@ -170,7 +170,7 @@ _vector CCamPosition_Shoulder::Calc_LookTargetPos() _vector vDestPos = Calc_DampingParentPos(); _vector vFoward = { 0.f, 0.f, 1.f, 0.f }; - _vector vRotCameraq = XMQuaternionRotationRollPitchYaw(XMConvertToRadians(m_vAccRotDegrees.x), XMConvertToRadians(m_vAccRotDegrees.y), 0.f); + _vector vRotCameraq = XMQuaternionRotationRollPitchYaw(XMConvertToRadians(m_vAccRotDegrees.x + m_vAccRealDegrees.x), XMConvertToRadians(m_vAccRotDegrees.y + m_vAccRealDegrees.y), 0.f); vFoward = XMVector3Normalize(XMVector3Rotate(vFoward, vRotCameraq)); _vector vHeadPos = vDestPos + XMVectorSet(0.f, m_fHeadHeight, 0.f, 0.f); @@ -252,6 +252,11 @@ _vector CCamPosition_Shoulder::Calc_DampingParentPos() { return XMVectorLerp(XMLoadFloat4(&m_vDampingStartPosition), XMLoadFloat4(&m_vDampingDestPosition), m_vDampingLerpTimer.x / m_vDampingLerpTimer.y); } +void CCamPosition_Shoulder::Set_CameraShake(_float fXShock, _float fYShock) +{ + m_vAccRealDegrees.x = fXShock; + m_vAccRealDegrees.y = fYShock; +} _vector CCamPosition_Shoulder::Get_ShoulderGlobalPos() { // Right/Left 숄더를 로컬 X 부호로 결정 @@ -264,9 +269,8 @@ _vector CCamPosition_Shoulder::Get_ShoulderGlobalPos() // 카메라 회전(현재 마우스로 누적된 pitch/yaw) _vector cameraRotationQuaternion = XMQuaternionRotationRollPitchYaw( - XMConvertToRadians(m_vAccRotDegrees.x), - XMConvertToRadians(m_vAccRotDegrees.y), - 0.f + XMConvertToRadians(m_vAccRotDegrees.x + m_vAccRealDegrees.x), + XMConvertToRadians(m_vAccRotDegrees.y + m_vAccRealDegrees.y), 0.f ); // 카메라 로컬 오프셋을 카메라 회전에 맞춰 월드로 회전 @@ -310,8 +314,8 @@ HRESULT CCamPosition_Shoulder::Ready_SubParts() CameraDesc.bEnableFollowLerp = false; CameraDesc.bEnableLookLerp = false; CameraDesc.vTransitionTime = { 0.f, 1.f }; - CameraDesc.vFollowLerpTime = { 0.f, BASIC_LERP_TIMER }; - CameraDesc.vLookLerpTime = { 0.f, BASIC_LERP_TIMER }; + CameraDesc.vFollowLerpTime = { 0.f, TIMER_SHORT_LERP }; + CameraDesc.vLookLerpTime = { 0.f, TIMER_SHORT_LERP }; if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_CAMERA, &CameraDesc, nullptr, &m_pBinded_Camera))) { diff --git a/Jusin154_Team3D/Client/Private/Chair_Splesh.cpp b/Jusin154_Team3D/Client/Private/Chair_Splesh.cpp new file mode 100644 index 000000000..bb123e405 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Chair_Splesh.cpp @@ -0,0 +1,186 @@ +#include "pch.h" +#include "Chair_Splesh.h" + +#include "GameInstance.h" +#include "EffectParts.h" +#include "Wand.h" +#include "Player.h" + +CChair_Splesh::CChair_Splesh(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CEffect_Container{ pDevice, pContext } +{ +} + +CChair_Splesh::CChair_Splesh(const CChair_Splesh& rhs) + : CEffect_Container(rhs) +{ +} + +HRESULT CChair_Splesh::Initialize_Prototype() +{ + + return S_OK; + +} + +HRESULT CChair_Splesh::Initialize(void* pArg) +{ + if (FAILED(__super::Initialize(pArg))) + return E_FAIL; + + if (FAILED(Ready_Components(pArg))) + return E_FAIL; + + + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Chair"))) + return E_FAIL; + + + m_wstrEffectName = L"Chair_Splesh"; + + + m_fDuration = 5.f; + + return S_OK; +} + +void CChair_Splesh::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); + +} + +void CChair_Splesh::Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Update(fTimeDelta); + + Update_Event(fTimeDelta); + + +} + +void CChair_Splesh::Late_Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Late_Update(fTimeDelta); + + +} + +HRESULT CChair_Splesh::Pre_Setting(CGameObject* pObject, void* pArg) +{ + + if (FAILED(__super::Pre_Setting(pObject, nullptr))) + return E_FAIL; + + CEffectParts* pHit = Get_PartObject("Hit"); + CEffectParts* pSmoke = Get_PartObject("Smoke"); + CEffectParts* pWood_PT0 = Get_PartObject("Wood_PT0"); + CEffectParts* pWood_PT1 = Get_PartObject("Wood_PT1"); + + + _vector vPos = m_pOwner->Get_WorldPostion(); + + pWood_PT0->Get_Component()->Set_State(STATE::POSITION, vPos); + pWood_PT1->Get_Component()->Set_State(STATE::POSITION, vPos); + pHit->Get_Component()->Set_State(STATE::POSITION, vPos); + pSmoke->Get_Component()->Set_State(STATE::POSITION, vPos); + + + pWood_PT0->Set_Visible(true); + pWood_PT1->Set_Visible(true); + pHit->Set_Visible(true); + pSmoke->Set_Visible(true); + + + return S_OK; +} + +HRESULT CChair_Splesh::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CChair_Splesh::Ready_Child() +{ + return S_OK; +} + +CChair_Splesh* CChair_Splesh::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CChair_Splesh* pInstance = new CChair_Splesh(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CBarral_Splesh"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + + +CGameObject* CChair_Splesh::Clone(void* pArg, CGameObject* pOwner) +{ + CChair_Splesh* pInstance = new CChair_Splesh(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CBarral_Splesh"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CChair_Splesh::OnCollision(CGameObject* pOther, void* pDesc) +{ + _int iIndex = CollisionCheck(); + + if (iIndex < 0) + return; + + if (m_isCollisionEnter == true) + return; + + m_isCollisionEnter = true; + + _vector vPos = XMVectorSet(m_Hitbuffer.touches[iIndex].position.x, m_Hitbuffer.touches[iIndex].position.y, m_Hitbuffer.touches[iIndex].position.z, 1.f); + + + for (auto& pPair : m_PartObjects) + { + pPair.second->Set_Visible(true); + pPair.second->Get_Component()->Set_State(STATE::POSITION, vPos); + } + + +} + +void CChair_Splesh::Free() +{ + __super::Free(); + +} +#ifdef _DEBUG +void CChair_Splesh::Describe_Entity() +{ + +} +#endif + +HRESULT CChair_Splesh::Bind_ShaderResources() +{ + return S_OK; +} + + diff --git a/Jusin154_Team3D/Client/Private/Decendo.cpp b/Jusin154_Team3D/Client/Private/Decendo.cpp index ee6f95b01..449a67bd5 100644 --- a/Jusin154_Team3D/Client/Private/Decendo.cpp +++ b/Jusin154_Team3D/Client/Private/Decendo.cpp @@ -251,6 +251,7 @@ void CDecendo::OnCollision(CGameObject* pOther, void* pDesc) if (m_bHit == false) return; + dynamic_cast(m_pOwner->Get_Owner())->Set_SpellHit(true); ON_COLLISION_INFO CollisionDesc = *static_cast(pDesc); diff --git a/Jusin154_Team3D/Client/Private/EffectObject.cpp b/Jusin154_Team3D/Client/Private/EffectObject.cpp index f67e22961..264111807 100644 --- a/Jusin154_Team3D/Client/Private/EffectObject.cpp +++ b/Jusin154_Team3D/Client/Private/EffectObject.cpp @@ -143,13 +143,26 @@ void CEffectObject::Add_Light() m_pGameInstance->Add_Light(CURRENT_LEVEL, m_pLightCom); } -void CEffectObject::FollowParents(const _float4x4* pParentsMat) +void CEffectObject::FollowParents(const _float4x4* pParentsMat,const _float4x4* pOffsetMat) { if (pParentsMat == nullptr) return; + if (pOffsetMat) + { + _matrix parent = XMLoadFloat4x4(pParentsMat); + _matrix offset = XMLoadFloat4x4(pOffsetMat); + + _matrix final = offset * parent; + + XMStoreFloat4x4(&m_FinalParentMatrix, final); + + m_pParentMatrix = &m_FinalParentMatrix; + } + else { + m_pParentMatrix = pParentsMat; + } - m_pParentMatrix = pParentsMat; m_bVisible = true; } diff --git a/Jusin154_Team3D/Client/Private/EffectPool.cpp b/Jusin154_Team3D/Client/Private/EffectPool.cpp index 9247652a3..2508cc975 100644 --- a/Jusin154_Team3D/Client/Private/EffectPool.cpp +++ b/Jusin154_Team3D/Client/Private/EffectPool.cpp @@ -24,6 +24,13 @@ #include "TrollSwing.h" #include "Goblin_Protego.h" #include "Goblin_Attack.h" +#include "Mage_Down_Attack.h" +#include "Mage_Nomal_Attack.h" +#include "MageSide.h" +#include "StunEffect.h" +#include "Box_Splesh.h" +#include "Chair_Splesh.h" +#include "Barral_Splesh.h" CEffectPool::CEffectPool(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) : CGameObject(pDevice, pContext) @@ -51,12 +58,41 @@ HRESULT CEffectPool::Initialize(void* pArg) return E_FAIL; } - if (FAILED(Ready_Effect())) { - return E_FAIL; +#ifdef _DEBUG + +#ifdef gimch + m_isActiveEffectCreate = false; + m_isActiveMonsterEffectCreate = false; +#endif // gimch +#ifdef Bin + m_isActiveEffectCreate = true; + m_isActiveMonsterEffectCreate = true; +#endif // +#ifdef 진우 + m_isActiveEffectCreate = true; + m_isActiveMonsterEffectCreate = true; +#endif // +#ifdef 기무리 + m_isActiveEffectCreate = true; + m_isActiveMonsterEffectCreate = true; +#endif // +#ifdef 인혁 + m_isActiveEffectCreate = false; + m_isActiveMonsterEffectCreate = false; +#endif // + +#endif + + if (m_isActiveEffectCreate) + { + if (FAILED(Ready_Effect())) + return E_FAIL; } - if (FAILED(Ready_MonsterEffect())) { - return E_FAIL; + if (m_isActiveMonsterEffectCreate) + { + if (FAILED(Ready_MonsterEffect())) + return E_FAIL; } @@ -260,6 +296,36 @@ HRESULT CEffectPool::Ready_Effect() return pEffect; } ))) return E_FAIL; + + if (FAILED(Create_Effect(SKILL_TYPE::BOX_SPLESH, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + + CBox_Splesh* pEffect = nullptr; + + pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr); + + return pEffect; } + ))) return E_FAIL; + + + if (FAILED(Create_Effect(SKILL_TYPE::CHAIL_SPLESH, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + + CChair_Splesh* pEffect = nullptr; + + pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr); + + return pEffect; } + ))) return E_FAIL; + + + if (FAILED(Create_Effect(SKILL_TYPE::BARRAL_SPLASH, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + + CBarral_Splesh* pEffect = nullptr; + + pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr); + + return pEffect; } + ))) return E_FAIL; + #endif // !기무리 return S_OK; @@ -315,6 +381,51 @@ HRESULT CEffectPool::Ready_MonsterEffect() return pEffect; } ))) return E_FAIL; + + if (FAILED(Create_Effect(SKILL_TYPE::GOBLIN_MAGE_ATTACK, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + + CMage_Nomal_Attack* pEffect = nullptr; + + pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr); + + return pEffect; } + + ))) return E_FAIL; + + if (FAILED(Create_Effect(SKILL_TYPE::GOBLIN_MAGE_DOWN, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + + CMage_Down_Attack* pEffect = nullptr; + + pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr); + + return pEffect; } + + + ))) return E_FAIL; + + if (FAILED(Create_Effect(SKILL_TYPE::GOBLIN_MAGE_SIDE, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + + CMageSide* pEffect = nullptr; + + pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr); + + return pEffect; } + + ))) return E_FAIL; + + + if (FAILED(Create_Effect(SKILL_TYPE::STUN, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + + CStunEffect* pEffect = nullptr; + + pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr); + + return pEffect; } + + ))) return E_FAIL; + + + return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Effect_Container.cpp b/Jusin154_Team3D/Client/Private/Effect_Container.cpp index a8881cd0c..46c6cdf10 100644 --- a/Jusin154_Team3D/Client/Private/Effect_Container.cpp +++ b/Jusin154_Team3D/Client/Private/Effect_Container.cpp @@ -463,6 +463,107 @@ ON_COLLISION_INFO CEffect_Container::SweepTarget(_vector StartPos, _vector EndPo return tagCollInfo; } +ON_COLLISION_INFO CEffect_Container::MonsterSweepTarget(_vector StartPos, _vector EndPos, _float fRadius, _bool isTerrainCollision) +{ + _vector vStartPos = StartPos; + _vector vEndPos = EndPos; + _vector vDir = { vEndPos - vStartPos }; + + _float fDistance = XMVectorGetX(XMVector3Length(vEndPos - vStartPos)); + + PSX::PxSweepBuffer pxBuffer = {}; + + _bool bHit = m_pGameInstance->SphereCast(fRadius, vStartPos, vDir, fDistance, PSX::PxHitFlag::ePOSITION | PSX::PxHitFlag::eNORMAL, PSX::PxQueryFlag::eDYNAMIC, pxBuffer); + + const PSX::PxSweepHit& hit = pxBuffer.block; + PSX::PxRigidActor* pActor = hit.actor; + PSX::PxShape* pShape = hit.shape; + ON_COLLISION_INFO tagCollInfo = {}; + + tagCollInfo.vWorldPos.w = 1.f; + + if (bHit) { + + memcpy_s(&tagCollInfo.vWorldPos, sizeof(tagCollInfo.vWorldPos), &hit.position, sizeof(hit.position)); + + memcpy_s(&tagCollInfo.vWorldNomal, sizeof(tagCollInfo.vWorldNomal), &hit.normal, sizeof(hit.normal)); + XMStoreFloat4(&tagCollInfo.vHitDir, vDir); + tagCollInfo.fLength = fDistance; + + + if (nullptr != pActor && nullptr != pActor->userData) + { + PhsXUserData* pUserData = static_cast(pActor->userData); + tagCollInfo.pObject = pUserData->pOwner; + + switch (pUserData->eKind) + { + case PHYSX_KIND::CCTActor: + { + switch (PXOBJECT(pUserData->iSubKind)) + { + + case PXOBJECT::PLAYER: + { + pUserData->pOwner->OnCollision(this, &tagCollInfo); + m_bHit = true; + } + break; + } + } + } + } + + + } + + if (isTerrainCollision == true && bHit == false) + { + memcpy_s(&tagCollInfo.vWorldPos, sizeof(tagCollInfo.vWorldPos), &hit.position, sizeof(hit.position)); + memcpy_s(&tagCollInfo.vWorldNomal, sizeof(tagCollInfo.vWorldNomal), &hit.normal, sizeof(hit.normal)); + XMStoreFloat4(&tagCollInfo.vHitDir, vDir); + tagCollInfo.fLength = fDistance; + tagCollInfo.pObject = m_pOwner->Get_Owner(); + + bHit = m_pGameInstance->SphereCast(fRadius, vStartPos, vDir, fDistance, PSX::PxHitFlag::ePOSITION | PSX::PxHitFlag::eNORMAL, PSX::PxQueryFlag::eSTATIC, pxBuffer); + + const PSX::PxSweepHit& hit = pxBuffer.block; + PSX::PxRigidActor* pActor = hit.actor; + PSX::PxShape* pShape = hit.shape; + + tagCollInfo.vWorldPos.w = 1.f; + + if (bHit) + { + memcpy_s(&tagCollInfo.vWorldPos, sizeof(tagCollInfo.vWorldPos), &hit.position, sizeof(hit.position)); + memcpy_s(&tagCollInfo.vWorldNomal, sizeof(tagCollInfo.vWorldNomal), &hit.normal, sizeof(hit.normal)); + XMStoreFloat4(&tagCollInfo.vHitDir, vDir); + tagCollInfo.fLength = fDistance; + + if (nullptr != pActor && nullptr != pActor->userData) + { + PhsXUserData* pUserData = static_cast(pActor->userData); + tagCollInfo.pObject = pUserData->pOwner; + + switch (PXOBJECT(pUserData->iSubKind)) + { + case PXOBJECT::TERRAIN: + { + + m_bHit = true; + break; + } + } + + } + } + + + } + + return tagCollInfo; +} + void CEffect_Container::Update_Event(_float fTimeDelta) { diff --git a/Jusin154_Team3D/Client/Private/Enemy_Detection.cpp b/Jusin154_Team3D/Client/Private/Enemy_Detection.cpp new file mode 100644 index 000000000..4b894fa05 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Enemy_Detection.cpp @@ -0,0 +1,355 @@ +#include "pch.h" +#include "Enemy_Detection.h" +#include "GameInstance.h" +#include "Monster.h" + +CEnemy_Detection::CEnemy_Detection(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CPartObject(pDevice, pContext) +{ +} + +CEnemy_Detection::CEnemy_Detection(const CEnemy_Detection& Prototype) + : CPartObject(Prototype) +{ +} + +HRESULT CEnemy_Detection::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CEnemy_Detection::Initialize(void* pArg) +{ + ENEMY_DETECTION_DESC* pDesc = static_cast (pArg); + m_pSocketMatrices = pDesc->pSocketMatrices; + + if (FAILED(__super::Initialize(pArg))) { + return E_FAIL; + } + + + if (FAILED(Ready_Components())) { + return E_FAIL; + } + + m_fOrigin_Size = _float3(1.f, 1.f, 1.f); + m_fSize.x = m_fOrigin_Size.x; + m_fSize.y = m_fOrigin_Size.y; + _float3 scals = _float3(1.f, 1.f, 1.f); + m_pTransformCom->Set_Scale(scals); + m_fSize.z = 1.f; + m_fAlpha = 1.f; + m_bStep1 = true; + m_vImageposi = _float4(0.3f, 0.3f, 0.4f, 0.4f); + + return S_OK; +} + +void CEnemy_Detection::Priority_Update(_float fTimeDelta) +{ + + XMVECTOR MonsterPos = static_cast(m_pOwner)->Get_WorldPostion(); + + _float fOffsetY = 3.0f; // 적절한 Y 오프셋 값 (몬스터 머리 위로 올리기 위함) + + XMVECTOR HeadPos = XMVectorAdd(MonsterPos, XMVectorSet(0.f, fOffsetY, 0.f, 0.f)); + + m_vPosition = HeadPos; + m_fSize = _float3(2.f, 2.f, 2.f); + m_vImageposi = _float4(0.5f, 0.5f, 1.f, 1.f); + + m_pTransformCom->Set_State(STATE::POSITION, m_vPosition); +} + +void CEnemy_Detection::Update(_float fTimeDelta) +{ + if (m_bActive == true) + { + m_fTime += fTimeDelta; + + if (m_fTime >= 2.f) + { + if (m_bStep1 == true) + { + m_bStep1 = false; + m_bStep2 = true; + m_bStep3 = false; + m_fTime = 0.f; + } + else if (m_bStep2 == true) + { + m_bStep1 = false; + m_bStep2 = false; + m_bStep3 = true; + m_fTime = 0.f; + } + else if (m_bStep3 == true) + { + m_bStep1 = false; + m_bStep2 = false; + m_bStep3 = true; + m_fAlpha -= fTimeDelta; + } + } + } + else if (m_bActive == false) + { + m_fTime = 0.f; + m_bStep1 = true; + m_bStep2 = false; + m_bStep3 = false; + m_bSizeUp = false; + m_fAlpha = 1.f; + SizeUpX(m_fOrigin_Size.x); + SizeUpY(m_fOrigin_Size.y); + m_vImageposi.z = 75.f; + m_vImageposi.w = 75.f; + } + + if (m_bStep3 == true) + { + if (m_bSizeUp == false) + { + SizeUpX(m_fSize.x + 1.f); + SizeUpY(m_fSize.y + 1.f); + m_vImageposi.z += 0.4f; + m_vImageposi.w += 0.4f; + m_bSizeUp = true; + } + } + + if (m_fSize.x != m_fOrigin_Size.x) + { + SizeUpdate(-fTimeDelta); + m_vImageposi.z -= fTimeDelta; + m_vImageposi.w -= fTimeDelta; + } + + if (m_fAlpha <= 0.f) + m_fAlpha = 0.f; + +} + +void CEnemy_Detection::Late_Update(_float fTimeDelta) +{ + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); +} + +HRESULT CEnemy_Detection::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ENEMY_DETECTION)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CEnemy_Detection::Render_Disolve() +{ + return S_OK; +} + +void CEnemy_Detection::SizeUpX(_float fX) +{ + m_fSize.x = fX; +} + +void CEnemy_Detection::SizeUpY(_float fY) +{ + m_fSize.y = fY; +} + +void CEnemy_Detection::SizeUpdate(_float fSizeX) +{ + m_fSize.x += fSizeX; + m_fSize.y += fSizeX; + m_vImageposi.z += fSizeX; + m_vImageposi.w += fSizeX; + if (m_fSize.x - m_fOrigin_Size.x <= fSizeX) + { + m_fSize.x = m_fOrigin_Size.x; + m_fSize.y = m_fOrigin_Size.y; + m_vImageposi.z = 1.f; + m_vImageposi.w = 1.f; + } +} + +void CEnemy_Detection::Set_Active(_bool bAtcive) +{ + m_bActive = bAtcive; +} + +_bool CEnemy_Detection::Get_Step() +{ + return m_bStep3; +} + +HRESULT CEnemy_Detection::Ready_Components() +{ + __super::Ready_Components(nullptr); + + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_HUD_Ring_Aggroed_Burst"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_HUD_NPC_WhiteFrameBlip"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_HUD_NPC_Alert"), reinterpret_cast(&m_pDiffuse_TextureCom2), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_HUD_Ring_Alert_Fill"), reinterpret_cast(&m_pDiffuse_TextureCom3), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_HUD_Ring_Alert_Yellow"), reinterpret_cast(&m_pDiffuse_TextureCom4), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_HUD_Ring_Aggro_Blip"), reinterpret_cast(&m_pDiffuse_TextureCom5), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CEnemy_Detection::Bind_ShaderResources() +{ + if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_CamaraPosition", m_pGameInstance->Get_CamPosition(), sizeof(_float3)))) + { + 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_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom1->Bind_ShaderResource(m_pShaderCom, "g_Texture1", 0))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom2->Bind_ShaderResource(m_pShaderCom, "g_Texture2", 0))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom3->Bind_ShaderResource(m_pShaderCom, "g_Texture3", 0))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom4->Bind_ShaderResource(m_pShaderCom, "g_Texture4", 0))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom5->Bind_ShaderResource(m_pShaderCom, "g_Texture5", 0))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_iStep1", &m_bStep1, sizeof(_bool)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_iStep2", &m_bStep2, sizeof(_bool)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_iStep3", &m_bStep3, sizeof(_bool)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageSipos1", &m_vImageposi, sizeof(_float4)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_fSize, sizeof(_float2)))) + { + return E_FAIL; + } + return S_OK; +} + +CEnemy_Detection* CEnemy_Detection::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CEnemy_Detection* pInstance = new CEnemy_Detection(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CEnemy_Detection"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CEnemy_Detection::Clone(void* pArg, CGameObject* pOwner) +{ + CEnemy_Detection* pInstance = new CEnemy_Detection(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CEnemy_Detection"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CEnemy_Detection::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pDiffuse_TextureCom1); + SAFE_RELEASE(m_pDiffuse_TextureCom2); + SAFE_RELEASE(m_pDiffuse_TextureCom3); + SAFE_RELEASE(m_pDiffuse_TextureCom4); + SAFE_RELEASE(m_pDiffuse_TextureCom5); + SAFE_RELEASE(m_pVIBufferCom); + +} + +#ifdef _DEBUG +void CEnemy_Detection::Describe_Entity() +{ +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Enemy_HpBar.cpp b/Jusin154_Team3D/Client/Private/Enemy_HpBar.cpp index b830165c1..ff539516d 100644 --- a/Jusin154_Team3D/Client/Private/Enemy_HpBar.cpp +++ b/Jusin154_Team3D/Client/Private/Enemy_HpBar.cpp @@ -44,9 +44,9 @@ HRESULT CEnemy_HpBar::Initialize(void* pArg) m_fAlpha = 0.f; m_fAlphaTime = 10.f; m_vNine_Slice = _float4(15.f, 100.f, 5.f, 15.f); - m_fMaxHp = 0.f; - m_fCurrentHp = 0.f; - m_fTargetHp = 0.f; + m_fMaxHp = 1.f; + m_fCurrentHp = 1.f; + m_fTargetHp = 1.f; SizeUpX(360.f); m_fMoveSpeed = 5.f; m_bAnimation = false; diff --git a/Jusin154_Team3D/Client/Private/Enemy_Panel.cpp b/Jusin154_Team3D/Client/Private/Enemy_Panel.cpp index f04ecc88b..35147ac54 100644 --- a/Jusin154_Team3D/Client/Private/Enemy_Panel.cpp +++ b/Jusin154_Team3D/Client/Private/Enemy_Panel.cpp @@ -65,7 +65,7 @@ void CEnemy_Panel::Update_Target() if (m_pInfoInstance->Get_TargetMonster()->Get_Stat()->Get_Stat().bBoss == true) { static_cast(m_pBoss_HpBar)->Update_Target(); - static_cast(m_pEnemy_Info)->Set_FadeOut(); + static_cast(m_pEnemy_HpBar)->Set_FadeOut(); static_cast(m_pEnemy_Info)->Update_Target(); static_cast(m_pEnemy_Info)->Set_Font_Move(true); } diff --git a/Jusin154_Team3D/Client/Private/Goblin.cpp b/Jusin154_Team3D/Client/Private/Goblin.cpp index d68058979..dd69b5710 100644 --- a/Jusin154_Team3D/Client/Private/Goblin.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin.cpp @@ -50,26 +50,26 @@ HRESULT CGoblin::Initialize(void* pArg) Add_FSM(); -Set_Anim(); + Set_Anim(); -{ - CFSM::FSM_DESC FSMDesc{}; - FSMDesc.pStates = &m_States; - FSMDesc.pStateMask = &m_iStateMask; + { + CFSM::FSM_DESC FSMDesc{}; + FSMDesc.pStates = &m_States; + FSMDesc.pStateMask = &m_iStateMask; - m_pFSM->Bind_States(FSMDesc); - m_pFSM->Change_State(FSMSTATE::IDLE); -} + 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_pCallBack_Behavior->Initialize(m_pCharacter_Controller, m_pRigidBody); + m_pCallBack_HitReport->Initialize(m_pCharacter_Controller, m_pRigidBody); -m_pCharacter_Controller->Set_Position(XMVectorSet(-40.f, 5.f, -20.f, 1.f)); + m_pCharacter_Controller->Set_Position(XMVectorSet(-60.f, 5.f, -40.f, 1.f)); -m_pEffectPool = m_pGameInstance->Get_Layer(NEXT_LEVEL, TEXT("Layer_EffectPool"))->Get_Object(); -SAFE_ADDREF(m_pEffectPool); + m_pEffectPool = m_pGameInstance->Get_Layer(NEXT_LEVEL, TEXT("Layer_EffectPool"))->Get_Object(); + SAFE_ADDREF(m_pEffectPool); -return S_OK; + return S_OK; } void CGoblin::Priority_Update(_float fTimeDelta) @@ -120,6 +120,8 @@ void CGoblin::Update(_float fTimeDelta) m_fSkillCoolTime[i] = max(0.f, m_fSkillCoolTime[i] - fTimeDelta); + m_pDetection->Set_Active(m_bDetection); + } void CGoblin::Late_Update(_float fTimeDelta) @@ -185,7 +187,7 @@ HRESULT CGoblin::Render() return E_FAIL; } } - else if (true == m_pRigidBody->IsActive()){ + else if (true == m_pRigidBody->IsActive()) { if (FAILED(m_pRigidBody->Render())) { return E_FAIL; } @@ -255,6 +257,8 @@ void CGoblin::OnCollision(CGameObject* pOther, void* pDesc) m_pGoblinSpector->Set_Visible(false); ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc); + Check_HitAngle(XMLoadFloat4(&CollisionDesc->vHitDir)); + _uint iSkillType = dynamic_cast(pOther)->Get_SkillType(); auto damagePair = Get_Damage(m_pInfoInstance->Get_Spell_Damage(iSkillType)); @@ -263,32 +267,27 @@ void CGoblin::OnCollision(CGameObject* pOther, void* pDesc) switch (iSkillType) { case ENUM_CLASS(SKILL_TYPE::DESCENDO): - m_eHitSpell = STATEANIM::KNOCKDOWN_FWD; + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::DESCENDO); break; case ENUM_CLASS(SKILL_TYPE::BOMBARDA): - m_eHitSpell = STATEANIM::KNOCKDOWN_BWD; + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::BOMBARDA); break; case ENUM_CLASS(SKILL_TYPE::JAP): { - m_eHitSpell = STATEANIM::HIT_BWD; - + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::JAP); 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; } - } - break; + break; case ENUM_CLASS(SKILL_TYPE::LEVIOSO): - m_eHitSpell = STATEANIM::HIT_LEVIOSO; - break; - default: - m_eHitSpell = STATEANIM::KNOCKDOWN_FWD; + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::LEVIOSO); break; } - if (!m_pFSM->IsEnable(FSMSTATE::BLINK)){ + if (!m_pFSM->IsEnable(FSMSTATE::BLINK)) { m_pFSM->Change_State(FSMSTATE::HIT); } @@ -298,6 +297,11 @@ void CGoblin::OnHit(CGameObject* pOther, CGameObject* pCaller) { } +void CGoblin::Set_Detection(_bool bDetection) +{ + m_bDetection = bDetection; +} + HRESULT CGoblin::Ready_Components() { CTransform::TRANSFORM_DESC Desc = {}; @@ -312,7 +316,7 @@ HRESULT CGoblin::Ready_Components() /* Com_Model */ if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_strModelPrototypeTag, - reinterpret_cast(&m_pModelCom)))){ + reinterpret_cast(&m_pModelCom)))) { return E_FAIL; } @@ -370,7 +374,7 @@ HRESULT CGoblin::Ready_Parts() Goblin_SpectorDesc.pParentTransform = m_pTransformCom; - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER, &Goblin_SpectorDesc,this, &m_pGoblinSpector))) { + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER, &Goblin_SpectorDesc, this, &m_pGoblinSpector))) { return E_FAIL; } @@ -381,7 +385,7 @@ HRESULT CGoblin::Ready_Parts() PartsDesc.pParentTransform = m_pTransformCom; - if (FAILED(Add_PartObject("Goblin_Particle",g_iStaticLevel, &m_pGoblin_Particle, &PartsDesc))) + if (FAILED(Add_PartObject("Goblin_Particle", g_iStaticLevel, &m_pGoblin_Particle, &PartsDesc))) { return E_FAIL; } @@ -412,6 +416,10 @@ HRESULT CGoblin::Ready_Parts() #pragma endregion + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER, &PartsDesc, this, &m_pDetection))) { + return E_FAIL; + } + return S_OK; } @@ -448,7 +456,7 @@ CGoblin* CGoblin::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) CGameObject* CGoblin::Clone(void* pArg, CGameObject* pOwner) { CGoblin* pInstance = new CGoblin(*this); - + if (FAILED(pInstance->Initialize(pArg))) { MSG_BOX("Failed to Cloned : CGoblin"); @@ -473,6 +481,7 @@ void CGoblin::Free() SAFE_RELEASE(m_pSmoke); SAFE_RELEASE(m_pGoblin_Particle); SAFE_RELEASE(m_pGoblin_Particle2); + SAFE_RELEASE(m_pDetection); SAFE_RELEASE(m_pEffectPool); Safe_Delete(m_pCallBack_Behavior); Safe_Delete(m_pCallBack_HitReport); diff --git a/Jusin154_Team3D/Client/Private/Goblin_BattleAxe.cpp b/Jusin154_Team3D/Client/Private/Goblin_BattleAxe.cpp index c28d48b11..f80a96b46 100644 --- a/Jusin154_Team3D/Client/Private/Goblin_BattleAxe.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin_BattleAxe.cpp @@ -34,6 +34,11 @@ HRESULT CGoblin_BattleAxe::Initialize(void* pArg) return E_FAIL; } +#ifdef _DEBUG + m_pGripShape = (GeometricPrimitive::CreateSphere(m_pContext, 0.3f, 10, false, false)); + m_pSubShape = (GeometricPrimitive::CreateSphere(m_pContext, 0.6f, 10, false, false)); +#endif // _DEBUG + return S_OK; } @@ -49,11 +54,9 @@ void CGoblin_BattleAxe::Priority_Update(_float fTimeDelta) } m_pTransformCom->Set_WorldMatrix(socketMatrix * XMLoadFloat4x4(m_pParentTransformCom->Get_WorldMatrixPtr())); - - + XMStoreFloat4x4(&m_vAxeMat, XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("Bone")) * m_pTransformCom->Get_XMWorldMatrix()); #ifdef _DEBUG Describe_Entity(); - #endif // _DEBUG } @@ -68,16 +71,6 @@ void CGoblin_BattleAxe::Update(_float fTimeDelta) m_bVisible = false; } } - - _matrix AxeMat = XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("Bone")); - - - for (int i = 0; i < 3; ++i) { - AxeMat.r[i] = XMVector3Normalize(AxeMat.r[i]); - } - - XMStoreFloat4x4(&m_vAxeMat, AxeMat * m_pTransformCom->Get_XMWorldMatrix()); - } void CGoblin_BattleAxe::Late_Update(_float fTimeDelta) @@ -126,6 +119,10 @@ HRESULT CGoblin_BattleAxe::Render() m_pShaderCom->Bind_RawValue("g_fDisolveRatio", &zero, sizeof(_float)); } +#ifdef _DEBUG + m_pGripShape->Draw(m_pTransformCom->Get_XMWorldMatrix(), m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW), m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ), DirectX::Colors::Green, nullptr, true); + m_pSubShape->Draw(XMLoadFloat4x4(&m_vAxeMat), m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW), m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ), DirectX::Colors::Purple, nullptr, true); +#endif // _DEBUG return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Goblin_Dagger.cpp b/Jusin154_Team3D/Client/Private/Goblin_Dagger.cpp index 9000f9a41..bdf60e515 100644 --- a/Jusin154_Team3D/Client/Private/Goblin_Dagger.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin_Dagger.cpp @@ -38,7 +38,7 @@ HRESULT CGoblin_Dagger::Initialize(void* pArg) void CGoblin_Dagger::Priority_Update(_float fTimeDelta) { - //m_pModelCom->Combined_BoneMatrix(); + XMStoreFloat4(&m_vStartPos, m_pTransformCom->Get_State(STATE::POSITION)); if (m_bAttach) { _matrix socketMatrix = {}; @@ -73,6 +73,7 @@ void CGoblin_Dagger::Update(_float fTimeDelta) void CGoblin_Dagger::Late_Update(_float fTimeDelta) { + Dagger_Hit(); m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this); } @@ -153,6 +154,73 @@ HRESULT CGoblin_Dagger::Bind_ShaderResources() return S_OK; } +void CGoblin_Dagger::Dagger_Hit() +{ + _vector vStartPos = XMLoadFloat4(&m_vStartPos); + _vector vEndPos = m_pTransformCom->Get_State(STATE::POSITION); + _vector vDir = vEndPos - vStartPos; + _float fLength = XMVectorGetX(XMVector4Length(vDir)); + vDir = XMVector4Normalize(vDir); + m_SweepBuffer = {}; + _bool bHit = m_pGameInstance->SphereCast(0.5f, vStartPos, vDir, fLength, PSX::PxHitFlag::eDEFAULT, PSX::PxQueryFlag::eDYNAMIC, m_SweepBuffer); + if (true == bHit) { + vector Hits; + _uint iHitCount = m_SweepBuffer.nbTouches; + if (true == m_SweepBuffer.hasBlock) { + iHitCount += 1; + Hits.reserve(iHitCount); + Hits.emplace_back(&m_SweepBuffer.block); + } + else { + Hits.reserve(iHitCount); + } + for (_uint i = 0; i < m_SweepBuffer.nbTouches; ++i) { + Hits.emplace_back(&m_SweepBuffer.touches[i]); + } + + for (_uint i = 0; i < Hits.size(); ++i) { + PSX::PxSweepHit* pHit = Hits[i]; + PSX::PxActor* pActor = pHit->actor; + if (nullptr != pActor && nullptr != pActor->userData) { + const PSX::PxSweepHit& hit = m_SweepBuffer.block; + PSX::PxShape* pShape = hit.shape; + ON_COLLISION_INFO tagCollInfo = {}; + + tagCollInfo.vWorldPos.w = 1.f; + + memcpy_s(&tagCollInfo.vWorldPos, sizeof(tagCollInfo.vWorldPos), &hit.position, sizeof(hit.position)); + + memcpy_s(&tagCollInfo.vWorldNomal, sizeof(tagCollInfo.vWorldNomal), &hit.normal, sizeof(hit.normal)); + XMStoreFloat4(&tagCollInfo.vHitDir, vDir); + tagCollInfo.fLength = fLength; + + PhsXUserData* pUserData = static_cast(pActor->userData); + tagCollInfo.pObject = pUserData->pOwner; + switch (PXOBJECT(pUserData->iSubKind)) + { + case Engine::PXOBJECT::PLAYER: + { + if (false == m_bVisible) { + break; + } + m_bVisible = false; + CStat* pStat = pUserData->pCharacter->Get_Owner()->Get_Component(); + pStat->Get_Damage(10.f); + pUserData->pOwner->OnCollision(this, &tagCollInfo); + } + break; + case Engine::PXOBJECT::ALLY_HITBOX: + break; + default: + break; + } + + + } + } + } +} + CGoblin_Dagger* CGoblin_Dagger::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) { diff --git a/Jusin154_Team3D/Client/Private/Goblin_Mage.cpp b/Jusin154_Team3D/Client/Private/Goblin_Mage.cpp index 3a3d07a0c..8c651b2bf 100644 --- a/Jusin154_Team3D/Client/Private/Goblin_Mage.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin_Mage.cpp @@ -66,6 +66,7 @@ HRESULT CGoblin_Mage::Initialize(void* pArg) m_pCharacter_Controller->Set_Position(XMVectorSet(-50.f, 5.f, -10.f, 1.f)); + return S_OK; } @@ -117,6 +118,7 @@ void CGoblin_Mage::Update(_float fTimeDelta) m_fSkillCoolTime[i] = max(0.f, m_fSkillCoolTime[i] - fTimeDelta); } + } void CGoblin_Mage::Late_Update(_float fTimeDelta) @@ -130,9 +132,25 @@ void CGoblin_Mage::Late_Update(_float fTimeDelta) } if (true == m_bLookAt) { - m_pTransformCom->LookAt_Horizontal(XMLoadFloat4(&m_vTargetPos)); + m_pTransformCom->LookAt_Lerp(XMLoadFloat4(&m_vTargetPos),fTimeDelta,3.f); } + m_fHoverTime += fTimeDelta; + + _float hoverY = sinf(m_fHoverTime * m_fHoverSpeed) * m_fHoverHeight; + _matrix HoverMat = XMMatrixTranslation(0.f, hoverY, 0.f); + + _matrix socketMatrix = m_pModelCom->Get_BoneMatrix("LeftArm"); + + for (int i = 0; i < 3; ++i) + socketMatrix.r[i] = XMVector3Normalize(socketMatrix.r[i]); + + _matrix OffsetMat = XMMatrixTranslation(-0.55f, 0.5f, 0.5f); + + _matrix World = socketMatrix * OffsetMat * m_pTransformCom->Get_XMWorldMatrix() * HoverMat; + + m_pGoblin_Orb->Get_Component()->Set_WorldMatrix(World); + m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this); m_pGameInstance->Add_RenderGroup(RENDER::SHADOW, this); } @@ -178,16 +196,16 @@ HRESULT CGoblin_Mage::Render() } #ifdef _DEBUG - if (true == m_pCharacter_Controller->IsActive()) { - if (FAILED(m_pCharacter_Controller->Render())) { - return E_FAIL; - } - } - else if (true == m_pRigidBody->IsActive()) { - if (FAILED(m_pRigidBody->Render())) { - return E_FAIL; - } - } + //if (true == m_pCharacter_Controller->IsActive()) { + // if (FAILED(m_pCharacter_Controller->Render())) { + // return E_FAIL; + // } + //} + //else if (true == m_pRigidBody->IsActive()) { + // if (FAILED(m_pRigidBody->Render())) { + // return E_FAIL; + // } + //} #endif @@ -245,39 +263,48 @@ _vector CGoblin_Mage::Get_LockOnPos() void CGoblin_Mage::OnCollision(CGameObject* pOther, void* pDesc) { - + if (true == m_bDead) { + return; + } + _vector Head = (XMLoadFloat4x4(Get_HeadMatrix()) * m_pTransformCom->Get_XMWorldMatrix()).r[3]; + m_DamageInfo.vTarget_Pos = XMVectorSet(Head.m128_f32[0], Head.m128_f32[1], Head.m128_f32[2], 1.f); ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc); + Check_HitAngle(XMLoadFloat4(&CollisionDesc->vHitDir)); + _uint iSkillType = dynamic_cast(pOther)->Get_SkillType(); + auto damagePair = Get_Damage(m_pInfoInstance->Get_Spell_Damage(iSkillType)); + + m_fHitRadius = CMyTools::Get_Direction2D(m_pTransformCom->Get_State(STATE::LOOK), XMLoadFloat4(&CollisionDesc->vHitDir)); + switch (iSkillType) { case ENUM_CLASS(SKILL_TYPE::DESCENDO): - m_eHitSpell = STATEANIM::KNOCKDOWN_FWD; + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::DESCENDO); break; case ENUM_CLASS(SKILL_TYPE::BOMBARDA): - m_eHitSpell = STATEANIM::KNOCKDOWN_BWD; + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::BOMBARDA); break; case ENUM_CLASS(SKILL_TYPE::JAP): { - m_eHitSpell = STATEANIM::HIT_BWD; - //_float fSkillRatio = m_pInfoInstance->Get_Spell_Info(ENUM_CLASS(SKILL_TYPE::JAP)).fSpell_Damage; - //_float fCoefficient = CollisionDesc->pObject->Get_Component()->Get_Stat().fDamage; - //if (true == Get_Damage(fSkillRatio * fCoefficient)) { - // m_pFSM->Change_State(FSMSTATE::DEAD); - // return; - //} + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::JAP); + 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; + } } break; case ENUM_CLASS(SKILL_TYPE::LEVIOSO): - m_eHitSpell = STATEANIM::HIT_LEVIOSO; - break; - default: - m_eHitSpell = STATEANIM::KNOCKDOWN_FWD; + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::LEVIOSO); break; } - if (!m_pFSM->IsEnable(FSMSTATE::BLINK)){ + + if (!m_pFSM->IsEnable(FSMSTATE::BLINK)) { m_pFSM->Change_State(FSMSTATE::HIT); } + } void CGoblin_Mage::OnHit(CGameObject* pOther, CGameObject* pCaller) @@ -350,8 +377,7 @@ HRESULT CGoblin_Mage::Ready_Parts() } m_pGoblin_Orb->Load("../Bin/Resources/Data/Effect/GoblinMage/Orb_P", static_cast(NEXT_LEVEL)); - - m_pGoblin_Orb->FollowParents(m_pModelCom->Get_BoneMatrixPtr("RightHand")); + Get_PartObject()->Set_Visible(true); return S_OK; } @@ -415,6 +441,7 @@ void CGoblin_Mage::Free() Safe_Delete(m_pCallBack_Behavior); Safe_Delete(m_pCallBack_HitReport); SAFE_RELEASE(m_pGoblin_Orb); + } #ifdef _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Goblin_Mage_States.cpp b/Jusin154_Team3D/Client/Private/Goblin_Mage_States.cpp index b2bfd8eba..3b0cdb130 100644 --- a/Jusin154_Team3D/Client/Private/Goblin_Mage_States.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin_Mage_States.cpp @@ -30,10 +30,12 @@ void CGoblin_Mage::Behavior_IdleEnter() HRESULT CGoblin_Mage::Behavior_IdleExitCheck() { + m_bLookAt = false; if (m_fTargetDistance <= 20.f && m_fTargetDistance != 0.f) { m_vOriginPos = m_pTransformCom->Get_State(STATE::POSITION); m_pEffectPool->Use_Skill(SKILL_TYPE::GOBLIN_PROTEGO, this); + m_bLookAt = true; m_pFSM->Change_State(FSMSTATE::MOVE); } else if (m_fTargetDistance >= 25.f) @@ -154,14 +156,14 @@ HRESULT CGoblin_Mage::Behavior_CombatExitCheck(_float fTimeDelta) { m_pFSM->Change_State(FSMSTATE::BLINK); } - else if (m_fTargetDistance <= 12.f && m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::LIGHTATTACK)] <= 0.f) - { - m_pFSM->Change_State(FSMSTATE::LIGHT_ATTACK); - } - else if (m_fTargetDistance <= 15.f && m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::SPELL)] <= 0.f) + else if (m_fTargetDistance <= 10.f && m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::SPELL)] <= 0.f) { m_pFSM->Change_State(FSMSTATE::SPELL); } + else if (m_fTargetDistance <= 15.f && m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::LIGHTATTACK)] <= 0.f) + { + m_pFSM->Change_State(FSMSTATE::LIGHT_ATTACK); + } else { m_pFSM->Change_State(FSMSTATE::IDLEBREAK); } @@ -181,6 +183,15 @@ void CGoblin_Mage::Behavior_SpellEnter() pairAnimInfo = m_Animation[STATEANIM::SPELL_CHARGE]; m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, false, 1.3f); m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::SPELL)] = m_fMaxSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::SPELL)]; + + Add_Event(pairAnimInfo.first, [this]() { + + m_pEffectPool->Use_Skill(SKILL_TYPE::GOBLIN_MAGE_SIDE, this); + + }, 0.1f); + + + } HRESULT CGoblin_Mage::Behavior_SpellExitCheck(_float fTimeDelta) @@ -193,6 +204,12 @@ HRESULT CGoblin_Mage::Behavior_SpellExitCheck(_float fTimeDelta) { pairAnimInfo = m_Animation[STATEANIM::SPELL]; m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, false, 1.3f); + + Add_Event(pairAnimInfo.first, [this]() { + + m_pEffectPool->Use_Skill(SKILL_TYPE::GOBLIN_MAGE_DOWN, this); + + }, 0.1f); } return S_OK; } @@ -217,8 +234,22 @@ void CGoblin_Mage::Behavior_LightAttackEnter() pair<_uint, _bool> pairAnimInfo = {}; _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex(); pairAnimInfo = m_Animation[STATEANIM::LIGHT_ATTACK]; - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second,1.f,true,1.3f); m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::LIGHTATTACK)] = m_fMaxSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::LIGHTATTACK)]; + + + + Add_Event(pairAnimInfo.first, [this]() { + + m_pEffectPool->Use_Skill(SKILL_TYPE::GOBLIN_MAGE_SIDE, this); + + }, 0.1f); + + Add_Event(pairAnimInfo.first, [this]() { + + m_pEffectPool->Use_Skill(SKILL_TYPE::GOBLIN_MAGE_ATTACK, this); + + }, 0.4f); } HRESULT CGoblin_Mage::Behavior_LightAttackExitCheck(_float fTimeDelta) @@ -332,21 +363,55 @@ void CGoblin_Mage::Behavior_HitEnter() pair<_uint, _bool> pairAnimInfo = {}; m_pFSM->Enable_State(FSMSTATE::HIT); + m_bLookAt = false; + switch (m_eHitSpell) { - case STATEANIM::KNOCKDOWN_FWD: + case ENUM_CLASS(SKILL_TYPE::DESCENDO): pairAnimInfo = m_Animation[STATEANIM::KNOCKDOWN_FWD]; break; - case STATEANIM::TUMBLE2: - pairAnimInfo = m_Animation[STATEANIM::TUMBLE2]; + case ENUM_CLASS(SKILL_TYPE::BOMBARDA): + pairAnimInfo = m_Animation[STATEANIM::STUMBLE_BWD_R]; break; - case STATEANIM::HIT_LEVIOSO: + case ENUM_CLASS(SKILL_TYPE::JAP): { - pairAnimInfo = m_Animation[STATEANIM::HIT_LEVIOSO]; - break; + if (m_fHitDegree >= 90.f) + { + _int iRandIndex = m_pGameInstance->Real_Random_Int(0, 5); + switch (iRandIndex) + { + case 0: + pairAnimInfo = m_Animation[STATEANIM::HIT_BWD]; + break; + case 1: + pairAnimInfo = m_Animation[STATEANIM::HIT_BWD2]; + break; + case 2: + pairAnimInfo = m_Animation[STATEANIM::HIT_BWD3]; + break; + case 3: + pairAnimInfo = m_Animation[STATEANIM::HIT_BWD4]; + break; + default: + break; + } + } + else if (m_fHitDegree >= 45.f) { + + if (m_fHitCross > 0.f) { + pairAnimInfo = m_Animation[STATEANIM::HIT_L]; + } + else { + pairAnimInfo = m_Animation[STATEANIM::HIT_R]; + } + } + else{ + pairAnimInfo = m_Animation[STATEANIM::HIT_FWD]; + } } - default: - pairAnimInfo = m_Animation[STATEANIM::KNOCKDOWN_FWD]; + break; + case ENUM_CLASS(SKILL_TYPE::LEVIOSO): + pairAnimInfo = m_Animation[STATEANIM::HIT_LEVIOSO]; break; } @@ -672,6 +737,10 @@ void CGoblin_Mage::Set_Anim() m_Animation[STATEANIM::LAND] = { 376, false }; m_Animation[STATEANIM::HIT_LEVIOSO] = { 381, false }; + m_Animation[STATEANIM::STUMBLE_BWD_L] = { 394, false }; + m_Animation[STATEANIM::STUMBLE_BWD_R] = { 395, false }; + m_Animation[STATEANIM::STUMBLE_FWD] = { 396, false }; + m_Animation[STATEANIM::DEAD_BWD] = { 317, false }; m_Animation[STATEANIM::DEAD_BWD2] = { 318, false }; m_Animation[STATEANIM::DEAD_FWD] = { 319, false }; diff --git a/Jusin154_Team3D/Client/Private/Goblin_States.cpp b/Jusin154_Team3D/Client/Private/Goblin_States.cpp index 093bc0578..9d8d55c7f 100644 --- a/Jusin154_Team3D/Client/Private/Goblin_States.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin_States.cpp @@ -37,13 +37,21 @@ void CGoblin::Behavior_IdleEnter() HRESULT CGoblin::Behavior_IdleExitCheck() { - if (m_fTargetDistance <= 20.f && m_fTargetDistance != 0.f) + if (m_fTargetDistance <= 20.f && m_fTargetDistance > 10.f) + { + m_bLookAt = false; + m_bDetection = true; + } + if ((m_fTargetDistance <= 10.f && m_fTargetDistance != 0.f) || m_pDetection->Get_Step() == true) { m_vOriginPos = m_pTransformCom->Get_State(STATE::POSITION); + m_bLookAt = true; m_pFSM->Change_State(FSMSTATE::MOVE); } else if (m_fTargetDistance >= 25.f) { + m_bDetection = false; + m_pFSM->Change_State(FSMSTATE::IDLEBREAK); } @@ -59,7 +67,7 @@ void CGoblin::Behavior_IdleBreakEnter() { m_pFSM->Enable_State(FSMSTATE::IDLEBREAK); pair<_uint, _bool> pairAnimInfo; - m_bLookAt = true; + m_bLookAt = false; _int RandIndex = m_pGameInstance->Real_Random_Int(0, 6); switch (RandIndex) { @@ -171,7 +179,7 @@ HRESULT CGoblin::Behavior_MoveExitCheck(_float fTimeDelta) } } - if (m_fTargetDistance <= 15.f && m_fTargetDistance >= 5.f && m_fTargetDistance !=0.f) + if (m_fTargetDistance <= 15.f && m_fTargetDistance >= 5.f && m_fTargetDistance != 0.f) m_pFSM->Change_State(FSMSTATE::COMBAT); return E_FAIL; @@ -234,7 +242,7 @@ void CGoblin::Behavior_SwingEnter() m_pFSM->Enable_State(FSMSTATE::SWING); pairAnimInfo = m_Animation[STATEANIM::SWING_FWD]; - + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::SWING)] = m_fMaxSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::SWING)]; @@ -258,11 +266,11 @@ void CGoblin::Behavior_SwingEnter() Add_Event(pairAnimInfo.first, [&]() { m_bLookAt = true; - m_bStep = true; - m_pGoblinSpector->Set_Visible(false); - m_pGoblinSpector->Spector_Trail_Visible(false); + m_bStep = true; + m_pGoblinSpector->Set_Visible(false); + m_pGoblinSpector->Spector_Trail_Visible(false); - m_pFSM->Change_State(FSMSTATE::SHUFFLE); }, + m_pFSM->Change_State(FSMSTATE::SHUFFLE); }, 0.45f); } @@ -282,7 +290,7 @@ HRESULT CGoblin::Behavior_SwingExitCheck(_float fTimeDelta) vDistance = XMVector4Normalize(vDistance); _float step = dist - fDesiredRange; - m_pTransformCom->AccumulateMomentum(vDistance * step *fTimeDelta*1.5f); + m_pTransformCom->AccumulateMomentum(vDistance * step * fTimeDelta * 1.5f); } } @@ -340,7 +348,7 @@ void CGoblin::Behavior_BlinkEnter() m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); Add_Event(pairAnimInfo.first, - [this]() { + [this]() { m_bVisible = false; m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::TP)] = m_fMaxSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::TP)]; _vector vPlayerPos = XMLoadFloat4(&m_vTargetPos); @@ -438,21 +446,54 @@ void CGoblin::Behavior_HitEnter() m_pFSM->Enable_State(FSMSTATE::HIT); m_bLookAt = false; + switch (m_eHitSpell) { - case STATEANIM::KNOCKDOWN_FWD: + case ENUM_CLASS(SKILL_TYPE::DESCENDO): pairAnimInfo = m_Animation[STATEANIM::KNOCKDOWN_FWD]; break; - case STATEANIM::TUMBLE2: - pairAnimInfo = m_Animation[STATEANIM::TUMBLE2]; + case ENUM_CLASS(SKILL_TYPE::BOMBARDA): + pairAnimInfo = m_Animation[STATEANIM::STUMBLE_BWD_L]; break; - case STATEANIM::HIT_LEVIOSO: + case ENUM_CLASS(SKILL_TYPE::JAP): { - pairAnimInfo = m_Animation[STATEANIM::HIT_LEVIOSO]; - break; + if (m_fHitDegree >= 90.f) + { + _int iRandIndex = m_pGameInstance->Real_Random_Int(0, 5); + switch (iRandIndex) + { + case 0: + pairAnimInfo = m_Animation[STATEANIM::HIT_BWD]; + break; + case 1: + pairAnimInfo = m_Animation[STATEANIM::HIT_BWD2]; + break; + case 2: + pairAnimInfo = m_Animation[STATEANIM::HIT_BWD3]; + break; + case 3: + pairAnimInfo = m_Animation[STATEANIM::HIT_BWD4]; + break; + default: + break; + } + } + else if (m_fHitDegree >= 45.f) { + + if (m_fHitCross > 0.f) { + pairAnimInfo = m_Animation[STATEANIM::HIT_L]; + } + else { + pairAnimInfo = m_Animation[STATEANIM::HIT_R]; + } + } + else { + pairAnimInfo = m_Animation[STATEANIM::HIT_FWD]; + } } - default: - pairAnimInfo = m_Animation[STATEANIM::KNOCKDOWN_FWD]; + break; + case ENUM_CLASS(SKILL_TYPE::LEVIOSO): + pairAnimInfo = m_Animation[STATEANIM::HIT_LEVIOSO]; break; } @@ -497,7 +538,7 @@ HRESULT CGoblin::Behavior_HitExitCheck(_float fTimeDelta) } } - + if (m_pModelCom->IsFinishedAnim()) { m_bLookAt = true; @@ -524,7 +565,7 @@ void CGoblin::Behavior_DeadEnter() m_pCharacter_Controller->SetActive(false); _bool bStrongerKnockDown = { false }; - + switch (m_eHitSpell) { case STATEANIM::KNOCKDOWN_FWD: @@ -564,7 +605,7 @@ void CGoblin::Behavior_DeadEnter() HRESULT CGoblin::Behavior_DeadExitCheck(_float fTimeDelta) { - if ( FLT_EPSILON > m_pModelCom->Get_CurrentTrackProgressRatio()) { + if (FLT_EPSILON > m_pModelCom->Get_CurrentTrackProgressRatio()) { return E_PENDING; } return S_OK; @@ -672,12 +713,12 @@ void CGoblin::Add_FSM() Desc.funcEnterEvent = [this]() { Behavior_DeadEnter(); }; Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_DeadExitCheck(fTimedelta); }; Desc.funcExitEvent = [this]() { Behavior_DeadExit(); }; - Desc.funcLateUpdate = [this](_float fDeadRatio) { + Desc.funcLateUpdate = [this](_float fDeadRatio) { m_fDeadRatio = fDeadRatio; - if (m_fDeadRatio > 1.f) { - m_bDead = true; - } - }; + if (m_fDeadRatio > 1.f) { + m_bDead = true; + } + }; Desc.vDeadTimer.x = FLT_EPSILON5; Desc.vDeadTimer.y = 2.f; m_States.emplace(FSMSTATE::DEAD, CState_Dead::Create(&Desc)); @@ -778,6 +819,10 @@ void CGoblin::Set_Anim() m_Animation[STATEANIM::LAND] = { 376, false }; m_Animation[STATEANIM::HIT_LEVIOSO] = { 381, false }; + m_Animation[STATEANIM::STUMBLE_BWD_L] = { 394, false }; + m_Animation[STATEANIM::STUMBLE_BWD_R] = { 395, false }; + m_Animation[STATEANIM::STUMBLE_FWD] = { 396, false }; + m_Animation[STATEANIM::DEAD_BWD] = { 317, false }; m_Animation[STATEANIM::DEAD_BWD2] = { 318, false }; m_Animation[STATEANIM::DEAD_FWD] = { 319, false }; @@ -827,5 +872,7 @@ void CGoblin::Set_Anim() // Jog 90 R 155 - + // L 394 + // R 395 + // fwd 396 } diff --git a/Jusin154_Team3D/Client/Private/HpBarBG.cpp b/Jusin154_Team3D/Client/Private/HpBarBG.cpp index 81c4232a8..4d87dc2ec 100644 --- a/Jusin154_Team3D/Client/Private/HpBarBG.cpp +++ b/Jusin154_Team3D/Client/Private/HpBarBG.cpp @@ -1,6 +1,7 @@ #include "pch.h" #include "HpBarBG.h" #include "GameInstance.h" +#include "InfoInstance.h" CHpBarBG::CHpBarBG(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) :CElementObject(pDevice, pContext) @@ -8,7 +9,8 @@ CHpBarBG::CHpBarBG(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) } CHpBarBG::CHpBarBG(const CHpBarBG& rhs) - :CElementObject(rhs) + :CElementObject(rhs), + m_pInfoInstance(CInfoInstance::GetInstance()) { } @@ -41,13 +43,14 @@ HRESULT CHpBarBG::Initialize(void* pArg) m_fAlpha = 1.f; m_fAlphaTime = 1.f; m_vNine_Slice = _float4(27.f, 125.f, m_fSizeY * 0.5f, m_fSizeY * 0.5f); - m_fMaxHp = 1000.f; + m_fMaxHp = 0.f; m_fCurrentHp = m_fMaxHp; m_fMoveSpeed = 5.f; m_fHpBGSize = _float2(144.f, 24.f); m_fHpBGPos = _float2(0.f, 13.f); m_fHpBG = _float2(0, m_fSizeX); SizeUpX(240.f); + //m_pInfoInstance->Add_Event(TEXT("PlayerHit"), [this](void* p) {this->Set_Damage(*reinterpret_cast<_float*>(p)); }); return S_OK; } @@ -91,11 +94,18 @@ void CHpBarBG::Update(_float fTimeDelta) } } + if (m_fMaxHp != m_pInfoInstance->Get_PlayerStatPtr()->Get_Stat().fMaxHp) + { + m_fMaxHp = m_pInfoInstance->Get_PlayerStatPtr()->Get_Stat().fMaxHp; + m_fCurrentHp = m_fMaxHp; + } + if (m_fCurrentHp < 0.f) m_fCurrentHp = 0.f; if (m_fDamage <= 0.f) m_fDamage = 0.f; - m_fTargetHp = m_fMaxHp - m_fDamage; + m_fTargetHp = m_pInfoInstance->Get_PlayerStatPtr()->Get_Stat().fCurrentHp; + if (m_fTargetHp > m_fCurrentHp) Heal(fTimeDelta); @@ -103,15 +113,6 @@ void CHpBarBG::Update(_float fTimeDelta) Hit(fTimeDelta); m_fHpBar = m_fCurrentHp / m_fMaxHp; - if (m_pGameInstance->Key_Down(DIK_3)) - { - Lerp_PosX(100.f); - } - - if (m_pGameInstance->Key_Down(DIK_4)) - { - Lerp_PosX(-101.f); - } if (m_fHpBar <= 0.3f) { m_fBlinkTime += fTimeDelta * m_fTimeMult; @@ -125,6 +126,7 @@ void CHpBarBG::Update(_float fTimeDelta) m_fBlinkTime = 0.f; m_fTime = 0.f; } + __super::Update(fTimeDelta); } @@ -170,7 +172,7 @@ void CHpBarBG::Lerp_PosX(_float X) void CHpBarBG::Heal(_float fTimeDelta) { - m_fCurrentHp = CMyTools::Lerp_f1D(m_fTargetHp, m_fCurrentHp, fTimeDelta * m_fMoveSpeed); + m_fCurrentHp = CMyTools::Lerp_f1D(m_fCurrentHp, m_fTargetHp, fTimeDelta * m_fMoveSpeed); } void CHpBarBG::Hit(_float fTimeDelta) @@ -184,6 +186,11 @@ void CHpBarBG::SizeUpX(_float fSizeX) m_fX -= (fSizeX - m_vScale.x) * 0.5f; } +void CHpBarBG::Set_Damage(_float fDamage) +{ + m_fDamage += fDamage; +} + HRESULT CHpBarBG::Bind_ShaderResources() { if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) diff --git a/Jusin154_Team3D/Client/Private/InfoInstance.cpp b/Jusin154_Team3D/Client/Private/InfoInstance.cpp index fbb039561..a8a9027b5 100644 --- a/Jusin154_Team3D/Client/Private/InfoInstance.cpp +++ b/Jusin154_Team3D/Client/Private/InfoInstance.cpp @@ -34,6 +34,11 @@ void CInfoInstance::Change_Level() m_pInteractiveInfo->Change_Level(); } +CStat* CInfoInstance::Get_PlayerStatPtr() +{ + return m_pPlayerInfo->Get_PlayerStatPtr(); +} + void CInfoInstance::Update_CameraCoordinateSystem(_float3& vLook, _float3& vRight) { m_pPlayerInfo->Update_CameraCoordinateSystem(vLook, vRight); @@ -100,6 +105,7 @@ CMonster* CInfoInstance::Get_TargetMonster() } #pragma endregion + #pragma region MAP_INFO HRESULT CInfoInstance::Load_MapObjects(const _char* pFilePath) { @@ -177,7 +183,7 @@ void CInfoInstance::Key_Input(_uint Input) Event_CallBack(TEXT("Ancient_Magic_Throw")); break; case ENUM_CLASS(KEYINPUT::INPUT_G): - + Event_CallBack(TEXT("Use_Potion")); break; case ENUM_CLASS(KEYINPUT::INPUT_TAB): @@ -273,9 +279,17 @@ HRESULT CInfoInstance::Initialize_Information(ID3D11Device* pDevice, ID3D11Devic if (nullptr == m_pMapInfo) { return E_FAIL; } - m_pPlayerInfo = CPlayerInfo::Create(pDevice, pContext); - if (nullptr == m_pPlayerInfo) { - return E_FAIL; + + { // 순서 고정 +#pragma region STAT PROTOTYPE + if (FAILED(Stat_FileLoad("../Bin/Resources/Data/Stat/Stat.xml"))) { + return E_FAIL; + } +#pragma endregion + m_pPlayerInfo = CPlayerInfo::Create(pDevice, pContext); + if (nullptr == m_pPlayerInfo) { + return E_FAIL; + } } m_pMonsterInfo = CMonsterInfo::Create(pDevice, pContext); if (nullptr == m_pMonsterInfo) { @@ -293,12 +307,40 @@ HRESULT CInfoInstance::Initialize_Information(ID3D11Device* pDevice, ID3D11Devic return S_OK; } +HRESULT CInfoInstance::Stat_FileLoad(const _char* pDirectoryPath) +{ + filesystem::path pathStatFile = pDirectoryPath; + + tinyxml2::XMLDocument doc; + tinyxml2::XMLError Error = doc.LoadFile(pathStatFile.string().c_str()); + if (Error != tinyxml2::XML_SUCCESS) { + return E_FAIL; + } + + tinyxml2::XMLElement* pStatInfo = doc.FirstChildElement("StatInfo"); + if (!pStatInfo) { + return E_FAIL; + } + + _uint iNumChild = pStatInfo->ChildElementCount(); + tinyxml2::XMLNode* pChild = pStatInfo->FirstChildElement(); + for (_uint i = 0; i < iNumChild; ++i) { + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, CMyTools::ToWstring(pChild->Value()), + CStat::Create(m_pDevice, m_pContext, pChild)))) { + return E_FAIL; + } + pChild = pChild->NextSiblingElement(); + } + + return S_OK; +} void CInfoInstance::Release_Information() { UI_Event.clear(); DestroyInstance(); + SAFE_RELEASE(m_pMapInfo); SAFE_RELEASE(m_pPlayerInfo); SAFE_RELEASE(m_pMonsterInfo); diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp index 0daf9e672..a4fa92b76 100644 --- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp +++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp @@ -24,6 +24,7 @@ #include "Goblin.h" #include "Goblin_Mage.h" #include "Goblin_Spector.h" +#include "NPC_Ollivander.h" #pragma endregion @@ -39,6 +40,12 @@ HRESULT CLevel_GamePlay::Initialize(void* pArg) if (FAILED(Ready_Lights())) { return E_FAIL; } + + //플레이어 , 맵 보다 먼저 생성해야함 ! + if (FAILED(Reday_Layer_EffectPool())) { + return E_FAIL; + } + if (FAILED(Ready_Background())) { return E_FAIL; } @@ -48,10 +55,7 @@ HRESULT CLevel_GamePlay::Initialize(void* pArg) if (FAILED(Ready_Layer_UI(LAYER_UI))) { return E_FAIL; } - //플레이어보다 먼저 생성해야함! - if (FAILED(Reday_Layer_EffectPool())) { - return E_FAIL; - } + // 이것도 플레이어보다 먼저 생성해야함! if (FAILED(Ready_Layer_Item(LAYER_ITEM))) { return E_FAIL; @@ -228,16 +232,16 @@ HRESULT CLevel_GamePlay::Ready_Background() // >> M A P Configuration << // 맵 로드할지 안할지 bool 설정 // --------------------------------- - _bool isReady_Background = { false }; + _bool isReady_Background = { true }; #ifdef gimch isReady_Background = true; #endif // gimch #ifdef Bin - isReady_Background = true; + isReady_Background = false; #endif // #ifdef 진우 - isReady_Background = false; + isReady_Background = true; #endif // #ifdef 기무리 isReady_Background = true; @@ -256,14 +260,14 @@ HRESULT CLevel_GamePlay::Ready_Background() else { /* 전체 맵 */ - CInfoInstance::GetInstance()->Load_MapObjects("Hogsmeade_MapContainer_Data"); + //CInfoInstance::GetInstance()->Load_MapObjects("Hogsmeade_MapContainer_Data"); /* 물 오브젝트 */ if (FAILED(CInfoInstance::GetInstance()->Load_WaterElemet("Element_Water_Info"))) return E_FAIL; /* 조명 오브젝트 */ - CInfoInstance::GetInstance()->Load_LightElements("LightElement"); + /*CInfoInstance::GetInstance()->Load_LightElements("LightElement");*/ /* 상호작용 오브젝트 */ CInfoInstance::GetInstance()->Load_InteractableElements("E_INTER_Barrel"); @@ -477,6 +481,9 @@ HRESULT CLevel_GamePlay::Ready_Layer_Player(const _wstring& strLayerTag) if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag))) { return E_FAIL; } + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag))) { + return E_FAIL; + } return S_OK; } @@ -517,6 +524,7 @@ HRESULT CLevel_GamePlay::Ready_Layer_Monster() return E_FAIL; } } + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index 57b8b55b4..c1811a8c2 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -27,6 +27,7 @@ #include "Goblin_Mage.h" #include "Goblin_Spector.h" #include "Troll.h" +#include "NPC_Ollivander.h" #pragma endregion @@ -76,6 +77,7 @@ #include "Enemy_HpBar.h" #include "Enemy_Info.h" #include "Boss_HpBar.h" +#include "Enemy_Detection.h" #include "Spell_Canvas.h" #include "Spell_Panel.h" @@ -127,6 +129,7 @@ #include "Lumos.h" + #include "TrollSwing.h" #include "Troll_Nomal_Smoke.h" #include "Troll_Rush_Hit.h" @@ -135,7 +138,14 @@ #include "Goblin_Protego.h" #include "Goblin_Attack.h" +#include "Mage_Down_Attack.h" +#include "Mage_Nomal_Attack.h" +#include "MageSide.h" +#include "StunEffect.h" +#include "Box_Splesh.h" +#include "Chair_Splesh.h" +#include "Barral_Splesh.h" #pragma endregion @@ -295,16 +305,16 @@ HRESULT CLoader::Loading_For_GamePlay() { m_strMessage = TEXT("텍스쳐를(을) 로딩 중 입니다."); - _bool isLoad_Background = { false }; + _bool isLoad_Background = { true }; #ifdef gimch isLoad_Background = true; #endif // gimch #ifdef Bin - isLoad_Background = true; + isLoad_Background = false; #endif // #ifdef 진우 - isLoad_Background = false; + isLoad_Background = true; #endif // #ifdef 기무리 isLoad_Background = true; @@ -665,6 +675,22 @@ HRESULT CLoader::Loading_For_GamePlay() _wstring wstrFilePath = CMyTools::ToWstring(strFilePath); + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, wstrFileName, + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) { + return E_FAIL; + } + + return S_OK; + + }); + + Asset_FileLoad("../Bin/Resources/Textures/Enemy", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath) + { + + _string strFilePath = pFilePath; + _wstring wstrFilePath = CMyTools::ToWstring(strFilePath); + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, wstrFileName, CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) { return E_FAIL; @@ -845,203 +871,203 @@ HRESULT CLoader::Loading_For_GamePlay() } #pragma endregion #pragma region UI_ANI - //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Altering_Spell"), - // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Altering_Spell\\Altering_Spell%d.png"), 349)))) - //{ - // return E_FAIL; - //} + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Altering_Spell"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Altering_Spell\\Altering_Spell%d.png"), 349)))) + { + return E_FAIL; + } - //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Alohomora"), - // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Alohomora\\Alohomora%d.png"), 394)))) - //{ - // return E_FAIL; - //} + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Alohomora"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Alohomora\\Alohomora%d.png"), 394)))) + { + return E_FAIL; + } - //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Ancient_Magic"), - // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Ancient_Magic\\Ancient_Magic%d.png"), 152)))) - //{ - // return E_FAIL; - //} + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Ancient_Magic"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Ancient_Magic\\Ancient_Magic%d.png"), 152)))) + { + return E_FAIL; + } - //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Ancient_Magic_Throw"), - // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Ancient_Magic_Throw\\Ancient_Magic_Throw%d.png"), 89)))) - //{ - // return E_FAIL; - //} + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Ancient_Magic_Throw"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Ancient_Magic_Throw\\Ancient_Magic_Throw%d.png"), 89)))) + { + return E_FAIL; + } - //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Arresto_Momentum"), - // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Arresto_Momentum\\Arresto_Momentum%d.png"), 120)))) - //{ - // return E_FAIL; - //} + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Arresto_Momentum"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Arresto_Momentum\\Arresto_Momentum%d.png"), 120)))) + { + return E_FAIL; + } - //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Avada_Kedavra"), - // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Avada_Kedavra\\Avada_Kedavra%d.png"), 208)))) - //{ - // return E_FAIL; - //} + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Avada_Kedavra"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Avada_Kedavra\\Avada_Kedavra%d.png"), 208)))) + { + return E_FAIL; + } - //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Basic_Cast"), - // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Basic_Cast\\Basic_Cast%d.png"), 308)))) - //{ - // return E_FAIL; - //} + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Basic_Cast"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Basic_Cast\\Basic_Cast%d.png"), 308)))) + { + return E_FAIL; + } - //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Beast_Feed"), - // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Beast_Feed\\Beast_Feed%d.png"), 378)))) - //{ - // return E_FAIL; - //} + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Beast_Feed"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Beast_Feed\\Beast_Feed%d.png"), 378)))) + { + return E_FAIL; + } - //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Beast_Petting_Brush"), - // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Beast_Petting_Brush\\Beast_Petting_Brush%d.png"), 327)))) - //{ - // return E_FAIL; - //} + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Beast_Petting_Brush"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Beast_Petting_Brush\\Beast_Petting_Brush%d.png"), 327)))) + { + return E_FAIL; + } - //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Bombarda"), - // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Bombarda\\Bombarda%d.png"), 262)))) - //{ - // return E_FAIL; - //} + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Bombarda"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Bombarda\\Bombarda%d.png"), 262)))) + { + return E_FAIL; + } - //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Confringo"), - // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Confringo\\Confringo%d.png"), 157)))) - //{ - // return E_FAIL; - //} + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Confringo"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Confringo\\Confringo%d.png"), 157)))) + { + return E_FAIL; + } - //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Conjuring_Spell"), - // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Conjuring_Spell\\Conjuring_Spell%d.png"), 115)))) - //{ - // return E_FAIL; - //} + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Conjuring_Spell"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Conjuring_Spell\\Conjuring_Spell%d.png"), 115)))) + { + return E_FAIL; + } - //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Descendo"), - // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Descendo\\Descendo%d.png"), 155)))) - //{ - // return E_FAIL; - //} + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Descendo"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Descendo\\Descendo%d.png"), 155)))) + { + return E_FAIL; + } - //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Depulso"), - // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Depulso\\Depulso%d.png"), 152)))) - //{ - // return E_FAIL; - //} + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Depulso"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Depulso\\Depulso%d.png"), 152)))) + { + return E_FAIL; + } - //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Diffindo"), - // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Diffindo\\Diffindo%d.png"), 150)))) - //{ - // return E_FAIL; - //} + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Diffindo"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Diffindo\\Diffindo%d.png"), 150)))) + { + return E_FAIL; + } - //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Disillusionment"), - // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Disillusionment\\Disillusionment%d.png"), 260)))) - //{ - // return E_FAIL; - //} + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Disillusionment"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Disillusionment\\Disillusionment%d.png"), 260)))) + { + return E_FAIL; + } - //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Evanesco"), - // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Evanesco\\Evanesco%d.png"), 136)))) - //{ - // return E_FAIL; - //} + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Evanesco"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Evanesco\\Evanesco%d.png"), 136)))) + { + return E_FAIL; + } - //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Expelliarmus"), - // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Expelliarmus\\Expelliarmus%d.png"), 146)))) - //{ - // return E_FAIL; - //} + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Expelliarmus"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Expelliarmus\\Expelliarmus%d.png"), 146)))) + { + return E_FAIL; + } - //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Flipendo"), - // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Flipendo\\Flipendo%d.png"), 188)))) - //{ - // return E_FAIL; - //} + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Flipendo"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Flipendo\\Flipendo%d.png"), 188)))) + { + return E_FAIL; + } - //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Glacius"), - // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Glacius\\Glacius%d.png"), 156)))) - //{ - // return E_FAIL; - //} + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Glacius"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Glacius\\Glacius%d.png"), 156)))) + { + return E_FAIL; + } - //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Imperio"), - // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Imperio\\Imperio%d.png"), 462)))) - //{ - // return E_FAIL; - //} + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Imperio"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Imperio\\Imperio%d.png"), 462)))) + { + return E_FAIL; + } - //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Incendio"), - // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Incendio\\Incendio%d.png"), 213)))) - //{ - // return E_FAIL; - //} + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Incendio"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Incendio\\Incendio%d.png"), 213)))) + { + return E_FAIL; + } - //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Levioso"), - // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Levioso\\Levioso%d.png"), 180)))) - //{ - // return E_FAIL; - //} + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Levioso"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Levioso\\Levioso%d.png"), 180)))) + { + return E_FAIL; + } - //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Lumos"), - // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Lumos\\Lumos%d.png"), 365)))) - //{ - // return E_FAIL; - //} + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Lumos"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Lumos\\Lumos%d.png"), 365)))) + { + return E_FAIL; + } - //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Nab_Sack"), - // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Nab_Sack\\Nab_Sack%d.png"), 235)))) - //{ - // return E_FAIL; - //} + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Nab_Sack"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Nab_Sack\\Nab_Sack%d.png"), 235)))) + { + return E_FAIL; + } - //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Petrificus_Totalus"), - // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Petrificus_Totalus\\Petrificus_Totalus%d.png"), 275)))) - //{ - // return E_FAIL; - //} + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Petrificus_Totalus"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Petrificus_Totalus\\Petrificus_Totalus%d.png"), 275)))) + { + return E_FAIL; + } - //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Protego"), - // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Protego\\Protego%d.png"), 285)))) - //{ - // return E_FAIL; - //} + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Protego"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Protego\\Protego%d.png"), 285)))) + { + return E_FAIL; + } - //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Reparo"), - // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Reparo\\Reparo%d.png"), 385)))) - //{ - // return E_FAIL; - //} + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Reparo"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Reparo\\Reparo%d.png"), 385)))) + { + return E_FAIL; + } - //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Revelio"), - // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Revelio\\Revelio%d.png"), 227)))) - //{ - // return E_FAIL; - //} + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Revelio"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Revelio\\Revelio%d.png"), 227)))) + { + return E_FAIL; + } - //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Stupefy"), - // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Stupefy\\Stupefy%d.png"), 222)))) - //{ - // return E_FAIL; - //} + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Stupefy"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Stupefy\\Stupefy%d.png"), 222)))) + { + return E_FAIL; + } - //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Transformation"), - // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Transformation\\Transformation%d.png"), 146)))) - //{ - // return E_FAIL; - //} + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Transformation"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Transformation\\Transformation%d.png"), 146)))) + { + return E_FAIL; + } - //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Wingardium_Leviosa"), - // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Wingardium_Leviosa\\Wingardium_Leviosa%d.png"), 273)))) - //{ - // return E_FAIL; - //} + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Wingardium_Leviosa"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Wingardium_Leviosa\\Wingardium_Leviosa%d.png"), 273)))) + { + return E_FAIL; + } - //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Crucio"), - // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Crucio\\Crucio%d.png"), 216)))) - //{ - // return E_FAIL; - //} + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Crucio"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Crucio\\Crucio%d.png"), 216)))) + { + return E_FAIL; + } #pragma endregion @@ -1251,6 +1277,12 @@ HRESULT CLoader::Loading_For_GamePlay() return E_FAIL; } + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_NPC_PBR_ANIM, + CShader::Create(m_pDevice, m_pContext, TEXT("../Bin/Resources/ShaderFiles/Shader_NPC_PBR_Anim.hlsl"), + VTXANIMMESH::Elements, VTXANIMMESH::iNumElements)))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_MESH, CShader::Create(m_pDevice, m_pContext, TEXT("../Bin/Resources/ShaderFiles/Shader_VtxMesh.hlsl"), VTXMESH::Elements, VTXMESH::iNumElements)))) { @@ -1417,6 +1449,16 @@ HRESULT CLoader::Loading_For_GamePlay() CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/GoblinSpector/GoblinSpector.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) return E_FAIL; + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_GerboldOlivander_Model"), + CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))){ + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Troll_Model"), + CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/SubTroll/troll.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))){ + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Troll_Model"), CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/SubTroll/troll.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))){ return E_FAIL; @@ -1445,7 +1487,7 @@ HRESULT CLoader::Loading_For_GamePlay() return E_FAIL; if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_BattleAxe_Model"), - CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Goblin_BattleAxe/SK_WPN_GOB_BattleAxe01.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) + CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Goblin_BattleAxe/SK_WPN_GOB_BattleAxe01.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationX(XMConvertToRadians(-90.f)) * XMMatrixIdentity())))) return E_FAIL; @@ -1528,6 +1570,34 @@ HRESULT CLoader::Loading_For_GamePlay() return E_FAIL; } + if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CMage_Down_Attack::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CMage_Nomal_Attack::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CMageSide::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CStunEffect::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CBox_Splesh::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CBarral_Splesh::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CChair_Splesh::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CWandEnd::Create(m_pDevice, m_pContext)))) { return E_FAIL; } @@ -1539,6 +1609,17 @@ HRESULT CLoader::Loading_For_GamePlay() m_strMessage = TEXT("Model Loading.."); + + Asset_FileLoad("../Bin/Resources/Models/Effect/Box", L"Prototype_Instance_Model_", [&](_wstring wstrFileName, const _char* pFilePath) { + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, wstrFileName, + CInstance_Model::Create(m_pDevice, m_pContext, pFilePath, MODEL::NONANIM, XMMatrixScaling(0.1f, 0.1f, 0.1f) * XMMatrixIdentity(), 0)))) + return E_FAIL; + + return S_OK; + + }); + Asset_FileLoad("../Bin/Resources/Models/Effect/ParticleMesh", L"Prototype_Instance_Model_", [&](_wstring wstrFileName, const _char* pFilePath) { if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, wstrFileName, @@ -1687,6 +1768,10 @@ HRESULT CLoader::Loading_For_GamePlay() if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CBoss_HpBar::Create(m_pDevice, m_pContext)))) { return E_FAIL; } + /* For.Prototype_GameObject_Enemy_Detection*/ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CEnemy_Detection::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } /* For.Prototype_GameObject_Spell_Canvas*/ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpell_Canvas::Create(m_pDevice, m_pContext)))) @@ -2062,11 +2147,11 @@ HRESULT CLoader::Loading_For_GamePlay() if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CTroll::Create(m_pDevice, m_pContext)))) return E_FAIL; -#pragma endregion -#pragma region STAT PROTOTYPE - if (FAILED(Stat_FileLoad("../Bin/Resources/Data/Stat/Stat.xml"))) { + /* For.Prototype_GameObject_Troll */ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CNPC_Ollivander::Create(m_pDevice, m_pContext)))){ return E_FAIL; } + #pragma endregion @@ -2233,33 +2318,6 @@ HRESULT CLoader::Asset_FileLoad(const _char* pDirectoryPath, const _tchar* pPreN return S_OK; } -HRESULT CLoader::Stat_FileLoad(const _char* pDirectoryPath) -{ - filesystem::path pathStatFile = pDirectoryPath; - - tinyxml2::XMLDocument doc; - tinyxml2::XMLError Error = doc.LoadFile(pathStatFile.string().c_str()); - if (Error != tinyxml2::XML_SUCCESS) { - return E_FAIL; - } - - tinyxml2::XMLElement* pStatInfo = doc.FirstChildElement("StatInfo"); - if (!pStatInfo) { - return E_FAIL; - } - - _uint iNumChild = pStatInfo->ChildElementCount(); - tinyxml2::XMLNode* pChild = pStatInfo->FirstChildElement(); - for (_uint i = 0; i < iNumChild; ++i) { - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, CMyTools::ToWstring(pChild->Value()), - CStat::Create(m_pDevice, m_pContext, pChild)))) { - return E_FAIL; - } - pChild = pChild->NextSiblingElement(); - } - - return S_OK; -} vector* APIENTRY Deferred_FolderLoad_Main(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const _char* pDirectoryPath, const _char* pFileExt, _bool bUseTag) { diff --git a/Jusin154_Team3D/Client/Private/Lumos.cpp b/Jusin154_Team3D/Client/Private/Lumos.cpp index a296efff4..9159605c9 100644 --- a/Jusin154_Team3D/Client/Private/Lumos.cpp +++ b/Jusin154_Team3D/Client/Private/Lumos.cpp @@ -49,6 +49,14 @@ void CLumos::Priority_Update(_float fTimeDelta) { __super::Priority_Update(fTimeDelta); + + CWand* pWand = static_cast(m_pOwner); + + if (pWand == nullptr) + return; + + m_pLumos_Light->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion()); + } void CLumos::Update(_float fTimeDelta) @@ -59,15 +67,6 @@ void CLumos::Update(_float fTimeDelta) __super::Update(fTimeDelta); Update_Event(fTimeDelta); - - - CWand* pWand = static_cast(m_pOwner); - - if (pWand == nullptr) - return; - - m_pLumos_Light->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion()); - } void CLumos::Late_Update(_float fTimeDelta) diff --git a/Jusin154_Team3D/Client/Private/MageSide.cpp b/Jusin154_Team3D/Client/Private/MageSide.cpp new file mode 100644 index 000000000..ae98ce65e --- /dev/null +++ b/Jusin154_Team3D/Client/Private/MageSide.cpp @@ -0,0 +1,212 @@ +#include "pch.h" +#include "MageSide.h" + +#include "GameInstance.h" +#include "EffectParts.h" +#include "Wand.h" +#include "Player.h" +#include "TrailObject.h" + +CMageSide::CMageSide(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CEffect_Container{ pDevice, pContext } +{ +} + +CMageSide::CMageSide(const CMageSide& rhs) + : CEffect_Container(rhs) +{ +} + +HRESULT CMageSide::Initialize_Prototype() +{ + + return S_OK; + +} + +HRESULT CMageSide::Initialize(void* pArg) +{ + if (FAILED(__super::Initialize(pArg))) + return E_FAIL; + + if (FAILED(Ready_Components(pArg))) + return E_FAIL; + + + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/GoblinMage/MageSide"))) + return E_FAIL; + + + m_wstrEffectName = L"MageSide"; + + m_pMage_PT = Get_PartObject("Mage_PT0"); + m_pMage_Trail = Get_PartObject("Mage_Trail"); + + SAFE_ADDREF(m_pMage_PT); + SAFE_ADDREF(m_pMage_Trail); + + m_fDuration = 5.f; + + m_Events.emplace(3.f, [&]() { + m_isParticleEnd = true; + m_pMage_PT->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f, -500.f, 0.f, 1.f)); + + }); + + return S_OK; +} + +void CMageSide::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); + +} + +void CMageSide::Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Update(fTimeDelta); + + Update_Event(fTimeDelta); + + + _matrix BoneMat = XMLoadFloat4x4(m_pOwner->Get_Component()->Get_BoneMatrixPtr("RightHand")); + + for (int i = 0; i < 3; ++i) { + BoneMat.r[i] = XMVector3Normalize(BoneMat.r[i]); + } + + + + _matrix WorldMat = m_pOwner->Get_Component()->Get_XMWorldMatrix(); + + _matrix CombinedMat = BoneMat * WorldMat; + + + if(m_isParticleEnd == false) + m_pMage_PT->Get_Component()->Set_State(STATE::POSITION, CombinedMat.r[3]); + m_pMage_Trail->Trail_Update(CombinedMat, fTimeDelta); + +} + +void CMageSide::Late_Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Late_Update(fTimeDelta); + + +} + +HRESULT CMageSide::Pre_Setting(CGameObject* pObject, void* pArg) +{ + if (FAILED(__super::Pre_Setting(pObject, nullptr))) + return E_FAIL; + + _matrix BoneMat = XMLoadFloat4x4(m_pOwner->Get_Component()->Get_BoneMatrixPtr("RightHand")); + _matrix WorldMat = m_pOwner->Get_Component()->Get_XMWorldMatrix(); + + _matrix CombinedMat = BoneMat * WorldMat; + + m_pMage_Trail->Get_Component()->Reset_Trail(); + + m_pMage_PT->Get_Component()->Set_State(STATE::POSITION, CombinedMat.r[3]); + + m_pMage_PT->Set_Visible(true); + m_pMage_Trail->Set_Visible(true); + + m_isParticleEnd = false; + + return S_OK; +} + +HRESULT CMageSide::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CMageSide::Ready_Child() +{ + return S_OK; +} + +CMageSide* CMageSide::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CMageSide* pInstance = new CMageSide(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CMageSide"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + + +CGameObject* CMageSide::Clone(void* pArg, CGameObject* pOwner) +{ + CMageSide* pInstance = new CMageSide(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CMageSide"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CMageSide::OnCollision(CGameObject* pOther, void* pDesc) +{ + _int iIndex = CollisionCheck(); + + if (iIndex < 0) + return; + + if (m_isCollisionEnter == true) + return; + + m_isCollisionEnter = true; + + _vector vPos = XMVectorSet(m_Hitbuffer.touches[iIndex].position.x, m_Hitbuffer.touches[iIndex].position.y, m_Hitbuffer.touches[iIndex].position.z, 1.f); + + + for (auto& pPair : m_PartObjects) + { + pPair.second->Set_Visible(true); + pPair.second->Get_Component()->Set_State(STATE::POSITION, vPos); + } + + +} + +void CMageSide::Free() +{ + __super::Free(); + + + SAFE_RELEASE(m_pMage_PT); + SAFE_RELEASE(m_pMage_Trail); + +} +#ifdef _DEBUG +void CMageSide::Describe_Entity() +{ + +} +#endif + +HRESULT CMageSide::Bind_ShaderResources() +{ + return S_OK; +} + + diff --git a/Jusin154_Team3D/Client/Private/Mage_Down_Attack.cpp b/Jusin154_Team3D/Client/Private/Mage_Down_Attack.cpp new file mode 100644 index 000000000..14c4221e7 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Mage_Down_Attack.cpp @@ -0,0 +1,184 @@ +#include "pch.h" +#include "Mage_Down_Attack.h" + +#include "GameInstance.h" +#include "EffectParts.h" +#include "Wand.h" +#include "Player.h" +#include "InfoInstance.h" + +CMage_Down_Attack::CMage_Down_Attack(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CEffect_Container{ pDevice, pContext } +{ +} + +CMage_Down_Attack::CMage_Down_Attack(const CMage_Down_Attack& rhs) + : CEffect_Container(rhs), + m_pInfoInstance(CInfoInstance::GetInstance()) +{ + SAFE_ADDREF(m_pInfoInstance); +} + +HRESULT CMage_Down_Attack::Initialize_Prototype() +{ + + return S_OK; + +} + +HRESULT CMage_Down_Attack::Initialize(void* pArg) +{ + if (FAILED(__super::Initialize(pArg))) + return E_FAIL; + + if (FAILED(Ready_Components(pArg))) + return E_FAIL; + + + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/GoblinMage/DownAttack"))) + return E_FAIL; + + + m_wstrEffectName = L"DownAttack"; + + + m_fDuration = 2.F; + + return S_OK; +} + +void CMage_Down_Attack::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); + +} + +void CMage_Down_Attack::Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Update(fTimeDelta); + + Update_Event(fTimeDelta); + +} + +void CMage_Down_Attack::Late_Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Late_Update(fTimeDelta); + + +} + +HRESULT CMage_Down_Attack::Pre_Setting(CGameObject* pObject, void* pArg) +{ + if (FAILED(__super::Pre_Setting(pObject, nullptr))) + return E_FAIL; + + _vector vPos = m_pOwner->Get_Component()->Get_State(STATE::POSITION); + + vPos += m_pOwner->Get_Component()->Get_State(STATE::LOOK) * 3.f; + vPos += XMVectorSet(0.f, 0.2f, 0.f, 0.f); + + CEffectParts* pBottomPT0 = Get_PartObject("BottomPT0"); + CEffectParts* pBottomPT1 = Get_PartObject("BottomPT1"); + CEffectParts* pDown_R = Get_PartObject("Down_R"); + CEffectParts* pSmoke = Get_PartObject("Smoke"); + CEffectParts* pRound_PT = Get_PartObject("Round_PT"); + + pBottomPT0->Get_Component()->Set_State(STATE::POSITION, vPos); + pBottomPT1->Get_Component()->Set_State(STATE::POSITION, vPos); + pDown_R->Get_Component()->Set_State(STATE::POSITION, vPos); + pSmoke->Get_Component()->Set_State(STATE::POSITION, vPos); + pRound_PT->Get_Component()->Set_State(STATE::POSITION, vPos); + + pBottomPT0->Set_Visible(true); + pBottomPT1->Set_Visible(true); + pDown_R->Set_Visible(true); + pSmoke->Set_Visible(true); + pRound_PT->Set_Visible(true); + + + CPlayer* pPlayer = static_cast(m_pInfoInstance->Get_NearestPlayerAlly(m_pOwner->Get_WorldPostion()).first); + + + if (pPlayer == nullptr) + return E_FAIL; + + _float fDistance = XMVectorGetX(XMVector4Length(pPlayer->Get_WorldPostion() - Get_WorldPostion())); + + _float fShakeValue = clamp(30.f / fDistance, 1.f, 5.f); + + pPlayer->Start_CameraShake(0.6f, fShakeValue); + + return S_OK; +} + +HRESULT CMage_Down_Attack::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CMage_Down_Attack::Ready_Child() +{ + return S_OK; +} + +CMage_Down_Attack* CMage_Down_Attack::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CMage_Down_Attack* pInstance = new CMage_Down_Attack(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CMage_Down_Attack"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + + +CGameObject* CMage_Down_Attack::Clone(void* pArg, CGameObject* pOwner) +{ + CMage_Down_Attack* pInstance = new CMage_Down_Attack(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CMage_Down_Attack"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CMage_Down_Attack::OnCollision(CGameObject* pOther, void* pDesc) +{ + +} + +void CMage_Down_Attack::Free() +{ + __super::Free(); + SAFE_RELEASE(m_pInfoInstance); +} +#ifdef _DEBUG +void CMage_Down_Attack::Describe_Entity() +{ + +} +#endif + +HRESULT CMage_Down_Attack::Bind_ShaderResources() +{ + return S_OK; +} + + diff --git a/Jusin154_Team3D/Client/Private/Mage_Nomal_Attack.cpp b/Jusin154_Team3D/Client/Private/Mage_Nomal_Attack.cpp new file mode 100644 index 000000000..90b466488 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Mage_Nomal_Attack.cpp @@ -0,0 +1,240 @@ +#include "pch.h" +#include "Mage_Nomal_Attack.h" + +#include "GameInstance.h" +#include "EffectParts.h" +#include "Wand.h" +#include "Player.h" +#include "InfoInstance.h" + +CMage_Nomal_Attack::CMage_Nomal_Attack(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CEffect_Container{ pDevice, pContext } +{ +} + +CMage_Nomal_Attack::CMage_Nomal_Attack(const CMage_Nomal_Attack& rhs) + : CEffect_Container(rhs), + m_pInfoInstance(CInfoInstance::GetInstance()) +{ + SAFE_ADDREF(m_pInfoInstance); +} + +HRESULT CMage_Nomal_Attack::Initialize_Prototype() +{ + + return S_OK; + +} + +HRESULT CMage_Nomal_Attack::Initialize(void* pArg) +{ + if (FAILED(__super::Initialize(pArg))) + return E_FAIL; + + if (FAILED(Ready_Components(pArg))) + return E_FAIL; + + + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/GoblinMage/NomalAttack"))) + return E_FAIL; + + + m_wstrEffectName = L"Mage_Nomal_Attack"; + + m_pCircle_Proj = Get_PartObject("Circle_Proj"); + m_pProj_PT1 = Get_PartObject("Proj_PT"); + m_pProj_PT2 = Get_PartObject("Proj_PT2"); + + SAFE_ADDREF(m_pCircle_Proj); + SAFE_ADDREF(m_pProj_PT1); + SAFE_ADDREF(m_pProj_PT2); + + m_fDuration = 3.2f; + + return S_OK; +} + +void CMage_Nomal_Attack::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); + + XMStoreFloat4(&m_vStartPos, m_pCircle_Proj->Get_WorldPostion()); +} + +void CMage_Nomal_Attack::Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Update(fTimeDelta); + + Update_Event(fTimeDelta); + + + m_pCircle_Proj->Get_Component()->Translation(XMLoadFloat3(&m_vLook) * m_fLinearSpeed); + m_pProj_PT1->Get_Component()->Translation(XMLoadFloat3(&m_vLook) * m_fLinearSpeed); + m_pProj_PT2->Get_Component()->Translation(XMLoadFloat3(&m_vLook) * m_fLinearSpeed); + + if (false == m_bHit) { + _vector vStartPos = XMLoadFloat4(&m_vStartPos); + _vector vEndPos = m_pCircle_Proj->Get_WorldPostion(); + ON_COLLISION_INFO CollisionInfo = MonsterSweepTarget(vStartPos, vEndPos, 0.2f); + + OnCollision(this, &CollisionInfo); + } + +} + +void CMage_Nomal_Attack::Late_Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Late_Update(fTimeDelta); + + +} + +HRESULT CMage_Nomal_Attack::Pre_Setting(CGameObject* pObject, void* pArg) +{ + if (FAILED(__super::Pre_Setting(pObject, nullptr))) + return E_FAIL; + + + /* 초기 객체 비지블*/ + m_pCircle_Proj->Set_Visible(true); + m_pProj_PT1->Set_Visible(true); + m_pProj_PT2->Set_Visible(true); + + /* 초기 객체 위치 초기화*/ + + _matrix BoneMat = XMLoadFloat4x4(m_pOwner->Get_Component()->Get_BoneMatrixPtr("RightHand")); + + for (int i = 0; i < 3; ++i) { + BoneMat.r[i] = XMVector3Normalize(BoneMat.r[i]); + } + + _matrix WorldMat = m_pOwner->Get_Component()->Get_XMWorldMatrix(); + + _matrix CombinedMat = BoneMat * WorldMat; + + _vector vStartPos = CombinedMat.r[3]; + + XMStoreFloat4(&m_vStartPos, vStartPos); + + m_pCircle_Proj->Get_Component()->Set_State(STATE::POSITION, vStartPos); + m_pProj_PT1->Get_Component()->Set_State(STATE::POSITION, vStartPos); + m_pProj_PT2->Get_Component()->Set_State(STATE::POSITION, vStartPos); + + + + /* 플레이어 위치 받기 */ + CUnit* pPlayer = m_pInfoInstance->Get_NearestPlayerAlly(m_pOwner->Get_WorldPostion()).first; + + if (pPlayer == nullptr) + return E_FAIL; + + /* 초기 방향 */ + XMStoreFloat4(&m_vTargetPos, pPlayer->Get_Component()->Get_Position()); + XMStoreFloat3(&m_vLook, XMVector3Normalize(XMLoadFloat4(&m_vTargetPos) - XMLoadFloat4(&m_vStartPos))); + + + return S_OK; +} + +HRESULT CMage_Nomal_Attack::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CMage_Nomal_Attack::Ready_Child() +{ + return S_OK; +} + +CMage_Nomal_Attack* CMage_Nomal_Attack::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CMage_Nomal_Attack* pInstance = new CMage_Nomal_Attack(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CMage_Nomal_Attack"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + + +CGameObject* CMage_Nomal_Attack::Clone(void* pArg, CGameObject* pOwner) +{ + CMage_Nomal_Attack* pInstance = new CMage_Nomal_Attack(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CMage_Nomal_Attack"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CMage_Nomal_Attack::OnCollision(CGameObject* pOther, void* pDesc) +{ + if (m_bHit == false) + return; + + ON_COLLISION_INFO CollisionDesc = *static_cast(pDesc); + + _vector vPos = XMLoadFloat4(&CollisionDesc.vWorldPos); + + + for (auto& pPair : m_PartObjects) + { + pPair.second->Set_Visible(true); + pPair.second->Get_Component()->Set_State(STATE::POSITION, vPos); + } + + + m_pCircle_Proj->Set_Visible(false); + m_pProj_PT1->Set_Visible(false); + m_pProj_PT2->Set_Visible(false); + + + CPlayer* pPlayer = static_cast(m_pInfoInstance->Get_NearestPlayerAlly(m_pOwner->Get_WorldPostion()).first); + + + if (pPlayer == nullptr) + return; + + pPlayer->Start_CameraShake(0.3f, 2.f); + +} + +void CMage_Nomal_Attack::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pInfoInstance); + + SAFE_RELEASE(m_pCircle_Proj); + SAFE_RELEASE(m_pProj_PT1); + SAFE_RELEASE(m_pProj_PT2); +} +#ifdef _DEBUG +void CMage_Nomal_Attack::Describe_Entity() +{ + +} +#endif + +HRESULT CMage_Nomal_Attack::Bind_ShaderResources() +{ + return S_OK; +} + + diff --git a/Jusin154_Team3D/Client/Private/MapElement_Interactable.cpp b/Jusin154_Team3D/Client/Private/MapElement_Interactable.cpp index 81f4b8394..ed83b7082 100644 --- a/Jusin154_Team3D/Client/Private/MapElement_Interactable.cpp +++ b/Jusin154_Team3D/Client/Private/MapElement_Interactable.cpp @@ -3,6 +3,8 @@ #include "InfoInstance.h" #include "GameInstance.h" +#include "EffectPool.h" +#include "Layer.h" CMapElement_Interactable::CMapElement_Interactable(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) : CMapElement{ pDevice, pContext } @@ -32,6 +34,25 @@ HRESULT CMapElement_Interactable::Initialize(void* pArg) //m_ModelPathIndices.push_back((*pDesc->pModelPathIndices)[i]); } + if (m_ModelPrototypeTags[0] == L"Prototype_GameObject_SM_Prop_Barrel_Breakable_B_Oppungo") + { + m_eInteractableID = ELEMENT_INTERACTABLE_ID::BARREL; + } + + else if (m_ModelPrototypeTags[0] == L"Prototype_GameObject_SM_HM_OwlPost_Package_B") + { + m_eInteractableID = ELEMENT_INTERACTABLE_ID::BOX; + } + else if (m_ModelPrototypeTags[0] == L"Prototype_GameObject_SM_HM_TeaShop_Table_B") + { + m_eInteractableID = ELEMENT_INTERACTABLE_ID::TABLE; + } + else if (m_ModelPrototypeTags[0] == L"Prototype_GameObject_SM_HM_TeaShop_Chair_B") + { + m_eInteractableID = ELEMENT_INTERACTABLE_ID::TABLE; + } + + if (FAILED(__super::Initialize(pArg))) return E_FAIL; @@ -59,19 +80,43 @@ HRESULT CMapElement_Interactable::Initialize(void* pArg) m_pInfoInstance->Regist_ActiveInteractive(this); + + m_pEffectPool = m_pGameInstance->Get_Layer(NEXT_LEVEL, TEXT("Layer_EffectPool"))->Get_Object(); + SAFE_ADDREF(m_pEffectPool); + return S_OK; } void CMapElement_Interactable::Priority_Update(_float fTimeDelta) { + _float fRadius = m_pModelComs[0]->Get_Radius(); + + XMStoreFloat4(&m_vStartPos, Get_WorldPostion() + XMVectorSet(0.f , fRadius , 0.f , 0.f )); + } void CMapElement_Interactable::Update(_float fTimeDelta) { + } void CMapElement_Interactable::Late_Update(_float fTimeDelta) { + + if (m_isGraped == true) + { + _float fRadius = m_pModelComs[0]->Get_Radius(); + + if (false == m_bHit) { + _vector vStartPos = XMLoadFloat4(&m_vStartPos); + _vector vEndPos = Get_WorldPostion() + XMVectorSet(0.f, fRadius, 0.f, 0.f); + ON_COLLISION_INFO CollisionInfo = CollisionCheck(vStartPos, vEndPos, 1.f); + + if (m_bHit == true) + OnCollision(this, &CollisionInfo); + } + } + if (m_pGameInstance->isIn_WorldFrustum(Get_WorldPostion(), m_pModelComs[0]->Get_Radius())) { m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this); } @@ -119,8 +164,46 @@ void CMapElement_Interactable::GrapToPlayer(_fvector vPos, _float fRatio) { _vector vCurrentPosition = m_pTransformCom->Get_State(STATE::POSITION); m_pTransformCom->Set_State(STATE::POSITION, XMVectorLerp(vCurrentPosition, vPos, fRatio)); + + m_isGraped = true; + } +void CMapElement_Interactable::OnCollision(CGameObject* pOther, void* pDesc) +{ + if (m_bHit == false) + return; + + ON_COLLISION_INFO CollisionDesc = *static_cast(pDesc); + + _vector vPos = XMLoadFloat4(&CollisionDesc.vWorldPos); + + switch (m_eInteractableID) + { + case Client::ELEMENT_INTERACTABLE_ID::BARREL: + + m_pEffectPool->Use_Skill(SKILL_TYPE::BARRAL_SPLASH, this); + break; + case Client::ELEMENT_INTERACTABLE_ID::BOX: + + m_pEffectPool->Use_Skill(SKILL_TYPE::BOX_SPLESH, this); + break; + case Client::ELEMENT_INTERACTABLE_ID::TABLE: + m_pEffectPool->Use_Skill(SKILL_TYPE::CHAIL_SPLESH, this); + break; + case Client::ELEMENT_INTERACTABLE_ID::END: + break; + default: + break; + } + + + + Set_Dead(); +} + + + HRESULT CMapElement_Interactable::Ready_Components(void* pArg) { if (FAILED(__super::Ready_Components(pArg))) { @@ -241,6 +324,121 @@ void CMapElement_Interactable::Set_KinematicFlag(_bool bFlag) m_pRigidBody->Set_Kinematic(bFlag); } +ON_COLLISION_INFO CMapElement_Interactable::CollisionCheck(_fvector StartPos, _fvector EndPos, _float fRadius) +{ + + _vector vStartPos = StartPos; + _vector vEndPos = EndPos; + _vector vDir = { vEndPos - vStartPos }; + + _float fDistance = XMVectorGetX(XMVector3Length(vEndPos - vStartPos)); + + PSX::PxSweepBuffer pxBuffer = {}; + + _bool bHit = m_pGameInstance->SphereCast(fRadius, vStartPos, vDir, fDistance, PSX::PxHitFlag::ePOSITION | PSX::PxHitFlag::eNORMAL, PSX::PxQueryFlag::eDYNAMIC, pxBuffer); + + const PSX::PxSweepHit& hit = pxBuffer.block; + PSX::PxRigidActor* pActor = hit.actor; + PSX::PxShape* pShape = hit.shape; + ON_COLLISION_INFO tagCollInfo = {}; + + tagCollInfo.vWorldPos.w = 1.f; + + if (bHit) { + + memcpy_s(&tagCollInfo.vWorldPos, sizeof(tagCollInfo.vWorldPos), &hit.position, sizeof(hit.position)); + + memcpy_s(&tagCollInfo.vWorldNomal, sizeof(tagCollInfo.vWorldNomal), &hit.normal, sizeof(hit.normal)); + XMStoreFloat4(&tagCollInfo.vHitDir, vDir); + tagCollInfo.fLength = fDistance; + + + if (nullptr != pActor && nullptr != pActor->userData) + { + PhsXUserData* pUserData = static_cast(pActor->userData); + tagCollInfo.pObject = pUserData->pOwner; + + switch (pUserData->eKind) + { + case PHYSX_KIND::CCTActor: + { + switch (PXOBJECT(pUserData->iSubKind)) + { + case PXOBJECT::MONSTER: + break; + case PXOBJECT::GOBLIN_WARRIOR: + { + pUserData->pOwner->OnCollision(this, &tagCollInfo); + m_bHit = true; + } + break; + case PXOBJECT::GOBLIN_MAGICIAN: + { + pUserData->pOwner->OnCollision(this, &tagCollInfo); + m_bHit = true; + } + break; + case PXOBJECT::TROLL: + { + pUserData->pOwner->OnCollision(this, &tagCollInfo); + m_bHit = true; + } + break; + } + } + } + } + + + } + + if (bHit == false) + { + memcpy_s(&tagCollInfo.vWorldPos, sizeof(tagCollInfo.vWorldPos), &hit.position, sizeof(hit.position)); + memcpy_s(&tagCollInfo.vWorldNomal, sizeof(tagCollInfo.vWorldNomal), &hit.normal, sizeof(hit.normal)); + XMStoreFloat4(&tagCollInfo.vHitDir, vDir); + tagCollInfo.fLength = fDistance; + tagCollInfo.pObject = this; + + bHit = m_pGameInstance->SphereCast(fRadius, vStartPos, vDir, fDistance, PSX::PxHitFlag::ePOSITION | PSX::PxHitFlag::eNORMAL, PSX::PxQueryFlag::eSTATIC, pxBuffer); + + const PSX::PxSweepHit& hit = pxBuffer.block; + PSX::PxRigidActor* pActor = hit.actor; + PSX::PxShape* pShape = hit.shape; + + tagCollInfo.vWorldPos.w = 1.f; + + if (bHit) + { + memcpy_s(&tagCollInfo.vWorldPos, sizeof(tagCollInfo.vWorldPos), &hit.position, sizeof(hit.position)); + memcpy_s(&tagCollInfo.vWorldNomal, sizeof(tagCollInfo.vWorldNomal), &hit.normal, sizeof(hit.normal)); + XMStoreFloat4(&tagCollInfo.vHitDir, vDir); + tagCollInfo.fLength = fDistance; + + if (nullptr != pActor && nullptr != pActor->userData) + { + PhsXUserData* pUserData = static_cast(pActor->userData); + tagCollInfo.pObject = pUserData->pOwner; + + switch (PXOBJECT(pUserData->iSubKind)) + { + case PXOBJECT::TERRAIN: + { + /* TODO, 터레인 안됨 */ + m_bHit = true; + break; + } + } + + } + } + + + } + + return tagCollInfo; +} + CMapElement_Interactable* CMapElement_Interactable::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) { CMapElement_Interactable* pInstance = new CMapElement_Interactable(pDevice, pContext); @@ -276,6 +474,7 @@ void CMapElement_Interactable::Free() SAFE_RELEASE(m_pRigidBody); SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pEffectPool); if (nullptr != m_pInfoInstance) { CInfoInstance* pInfo = m_pInfoInstance; @@ -285,6 +484,8 @@ void CMapElement_Interactable::Free() for (auto& pModel : m_pModelComs){ SAFE_RELEASE(pModel); } + + } #ifdef _DEBUG diff --git a/Jusin154_Team3D/Client/Private/MiniMap_Camera.cpp b/Jusin154_Team3D/Client/Private/MiniMap_Camera.cpp new file mode 100644 index 000000000..071f397ac --- /dev/null +++ b/Jusin154_Team3D/Client/Private/MiniMap_Camera.cpp @@ -0,0 +1,99 @@ +#include "pch.h" +#include "MiniMap_Camera.h" +#include "InfoInstance.h" + +CMiniMap_Camera::CMiniMap_Camera(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CCamera(pDevice, pContext) +{ +} + +CMiniMap_Camera::CMiniMap_Camera(const CMiniMap_Camera& rhs) + : CCamera(rhs), + m_pInfoInstance(CInfoInstance::GetInstance()) +{ +} + +void CMiniMap_Camera::Priority_Update(_float fTimeDelta) +{ +} + +void CMiniMap_Camera::Update(_float fTimeDelta) +{ +} + +void CMiniMap_Camera::Update_LerpTimer(Engine::_float fTimeDelta) +{ +} + +void CMiniMap_Camera::Enable_FollowLerp() +{ +} + +void CMiniMap_Camera::Enable_LookLerp() +{ +} + +void CMiniMap_Camera::Toggle_Priority() +{ +} + +void CMiniMap_Camera::Late_Update(_float fTimeDelta) +{ +} + +HRESULT CMiniMap_Camera::Render() +{ + return S_OK; +} + +HRESULT CMiniMap_Camera::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CMiniMap_Camera::Initialize(void* pArg) +{ + return S_OK; +} + +HRESULT CMiniMap_Camera::Ready_Components(void* pArg) +{ + return S_OK; +} + +HRESULT CMiniMap_Camera::Bind_ShaderResources() +{ + return S_OK; +} + +CMiniMap_Camera* CMiniMap_Camera::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CMiniMap_Camera* pInstance = new CMiniMap_Camera(pDevice, pContext); + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CMiniMap_Camera"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} +CGameObject* CMiniMap_Camera::Clone(void* pArg, CGameObject* pOwner) +{ + CMiniMap_Camera* pInstance = new CMiniMap_Camera(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CMiniMap_Camera"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} +void CMiniMap_Camera::Free() +{ + __super::Free(); +} + +void CMiniMap_Camera::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Client/Private/Monster.cpp b/Jusin154_Team3D/Client/Private/Monster.cpp index 55dcec0c1..1a6b083ed 100644 --- a/Jusin154_Team3D/Client/Private/Monster.cpp +++ b/Jusin154_Team3D/Client/Private/Monster.cpp @@ -206,6 +206,21 @@ void CMonster::Free() void CMonster::Describe_Entity() { + if (ImGui::TreeNode("ANIM STATE")) { + + for (auto& pState : m_States) + { + if (ImGui::Button(to_string(pState.first).c_str())) + { + m_pFSM->Change_State(pState.first); + } + + } + + GUI::Text(to_string(m_pModelCom->Get_CurrentTrackProgressRatio()).c_str()); + + ImGui::TreePop(); + } } #endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp b/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp new file mode 100644 index 000000000..e28b231a6 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp @@ -0,0 +1,212 @@ +#include "pch.h" +#include "NPC_Ollivander.h" + +#include "GameInstance.h" +#include "InfoInstance.h" +#include "Player.h" + +CNPC_Ollivander::CNPC_Ollivander(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CUnit(pDevice, pContext) +{ +} + +CNPC_Ollivander::CNPC_Ollivander(const CNPC_Ollivander& Prototype) + : CUnit(Prototype), + m_pInfoInstance(CInfoInstance::GetInstance()) +{ +} + +void CNPC_Ollivander::Priority_Update(_float fTimeDelta) +{ + m_pTransformCom->RewindMomentum(); + __super::Priority_Update(fTimeDelta); +} + +void CNPC_Ollivander::Update(_float fTimeDelta) +{ + m_pFSM->Update_State(fTimeDelta); + + m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom); + __super::Update(fTimeDelta); +#ifdef _DEBUG + Describe_Entity(); +#endif // _DEBUG + +} + +void CNPC_Ollivander::Late_Update(_float fTimeDelta) +{ + m_pTransformCom->Set_State(STATE::POSITION, m_pTransformCom->Get_EstimatedPositionByMomentum()); + + m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this); + + __super::Late_Update(fTimeDelta); +} + +HRESULT CNPC_Ollivander::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + + _uint iNumMeshes = m_pModelCom->Get_NumMeshes(); + + for (_uint i = 0; i < iNumMeshes; i++) + { + if (FAILED(m_pModelCom->Bind_BoneMatrices(i, m_pShaderCom, "g_BoneMatrices"))) { + 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; + } + if (FAILED(m_pModelCom->Render(i))) { + return E_FAIL; + } + } + + return S_OK; +} + +HRESULT CNPC_Ollivander::Render_Shadow() +{ + 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))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Bind_Shadow_Resource(m_pShaderCom, "g_ProjMatrix", D3DTS::PROJ))) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", &m_pGameInstance->Get_ShadowDesc()->fFar, sizeof(_float)))) { + return E_FAIL; + } + + _uint iNumMeshes = m_pModelCom->Get_NumMeshes(); + + for (_uint i = 0; i < iNumMeshes; i++) + { + if (FAILED(m_pModelCom->Bind_BoneMatrices(i, m_pShaderCom, "g_BoneMatrices"))) { + 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; + } + if (FAILED(m_pModelCom->Render(i))) { + return E_FAIL; + } + } + + return S_OK; +} + +HRESULT CNPC_Ollivander::Bind_ShaderResources() +{ + if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) { + 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 CNPC_Ollivander::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CNPC_Ollivander::Initialize(void* pArg) +{ + if (FAILED(__super::Initialize(pArg))) { + return E_FAIL; + } + if (FAILED(Ready_Components(pArg))) { + return E_FAIL; + } + m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(-34.f, 5, -11.4f, 1.f)); + return S_OK; +} + +HRESULT CNPC_Ollivander::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + + /* Com_Shader */ + if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_NPC_PBR_ANIM, + reinterpret_cast(&m_pShaderCom)))) { + return E_FAIL; + } + if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_GerboldOlivander_Model"), + reinterpret_cast(&m_pModelCom)))) { + return E_FAIL; + } + + return S_OK; +} + +CNPC_Ollivander* CNPC_Ollivander::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CNPC_Ollivander* pInstance = new CNPC_Ollivander(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CNPC_Ollivander"); + SAFE_RELEASE(pInstance); + } + return pInstance; +} + +CGameObject* CNPC_Ollivander::Clone(void* pArg, CGameObject* pOwner) +{ + CNPC_Ollivander* pInstance = new CNPC_Ollivander(*this); + + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CNPC_Ollivander"); + SAFE_RELEASE(pInstance); + } + return pInstance; +} + +void CNPC_Ollivander::Free() +{ + __super::Free(); +} +#ifdef _DEBUG + +void CNPC_Ollivander::Describe_Entity() +{ + m_pModelCom->Describe_Entity(); + if (ImGui::TreeNode("ANIM STATE")) { + + for (auto& pState : m_States) + { + if (ImGui::Button(to_string(pState.first).c_str())) + { + m_pFSM->Change_State(pState.first); + } + } + + GUI::Text(to_string(m_pModelCom->Get_CurrentTrackProgressRatio()).c_str()); + + ImGui::TreePop(); + } +} + +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Player.cpp b/Jusin154_Team3D/Client/Private/Player.cpp index f1628cf10..603ff43e6 100644 --- a/Jusin154_Team3D/Client/Private/Player.cpp +++ b/Jusin154_Team3D/Client/Private/Player.cpp @@ -120,7 +120,7 @@ void CPlayer::Priority_Update(_float fTimeDelta) void CPlayer::Update(_float fTimeDelta) { - Update_CameraCoordinateSystem(); + Update_CameraCoordinateSystem(fTimeDelta); UpdateGrapInteractive(fTimeDelta); m_pFSM->Update_State(fTimeDelta); @@ -149,7 +149,7 @@ __super::Update(fTimeDelta); } } -void CPlayer::UpdateGrapInteractive(Engine::_float fTimeDelta) +void CPlayer::UpdateGrapInteractive(_float fTimeDelta) { if (nullptr != m_pGrapInteractive) { m_vGrapInteratableLerp.x += fTimeDelta; @@ -160,6 +160,26 @@ void CPlayer::UpdateGrapInteractive(Engine::_float fTimeDelta) } } +void CPlayer::Update_CameraShake(_float fTimeDelta) +{ + if (true == m_bCameraShake) { + m_vCameraShakeTimer.x += fTimeDelta; + if (m_vCameraShakeTimer.x > m_vCameraShakeTimer.y) { + m_vCameraShakeTimer.x = 0.f; + m_pCamPosition_ShoulderPart->Set_CameraShake(0.f, 0.f); + m_bCameraShake = false; + } + else { + _float fIntense = { 1.f - m_vCameraShakeTimer.x / m_vCameraShakeTimer.y }; + fIntense *= fIntense; + m_pCamPosition_ShoulderPart->Set_CameraShake( + fIntense * m_pGameInstance->Real_Random_Float(-m_fCameraShakeIntense, m_fCameraShakeIntense), + fIntense * m_pGameInstance->Real_Random_Float(-m_fCameraShakeIntense, m_fCameraShakeIntense) + ); + } + } +} + void CPlayer::Late_Update(_float fTimeDelta) { m_pTransformCom->Set_State(STATE::POSITION, m_pCharacter_Controller->Get_FootPosition()); @@ -277,6 +297,14 @@ HRESULT CPlayer::Render_Shadow() } void CPlayer::OnCollision(CGameObject* pOther, void* pDesc) { + ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc); + if (CollisionDesc) { + Check_HitAngle(XMLoadFloat4(&CollisionDesc->vHitDir)); + } + else { + m_fHitDegree = -1.f; + } + m_pFSM->Change_State(FSMSTATE::HIT); } void CPlayer::OnHit(CGameObject* pOther, CGameObject* pCaller) @@ -284,6 +312,14 @@ void CPlayer::OnHit(CGameObject* pOther, CGameObject* pCaller) } #ifdef _DEBUG +void CPlayer::Start_CameraShake(_float fTime, _float fIntense) +{ + m_vCameraShakeTimer.x = 0.f; + m_vCameraShakeTimer.y = fTime; + m_fCameraShakeIntense = fIntense; + m_bCameraShake = true; +} + void CPlayer::Render_CameraCoordinateSystem() { m_Batch->Begin(); @@ -367,11 +403,10 @@ HRESULT CPlayer::Ready_Components() return E_FAIL; } - if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("STAT_PLAYER"), (CComponent**)&m_pStat))) { - return E_FAIL; - - } - + 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{}; @@ -475,13 +510,14 @@ void CPlayer::SetGravity() } } -void CPlayer::Update_CameraCoordinateSystem() +void CPlayer::Update_CameraCoordinateSystem(_float fTimeDelta) { _vector xmvCameraLook = XMVector3Normalize(XMVectorSetY(m_pGameInstance->Get_CameraLook(), 0.f)); _vector xmvUp = XMVectorSet(0.f, 1.f, 0.f, 0.f); XMStoreFloat3(&m_vCameraRightDir, XMVector3Normalize(XMVector3Cross(xmvUp, xmvCameraLook))); XMStoreFloat3(&m_vCameraLookDir, xmvCameraLook); m_pInfoInstance->Update_CameraCoordinateSystem(m_vCameraLookDir, m_vRimLightColor); + Update_CameraShake(fTimeDelta); } _matrix CPlayer::Get_WandPos() @@ -595,6 +631,16 @@ void CPlayer::Describe_Entity() 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); } +#pragma region CAMERA_SHAKE + if (false == m_bCameraShake && GUI::Button("Shake")) { + m_bCameraShake = true; + } + if (GUI::SliderFloat("m_fCameraShakeTime", &m_fCameraShakeTime, 0.125f, 0.f, "%.3f")) { + m_vCameraShakeTimer.y = m_fCameraShakeTime; + } + GUI::SliderFloat("m_fCameraShakeIntense", &m_fCameraShakeIntense, 5.f, 20.f, "%.1f"); +#pragma endregion + _vector xmvInputDir = XMVectorZero(); _vector xmvCamLook = XMVector4Normalize(XMVectorSet(m_vCameraLookDir.x, 0.f, m_vCameraLookDir.z, 0.f)); diff --git a/Jusin154_Team3D/Client/Private/PlayerInfo.cpp b/Jusin154_Team3D/Client/Private/PlayerInfo.cpp index 57d8fe77a..e7cc16ab6 100644 --- a/Jusin154_Team3D/Client/Private/PlayerInfo.cpp +++ b/Jusin154_Team3D/Client/Private/PlayerInfo.cpp @@ -2,11 +2,17 @@ #include "PlayerInfo.h" #include "GameInstance.h" #include "InfoInstance.h" +#include "Player.h" CPlayerInfo::CPlayerInfo() { } +CStat* CPlayerInfo::Get_PlayerStatPtr() +{ + return m_pStat; +} + void CPlayerInfo::Update(_float fTimeDelta) { } @@ -32,13 +38,16 @@ HRESULT CPlayerInfo::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pCon m_pInfoInstance = CInfoInstance::GetInstance(); m_pDevice = pDevice; m_pContext = pContex; - + SAFE_ADDREF(m_pGameInstance); SAFE_ADDREF(m_pInfoInstance); SAFE_ADDREF(m_pDevice); SAFE_ADDREF(m_pContext); - + m_pStat = (CStat*)m_pGameInstance->Clone_Asset_Prototype(g_iStaticLevel, TEXT("STAT_PLAYER"), nullptr, nullptr); + if (nullptr == m_pStat) { + return E_FAIL; + } return S_OK; } @@ -61,5 +70,5 @@ void CPlayerInfo::Free() SAFE_RELEASE(m_pInfoInstance); SAFE_RELEASE(m_pDevice); SAFE_RELEASE(m_pContext); - + SAFE_RELEASE(m_pStat); } diff --git a/Jusin154_Team3D/Client/Private/Player_States.cpp b/Jusin154_Team3D/Client/Private/Player_States.cpp index 077da5e13..d47a4daa2 100644 --- a/Jusin154_Team3D/Client/Private/Player_States.cpp +++ b/Jusin154_Team3D/Client/Private/Player_States.cpp @@ -24,9 +24,12 @@ #include "State_Combat.h" #include "State_LightAttack.h" #include "State_Spell.h" +#include "State_Shield.h" #include "State_Hit.h" #include "State_Broom_Ride.h" #include "State_Broom_Ride_Move.h" +#include "State_Broom_Hover.h" +#include "State_Broom_Fly.h" #include "State_Broom_Dismount.h" #pragma endregion @@ -70,6 +73,7 @@ HRESULT CPlayer::InputAction() 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)); return S_OK; } } @@ -199,7 +203,7 @@ HRESULT CPlayer::Behavior_IdleExitCheck(_float fTimeDelta) m_pFSM->Change_State(FSMSTATE::COMBAT); } else if (m_pGameInstance->Key_Down(DIK_Q)) { - m_pFSM->Change_State(FSMSTATE::COMBAT); + m_pFSM->Change_State(FSMSTATE::SHIELD); } else if (SUCCEEDED(InputSpell())) { m_pFSM->Change_State(FSMSTATE::COMBAT); @@ -211,7 +215,7 @@ HRESULT CPlayer::Behavior_IdleExitCheck(_float fTimeDelta) m_pFSM->Change_State(FSMSTATE::COMBAT); } else if (m_pGameInstance->Key_Down(DIK_G)) { - m_pFSM->Change_State(FSMSTATE::COMBAT); + m_pModelCom->Set_Second_AnimationIndex(ENUM_CLASS(BLEND_BONE::SHOULDER_NECK_L), m_Animation[STATEANIM::POTION].first, m_Animation[STATEANIM::POTION].second); } else if (m_pGameInstance->Key_Down(DIK_B)) { m_pFSM->Change_State(FSMSTATE::BROOM_RIDE); @@ -389,7 +393,7 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta) m_pFSM->Change_State(FSMSTATE::COMBAT); } else if (m_pGameInstance->Key_Down(DIK_Q)) { - m_pFSM->Change_State(FSMSTATE::COMBAT); + m_pFSM->Change_State(FSMSTATE::SHIELD); } else if (m_pGameInstance->Mouse_Up(DIM_LBUTTON)) { m_pFSM->Change_State(FSMSTATE::COMBAT); @@ -404,8 +408,9 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta) m_pFSM->Change_State(FSMSTATE::COMBAT); } else if (m_pGameInstance->Key_Down(DIK_G)) { - m_pFSM->Change_State(FSMSTATE::COMBAT); + m_pModelCom->Set_Second_AnimationIndex(ENUM_CLASS(BLEND_BONE::SHOULDER_NECK_L), m_Animation[STATEANIM::POTION].first, m_Animation[STATEANIM::POTION].second); } + else if (m_pGameInstance->Key_Down(DIK_B)) { m_pFSM->Change_State(FSMSTATE::BROOM_RIDE); } @@ -486,24 +491,27 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta) _bool bSkipAngleCheck = { false }; if (m_pFSM->IsEnable(FSMSTATE::JOG | FSMSTATE::WALK| FSMSTATE::SPRINT)) { - if (iCurrentAnimIndex != m_Animation[STATEANIM::JOG_FWD].first && + /* if (iCurrentAnimIndex != m_Animation[STATEANIM::JOG_FWD].first && iCurrentAnimIndex != m_Animation[STATEANIM::WALK_FWD].first&& - iCurrentAnimIndex != m_Animation[STATEANIM::SPRINT].first) { + iCurrentAnimIndex != m_Animation[STATEANIM::SPRINT].first&& + iCurrentAnimIndex != m_Animation[STATEANIM::JOG_AIM_LEFT].first&& + iCurrentAnimIndex != m_Animation[STATEANIM::JOG_AIM_RIGHT].first&& + iCurrentAnimIndex != m_Animation[STATEANIM::JOG_AIM_BWD].first) { bSkipAngleCheck = true; - +*/ if (m_pModelCom->IsFinishedAnim() || m_pFSM->IsEnable(FSMSTATE::STOP) || SUCCEEDED(InputAim())) { m_pFSM->Disable_State(FSMSTATE::STOP); bSkipAngleCheck = false; } - } + //} if (!bSkipAngleCheck) { _float absDir = fabsf(vDir); - if (absDir < XMConvertToRadians(85.f)) { + if (absDir < XMConvertToRadians(80.f)) { if (m_bWalkToggle) { pairAnimInfo = m_Animation[STATEANIM::WALK_FWD]; } - else if ( m_bSprintToggle) + else if (m_bSprintToggle) { pairAnimInfo = m_Animation[STATEANIM::SPRINT]; } @@ -713,11 +721,17 @@ void CPlayer::Behavior_JumpEnter() HRESULT CPlayer::Behavior_JumpExitCheck() { _float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio(); - if (fRatio>=0.7f) { + + if (m_pGameInstance->Key_Down(DIK_B)) + { + m_pFSM->Change_State(FSMSTATE::BROOM_RIDE); + } + + if (fRatio>=0.6f) { m_pFSM->Change_State(FSMSTATE::LAND); return E_FAIL; } - return S_OK; + return E_FAIL; } void CPlayer::Behavior_JumpExit() @@ -786,7 +800,7 @@ void CPlayer::Behavior_CombatEnter() if (m_pModelCom->Get_SecondAnimIndex() == m_Animation[STATEANIM::LUMOS].first) { - m_pModelCom->Set_Second_AnimationIndex(-1, ENUM_CLASS(BLEND_BONE::SHOULDER_R)); + m_pModelCom->Set_Second_AnimationIndex(ENUM_CLASS(BLEND_BONE::SHOULDER_R) ,-1) ; m_eSpell = ENUM_CLASS(SKILL_TYPE::END); } if (m_pGameInstance->Key_Down(DIK_R)) { @@ -795,11 +809,8 @@ void CPlayer::Behavior_CombatEnter() m_pEffectPool->Use_Skill(SKILL_TYPE::REVELIO, this); } else if (m_pGameInstance->Key_Down(DIK_Q)) { - m_pFSM->Enable_State(FSMSTATE::SKILL2); - pairAnimInfo = m_Animation[STATEANIM::SKILL2]; - Add_Event(pairAnimInfo.first, - [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::PROTEGO, this); }, - 0.4f); + + m_pFSM->Change_State(FSMSTATE::SHIELD); } else if (m_pGameInstance->Mouse_Up(DIM_LBUTTON)) { m_pFSM->Change_State(FSMSTATE::LIGHT_ATTACK); @@ -834,29 +845,6 @@ void CPlayer::Behavior_CombatEnter() [this]() { Throwing_Interactive(); }, 0.2f); } - else if (m_pGameInstance->Key_Down(DIK_G)) { - m_pFSM->Enable_State(FSMSTATE::POTION); - if (SUCCEEDED(InputMove())) - { - if (m_bSprintToggle) - { - pairAnimInfo = m_Animation[STATEANIM::SPRINT]; - } - else if (m_bWalkToggle) - { - pairAnimInfo = m_Animation[STATEANIM::WALK_FWD]; - } - else { - pairAnimInfo = m_Animation[STATEANIM::JOG_FWD]; - } - } - else { - pairAnimInfo = m_Animation[STATEANIM::IDLE]; - } - - m_pModelCom->Set_Second_AnimationIndex(m_Animation[STATEANIM::POTION].first, ENUM_CLASS(BLEND_BONE::SHOULDER_NECK_L)); - } - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); } @@ -872,9 +860,7 @@ HRESULT CPlayer::Behavior_CombatExitCheck() } else if (m_pGameInstance->Key_Down(DIK_Q)) { - m_pFSM->Enable_State(FSMSTATE::SKILL2); - pairAnimInfo = m_Animation[STATEANIM::SKILL2]; - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + m_pFSM->Change_State(FSMSTATE::SHIELD); } else if (m_pGameInstance->Key_Down(DIK_V)) { @@ -896,8 +882,18 @@ HRESULT CPlayer::Behavior_CombatExitCheck() [this]() { m_bLookAt = true; }, 0.1f); Add_Event(pairAnimInfo.first, - [this]() { Throwing_Interactive(); }, + [this]() { + Throwing_Interactive(); + }, 0.2f); + + Add_Event(pairAnimInfo.first, + [this]() { + m_pGameInstance->SlowMotion(0.1f, 0.35f); + }, + 0.1f); + + } else if (nullptr != m_LockOnInfo.pInteractive) { m_pGrapInteractive = m_LockOnInfo.pInteractive; @@ -906,29 +902,6 @@ HRESULT CPlayer::Behavior_CombatExitCheck() m_vGrapInteratableLerp.x = 0.f; } } - else if (m_pGameInstance->Key_Down(DIK_G)) { - m_pFSM->Enable_State(FSMSTATE::POTION); - if (SUCCEEDED(InputMove())) - { - if (m_bSprintToggle) - { - pairAnimInfo = m_Animation[STATEANIM::SPRINT]; - } - else if (m_bWalkToggle) - { - pairAnimInfo = m_Animation[STATEANIM::WALK_FWD]; - } - else { - pairAnimInfo = m_Animation[STATEANIM::JOG_FWD]; - } - - } - else { - pairAnimInfo = m_Animation[STATEANIM::IDLE]; - } - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); - m_pModelCom->Set_Second_AnimationIndex(m_Animation[STATEANIM::POTION].first, ENUM_CLASS(BLEND_BONE::SHOULDER_NECK_L)); - } } if (m_pFSM->IsEnable(FSMSTATE::ANCIENT_THROW)) @@ -965,7 +938,7 @@ HRESULT CPlayer::Behavior_CombatExitCheck() void CPlayer::Behavior_CombatExit() { m_pFSM->Disable_State(FSMSTATE::COMBAT | FSMSTATE::SKILL | - FSMSTATE::SKILL2 | FSMSTATE::MAPHELP | FSMSTATE::ANCIENT_THROW | FSMSTATE::POTION); + FSMSTATE::MAPHELP | FSMSTATE::ANCIENT_THROW); } void CPlayer::Behavior_LightAttackEnter() @@ -1207,7 +1180,7 @@ void CPlayer::Behavior_SpellEnter() Add_Event(pairAnimInfo.first, [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::LUMOS, Get_PartObject()); }, 0.f); - m_pModelCom->Set_Second_AnimationIndex(m_Animation[STATEANIM::LUMOS].first, ENUM_CLASS(BLEND_BONE::SHOULDER_R), true); + m_pModelCom->Set_Second_AnimationIndex(ENUM_CLASS(BLEND_BONE::SHOULDER_R),m_Animation[STATEANIM::LUMOS].first, m_Animation[STATEANIM::LUMOS].second); } else { @@ -1226,8 +1199,7 @@ void CPlayer::Behavior_SpellEnter() else { pairAnimInfo = m_Animation[STATEANIM::IDLE]; } - m_pModelCom->Set_Second_AnimationIndex(m_Animation[STATEANIM::LUMOS_STOP].first, ENUM_CLASS(BLEND_BONE::SHOULDER_R)); - m_eSpell = STATEANIM::END; + m_pModelCom->Set_Second_AnimationIndex(ENUM_CLASS(BLEND_BONE::SHOULDER_R),m_Animation[STATEANIM::LUMOS_STOP].first, m_Animation[STATEANIM::LUMOS_STOP].second); } break; default: @@ -1280,7 +1252,7 @@ HRESULT CPlayer::Behavior_SpellExitCheck() m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); - if (m_eSpell != ENUM_CLASS(SKILL_TYPE::END)&& m_eSpell != -1) + if (m_eSpell != ENUM_CLASS(SKILL_TYPE::END) && m_eSpell != -1) { _float fRatio = 0.2f; if (iNext - iStart == 2) { @@ -1318,6 +1290,49 @@ HRESULT CPlayer::Behavior_SpellExitCheck() [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::LEVIOSO_SIDE, Get_PartObject()); }, 0.f); break; + case ENUM_CLASS(SKILL_TYPE::LUMOS): + if (m_pModelCom->Get_SecondAnimIndex() != m_Animation[STATEANIM::LUMOS].first) + { + if (SUCCEEDED(InputMove())) + { + if (m_bSprintToggle) { + pairAnimInfo = m_Animation[STATEANIM::SPRINT]; + } + else if (m_bWalkToggle) { + pairAnimInfo = m_Animation[STATEANIM::WALK_FWD]; + } + else { + pairAnimInfo = m_Animation[STATEANIM::JOG_FWD]; + } + } + else { + pairAnimInfo = m_Animation[STATEANIM::IDLE]; + } + Add_Event(pairAnimInfo.first, + [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::LUMOS, Get_PartObject()); }, + 0.f); + m_pModelCom->Set_Second_AnimationIndex(ENUM_CLASS(BLEND_BONE::SHOULDER_R), m_Animation[STATEANIM::LUMOS].first, m_Animation[STATEANIM::LUMOS].second); + } + else + { + if (SUCCEEDED(InputMove())) + { + if (m_bSprintToggle) { + pairAnimInfo = m_Animation[STATEANIM::SPRINT]; + } + else if (m_bWalkToggle) { + pairAnimInfo = m_Animation[STATEANIM::WALK_FWD]; + } + else { + pairAnimInfo = m_Animation[STATEANIM::JOG_FWD]; + } + } + else { + pairAnimInfo = m_Animation[STATEANIM::IDLE]; + } + m_pModelCom->Set_Second_AnimationIndex(ENUM_CLASS(BLEND_BONE::SHOULDER_R), m_Animation[STATEANIM::LUMOS_STOP].first, m_Animation[STATEANIM::LUMOS_STOP].second); + } + break; } } else { @@ -1331,7 +1346,7 @@ HRESULT CPlayer::Behavior_SpellExitCheck() m_pFSM->Change_State(FSMSTATE::COMBAT); } - if (m_pFSM->IsEnable(FSMSTATE::SPELL) && fRatio >= 0.3f) + if (m_bSpellHit) { if (m_eSpell != ENUM_CLASS(SKILL_TYPE::END)) { @@ -1349,12 +1364,13 @@ HRESULT CPlayer::Behavior_SpellExitCheck() break; } + m_bSpellHit = false; m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); } } - if (SUCCEEDED(InputMove()) && fRatio>=0.3f) { + if (SUCCEEDED(InputMove()) && fRatio >= 0.3f) { m_pFSM->Change_State(FSMSTATE::MOVE); m_bLookAt = false; return E_FAIL; @@ -1380,6 +1396,38 @@ void CPlayer::Behavior_SpellExit() m_pFSM->Disable_State(FSMSTATE::SPELL); } +void CPlayer::Behavior_ShieldEnter() +{ + pair<_uint, _bool> pairAnimInfo; + + m_pFSM->Enable_State(FSMSTATE::SHIELD); + pairAnimInfo = m_Animation[STATEANIM::SKILL2]; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + + Add_Event(pairAnimInfo.first, + [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::PROTEGO, this); }, + 0.4f); +} + +HRESULT CPlayer::Behavior_ShieldExitCheck() +{ + if (m_pModelCom->IsFinishedAnim()) { + if (SUCCEEDED(InputMove())) + { + m_pFSM->Change_State(FSMSTATE::MOVE); + } + else { + m_pFSM->Change_State(FSMSTATE::IDLE); + } + } + return E_FAIL; +} + +void CPlayer::Behavior_ShieldExit() +{ + m_pFSM->Disable_State(FSMSTATE::SHIELD); +} + void CPlayer::Behavior_HitEnter() { m_pFSM->Enable_State(FSMSTATE::HIT); @@ -1400,6 +1448,23 @@ void CPlayer::Behavior_HitEnter() break; } + if (m_fHitDegree >= 90.f) + { + pairAnimInfo = m_Animation[STATEANIM::FLINCH_BWD]; + } + else if (m_fHitDegree >= 45.f) { + + if (m_fHitCross > 0.f) { + pairAnimInfo = m_Animation[STATEANIM::FLINCH_LEFT]; + } + else { + pairAnimInfo = m_Animation[STATEANIM::FLINCH_RIGHT]; + } + } + else if(m_fHitDegree>=0.f){ + pairAnimInfo = m_Animation[STATEANIM::FLINCH_FWD]; + } + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); } @@ -1445,6 +1510,14 @@ HRESULT CPlayer::Behavior_Broom_RideExitCheck(_float fTimeDelta) m_pFSM->Change_State(FSMSTATE::BROOM_RIDE_MOVE); } + if (m_pGameInstance->Key_Pressing(DIK_N)) + { + auto flags = m_pCharacter_Controller->Get_CollisionFlags(); + if (flags & PSX::PxControllerCollisionFlag::eCOLLISION_DOWN) + { + m_pFSM->Change_State(FSMSTATE::BROOM_DISMOUNT); + } + } return E_FAIL; } @@ -1460,6 +1533,29 @@ void CPlayer::Behavior_Broom_Ride_MoveEnter() } HRESULT CPlayer::Behavior_Broom_Ride_MoveExitCheck(_float fTimeDelta) +{ + if (m_pBroom->Get_Hover()) + { + m_pFSM->Change_State(FSMSTATE::HOVER); + } + else { + m_pFSM->Change_State(FSMSTATE::FLY); + } + + return E_FAIL; +} + +void CPlayer::Behavior_Broom_Ride_MoveExit() +{ + m_pFSM->Disable_State(FSMSTATE::BROOM_RIDE_MOVE); +} + +void CPlayer::Behavior_Broom_HoverEnter() +{ + m_pFSM->Enable_State(FSMSTATE::HOVER); +} + +HRESULT CPlayer::Behavior_Broom_HoverExitCheck(_float fTimeDelta) { _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex(); pair<_uint, _bool> pairAnimInfo; @@ -1470,28 +1566,140 @@ HRESULT CPlayer::Behavior_Broom_Ride_MoveExitCheck(_float fTimeDelta) _bool bDown = m_pGameInstance->Key_Pressing(DIK_LCONTROL); _bool bUp = m_pGameInstance->Key_Pressing(DIK_SPACE); - if (m_pBroom->Get_Hover()) + if (m_pBroom->Get_Hover() && iCurrAnimIndex != m_Animation[STATEANIM::BROOM_HOVER_REVELIO].first) { - if (m_pGameInstance->Key_Pressing(DIK_W)) + if (SUCCEEDED(InputBroom()) || SUCCEEDED(InputMove())) { - pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_HOVER_FWD); + _float3 vInput = { 0.f, 0.f, 0.f }; + + if (bFwd) vInput.z += 1.f; + if (bLft) vInput.x -= 1.f; + if (bRht) vInput.x += 1.f; + if (bUp) vInput.y += 1.f; + if (bDown) vInput.y -= 1.f; + + _bool bHasInput = !(vInput.x == 0 && vInput.y == 0 && vInput.z == 0); + _vector vDir = XMVector3Normalize(XMLoadFloat3(&vInput)); + + if (bUp || bDown) + { + if (bUp) + { + pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE]; + } + else + { + pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE]; + } + } + + _float ax = fabsf(vInput.x); + _float ay = fabsf(vInput.y); + _float az = fabsf(vInput.z); + + if (ay > ax && ay > az) + { + if (vInput.y > 0) + pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE]; + else + pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE]; + } + else if (ax >= az) + { + if (ay >= ax) + { + if (vInput.y > 0) + pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE]; + else + pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE]; + } + else { + if (vInput.x < 0) + pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_LEFT]; + else if (vInput.x > 0) + pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_RIGHT]; + else { + pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_FWD]; + } + } + } + else + { + if (vInput.y > 0) + pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE]; + else if (vInput.y < 0) + pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE]; + else { + pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_FWD]; + } + } } - else if (m_pGameInstance->Key_Pressing(DIK_A)) - { - pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_HOVER_LEFT); + else { + pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE]; } - else if (m_pGameInstance->Key_Pressing(DIK_D)) + + if (m_pGameInstance->Key_Down(DIK_R)) { - pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_HOVER_RIGHT); - } - else - { - pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_HOVER_IDLE); + pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_HOVER_REVELIO); + Add_Event(pairAnimInfo.first, + [this]() { + m_pEffectPool->Use_Skill(SKILL_TYPE::REVELIO, this); + }, 0.2f); } m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); } - else + + + + if (iCurrAnimIndex == m_Animation[STATEANIM::BROOM_HOVER_REVELIO].first) + { + if (m_pModelCom->IsFinishedAnim()) + { + pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_FWD]; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + } + } + + if (m_pGameInstance->Key_Pressing(DIK_N)) + { + auto flags = m_pCharacter_Controller->Get_CollisionFlags(); + if (flags & PSX::PxControllerCollisionFlag::eCOLLISION_DOWN) + { + m_pFSM->Change_State(FSMSTATE::BROOM_DISMOUNT); + } + } + + if (!m_pBroom->Get_Hover()) + { + m_pFSM->Change_State(FSMSTATE::BROOM_RIDE_MOVE); + } + + return E_FAIL; +} + +void CPlayer::Behavior_Broom_HoverExit() +{ + m_pFSM->Disable_State(FSMSTATE::HOVER); +} + +void CPlayer::Behavior_Broom_FlyEnter() +{ + m_pFSM->Enable_State(FSMSTATE::FLY); +} + +HRESULT CPlayer::Behavior_Broom_FlyExitCheck(_float fTimeDelta) +{ + _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex(); + pair<_uint, _bool> pairAnimInfo; + + _bool bFwd = m_pGameInstance->Key_Pressing(DIK_W); + _bool bLft = m_pGameInstance->Key_Pressing(DIK_A); + _bool bRht = m_pGameInstance->Key_Pressing(DIK_D); + _bool bDown = m_pGameInstance->Key_Pressing(DIK_LCONTROL); + _bool bUp = m_pGameInstance->Key_Pressing(DIK_SPACE); + + if (!m_pBroom->Get_Hover() && iCurrAnimIndex != m_Animation[STATEANIM::BROOM_REVELIO].first) { if (SUCCEEDED(InputBroom()) || SUCCEEDED(InputMove())) { @@ -1560,31 +1768,50 @@ HRESULT CPlayer::Behavior_Broom_Ride_MoveExitCheck(_float fTimeDelta) } } else { - pairAnimInfo = m_Animation[STATEANIM::BROOM_FWD]; + pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_FWD); } - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + if (m_pGameInstance->Key_Down(DIK_R)) + { + pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_REVELIO); + Add_Event(pairAnimInfo.first, + [this]() { + m_pEffectPool->Use_Skill(SKILL_TYPE::REVELIO, this); + }, 0.2f); + } + + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); } + if (iCurrAnimIndex == m_Animation[STATEANIM::BROOM_REVELIO].first) + { + if (m_pModelCom->IsFinishedAnim()) + { + pairAnimInfo = m_Animation[STATEANIM::BROOM_FWD]; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + } + } - if (m_pGameInstance->Key_Pressing(DIK_N)) { + if (m_pGameInstance->Key_Pressing(DIK_N)) + { auto flags = m_pCharacter_Controller->Get_CollisionFlags(); if (flags & PSX::PxControllerCollisionFlag::eCOLLISION_DOWN) { m_pFSM->Change_State(FSMSTATE::BROOM_DISMOUNT); } - else { - m_pBroomTransform->Go_Down(fTimeDelta); - } } - + if (m_pBroom->Get_Hover()) + { + m_pFSM->Change_State(FSMSTATE::BROOM_RIDE_MOVE); + } + return E_FAIL; } -void CPlayer::Behavior_Broom_Ride_MoveExit() +void CPlayer::Behavior_Broom_FlyExit() { - m_pFSM->Disable_State(FSMSTATE::BROOM_RIDE_MOVE); + m_pFSM->Disable_State(FSMSTATE::FLY); } void CPlayer::Behavior_Broom_DismountEnter() @@ -1594,7 +1821,17 @@ void CPlayer::Behavior_Broom_DismountEnter() pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_DISMOUNT); m_pFSM->Enable_State(FSMSTATE::BROOM_DISMOUNT); m_pBroom->Set_Ride(false); - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + _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); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second,1.f,false,1.3f); } HRESULT CPlayer::Behavior_Broom_DismountExitCheck(_float fTimeDelta) @@ -1603,17 +1840,15 @@ HRESULT CPlayer::Behavior_Broom_DismountExitCheck(_float fTimeDelta) pair<_uint, _bool> pairAnimInfo; if (iCurrAnimIndex == m_Animation[STATEANIM::BROOM_DISMOUNT].first) { + m_BroomScale.x -= (m_TargetScale.x - m_BroomScale.x) * fTimeDelta * m_fScaleSmoothSpeed; + m_BroomScale.y -= (m_TargetScale.y - m_BroomScale.y) * fTimeDelta * m_fScaleSmoothSpeed; + m_BroomScale.z -= (m_TargetScale.z - m_BroomScale.z) * fTimeDelta * m_fScaleSmoothSpeed; + if (m_BroomScale.x >= 0.1f) + { + m_pBroomTransform->Set_Scale(m_BroomScale); + } if (m_pModelCom->IsFinishedAnim()) { - _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); + m_BroomScale = { 0.f,0.f,0.f }; if (SUCCEEDED(InputMove())) { m_pFSM->Change_State(FSMSTATE::MOVE); @@ -1624,7 +1859,6 @@ HRESULT CPlayer::Behavior_Broom_DismountExitCheck(_float fTimeDelta) return E_FAIL; } - } return E_FAIL; @@ -1717,6 +1951,32 @@ void CPlayer::Throwing_Interactive() SAFE_RELEASE(m_pGrapInteractive); } +void CPlayer::Attach_Broom() +{ + _matrix BroomWorld = XMLoadFloat4x4(m_pBroomTransform->Get_WorldMatrixPtr()); + _matrix BoneLocal = XMLoadFloat4x4(m_pBroomModel->Get_BoneMatrixPtr("broomSocket")); + + _vector Scale, Rot, Trans; + + XMMatrixDecompose(&Scale, &Rot, &Trans, BoneLocal); + + _matrix BoneNoScale = XMMatrixRotationQuaternion(Rot) * XMMatrixTranslationFromVector(Trans); + + m_OffsetPos = { 0.f,0.9f,0.f }; + + _matrix Offset = XMMatrixTranslation(m_OffsetPos.x, + m_OffsetPos.y, m_OffsetPos.z); + + _matrix SocketWorld = BoneNoScale * Offset * BroomWorld; + + _matrix FixRot = XMMatrixRotationY(XMConvertToRadians(180.f)); + + _matrix FinalWorld = FixRot * SocketWorld; + + m_pTransformCom->Set_WorldMatrix(FinalWorld); + m_pCharacter_Controller->Set_Position(FinalWorld.r[3]); +} + void CPlayer::Add_FSM() { #pragma region Behavior_Movement_NotFocus @@ -1859,6 +2119,17 @@ void CPlayer::Add_FSM() 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_Combat_Focus @@ -1887,13 +2158,21 @@ void CPlayer::Add_FSM() Desc.funcExitEvent = [this]() { Behavior_Broom_RideExit(); }; 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_pBroomTransform->Get_State(STATE::POSITION)+XMVectorSet(0.f, 2.5f, 0.f, 0.f)); + m_pBroomTransform->Set_State(STATE::POSITION, m_pBroomTransform->Get_State(STATE::POSITION) + XMVectorSet(0.f,2.f,0.f,0.f)); + _float3 vScale = { 0.3f,0.3f,0.3f }; + m_pBroomTransform->Set_Scale(vScale); m_bOnce = true; } + m_BroomScale.x += (m_TargetScale.x - m_BroomScale.x) * fTimeDelta * m_fScaleSmoothSpeed; + m_BroomScale.y += (m_TargetScale.y - m_BroomScale.y) * fTimeDelta * m_fScaleSmoothSpeed; + m_BroomScale.z += (m_TargetScale.z - m_BroomScale.z) * fTimeDelta * m_fScaleSmoothSpeed; + if (m_BroomScale.x <= 1.f) + { + m_pBroomTransform->Set_Scale(m_BroomScale); + } _matrix BroomWorld = XMLoadFloat4x4(m_pBroomTransform->Get_WorldMatrixPtr()); _matrix BoneLocal = XMLoadFloat4x4(m_pBroomModel->Get_BoneMatrixPtr("broomSocket")); @@ -1903,7 +2182,7 @@ void CPlayer::Add_FSM() _matrix BoneNoScale = XMMatrixRotationQuaternion(Rot) * XMMatrixTranslationFromVector(Trans); - m_OffsetPos = { 0.f, 0.9f, 0.f }; + m_OffsetPos = { 0.f,0.9f,0.f }; _matrix Offset = XMMatrixTranslation(m_OffsetPos.x, m_OffsetPos.y, m_OffsetPos.z); @@ -1914,18 +2193,9 @@ void CPlayer::Add_FSM() _matrix FinalWorld = FixRot * SocketWorld; - _vector SourS, SourR, SourT; - _vector DestS, DestR, DestT; - XMMatrixDecompose(&SourS, &SourR, &SourT, FinalWorld); - XMMatrixDecompose(&DestS, &DestR, &DestT, m_pTransformCom->Get_XMWorldMatrix()); + m_pTransformCom->Set_WorldMatrix(FinalWorld); + m_pCharacter_Controller->Set_Position(FinalWorld.r[3]); - _vector finalR = XMQuaternionSlerp(SourR, DestR, fTimeDelta); - _vector finalT = XMVectorLerp(SourT, DestT, fTimeDelta); - - _matrix finalMat = XMMatrixAffineTransformation(DestS, XMVectorZero(), finalR, finalT); - - m_pTransformCom->Set_WorldMatrix(finalMat); - m_pCharacter_Controller->Set_Position(finalMat.r[3]); }; Desc.funcLateUpdate = nullptr; m_States.emplace(FSMSTATE::BROOM_RIDE, CState_Broom_Ride::Create(&Desc)); @@ -1939,43 +2209,40 @@ void CPlayer::Add_FSM() Desc.funcExitEvent = [this]() { Behavior_Broom_Ride_MoveExit(); }; Desc.funcPriorityUpdate = [this](_float fTimeDelta) { _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex(); - - _matrix BroomWorld = XMLoadFloat4x4(m_pBroomTransform->Get_WorldMatrixPtr()); - _matrix BoneLocal = XMLoadFloat4x4(m_pBroomModel->Get_BoneMatrixPtr("broomSocket")); - - _vector Scale, Rot, Trans; - - XMMatrixDecompose(&Scale, &Rot, &Trans, BoneLocal); - - _matrix BoneNoScale = XMMatrixRotationQuaternion(Rot) * XMMatrixTranslationFromVector(Trans); - - m_OffsetPos = { 0.f, 0.9f, 0.f }; - _matrix Offset = XMMatrixTranslation(m_OffsetPos.x, - m_OffsetPos.y, m_OffsetPos.z); - - _matrix SocketWorld = BoneNoScale * Offset * BroomWorld; - - _matrix FixRot = XMMatrixRotationY(XMConvertToRadians(180.f)); - - _matrix FinalWorld = FixRot * SocketWorld; - - _vector SourS, SourR, SourT; - _vector DestS, DestR, DestT; - XMMatrixDecompose(&SourS, &SourR, &SourT, FinalWorld); - XMMatrixDecompose(&DestS, &DestR, &DestT, m_pTransformCom->Get_XMWorldMatrix()); - - _vector finalR = XMQuaternionSlerp(SourR, DestR, fTimeDelta); - _vector finalT = XMVectorLerp(SourT, DestT, fTimeDelta); - - _matrix finalMat = XMMatrixAffineTransformation(DestS, XMVectorZero(), finalR, finalT); - - m_pTransformCom->Set_WorldMatrix(finalMat); - m_pCharacter_Controller->Set_Position(finalMat.r[3]); + Attach_Broom(); }; Desc.funcLateUpdate = nullptr; m_States.emplace(FSMSTATE::BROOM_RIDE_MOVE, CState_Broom_Ride_Move::Create(&Desc)); } + { + CState_Broom_Hover::STATE_BROOM_HOVER_DESC Desc{}; + Desc.pOwner = this; + Desc.funcEnterEvent = [this]() { Behavior_Broom_HoverEnter(); }; + Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_Broom_HoverExitCheck(fTimedelta); }; + Desc.funcExitEvent = [this]() { Behavior_Broom_HoverExit(); }; + Desc.funcPriorityUpdate = [this](_float fTimeDelta) { + _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex(); + Attach_Broom(); + }; + Desc.funcLateUpdate = nullptr; + m_States.emplace(FSMSTATE::HOVER, CState_Broom_Hover::Create(&Desc)); + } + + { + CState_Broom_Fly::STATE_BROOM_FLY_DESC Desc{}; + Desc.pOwner = this; + Desc.funcEnterEvent = [this]() { Behavior_Broom_FlyEnter(); }; + Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_Broom_FlyExitCheck(fTimedelta); }; + Desc.funcExitEvent = [this]() { Behavior_Broom_FlyExit(); }; + Desc.funcPriorityUpdate = [this](_float fTimeDelta) { + _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex(); + Attach_Broom(); + }; + Desc.funcLateUpdate = nullptr; + m_States.emplace(FSMSTATE::FLY, CState_Broom_Fly::Create(&Desc)); + } + { CState_Broom_Dismount::STATE_BROOM_DISMOUNT_DESC Desc{}; Desc.pOwner = this; @@ -2059,6 +2326,10 @@ void CPlayer::Set_Anim() m_Animation[STATEANIM::HIT_L] = { 1200,false }; m_Animation[STATEANIM::HIT_R] = { 1201,false }; + m_Animation[STATEANIM::FLINCH_BWD] = { 1060,false }; + m_Animation[STATEANIM::FLINCH_FWD] = { 1061,false }; + m_Animation[STATEANIM::FLINCH_LEFT] = { 1062,false }; + m_Animation[STATEANIM::FLINCH_RIGHT] = { 1063,false }; m_Animation[STATEANIM::KNOCKBACK] = { 1078,false }; m_Animation[STATEANIM::BROOM_IDLE] = { 710,true }; @@ -2067,6 +2338,7 @@ void CPlayer::Set_Anim() m_Animation[STATEANIM::BROOM_RIGHT] = { 714,true }; m_Animation[STATEANIM::BROOM_DOWN] = { 712,true }; m_Animation[STATEANIM::BROOM_UP] = { 715,true }; + m_Animation[STATEANIM::BROOM_REVELIO] = { 678,false }; m_Animation[STATEANIM::BROOM_MOUNT] = { 734,false }; m_Animation[STATEANIM::BROOM_MOUNT_END] = { 737,false }; @@ -2078,6 +2350,7 @@ void CPlayer::Set_Anim() m_Animation[STATEANIM::BROOM_HOVER_FWD] = { 700,true }; m_Animation[STATEANIM::BROOM_HOVER_LEFT] = { 701,true }; m_Animation[STATEANIM::BROOM_HOVER_RIGHT] = { 702,true }; + m_Animation[STATEANIM::BROOM_HOVER_REVELIO] = { 721,false }; m_Animation[STATEANIM::JOG_AIM_STOP_L] = { 295,false }; diff --git a/Jusin154_Team3D/Client/Private/Potion.cpp b/Jusin154_Team3D/Client/Private/Potion.cpp index 235a2e4c6..c16c19c53 100644 --- a/Jusin154_Team3D/Client/Private/Potion.cpp +++ b/Jusin154_Team3D/Client/Private/Potion.cpp @@ -1,6 +1,7 @@ #include "pch.h" #include "Potion.h" #include "GameInstance.h" +#include "InfoInstance.h" CPotion::CPotion(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) :CElementObject(pDevice, pContext) @@ -8,7 +9,8 @@ CPotion::CPotion(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) } CPotion::CPotion(const CPotion& rhs) - :CElementObject(rhs) + :CElementObject(rhs), + m_pInfoInstance(CInfoInstance::GetInstance()) { } @@ -44,11 +46,22 @@ HRESULT CPotion::Initialize(void* pArg) m_vImageSize = _float2(32.f, 32.f); m_fFontX = 1163.f; m_fFontY = 860.f; - m_iPotionIndex = 0; + m_iPotionIndex = 10; m_iPerPotionIndex = -1; + m_iPotion_Level = 1; return S_OK; } +_float CPotion::Use_Potion() +{ + if (m_iPotionIndex == 0) + return -1.f; + + m_iPotionIndex--; + + return floor(m_pInfoInstance->Get_PlayerStatPtr()->Get_Stat().fMaxHp * (m_iPotion_Level * 0.25f)); +} + void CPotion::Priority_Update(_float fTimeDelta) { if (!__super::Chack_Visible()) @@ -90,11 +103,6 @@ void CPotion::Update(_float fTimeDelta) } } - if (m_pGameInstance->Key_Down(DIK_G)) - { - m_fTime = -1.f; - } - if (m_iPerPotionIndex != m_iPotionIndex) { m_strPotion = to_wstring(m_iPotionIndex); diff --git a/Jusin154_Team3D/Client/Private/Protego.cpp b/Jusin154_Team3D/Client/Private/Protego.cpp index 2f73f140a..8d6cdb002 100644 --- a/Jusin154_Team3D/Client/Private/Protego.cpp +++ b/Jusin154_Team3D/Client/Private/Protego.cpp @@ -53,6 +53,8 @@ HRESULT CProtego::Initialize(void* pArg) m_fDuration = 2.5f; + m_isLoop = true; + return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Skill_Data.cpp b/Jusin154_Team3D/Client/Private/Skill_Data.cpp index 8c190dab2..7866ae75c 100644 --- a/Jusin154_Team3D/Client/Private/Skill_Data.cpp +++ b/Jusin154_Team3D/Client/Private/Skill_Data.cpp @@ -16,6 +16,9 @@ HRESULT CSkill_Data::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pCon m_bNoCool = false; m_pInfoInstance->Add_Event(TEXT("NoCooL"), [this](void* p) {this->NoCool(*reinterpret_cast<_bool*>(p)); }); + Spell_UnLock(2); + Spell_UnLock(6); + Spell_UnLock(11); return S_OK; } @@ -54,6 +57,15 @@ void CSkill_Data::Update_Damage(_float Damage) } } +void CSkill_Data::Spell_UnLock(_int SpellID) +{ + if (SpellInfo[SpellID].bSpell_Lock == true) + return; + + SpellInfo[SpellID].bSpell_Lock = true; + m_pInfoInstance->Event_CallBack(TEXT("Spell_UnLock"), &SpellInfo[SpellID].bSpell_Lock); +} + void CSkill_Data::Update(_float fTimeDelta) { for (_int i = 0; i < m_iSpell_Count; ++i) diff --git a/Jusin154_Team3D/Client/Private/Spell_Anim.cpp b/Jusin154_Team3D/Client/Private/Spell_Anim.cpp index 5ce3998bf..34b4f071c 100644 --- a/Jusin154_Team3D/Client/Private/Spell_Anim.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_Anim.cpp @@ -88,23 +88,30 @@ void CSpell_Anim::Update(_float fTimeDelta) m_bAnim_Start = false; } - - if (m_bAnim_Start == true) + if (m_bFadeOut == false) { - m_fTime += fTimeDelta * m_fTimeMult; - } - else - { - m_iCurrentFrame = 0; - } - - if (m_fTime >= m_fFrameTime) - { - m_iCurrentFrame++; - m_fTime -= m_fFrameTime; - - if (m_iCurrentFrame >= m_iTotalFrames) + if (m_bAnim_Start == true) + { + m_fTime += fTimeDelta * m_fTimeMult; + } + else + { m_iCurrentFrame = 0; + } + + if (m_fTime >= m_fFrameTime) + { + m_iCurrentFrame++; + m_fTime -= m_fFrameTime; + + if (m_iCurrentFrame >= m_iTotalFrames) + m_iCurrentFrame = 0; + } + } + + if (m_iPerSpell != -1) + { + m_fY = m_fOrigin_Position.y + m_pInfoInstance->Get_Spell_Info(m_iPerSpell).fVidio; } __super::Update(fTimeDelta); diff --git a/Jusin154_Team3D/Client/Private/Spell_Header.cpp b/Jusin154_Team3D/Client/Private/Spell_Header.cpp index 491322ec4..685d50aa5 100644 --- a/Jusin154_Team3D/Client/Private/Spell_Header.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_Header.cpp @@ -48,7 +48,6 @@ HRESULT CSpell_Header::Initialize(void* pArg) static_cast(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); }); static_cast(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); }); static_cast(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); }); - static_cast(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); }); m_fFontX = 920.f; m_fFontY = 510.f; m_fType = _float2(935.f, 550.f); @@ -101,12 +100,15 @@ void CSpell_Header::Update(_float fTimeDelta) } } - if (m_iSpellType != -1 && m_iPerSpellIndex != m_iSpellType) + if (m_bFadeOut == false) { - m_iSkillType = static_cast(m_pOwner)->Get_Info(m_iSpellType).iSpell_Type; - m_pSpell_Name = static_cast(m_pOwner)->Get_Info(m_iSpellType).pSpell_Name; - m_fSpell_Type = static_cast(m_pOwner)->Get_Info(m_iSpellType).pType_Name; - m_iPerSpellIndex = m_iSpellType; + if (m_iSpellType != -1 && m_iPerSpellIndex != m_iSpellType) + { + m_iSkillType = m_pInfoInstance->Get_Spell_Info(m_iSpellType).iSpell_Type; + m_pSpell_Name = m_pInfoInstance->Get_Spell_Info(m_iSpellType).pSpell_Name; + m_fSpell_Type = m_pInfoInstance->Get_Spell_Info(m_iSpellType).pType_Name; + m_iPerSpellIndex = m_iSpellType; + } } m_fTime += fTimeDelta * m_fTimeMult; diff --git a/Jusin154_Team3D/Client/Private/Spell_Preview.cpp b/Jusin154_Team3D/Client/Private/Spell_Preview.cpp index 67c9c579e..074f99af1 100644 --- a/Jusin154_Team3D/Client/Private/Spell_Preview.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_Preview.cpp @@ -104,12 +104,15 @@ void CSpell_Preview::Update(_float fTimeDelta) } } - if (m_iSpellType != -1 && m_iPerSpellIndex != m_iSpellType) + if (m_bFadeOut == false) { - m_pSpell_Info = static_cast(m_pOwner)->Get_Info(m_iSpellType).pSpellInfo; - m_fPreviewOffSet = static_cast(m_pOwner)->Get_Info(m_iSpellType).fPreview; - SizeUpY(m_fOriginPerviewSize + m_fPreviewOffSet); - m_iPerSpellIndex = m_iSpellType; + if (m_iSpellType != -1) + { + m_pSpell_Info = m_pInfoInstance->Get_Spell_Info(m_iSpellType).pSpellInfo; + m_fPreviewOffSet = m_pInfoInstance->Get_Spell_Info(m_iSpellType).fPreview; + SizeUpY(m_fOriginPerviewSize + m_fPreviewOffSet); + m_iPerSpellIndex = m_iSpellType; + } } m_fTime += fTimeDelta * m_fTimeMult; diff --git a/Jusin154_Team3D/Client/Private/Spell_State.cpp b/Jusin154_Team3D/Client/Private/Spell_State.cpp index bcfce9906..da1e3d9b9 100644 --- a/Jusin154_Team3D/Client/Private/Spell_State.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_State.cpp @@ -1,6 +1,7 @@ #include "pch.h" #include "Spell_State.h" #include "GameInstance.h" +#include "InfoInstance.h" CSpell_State::CSpell_State(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) :CElementObject(pDevice, pContext) @@ -8,7 +9,8 @@ CSpell_State::CSpell_State(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) } CSpell_State::CSpell_State(const CSpell_State& rhs) - :CElementObject(rhs) + :CElementObject(rhs), + m_pInfoInstance(CInfoInstance::GetInstance()) { } @@ -47,6 +49,8 @@ HRESULT CSpell_State::Initialize(void* pArg) m_pVIBufferCom->Set_Pos(-185.f, 375.f, m_fOffSetX, m_fOffSetY, m_iCols); m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); static_cast(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); }); + m_pInfoInstance->Add_Event(TEXT("Spell_UnLock"), [this](void* p) {this->Spell_UnLock(*reinterpret_cast<_int*>(p)); }); + Spell_Setting(); return S_OK; } @@ -118,7 +122,7 @@ HRESULT CSpell_State::Render() { return E_FAIL; } - if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIINTANCE::ALPHABLEND)))) + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIINTANCE::SPELL_LOCK)))) { return E_FAIL; } @@ -170,6 +174,24 @@ void CSpell_State::Click_Slot(_bool bClick) } } +void CSpell_State::Spell_Setting() +{ + for (_int i = 0; i < 26; ++i) + { + m_bLock[i] = m_pInfoInstance->Get_Spell_Info(i).bSpell_Lock; + if (m_bLock[i] == true) + { + m_pVIBufferCom->Set_Equip_Index(i); + } + } +} + +void CSpell_State::Spell_UnLock(_int iSpellIndex) +{ + m_pVIBufferCom->Set_Equip_Index(iSpellIndex); + m_bLock[iSpellIndex] = true; +} + HRESULT CSpell_State::Bind_ShaderResources() { if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) diff --git a/Jusin154_Team3D/Client/Private/Spell_Vidio_Border.cpp b/Jusin154_Team3D/Client/Private/Spell_Vidio_Border.cpp index 7521a2e79..2aa6094a2 100644 --- a/Jusin154_Team3D/Client/Private/Spell_Vidio_Border.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_Vidio_Border.cpp @@ -1,6 +1,7 @@ #include "pch.h" #include "Spell_Vidio_Border.h" #include "GameInstance.h" +#include "InfoInstance.h" CSpell_Vidio_Border::CSpell_Vidio_Border(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) :CElementObject(pDevice, pContext) @@ -8,7 +9,8 @@ CSpell_Vidio_Border::CSpell_Vidio_Border(ID3D11Device* pDevice, ID3D11DeviceCont } CSpell_Vidio_Border::CSpell_Vidio_Border(const CSpell_Vidio_Border& rhs) - :CElementObject(rhs) + :CElementObject(rhs), + m_pInfoInstance(CInfoInstance::GetInstance()) { } @@ -92,6 +94,14 @@ void CSpell_Vidio_Border::Update(_float fTimeDelta) } } + if (m_bFadeOut == false) + { + if (m_iSpellType != -1) + { + m_fY = m_fOrigin_Position.y + m_pInfoInstance->Get_Spell_Info(m_iSpellType).fVidio; + } + } + m_fTime += fTimeDelta * m_fTimeMult; if (m_fAlpha >= 0.3f) diff --git a/Jusin154_Team3D/Client/Private/State_Broom_Fly.cpp b/Jusin154_Team3D/Client/Private/State_Broom_Fly.cpp new file mode 100644 index 000000000..0d176501c --- /dev/null +++ b/Jusin154_Team3D/Client/Private/State_Broom_Fly.cpp @@ -0,0 +1,64 @@ +#include "pch.h" +#include "State_Broom_Fly.h" +#include "Unit.h" + + +CState_Broom_Fly::CState_Broom_Fly() + :CState_Root() +{ +} + +void CState_Broom_Fly::Enter() +{ + __super::Enter(); +} + +HRESULT CState_Broom_Fly::Update(_float fTimeDelta) +{ + if (nullptr != m_funcPriorityUpdate) { + m_funcPriorityUpdate(fTimeDelta); + } + if (E_FAIL == (__super::Update(fTimeDelta))) { + return E_FAIL; + } + if (nullptr != m_funcLateUpdate) { + m_funcLateUpdate(fTimeDelta); + } + return S_OK; +} + +void CState_Broom_Fly::Exit() +{ + __super::Exit(); +} + +HRESULT CState_Broom_Fly::Initialize(STATE_BROOM_FLY_DESC* pDesc) +{ + if (FAILED(__super::Initialize(pDesc))) { + return E_FAIL; + } + m_funcPriorityUpdate = pDesc->funcPriorityUpdate; + m_funcLateUpdate = pDesc->funcLateUpdate; + m_pModel = m_pOwner->Get_Component(); + m_pFSM = m_pOwner->Get_Component(); + + return S_OK; +} + +CState_Broom_Fly* CState_Broom_Fly::Create(STATE_BROOM_FLY_DESC* pDesc) +{ + CState_Broom_Fly* pInstance = new CState_Broom_Fly; + if (FAILED(pInstance->Initialize(pDesc))) { + SAFE_RELEASE(pInstance); + } + return pInstance; +} + +void CState_Broom_Fly::Free() +{ + __super::Free(); +} + +void CState_Broom_Fly::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Client/Private/State_Broom_Hover.cpp b/Jusin154_Team3D/Client/Private/State_Broom_Hover.cpp new file mode 100644 index 000000000..cca209c0c --- /dev/null +++ b/Jusin154_Team3D/Client/Private/State_Broom_Hover.cpp @@ -0,0 +1,64 @@ +#include "pch.h" +#include "State_Broom_Hover.h" +#include "Unit.h" + + +CState_Broom_Hover::CState_Broom_Hover() + :CState_Root() +{ +} + +void CState_Broom_Hover::Enter() +{ + __super::Enter(); +} + +HRESULT CState_Broom_Hover::Update(_float fTimeDelta) +{ + if (nullptr != m_funcPriorityUpdate) { + m_funcPriorityUpdate(fTimeDelta); + } + if (E_FAIL == (__super::Update(fTimeDelta))) { + return E_FAIL; + } + if (nullptr != m_funcLateUpdate) { + m_funcLateUpdate(fTimeDelta); + } + return S_OK; +} + +void CState_Broom_Hover::Exit() +{ + __super::Exit(); +} + +HRESULT CState_Broom_Hover::Initialize(STATE_BROOM_HOVER_DESC* pDesc) +{ + if (FAILED(__super::Initialize(pDesc))) { + return E_FAIL; + } + m_funcPriorityUpdate = pDesc->funcPriorityUpdate; + m_funcLateUpdate = pDesc->funcLateUpdate; + m_pModel = m_pOwner->Get_Component(); + m_pFSM = m_pOwner->Get_Component(); + + return S_OK; +} + +CState_Broom_Hover* CState_Broom_Hover::Create(STATE_BROOM_HOVER_DESC* pDesc) +{ + CState_Broom_Hover* pInstance = new CState_Broom_Hover; + if (FAILED(pInstance->Initialize(pDesc))) { + SAFE_RELEASE(pInstance); + } + return pInstance; +} + +void CState_Broom_Hover::Free() +{ + __super::Free(); +} + +void CState_Broom_Hover::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Client/Private/State_Shield.cpp b/Jusin154_Team3D/Client/Private/State_Shield.cpp new file mode 100644 index 000000000..fbf855e80 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/State_Shield.cpp @@ -0,0 +1,64 @@ +#include "pch.h" +#include "State_Shield.h" +#include "Unit.h" + + +CState_Shield::CState_Shield() + :CState_Root() +{ +} + +void CState_Shield::Enter() +{ + __super::Enter(); +} + +HRESULT CState_Shield::Update(_float fTimeDelta) +{ + if (nullptr != m_funcPriorityUpdate) { + m_funcPriorityUpdate(fTimeDelta); + } + if (E_FAIL == (__super::Update(fTimeDelta))) { + return E_FAIL; + } + if (nullptr != m_funcLateUpdate) { + m_funcLateUpdate(fTimeDelta); + } + return S_OK; +} + +void CState_Shield::Exit() +{ + __super::Exit(); +} + +HRESULT CState_Shield::Initialize(STATE_SHIELD_DESC* pDesc) +{ + if (FAILED(__super::Initialize(pDesc))) { + return E_FAIL; + } + m_funcPriorityUpdate = pDesc->funcPriorityUpdate; + m_funcLateUpdate = pDesc->funcLateUpdate; + m_pModel = m_pOwner->Get_Component(); + m_pFSM = m_pOwner->Get_Component(); + + return S_OK; +} + +CState_Shield* CState_Shield::Create(STATE_SHIELD_DESC* pDesc) +{ + CState_Shield* pInstance = new CState_Shield; + if (FAILED(pInstance->Initialize(pDesc))) { + SAFE_RELEASE(pInstance); + } + return pInstance; +} + +void CState_Shield::Free() +{ + __super::Free(); +} + +void CState_Shield::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Client/Private/StunEffect.cpp b/Jusin154_Team3D/Client/Private/StunEffect.cpp new file mode 100644 index 000000000..5db5fb195 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/StunEffect.cpp @@ -0,0 +1,207 @@ +#include "pch.h" +#include "StunEffect.h" + +#include "GameInstance.h" +#include "EffectParts.h" +#include "Wand.h" +#include "Player.h" + +CStunEffect::CStunEffect(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CEffect_Container{ pDevice, pContext } +{ +} + +CStunEffect::CStunEffect(const CStunEffect& rhs) + : CEffect_Container(rhs) +{ +} + +HRESULT CStunEffect::Initialize_Prototype() +{ + + return S_OK; + +} + +HRESULT CStunEffect::Initialize(void* pArg) +{ + if (FAILED(__super::Initialize(pArg))) + return E_FAIL; + + if (FAILED(Ready_Components(pArg))) + return E_FAIL; + + + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Stun"))) + return E_FAIL; + + + m_wstrEffectName = L"Stun"; + + + m_fDuration = 3.f; + + m_pStunEffect = Get_PartObject("StunEffect"); + SAFE_ADDREF(m_pStunEffect); + + + m_Events.emplace(3.f, [&]() { + + m_BoneMat = nullptr; + + }); + + return S_OK; +} + +void CStunEffect::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); + +} + +void CStunEffect::Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Update(fTimeDelta); + + Update_Event(fTimeDelta); + + if (m_BoneMat == nullptr) + return; + + _matrix BoneMat = XMLoadFloat4x4(m_BoneMat); + + for (int i = 0; i < 3; ++i) { + BoneMat.r[i] = XMVector3Normalize(BoneMat.r[i]); + } + + BoneMat *= m_pOwner->Get_Component()->Get_XMWorldMatrix(); + + m_pStunEffect->Get_Component()->Set_State(STATE::POSITION, BoneMat.r[3]); + +} + +void CStunEffect::Late_Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Late_Update(fTimeDelta); + + +} + +HRESULT CStunEffect::Pre_Setting(CGameObject* pObject, void* pArg) +{ + + if (FAILED(__super::Pre_Setting(pObject, nullptr))) + return E_FAIL; + + _string strBoneName = *static_cast<_string*>(pArg); + + m_BoneMat = m_pOwner->Get_Component()->Get_BoneMatrixPtr(strBoneName.c_str()) ; // 위치 넘기기 + + _matrix BoneMat = XMLoadFloat4x4(m_BoneMat); + + for (int i = 0; i < 3; ++i) { + BoneMat.r[i] = XMVector3Normalize(BoneMat.r[i]); + } + BoneMat *= m_pOwner->Get_Component()->Get_XMWorldMatrix(); + + m_pStunEffect->Get_Component()->Set_State(STATE::POSITION, BoneMat.r[3]); + + + + m_pStunEffect->Set_Visible(true); + + + return S_OK; +} + +HRESULT CStunEffect::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CStunEffect::Ready_Child() +{ + return S_OK; +} + +CStunEffect* CStunEffect::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CStunEffect* pInstance = new CStunEffect(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CStunEffect"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + + +CGameObject* CStunEffect::Clone(void* pArg, CGameObject* pOwner) +{ + CStunEffect* pInstance = new CStunEffect(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CStunEffect"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CStunEffect::OnCollision(CGameObject* pOther, void* pDesc) +{ + _int iIndex = CollisionCheck(); + + if (iIndex < 0) + return; + + if (m_isCollisionEnter == true) + return; + + m_isCollisionEnter = true; + + _vector vPos = XMVectorSet(m_Hitbuffer.touches[iIndex].position.x, m_Hitbuffer.touches[iIndex].position.y, m_Hitbuffer.touches[iIndex].position.z, 1.f); + + + for (auto& pPair : m_PartObjects) + { + pPair.second->Set_Visible(true); + pPair.second->Get_Component()->Set_State(STATE::POSITION, vPos); + } + + +} + +void CStunEffect::Free() +{ + __super::Free(); + Safe_Release(m_pStunEffect); + +} +#ifdef _DEBUG +void CStunEffect::Describe_Entity() +{ + +} +#endif + +HRESULT CStunEffect::Bind_ShaderResources() +{ + return S_OK; +} + + diff --git a/Jusin154_Team3D/Client/Private/TrailObject.cpp b/Jusin154_Team3D/Client/Private/TrailObject.cpp index 4040b2ee5..50ec43e8d 100644 --- a/Jusin154_Team3D/Client/Private/TrailObject.cpp +++ b/Jusin154_Team3D/Client/Private/TrailObject.cpp @@ -92,9 +92,7 @@ void CTrailObject::Late_Update(_float fTimeDelta) if (m_TrailInfo.isOnlyBlur == true) return; - if (m_pGameInstance->isIn_WorldFrustum(Get_WorldPostion(), m_pTransformCom->Get_Radius())) { - m_pGameInstance->Add_RenderGroup(m_TrailInfo.eRenderOrder, this); - } + m_pGameInstance->Add_RenderGroup(m_TrailInfo.eRenderOrder, this); } diff --git a/Jusin154_Team3D/Client/Private/Troll.cpp b/Jusin154_Team3D/Client/Private/Troll.cpp index 9f557f864..dff963c67 100644 --- a/Jusin154_Team3D/Client/Private/Troll.cpp +++ b/Jusin154_Team3D/Client/Private/Troll.cpp @@ -11,6 +11,7 @@ #include "EffectPool.h" #include "Layer.h" #include "TrailObject.h" +#include "MapElement_Interactable.h" #pragma region STATE #include "State_Idle.h" @@ -159,11 +160,11 @@ void CTroll::Late_Update(_float fTimeDelta) if (true == m_pCharacter_Controller->IsActive()) { m_pTransformCom->Set_State(STATE::POSITION, m_pCharacter_Controller->Get_FootPosition()); } - else { + else if (true == m_pRigidBody->IsActive()) { m_pTransformCom->Set_WorldMatrix(m_pRigidBody->Get_Actor()->getGlobalPose()); } - if (m_bLookAt) { + if (true == m_bLookAt) { m_pTransformCom->LookAt_Lerp(XMLoadFloat4(&m_vTargetPos), fTimeDelta, 3.f); } @@ -181,7 +182,7 @@ void CTroll::Late_Update(_float fTimeDelta) m_fCross = XMVectorGetY(XMVector3Cross(vLook, vDir)); m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this); - m_pGameInstance->Add_RenderGroup(RENDER::SHADOW, this); +// m_pGameInstance->Add_RenderGroup(RENDER::SHADOW, this); } HRESULT CTroll::Render() @@ -191,10 +192,6 @@ HRESULT CTroll::Render() } _uint iNumMeshes = m_pModelCom->Get_NumMeshes(); - _uint iShaderPass = ENUM_CLASS(SHADER_PASS_ANIM::DEFAULT); - if (true == m_bDrawOutLine) { - iShaderPass = ENUM_CLASS(SHADER_PASS_ANIM::OUTLINE_WRITE); - } for (_uint i = 0; i < iNumMeshes; i++) { if (FAILED(m_pModelCom->Bind_BoneMatrices(i, m_pShaderCom, "g_BoneMatrices"))) { @@ -205,7 +202,7 @@ HRESULT CTroll::Render() return E_FAIL; } - if (FAILED(m_pShaderCom->Begin(iShaderPass))) { + if (FAILED(m_pModelCom->Begin(i, m_pShaderCom, m_bDrawOutLine))) { return E_FAIL; } @@ -214,7 +211,7 @@ HRESULT CTroll::Render() } } - if (m_bDrawOutLine) { + if (true == m_bDrawOutLine) { Render_OutLine(); } @@ -234,6 +231,60 @@ HRESULT CTroll::Render() return S_OK; } +HRESULT CTroll::Render_OutLine() +{ + m_bDrawOutLine = false; + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + + Compute_Depth(); + _float fRatio = (m_fCamDepth / *m_pGameInstance->Get_CurrentCameraFar()); + m_fOutLineThickness = CMyTools::Lerp_f1D(2.f, 6.f, fRatio); + if (m_fOutLineThickness > 6.f) { + m_fOutLineThickness = 6.f; + } + else if (m_fOutLineThickness < 2.f) { + m_fOutLineThickness = 2.f; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_vOutLineColor", &m_vOutLineColor, sizeof(_float3)))) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fOutLineThickness", &m_fOutLineThickness, sizeof(_float)))) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fOutLineScale", &m_fOutLineScale, sizeof(_float)))) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fOutLinePower", &m_fOutLinePower, sizeof(_float)))) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_vCamPosition", m_pGameInstance->Get_CamPosition(), sizeof(_float4)))) { + return E_FAIL; + } + _uint iNumMeshes = m_pModelCom->Get_NumMeshes(); + + for (_uint i = 0; i < iNumMeshes; i++) + { + if (FAILED(m_pModelCom->Bind_BoneMatrices(i, m_pShaderCom, "g_BoneMatrices"))) { + return E_FAIL; + } + + if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) { + return E_FAIL; + } + + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_NPC_PBR_ANIM::OUTLINE_READ)))) { + return E_FAIL; + } + + if (FAILED(m_pModelCom->Render(i))) { + return E_FAIL; + } + } + return S_OK; +} + HRESULT CTroll::Render_Shadow() { if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) { @@ -254,10 +305,10 @@ HRESULT CTroll::Render_Shadow() if (FAILED(m_pModelCom->Bind_BoneMatrices(i, m_pShaderCom, "g_BoneMatrices"))) { return E_FAIL; } - if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_ANIM::SHADOW)))) { + + if (FAILED(m_pModelCom->Begin(i, m_pShaderCom))) { return E_FAIL; } - if (FAILED(m_pModelCom->Render(i))) { return E_FAIL; } @@ -279,21 +330,42 @@ _vector CTroll::Get_LockOnPos() void CTroll::OnCollision(CGameObject* pOther, void* pDesc) { + if (true == m_bDead) { + return; + } + ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc); + + _vector Head = (XMLoadFloat4x4(Get_HeadMatrix()) * m_pTransformCom->Get_XMWorldMatrix()).r[3]; + m_DamageInfo.vTarget_Pos = XMVectorSet(Head.m128_f32[0], Head.m128_f32[1], Head.m128_f32[2], 1.f); + _uint iSkillType = dynamic_cast(pOther)->Get_SkillType(); + auto damagePair = Get_Damage(m_pInfoInstance->Get_Spell_Damage(iSkillType)); switch (iSkillType) { case ENUM_CLASS(SKILL_TYPE::DESCENDO): - m_eHitSpell = STATEANIM::KNOCKDOWN_FWD; + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::DESCENDO); + break; + case ENUM_CLASS(SKILL_TYPE::BOMBARDA): + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::DESCENDO); break; case ENUM_CLASS(SKILL_TYPE::FLIPENDO): - m_eHitSpell = STATEANIM::TUMBLE2; + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::FLIPENDO); + break; + case ENUM_CLASS(SKILL_TYPE::JAP): + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::JAP); break; default: - m_eHitSpell = STATEANIM::KNOCKDOWN_FWD; + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::END); break; } + 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; + } m_pFSM->Change_State(FSMSTATE::HIT); } @@ -309,7 +381,18 @@ HRESULT CTroll::Ready_Components() Desc.fRotationPerSec = XMConvertToRadians(180.0f); Desc.fRadius = 10.f; - __super::Ready_Components(&Desc); + + if (FAILED(Add_Component(g_iStaticLevel, &m_pTransformCom, &Desc))) { + return E_FAIL; + } + if (FAILED(Add_Component(g_iStaticLevel, &m_pFSM))) { + return E_FAIL; + } + /* Com_Shader */ + if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_NPC_PBR_ANIM, + reinterpret_cast(&m_pShaderCom)))) { + return E_FAIL; + } m_strModelPrototypeTag = TEXT("Prototype_Component_Troll_Model"); @@ -539,7 +622,14 @@ void CTroll::Describe_Entity() { __super::Describe_Entity(); + _float4x4 socketMat = *m_pModelCom->Get_BoneMatrixPtr("HeadEnd"); + _string strSocket = "Socket " + to_string(socketMat._41) + to_string(socketMat._42) + to_string(socketMat._43); + + GUI::Text(strSocket.c_str()); + + + m_pTransformCom->Describe_Entity(); } #endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/TrollSwing.cpp b/Jusin154_Team3D/Client/Private/TrollSwing.cpp index 8b362594e..3af43f8a4 100644 --- a/Jusin154_Team3D/Client/Private/TrollSwing.cpp +++ b/Jusin154_Team3D/Client/Private/TrollSwing.cpp @@ -5,6 +5,7 @@ #include "EffectParts.h" #include "Wand.h" #include "Player.h" +#include "InfoInstance.h" CTrollSwing::CTrollSwing(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) : CEffect_Container{ pDevice, pContext } @@ -12,8 +13,10 @@ CTrollSwing::CTrollSwing(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) } CTrollSwing::CTrollSwing(const CTrollSwing& rhs) - : CEffect_Container(rhs) + : CEffect_Container(rhs), + m_pInfoInstance(CInfoInstance::GetInstance()) { + SAFE_ADDREF(m_pInfoInstance); } HRESULT CTrollSwing::Initialize_Prototype() @@ -39,7 +42,7 @@ HRESULT CTrollSwing::Initialize(void* pArg) m_wstrEffectName = L"TrollSwing"; - m_fDuration = 3.2f; + m_fDuration = 4.2f; return S_OK; } @@ -92,6 +95,18 @@ HRESULT CTrollSwing::Pre_Setting(CGameObject* pObject, void* pArg) pRockPT->Set_Visible(true); pSmoke->Set_Visible(true); + CPlayer* pPlayer = static_cast(m_pInfoInstance->Get_NearestPlayerAlly(m_pOwner->Get_WorldPostion()).first); + + + if (pPlayer == nullptr) + return E_FAIL; + + _float fDistance = XMVectorGetX(XMVector4Length(pPlayer->Get_WorldPostion() - Get_WorldPostion())); + + _float fShakeValue = clamp(50.f / fDistance, 3.f, 10.f); + + pPlayer->Start_CameraShake(1.2f, fShakeValue); + return S_OK; } @@ -164,6 +179,7 @@ void CTrollSwing::Free() { __super::Free(); + SAFE_RELEASE(m_pInfoInstance); } #ifdef _DEBUG void CTrollSwing::Describe_Entity() diff --git a/Jusin154_Team3D/Client/Private/Troll_Nomal_Smoke.cpp b/Jusin154_Team3D/Client/Private/Troll_Nomal_Smoke.cpp index 5766c713b..47fea75e4 100644 --- a/Jusin154_Team3D/Client/Private/Troll_Nomal_Smoke.cpp +++ b/Jusin154_Team3D/Client/Private/Troll_Nomal_Smoke.cpp @@ -39,7 +39,7 @@ HRESULT CTroll_Nomal_Smoke::Initialize(void* pArg) m_wstrEffectName = L"Troll_Nomal_Smoke"; - m_fDuration = 2.5f; + m_fDuration = 3.5f; return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Troll_Rock.cpp b/Jusin154_Team3D/Client/Private/Troll_Rock.cpp index 3c2c78edc..cb1ee4aa4 100644 --- a/Jusin154_Team3D/Client/Private/Troll_Rock.cpp +++ b/Jusin154_Team3D/Client/Private/Troll_Rock.cpp @@ -38,6 +38,7 @@ HRESULT CTroll_Rock::Initialize(void* pArg) void CTroll_Rock::Priority_Update(_float fTimeDelta) { + XMStoreFloat4(&m_vStartPos, m_pTransformCom->Get_State(STATE::POSITION)); m_pModelCom->Combined_BoneMatrix(); if (m_bAttach) { @@ -62,7 +63,6 @@ void CTroll_Rock::Priority_Update(_float fTimeDelta) m_pTransformCom->Go_Straight(fTimeDelta); } - XMStoreFloat4(&m_vStartPos, m_pTransformCom->Get_State(STATE::POSITION)); #ifdef _DEBUG @@ -111,7 +111,19 @@ void CTroll_Rock::RockHit() PSX::PxSweepHit* pHit = Hits[i]; PSX::PxActor* pActor = pHit->actor; if (nullptr != pActor && nullptr != pActor->userData) { + const PSX::PxSweepHit& hit = m_SweepBuffer.block; + PSX::PxShape* pShape = hit.shape; + ON_COLLISION_INFO tagCollInfo = {}; + + tagCollInfo.vWorldPos.w = 1.f; + + memcpy_s(&tagCollInfo.vWorldPos, sizeof(tagCollInfo.vWorldPos), &hit.position, sizeof(hit.position)); + + memcpy_s(&tagCollInfo.vWorldNomal, sizeof(tagCollInfo.vWorldNomal), &hit.normal, sizeof(hit.normal)); + XMStoreFloat4(&tagCollInfo.vHitDir, vDir); + tagCollInfo.fLength = fLength; PhsXUserData* pUserData = static_cast(pActor->userData); + tagCollInfo.pObject = pUserData->pOwner; switch (PXOBJECT(pUserData->iSubKind)) { case Engine::PXOBJECT::PLAYER: @@ -122,6 +134,7 @@ void CTroll_Rock::RockHit() m_bVisible = false; CStat* pStat = pUserData->pCharacter->Get_Owner()->Get_Component(); pStat->Get_Damage(10.f); + pUserData->pOwner->OnCollision(this, &tagCollInfo); } break; case Engine::PXOBJECT::ALLY_HITBOX: @@ -256,7 +269,9 @@ void CTroll_Rock::Free() void CTroll_Rock::Describe_Entity() { - + GUI::Begin("TrollRock"); + GUI::Checkbox("Visible", &m_bVisible); + GUI::End(); } #endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Troll_Rush_Hit.cpp b/Jusin154_Team3D/Client/Private/Troll_Rush_Hit.cpp index 16a5a8d98..3eb510cec 100644 --- a/Jusin154_Team3D/Client/Private/Troll_Rush_Hit.cpp +++ b/Jusin154_Team3D/Client/Private/Troll_Rush_Hit.cpp @@ -5,6 +5,7 @@ #include "EffectParts.h" #include "Wand.h" #include "Player.h" +#include "InfoInstance.h" CTroll_Rush_Hit::CTroll_Rush_Hit(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) : CEffect_Container{ pDevice, pContext } @@ -12,8 +13,10 @@ CTroll_Rush_Hit::CTroll_Rush_Hit(ID3D11Device* pDevice, ID3D11DeviceContext* pCo } CTroll_Rush_Hit::CTroll_Rush_Hit(const CTroll_Rush_Hit& rhs) - : CEffect_Container(rhs) + : CEffect_Container(rhs), + m_pInfoInstance(CInfoInstance::GetInstance()) { + SAFE_ADDREF(m_pInfoInstance); } HRESULT CTroll_Rush_Hit::Initialize_Prototype() @@ -39,7 +42,7 @@ HRESULT CTroll_Rush_Hit::Initialize(void* pArg) m_wstrEffectName = L"Troll_Nomal_Smoke"; - m_fDuration = 2.f; + m_fDuration = 3.5f; return S_OK; } @@ -79,13 +82,34 @@ HRESULT CTroll_Rush_Hit::Pre_Setting(CGameObject* pObject, void* pArg) return E_FAIL; - _float4 vPos = *static_cast<_float4*>(pArg); // 위치 넘기기 + _vector vPos = m_pOwner->Get_Component()->Get_Position(); CEffectParts* pSmoke = Get_PartObject("HitSmoke"); + CEffectParts* pRock_PT_35 = Get_PartObject("Rock_PT_35"); - pSmoke->Get_Component()->Set_State(STATE::POSITION, XMLoadFloat4(&vPos)); + _vector vLook = m_pOwner->Get_Component()->Get_State(STATE::LOOK); + + vPos += vLook * 2.f; + + pSmoke->Get_Component()->Set_State(STATE::POSITION, vPos); + pRock_PT_35->Get_Component()->Set_State(STATE::POSITION, vPos); pSmoke->Set_Visible(true); + pRock_PT_35->Set_Visible(true); + + + CPlayer* pPlayer = static_cast(m_pInfoInstance->Get_NearestPlayerAlly(m_pOwner->Get_WorldPostion()).first); + + + if (pPlayer == nullptr) + return E_FAIL; + + _float fDistance = XMVectorGetX(XMVector4Length(pPlayer->Get_WorldPostion() - Get_WorldPostion())); + + _float fShakeValue = clamp(40.f / fDistance, 3.f, 9.f); + + pPlayer->Start_CameraShake(0.8f, fShakeValue); + return S_OK; } @@ -158,6 +182,7 @@ void CTroll_Rush_Hit::Free() { __super::Free(); + SAFE_RELEASE(m_pInfoInstance); } #ifdef _DEBUG void CTroll_Rush_Hit::Describe_Entity() diff --git a/Jusin154_Team3D/Client/Private/Troll_States.cpp b/Jusin154_Team3D/Client/Private/Troll_States.cpp index 6d409eb9e..e9a87bf1c 100644 --- a/Jusin154_Team3D/Client/Private/Troll_States.cpp +++ b/Jusin154_Team3D/Client/Private/Troll_States.cpp @@ -21,6 +21,7 @@ #include "State_Swing.h" #include "State_Slam.h" #include "State_Hit.h" +#include "State_Dead.h" #pragma endregion @@ -415,7 +416,6 @@ void CTroll::Behavior_SwingEnter() [this]() {m_bLookAt = false; }, 0.2f); - Troll_Trail_Visible(true); m_pWeaponTrail->Set_Visible(true); m_pWeaponTrail->Get_Component()->Reset_Trail(); @@ -452,6 +452,7 @@ void CTroll::SwingHit(_bool& bPlayerHit) { vector pxHits; _uint iHitCount = 0; + _float Damage = 0.f; CheckHammerHits(iHitCount, pxHits); { for (_uint i = 0; i < pxHits.size(); ++i) { @@ -466,8 +467,10 @@ void CTroll::SwingHit(_bool& bPlayerHit) continue; } CStat* pStat = pUserData->pCharacter->Get_Owner()->Get_Component(); - pStat->Get_Damage(7.f); + pStat->Get_Damage(20.f); + Damage = 7.f; bPlayerHit = true; + pUserData->pOwner->OnCollision(this); } break; case PXOBJECT::ALLY_HITBOX: break; @@ -501,6 +504,7 @@ void CTroll::Behavior_SlamEnter() Troll_Trail_Visible(true); m_pWeaponTrail->Set_Visible(true); + m_pWeaponTrail->Get_Component()->Reset_Trail(); Add_Event(pairAnimInfo.first, [this]() { @@ -593,6 +597,12 @@ void CTroll::Behavior_StunEnter() if (iCurrAnimIndex == m_Animation[STATEANIM::RUSH_LOOP].first) { pairAnimInfo = m_Animation[STATEANIM::STUN]; + + _string strBoneName = "HeadEnd"; + + m_pEffectPool->Use_Skill(SKILL_TYPE::TROLL_RUSH_HIT, this); + m_pEffectPool->Use_Skill(SKILL_TYPE::STUN, this, &strBoneName); + } m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); @@ -674,6 +684,36 @@ void CTroll::Behavior_HitExit() m_pFSM->Disable_State(FSMSTATE::HIT); } +void CTroll::Behavior_DeadEnter() +{ + m_bLookAt = false; + m_pFSM->Enable_State(FSMSTATE::DEAD); + _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex(); + pair<_uint, _bool> pairAnimInfo; + + pairAnimInfo = m_Animation[STATEANIM::KNOCKDOWN_BWD]; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + + PSX::PxExtendedVec3 pxControlllerPos = m_pCharacter_Controller->Get_Controller()->getPosition(); + PSX::PxTransform pxTransform((_float)pxControlllerPos.x, (_float)pxControlllerPos.y + 100.f, (_float)pxControlllerPos.z); + m_pCharacter_Controller->Set_Position(XMLoadFloat3((_float3*)&pxTransform.p)); + m_pRigidBody->SetActive(false); + m_pCharacter_Controller->SetActive(false); +} + +HRESULT CTroll::Behavior_DeadExitCheck(_float fTimeDelta) +{ + if (m_pModelCom->IsFinishedAnim()) { + m_bDead = true; + } + return S_OK; +} + +void CTroll::Behavior_DeadExit() +{ + m_bDead = true; +} + void CTroll::Add_FSM() { @@ -800,6 +840,23 @@ void CTroll::Add_FSM() m_States.emplace(FSMSTATE::HIT, CState_Hit::Create(&Desc)); } + { + CState_Dead::STATE_DEAD_DESC Desc{}; + Desc.pOwner = this; + Desc.funcEnterEvent = [this]() { Behavior_DeadEnter(); }; + Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_DeadExitCheck(fTimedelta); }; + Desc.funcExitEvent = [this]() { Behavior_DeadExit(); }; + Desc.funcLateUpdate = [this](_float fDeadRatio) { + m_fDeadRatio = fDeadRatio; + if (m_fDeadRatio > 1.f) { + m_bDead = true; + } + }; + Desc.vDeadTimer.x = FLT_EPSILON5; + Desc.vDeadTimer.y = 2.f; + m_States.emplace(FSMSTATE::DEAD, CState_Dead::Create(&Desc)); + } + #pragma endregion } @@ -822,8 +879,9 @@ void CTroll::SlamHit(_bool& bPlayerHit) continue; } CStat* pStat = pUserData->pCharacter->Get_Owner()->Get_Component(); - pStat->Get_Damage(10.f); + pStat->Get_Damage(20.f); bPlayerHit = true; + pUserData->pOwner->OnCollision(this); } break; case PXOBJECT::ALLY_HITBOX: break; @@ -930,6 +988,8 @@ void CTroll::Set_Anim() m_Animation[STATEANIM::HIT_BWD2] = { 168, false }; // m_Animation[STATEANIM::HIT_BWD3] = { 169, false }; // + m_Animation[STATEANIM::HIT_FWD] = { 170,false }; + m_Animation[STATEANIM::HIT_FACE] = { 156, false }; // m_Animation[STATEANIM::HIT_FACE_END] = { 157, false }; // diff --git a/Jusin154_Team3D/Client/Private/Troll_Weapon.cpp b/Jusin154_Team3D/Client/Private/Troll_Weapon.cpp index 0103ae085..509cb693b 100644 --- a/Jusin154_Team3D/Client/Private/Troll_Weapon.cpp +++ b/Jusin154_Team3D/Client/Private/Troll_Weapon.cpp @@ -99,7 +99,8 @@ HRESULT CTroll_Weapon::Render() return E_FAIL; } - if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_ANIM::DEFAULT)))) { + + if (FAILED(m_pModelCom->Begin(i, m_pShaderCom))) { return E_FAIL; } @@ -142,7 +143,7 @@ HRESULT CTroll_Weapon::Ready_Components() } /* Com_Shader */ - if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH, + if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_NPC_PBR_ANIM, reinterpret_cast(&m_pShaderCom)))){ return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Public/Action_Panel.h b/Jusin154_Team3D/Client/Public/Action_Panel.h index 6b7d20e1d..eeaa2609b 100644 --- a/Jusin154_Team3D/Client/Public/Action_Panel.h +++ b/Jusin154_Team3D/Client/Public/Action_Panel.h @@ -38,6 +38,7 @@ class CAction_Panel final : public CPanelObject void Use_Spell(_int Index); void Spell_Setting(void* pArg); + void Use_Potion(); private: virtual HRESULT Bind_ShaderResources() override; virtual HRESULT Ready_Components(void* pArg) override; diff --git a/Jusin154_Team3D/Client/Public/Barral_Splesh.h b/Jusin154_Team3D/Client/Public/Barral_Splesh.h new file mode 100644 index 000000000..5967b2a22 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Barral_Splesh.h @@ -0,0 +1,42 @@ +#pragma once + +#include "Client_Define.h" +#include "Effect_Container.h" + +NS_BEGIN(Engine) +NS_END + +NS_BEGIN(Client) + +class CBarral_Splesh final : public CEffect_Container +{ +private: + CBarral_Splesh(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CBarral_Splesh(const CBarral_Splesh& rhs); + virtual ~CBarral_Splesh() = 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 = {}; +public: + static CBarral_Splesh* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual void Free() override; + CGameObject* Clone(void* pArg, CGameObject* pOwner) override; + void Describe_Entity() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Box_Splesh.h b/Jusin154_Team3D/Client/Public/Box_Splesh.h new file mode 100644 index 000000000..d165b109f --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Box_Splesh.h @@ -0,0 +1,42 @@ +#pragma once + +#include "Client_Define.h" +#include "Effect_Container.h" + +NS_BEGIN(Engine) +NS_END + +NS_BEGIN(Client) + +class CBox_Splesh final : public CEffect_Container +{ +private: + CBox_Splesh(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CBox_Splesh(const CBox_Splesh& rhs); + virtual ~CBox_Splesh() = 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 = {}; +public: + static CBox_Splesh* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual void Free() override; + CGameObject* Clone(void* pArg, CGameObject* pOwner) override; + void Describe_Entity() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Broom.h b/Jusin154_Team3D/Client/Public/Broom.h index ce5a87cd8..3e2f59863 100644 --- a/Jusin154_Team3D/Client/Public/Broom.h +++ b/Jusin154_Team3D/Client/Public/Broom.h @@ -36,7 +36,7 @@ class CBroom final : public CUnit _float m_fTurnMaxSpeed = 10.f; _float m_fFlyTurnMaxSpeed = 9.f; _float m_fFlyMaxSpeed = 15.f; - _float m_fHoverMaxSpeed = 7.f; + _float m_fHoverMaxSpeed = 5.f; _float m_fAccel = 1.f; _float m_fDecel = 1.f; _float m_fTurnDecel = 0.3f; diff --git a/Jusin154_Team3D/Client/Public/CamPosition_Shoulder.h b/Jusin154_Team3D/Client/Public/CamPosition_Shoulder.h index fa6af014f..110c98dba 100644 --- a/Jusin154_Team3D/Client/Public/CamPosition_Shoulder.h +++ b/Jusin154_Team3D/Client/Public/CamPosition_Shoulder.h @@ -21,10 +21,11 @@ class CCamPosition_Shoulder final : public CCamPosition virtual void Update(_float fTimeDelta) override; virtual void Late_Update(_float fTimeDelta) override; virtual HRESULT Render() override; - virtual _vector Get_WorldPostion() override; - _vector Get_ShoulderGlobalPos(); - + virtual _vector Get_WorldPostion() override; + _vector Get_ShoulderGlobalPos(); + void Set_CameraShake(_float fXShock, _float fYShock); + private: virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; @@ -43,6 +44,7 @@ class CCamPosition_Shoulder final : public CCamPosition _float m_fFollowTargetIncludedAngleDegree = { 20.f }; _float m_fDefaultCameraBackToFrontRatio = { 0.61f }; _float2 m_vAccRotDegrees = { 0.f, 0.f }; + _float2 m_vAccRealDegrees = { 0.f, 0.f }; _float3 m_vShoulderLocalPos = { 1.f, 2.f, 2.f }; #pragma endregion #pragma region Lerp @@ -62,8 +64,9 @@ class CCamPosition_Shoulder final : public CCamPosition _float m_fFocalRatioMin = 0.05f; _float2 m_vMoveLerpPositions = { }; - _float2 m_vMoveLerpTimer = { 0.f, BASIC_LERP_TIMER }; + _float2 m_vMoveLerpTimer = { 0.f, TIMER_SHORT_LERP }; #pragma endregion + _float2 m_vCameraShakeTimer = { 0.f, 0.3f }; PSX::PxSweepBuffer m_BufferHit = {}; diff --git a/Jusin154_Team3D/Client/Public/Chair_Splesh.h b/Jusin154_Team3D/Client/Public/Chair_Splesh.h new file mode 100644 index 000000000..23793a329 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Chair_Splesh.h @@ -0,0 +1,42 @@ +#pragma once + +#include "Client_Define.h" +#include "Effect_Container.h" + +NS_BEGIN(Engine) +NS_END + +NS_BEGIN(Client) + +class CChair_Splesh final : public CEffect_Container +{ +private: + CChair_Splesh(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CChair_Splesh(const CChair_Splesh& rhs); + virtual ~CChair_Splesh() = 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 = {}; +public: + static CChair_Splesh* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual void Free() override; + CGameObject* Clone(void* pArg, CGameObject* pOwner) override; + void Describe_Entity() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Client_Enum.h b/Jusin154_Team3D/Client/Public/Client_Enum.h index 034029cb5..263032014 100644 --- a/Jusin154_Team3D/Client/Public/Client_Enum.h +++ b/Jusin154_Team3D/Client/Public/Client_Enum.h @@ -12,14 +12,20 @@ namespace Client 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, END }; - enum class SHADER_PASS_UIEDITOR { DEFAULT, LOGO, LOGO_TEXT, LOGO_GLOW, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, TYPE, HPBAR, MAGIC_METER, MAGIC_ICON, REMOVEUV, REVELIO, POTION, MAGIC_ITEM, SPELL_PREVIEW, SPELL_HEADER, SPELL_HEADER_LINE, SPELL_DRAG, CAMERA_LOCKON, LODING_SCREEN, ENEMY_HPBAR, BOSS_HPBAR, END }; - enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, UVALPHABLEND, MAGIC_METER, SPELL_LIST, EESSENTIAL_SPELL_SOLT, EESSENTIAL_SPELL, COLOR, SPELL_HOVER, SPELL_SLOT_EFFECT, SPELL_SLOT, END }; + enum class SHADER_PASS_UIEDITOR { DEFAULT, LOGO, LOGO_TEXT, LOGO_GLOW, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, TYPE, HPBAR, MAGIC_METER, MAGIC_ICON, REMOVEUV, REVELIO, POTION, MAGIC_ITEM, SPELL_PREVIEW, SPELL_HEADER, SPELL_HEADER_LINE, SPELL_DRAG, CAMERA_LOCKON, LODING_SCREEN, ENEMY_HPBAR, BOSS_HPBAR, ENEMY_DETECTION, END }; + enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, UVALPHABLEND, MAGIC_METER, SPELL_LIST, EESSENTIAL_SPELL_SOLT, EESSENTIAL_SPELL, COLOR, SPELL_HOVER, SPELL_SLOT_EFFECT, SPELL_SLOT, SPELL_LOCK, END }; + enum class SHADER_PASS_NPC_PBR_ANIM { + EYELASH_DAOTHV_ToSRO, TEETH_SRXO_ToSRO, EYE_DN_ToSRO, EYE_OCC, FACIAL_HAIR_DAOTHV_ToSRO, HEAD_HAIR_DAOTHV_ToSRO, HEADwtHAND_DSRXON_ToSRO, LOWER_DSRON_ToSRO, UPPER_DMRON_ToMRO, GLASSES_DMRON_ToMRO, EmissiveMetalness_DENMRO_ToMRO, MI_ClothSim_DSEN_ToSRO, MI_Troll_Club_DAENMROSRXO_To + , OUTLINE_READ, TEETH_SRXO_ToSRO__OUTLINE_WRITE, EYE_DN_ToSRO__OUTLINE_WRITE, HEADwtHAND_DSRXON_ToSRO__OUTLINE_WRITE, UPPER_DMRON_ToMRO__OUTLINE_WRITE, EmissiveMetalness_DENMRO_ToMRO__OUTLINE_WRITE, MI_ClothSim_DSEN_ToSRO__OUTLINE_WRITE + , END + }; enum class UI_STATE { GAMEPLAYER, SPELL, POTION, INVENTORY, END }; enum class EFFECT_TYPE { EFFECT, TRAIL, END }; enum class SKILL_TYPE { + /* 마법 */ ARRESTO_MOMENTUM, GLACIUS, LEVIOSO, TRANSFORM, // 노란색 ACCIO, DEPULSO, DESCENDO, FLIPENDO, // 보라색 CONFRINGO, DIFFINDO, EXPELLIARMUS, BOMBARDA, INCENDIO, // 빨간색 @@ -29,10 +35,25 @@ namespace Client BEAST_PETTING_BRUSH, BEAST_FEED, NAB_SACK, // 하늘색 JAP, REVELIO, PROTEGO, STUPEFY, // 검은색 ANCIENT_MAGIC_THROW, ANCIENT_MAGIC, ALOHOMORA, PETRIFICUS_TOTALUS, + + /* PROPS */ + + BOX_SPLESH, CHAIL_SPLESH , BARRAL_SPLASH, + /*상태 이펙트*/ + + STUN, + + /*사이드*/ JAP_SIDE, BOMBARDA_SIDE, DESCENDO_SIDE, LEVIOSO_SIDE, WAND_END, + /*트롤*/ TROLL_ATTACK, TROLL_RUSH_HIT, TROLL_NOMAL_SMOKE, GOBLIN_PROTEGO, + + /*고블린*/ GOBLIN_ATTACK, + + /*고블린 메이지*/ + GOBLIN_MAGE_ATTACK , GOBLIN_MAGE_DOWN , GOBLIN_MAGE_SIDE, END }; diff --git a/Jusin154_Team3D/Client/Public/Client_Macro.h b/Jusin154_Team3D/Client/Public/Client_Macro.h index 23581ecff..cd522d1de 100644 --- a/Jusin154_Team3D/Client/Public/Client_Macro.h +++ b/Jusin154_Team3D/Client/Public/Client_Macro.h @@ -21,6 +21,7 @@ namespace Client { #define FX_UIEDITOR TEXT("FX_UIEDITOR") #define FX_UIINSTANCE TEXT("FX_UIINSTANCE") #define FX_VTXPOS TEXT("FX_VTXPOS") +#define FX_NPC_PBR_ANIM TEXT("FX_NPC_PBR_ANIM") #pragma endregion #pragma region MACRO_PROTOTYPE diff --git a/Jusin154_Team3D/Client/Public/EffectObject.h b/Jusin154_Team3D/Client/Public/EffectObject.h index fd4693f0e..055336155 100644 --- a/Jusin154_Team3D/Client/Public/EffectObject.h +++ b/Jusin154_Team3D/Client/Public/EffectObject.h @@ -151,7 +151,7 @@ class CEffectObject abstract : public CPartObject void Disable_Light(); void Add_Light(); - void FollowParents(const _float4x4* pParentsMat); + void FollowParents(const _float4x4* pParentsMat, const _float4x4* pOffsetMat = nullptr); protected: virtual HRESULT Bind_ShaderResources() override; virtual HRESULT Ready_Components(void* pArg) override; @@ -172,6 +172,7 @@ class CEffectObject abstract : public CPartObject CInstance_Model* m_pInstance_ModelCom = { nullptr }; const _float4x4* m_pParentMatrix = { nullptr }; + _float4x4 m_FinalParentMatrix; protected: EFFECT_INFO m_EffectInfo = {}; diff --git a/Jusin154_Team3D/Client/Public/EffectPool.h b/Jusin154_Team3D/Client/Public/EffectPool.h index a1d0a1810..4bfbb7939 100644 --- a/Jusin154_Team3D/Client/Public/EffectPool.h +++ b/Jusin154_Team3D/Client/Public/EffectPool.h @@ -35,6 +35,9 @@ class CEffectPool final : public CGameObject HRESULT Bind_ShaderResources(); HRESULT Ready_Effect(); HRESULT Ready_MonsterEffect(); +private: + _bool m_isActiveEffectCreate = { true }; + _bool m_isActiveMonsterEffectCreate = { true }; public: static CEffectPool* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr) override; diff --git a/Jusin154_Team3D/Client/Public/Effect_Container.h b/Jusin154_Team3D/Client/Public/Effect_Container.h index ef5f506f0..ae284374e 100644 --- a/Jusin154_Team3D/Client/Public/Effect_Container.h +++ b/Jusin154_Team3D/Client/Public/Effect_Container.h @@ -38,7 +38,7 @@ class CEffect_Container abstract : public CContainerObject HRESULT Reset_EffectParts(); _int CollisionCheck(); ON_COLLISION_INFO SweepTarget(_vector StartPos, _vector EndPos, _float fRadius, _bool isTerrainCollision = false); - + ON_COLLISION_INFO MonsterSweepTarget(_vector StartPos, _vector EndPos, _float fRadius, _bool isTerrainCollision = false); protected: _float4 m_vStartPos = {}; diff --git a/Jusin154_Team3D/Client/Public/Enemy_Detection.h b/Jusin154_Team3D/Client/Public/Enemy_Detection.h new file mode 100644 index 000000000..e63552797 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Enemy_Detection.h @@ -0,0 +1,80 @@ +#pragma once + +#include "Client_Define.h" +#include "PartObject.h" + +NS_BEGIN(Client) + +class CEnemy_Detection final : public CPartObject +{ +public: + typedef struct tagEnemyDetection : public CPartObject::PARTOBJECT_DESC + { + const _float4x4* pSocketMatrices = {}; + }ENEMY_DETECTION_DESC; +private: + CEnemy_Detection(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CEnemy_Detection(const CEnemy_Detection& Prototype); + virtual ~CEnemy_Detection() = default; + +public: + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + virtual void Priority_Update(_float fTimeDelta) override; + virtual void Update(_float fTimeDelta) override; + virtual void Late_Update(_float fTimeDelta) override; + virtual HRESULT Render() override; + HRESULT Render_Disolve(); + +private: + void SizeUpX(_float fX); + void SizeUpY(_float fY); + void SizeUpdate(_float fSize); + +public: + void Set_Active(_bool bAtcive); + _bool Get_Step(); +private: + const _float4x4* m_pSocketMatrices = { }; + CTexture* m_pDiffuse_TextureCom = { nullptr }; + CTexture* m_pDiffuse_TextureCom1 = { nullptr }; + CTexture* m_pDiffuse_TextureCom2 = { nullptr }; + CTexture* m_pDiffuse_TextureCom3 = { nullptr }; + CTexture* m_pDiffuse_TextureCom4 = { nullptr }; + CTexture* m_pDiffuse_TextureCom5 = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + _vector m_vPosition{}; + + _float4 m_vImageposi{}; + + _bool m_bStep1 = { false }; + _bool m_bStep2 = { false }; + _bool m_bStep3 = { false }; + + _bool m_bActive = { false }; + _bool m_bSizeUp = { false }; + _bool m_bAtteckTrigger = { false }; + + _float3 m_fOrigin_Size{}; + + _float3 m_fSize{}; + + _float m_fAlpha{}; + _float m_fTime{}; +private: + HRESULT Ready_Components(); + HRESULT Bind_ShaderResources(); + +public: + static CEnemy_Detection* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr)override; + virtual void Free() override; + +#ifdef _DEBUG + void Describe_Entity() override; +#endif // _DEBUG +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Goblin.h b/Jusin154_Team3D/Client/Public/Goblin.h index d91dd4d87..855201913 100644 --- a/Jusin154_Team3D/Client/Public/Goblin.h +++ b/Jusin154_Team3D/Client/Public/Goblin.h @@ -4,6 +4,7 @@ #include "Monster.h" #include "CallBack_Monster_Behavior.h" #include "CallBack_Monster_HitReport.h" +#include "Enemy_Detection.h" NS_BEGIN(Client) @@ -31,9 +32,11 @@ class CGoblin final : public CMonster virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr)override; virtual void OnHit(CGameObject* pOther, CGameObject* pCaller = nullptr)override; + void Set_Detection(_bool bDetection); private: CCallBack_Monster_Behavior* m_pCallBack_Behavior = { nullptr }; CCallBack_Monster_HitReport* m_pCallBack_HitReport = { nullptr }; + CEnemy_Detection* m_pDetection = { nullptr }; CCharacter_Controller* m_pCharacter_Controller = { nullptr }; CRigidBody_Dynamic* m_pRigidBody = { nullptr }; @@ -43,6 +46,7 @@ class CGoblin final : public CMonster class CEffectPool* m_pEffectPool = nullptr; DAMAGE_INFO m_DamageInfo; + _bool m_bDetection = { false }; class CEffectParts* m_pSmoke = { nullptr }; class CEffectParts* m_pGoblin_Particle = { nullptr }; diff --git a/Jusin154_Team3D/Client/Public/Goblin_BattleAxe.h b/Jusin154_Team3D/Client/Public/Goblin_BattleAxe.h index 2784038ce..4df150f5c 100644 --- a/Jusin154_Team3D/Client/Public/Goblin_BattleAxe.h +++ b/Jusin154_Team3D/Client/Public/Goblin_BattleAxe.h @@ -18,8 +18,6 @@ class CGoblin_BattleAxe final : public CPartObject virtual ~CGoblin_BattleAxe() = default; public: - virtual HRESULT Initialize_Prototype() override; - virtual HRESULT Initialize(void* pArg) override; virtual void Priority_Update(_float fTimeDelta) override; virtual void Update(_float fTimeDelta) override; virtual void Late_Update(_float fTimeDelta) override; @@ -27,7 +25,6 @@ class CGoblin_BattleAxe final : public CPartObject HRESULT Render_Disolve(); void Set_Disolve(_bool bDisolve) { m_bDisolve = bDisolve; } const _float4x4 Get_AxeMatrix() { return m_vAxeMat; }; -public: private: const _float4x4* m_pSocketMatrices = { }; @@ -38,7 +35,13 @@ class CGoblin_BattleAxe final : public CPartObject _float4x4 m_vAxeMat= {}; +#ifdef _DEBUG + unique_ptr m_pGripShape = { nullptr }; + unique_ptr m_pSubShape = { nullptr }; +#endif // _DEBUG private: + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; HRESULT Ready_Components(); HRESULT Bind_ShaderResources(); diff --git a/Jusin154_Team3D/Client/Public/Goblin_Dagger.h b/Jusin154_Team3D/Client/Public/Goblin_Dagger.h index 4c0e545df..aa2813925 100644 --- a/Jusin154_Team3D/Client/Public/Goblin_Dagger.h +++ b/Jusin154_Team3D/Client/Public/Goblin_Dagger.h @@ -33,9 +33,13 @@ class CGoblin_Dagger final : public CPartObject CModel* m_pModelCom = { nullptr }; _bool m_bAttach = { true }; + _float4 m_vStartPos = {}; + PSX::PxSweepBufferN<12> m_SweepBuffer = {}; + private: HRESULT Ready_Components(); HRESULT Bind_ShaderResources(); + void Dagger_Hit(); public: static CGoblin_Dagger* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); diff --git a/Jusin154_Team3D/Client/Public/Goblin_Mage.h b/Jusin154_Team3D/Client/Public/Goblin_Mage.h index 1e0047867..90175c73b 100644 --- a/Jusin154_Team3D/Client/Public/Goblin_Mage.h +++ b/Jusin154_Team3D/Client/Public/Goblin_Mage.h @@ -48,6 +48,10 @@ class CGoblin_Mage final : public CMonster class CEffectParts* m_pGoblin_Orb = { nullptr }; class CGoblin_Spector* m_pGoblinSpector = { nullptr }; + + _float m_fHoverTime = 0.1f; + _float m_fHoverHeight = 0.1f; + _float m_fHoverSpeed = 5.f; private: virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; @@ -67,9 +71,11 @@ class CGoblin_Mage final : public CMonster private: virtual void Add_FSM(); virtual void Set_Anim(); +private: + class CEffectPool* m_pEffectPool = { nullptr }; _float m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::END)] = {}; - _float m_fMaxSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::END)] = { 30.f,5.f,30.f,20.f }; + _float m_fMaxSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::END)] = { 20.f,5.f,30.f,15.f }; _bool m_bStep = { false }; _float m_fTpTime = {}; @@ -117,8 +123,7 @@ class CGoblin_Mage final : public CMonster void Behavior_DeadEnter(); HRESULT Behavior_DeadExitCheck(_float fTimeDelta); void Behavior_DeadExit(); -private: - class CEffectPool* m_pEffectPool = nullptr; + }; NS_END diff --git a/Jusin154_Team3D/Client/Public/HpBarBG.h b/Jusin154_Team3D/Client/Public/HpBarBG.h index f38f8c751..2ca6f2ee4 100644 --- a/Jusin154_Team3D/Client/Public/HpBarBG.h +++ b/Jusin154_Team3D/Client/Public/HpBarBG.h @@ -30,6 +30,8 @@ class CHpBarBG final : public CElementObject void Heal(_float fTimeDelta); void Hit(_float fTimeDelta); virtual void SizeUpX(_float SizeX) override; + void Set_Damage(_float fDamage); + private: virtual HRESULT Bind_ShaderResources() override; virtual HRESULT Ready_Components(void* pArg) override; @@ -43,6 +45,8 @@ class CHpBarBG final : public CElementObject CShader* m_pShaderCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + CInfoInstance* m_pInfoInstance = { nullptr }; + _float m_fBlinkTime{}; _float m_fMaxHp{}; _float m_fCurrentHp{}; diff --git a/Jusin154_Team3D/Client/Public/InfoInstance.h b/Jusin154_Team3D/Client/Public/InfoInstance.h index 2d602bb58..c20e42e11 100644 --- a/Jusin154_Team3D/Client/Public/InfoInstance.h +++ b/Jusin154_Team3D/Client/Public/InfoInstance.h @@ -8,6 +8,7 @@ class CGameInstance; class CTransform; class CUnit; class CState; +class CStat; NS_END NS_BEGIN(Client) @@ -27,6 +28,7 @@ DECLARE_SINGLETON(CInfoInstance) void Change_Level(); #pragma region PLAYER_INFO + CStat* Get_PlayerStatPtr(); void Update_CameraCoordinateSystem(_float3& vLook, _float3& vRight); pair<_float3, _float3> Get_CameraCoordinateSystem(); _float Player_Damage(); @@ -89,6 +91,9 @@ DECLARE_SINGLETON(CInfoInstance) _string m_strLog = {}; #endif // _DEBUG +private: + HRESULT Stat_FileLoad(const _char* pDirectoryPath); + public: virtual void Free() override; }; diff --git a/Jusin154_Team3D/Client/Public/Loader.h b/Jusin154_Team3D/Client/Public/Loader.h index c75611a58..cb0ecf432 100644 --- a/Jusin154_Team3D/Client/Public/Loader.h +++ b/Jusin154_Team3D/Client/Public/Loader.h @@ -40,7 +40,6 @@ class CLoader final : public CBase private: HRESULT Asset_FileLoad(const _char* pDirectoryPath, const _tchar* pPreName, function AddPrototypeEvent); - HRESULT Stat_FileLoad(const _char* pDirectoryPath); future*> Deferred_FolderLoad(const _char* pDirectoryPath, const _char* pFileExt, _bool bUseTag); future*> Deferred_ModelLoad(MODEL eType, const _char* pDirectoryPath, _fmatrix PreTransform, const _tchar* pPrototypeTag); void Ready_MapModels(vector*>>& jobMapModels); diff --git a/Jusin154_Team3D/Client/Public/MageSide.h b/Jusin154_Team3D/Client/Public/MageSide.h new file mode 100644 index 000000000..70b20f270 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/MageSide.h @@ -0,0 +1,50 @@ +#pragma once + +#include "Client_Define.h" +#include "Effect_Container.h" + +NS_BEGIN(Engine) +NS_END + +NS_BEGIN(Client) + +class CMageSide final : public CEffect_Container +{ +private: + CMageSide(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CMageSide(const CMageSide& rhs); + virtual ~CMageSide() = 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_pMage_PT = { nullptr }; + class CTrailObject* m_pMage_Trail = { nullptr }; + + _bool m_isParticleEnd = {}; + _bool m_isTrailEnd = {}; + _float4x4 m_TrailStopMat = {}; + +public: + static CMageSide* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual void Free() override; + CGameObject* Clone(void* pArg, CGameObject* pOwner) override; + void Describe_Entity() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Mage_Down_Attack.h b/Jusin154_Team3D/Client/Public/Mage_Down_Attack.h new file mode 100644 index 000000000..2ff45b120 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Mage_Down_Attack.h @@ -0,0 +1,46 @@ +#pragma once + +#include "Client_Define.h" +#include "Effect_Container.h" + +NS_BEGIN(Engine) +NS_END + +NS_BEGIN(Client) + +class CMage_Down_Attack final : public CEffect_Container +{ +private: + CMage_Down_Attack(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CMage_Down_Attack(const CMage_Down_Attack& rhs); + virtual ~CMage_Down_Attack() = 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 = {}; + +private: + class CInfoInstance* m_pInfoInstance = { nullptr }; + +public: + static CMage_Down_Attack* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual void Free() override; + CGameObject* Clone(void* pArg, CGameObject* pOwner) override; + void Describe_Entity() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Mage_Nomal_Attack.h b/Jusin154_Team3D/Client/Public/Mage_Nomal_Attack.h new file mode 100644 index 000000000..6716d924a --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Mage_Nomal_Attack.h @@ -0,0 +1,54 @@ +#pragma once + +#include "Client_Define.h" +#include "Effect_Container.h" + +NS_BEGIN(Engine) +NS_END + +NS_BEGIN(Client) + +class CMage_Nomal_Attack final : public CEffect_Container +{ +private: + CMage_Nomal_Attack(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CMage_Nomal_Attack(const CMage_Nomal_Attack& rhs); + virtual ~CMage_Nomal_Attack() = 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_pCircle_Proj = { nullptr }; + class CEffectParts* m_pProj_PT1 = { nullptr }; + class CEffectParts* m_pProj_PT2 = { nullptr }; + + _float3 m_vLook = {}; + _float m_fLinearSpeed = 0.3f; + + _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 CMage_Nomal_Attack* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual void Free() override; + CGameObject* Clone(void* pArg, CGameObject* pOwner) override; + void Describe_Entity() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/MapElement_Interactable.h b/Jusin154_Team3D/Client/Public/MapElement_Interactable.h index 57aeb7647..e49c56fdd 100644 --- a/Jusin154_Team3D/Client/Public/MapElement_Interactable.h +++ b/Jusin154_Team3D/Client/Public/MapElement_Interactable.h @@ -27,11 +27,14 @@ class CMapElement_Interactable final : public CMapElement virtual void Late_Update(_float fTimeDelta) override; virtual HRESULT Render() override; virtual void GrapToPlayer(_fvector vPos, _float fRatio); + virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override; + ON_COLLISION_INFO CollisionCheck(_fvector StartPos, _fvector EndPos, _float fRadius); _vector Get_LockOnPos(); virtual void Set_DrawOutLine(); virtual HRESULT Render_OutLine() override; void Set_KinematicFlag(_bool bFlag); + private: ELEMENT_INTERACTABLE_ID m_eInteractableID = { ELEMENT_INTERACTABLE_ID::END }; class CInfoInstance* m_pInfoInstance = { nullptr }; @@ -44,7 +47,11 @@ class CMapElement_Interactable final : public CMapElement _float m_fOutLineScale = { 1.f }; _float m_fOutLinePower = { 1.f }; - + /* 충돌을 위한 변수*/ + _bool m_isGraped = { false }; + _bool m_bHit = { false }; + _float4 m_vStartPos = { 0.f, 0.f, 0.f, 1.f }; + class CEffectPool* m_pEffectPool = { nullptr }; private: virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; diff --git a/Jusin154_Team3D/Client/Public/MiniMap_Camera.h b/Jusin154_Team3D/Client/Public/MiniMap_Camera.h new file mode 100644 index 000000000..53d2b6e2d --- /dev/null +++ b/Jusin154_Team3D/Client/Public/MiniMap_Camera.h @@ -0,0 +1,51 @@ +#pragma once + +#include "Client_Define.h" +#include "Camera.h" + +NS_BEGIN(Client) + +class CMiniMap_Camera final : public CCamera +{ +public: + typedef struct tagCamera_Gaze : public CCamera::CAMERA_DESC + { + }CAMERA_GAZE_DESC; +private: + CMiniMap_Camera(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CMiniMap_Camera(const CMiniMap_Camera& rhs); + virtual ~CMiniMap_Camera() = default; + +public: + virtual void Priority_Update(_float fTimeDelta) override; + virtual void Update(_float fTimeDelta) override; + void Update_LerpTimer(Engine::_float fTimeDelta); + void Enable_FollowLerp(); + void Enable_LookLerp(); + void Toggle_Priority(); + virtual void Late_Update(_float fTimeDelta) override; + virtual HRESULT Render() override; + +private: + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + virtual HRESULT Ready_Components(void* pArg) override; + HRESULT Bind_ShaderResources() override; + +private: + CInfoInstance* m_pInfoInstance = { nullptr }; + + +public: + static CMiniMap_Camera* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, CGameObject* pOwner) override; + virtual void Free() override; + + +#ifdef _DEBUG + void Describe_Entity() override; + +#endif // _DEBUG +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/NPC_Ollivander.h b/Jusin154_Team3D/Client/Public/NPC_Ollivander.h new file mode 100644 index 000000000..7e2dd976a --- /dev/null +++ b/Jusin154_Team3D/Client/Public/NPC_Ollivander.h @@ -0,0 +1,40 @@ +#pragma once + +#include "Client_Define.h" +#include "Unit.h" + +NS_BEGIN(Client) + +class CNPC_Ollivander final : public CUnit +{ +protected: + CNPC_Ollivander(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CNPC_Ollivander(const CNPC_Ollivander& Prototype); + virtual ~CNPC_Ollivander() = 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() override; +protected: + CInfoInstance* m_pInfoInstance = { nullptr }; + +protected: + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + HRESULT Ready_Components(void* pArg); + HRESULT Bind_ShaderResources() override; + +public: + static CNPC_Ollivander* 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 diff --git a/Jusin154_Team3D/Client/Public/Player.h b/Jusin154_Team3D/Client/Public/Player.h index 8edd88a13..846062e92 100644 --- a/Jusin154_Team3D/Client/Public/Player.h +++ b/Jusin154_Team3D/Client/Public/Player.h @@ -21,12 +21,15 @@ class CPlayer final : public CUnit virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr)override; virtual void OnHit(CGameObject* pOther, CGameObject* pCaller = nullptr)override; _bool Get_Aim() { return m_bAim; } + void Set_SpellHit(_bool bHit) { m_bSpellHit = bHit; } + void Start_CameraShake(_float fTime, _float fIntense); #ifdef _DEBUG void Render_CameraCoordinateSystem(); #endif // _DEBUG _bool Set_Sprint(_bool bSprint) { m_bSprintToggle = bSprint; } _matrix Get_WandPos(); - void UpdateGrapInteractive(Engine::_float fTimeDelta); + void UpdateGrapInteractive(_float fTimeDelta); + void Update_CameraShake(_float fTimeDelta); private: CInfoInstance* m_pInfoInstance = { nullptr }; LOCKON_INFO m_LockOnInfo = {}; @@ -35,10 +38,14 @@ class CPlayer final : public CUnit _bool m_bSprintToggle = { false }; _bool m_bWalkToggle = { false }; + _bool m_bCameraShake = { false }; _float3 m_vCameraLookDir = { 0.f, 0.f, 1.f, }; _float3 m_vCameraRightDir = { 1.f, 0.f, 0.f }; - _float2 m_vGrapInteratableLerp = { 0.f, BASIC_LERP_TIMER }; + _float2 m_vGrapInteratableLerp = { 0.f, TIMER_SHORT_LERP }; + _float2 m_vCameraShakeTimer = { 0.f, TIMER_SHORT_LERP }; + _float m_fCameraShakeTime = TIMER_SHORT_LERP; + _float m_fCameraShakeIntense = 5.f; class CCamPosition_Socket* m_pCamPosition_TopDown_LookPart = { nullptr }; class CCamPosition_Arm* m_pCamPosition_TopDown_FollowPart = { nullptr }; @@ -64,7 +71,7 @@ class CPlayer final : public CUnit void ReLockOnTarget(); void SetGravity(); - void Update_CameraCoordinateSystem(); + void Update_CameraCoordinateSystem(_float fTimeDelta); #ifdef _DEBUG unique_ptr m_BasicEffect; unique_ptr> m_Batch; @@ -110,6 +117,12 @@ class CPlayer final : public CUnit _float m_fAnimSpeed = {}; _bool m_bOnce = { }; _bool m_bLookAt = {false}; + _bool m_bSpellHit = {}; + _float3 m_BroomScale = { 0.f, 0.f, 0.f }; + _float3 m_TargetScale = { 1.f, 1.f, 1.f }; + _float m_fScaleSmoothSpeed = 2.5f; + + HRESULT InputAction(); HRESULT InputMove(); @@ -150,6 +163,10 @@ class CPlayer final : public CUnit HRESULT Behavior_SpellExitCheck(); void Behavior_SpellExit(); + void Behavior_ShieldEnter(); + HRESULT Behavior_ShieldExitCheck(); + void Behavior_ShieldExit(); + void Behavior_HitEnter(); HRESULT Behavior_HitExitCheck(); void Behavior_HitExit(); @@ -162,12 +179,21 @@ class CPlayer final : public CUnit HRESULT Behavior_Broom_Ride_MoveExitCheck(_float fTimeDelta); void Behavior_Broom_Ride_MoveExit(); + void Behavior_Broom_HoverEnter(); + HRESULT Behavior_Broom_HoverExitCheck(_float fTimeDelta); + void Behavior_Broom_HoverExit(); + + void Behavior_Broom_FlyEnter(); + HRESULT Behavior_Broom_FlyExitCheck(_float fTimeDelta); + void Behavior_Broom_FlyExit(); + void Behavior_Broom_DismountEnter(); HRESULT Behavior_Broom_DismountExitCheck(_float fTimeDelta); void Behavior_Broom_DismountExit(); void Player_InterpTurn(_float fTimeDelta); void Throwing_Interactive(); + void Attach_Broom(); #pragma endregion private: diff --git a/Jusin154_Team3D/Client/Public/PlayerInfo.h b/Jusin154_Team3D/Client/Public/PlayerInfo.h index 3a4fa0654..d48e44c0a 100644 --- a/Jusin154_Team3D/Client/Public/PlayerInfo.h +++ b/Jusin154_Team3D/Client/Public/PlayerInfo.h @@ -6,6 +6,7 @@ NS_BEGIN(Engine) class CGameInstance; class CTransform; +class CStat; NS_END NS_BEGIN(Client) @@ -16,6 +17,7 @@ class CPlayerInfo final : public CBase CPlayerInfo(); ~CPlayerInfo() = default; public: + CStat* Get_PlayerStatPtr(); void Update(_float fTimeDelta); void Change_Level(); @@ -28,7 +30,8 @@ class CPlayerInfo final : public CBase ID3D11DeviceContext* m_pContext = { nullptr }; private: - CTransform* m_pTransform = { nullptr }; + CTransform* m_pTransform = { nullptr }; + CStat* m_pStat = { nullptr }; _float3 m_vCameraLookDir = { 0.f, 0.f, 1.f, }; _float3 m_vCameraRightDir = { 1.f, 0.f, 0.f }; diff --git a/Jusin154_Team3D/Client/Public/Potion.h b/Jusin154_Team3D/Client/Public/Potion.h index 6753becd7..232046634 100644 --- a/Jusin154_Team3D/Client/Public/Potion.h +++ b/Jusin154_Team3D/Client/Public/Potion.h @@ -31,6 +31,9 @@ class CPotion final : public CElementObject virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; +public: + _float Use_Potion(); + private: CTexture* m_pDiffuse_TextureCom = { nullptr }; CTexture* m_pDiffuse_TextureCom1 = { nullptr }; @@ -43,9 +46,13 @@ class CPotion final : public CElementObject _float2 m_vImageSlotPos{}; _float2 m_vImageSize{}; + CInfoInstance* m_pInfoInstance = { nullptr }; + _int m_iPotionIndex{}; _int m_iPerPotionIndex{}; _wstring m_strPotion; + _int m_iPotion_Level{}; + public: static CPotion* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Client/Public/Skill_Data.h b/Jusin154_Team3D/Client/Public/Skill_Data.h index ef13b7193..3c9e19acd 100644 --- a/Jusin154_Team3D/Client/Public/Skill_Data.h +++ b/Jusin154_Team3D/Client/Public/Skill_Data.h @@ -33,6 +33,7 @@ class CSkill_Data final : public CBase _int Update_Spell(_int SpellID); _float Get_Spell_Damage(_int SpellDamage); void Update_Damage(_float Damage); + void Spell_UnLock(_int SpellID); private: CInfoInstance* m_pInfoInstance = { nullptr }; diff --git a/Jusin154_Team3D/Client/Public/Spell_State.h b/Jusin154_Team3D/Client/Public/Spell_State.h index c16df540f..15388f7a6 100644 --- a/Jusin154_Team3D/Client/Public/Spell_State.h +++ b/Jusin154_Team3D/Client/Public/Spell_State.h @@ -31,6 +31,8 @@ class CSpell_State final : public CElementObject private: void Click_Slot(_bool bClick); + void Spell_Setting(); + void Spell_UnLock(_int iSpellIndex); private: virtual HRESULT Bind_ShaderResources() override; @@ -43,10 +45,15 @@ class CSpell_State final : public CElementObject CShader* m_pShaderCom = { nullptr }; CVIBuffer_UI_Instance* m_pVIBufferCom = { nullptr }; + CInfoInstance* m_pInfoInstance = { nullptr }; + _float m_fOffSetX{}; _float m_fOffSetY{}; _uint m_iCols{}; + _bool m_bLock[26] = {}; + + public: static CSpell_State* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Client/Public/Spell_Vidio_Border.h b/Jusin154_Team3D/Client/Public/Spell_Vidio_Border.h index 65534bc16..5a5662c4d 100644 --- a/Jusin154_Team3D/Client/Public/Spell_Vidio_Border.h +++ b/Jusin154_Team3D/Client/Public/Spell_Vidio_Border.h @@ -37,6 +37,8 @@ class CSpell_Vidio_Border final : public CElementObject CShader* m_pShaderCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + CInfoInstance* m_pInfoInstance = { nullptr }; + _float m_fStertTimer{}; _int m_iPerIndex{}; diff --git a/Jusin154_Team3D/Client/Public/State_Broom_Fly.h b/Jusin154_Team3D/Client/Public/State_Broom_Fly.h new file mode 100644 index 000000000..39a0da6b2 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/State_Broom_Fly.h @@ -0,0 +1,36 @@ +#pragma once +#include "Client_Define.h" +#include "State_Root.h" + +NS_BEGIN(Client) + +class CState_Broom_Fly final : public CState_Root +{ +public: + typedef struct tagBroomFly : public CState_Root::STATE_ROOT_DESC { + function funcPriorityUpdate = { nullptr }; + function funcLateUpdate = { nullptr }; + }STATE_BROOM_FLY_DESC; +private: + CState_Broom_Fly(); + virtual ~CState_Broom_Fly() = default; + +public: + virtual void Enter(); + virtual HRESULT Update(_float fTimeDelta); + virtual void Exit(); + +private: + function m_funcPriorityUpdate = { nullptr }; + function m_funcLateUpdate = { nullptr }; + +private: + HRESULT Initialize(STATE_BROOM_FLY_DESC* pDesc); + +public: + static CState_Broom_Fly* Create(STATE_BROOM_FLY_DESC* pDesc); + virtual void Free() override; + virtual void Describe_Entity(); +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/State_Broom_Hover.h b/Jusin154_Team3D/Client/Public/State_Broom_Hover.h new file mode 100644 index 000000000..3a9c6fa41 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/State_Broom_Hover.h @@ -0,0 +1,36 @@ +#pragma once +#include "Client_Define.h" +#include "State_Root.h" + +NS_BEGIN(Client) + +class CState_Broom_Hover final : public CState_Root +{ +public: + typedef struct tagBroomHover : public CState_Root::STATE_ROOT_DESC { + function funcPriorityUpdate = { nullptr }; + function funcLateUpdate = { nullptr }; + }STATE_BROOM_HOVER_DESC; +private: + CState_Broom_Hover(); + virtual ~CState_Broom_Hover() = default; + +public: + virtual void Enter(); + virtual HRESULT Update(_float fTimeDelta); + virtual void Exit(); + +private: + function m_funcPriorityUpdate = { nullptr }; + function m_funcLateUpdate = { nullptr }; + +private: + HRESULT Initialize(STATE_BROOM_HOVER_DESC* pDesc); + +public: + static CState_Broom_Hover* Create(STATE_BROOM_HOVER_DESC* pDesc); + virtual void Free() override; + virtual void Describe_Entity(); +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/State_Dead.h b/Jusin154_Team3D/Client/Public/State_Dead.h index fb79fec0f..1e40775d2 100644 --- a/Jusin154_Team3D/Client/Public/State_Dead.h +++ b/Jusin154_Team3D/Client/Public/State_Dead.h @@ -7,7 +7,7 @@ NS_BEGIN(Client) class CState_Dead final : public CState_Root { public: - typedef struct tagLand : public CState_Root::STATE_ROOT_DESC { + typedef struct tagDead : public CState_Root::STATE_ROOT_DESC { _float2 vDeadTimer = { 0.f, 2.f }; function funcLateUpdate = { nullptr }; }STATE_DEAD_DESC; diff --git a/Jusin154_Team3D/Client/Public/State_Shield.h b/Jusin154_Team3D/Client/Public/State_Shield.h new file mode 100644 index 000000000..e76be82f5 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/State_Shield.h @@ -0,0 +1,36 @@ +#pragma once +#include "Client_Define.h" +#include "State_Root.h" + +NS_BEGIN(Client) + +class CState_Shield final : public CState_Root +{ +public: + typedef struct tagShield : public CState_Root::STATE_ROOT_DESC { + function funcPriorityUpdate = { nullptr }; + function funcLateUpdate = { nullptr }; + }STATE_SHIELD_DESC; +private: + CState_Shield(); + virtual ~CState_Shield() = default; + +public: + virtual void Enter(); + virtual HRESULT Update(_float fTimeDelta); + virtual void Exit(); + +private: + function m_funcPriorityUpdate = { nullptr }; + function m_funcLateUpdate = { nullptr }; + +private: + HRESULT Initialize(STATE_SHIELD_DESC* pDesc); + +public: + static CState_Shield* Create(STATE_SHIELD_DESC* pDesc); + virtual void Free() override; + virtual void Describe_Entity(); +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/StunEffect.h b/Jusin154_Team3D/Client/Public/StunEffect.h new file mode 100644 index 000000000..ed8f17034 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/StunEffect.h @@ -0,0 +1,44 @@ +#pragma once + +#include "Client_Define.h" +#include "Effect_Container.h" + +NS_BEGIN(Engine) +NS_END + +NS_BEGIN(Client) + +class CStunEffect final : public CEffect_Container +{ +private: + CStunEffect(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CStunEffect(const CStunEffect& rhs); + virtual ~CStunEffect() = 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_pStunEffect = { nullptr }; + const _float4x4* m_BoneMat = { nullptr }; +public: + static CStunEffect* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual void Free() override; + CGameObject* Clone(void* pArg, CGameObject* pOwner) override; + void Describe_Entity() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Troll.h b/Jusin154_Team3D/Client/Public/Troll.h index 00622ac3d..ef7b787fc 100644 --- a/Jusin154_Team3D/Client/Public/Troll.h +++ b/Jusin154_Team3D/Client/Public/Troll.h @@ -29,6 +29,7 @@ class CTroll final : public CMonster virtual void Update(_float fTimeDelta) override; virtual void Late_Update(_float fTimeDelta) override; virtual HRESULT Render() override; + virtual HRESULT Render_OutLine() override; virtual HRESULT Render_Shadow() override; virtual _vector Get_LockOnPos() override; virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr)override; @@ -51,6 +52,7 @@ class CTroll final : public CMonster _float4 m_vStartGripPos = { }; _float2 m_vStunTimer = { 0.f, 4.f }; _uint iIndex; + DAMAGE_INFO m_DamageInfo; class CEffectParts* m_pRight_Smoke = { nullptr }; class CEffectParts* m_pLeft_Smoke = { nullptr }; @@ -92,7 +94,6 @@ class CTroll final : public CMonster _float m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::END)] = {}; _float m_fMaxSkillCoolTime[ENUM_CLASS(TROLL_SKILL::END)] = { 20.f,20.f, 20.f, 20.f ,20.f }; - _float m_fRushTime = {}; _float m_fAttackDelay = {}; @@ -145,6 +146,9 @@ class CTroll final : public CMonster HRESULT Behavior_HitExitCheck(); void Behavior_HitExit(); + void Behavior_DeadEnter(); + HRESULT Behavior_DeadExitCheck(_float fTimeDelta); + void Behavior_DeadExit(); }; NS_END diff --git a/Jusin154_Team3D/Client/Public/TrollSwing.h b/Jusin154_Team3D/Client/Public/TrollSwing.h index ce771cd49..c1874de65 100644 --- a/Jusin154_Team3D/Client/Public/TrollSwing.h +++ b/Jusin154_Team3D/Client/Public/TrollSwing.h @@ -32,6 +32,8 @@ class CTrollSwing final : public CEffect_Container virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override; private: _wstring m_wstrEffectName = {}; +private: + class CInfoInstance* m_pInfoInstance = { nullptr }; public: static CTrollSwing* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); diff --git a/Jusin154_Team3D/Client/Public/Troll_Rock.h b/Jusin154_Team3D/Client/Public/Troll_Rock.h index 51ec72aae..2b0e8fd4e 100644 --- a/Jusin154_Team3D/Client/Public/Troll_Rock.h +++ b/Jusin154_Team3D/Client/Public/Troll_Rock.h @@ -28,7 +28,6 @@ class CTroll_Rock final : public CPartObject private: const _float4x4* m_pSocketMatrices = { }; - _bool m_bVisible = { false }; _float4 m_vStartPos = {}; PSX::PxSweepBufferN<12> m_SweepBuffer = {}; CShader* m_pShaderCom = { nullptr }; diff --git a/Jusin154_Team3D/Client/Public/Troll_Rush_Hit.h b/Jusin154_Team3D/Client/Public/Troll_Rush_Hit.h index 3825391d3..ac4852c2e 100644 --- a/Jusin154_Team3D/Client/Public/Troll_Rush_Hit.h +++ b/Jusin154_Team3D/Client/Public/Troll_Rush_Hit.h @@ -32,7 +32,8 @@ class CTroll_Rush_Hit final : public CEffect_Container virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override; private: _wstring m_wstrEffectName = {}; - +private: + class CInfoInstance* m_pInfoInstance = { nullptr }; public: static CTroll_Rush_Hit* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual void Free() override; diff --git a/Jusin154_Team3D/Client/Public/Troll_Weapon.h b/Jusin154_Team3D/Client/Public/Troll_Weapon.h index 5e1fa1116..eb759a0d4 100644 --- a/Jusin154_Team3D/Client/Public/Troll_Weapon.h +++ b/Jusin154_Team3D/Client/Public/Troll_Weapon.h @@ -32,7 +32,6 @@ class CTroll_Weapon final : public CPartObject CShader* m_pShaderCom = { nullptr }; CModel* m_pModelCom = { nullptr }; _float4x4 m_HammerMatrix = { }; - _float3 m_Offset = {}; #ifdef _DEBUG unique_ptr m_pGripShape = { nullptr }; unique_ptr m_pSubShape = { nullptr }; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Circle1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Circle1.bin index f863cf149..0606920d9 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Circle1.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Circle1.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aaa06e374bcfc56f65154e4d2293463f823d5c74cc61a5c49c69a5ba55e0eeac +oid sha256:7b3118db9e9d4ebfdcd7083d8f2c7c08cee6684a4439d16cd841872e2b57b451 size 1124 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_0.bin index af1a3ce5e..ed93caf83 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_0.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_0.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e7be6c40fc89bd24a6e52b241c38060de62459db7b2ca5c9a73a3796f93ab4b6 +oid sha256:b3b6e27206610e5450a74d0ed62f3f57ba400a94f4d0c758bc67937a4d004d5b size 1086 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_1.bin index defad9844..b83b60dab 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_1.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_1.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9637ca3adc6bfb8e08c16d2aa301210d56e16746d3edcf64a601a86e4ba843f0 -size 1086 +oid sha256:c1b74e6239d4a668c7ad9f05cafde30c1c21431d731cf2e3d4a3a94d0badfbb1 +size 1097 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_2.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_2.bin index 38cf0f270..a17668851 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_2.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_2.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:193806a665e16659703332985e175a4cc91701b0b6852577d51fc58b85ae49d1 -size 1078 +oid sha256:8ea938fe43fd0485aa27f10690ccc03fb19ae9b3bf4883069b36de1f355c63ca +size 1097 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_3.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_3.bin index 60ff9cd2c..697d98fff 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_3.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_3.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c1ddb59edb9de096b776a19ed62ce291c1453eab460e7c34efc15696e7971677 -size 1078 +oid sha256:46e5fb3f58e6d0dda73d4119663c64f272d9f73c4b45fc54b92d137fa3d81b09 +size 1097 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Goblin/GoblinProtego/ProtegoCircle.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Goblin/GoblinProtego/ProtegoCircle.bin index 009e7163d..45369ad4c 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Goblin/GoblinProtego/ProtegoCircle.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Goblin/GoblinProtego/ProtegoCircle.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4fe532820dc147021997dd1b5a9c395e9e7ba0d8e206b0b9e1ab80cc68172f1d -size 1121 +oid sha256:b1266a631eb89d6f8c721e7f9aa8f0a2f7ef3c7c79fa8bf47381968105ee3eee +size 1113 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Goblin/GoblinProtego/ProtegoSphere.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Goblin/GoblinProtego/ProtegoSphere.bin index b68fb28ba..544b8eff1 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Goblin/GoblinProtego/ProtegoSphere.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Goblin/GoblinProtego/ProtegoSphere.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:72db8483c996edbc3ca3f5de53be4d9ab2855eaf7984eb76d7b4ed6ce369406d -size 1096 +oid sha256:79f5808f12082c1177f3ba55522759c73252e9031370c7ba332a44e85fd35b76 +size 1093 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/DownAttack/BottomPT0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/DownAttack/BottomPT0.bin index a89fab778..874279fb5 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/DownAttack/BottomPT0.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/DownAttack/BottomPT0.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dc4010ad9ad0bef8ddce15dd83cd1275fa60582e27baf059db85008cd7220f41 +oid sha256:2314092b91b1c16757a03d16326e6785850b33b485c1e16e4a66e0da08d3d981 size 1245 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/DownAttack/BottomPT1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/DownAttack/BottomPT1.bin new file mode 100644 index 000000000..731874f6b --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/DownAttack/BottomPT1.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:808a35db7b51e220a4cb8b49208bdc674f79270ff77a9bf34e3d2337edffeea0 +size 1258 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/DownAttack/Down_R.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/DownAttack/Down_R.bin index 7c5fb7ac3..a7fbc0b1b 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/DownAttack/Down_R.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/DownAttack/Down_R.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5008341edd23e88874301e24e2ea47693596d5d3fb0c8b96b624c03b1b5b305e +oid sha256:5b298a643225ffa958dd7b0abea9971a36e28a50c6a96efb1d2ea0c173f8a94c size 1117 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/DownAttack/Round_PT.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/DownAttack/Round_PT.bin new file mode 100644 index 000000000..f232eae46 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/DownAttack/Round_PT.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:20c246c6fd9462e5f5f12980420ac6ada17273025f261400b068d2457d42391f +size 1252 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/DownAttack/Smoke.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/DownAttack/Smoke.bin new file mode 100644 index 000000000..0bf9b1c3c --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/DownAttack/Smoke.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:55ccf041f8dc3d2e49cef79d73d6581fa70bfad63a30b0538db49699e8b52ec5 +size 1074 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/MageSide/Mage_PT0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/MageSide/Mage_PT0.bin new file mode 100644 index 000000000..1d6b3c6de --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/MageSide/Mage_PT0.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7325c3fa9c20f35ba837aa51eb2e8e2c0aca8cc10b855a6ef1f4573c18f2b969 +size 1230 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/MageSide/Mage_Trail.trail b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/MageSide/Mage_Trail.trail new file mode 100644 index 000000000..7f866125d Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/MageSide/Mage_Trail.trail differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Circle_Proj.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Circle_Proj.bin new file mode 100644 index 000000000..0d7adcb24 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Circle_Proj.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2dda968ab27993113c82bade6133469e03da85d4000cd6302e0a41101c91f666 +size 983 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Hit_Lay_Corrupted.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Hit_Lay_Corrupted.bin new file mode 100644 index 000000000..b96e9d30f --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Hit_Lay_Corrupted.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:81bb14f98e50c536b4555c95c2a8d358fed372e09bd99766be40f71658896a76 +size 1103 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Hit_PT_Corrupted.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Hit_PT_Corrupted.bin new file mode 100644 index 000000000..97b547df8 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Hit_PT_Corrupted.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:30f5c0a250672c22692f4c260e07a7cafe73fe89f32e5b4046d494e54b359e6d +size 1235 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Hit_R.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Hit_R.bin new file mode 100644 index 000000000..13894e1fd --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Hit_R.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:56aff6174bc943cf8b0fdde77c7d972ae41c634716aa147f33339b961d86036b +size 1132 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Proj_PT.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Proj_PT.bin new file mode 100644 index 000000000..4ecbd9329 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Proj_PT.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:92d2a6d0e0bb831ae7f5bd80fbe7cd6591adcfd4bc4b301a5aa667c48df10903 +size 1230 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Proj_PT2.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Proj_PT2.bin new file mode 100644 index 000000000..6501c0676 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Proj_PT2.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d81bf5776b8651208b2e36d9acf0f9de8e7e9d8e70058b2f9c93ff627ef09858 +size 1252 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/GoblinMage/DownAttack.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/GoblinMage/DownAttack.bin new file mode 100644 index 000000000..e3e1b8b8a --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/GoblinMage/DownAttack.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:27e6a7f6012ca6cec2bf3c4cae789a3f9e0720fedd092f474a6a116253b9d4bf +size 361 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/GoblinMage/MageSide.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/GoblinMage/MageSide.bin new file mode 100644 index 000000000..f4ce96cb6 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/GoblinMage/MageSide.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d35ef44f7e2ccae5159b052b7d4e381461eb2f97f5a20f9b6f61fd6a726a1f38 +size 148 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/GoblinMage/NomalAttack.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/GoblinMage/NomalAttack.bin new file mode 100644 index 000000000..474e35032 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/GoblinMage/NomalAttack.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b09a22224bf492f89024a1de163cedb51e148164767d3815a9a2518d3ee866e1 +size 458 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/TrollRush.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/TrollRush.bin index 4cd07bb23..6d7bcb288 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/TrollRush.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/TrollRush.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cd6069fb16443fb38c1b59472360ca064aef911b01498044011e994181dd06f4 -size 70 +oid sha256:e46cc2df7c23715ef079d7be968e29ac99e8b948a1a35a87e308811cdb28af2b +size 138 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Barral.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Barral.bin new file mode 100644 index 000000000..ef712a578 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Barral.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5767731381ad50116d99f4f008e68e84e74638a12388e1fd9d44d6fc622a9dc7 +size 280 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Box.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Box.bin new file mode 100644 index 000000000..ee6a75408 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Box.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:492af061d7ed1f14189c8db77d8e59a1bc29328343e371c5057247b8e421612b +size 128 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Chair.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Chair.bin new file mode 100644 index 000000000..2673ce8c9 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Chair.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3da562a51b459f78fa4688604cadb4da883e67ba63f06f017621785b33029560 +size 264 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Stun.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Stun.bin new file mode 100644 index 000000000..ebb47504a --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Stun.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c5ace80b4be9c253a5f80bda46fa68ccd3981fbacfad30bb53c5c92a36252e58 +size 61 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Barral/Water_Splesh.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Barral/Water_Splesh.bin new file mode 100644 index 000000000..432959f04 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Barral/Water_Splesh.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7d3366352d4a4a8d7c86f5658141461d32bf37251f3cd9e8e53b5bda2e70ae66 +size 1095 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Barral/Wood_PT0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Barral/Wood_PT0.bin new file mode 100644 index 000000000..7723fa872 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Barral/Wood_PT0.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:beb9cd0d559583255a806e4f300e8b7d4f7ceea2ecb4a17f0448dc20fef430bd +size 1042 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Barral/Wood_PT1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Barral/Wood_PT1.bin new file mode 100644 index 000000000..9fe4db8b4 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Barral/Wood_PT1.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4fcc45ca864a35e1b0a75cf725cc0ddf2124914499f774f7770b5aa0bb46671a +size 1042 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Barral/Wood_PT2.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Barral/Wood_PT2.bin new file mode 100644 index 000000000..66e23aa27 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Barral/Wood_PT2.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2d1543e3630c63d41d7591360f048acca63416741f452971b5dd30065299c976 +size 1089 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Box/Paper.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Box/Paper.bin new file mode 100644 index 000000000..28b637cdf --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Box/Paper.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3985d2f4b1eb8d28092685036737ce99a1e17cbed155a103dffd583fd5c5f898 +size 1038 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Box/Smoke.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Box/Smoke.bin new file mode 100644 index 000000000..4c0ea1407 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Box/Smoke.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:697b94a630f4f0257c7d0b1ae6f2cca2175d2d801ee057c1d333ca3ffe976cab +size 1081 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Chair/Hit.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Chair/Hit.bin new file mode 100644 index 000000000..c831bed53 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Chair/Hit.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:040953416567d0a143c21bf3fb1940de36e8f5c24a92f2ce290c094b38d09ae8 +size 1119 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Chair/Smoke.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Chair/Smoke.bin new file mode 100644 index 000000000..7826b1628 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Chair/Smoke.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a6a55bca6de65814691c12c333fda2053e8226a58281fcec461e37b29df3732b +size 1085 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Chair/Wood_PT0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Chair/Wood_PT0.bin new file mode 100644 index 000000000..561296e55 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Chair/Wood_PT0.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:988bc29f07aa84a7a7d571269525e92637e8c159b9845c814ecae69f4a2fe95c +size 1049 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Chair/Wood_PT1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Chair/Wood_PT1.bin new file mode 100644 index 000000000..541352135 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/PorpBroken/Chair/Wood_PT1.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2e13e86ef501990dbf9f15e8ebb9d208a850c3a77be91ac93a36a2b9d5b417e5 +size 1055 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Stun/StunEffect.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Stun/StunEffect.bin new file mode 100644 index 000000000..646a8e273 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Stun/StunEffect.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:97e343fdb35dbe4e21e8d7e431a8253f97678c8b5d9240d6b6cdb5e596e86ab4 +size 1090 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/TP_Test_S0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/TP_Test_S0.bin new file mode 100644 index 000000000..d0ce54b0f --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/TP_Test_S0.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca58aadbab22436f5d072c2ad9acc8e9f7af8d00524458a51bcd0c16823a3d2a +size 996 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/TP_Test_S1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/TP_Test_S1.bin new file mode 100644 index 000000000..6ae798b86 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/TP_Test_S1.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2dc51483655b161aef6293d6950df6753902e46657916127768aa01e2ce813c9 +size 996 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollNomalSmoke/Rock_PT_15.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollNomalSmoke/Rock_PT_15.bin index 5cdad11d7..c651ccaca 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollNomalSmoke/Rock_PT_15.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollNomalSmoke/Rock_PT_15.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:63f6f81087a07cb00f8b487dd2820270c4794a1387b4ed13d8c937e027acd6e7 +oid sha256:822dfd0c124da409c10244aba199911ce0c72c53b0fe45fe877ee6d12b8d2c61 size 1023 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollRush/HitSmoke.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollRush/HitSmoke.bin index 77a9bdde3..c05f98bfb 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollRush/HitSmoke.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollRush/HitSmoke.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fc390eae893f71f844682d29d5e0957f84084e1e71fd3ccc276dc5df56fd3193 -size 1089 +oid sha256:b873e02c2b075110728bded6203d6c58dda69e18e725b2ecd376b6cea6772fc6 +size 1124 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollRush/Rock_PT_35.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollRush/Rock_PT_35.bin new file mode 100644 index 000000000..3eaae4d95 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollRush/Rock_PT_35.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:354ba10ad5e30909ff87f27d52760dcfe7a5beac4ff3010ad5c100c717c65190 +size 1023 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollSwing/Rock_PT_25.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollSwing/Rock_PT_25.bin index 39a5eb571..c4014359d 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollSwing/Rock_PT_25.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollSwing/Rock_PT_25.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:86ddfc69f4752004c34ba936aac4548a6596bea57fbcf36bc1e60eac2bf95111 +oid sha256:e9c6a94510ca1d5fcfd175009c2cb1a7c28f5d052fa8d5051e7f09a39065ae72 size 1031 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_0.001.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_0.001.bin new file mode 100644 index 000000000..297db8306 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_0.001.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:acd09e78e963697a3d419a55bf7864baf9a9914227dedf6e553c7bc19d731904 +size 31818 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_0.001.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_0.001.fbx new file mode 100644 index 000000000..bff9d909e --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_0.001.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6e968b012ccd725f3cae2ce2c0c55aa19de32fe016eac2a327c4926eb6fff4fb +size 26428 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_0.pskx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_0.pskx deleted file mode 100644 index 16cd2bb09..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_0.pskx and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_1.001.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_1.001.bin new file mode 100644 index 000000000..92da9ab42 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_1.001.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:920201f56b90e3508b6a84f6361f38a0551c48396aaa8c9ec89138c12cffa492 +size 26990 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_1.001.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_1.001.fbx new file mode 100644 index 000000000..92d882b26 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_1.001.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dd834974a2d22a6e535a2acaa9c9f5106bff315f489a317cdd36bbbf3cd1c78d +size 25020 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_1.pskx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_1.pskx deleted file mode 100644 index f608109ba..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_1.pskx and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_2.001.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_2.001.bin new file mode 100644 index 000000000..820e5d5b9 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_2.001.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aeb55cd03d8053dbd2146f19b0dfffdf78cbe38076b4a81fc1b030ef357afa57 +size 29326 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_2.001.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_2.001.fbx new file mode 100644 index 000000000..3b4058bb8 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_2.001.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:72c9298a654da937a32992f39747d59afe77816fb128920406d532c4c4b59b7c +size 25708 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_2.pskx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_2.pskx deleted file mode 100644 index 236042c61..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_2.pskx and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_3.001.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_3.001.bin new file mode 100644 index 000000000..d2f1dd421 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_3.001.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:98cc4f3fdc0ca1c64492730d10423e6d7039086c30f5374b5e11d3c5d294b87f +size 22578 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_3.001.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_3.001.fbx new file mode 100644 index 000000000..15bf65815 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_3.001.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7130ae98175d4f8b4619f929cfe0716cdd1f82f5af7c496d73a12e8b606b3a57 +size 23052 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_3.pskx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_3.pskx deleted file mode 100644 index 6e43f57a7..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_3.pskx and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_0.001.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_0.001.bin new file mode 100644 index 000000000..83c7baec9 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_0.001.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:72fa107b0129322d7c9f07dd8c32f344dd3425c34514a15d5b823ae58cbebb8c +size 27502 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_0.001.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_0.001.fbx new file mode 100644 index 000000000..960e5d96b --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_0.001.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:50477d4ecbe4287736969767ade5a0f91c3d3afd04b792967e739ba998769b13 +size 25020 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_0.pskx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_0.pskx deleted file mode 100644 index 40cd09b35..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_0.pskx and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_1.001.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_1.001.bin new file mode 100644 index 000000000..ab01ed1fb --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_1.001.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fceb6456ccaf6c3f1b0e6ef3df084bdcb7222784a02763ddf24c8a27d5f833fb +size 40970 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_1.001.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_1.001.fbx new file mode 100644 index 000000000..9707ee8ae --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_1.001.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4dbe2bb7ee77dc664f71460505af675639f2a41a36730d3b6adbb59dc27d3097 +size 29276 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_1.pskx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_1.pskx deleted file mode 100644 index e80f1a5f2..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_1.pskx and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_2.001.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_2.001.bin new file mode 100644 index 000000000..571f4de31 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_2.001.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac74420ec141343a2309a52594a3bfe023e24fdda52dadb3fcc558c18d4c0c77 +size 17786 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_2.001.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_2.001.fbx new file mode 100644 index 000000000..aebb5a667 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_2.001.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:69ad762ab872b3f02856385448bec7f29ad5ba31ff03da74d55ee3af4ae70e64 +size 21852 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_2.pskx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_2.pskx deleted file mode 100644 index 69a889ba9..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Large_2.pskx and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Small_0.001.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Small_0.001.bin new file mode 100644 index 000000000..e8e290e11 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Small_0.001.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f26fdf66511e1951556ec7a11fb56dc675d9a159e2ca5000c0da5ee496d2a238 +size 32014 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Small_0.001.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Small_0.001.fbx new file mode 100644 index 000000000..31ef03f67 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Small_0.001.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:313502f9bead431c62e5c135cbe6237461698fb4287b34fb13eada6e2cc2a0a5 +size 26092 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Small_0.pskx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Small_0.pskx deleted file mode 100644 index a843b7846..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Box/SM_Wood_Fracture_Small_0.pskx and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/BaseFlattenNormalMap.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/BaseFlattenNormalMap.png new file mode 100644 index 000000000..d8e1fd944 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/BaseFlattenNormalMap.png differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.bin new file mode 100644 index 000000000..459598ade --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:45edbad61d9d6f8891b2009ec64951195a58e0fa50134a9d3b3dd0c5e34bee30 +size 6393892 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.fbx new file mode 100644 index 000000000..838440947 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7fd7b3d203725b7044f2a72e4c7fda5981befcc2c607bfca596b0b6c0797c417 +size 3160204 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.xml b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.xml new file mode 100644 index 000000000..b1a8459aa --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.xml @@ -0,0 +1,292 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander_Anim.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander_Anim.bin new file mode 100644 index 000000000..16e04855b --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander_Anim.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4c3d337a05c5621c027dec7cfd5345c13b8c46b243a072d4c8cf5c11d0d34039 +size 12951064 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander_Anim.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander_Anim.fbx new file mode 100644 index 000000000..0aa5ad418 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander_Anim.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:436a9c2d497061156640f0f2011616d41e0eacb3763eb86d18442bf4e2b4a193 +size 19497756 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/SK_NPC_OM_GerboldOllivander_Master.psk b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/SK_NPC_OM_GerboldOllivander_Master.psk new file mode 100644 index 000000000..57ee03c77 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/SK_NPC_OM_GerboldOllivander_Master.psk differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_DefaultGrey_D.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_DefaultGrey_D.png new file mode 100644 index 000000000..b414d5691 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_DefaultGrey_D.png differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_Eye_IrisTint_MSK.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_Eye_IrisTint_MSK.dds new file mode 100644 index 000000000..ab2620bf1 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_Eye_IrisTint_MSK.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_Eye_Iris_D.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_Eye_Iris_D.dds new file mode 100644 index 000000000..600335fce Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_Eye_Iris_D.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_Eye_Iris_D.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_Eye_Iris_D.png new file mode 100644 index 000000000..4bf9d62f9 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_Eye_Iris_D.png differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_Eye_Sclera_D.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_Eye_Sclera_D.png new file mode 100644 index 000000000..6e082532d Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_Eye_Sclera_D.png differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_Eye_Wetness_N.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_Eye_Wetness_N.dds new file mode 100644 index 000000000..3eacfd4ac Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_Eye_Wetness_N.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_Head_EyeShadow_A.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_Head_EyeShadow_A.dds new file mode 100644 index 000000000..0aaa725e1 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_Head_EyeShadow_A.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_Head_Teeth_D.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_Head_Teeth_D.dds new file mode 100644 index 000000000..24effbef3 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_Head_Teeth_D.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_Head_Teeth_N.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_Head_Teeth_N.dds new file mode 100644 index 000000000..4d226e763 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_Head_Teeth_N.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_Head_Teeth_SRXO.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_Head_Teeth_SRXO.dds new file mode 100644 index 000000000..a404651ed Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_Head_Teeth_SRXO.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Acc_Glasses01_D.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Acc_Glasses01_D.dds new file mode 100644 index 000000000..4c20ec900 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Acc_Glasses01_D.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Acc_Glasses01_I.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Acc_Glasses01_I.dds new file mode 100644 index 000000000..b62ebd88d Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Acc_Glasses01_I.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Acc_Glasses01_I.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Acc_Glasses01_I.png new file mode 100644 index 000000000..6183b371c Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Acc_Glasses01_I.png differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Acc_Glasses01_IB.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Acc_Glasses01_IB.dds new file mode 100644 index 000000000..51f222bee Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Acc_Glasses01_IB.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Acc_Glasses01_N.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Acc_Glasses01_N.dds new file mode 100644 index 000000000..00692a518 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Acc_Glasses01_N.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Acc_Glasses01_R00_I.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Acc_Glasses01_R00_I.dds new file mode 100644 index 000000000..ad391eecd Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Acc_Glasses01_R00_I.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Acc_Glasses01_R00_I.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Acc_Glasses01_R00_I.png new file mode 100644 index 000000000..6034f8a25 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Acc_Glasses01_R00_I.png differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Acc_Glasses01_R01_I.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Acc_Glasses01_R01_I.dds new file mode 100644 index 000000000..ae2b0898c Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Acc_Glasses01_R01_I.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Acc_Glasses01_R01_I.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Acc_Glasses01_R01_I.png new file mode 100644 index 000000000..4c2a934e6 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Acc_Glasses01_R01_I.png differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Acc_Glasses01_R02_I.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Acc_Glasses01_R02_I.dds new file mode 100644 index 000000000..e91bfef12 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Acc_Glasses01_R02_I.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Acc_Glasses01_R02_I.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Acc_Glasses01_R02_I.png new file mode 100644 index 000000000..f69356cf0 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Acc_Glasses01_R02_I.png differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Acc_Glasses01_SRO.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Acc_Glasses01_SRO.dds new file mode 100644 index 000000000..404f133d3 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Acc_Glasses01_SRO.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Facial_Hair_Ollivander_DAO_MSK.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Facial_Hair_Ollivander_DAO_MSK.dds new file mode 100644 index 000000000..8260caea9 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Facial_Hair_Ollivander_DAO_MSK.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Facial_Hair_Ollivander_THV_MSK.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Facial_Hair_Ollivander_THV_MSK.dds new file mode 100644 index 000000000..9e2e7390f Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Facial_Hair_Ollivander_THV_MSK.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Hair_Ollivander_DAO_MSK.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Hair_Ollivander_DAO_MSK.dds new file mode 100644 index 000000000..5bfee0f5f Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Hair_Ollivander_DAO_MSK.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Hair_Ollivander_THV_MSK.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Hair_Ollivander_THV_MSK.dds new file mode 100644 index 000000000..c215eec11 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Hair_Ollivander_THV_MSK.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_D.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_D.dds new file mode 100644 index 000000000..d19c0f1fc Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_D.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_I.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_I.dds new file mode 100644 index 000000000..7d22544cc Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_I.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_I.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_I.png new file mode 100644 index 000000000..a793b52b5 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_I.png differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_IB.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_IB.dds new file mode 100644 index 000000000..868e4290b Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_IB.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_N.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_N.dds new file mode 100644 index 000000000..8968cc269 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_N.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_R00_I.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_R00_I.dds new file mode 100644 index 000000000..256414c39 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_R00_I.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_R00_I.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_R00_I.png new file mode 100644 index 000000000..19f1b8c27 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_R00_I.png differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_R01_I.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_R01_I.dds new file mode 100644 index 000000000..22447bd71 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_R01_I.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_R01_I.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_R01_I.png new file mode 100644 index 000000000..2787f2fe4 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_R01_I.png differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_R02_I.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_R02_I.dds new file mode 100644 index 000000000..4b8c88c7f Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_R02_I.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_R02_I.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_R02_I.png new file mode 100644 index 000000000..4f973309d Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_R02_I.png differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_R03_I.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_R03_I.dds new file mode 100644 index 000000000..d3486926f Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_R03_I.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_R03_I.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_R03_I.png new file mode 100644 index 000000000..fb98db8ee Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_R03_I.png differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_SRO.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_SRO.dds new file mode 100644 index 000000000..4f8151b34 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Low_Ollivander_SRO.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Upp_Ollivander_D.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Upp_Ollivander_D.dds new file mode 100644 index 000000000..d0d3ee0b4 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Upp_Ollivander_D.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Upp_Ollivander_MRO.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Upp_Ollivander_MRO.dds new file mode 100644 index 000000000..fed4f59f9 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Upp_Ollivander_MRO.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Upp_Ollivander_N.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Upp_Ollivander_N.dds new file mode 100644 index 000000000..3b309931e Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_HUM_M_Upp_Ollivander_N.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_Old_M_Head_GerboldOllivander_WithHands_D.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_Old_M_Head_GerboldOllivander_WithHands_D.dds new file mode 100644 index 000000000..c687e25d4 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_Old_M_Head_GerboldOllivander_WithHands_D.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_Old_M_Head_GerboldOllivander_WithHands_N.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_Old_M_Head_GerboldOllivander_WithHands_N.dds new file mode 100644 index 000000000..b77c5a55c Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_Old_M_Head_GerboldOllivander_WithHands_N.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_Old_M_Head_Gerbold_Olivander_WithHands_SRXO.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_Old_M_Head_Gerbold_Olivander_WithHands_SRXO.dds new file mode 100644 index 000000000..a0f918e18 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/T_Old_M_Head_Gerbold_Olivander_WithHands_SRXO.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/VFX_T_SkinBurn_Alpha_D.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/VFX_T_SkinBurn_Alpha_D.dds new file mode 100644 index 000000000..9a7d13671 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/GerboldOllivander/VFX_T_SkinBurn_Alpha_D.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll.bin index 7ed6a145a..c3a633e78 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d0274b0376cad70728c71c7d0b596494402d8a480189d93e93a4c8d98086dbd2 -size 5154657 +oid sha256:a7d1e09cadbb9b893154e11dae7e8a4dbd6519c294fbca956cf2ba11fdfe4ed5 +size 5154246 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll.xml b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll.xml index 3cbe11bcd..d24083c9d 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll.xml +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll.xml @@ -1,5 +1,5 @@ - + @@ -17,7 +17,7 @@ - + @@ -28,12 +28,12 @@ - + - + @@ -57,7 +57,7 @@ - + @@ -86,7 +86,7 @@ - + @@ -104,7 +104,7 @@ - + @@ -115,7 +115,7 @@ - + @@ -144,7 +144,7 @@ - + @@ -162,7 +162,7 @@ - + @@ -173,10 +173,10 @@ - + - + @@ -191,7 +191,7 @@ - + diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Broom/Broom.xml b/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Broom/Broom.xml index 61b4827cf..86e590f22 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Broom/Broom.xml +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Broom/Broom.xml @@ -1,5 +1,5 @@ - + diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/SubTroll_Weapon/SK_WPN_Troll_Club07.xml b/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/SubTroll_Weapon/SK_WPN_Troll_Club07.xml index aa4a724b3..c8cfcc5db 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/SubTroll_Weapon/SK_WPN_Troll_Club07.xml +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/SubTroll_Weapon/SK_WPN_Troll_Club07.xml @@ -1,5 +1,5 @@ - + @@ -21,7 +21,7 @@ - + diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/SubTroll_Weapon/troll.xml b/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/SubTroll_Weapon/troll.xml deleted file mode 100644 index 6d1d8c574..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/SubTroll_Weapon/troll.xml +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli index f408fe02c..a7608f95e 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli @@ -326,13 +326,13 @@ float2 SelectLerpUV(float2 fAmount, float _fRatio, int iSelectOption) fRatio = fRatio * fRatio; // EaseInQuad 후반에 속도 증가 break; case 2: - fRatio = 1 - pow(1 - fRatio, 2); // EaseOutQuad 초반에 속도 증가 + fRatio = pow(1 - fRatio, 2); // EaseOutQuad 초반에 속도 증가 break; case 3: fRatio = fRatio * fRatio * fRatio; // EaseInCubic 더 강하게 후반 속도 증가 break; case 4: - fRatio = 1 - pow(1 - fRatio, 3); // EaseOutCubic 더 강하게 초반 속도 증가 + fRatio = pow(1 - fRatio, 3); // EaseOutCubic 더 강하게 초반 속도 증가 break; case 5: fRatio = 0.5f * (1 - cos(PI * fRatio)); // EaseInOutSin 사인 곡선 @@ -343,9 +343,7 @@ float2 SelectLerpUV(float2 fAmount, float _fRatio, int iSelectOption) case 7: fRatio = pow(2, 10 * (fRatio - 1)); // Expo 지수 함수 break; - case 8: - fRatio = 1 - pow(1 - fRatio * fRatio, 0.5); // 원형 궤적 - break; + } return fAmount * fRatio; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl index 41166db92..edd08da29 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl @@ -229,7 +229,7 @@ PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In) - if (true == AlmostEqual3(vDepth.b * AI_TEXTURE_TYPE_MAX, AI_TEXTURE_TYPE_METALNESS)) // Metallic + if (true == AlmostEqual3(vDepth.b * AI_TEXTURE_TYPE_MAX, AI_TEXTURE_TYPE_METALNESS)) // Metallic Roughness Occ { float3 vMRO = g_SurfaceTexture.Sample(DefaultSampler, uv).rgb; fMetallic = vMRO.r; @@ -238,7 +238,7 @@ PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In) vF0 = lerp(float3(0.04f, 0.04f, 0.04f), vAlbedo, fMetallic); } - else if (true == AlmostEqual3(vDepth.b * AI_TEXTURE_TYPE_MAX, AI_TEXTURE_TYPE_SPECULAR)) // Specular + else if (true == AlmostEqual3(vDepth.b * AI_TEXTURE_TYPE_MAX, AI_TEXTURE_TYPE_SPECULAR)) // Specular Roughness Occ { fMetallic = 0.f; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_NPC_PBR_Anim.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_NPC_PBR_Anim.hlsl new file mode 100644 index 000000000..5d0bf49b5 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_NPC_PBR_Anim.hlsl @@ -0,0 +1,831 @@ + +#include "Engine_Shader_Defines.hlsli" + +float4x4 g_WorldMatrix, g_ViewMatrix, g_ProjMatrix; + +int g_bRimLight; +int g_bUseNormalMap; +int g_bDisolve; + +float4 g_vDisolveEdgeColor; +float4 g_vCamPosition; +float4 g_vOutLineColor; +float g_fFar; +float g_fOutLineScale; +float g_fOutLineThickness; +float g_fOutLinePower; +float g_fUsingSurfaceParams; + + +Texture2D g_DiffuseTexture; +Texture2D g_SpecularTexture; +Texture2D g_AmbientTexture; +Texture2D g_EmissiveTexture; +Texture2D g_HeightTexture; +Texture2D g_NormalTexture; +Texture2D g_ShininessTexture; +Texture2D g_OpacityTexture; +Texture2D g_DisplacementTexture; +Texture2D g_LightMapTexture; +Texture2D g_ReflectionTexture; +Texture2D g_BaseColorTexture; +Texture2D g_NormalCameraTexture; +Texture2D g_EmissionColorTexture; +Texture2D g_MetalnessTexture; +Texture2D g_Diffuse_RoughnessTexture; +Texture2D g_AmbientOcclusionTexture; +Texture2D g_UnknownTexture; +Texture2D g_SheenTexture; +Texture2D g_ClearcoadTexture; +Texture2D g_TransmissionTexture; +Texture2D g_Maya_BaseTexture; +Texture2D g_Maya_SpecularTexture; +Texture2D g_Maya_Specular_ColorTexture; +Texture2D g_Maya_Specular_RoughnessTexture; +Texture2D g_AnisotropyTexture; + + +Texture2D g_SurfaceParamsTexture; + + +int g_iBinded_Texture[27]; +matrix g_BoneMatrices[512]; + +struct VS_IN_MESH +{ + float3 vPosition : POSITION; + float3 vNormal : NORMAL; + float3 vTangent : TANGENT; + float3 vBinormal : BINORMAL; + float2 vTexcoord : TEXCOORD0; +}; + +struct VS_IN +{ + float3 vPosition : POSITION; + float3 vNormal : NORMAL; + float3 vTangent : TANGENT; + float3 vBinormal : BINORMAL; + float2 vTexcoord : TEXCOORD0; + + uint4 vBlendIndex : BLENDINDEX; + float4 vBlendWeight : BLENDWEIGHT; +}; +struct VS_OUT +{ + float4 vPosition : SV_Position; + float3 vNormal : NORMAL; + float3 vTangent : TANGENT; + float3 vBinormal : BINORMAL; + float2 vTexcoord : TEXCOORD0; + float4 vWorldPos : TEXCOORD1; + float4 vProjPos : TEXCOORD2; +}; +VS_OUT VS_MAIN_MESH(VS_IN_MESH In) +{ + VS_OUT Out; + + matrix matWV, matWVP; + matWV = mul(g_WorldMatrix, g_ViewMatrix); + matWVP = mul(matWV, g_ProjMatrix); + + Out.vPosition = mul(vector(In.vPosition, 1.f), matWVP); + Out.vNormal = normalize(mul(vector(In.vNormal, 0.f), g_WorldMatrix)).xyz; + Out.vTangent = normalize(mul(vector(In.vTangent, 0.f), g_WorldMatrix)).xyz; + Out.vBinormal = normalize(mul(vector(In.vBinormal, 0.f), g_WorldMatrix)).xyz; + Out.vTexcoord = In.vTexcoord; + Out.vWorldPos = mul(vector(In.vPosition, 1.f), g_WorldMatrix); + Out.vProjPos = Out.vPosition; + return Out; +} + +VS_OUT VS_MAIN(VS_IN In) +{ + VS_OUT Out; + + float fWeightW = 1.f - (In.vBlendWeight.x + In.vBlendWeight.y + In.vBlendWeight.z); + + matrix BoneMatrix = + mul(g_BoneMatrices[In.vBlendIndex.x], In.vBlendWeight.x) + + mul(g_BoneMatrices[In.vBlendIndex.y], In.vBlendWeight.y) + + mul(g_BoneMatrices[In.vBlendIndex.z], In.vBlendWeight.z) + + mul(g_BoneMatrices[In.vBlendIndex.w], fWeightW); + + vector vPosition = mul(vector(In.vPosition, 1.f), BoneMatrix); + vector vNormal = mul(vector(In.vNormal, 0.f), BoneMatrix); + vector vBinormal = mul(vector(In.vBinormal, 0.f), BoneMatrix); + vector vTangent = mul(vector(In.vTangent, 0.f), BoneMatrix); + + + matrix matWV, matWVP; + matWV = mul(g_WorldMatrix, g_ViewMatrix); + matWVP = mul(matWV, g_ProjMatrix); + + Out.vPosition = mul(vPosition, matWVP); + Out.vNormal = normalize(mul(vNormal, g_WorldMatrix)).xyz; + Out.vBinormal = normalize(mul(vBinormal, g_WorldMatrix)).xyz; + Out.vTangent = normalize(mul(vTangent, g_WorldMatrix)).xyz; + Out.vTexcoord = In.vTexcoord; + Out.vWorldPos = mul(vPosition, g_WorldMatrix); + Out.vProjPos = Out.vPosition; + return Out; +} + +VS_OUT VS_MAIN_OUTLINE_READ(VS_IN In) +{ + VS_OUT Out; + + float fWeightW = 1.f - (In.vBlendWeight.x + In.vBlendWeight.y + In.vBlendWeight.z); + + matrix BoneMatrix = + mul(g_BoneMatrices[In.vBlendIndex.x], In.vBlendWeight.x) + + mul(g_BoneMatrices[In.vBlendIndex.y], In.vBlendWeight.y) + + mul(g_BoneMatrices[In.vBlendIndex.z], In.vBlendWeight.z) + + mul(g_BoneMatrices[In.vBlendIndex.w], fWeightW); + + vector vPosition = mul(vector(In.vPosition, 1.f), BoneMatrix); + vector vNormal = mul(vector(In.vNormal, 0.f), BoneMatrix); + vector vBinormal = mul(vector(In.vBinormal, 0.f), BoneMatrix); + vector vTangent = mul(vector(In.vTangent, 0.f), BoneMatrix); + vPosition.xyz += (vNormal.xyz * g_fOutLineThickness).xyz; + + + matrix matWV, matWVP; + matWV = mul(g_WorldMatrix, g_ViewMatrix); + matWVP = mul(matWV, g_ProjMatrix); + + Out.vPosition = mul(vPosition, matWVP); + Out.vNormal = normalize(mul(vNormal, g_WorldMatrix)).xyz; + Out.vBinormal = normalize(mul(vBinormal, g_WorldMatrix)).xyz; + Out.vTangent = normalize(mul(vTangent, g_WorldMatrix)).xyz; + Out.vTexcoord = In.vTexcoord; + Out.vWorldPos = mul(vPosition, g_WorldMatrix); + Out.vProjPos = Out.vPosition; + return Out; +} +struct VS_OUT_SHADOW +{ + float4 vPosition : SV_POSITION; + float4 vProjPos : TEXCOORD0; +}; + +VS_OUT_SHADOW VS_MAIN_SHADOW(VS_IN In) +{ + VS_OUT_SHADOW Out; + + float fWeightW = 1.f - (In.vBlendWeight.x + In.vBlendWeight.y + In.vBlendWeight.z); + + matrix BoneMatrix = mul(g_BoneMatrices[In.vBlendIndex.x], In.vBlendWeight.x) + + mul(g_BoneMatrices[In.vBlendIndex.y], In.vBlendWeight.y) + + mul(g_BoneMatrices[In.vBlendIndex.z], In.vBlendWeight.z) + + mul(g_BoneMatrices[In.vBlendIndex.w], fWeightW); + + vector vPosition = mul(vector(In.vPosition, 1.f), BoneMatrix); + + matrix matWV, matWVP; + + matWV = mul(g_WorldMatrix, g_ViewMatrix); + matWVP = mul(matWV, g_ProjMatrix); + + Out.vPosition = mul(vPosition, matWVP); + Out.vProjPos = Out.vPosition; + + return Out; +} +struct PS_IN +{ + float4 vPosition : SV_Position; + float3 vNormal : NORMAL; + float3 vTangent : TANGENT; + float3 vBinormal : BINORMAL; + float2 vTexcoord : TEXCOORD0; + float4 vWorldPos : TEXCOORD1; + float4 vProjPos : TEXCOORD2; +}; + +struct PS_OUT +{ + float4 vAlbedo : SV_TARGET0; + float4 vNormal : SV_TARGET1; + float4 vDepth : SV_TARGET2; + float4 vColor : SV_Target3; + float4 vSurface : SV_Target4; +}; +struct PS_OUT_OUTLINE +{ + float4 vOutLine : SV_TARGET0; + float4 vNormal : SV_TARGET1; + float4 vDepth : SV_TARGET2; +}; + +PS_OUT_OUTLINE PS_MAIN_OUTLINE_READ(PS_IN In) +{ + PS_OUT_OUTLINE Out = (PS_OUT_OUTLINE) 0; + + float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord); + float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal); + + float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix)); + + float3 vToView = normalize(g_vCamPosition.xyz - In.vWorldPos.xyz); + + float fNdotV = saturate(dot(vNormal, vToView)); + float fRim = saturate((1.0f - fNdotV) * g_fOutLineScale); + fRim = pow(fRim, g_fOutLinePower); + + Out.vOutLine = float4(g_vOutLineColor.rgb, fRim); + Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f); + Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1) + (In.vProjPos.w / g_fFar), // 뷰 스페이스 Z + (float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터 + 1.f); + + return Out; +} + +PS_OUT PS_EYELASH_DAOTHV_ToSRO(PS_IN In) +{ + PS_OUT Out; + + float4 vDAO_Mask = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord); + + float fDiffuseMask = vDAO_Mask.r; + float AlphaMask = vDAO_Mask.g; + float AoMask_Dao = vDAO_Mask.b; + + if (AlphaMask < 0.2f) { + discard; + } + float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord); + float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal); + float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix)); + + float4 vTHV_Mask = g_DisplacementTexture.Sample(DefaultSampler, In.vTexcoord); + float RootTip = vTHV_Mask.r; + float SpecMask = vTHV_Mask.g; + float AoMask_Thv = vTHV_Mask.b; + + float3 vColorRoot = vDAO_Mask * 0.6f; + float3 vColorTip = vDAO_Mask; + float3 vBaseColor = lerp(vColorRoot, vColorTip, RootTip); + + + Out.vAlbedo = float4(fDiffuseMask, fDiffuseMask, fDiffuseMask, AlphaMask); + Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f); + Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1) + (In.vProjPos.w / g_fFar), // 뷰 스페이스 Z + (float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터 + 1.f); + Out.vColor = float4(0.f, 0.f, 0.f, 1.f); + Out.vSurface = float4(lerp(0.7f, 0.3f, SpecMask), SpecMask * 0.5f, AoMask_Dao * AoMask_Thv, 0.f); + // SRO + return Out; +} + +PS_OUT PS_TEETH_SRXO_ToSRO(PS_IN In) +{ + PS_OUT Out; + + float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord); + + if (vDiffuse.a < 0.2f) { + discard; + } + + float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord); + float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal); + float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix)); + + float4 vSRXO_MASK = g_AnisotropyTexture.Sample(DefaultSampler, In.vTexcoord); + + Out.vAlbedo = vDiffuse; + Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f); + Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1) + (In.vProjPos.w / g_fFar), // 뷰 스페이스 Z + (float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터 + 1.f); + Out.vColor = float4(0.f, 0.f, 0.f, 1.f); + Out.vSurface = float4(vSRXO_MASK.r, vSRXO_MASK.g, vSRXO_MASK.a, 0.f); + // SRO + return Out; +} + +PS_OUT PS_EYE_DN_SRO(PS_IN In) +{ + PS_OUT Out; + + float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord); + + if (vDiffuse.a < 0.2f) { + discard; + } + + float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord); + float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal); + float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix)); + + Out.vAlbedo = vDiffuse; + Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f); + Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1) + (In.vProjPos.w / g_fFar), // 뷰 스페이스 Z + (float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터 + 1.f); + Out.vColor = float4(0.f, 0.f, 0.f, 1.f); + Out.vSurface = float4(0.5f, 0.5f, 1.f, 0.f); + // SRO + return Out; +} + +PS_OUT PS_EYE_OCC(PS_IN In) +{ + PS_OUT Out; + discard; + return Out; +} + +PS_OUT PS_FACIAL_HAIR_DAOTHV_ToSRO(PS_IN In) +{ + + PS_OUT Out; + + float4 vDAO_Mask = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord); + + float fDiffuseMask = vDAO_Mask.r; + float AlphaMask = vDAO_Mask.g; + float AoMask_Dao = vDAO_Mask.b; + + if (AlphaMask < 0.2f) + { + discard; + } + float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord); + float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal); + float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix)); + + float4 vTHV_Mask = g_DisplacementTexture.Sample(DefaultSampler, In.vTexcoord); + float RootTip = vTHV_Mask.r; + float SpecMask = vTHV_Mask.g; + float AoMask_Thv = vTHV_Mask.b; + + float3 vColorRoot = vDAO_Mask * 0.6f; + float3 vColorTip = vDAO_Mask; + float3 vBaseColor = lerp(vColorRoot, vColorTip, RootTip); + + + Out.vAlbedo = float4(fDiffuseMask, fDiffuseMask, fDiffuseMask, AlphaMask); + Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f); + Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1) + (In.vProjPos.w / g_fFar), // 뷰 스페이스 Z + (float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터 + 1.f); + Out.vColor = float4(0.f, 0.f, 0.f, 1.f); + Out.vSurface = float4(lerp(0.7f, 0.3f, SpecMask), SpecMask * 0.5f, AoMask_Dao * AoMask_Thv, 0.f); + // SRO + return Out; +} + +PS_OUT PS_HEAD_HAIR_DAOTHV_ToSRO(PS_IN In) +{ + + PS_OUT Out; + + float4 vDAO_Mask = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord); + + float fDiffuseMask = vDAO_Mask.r; + float AlphaMask = vDAO_Mask.g; + float AoMask_Dao = vDAO_Mask.b; + + if (AlphaMask < 0.2f) + { + discard; + } + float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord); + float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal); + float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix)); + + float4 vTHV_Mask = g_DisplacementTexture.Sample(DefaultSampler, In.vTexcoord); + float RootTip = vTHV_Mask.r; + float SpecMask = vTHV_Mask.g; + float AoMask_Thv = vTHV_Mask.b; + + float3 vColorRoot = vDAO_Mask * 0.6f; + float3 vColorTip = vDAO_Mask; + float3 vBaseColor = lerp(vColorRoot, vColorTip, RootTip); + + + Out.vAlbedo = float4(fDiffuseMask, fDiffuseMask, fDiffuseMask, AlphaMask); + Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f); + Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1) + (In.vProjPos.w / g_fFar), // 뷰 스페이스 Z + (float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터 + 1.f); + Out.vColor = float4(0.f, 0.f, 0.f, 1.f); + Out.vSurface = float4(lerp(0.7f, 0.3f, SpecMask), SpecMask * 0.5f, AoMask_Dao * AoMask_Thv, 0.f); + // SRO + return Out; +} + +PS_OUT PS_HEADwtHAND_DSRXON_ToSRO(PS_IN In) +{ + PS_OUT Out; + + float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord); + + if (vDiffuse.a < 0.2f) { + discard; + } + float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord); + float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal); + float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix)); + + float4 vSRXO_Mask = g_AnisotropyTexture.Sample(DefaultSampler, In.vTexcoord); + + Out.vAlbedo = vDiffuse; + Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f); + Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1) + (In.vProjPos.w / g_fFar), // 뷰 스페이스 Z + (float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터 + 1.f); + Out.vColor = float4(0.f, 0.f, 0.f, 1.f); + Out.vSurface = float4(vSRXO_Mask.r, vSRXO_Mask.g, vSRXO_Mask.a, 0.f); + // SRO + return Out; +} + +PS_OUT PS_LOWER_DSRON_ToSRO(PS_IN In) +{ + PS_OUT Out; + + float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord); + + if (vDiffuse.a < 0.2f) { + discard; + } + float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord); + float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal); + float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix)); + + float4 vSRO_Mask = g_SpecularTexture.Sample(DefaultSampler, In.vTexcoord); + + Out.vAlbedo = vDiffuse; + Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f); + Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1) + (In.vProjPos.w / g_fFar), // 뷰 스페이스 Z + (float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터 + 1.f); + Out.vColor = float4(0.f, 0.f, 0.f, 1.f); + Out.vSurface = float4(vSRO_Mask.r, vSRO_Mask.g, vSRO_Mask.b, 0.f); + // SRO + return Out; +} + +PS_OUT PS_UPPER_DMRON_ToMRO(PS_IN In) +{ + PS_OUT Out; + + float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord); + + if (vDiffuse.a < 0.2f) { + discard; + } + float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord); + float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal); + float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix)); + + float4 vMRO_Mask = g_MetalnessTexture.Sample(DefaultSampler, In.vTexcoord); + + Out.vAlbedo = vDiffuse; + Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f); + Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1) + (In.vProjPos.w / g_fFar), // 뷰 스페이스 Z + (float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터 + 1.f); + Out.vColor = float4(0.f, 0.f, 0.f, 1.f); + Out.vSurface = float4(vMRO_Mask.r, vMRO_Mask.g, vMRO_Mask.b, 0.f); + // MRO + return Out; +} + +PS_OUT PS_GLASSES_DMRON_ToMRO(PS_IN In) +{ + PS_OUT Out; + + float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord); + + if (vDiffuse.a < 0.2f) { + discard; + } + float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord); + float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal); + float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix)); + + float4 vMRO_Mask = g_MetalnessTexture.Sample(DefaultSampler, In.vTexcoord); + + Out.vAlbedo = vDiffuse; + Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f); + Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1) + (In.vProjPos.w / g_fFar), // 뷰 스페이스 Z + (float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터 + 1.f); + Out.vColor = float4(0.f, 0.f, 0.f, 1.f); + Out.vSurface = float4(vMRO_Mask.r, vMRO_Mask.g, vMRO_Mask.b, 0.f); + // SRO + return Out; +} + +PS_OUT PS_EmissiveMetalness_DENMRO_ToMRO(PS_IN In) +{ + PS_OUT Out; + + float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord); + float4 vEmissive = g_EmissiveTexture.Sample(DefaultSampler, In.vTexcoord); + vDiffuse.rgb += vEmissive.rgb; + if (vDiffuse.a < 0.2f) { + discard; + } + float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord); + float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal); + float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix)); + + float4 vMRO_Mask = g_MetalnessTexture.Sample(DefaultSampler, In.vTexcoord); + + Out.vAlbedo = vDiffuse; + Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f); + Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1) + (In.vProjPos.w / g_fFar), // 뷰 스페이스 Z + (float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터 + 1.f); + Out.vColor = float4(0.f, 0.f, 0.f, 1.f); + Out.vSurface = float4(vMRO_Mask.r, vMRO_Mask.g, vMRO_Mask.b, 0.f); + // SRO + return Out; +} + +PS_OUT PS_MI_ClothSim_DSEN_ToSRO(PS_IN In) +{ + PS_OUT Out; + + float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord); + float4 vEmissive = g_EmissiveTexture.Sample(DefaultSampler, In.vTexcoord); + vDiffuse.rgb += vEmissive.rgb; + if (vDiffuse.a < 0.2f) { + discard; + } + float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord); + float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal); + float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix)); + + float4 vSpecular_Mask = g_SpecularTexture.Sample(DefaultSampler, In.vTexcoord); + + Out.vAlbedo = vDiffuse; + Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f); + Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1) + (In.vProjPos.w / g_fFar), // 뷰 스페이스 Z + (float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터 + 1.f); + Out.vColor = float4(0.f, 0.f, 0.f, 1.f); + Out.vSurface = float4(vSpecular_Mask.r, 0.5f, 1.f, 0.f); + // SRO + return Out; +} + +PS_OUT PS_Troll_Club_DAENMROSRXO_ToMROX(PS_IN In) +{ + PS_OUT Out; + + float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord); + float4 vEmissive = g_EmissiveTexture.Sample(DefaultSampler, In.vTexcoord); + float4 vAmbient = g_AmbientTexture.Sample(DefaultSampler, In.vTexcoord); + vDiffuse.rgb += vEmissive.rgb; + vDiffuse.rgb += vAmbient.rgb; + if (vDiffuse.a < 0.2f) { + discard; + } + float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord); + float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal); + float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix)); + + float4 vSRXO_Mask = g_AnisotropyTexture.Sample(DefaultSampler, In.vTexcoord); + float4 vMRO_MASK = g_MetalnessTexture.Sample(DefaultSampler, In.vTexcoord); + + float Roughness = vSRXO_Mask.g; + + float Occlusion = saturate(vSRXO_Mask.a * vMRO_MASK.b); + + Out.vAlbedo = vDiffuse; + Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f); + Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1) + (In.vProjPos.w / g_fFar), // 뷰 스페이스 Z + (float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터 + 1.f); + Out.vColor = float4(0.f, 0.f, 0.f, 1.f); + Out.vSurface = float4(vMRO_MASK.r, Roughness, Occlusion, vSRXO_Mask.b); + // SRO + return Out; +} + +struct PS_IN_SHADOW +{ + float4 vPosition : SV_POSITION; + float4 vProjPos : TEXCOORD0; +}; + +struct PS_OUT_SHADOW +{ + float fShadowLightDepth : SV_TARGET0; +}; + +PS_OUT_SHADOW PS_MAIN_SHADOW(PS_IN_SHADOW In) +{ + PS_OUT_SHADOW Out = (PS_OUT_SHADOW) 0; + + Out.fShadowLightDepth = In.vProjPos.z; + + return Out; +} + +technique11 DefaultTechnique +{ + pass EYELASH_DAOTHV_ToSRO // 0 + { + SetRasterizerState(RS_Default); + SetDepthStencilState(DSS_Default, 0); + SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_EYELASH_DAOTHV_ToSRO(); + } + pass TEETH_SRXO_ToSRO // 1 + { + SetRasterizerState(RS_Default); + SetDepthStencilState(DSS_Default, 0); + SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_TEETH_SRXO_ToSRO(); + } + pass EYE_DN_ToSRO // 2 + { + SetRasterizerState(RS_Default); + SetDepthStencilState(DSS_Default, 0); + SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_EYE_DN_SRO(); + } + pass EYE_OCC // 3 + { + SetRasterizerState(RS_Default); + SetDepthStencilState(DSS_Default, 0); + SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_EYE_OCC(); + } + pass FACIAL_HAIR_DAOTHV_ToSRO // 4 + { + SetRasterizerState(RS_Default); + SetDepthStencilState(DSS_Default, 0); + SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_FACIAL_HAIR_DAOTHV_ToSRO(); + } + pass HEAD_HAIR_DAOTHV_ToSRO // 5 + { + SetRasterizerState(RS_Default); + SetDepthStencilState(DSS_Default, 0); + SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_HEAD_HAIR_DAOTHV_ToSRO(); + } + pass HEADwtHAND_DSRXON_ToSRO // 6 + { + SetRasterizerState(RS_Default); + SetDepthStencilState(DSS_Default, 0); + SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_HEADwtHAND_DSRXON_ToSRO(); + } + pass LOWER_DSRON_ToSRO // 7 + { + SetRasterizerState(RS_Default); + SetDepthStencilState(DSS_Default, 0); + SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_LOWER_DSRON_ToSRO(); + } + pass UPPER_DMRON_ToMRO // 8 + { + SetRasterizerState(RS_Default); + SetDepthStencilState(DSS_Default, 0); + SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_UPPER_DMRON_ToMRO(); + } + pass GLASSES_DMRON_ToMRO // 9 + { + SetRasterizerState(RS_Default); + SetDepthStencilState(DSS_Default, 0); + SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_GLASSES_DMRON_ToMRO(); + } + pass EmissiveMetalness_DENMRO_ToMRO // 10 + { + SetRasterizerState(RS_Default); + SetDepthStencilState(DSS_Default, 0); + SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_EmissiveMetalness_DENMRO_ToMRO(); + } + pass MI_ClothSim_DSEN_ToSRO // 11 + { + SetRasterizerState(RS_Default); + SetDepthStencilState(DSS_Default, 0); + SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_MI_ClothSim_DSEN_ToSRO(); + } + pass MI_Troll_Club_DAENMROSRXO_To // 12 + { + SetRasterizerState(RS_Default); + SetDepthStencilState(DSS_Default, 0); + SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN_MESH(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_Troll_Club_DAENMROSRXO_ToMROX(); + } +///// + pass TEETH_SRXO_ToSRO__OUTLINE_READ // 13 + { + SetRasterizerState(RS_Front); + SetDepthStencilState(DSS_Default_OutLine_SRead, 2); + SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN_OUTLINE_READ(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_MAIN_OUTLINE_READ(); + } + pass TEETH_SRXO_ToSRO__OUTLINE_WRITE // 14 + { + SetRasterizerState(RS_Default); + SetDepthStencilState(DSS_Default_OutLine_SWrite, 2); + SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_TEETH_SRXO_ToSRO(); + } + pass EYE_DN_ToSRO__OUTLINE_WRITE // 15 + { + SetRasterizerState(RS_Default); + SetDepthStencilState(DSS_Default_OutLine_SWrite, 2); + SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_EYE_DN_SRO(); + } + pass HEADwtHAND_DSRXON_ToSRO__OUTLINE_WRITE // 16 + { + SetRasterizerState(RS_Default); + SetDepthStencilState(DSS_Default_OutLine_SWrite, 2); + SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_HEADwtHAND_DSRXON_ToSRO(); + } + pass UPPER_DMRON_ToMRO__OUTLINE_WRITE // 17 + { + SetRasterizerState(RS_Default); + SetDepthStencilState(DSS_Default_OutLine_SWrite, 2); + SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_UPPER_DMRON_ToMRO(); + } + pass EmissiveMetalness_DENMRO_ToMRO__OUTLINE_WRITE // 18 + { + SetRasterizerState(RS_Default); + SetDepthStencilState(DSS_Default_OutLine_SWrite, 2); + SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_EmissiveMetalness_DENMRO_ToMRO(); + } + pass MI_ClothSim_DSEN_ToSRO__OUTLINE_WRITE // 19 + { + SetRasterizerState(RS_Default); + SetDepthStencilState(DSS_Default_OutLine_SWrite, 2); + SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_MI_ClothSim_DSEN_ToSRO(); + } +/////// +} diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl index a8640cda3..bc9f9e91d 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl @@ -46,9 +46,12 @@ struct ParticleValue bool isCompareStop; float fCollisionTime; - float fDropAttenuation; + float fDropAttenuation; float3 vVelocity; + float fAcceleration; + + bool isStop; }; @@ -77,6 +80,11 @@ cbuffer g_ConstantBuffer : register(b0) // b0 << 이 숫자와 컨스턴트 쉐 bool isNoWorld; bool isDetphCompareStop; bool isRandomAniIndex; + bool isMoveRight; + + bool isMoveUp; + bool isExcludePos; + bool isStopMove_For_Depth_Compare; bool isPadding2; float fTimeDelta; @@ -102,12 +110,9 @@ void CS_MAIN( { int iIndex = DispatchThreadID.x; // 배열 인덱스 - - Particle particle = g_ParticleBufferInput[iIndex]; ParticleValue particleValue = g_ParticleValueBufferInput[iIndex]; - float fGravity = particleValue.fGravity; float fOnlyDropY = 0.f; float fRatio = particle.vLifeTime.x / particle.vLifeTime.y; @@ -137,6 +142,7 @@ void CS_MAIN( particle.vLook = CurMat[2].xyzw; particle.vTranslation = CurMat[3].xyzw; } + } // 라이프타임 움직임 @@ -146,8 +152,9 @@ void CS_MAIN( /* 내 z가 가려지는 상황이었다면 연산하지않음*/ - if (particle.vLifeTime.x >= particle.vLifeTime.y) + if (particle.vLifeTime.x >= particle.vLifeTime.y || particleValue.isStop == true) { + particleValue.isCompareStop = false; particleValue.fCollisionTime = 0.f; @@ -158,16 +165,16 @@ void CS_MAIN( return ; } - //초기화 + + //초기화 particle.vRight = particleValue.vOriginRight; particle.vUp = particleValue.vOriginUp; particle.vLook = particleValue.vOriginLook; particle.vTranslation = particleValue.vOriginTranslation; - particle.vLifeTime.x = 0.f; - particleValue.vDelay.x = 0.f; + particleValue.isStop = false; if (isRandomAniIndex == false) particleValue.vAniIndex.x = 0.f; @@ -189,7 +196,7 @@ void CS_MAIN( fGravity *= (2.f * fRatio - 1.f) / particleValue.fDropAttenuation; } - particle.vTranslation.y -= 0.5f * particle.vLifeTime.x * fGravity; + particle.vTranslation.y -= 0.5f * fGravity * particle.vLifeTime.x; fOnlyDropY = particle.vTranslation.y; } @@ -205,9 +212,56 @@ void CS_MAIN( if (particleValue.fDrag < FLT_EPSILON5) fDrag = 1; + float4 vAcceleration = float4(0.f, 0.f, 0.f, 0.f); + + if (particleValue.fAcceleration > FLT_EPSILON5) + vAcceleration.xyz = normalize(particle.vLook.xyz) * fRatio * particleValue.fAcceleration; + float4 vVelocity = vector(normalize(particle.vLook.xyz) * particleValue.fSpeed, 0.f); - particle.vTranslation += vVelocity * fTimeDelta * fDrag; + particle.vTranslation += vVelocity * fTimeDelta * fDrag + vAcceleration; + } + + if (isMoveRight) + { + float fTime = (particle.vLifeTime.x / particle.vLifeTime.y); + + float fRatio = 1 - (1 - fTime * fTime); + + float fDrag = particleValue.fDrag; + + if (particleValue.fDrag < FLT_EPSILON5) + fDrag = 1; + + float4 vAcceleration = float4(0.f, 0.f, 0.f, 0.f); + + if (particleValue.fAcceleration > FLT_EPSILON5) + vAcceleration.xyz = normalize(particle.vRight.xyz) * fRatio * particleValue.fAcceleration; + + float4 vVelocity = vector(normalize(particle.vRight.xyz) * particleValue.fSpeed, 0.f); + + particle.vTranslation += vVelocity * fTimeDelta * fDrag + vAcceleration; + } + + if (isMoveUp) + { + float fTime = (particle.vLifeTime.x / particle.vLifeTime.y); + + float fRatio = 1 - (1 - fTime * fTime); + + float fDrag = particleValue.fDrag; + + if (particleValue.fDrag < FLT_EPSILON5) + fDrag = 1; + + float4 vAcceleration = float4(0.f, 0.f, 0.f, 0.f); + + if (particleValue.fAcceleration > FLT_EPSILON5) + vAcceleration.xyz = normalize(particle.vUp.xyz) * fRatio * particleValue.fAcceleration; + + float4 vVelocity = vector(normalize(particle.vUp.xyz) * particleValue.fSpeed, 0.f); + + particle.vTranslation += vVelocity * fTimeDelta * fDrag + vAcceleration; } if (isPivotMove) @@ -216,17 +270,34 @@ void CS_MAIN( float3 vDir = normalize(particleValue.vPivot - particleValue.vOriginTranslation.xyz); + if (isExcludePos == true) + { + vDir = normalize(particleValue.vPivot); + } + float fDrag = particleValue.fDrag; - if (fSizeLerpOption != 0.f) - fDrag = SelectLerpUV(float2(particleValue.fSizeDrag, 0.f), fTime, fMoveLerpOption).x; + if (fMoveLerpOption != 0.f) + fDrag = SelectLerpUV(float2(particleValue.fDrag, 0.f), fTime, fMoveLerpOption).x; if (particleValue.fDrag < FLT_EPSILON5) fDrag = 1; float4 vVelocity = vector(vDir * particleValue.fSpeed , 0.f); + + float4 vAcceleration = float4(0.f,0.f,0.f,0.f); + + if (particleValue.fAcceleration > FLT_EPSILON5) + { + float fAcceleration = particleValue.fAcceleration; + + if (fMoveLerpOption != 0.f) + fAcceleration = SelectLerpUV(float2(fAcceleration, 0.f), fTime, fMoveLerpOption).x; + + vAcceleration.xyz = vDir * fAcceleration; + } - particle.vTranslation += vVelocity * fTimeDelta * fDrag; + particle.vTranslation += vVelocity * fTimeDelta * fDrag + vAcceleration; } @@ -238,10 +309,15 @@ void CS_MAIN( if (isTurn == true) { + float fRotationSpeed = 1.f; + + if (particleValue.fRotaionSpeed > FLT_EPSILON5) + fRotationSpeed = particleValue.fRotaionSpeed; + /* ROTATE */ - float4x4 RotateXMat = RotateX(particleValue.vDeltaAngle.x * fTimeDelta); - float4x4 RotateYMat = RotateY(particleValue.vDeltaAngle.y * fTimeDelta); - float4x4 RotateZMat = RotateZ(particleValue.vDeltaAngle.z * fTimeDelta); + float4x4 RotateXMat = RotateX(particleValue.vDeltaAngle.x * fTimeDelta * fRotationSpeed); + float4x4 RotateYMat = RotateY(particleValue.vDeltaAngle.y * fTimeDelta * fRotationSpeed); + float4x4 RotateZMat = RotateZ(particleValue.vDeltaAngle.z * fTimeDelta * fRotationSpeed); float4x4 CombinedRotMat = mul(RotateZMat, mul(RotateYMat, RotateXMat)); @@ -260,9 +336,14 @@ void CS_MAIN( if (isAxisTurn) { - float4x4 RotateAxisRightMat = RotateAxis(particle.vRight, particleValue.vDeltaAxisAngle.x * fTimeDelta); - float4x4 RotateAxisUpMat = RotateAxis(particle.vUp, particleValue.vDeltaAxisAngle.y * fTimeDelta); - float4x4 RotateAxisLookMat = RotateAxis(particle.vLook, particleValue.vDeltaAxisAngle.z * fTimeDelta); + float fRotationSpeed = 1.f; + + if (particleValue.fRotaionSpeed > FLT_EPSILON5) + fRotationSpeed = particleValue.fRotaionSpeed; + + float4x4 RotateAxisRightMat = RotateAxis(particle.vRight, particleValue.vDeltaAxisAngle.x * fRotationSpeed * fTimeDelta); + float4x4 RotateAxisUpMat = RotateAxis(particle.vUp, particleValue.vDeltaAxisAngle.y * fRotationSpeed * fTimeDelta); + float4x4 RotateAxisLookMat = RotateAxis(particle.vLook, particleValue.vDeltaAxisAngle.z * fRotationSpeed * fTimeDelta); float4x4 CombinedRotMat = mul(RotateAxisLookMat, mul(RotateAxisUpMat, RotateAxisRightMat)); @@ -306,22 +387,29 @@ void CS_MAIN( float fOldViewZ = vDepthDesc.y * fFar; - if (vProjPos.w >= fOldViewZ && particle.vLifeTime.x >= 0.3f) + if (vProjPos.w >= fOldViewZ && particle.vLifeTime.x >= 0.5f) { if (particleValue.isCompareStop == false) { particleValue.isCompareStop = true; // 내가 지면에 사라지는 순간 particleValue.fCollisionTime = particle.vLifeTime.x; + if (isStopMove_For_Depth_Compare == true) + { + particleValue.isStop = true; + particle.vTranslation.y += 0.2f; + + } + + } } - if (particleValue.isCompareStop == true) // 지면에 부딪혔을 때 + if (particleValue.isCompareStop == true && isStopMove_For_Depth_Compare == false) // 지면에 부딪혔을 때 { particle.vTranslation.y = fOnlyDropY; // 지면에 부딪혓을때 이제 y연산은 오직 drop으로만 수행함 } - } /*가속력*/ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl index 5465e90a7..d70673f30 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl @@ -4,6 +4,8 @@ matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix; Texture2D g_DepthTexture; +float3 g_CamaraPosition; + int g_iImageCountX; int g_iImageCountY; @@ -56,11 +58,16 @@ Texture2D g_Texture2; Texture2D g_Texture3; Texture2D g_Texture4; Texture2D g_Texture5; +Texture2D g_Texture6; Texture2D g_DiffuseTexture; Texture2D g_MaskingTexture; int g_iHover; +int g_iStep1 = 0; +int g_iStep2 = 0; +int g_iStep3 = 0; + struct VS_IN { float3 vPosition : POSITION; @@ -1483,6 +1490,156 @@ PS_OUT PS_Boss_HpBer(PS_IN In) return Out; } +struct VS_IN3D +{ + float3 vPosition : POSITION; + float2 vTexcoord : TEXCOORD0; +}; + +struct VS_OUT3D +{ + float4 vPosition : SV_Position; + float2 vTexcoord : TEXCOORD0; +}; + +VS_OUT3D VS_MAIN3D(VS_IN3D In) +{ + VS_OUT3D Out; + + matrix matViewProj = mul(g_ViewMatrix, g_ProjMatrix); + + float2 Offset = In.vTexcoord - 0.5f; + float3 worldCenter = float3(g_WorldMatrix._41, g_WorldMatrix._42, g_WorldMatrix._43); + + + float3 vLook = normalize(g_CamaraPosition - worldCenter); + + vLook.y = 0.f; + vLook = normalize(vLook); + + float3 upDir = float3(0.f, 1.f, 0.f); + + float3 rightDir = normalize(cross(vLook, upDir)); + + float3 dirRight = rightDir * g_fCurrent_Size.x * Offset.x; + float3 dirUp = upDir * g_fCurrent_Size.y * Offset.y; + + float3 vertexPos = worldCenter + dirRight + dirUp; + + Out.vPosition = mul(float4(vertexPos, 1.f), matViewProj); + Out.vTexcoord = 1.f - In.vTexcoord; + return Out; +} + + +PS_OUT PS_Enemy_Detection(PS_IN In) +{ + PS_OUT Out; + + float4 Color = float4(1.f, 1.f, 1.f, 0.f * g_fAlpha); + + if (g_iStep1 != 0) + { + float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size; + float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size; + float2 Imagelocal = (In.vTexcoord - Imagetexpos1) / Imagetexsize1; + bool inside1 = all(Imagelocal >= 0.0f && Imagelocal <= 1.0f); + if (inside1) + { + float4 tex3 = g_Texture1.Sample(ClampSampler, Imagelocal); + + float2 Imagetexpos2 = g_fImageSipos1.xy / g_fCurrent_Size; + float2 Imagetexsize2 = g_fImageSipos1.zw / g_fCurrent_Size; + float2 Imagelocal2 = (In.vTexcoord - Imagetexpos2) / Imagetexsize2; + + Color = lerp(Color, tex3, tex3.a); + + float4 tex4 = g_Texture2.Sample(ClampSampler, Imagelocal2); + float4 tex5 = g_Texture3.Sample(ClampSampler, Imagelocal2); + + float4 Color1 = tex4; + + Color1 = lerp(tex4, tex5, tex5.a); + + Imagelocal2.y = 1.f - Imagelocal2.y; + + if (Imagelocal2.y >= g_fTime) + { + Color1.a = 0.f; + } + + Color = lerp(Color, Color1, Color1.a); + + Color.a *= g_fAlpha; + Out.vColor = Color; + + return Out; + } + } + if (g_iStep2 != 0) + { + float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size; + float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size; + float2 Imagelocal = (In.vTexcoord - Imagetexpos1) / Imagetexsize1; + bool inside1 = all(Imagelocal >= 0.0f && Imagelocal <= 1.0f); + if (inside1) + { + float4 tex3 = g_Texture1.Sample(ClampSampler, Imagelocal); + + float2 Imagetexpos2 = g_fImageSipos1.xy / g_fCurrent_Size; + float2 Imagetexsize2 = g_fImageSipos1.zw / g_fCurrent_Size; + float2 Imagelocal2 = (In.vTexcoord - Imagetexpos2) / Imagetexsize2; + + float4 tex4 = g_Texture2.Sample(ClampSampler, Imagelocal2); + float4 tex6 = g_Texture4.Sample(ClampSampler, Imagelocal2); + Color = lerp(Color, tex3, tex3.a); + float4 Color1 = tex4; + Color1 = lerp(tex4, tex6, tex6); + Color1.rgb *= float3(1.f, 1.f, 0.f); + Imagelocal2.y = 1.f - Imagelocal2.y; + if (Imagelocal2.y >= g_fTime) + { + Color1.a = 0.f; + } + Color = lerp(Color, Color1, Color1.a); + + Color.a *= g_fAlpha; + + Out.vColor = Color; + + return Out; + } + } + if (g_iStep3 != 0) + { + float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord); + Color = tex1; + Color.rgb *= float3(1.f, 0.f, 0.f); + + float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size; + float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size; + float2 Imagelocal = (In.vTexcoord - Imagetexpos1) / Imagetexsize1; + bool inside1 = all(Imagelocal >= 0.0f && Imagelocal <= 1.0f); + if (inside1) + { + float4 tex7 = g_Texture5.Sample(ClampSampler, Imagelocal); + + Color = lerp(Color, tex7, tex7.a); + + Color.a *= g_fAlpha; + Out.vColor = Color; + + return Out; + } + + } + + Color.a *= g_fAlpha; + Out.vColor = Color; + + return Out; +} + technique11 PosTexTechnique11 { pass Default @@ -1793,4 +1950,14 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Boss_HpBer(); } + pass PS_Enemy_Detection + { + SetRasterizerState(RS_Nocull); + SetDepthStencilState(DSS_Default, 0); + SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN3D(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_Enemy_Detection(); + } + } diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UI_Instance.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UI_Instance.hlsl index 832d2e2a0..5eda5ab45 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UI_Instance.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UI_Instance.hlsl @@ -412,6 +412,30 @@ PS_OUT PS_Spell_Slot(PS_IN In) return Out; } +PS_OUT PS_Spell_Lock(PS_IN In) +{ + PS_OUT Out; + + float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; + + float4 color = g_Texture.Sample(ClampSampler, In.vTexcoord); + + if(In.bSpell == 0) + { + if (color.a <= 0.4f) + discard; + } + + else + discard; + + color.a *= Alpha; + + Out.vColor = color; + + return Out; +} + technique11 PosTexTechnique11 { pass Default @@ -534,4 +558,15 @@ technique11 PosTexTechnique11 GeometryShader = NULL; PixelShader = compile ps_5_0 PS_Spell_Slot(); } + + pass Spell_Lock + { + SetRasterizerState(RS_Default); + SetDepthStencilState(DSS_Default, 0); + SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + + VertexShader = compile vs_5_0 VS_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_Spell_Lock(); + } } diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxAnimMesh.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxAnimMesh.hlsl index 5900f9e22..9f348d1d2 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxAnimMesh.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxAnimMesh.hlsl @@ -24,19 +24,38 @@ float g_fDisolveEdgeWidth; float4 g_vDisolveEdgeColor; float4 g_vCamPosition; -Texture2D g_DiffuseTexture; -Texture2D g_NormalTexture; Texture2D g_DAOTexture; Texture2D g_THVTexture; Texture2D g_SurfaceParamsTexture; -Texture2D g_TransmissionTexture; -Texture2D g_EmissiveTexture; -Texture2D g_AmbientTexture; -Texture2D g_AmbientOcclusionTexture; -Texture2D g_UnknownTexture; Texture2D g_DeadDisolveTexture; Texture2D g_DeadDisolveBurnTexture; +Texture2D g_DiffuseTexture; +Texture2D g_SpecularTexture; +Texture2D g_AmbientTexture; +Texture2D g_EmissiveTexture; +Texture2D g_HeightTexture; +Texture2D g_NormalTexture; +Texture2D g_ShininessTexture; +Texture2D g_OpacityTexture; +Texture2D g_DisplacementTexture; +Texture2D g_LightMapTexture; +Texture2D g_ReflectionTexture; +Texture2D g_BaseColorTexture; +Texture2D g_NormalCameraTexture; +Texture2D g_EmissionColorTexture; +Texture2D g_MetalnessTexture; +Texture2D g_Diffuse_RoughnessTexture; +Texture2D g_AmbientOcclusionTexture; +Texture2D g_UnknownTexture; +Texture2D g_SheenTexture; +Texture2D g_ClearcoadTexture; +Texture2D g_TransmissionTexture; +Texture2D g_Maya_BaseTexture; +Texture2D g_Maya_SpecularTexture; +Texture2D g_Maya_Specular_ColorTexture; +Texture2D g_Maya_Specular_RoughnessTexture; +Texture2D g_AnisotropyTexture; int g_iBinded_Texture[27]; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxMesh.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxMesh.hlsl index e1ae3b5f2..bae2d8601 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxMesh.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxMesh.hlsl @@ -29,19 +29,39 @@ float2 g_vClipBoxLTPos; float g_fDisolveAmount; float g_fDisolveEdgeWidth; -Texture2D g_DiffuseTexture; -Texture2D g_NormalTexture; Texture2D g_DAOTexture; Texture2D g_THVTexture; Texture2D g_SurfaceParamsTexture; -Texture2D g_TransmissionTexture; -Texture2D g_EmissiveTexture; -Texture2D g_AmbientTexture; -Texture2D g_AmbientOcclusionTexture; -Texture2D g_UnknownTexture; Texture2D g_NoiseTexture; Texture2D g_CausticsTexture; +Texture2D g_DiffuseTexture; +Texture2D g_SpecularTexture; +Texture2D g_AmbientTexture; +Texture2D g_EmissiveTexture; +Texture2D g_HeightTexture; +Texture2D g_NormalTexture; +Texture2D g_ShininessTexture; +Texture2D g_OpacityTexture; +Texture2D g_DisplacementTexture; +Texture2D g_LightMapTexture; +Texture2D g_ReflectionTexture; +Texture2D g_BaseColorTexture; +Texture2D g_NormalCameraTexture; +Texture2D g_EmissionColorTexture; +Texture2D g_MetalnessTexture; +Texture2D g_Diffuse_RoughnessTexture; +Texture2D g_AmbientOcclusionTexture; +Texture2D g_UnknownTexture; +Texture2D g_SheenTexture; +Texture2D g_ClearcoadTexture; +Texture2D g_TransmissionTexture; +Texture2D g_Maya_BaseTexture; +Texture2D g_Maya_SpecularTexture; +Texture2D g_Maya_Specular_ColorTexture; +Texture2D g_Maya_Specular_RoughnessTexture; +Texture2D g_AnisotropyTexture; + int g_iBinded_Texture[AI_TEXTURE_TYPE_MAX]; Texture2D g_MaskingTexture; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl index fb1e911c9..867a0672e 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl @@ -15,29 +15,33 @@ struct ParticleValue float2 vDiffuseUVMoveTime; float2 vDistortionUVMoveTime; float2 vNoiseUVMoveTime; - float2 vAniTime; float2 vDissolveUVMoveTime; + float2 vAniTime; + float2 vAniIndex; - float fGravity; + float fGravity; float3 vSinAmount; float3 vDeltaAngle; float3 vDeltaAxisAngle; - float fDrag; + float fDrag; float3 vPivot; - float fSizeDrag; + float fSizeDrag; float3 vDeltaSize; float2 vDelay; - bool isCompareStop; + + bool isCompareStop; float fCollisionTime; float fDropAttenuation; float3 vVelocity; - + float fAcceleration; + + bool isStop; }; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Diffuse/T_FX_Tilable_Wood_D.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Diffuse/T_FX_Tilable_Wood_D.png new file mode 100644 index 000000000..98b292a8b Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Diffuse/T_FX_Tilable_Wood_D.png differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Diffuse/VFX_T_Feathers_D.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Diffuse/VFX_T_Feathers_D.png new file mode 100644 index 000000000..82549b2e5 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Diffuse/VFX_T_Feathers_D.png differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Diffuse/VFX_T_FlyingPaper_D.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Diffuse/VFX_T_FlyingPaper_D.png new file mode 100644 index 000000000..db7254057 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Diffuse/VFX_T_FlyingPaper_D.png differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Enemy/UI_T_HUD_Ring_Aggroed_Burst.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Enemy/UI_T_HUD_Ring_Aggroed_Burst.png new file mode 100644 index 000000000..196c1f0d8 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Enemy/UI_T_HUD_Ring_Aggroed_Burst.png differ diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj b/Jusin154_Team3D/Editor/Default/Editor.vcxproj index 8071fbad5..b77eaaaf2 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj @@ -177,6 +177,7 @@ call Update_Shaders.bat + @@ -190,6 +191,7 @@ call Update_Shaders.bat + @@ -379,6 +381,7 @@ call Update_Shaders.bat + @@ -392,6 +395,7 @@ call Update_Shaders.bat + @@ -585,6 +589,10 @@ call Update_Shaders.bat + + Effect + 5.0 + Effect 5.0 diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters index 66bcff3a8..9daa90333 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters @@ -562,6 +562,12 @@ {49575102-9b08-494e-bf3f-bdc98774913e} + + {d276d751-77aa-423e-9499-c63875e36266} + + + {81c6b163-6c8b-47ac-a4b6-e86088ce709f} + @@ -1122,6 +1128,12 @@ 50.UI\GamePlay_Canvas\Enemy_Panel\Boss_HpBar + + 02.GameObjects\Layer_Effect\Effect\State_Effect + + + 50.UI\GamePlay_Canvas\Enemy_Panel\Enemy_Detection + @@ -1684,6 +1696,12 @@ 50.UI\GamePlay_Canvas\Enemy_Panel\Boss_HpBar + + 02.GameObjects\Layer_Effect\Effect\State_Effect + + + 50.UI\GamePlay_Canvas\Enemy_Panel\Enemy_Detection + @@ -1721,5 +1739,8 @@ 99.Define\SHADER + + 99.Define\SHADER + \ No newline at end of file diff --git a/Jusin154_Team3D/Editor/Private/Broom.cpp b/Jusin154_Team3D/Editor/Private/Broom.cpp index cfb42833a..c0caa9293 100644 --- a/Jusin154_Team3D/Editor/Private/Broom.cpp +++ b/Jusin154_Team3D/Editor/Private/Broom.cpp @@ -27,7 +27,7 @@ HRESULT CBroom::Initialize(void* pArg) if (FAILED(Ready_Components())) return E_FAIL; - m_pModelCom->Set_AnimationIndex(5); + m_pModelCom->Set_AnimationIndex(11,true); return S_OK; } diff --git a/Jusin154_Team3D/Editor/Private/CamPosition_Shoulder.cpp b/Jusin154_Team3D/Editor/Private/CamPosition_Shoulder.cpp index 107564445..e7837ed82 100644 --- a/Jusin154_Team3D/Editor/Private/CamPosition_Shoulder.cpp +++ b/Jusin154_Team3D/Editor/Private/CamPosition_Shoulder.cpp @@ -170,8 +170,8 @@ HRESULT CCamPosition_Shoulder::Ready_SubParts() CameraDesc.bEnableFollowLerp = true; CameraDesc.bEnableLookLerp = true; CameraDesc.vTransitionTime = { 0.f, 1.f }; - CameraDesc.vFollowLerpTime = { 0.f, BASIC_LERP_TIMER }; - CameraDesc.vLookLerpTime = { 0.f, BASIC_LERP_TIMER }; + CameraDesc.vFollowLerpTime = { 0.f, TIMER_SHORT_LERP }; + CameraDesc.vLookLerpTime = { 0.f, TIMER_SHORT_LERP }; if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_CAMERA, &CameraDesc, nullptr, &m_pBinded_Camera))) { diff --git a/Jusin154_Team3D/Editor/Private/EffectPool.cpp b/Jusin154_Team3D/Editor/Private/EffectPool.cpp index 6b5b2b683..beb0d7c67 100644 --- a/Jusin154_Team3D/Editor/Private/EffectPool.cpp +++ b/Jusin154_Team3D/Editor/Private/EffectPool.cpp @@ -19,6 +19,7 @@ #include "Troll_Rush_Hit.h" #include "Troll_Nomal_Smoke.h" #include "TrollSwing.h" +#include "StunEffect.h" CEffectPool::CEffectPool(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) : CGameObject(pDevice, pContext) @@ -44,11 +45,38 @@ HRESULT CEffectPool::Initialize(void* pArg) if (FAILED(Ready_Components())) return E_FAIL; - //if (FAILED(Ready_Effect())) - // return E_FAIL; +#ifdef gimch + m_isActiveEffectCreate = false; + m_isActiveMonsterEffectCreate = false; +#endif // gimch +#ifdef Bin + m_isActiveEffectCreate = false; + m_isActiveMonsterEffectCreate = false; +#endif // +#ifdef 진우 + m_isActiveEffectCreate = true; + m_isActiveMonsterEffectCreate = false; +#endif // +#ifdef 기무리 + m_isActiveEffectCreate = false; + m_isActiveMonsterEffectCreate = false; +#endif // +#ifdef 인혁 + m_isActiveEffectCreate = false; + m_isActiveMonsterEffectCreate = false; +#endif // - //if (FAILED(Ready_MonsterEffect())) - // return E_FAIL; + if (m_isActiveEffectCreate) + { + if (FAILED(Ready_Effect())) + return E_FAIL; + } + + if (m_isActiveMonsterEffectCreate) + { + if (FAILED(Ready_MonsterEffect())) + return E_FAIL; + } return S_OK; } @@ -253,6 +281,16 @@ HRESULT CEffectPool::Ready_MonsterEffect() return pEffect; } ))) return E_FAIL; + + if (FAILED(Create_Effect(SKILL_TYPE::STUN, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + + CStunEffect* pEffect = nullptr; + + pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr); + + return pEffect; } + ))) return E_FAIL; + return S_OK; } @@ -377,6 +415,7 @@ void CEffectPool::Free() void CEffectPool::Describe_Entity() { + if(GUI::Button("Reset Pool")) { Reset_Pool(); diff --git a/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp b/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp index 3fd4ebcfc..a71a30515 100644 --- a/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp +++ b/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp @@ -108,12 +108,6 @@ void CEffect_Editor::Update(_float fTimeDelta) /* 이펙트 컨테이너 업데이트 */ //Update_Event(fTimeDelta); - - - - - - } void CEffect_Editor::Late_Update(_float fTimeDelta) diff --git a/Jusin154_Team3D/Editor/Private/Enemy_Detection.cpp b/Jusin154_Team3D/Editor/Private/Enemy_Detection.cpp new file mode 100644 index 000000000..3d4cd7419 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/Enemy_Detection.cpp @@ -0,0 +1,377 @@ +#include "pch.h" +#include "Enemy_Detection.h" +#include "GameInstance.h" + +CEnemy_Detection::CEnemy_Detection(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CElementObject(pDevice, pContext) +{ +} + +CEnemy_Detection::CEnemy_Detection(const CEnemy_Detection& Prototype) + : CElementObject(Prototype) +{ +} + +HRESULT CEnemy_Detection::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CEnemy_Detection::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 0.f; + Desc.fY = 500.f; + Desc.fSizeX = 150.f; + Desc.fSizeY = 150.f; + + m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) }; + + if (FAILED(__super::Initialize(&Desc))) + { + return E_FAIL; + } + if (FAILED(Ready_Components(pArg))) + { + return E_FAIL; + } + + m_fAlpha = 1.f; + m_bStep1 = true; + m_vImageposi = _float4(37.5f, 37.5f, 75.f, 75.f); + return S_OK; +} + +void CEnemy_Detection::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CEnemy_Detection::Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + + if (m_bFadeIn == true) + { + if (m_fAlpha <= 1.f) + m_fAlpha += fTimeDelta * m_fAlphaTime; + + if (m_fAlpha >= 1.f) + { + m_bFadeIn = false; + m_fAlpha = 1.f; + } + } + + if (m_bFadeOut == true) + { + if (m_fAlpha >= 0.f) + m_fAlpha -= fTimeDelta; + + if (m_fAlpha <= 0.f) + { + m_bFadeOut = false; + m_fAlpha = 0.f; + } + } + + if (m_pGameInstance->Key_Pressing(DIK_Q)) + { + m_fTime += fTimeDelta * m_fTimeMult; + if (m_fTime >= 2.f) + { + if (m_bStep1 == true) + { + m_bStep1 = false; + m_bStep2 = true; + m_bStep3 = false; + m_fTime = 0.f; + } + else if (m_bStep2 == true) + { + m_bStep1 = false; + m_bStep2 = false; + m_bStep3 = true; + m_fTime = 0.f; + } + else if (m_bStep3 == true) + { + m_bStep1 = false; + m_bStep2 = false; + m_bStep3 = true; + m_fAlpha -= fTimeDelta * m_fAlphaTime; + } + } + } + + else if (m_pGameInstance->Key_Up(DIK_Q)) + { + m_fTime = 0.f; + m_bStep1 = true; + m_bStep2 = false; + m_bStep3 = false; + m_bHover = false; + m_fAlpha = 1.f; + SizeUpX(m_fOrigin_Size.x); + SizeUpY(m_fOrigin_Size.y); + m_vImageposi.z = 75.f; + m_vImageposi.w = 75.f; + } + + if (m_bStep3 == true) + { + if (m_bHover == false) + { + SizeUpX(m_fSizeX + 10.f); + SizeUpY(m_fSizeY + 10.f); + m_vImageposi.z += 10.f; + m_vImageposi.w += 10.f; + m_bHover = true; + } + } + + if (m_fSizeX != m_fOrigin_Size.x) + { + SizeUpdate(-fTimeDelta * 10.f); + m_vImageposi.z -= fTimeDelta; + m_vImageposi.w -= fTimeDelta; + } + + if (m_fAlpha <= 0.f) + m_fAlpha = 0.f; + + __super::Update(fTimeDelta); + +} + +void CEnemy_Detection::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + } + __super::Late_Update(fTimeDelta); +} + +HRESULT CEnemy_Detection::Render() +{ + if (FAILED(Bind_ShaderResources())) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ENEMY_DETECTION)))) + { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) + { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) + { + return E_FAIL; + } + + return S_OK; +} + +_vector CEnemy_Detection::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CEnemy_Detection::Bind_ShaderResources() +{ + if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom1->Bind_ShaderResource(m_pShaderCom, "g_Texture1", 0))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom2->Bind_ShaderResource(m_pShaderCom, "g_Texture2", 0))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom3->Bind_ShaderResource(m_pShaderCom, "g_Texture3", 0))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom4->Bind_ShaderResource(m_pShaderCom, "g_Texture4", 0))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom5->Bind_ShaderResource(m_pShaderCom, "g_Texture5", 0))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_iSpellType", &m_iSpellType, sizeof(_int)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_iStep1", &m_bStep1, sizeof(_bool)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_iStep2", &m_bStep2, sizeof(_bool)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_iStep3", &m_bStep3, sizeof(_bool)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageSipos1", &m_vImageposi, sizeof(_float4)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_vScale, sizeof(_float2)))) + { + return E_FAIL; + } + return S_OK; +} + +HRESULT CEnemy_Detection::Ready_Components(void* pArg) +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_HUD_Ring_Aggroed_Burst"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_HUD_NPC_WhiteFrameBlip"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_HUD_NPC_Alert"), reinterpret_cast(&m_pDiffuse_TextureCom2), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_HUD_Ring_Alert_Fill"), reinterpret_cast(&m_pDiffuse_TextureCom3), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_HUD_Ring_Alert_Yellow"), reinterpret_cast(&m_pDiffuse_TextureCom4), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_HUD_Ring_Aggro_Blip"), reinterpret_cast(&m_pDiffuse_TextureCom5), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + + return S_OK; +} + +void CEnemy_Detection::SizeUpdate(_float fSizeX) +{ + m_fSizeX += fSizeX; + m_fSizeY += fSizeX; + m_vImageposi.z += fSizeX; + m_vImageposi.w += fSizeX; + if (m_fSizeX - m_fOrigin_Size.x <= fSizeX) + { + m_fSizeX = m_fOrigin_Size.x; + m_fSizeY = m_fOrigin_Size.y; + m_vImageposi.z = 75.f; + m_vImageposi.w = 75.f; + } +} + +CEnemy_Detection* CEnemy_Detection::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CEnemy_Detection* pInstance = new CEnemy_Detection(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CEnemy_Detection"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CEnemy_Detection::Clone(void* pArg, CGameObject* pOwner) +{ + CEnemy_Detection* pInstance = new CEnemy_Detection(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CEnemy_Detection"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CEnemy_Detection::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pDiffuse_TextureCom1); + SAFE_RELEASE(m_pDiffuse_TextureCom2); + SAFE_RELEASE(m_pDiffuse_TextureCom3); + SAFE_RELEASE(m_pDiffuse_TextureCom4); + SAFE_RELEASE(m_pDiffuse_TextureCom5); + SAFE_RELEASE(m_pVIBufferCom); + +} + +#ifdef _DEBUG +void CEnemy_Detection::Describe_Entity() +{ +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Editor/Private/Enemy_Panel.cpp b/Jusin154_Team3D/Editor/Private/Enemy_Panel.cpp index 1691ae22c..dbb499243 100644 --- a/Jusin154_Team3D/Editor/Private/Enemy_Panel.cpp +++ b/Jusin154_Team3D/Editor/Private/Enemy_Panel.cpp @@ -4,6 +4,7 @@ #include "Enemy_HpBar.h" #include "Enemy_Info.h" #include "Boss_HpBer.h" +#include "Enemy_Detection.h" CEnemy_Panel::CEnemy_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) :CPanelObject(pDevice, pContext) @@ -127,6 +128,12 @@ HRESULT CEnemy_Panel::Ready_Element(void* pArg) } Add_Element(TEXT("Boss_HpBer"), m_pBoss_HpBar); + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pEnemy_Detection)))) + { + return E_FAIL; + } + Add_Element(TEXT("Enemy_Detection"), m_pEnemy_Detection); + return S_OK; } diff --git a/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp b/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp index 9fd2eb7b0..21bb176e2 100644 --- a/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp +++ b/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp @@ -53,6 +53,8 @@ HRESULT CLevel_EffectViewer::Initialize() Desc.iAlphaSizeX = 2048; Desc.iAlphaSizeY = 2048; Desc.vPosition = _float3(-194, 18.5f, -153.f); + Desc.strAlphaMapTag = "Hogsmeade_AlphaMap.bin"; + Desc.strHeightMapTag = "Hogsmeade_HeightMap.bin"; Desc.strBufferTag = TEXT("Prototype_Component_VIBuffer_Terrain_Hogsmeade"); if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Terrain"), &Desc))) diff --git a/Jusin154_Team3D/Editor/Private/Level_Loading.cpp b/Jusin154_Team3D/Editor/Private/Level_Loading.cpp index 90ac75136..e3a80969f 100644 --- a/Jusin154_Team3D/Editor/Private/Level_Loading.cpp +++ b/Jusin154_Team3D/Editor/Private/Level_Loading.cpp @@ -41,16 +41,22 @@ HRESULT CLevel_Loading::Initialize(LEVEL eNextLevelID) void CLevel_Loading::Update(_float fTimeDelta) { - if (true == m_pLoader->isFinished() && - m_pGameInstance->Key_Down(DIK_F1)) + if (true == m_pLoader->isFinished()) { - if (m_eNextLevelID != LEVEL::LOGO) + if(m_eNextLevelID == LEVEL::UI) m_bNextLevel = true; - else + + if (m_pGameInstance->Key_Down(DIK_F1)) { - static_cast(m_pIntro_Image)->Set_Hover(true); - m_bDelay = true; + if (m_eNextLevelID != LEVEL::LOGO) + m_bNextLevel = true; + else + { + static_cast(m_pIntro_Image)->Set_Hover(true); + m_bDelay = true; + } } + } diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp index 795da22f1..e9e7f6fdc 100644 --- a/Jusin154_Team3D/Editor/Private/Loader.cpp +++ b/Jusin154_Team3D/Editor/Private/Loader.cpp @@ -55,6 +55,7 @@ #include "Enemy_HpBar.h" #include "Enemy_Info.h" #include "Boss_HpBer.h" +#include "Enemy_Detection.h" #include "Mission_Panel.h" #include "MissionBanner_Border.h" @@ -155,6 +156,7 @@ #include "Goblin_Dagger.h" #include "Goblin_BattleAxe.h" #include "Goblin_Spector.h" +#include "StunEffect.h" #pragma endregion #pragma region PHYSX_HEADER @@ -557,6 +559,22 @@ HRESULT CLoader::Loading_For_UI() _wstring wstrFilePath = CMyTools::ToWstring(strFilePath); + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), wstrFileName, + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) { + return E_FAIL; + } + + return S_OK; + + }); + + Asset_FileLoad("../Bin/Resources/Textures/Enemy", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath) + { + + _string strFilePath = pFilePath; + _wstring wstrFilePath = CMyTools::ToWstring(strFilePath); + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), wstrFileName, CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) { return E_FAIL; @@ -920,6 +938,10 @@ HRESULT CLoader::Loading_For_UI() { return E_FAIL; } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CEnemy_Detection::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CLoading_Panel::Create(m_pDevice, m_pContext)))) { @@ -1253,6 +1275,16 @@ HRESULT CLoader::Loading_For_Effect() return E_FAIL; + Asset_FileLoad("../Bin/Resources/Models/Effect/Box", L"Prototype_Instance_Model_", [&](_wstring wstrFileName, const _char* pFilePath) { + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::EFFECT), wstrFileName, + CInstance_Model::Create(m_pDevice, m_pContext, pFilePath, MODEL::NONANIM, XMMatrixScaling(0.1f, 0.1f, 0.1f) * XMMatrixIdentity(), 0)))) + return E_FAIL; + + return S_OK; + + }); + Asset_FileLoad("../Bin/Resources/Models/Effect/Rock", L"Prototype_Instance_Model_", [&](_wstring wstrFileName, const _char* pFilePath) { if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::EFFECT), wstrFileName, @@ -1453,6 +1485,9 @@ HRESULT CLoader::Loading_For_Effect() if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CTroll_Weapon::Create(m_pDevice, m_pContext)))) return E_FAIL; + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CStunEffect::Create(m_pDevice, m_pContext)))) + return E_FAIL; + /* For.Prototype_GameObject_DummySkyBox */ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CDummySkyBox::Create(m_pDevice, m_pContext)))) @@ -1729,7 +1764,7 @@ HRESULT CLoader::Loading_For_PhysXLevel() _wstring strFileName = L"Prototype_GameObject_" + file.path().stem().wstring(); - CModel* pModel = CModel::Create(m_pDevice, m_pContext, MODEL::ENVIROMENT, szFilePath); + CModel* pModel = CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, szFilePath); /*For Prototype_Component_Model_*/ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, strFileName, pModel))) { @@ -1824,7 +1859,7 @@ HRESULT CLoader::Loading_For_Bloom() #pragma region HAIR futures.emplace_back(Deferred_ModelLoad( - MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/SubTroll/troll.fbx", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixIdentity(), + MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/SubTroll/troll.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixIdentity(), TEXT("Prototype_Component_SubTroll_Model") )); @@ -2184,8 +2219,8 @@ HRESULT CLoader::Loading_For_ObjectViewer() TEXT("Prototype_Component_TombProtector_Model") )); futures.emplace_back(Deferred_ModelLoad( - MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/SubTroll/Troll.fbx", XMMatrixIdentity(), - TEXT("Prototype_Component_Troll_Model") + MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/SubTroll/troll.bin", XMMatrixIdentity(), + TEXT("Prototype_Component_troll_Model") )); futures.emplace_back(Deferred_ModelLoad( @@ -2195,11 +2230,6 @@ HRESULT CLoader::Loading_For_ObjectViewer() #pragma endregion - futures.emplace_back(Deferred_ModelLoad( - MODEL::ANIM, "../Bin/Resources/Models/Monster/SubTroll/troll_Anim.fbx", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f)* XMMatrixIdentity(), - TEXT("Prototype_Component_SubTroll_Model") - )); - futures.emplace_back(Deferred_ModelLoad( MODEL::ANIM, "../Bin/Resources/Models/Object/Troll_Weapon/Troll_Weapon.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixIdentity(), TEXT("Prototype_Component_Troll_Weapon_Model") @@ -2241,6 +2271,14 @@ HRESULT CLoader::Loading_For_ObjectViewer() MODEL::NONANIM, "../Bin/Resources/Models/Box/Box.bin", XMMatrixIdentity(), TEXT("Desc_Box") )); + futures.emplace_back(Deferred_ModelLoad( + MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.bin", XMMatrixIdentity(), + TEXT("Prototype_Component_GerboldOlivander_Model") + )); + futures.emplace_back(Deferred_ModelLoad( + MODEL::ANIM, "../Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander_Anim.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixIdentity(), + TEXT("Prototype_Component_GerboldOlivander_Anim_Model") + )); for (auto& job : futures) { diff --git a/Jusin154_Team3D/Editor/Private/Monster.cpp b/Jusin154_Team3D/Editor/Private/Monster.cpp index 6a43dbe27..621b2a162 100644 --- a/Jusin154_Team3D/Editor/Private/Monster.cpp +++ b/Jusin154_Team3D/Editor/Private/Monster.cpp @@ -171,7 +171,6 @@ void CMonster::Free() void CMonster::Describe_Entity() { - _bool isToggle = { true }; if (ImGui::TreeNode("ANIM STATE")) { diff --git a/Jusin154_Team3D/Editor/Private/Player_States.cpp b/Jusin154_Team3D/Editor/Private/Player_States.cpp index 1552449a9..c7dcda6a9 100644 --- a/Jusin154_Team3D/Editor/Private/Player_States.cpp +++ b/Jusin154_Team3D/Editor/Private/Player_States.cpp @@ -858,26 +858,7 @@ void CPlayer::Behavior_CombatEnter() pairAnimInfo = m_Animation[STATEANIM::ANCIENT_THROW]; } else if (m_pGameInstance->Key_Down(DIK_G)) { - m_pFSM->Enable_State(FSMSTATE::POTION); - if (SUCCEEDED(InputMove())) - { - if (m_bSprintToggle) - { - pairAnimInfo = m_Animation[STATEANIM::SPRINT]; - } - else if (m_bWalkToggle) - { - pairAnimInfo = m_Animation[STATEANIM::WALK_FWD]; - } - else { - pairAnimInfo = m_Animation[STATEANIM::JOG_FWD]; - } - } - else { - pairAnimInfo = m_Animation[STATEANIM::IDLE]; - } - m_pModelCom->Set_Second_AnimationIndex(m_Animation[STATEANIM::POTION].first, ENUM_CLASS(BLEND_BONE::SHOULDER_NECK_L)); } m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); @@ -944,27 +925,7 @@ HRESULT CPlayer::Behavior_CombatExitCheck() m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); } else if (m_pGameInstance->Key_Down(DIK_G)) { - m_pFSM->Enable_State(FSMSTATE::POTION); - if (SUCCEEDED(InputMove())) - { - if (m_bSprintToggle) - { - pairAnimInfo = m_Animation[STATEANIM::SPRINT]; - } - else if (m_bWalkToggle) - { - pairAnimInfo = m_Animation[STATEANIM::WALK_FWD]; - } - else { - pairAnimInfo = m_Animation[STATEANIM::JOG_FWD]; - } - - } - else { - pairAnimInfo = m_Animation[STATEANIM::IDLE]; - } - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); - m_pModelCom->Set_Second_AnimationIndex(m_Animation[STATEANIM::POTION].first, ENUM_CLASS(BLEND_BONE::SHOULDER_NECK_L)); + } } @@ -1022,7 +983,7 @@ HRESULT CPlayer::Behavior_CombatExitCheck() void CPlayer::Behavior_CombatExit() { m_pFSM->Disable_State(FSMSTATE::COMBAT | FSMSTATE::LIGHT_ATTACK | FSMSTATE::SPELL | FSMSTATE::SKILL | - FSMSTATE::SKILL2 | FSMSTATE::MAPHELP | FSMSTATE::ANCIENT_THROW | FSMSTATE::POTION); + FSMSTATE::MAPHELP | FSMSTATE::ANCIENT_THROW); } void CPlayer::Behavior_HitEnter() diff --git a/Jusin154_Team3D/Editor/Private/Spell_State.cpp b/Jusin154_Team3D/Editor/Private/Spell_State.cpp index a41babab4..c80a02f54 100644 --- a/Jusin154_Team3D/Editor/Private/Spell_State.cpp +++ b/Jusin154_Team3D/Editor/Private/Spell_State.cpp @@ -47,6 +47,7 @@ HRESULT CSpell_State::Initialize(void* pArg) m_pVIBufferCom->Set_Pos(-185.f, 375.f, m_fOffSetX, m_fOffSetY, m_iCols); m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); static_cast(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); }); + Spell_Setting(); return S_OK; } @@ -91,9 +92,14 @@ void CSpell_State::Update(_float fTimeDelta) } m_fTime += fTimeDelta * m_fTimeMult; - if (m_bClick == false) + + if (m_iSpellType != -1) { - m_pVIBufferCom->Set_Hover_Index(m_iSpellType); + if (m_pGameInstance->Mouse_Down(DIM_RBUTTON)) + { + m_pVIBufferCom->Set_Equip_Index(m_iSpellType); + m_bLock[m_iSpellType] = true; + } } __super::Update(fTimeDelta); @@ -118,7 +124,7 @@ HRESULT CSpell_State::Render() { return E_FAIL; } - if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIINTANCE::ALPHABLEND)))) + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIINTANCE::SPELL_LOCK)))) { return E_FAIL; } @@ -170,6 +176,14 @@ void CSpell_State::Click_Slot(_bool bClick) } } +void CSpell_State::Spell_Setting() +{ + for (_int i = 0; i < 26; ++i) + { + m_bLock[i] = static_cast(m_pOwner)->Get_Info(i).bSpell_Lock; + } +} + HRESULT CSpell_State::Bind_ShaderResources() { if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) diff --git a/Jusin154_Team3D/Editor/Private/StunEffect.cpp b/Jusin154_Team3D/Editor/Private/StunEffect.cpp new file mode 100644 index 000000000..e0127a2f3 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/StunEffect.cpp @@ -0,0 +1,206 @@ +#include "pch.h" +#include "StunEffect.h" + +#include "GameInstance.h" +#include "EditEffect.h" +#include "Wand.h" +#include "Player.h" + +CStunEffect::CStunEffect(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CEffect_Container{ pDevice, pContext } +{ +} + +CStunEffect::CStunEffect(const CStunEffect& rhs) + : CEffect_Container(rhs) +{ +} + +HRESULT CStunEffect::Initialize_Prototype() +{ + + return S_OK; + +} + +HRESULT CStunEffect::Initialize(void* pArg) +{ + if (FAILED(__super::Initialize(pArg))) + return E_FAIL; + + if (FAILED(Ready_Components(pArg))) + return E_FAIL; + + + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Stun"))) + return E_FAIL; + + + m_wstrEffectName = L"Stun"; + + + m_fDuration = 3.f; + + m_pStunEffect = Get_PartObject("StunEffect"); + SAFE_ADDREF(m_pStunEffect); + + + m_Events.emplace(3.f, [&]() { + + m_BoneMat = nullptr; + + }); + + return S_OK; +} + +void CStunEffect::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); + +} + +void CStunEffect::Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Update(fTimeDelta); + + Update_Event(fTimeDelta); + + if (m_BoneMat == nullptr) + return; + + _matrix BoneMat = XMLoadFloat4x4(m_BoneMat); + + for (int i = 0; i < 3; ++i) { + BoneMat.r[i] = XMVector3Normalize(BoneMat.r[i]); + } + + m_pStunEffect->Get_Component()->Set_WorldMatrix(BoneMat * m_pOwner->Get_Component()->Get_XMWorldMatrix()); + + //m_pStunEffect->Get_Component()->Rotation(XMVectorSet(0.f, 0.f, XMConvertToRadians(180.f), 0.f)); + +} + +void CStunEffect::Late_Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Late_Update(fTimeDelta); + + +} + +HRESULT CStunEffect::Pre_Setting(CGameObject* pObject, void* pArg) +{ + + if (FAILED(__super::Pre_Setting(pObject, nullptr))) + return E_FAIL; + + _string strBoneName = *static_cast<_string*>(pArg); + + m_BoneMat = m_pOwner->Get_Component()->Get_BoneMatrixPtr(strBoneName.c_str()) ; // 위치 넘기기 + + _matrix BoneMat = XMLoadFloat4x4(m_BoneMat); + + for (int i = 0; i < 3; ++i) { + BoneMat.r[i] = XMVector3Normalize(BoneMat.r[i]); + } + + m_pStunEffect->Get_Component()->Set_WorldMatrix(BoneMat * m_pOwner->Get_Component()->Get_XMWorldMatrix()); + + m_pStunEffect->Get_Component()->Rotation(XMVectorSet(0.f, 0.f , 90.f, 0.f)); + + m_pStunEffect->Set_Visible(true); + + + return S_OK; +} + +HRESULT CStunEffect::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CStunEffect::Ready_Child() +{ + return S_OK; +} + +CStunEffect* CStunEffect::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CStunEffect* pInstance = new CStunEffect(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CStunEffect"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + + +CGameObject* CStunEffect::Clone(void* pArg, CGameObject* pOwner) +{ + CStunEffect* pInstance = new CStunEffect(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CStunEffect"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CStunEffect::OnCollision(CGameObject* pOther, void* pDesc) +{ + _int iIndex = CollisionCheck(); + + if (iIndex < 0) + return; + + if (m_isCollisionEnter == true) + return; + + m_isCollisionEnter = true; + + _vector vPos = XMVectorSet(m_Hitbuffer.touches[iIndex].position.x, m_Hitbuffer.touches[iIndex].position.y, m_Hitbuffer.touches[iIndex].position.z, 1.f); + + + for (auto& pPair : m_PartObjects) + { + pPair.second->Set_Visible(true); + pPair.second->Get_Component()->Set_State(STATE::POSITION, vPos); + } + + +} + +void CStunEffect::Free() +{ + __super::Free(); + Safe_Release(m_pStunEffect); + +} +#ifdef _DEBUG +void CStunEffect::Describe_Entity() +{ + +} +#endif + +HRESULT CStunEffect::Bind_ShaderResources() +{ + return S_OK; +} + + diff --git a/Jusin154_Team3D/Editor/Private/Troll.cpp b/Jusin154_Team3D/Editor/Private/Troll.cpp index bd86d3a2f..0365600e6 100644 --- a/Jusin154_Team3D/Editor/Private/Troll.cpp +++ b/Jusin154_Team3D/Editor/Private/Troll.cpp @@ -412,6 +412,15 @@ HRESULT CTroll::Ready_Parts() m_pWeaponTrail->Load_Trail("../Bin/Resources/Data/Effect/Troll/TrollSide/Troll_Swing_Trail", static_cast(NEXT_LEVEL)); m_pWeaponTrail->Set_Visible(false); + + if (FAILED(Add_PartObject("Stun", NEXT_LEVEL, &m_pStunEffect, &PartsDesc))) + { + return E_FAIL; + } + + m_pStunEffect->Load("../Bin/Resources/Data/Effect/Stun/StunEffect", static_cast(NEXT_LEVEL)); + m_pStunEffect->FollowParants(m_pModelCom->Get_BoneMatrixPtr("HeadEnd")); + #pragma endregion return S_OK; @@ -489,6 +498,7 @@ void CTroll::Free() SAFE_RELEASE(m_pLeftTrail); SAFE_RELEASE(m_pRightTrail); SAFE_RELEASE(m_pWeaponTrail); + SAFE_RELEASE(m_pStunEffect); } #ifdef _DEBUG @@ -502,6 +512,23 @@ void CTroll::Describe_Entity() GUI::Text(strSocket.c_str()); + _uint iindex = {}; + + for (auto& pChild : m_PartObjects) + { + _string strName = to_string(iindex++) + pChild.first; + + if(GUI::TreeNode(strName.c_str())) + { + + pChild.second->Describe_Entity(); + + GUI::TreePop(); + } + + + } + m_pTransformCom->Describe_Entity(); } diff --git a/Jusin154_Team3D/Editor/Private/Troll_Rush_Hit.cpp b/Jusin154_Team3D/Editor/Private/Troll_Rush_Hit.cpp index a47019ab5..fc3c0d8a8 100644 --- a/Jusin154_Team3D/Editor/Private/Troll_Rush_Hit.cpp +++ b/Jusin154_Team3D/Editor/Private/Troll_Rush_Hit.cpp @@ -39,7 +39,7 @@ HRESULT CTroll_Rush_Hit::Initialize(void* pArg) m_wstrEffectName = L"Troll_Nomal_Smoke"; - m_fDuration = 2.f; + m_fDuration = 3.f; return S_OK; } @@ -86,6 +86,7 @@ HRESULT CTroll_Rush_Hit::Pre_Setting(CGameObject* pObject, void* pArg) pSmoke->Get_Component()->Set_State(STATE::POSITION, XMLoadFloat4(&vPos)); pSmoke->Set_Visible(true); + return S_OK; } diff --git a/Jusin154_Team3D/Editor/Public/Editor_Define.h b/Jusin154_Team3D/Editor/Public/Editor_Define.h index 9cc9e1481..b52ba7b07 100644 --- a/Jusin154_Team3D/Editor/Public/Editor_Define.h +++ b/Jusin154_Team3D/Editor/Public/Editor_Define.h @@ -19,15 +19,18 @@ namespace Editor 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_NPC_PBR_ANIM { EYELASH_DAOTHV_ToSRO, TEETH_SRXO_ToSRO, EYE_DN_ToSRO, EYE_OCC, FACIAL_HAIR_DAOTHV_ToSRO, HEAD_HAIR_DAOTHV_ToSRO, HEADwtHAND_DSRXON_ToSRO, LOWER_DSRON_ToSRO, UPPER_DMRON_ToMRO, GLASSES_DMRON_ToMRO, EmissiveMetalness_DENMRO_ToMRO, MI_ClothSim_DSEN_ToSRO, MI_Troll_Club_DAENMROSRXO_To + , OUTLINE_READ, TEETH_SRXO_ToSRO__OUTLINE_WRITE, EYE_DN_ToSRO__OUTLINE_WRITE, HEADwtHAND_DSRXON_ToSRO__OUTLINE_WRITE, UPPER_DMRON_ToMRO__OUTLINE_WRITE, EmissiveMetalness_DENMRO_ToMRO__OUTLINE_WRITE, MI_ClothSim_DSEN_ToSRO__OUTLINE_WRITE + , 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, LAKE, 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_UIEDITOR { DEFAULT, LOGO, LOGO_TEXT, LOGO_GLOW, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, TYPE, HPBAR, MAGIC_METER, MAGIC_ICON, REMOVEUV, REVELIO, POTION, MAGIC_ITEM, SPELL_PREVIEW, SPELL_HEADER, SPELL_HEADER_LINE, SPELL_DRAG, CAMERA_LOCKON, LODING_SCREEN, ENEMY_HPBAR, BOSS_HPBAR, END }; + enum class SHADER_PASS_UIEDITOR { DEFAULT, LOGO, LOGO_TEXT, LOGO_GLOW, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, TYPE, HPBAR, MAGIC_METER, MAGIC_ICON, REMOVEUV, REVELIO, POTION, MAGIC_ITEM, SPELL_PREVIEW, SPELL_HEADER, SPELL_HEADER_LINE, SPELL_DRAG, CAMERA_LOCKON, LODING_SCREEN, ENEMY_HPBAR, BOSS_HPBAR, ENEMY_DETECTION, 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, END }; - enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, UVALPHABLEND, MAGIC_METER, SPELL_LIST, EESSENTIAL_SPELL_SOLT, EESSENTIAL_SPELL, COLOR, SPELL_HOVER, SPELL_SLOT_EFFECT, SPELL_SLOT, END }; + enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, UVALPHABLEND, MAGIC_METER, SPELL_LIST, EESSENTIAL_SPELL_SOLT, EESSENTIAL_SPELL, COLOR, SPELL_HOVER, SPELL_SLOT_EFFECT, SPELL_SLOT, SPELL_LOCK,END }; enum class EFFECT_TYPE { EFFECT, TRAIL, END }; @@ -43,6 +46,7 @@ namespace Editor ANCIENT_MAGIC_THROW, ANCIENT_MAGIC, ALOHOMORA, PETRIFICUS_TOTALUS, JAP_SIDE, BOMBARDA_SIDE, DESCENDO_SIDE, LEVIOSO_SIDE, + STUN, TROLL_ATTACK, TROLL_RUSH_HIT, TROLL_NOMAL_SMOKE, END }; diff --git a/Jusin154_Team3D/Editor/Public/Editor_Macro.h b/Jusin154_Team3D/Editor/Public/Editor_Macro.h index 4f18a9b2d..25ed8e3dc 100644 --- a/Jusin154_Team3D/Editor/Public/Editor_Macro.h +++ b/Jusin154_Team3D/Editor/Public/Editor_Macro.h @@ -21,6 +21,7 @@ namespace Editor { #define FX_UIEDITOR TEXT("FX_UIEDITOR") #define FX_UIINSTANCE TEXT("FX_UIINSTANCE") #define FX_VTXPOS TEXT("FX_VTXPOS") +#define FX_NPC_PBR_ANIM TEXT("FX_NPC_PBR_ANIM") #pragma endregion #pragma region MACRO_PROTOTYPE diff --git a/Jusin154_Team3D/Editor/Public/EffectPool.h b/Jusin154_Team3D/Editor/Public/EffectPool.h index fc1f618a8..70dc8795d 100644 --- a/Jusin154_Team3D/Editor/Public/EffectPool.h +++ b/Jusin154_Team3D/Editor/Public/EffectPool.h @@ -34,6 +34,9 @@ class CEffectPool final : public CGameObject private: list m_EffectList[ENUM_CLASS(SKILL_TYPE::END)] = {}; list m_ActiveEffectList = {}; + + _bool m_isActiveEffectCreate = {}; + _bool m_isActiveMonsterEffectCreate = {}; private: HRESULT Ready_Components(); HRESULT Bind_ShaderResources(); diff --git a/Jusin154_Team3D/Editor/Public/Enemy_Detection.h b/Jusin154_Team3D/Editor/Public/Enemy_Detection.h new file mode 100644 index 000000000..7c41587fa --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/Enemy_Detection.h @@ -0,0 +1,54 @@ +#pragma once + +#include "Editor_Define.h" +#include "ElementObject.h" + +NS_BEGIN(Editor) + +class CEnemy_Detection final : public CElementObject +{ +private: + CEnemy_Detection(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CEnemy_Detection(const CEnemy_Detection& rhs); + virtual ~CEnemy_Detection() = default; + +public: + virtual void Priority_Update(_float fTimeDelta); + virtual void Update(_float fTimeDelta); + virtual void Late_Update(_float fTimeDelta); + virtual HRESULT Render() override; + virtual _vector Get_WorldPostion() override; + + +private: + virtual HRESULT Bind_ShaderResources() override; + virtual HRESULT Ready_Components(void* pArg) override; + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + +private: + void SizeUpdate(_float fSizeX); + +private: + CTexture* m_pDiffuse_TextureCom = { nullptr }; + CTexture* m_pDiffuse_TextureCom1 = { nullptr }; + CTexture* m_pDiffuse_TextureCom2 = { nullptr }; + CTexture* m_pDiffuse_TextureCom3 = { nullptr }; + CTexture* m_pDiffuse_TextureCom4 = { nullptr }; + CTexture* m_pDiffuse_TextureCom5 = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + _float4 m_vImageposi{}; + + _bool m_bStep1 = { false }; + _bool m_bStep2 = { false }; + _bool m_bStep3 = { false }; +public: + static CEnemy_Detection* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; + void Describe_Entity() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Editor/Public/Enemy_Panel.h b/Jusin154_Team3D/Editor/Public/Enemy_Panel.h index 7bf62d370..f3177b758 100644 --- a/Jusin154_Team3D/Editor/Public/Enemy_Panel.h +++ b/Jusin154_Team3D/Editor/Public/Enemy_Panel.h @@ -35,7 +35,8 @@ class CEnemy_Panel final : public CPanelObject CGameObject* m_pEnemy_HpBar = { nullptr }; CGameObject* m_pEnemy_Info = { nullptr }; - CGameObject* m_pBoss_HpBar= { nullptr }; + CGameObject* m_pBoss_HpBar = { nullptr }; + CGameObject* m_pEnemy_Detection = { nullptr }; public: static CEnemy_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); diff --git a/Jusin154_Team3D/Editor/Public/Spell_State.h b/Jusin154_Team3D/Editor/Public/Spell_State.h index 09f34bacf..1e5ff636a 100644 --- a/Jusin154_Team3D/Editor/Public/Spell_State.h +++ b/Jusin154_Team3D/Editor/Public/Spell_State.h @@ -29,6 +29,7 @@ class CSpell_State final : public CElementObject private: void Click_Slot(_bool bClick); + void Spell_Setting(); private: virtual HRESULT Bind_ShaderResources() override; @@ -45,6 +46,8 @@ class CSpell_State final : public CElementObject _float m_fOffSetY{}; _uint m_iCols{}; + _bool m_bLock[26] = {}; + public: static CSpell_State* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Editor/Public/StunEffect.h b/Jusin154_Team3D/Editor/Public/StunEffect.h new file mode 100644 index 000000000..6986db219 --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/StunEffect.h @@ -0,0 +1,44 @@ +#pragma once + +#include "Editor_Define.h" +#include "Effect_Container.h" + +NS_BEGIN(Engine) +NS_END + +NS_BEGIN(Editor) + +class CStunEffect final : public CEffect_Container +{ +private: + CStunEffect(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CStunEffect(const CStunEffect& rhs); + virtual ~CStunEffect() = 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 CEditEffect* m_pStunEffect = { nullptr }; + const _float4x4* m_BoneMat = { nullptr }; +public: + static CStunEffect* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual void Free() override; + CGameObject* Clone(void* pArg, CGameObject* pOwner) override; + void Describe_Entity() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Editor/Public/Troll.h b/Jusin154_Team3D/Editor/Public/Troll.h index ceaa47aa8..09d182839 100644 --- a/Jusin154_Team3D/Editor/Public/Troll.h +++ b/Jusin154_Team3D/Editor/Public/Troll.h @@ -48,6 +48,8 @@ class CTroll final : public CMonster class CEditEffect* m_pTroll_Particle = { nullptr }; class CEditEffect* m_pTroll_Particle2 = { nullptr }; + class CEditEffect* m_pStunEffect = { nullptr }; + class CTrailObject* m_pLeftTrail = { nullptr }; class CTrailObject* m_pRightTrail = { nullptr }; class CTrailObject* m_pWeaponTrail = { nullptr }; diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli index f408fe02c..a7608f95e 100644 --- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli +++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli @@ -326,13 +326,13 @@ float2 SelectLerpUV(float2 fAmount, float _fRatio, int iSelectOption) fRatio = fRatio * fRatio; // EaseInQuad 후반에 속도 증가 break; case 2: - fRatio = 1 - pow(1 - fRatio, 2); // EaseOutQuad 초반에 속도 증가 + fRatio = pow(1 - fRatio, 2); // EaseOutQuad 초반에 속도 증가 break; case 3: fRatio = fRatio * fRatio * fRatio; // EaseInCubic 더 강하게 후반 속도 증가 break; case 4: - fRatio = 1 - pow(1 - fRatio, 3); // EaseOutCubic 더 강하게 초반 속도 증가 + fRatio = pow(1 - fRatio, 3); // EaseOutCubic 더 강하게 초반 속도 증가 break; case 5: fRatio = 0.5f * (1 - cos(PI * fRatio)); // EaseInOutSin 사인 곡선 @@ -343,9 +343,7 @@ float2 SelectLerpUV(float2 fAmount, float _fRatio, int iSelectOption) case 7: fRatio = pow(2, 10 * (fRatio - 1)); // Expo 지수 함수 break; - case 8: - fRatio = 1 - pow(1 - fRatio * fRatio, 0.5); // 원형 궤적 - break; + } return fAmount * fRatio; diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl index 41166db92..edd08da29 100644 --- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl +++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl @@ -229,7 +229,7 @@ PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In) - if (true == AlmostEqual3(vDepth.b * AI_TEXTURE_TYPE_MAX, AI_TEXTURE_TYPE_METALNESS)) // Metallic + if (true == AlmostEqual3(vDepth.b * AI_TEXTURE_TYPE_MAX, AI_TEXTURE_TYPE_METALNESS)) // Metallic Roughness Occ { float3 vMRO = g_SurfaceTexture.Sample(DefaultSampler, uv).rgb; fMetallic = vMRO.r; @@ -238,7 +238,7 @@ PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In) vF0 = lerp(float3(0.04f, 0.04f, 0.04f), vAlbedo, fMetallic); } - else if (true == AlmostEqual3(vDepth.b * AI_TEXTURE_TYPE_MAX, AI_TEXTURE_TYPE_SPECULAR)) // Specular + else if (true == AlmostEqual3(vDepth.b * AI_TEXTURE_TYPE_MAX, AI_TEXTURE_TYPE_SPECULAR)) // Specular Roughness Occ { fMetallic = 0.f; diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl index a8640cda3..bc9f9e91d 100644 --- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl +++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl @@ -46,9 +46,12 @@ struct ParticleValue bool isCompareStop; float fCollisionTime; - float fDropAttenuation; + float fDropAttenuation; float3 vVelocity; + float fAcceleration; + + bool isStop; }; @@ -77,6 +80,11 @@ cbuffer g_ConstantBuffer : register(b0) // b0 << 이 숫자와 컨스턴트 쉐 bool isNoWorld; bool isDetphCompareStop; bool isRandomAniIndex; + bool isMoveRight; + + bool isMoveUp; + bool isExcludePos; + bool isStopMove_For_Depth_Compare; bool isPadding2; float fTimeDelta; @@ -102,12 +110,9 @@ void CS_MAIN( { int iIndex = DispatchThreadID.x; // 배열 인덱스 - - Particle particle = g_ParticleBufferInput[iIndex]; ParticleValue particleValue = g_ParticleValueBufferInput[iIndex]; - float fGravity = particleValue.fGravity; float fOnlyDropY = 0.f; float fRatio = particle.vLifeTime.x / particle.vLifeTime.y; @@ -137,6 +142,7 @@ void CS_MAIN( particle.vLook = CurMat[2].xyzw; particle.vTranslation = CurMat[3].xyzw; } + } // 라이프타임 움직임 @@ -146,8 +152,9 @@ void CS_MAIN( /* 내 z가 가려지는 상황이었다면 연산하지않음*/ - if (particle.vLifeTime.x >= particle.vLifeTime.y) + if (particle.vLifeTime.x >= particle.vLifeTime.y || particleValue.isStop == true) { + particleValue.isCompareStop = false; particleValue.fCollisionTime = 0.f; @@ -158,16 +165,16 @@ void CS_MAIN( return ; } - //초기화 + + //초기화 particle.vRight = particleValue.vOriginRight; particle.vUp = particleValue.vOriginUp; particle.vLook = particleValue.vOriginLook; particle.vTranslation = particleValue.vOriginTranslation; - particle.vLifeTime.x = 0.f; - particleValue.vDelay.x = 0.f; + particleValue.isStop = false; if (isRandomAniIndex == false) particleValue.vAniIndex.x = 0.f; @@ -189,7 +196,7 @@ void CS_MAIN( fGravity *= (2.f * fRatio - 1.f) / particleValue.fDropAttenuation; } - particle.vTranslation.y -= 0.5f * particle.vLifeTime.x * fGravity; + particle.vTranslation.y -= 0.5f * fGravity * particle.vLifeTime.x; fOnlyDropY = particle.vTranslation.y; } @@ -205,9 +212,56 @@ void CS_MAIN( if (particleValue.fDrag < FLT_EPSILON5) fDrag = 1; + float4 vAcceleration = float4(0.f, 0.f, 0.f, 0.f); + + if (particleValue.fAcceleration > FLT_EPSILON5) + vAcceleration.xyz = normalize(particle.vLook.xyz) * fRatio * particleValue.fAcceleration; + float4 vVelocity = vector(normalize(particle.vLook.xyz) * particleValue.fSpeed, 0.f); - particle.vTranslation += vVelocity * fTimeDelta * fDrag; + particle.vTranslation += vVelocity * fTimeDelta * fDrag + vAcceleration; + } + + if (isMoveRight) + { + float fTime = (particle.vLifeTime.x / particle.vLifeTime.y); + + float fRatio = 1 - (1 - fTime * fTime); + + float fDrag = particleValue.fDrag; + + if (particleValue.fDrag < FLT_EPSILON5) + fDrag = 1; + + float4 vAcceleration = float4(0.f, 0.f, 0.f, 0.f); + + if (particleValue.fAcceleration > FLT_EPSILON5) + vAcceleration.xyz = normalize(particle.vRight.xyz) * fRatio * particleValue.fAcceleration; + + float4 vVelocity = vector(normalize(particle.vRight.xyz) * particleValue.fSpeed, 0.f); + + particle.vTranslation += vVelocity * fTimeDelta * fDrag + vAcceleration; + } + + if (isMoveUp) + { + float fTime = (particle.vLifeTime.x / particle.vLifeTime.y); + + float fRatio = 1 - (1 - fTime * fTime); + + float fDrag = particleValue.fDrag; + + if (particleValue.fDrag < FLT_EPSILON5) + fDrag = 1; + + float4 vAcceleration = float4(0.f, 0.f, 0.f, 0.f); + + if (particleValue.fAcceleration > FLT_EPSILON5) + vAcceleration.xyz = normalize(particle.vUp.xyz) * fRatio * particleValue.fAcceleration; + + float4 vVelocity = vector(normalize(particle.vUp.xyz) * particleValue.fSpeed, 0.f); + + particle.vTranslation += vVelocity * fTimeDelta * fDrag + vAcceleration; } if (isPivotMove) @@ -216,17 +270,34 @@ void CS_MAIN( float3 vDir = normalize(particleValue.vPivot - particleValue.vOriginTranslation.xyz); + if (isExcludePos == true) + { + vDir = normalize(particleValue.vPivot); + } + float fDrag = particleValue.fDrag; - if (fSizeLerpOption != 0.f) - fDrag = SelectLerpUV(float2(particleValue.fSizeDrag, 0.f), fTime, fMoveLerpOption).x; + if (fMoveLerpOption != 0.f) + fDrag = SelectLerpUV(float2(particleValue.fDrag, 0.f), fTime, fMoveLerpOption).x; if (particleValue.fDrag < FLT_EPSILON5) fDrag = 1; float4 vVelocity = vector(vDir * particleValue.fSpeed , 0.f); + + float4 vAcceleration = float4(0.f,0.f,0.f,0.f); + + if (particleValue.fAcceleration > FLT_EPSILON5) + { + float fAcceleration = particleValue.fAcceleration; + + if (fMoveLerpOption != 0.f) + fAcceleration = SelectLerpUV(float2(fAcceleration, 0.f), fTime, fMoveLerpOption).x; + + vAcceleration.xyz = vDir * fAcceleration; + } - particle.vTranslation += vVelocity * fTimeDelta * fDrag; + particle.vTranslation += vVelocity * fTimeDelta * fDrag + vAcceleration; } @@ -238,10 +309,15 @@ void CS_MAIN( if (isTurn == true) { + float fRotationSpeed = 1.f; + + if (particleValue.fRotaionSpeed > FLT_EPSILON5) + fRotationSpeed = particleValue.fRotaionSpeed; + /* ROTATE */ - float4x4 RotateXMat = RotateX(particleValue.vDeltaAngle.x * fTimeDelta); - float4x4 RotateYMat = RotateY(particleValue.vDeltaAngle.y * fTimeDelta); - float4x4 RotateZMat = RotateZ(particleValue.vDeltaAngle.z * fTimeDelta); + float4x4 RotateXMat = RotateX(particleValue.vDeltaAngle.x * fTimeDelta * fRotationSpeed); + float4x4 RotateYMat = RotateY(particleValue.vDeltaAngle.y * fTimeDelta * fRotationSpeed); + float4x4 RotateZMat = RotateZ(particleValue.vDeltaAngle.z * fTimeDelta * fRotationSpeed); float4x4 CombinedRotMat = mul(RotateZMat, mul(RotateYMat, RotateXMat)); @@ -260,9 +336,14 @@ void CS_MAIN( if (isAxisTurn) { - float4x4 RotateAxisRightMat = RotateAxis(particle.vRight, particleValue.vDeltaAxisAngle.x * fTimeDelta); - float4x4 RotateAxisUpMat = RotateAxis(particle.vUp, particleValue.vDeltaAxisAngle.y * fTimeDelta); - float4x4 RotateAxisLookMat = RotateAxis(particle.vLook, particleValue.vDeltaAxisAngle.z * fTimeDelta); + float fRotationSpeed = 1.f; + + if (particleValue.fRotaionSpeed > FLT_EPSILON5) + fRotationSpeed = particleValue.fRotaionSpeed; + + float4x4 RotateAxisRightMat = RotateAxis(particle.vRight, particleValue.vDeltaAxisAngle.x * fRotationSpeed * fTimeDelta); + float4x4 RotateAxisUpMat = RotateAxis(particle.vUp, particleValue.vDeltaAxisAngle.y * fRotationSpeed * fTimeDelta); + float4x4 RotateAxisLookMat = RotateAxis(particle.vLook, particleValue.vDeltaAxisAngle.z * fRotationSpeed * fTimeDelta); float4x4 CombinedRotMat = mul(RotateAxisLookMat, mul(RotateAxisUpMat, RotateAxisRightMat)); @@ -306,22 +387,29 @@ void CS_MAIN( float fOldViewZ = vDepthDesc.y * fFar; - if (vProjPos.w >= fOldViewZ && particle.vLifeTime.x >= 0.3f) + if (vProjPos.w >= fOldViewZ && particle.vLifeTime.x >= 0.5f) { if (particleValue.isCompareStop == false) { particleValue.isCompareStop = true; // 내가 지면에 사라지는 순간 particleValue.fCollisionTime = particle.vLifeTime.x; + if (isStopMove_For_Depth_Compare == true) + { + particleValue.isStop = true; + particle.vTranslation.y += 0.2f; + + } + + } } - if (particleValue.isCompareStop == true) // 지면에 부딪혔을 때 + if (particleValue.isCompareStop == true && isStopMove_For_Depth_Compare == false) // 지면에 부딪혔을 때 { particle.vTranslation.y = fOnlyDropY; // 지면에 부딪혓을때 이제 y연산은 오직 drop으로만 수행함 } - } /*가속력*/ diff --git a/Jusin154_Team3D/Engine/Private/GameInstance.cpp b/Jusin154_Team3D/Engine/Private/GameInstance.cpp index cf3b1dfab..770b11204 100644 --- a/Jusin154_Team3D/Engine/Private/GameInstance.cpp +++ b/Jusin154_Team3D/Engine/Private/GameInstance.cpp @@ -133,6 +133,9 @@ HRESULT CGameInstance::Initialize_Engine(const ENGINE_DESC& EngineDesc, ID3D11De void CGameInstance::Update_Engine(_float fTimeDelta) { + + _float fExcuteTimeDelta = Update_SlowMotion(fTimeDelta); + m_pKey_Manager->Update(); m_pMouse_Manager->Update(); //m_pSound_Manager->Update(); @@ -142,17 +145,17 @@ void CGameInstance::Update_Engine(_float fTimeDelta) #endif // _DEBUG m_pPicking->Update(); - m_pObject_Manager->Priority_Update(fTimeDelta); + m_pObject_Manager->Priority_Update(fExcuteTimeDelta); m_pPipeLine->Update(); - m_pObject_Manager->Update(fTimeDelta); + m_pObject_Manager->Update(fExcuteTimeDelta); - m_pPhysX_Manager->Update(fTimeDelta); + m_pPhysX_Manager->Update(fExcuteTimeDelta); - m_pObject_Manager->Late_Update(fTimeDelta); + m_pObject_Manager->Late_Update(fExcuteTimeDelta); - m_pLevel_Manager->Update(fTimeDelta); + m_pLevel_Manager->Update(fExcuteTimeDelta); m_pObject_Manager->Clear_DeadObj(); //m_pObstacle_Manager->Refresh_Region(); @@ -238,9 +241,20 @@ void CGameInstance::BillBoard(CTransform* pTransform) } + #ifdef EDITOR_PROJECT +void CGameInstance::SlowMotion(_float fSlowIntense, _float fTime) +{ + if (fTime <= 0 || fSlowIntense <= 0) + return; + + m_isSlowMotion = true; + m_vSlowTime = _float2(0.f, fTime); + m_fSlowIntense = fSlowIntense; +} + void CGameInstance::Save_ModelFilePath(const _char* FilePath) { m_FilePaths.push_back(FilePath); @@ -269,6 +283,28 @@ size_t CGameInstance::ModelFilePathCount() return m_FilePaths.size(); } +_float CGameInstance::Update_SlowMotion(_float fTimeDelta) +{ + _float fExcuteTimeDelta = {}; + + if (m_isSlowMotion == false) + return fTimeDelta; + + m_vSlowTime.x += fTimeDelta; + + if (m_vSlowTime.x >= m_vSlowTime.y) // 시간을 넘겼다면 + { + m_isSlowMotion = false; + m_vSlowTime.x = 0.f; + } + else + { + fExcuteTimeDelta = m_fSlowIntense * fTimeDelta; + } + + return fExcuteTimeDelta; +} + #endif // EDITOR_PROJECT void CGameInstance::Render_Begin(const _float4* pClearColor) { diff --git a/Jusin154_Team3D/Engine/Private/Instance_Model.cpp b/Jusin154_Team3D/Engine/Private/Instance_Model.cpp index c215f6036..9cc90197e 100644 --- a/Jusin154_Team3D/Engine/Private/Instance_Model.cpp +++ b/Jusin154_Team3D/Engine/Private/Instance_Model.cpp @@ -541,8 +541,12 @@ void CInstance_Model::Compute_CS(_float fTimeDelta) pDesc->isPivotMove = m_InstanceDesc.isPivotMove; pDesc->isSizeLerp = m_InstanceDesc.isSizeLerp; pDesc->isNoWorld = m_InstanceDesc.isNoWorld; + pDesc->isMoveUp = m_InstanceDesc.isMoveUp; + pDesc->isMoveRight = m_InstanceDesc.isMoveRight; pDesc->isDetphCompareStop = m_InstanceDesc.isDetphCompareStop; pDesc->isRandomAniIndex = m_InstanceDesc.isRandomAniIndex; + pDesc->isExcludePos = m_InstanceDesc.isExcludePos; + pDesc->isStop_Move_For_Depth_Compare = m_InstanceDesc.isStop_Move_For_Depth_Compare; pDesc->WorldMatrix = *m_pOwner->Get_Component()->Get_WorldMatrixPtr(); pDesc->fSizeLerpOption = m_InstanceDesc.fSizeLerpOption; @@ -714,9 +718,11 @@ void CInstance_Model::Instane_Buffer_ReStruct() pParticleValues[i].fSizeDrag = m_pGameInstance->Random_Float(m_InstanceDesc.vSizeDrag.x, m_InstanceDesc.vSizeDrag.y); pParticleValues[i].vDelay = _float2(0.0f, m_pGameInstance->Random_Float(m_InstanceDesc.vDelay.x, m_InstanceDesc.vDelay.y)); pParticleValues[i].fDropAttenuation = m_pGameInstance->Random_Float(m_InstanceDesc.vDropAttenuation.x, m_InstanceDesc.vDropAttenuation.y); + pParticleValues[i].fAcceleration = _float(m_pGameInstance->Random_Float(m_InstanceDesc.vAcceleration.x, m_InstanceDesc.vAcceleration.y)); pParticleValues[i].fCollisionTime = 0.f; pParticleValues[i].isCompareStop = false; + pParticleValues[i].isStop = false; memcpy(&pParticleValues[i].vOriginRight, SRMatrix.m[0], sizeof(_float4)); memcpy(&pParticleValues[i].vOriginUp, SRMatrix.m[1], sizeof(_float4)); @@ -822,41 +828,6 @@ void CInstance_Model::Describe_Entity() Instane_Buffer_ReStruct(); } - if (GUI::Checkbox("Drop", &m_InstanceDesc.isDrop)) - { - Instane_Buffer_ReStruct(); - } - - if (GUI::Checkbox("Forward Move", &m_InstanceDesc.isMoveForward)) - { - Instane_Buffer_ReStruct(); - } - - if (GUI::Checkbox("Sin Wave", &m_InstanceDesc.isSinWave)) - { - Instane_Buffer_ReStruct(); - } - - if (GUI::Checkbox("Turn", &m_InstanceDesc.isTurn)) - { - Instane_Buffer_ReStruct(); - } - - if (GUI::Checkbox("AxisTurn", &m_InstanceDesc.isAxisTurn)) - { - Instane_Buffer_ReStruct(); - } - - if (GUI::Checkbox("PivotMove", &m_InstanceDesc.isPivotMove)) - { - Instane_Buffer_ReStruct(); - } - - if (GUI::Checkbox("SizeLerp", &m_InstanceDesc.isSizeLerp)) - { - Instane_Buffer_ReStruct(); - } - if (GUI::Checkbox("NoWorld", &m_InstanceDesc.isNoWorld)) { Instane_Buffer_ReStruct(); @@ -867,188 +838,332 @@ void CInstance_Model::Describe_Entity() Instane_Buffer_ReStruct(); } - if (GUI::Checkbox("DetphCompareStop", &m_InstanceDesc.isDetphCompareStop)) - { - Instane_Buffer_ReStruct(); - } - if (ImGui::DragFloat3("SizeMin", reinterpret_cast<_float*>(&m_InstanceDesc.vSizeMin))) - { - Instane_Buffer_ReStruct(); - } - if (ImGui::DragFloat3("SizeMax", reinterpret_cast<_float*>(&m_InstanceDesc.vSizeMax))) + if (GUI::TreeNode("Transform")) { - Instane_Buffer_ReStruct(); + + if (ImGui::DragFloat3("Center", reinterpret_cast<_float*>(&m_InstanceDesc.vCenter))) + { + Instane_Buffer_ReStruct(); + } + + if (ImGui::DragFloat3("Range", reinterpret_cast<_float*>(&m_InstanceDesc.vRange))) + { + Instane_Buffer_ReStruct(); + } + + if (ImGui::DragFloat3("SizeMin", reinterpret_cast<_float*>(&m_InstanceDesc.vSizeMin))) + { + Instane_Buffer_ReStruct(); + } + + if (ImGui::DragFloat3("SizeMax", reinterpret_cast<_float*>(&m_InstanceDesc.vSizeMax))) + { + Instane_Buffer_ReStruct(); + } + + if (ImGui::DragFloat3("RotationMin", reinterpret_cast<_float*>(&m_InstanceDesc.vRotationAngleMin))) + { + Instane_Buffer_ReStruct(); + } + + if (ImGui::DragFloat3("RotationMax", reinterpret_cast<_float*>(&m_InstanceDesc.vRotationAngleMax))) + { + Instane_Buffer_ReStruct(); + } + + GUI::TreePop(); } - if (ImGui::DragFloat3("Center", reinterpret_cast<_float*>(&m_InstanceDesc.vCenter))) + if (GUI::TreeNode("Move")) { - Instane_Buffer_ReStruct(); - } + _int iMoveLerpOption = (_int)m_InstanceDesc.fMoveLerpOption; - if (ImGui::DragFloat3("Range", reinterpret_cast<_float*>(&m_InstanceDesc.vRange))) - { - Instane_Buffer_ReStruct(); - } + if (ImGui::Combo("Move Lerp Option", &iMoveLerpOption, pLerp, 9)) + { + Instane_Buffer_ReStruct(); - if (ImGui::DragFloat2("Speed", reinterpret_cast<_float*>(&m_InstanceDesc.vSpeed))) - { - Instane_Buffer_ReStruct(); - } + m_InstanceDesc.fMoveLerpOption = (_float)iMoveLerpOption; + } - if (ImGui::DragFloat2("RotationSpeed", reinterpret_cast<_float*>(&m_InstanceDesc.vRotationSpeed))) - { - Instane_Buffer_ReStruct(); - } + if (ImGui::DragFloat2("Speed", reinterpret_cast<_float*>(&m_InstanceDesc.vSpeed))) + { + Instane_Buffer_ReStruct(); + } - if (ImGui::DragFloat3("RotationMin", reinterpret_cast<_float*>(&m_InstanceDesc.vRotationAngleMin))) - { - Instane_Buffer_ReStruct(); - } + if (ImGui::DragFloat2("Drag", reinterpret_cast<_float*>(&m_InstanceDesc.vDrag))) + { + Instane_Buffer_ReStruct(); + } - if (ImGui::DragFloat3("RotationMax", reinterpret_cast<_float*>(&m_InstanceDesc.vRotationAngleMax))) - { - Instane_Buffer_ReStruct(); - } + if (ImGui::DragFloat2("Acceleration", reinterpret_cast<_float*>(&m_InstanceDesc.vAcceleration))) + { + Instane_Buffer_ReStruct(); + } - if (ImGui::DragFloat2("LifeTime", reinterpret_cast<_float*>(&m_InstanceDesc.vLifeTime))) - { - Instane_Buffer_ReStruct(); - } + if (ImGui::DragFloat3("VelocityMin", reinterpret_cast<_float*>(&m_InstanceDesc.vVelocityMin))) + { + Instane_Buffer_ReStruct(); + } - if (ImGui::DragFloat2("Delay", reinterpret_cast<_float*>(&m_InstanceDesc.vDelay))) - { - Instane_Buffer_ReStruct(); - } + if (ImGui::DragFloat3("VelocityMax", reinterpret_cast<_float*>(&m_InstanceDesc.vVelocityMax))) + { + Instane_Buffer_ReStruct(); + } - if (ImGui::DragFloat2("DiffuseUVMoveTime", reinterpret_cast<_float*>(&m_InstanceDesc.vDiffuseUVMoveTime))) - { - Instane_Buffer_ReStruct(); - } - if (ImGui::DragFloat2("MaskingUVMoveTime", reinterpret_cast<_float*>(&m_InstanceDesc.vMaskingUVMoveTime))) - { - Instane_Buffer_ReStruct(); + if (GUI::TreeNode("Dir Move")) + { + + + if (GUI::Checkbox("Forward Move", &m_InstanceDesc.isMoveForward)) + { + Instane_Buffer_ReStruct(); + } + + if (GUI::Checkbox("Up Move", &m_InstanceDesc.isMoveUp)) + { + Instane_Buffer_ReStruct(); + } + + if (GUI::Checkbox("Right Move", &m_InstanceDesc.isMoveRight)) + { + Instane_Buffer_ReStruct(); + } + + GUI::TreePop(); + } + + if (GUI::TreeNode("Pivot Move")) + { + + if (GUI::Checkbox("PivotMove", &m_InstanceDesc.isPivotMove)) + { + Instane_Buffer_ReStruct(); + } + + if (ImGui::DragFloat3("PivotMin", reinterpret_cast<_float*>(&m_InstanceDesc.vPivotMin))) + { + Instane_Buffer_ReStruct(); + } + + if (ImGui::DragFloat3("PivotMax", reinterpret_cast<_float*>(&m_InstanceDesc.vPivotMax))) + { + Instane_Buffer_ReStruct(); + } + + + GUI::TreePop(); + } + + if (GUI::TreeNode("Drop Move")) + { + if (GUI::Checkbox("Drop", &m_InstanceDesc.isDrop)) + { + Instane_Buffer_ReStruct(); + } + + if (ImGui::DragFloat2("Gravity", reinterpret_cast<_float*>(&m_InstanceDesc.vGravity))) + { + Instane_Buffer_ReStruct(); + } + + if (ImGui::DragFloat2("DropAttenuation", reinterpret_cast<_float*>(&m_InstanceDesc.vDropAttenuation))) + { + Instane_Buffer_ReStruct(); + } + + GUI::TreePop(); + } + GUI::TreePop(); } - if (ImGui::DragFloat2("DistortionUVMoveTime", reinterpret_cast<_float*>(&m_InstanceDesc.vDistortionUVMoveTime))) + if (GUI::TreeNode("Rotate")) { - Instane_Buffer_ReStruct(); - } - if (ImGui::DragFloat2("NoiseUVMoveTime", reinterpret_cast<_float*>(&m_InstanceDesc.vNoiseUVMoveTime))) - { - Instane_Buffer_ReStruct(); - } + if (ImGui::DragFloat2("RotationSpeed", reinterpret_cast<_float*>(&m_InstanceDesc.vRotationSpeed))) + { + Instane_Buffer_ReStruct(); + } - if (ImGui::DragFloat2("AniTime", reinterpret_cast<_float*>(&m_InstanceDesc.vAniTime))) - { - Instane_Buffer_ReStruct(); - } + if (GUI::TreeNode("Nomal Turn")) + { + if (GUI::Checkbox("Turn", &m_InstanceDesc.isTurn)) + { + Instane_Buffer_ReStruct(); + } - if (ImGui::DragFloat2("AniIndex", reinterpret_cast<_float*>(&m_InstanceDesc.vAniIndex))) - { - Instane_Buffer_ReStruct(); - } + if (ImGui::DragFloat3("DeltaAngleMin", reinterpret_cast<_float*>(&m_InstanceDesc.vDeltaAngleMin))) + { + Instane_Buffer_ReStruct(); + } - if (ImGui::DragFloat2("Gravity", reinterpret_cast<_float*>(&m_InstanceDesc.vGravity))) - { - Instane_Buffer_ReStruct(); - } + if (ImGui::DragFloat3("DeltaAngleMax", reinterpret_cast<_float*>(&m_InstanceDesc.vDeltaAngleMax))) + { + Instane_Buffer_ReStruct(); + } - if (ImGui::DragFloat3("SinWaveMin", reinterpret_cast<_float*>(&m_InstanceDesc.vSinMinAmount))) - { - Instane_Buffer_ReStruct(); - } + GUI::TreePop(); + } - if (ImGui::DragFloat3("SinWaveMax", reinterpret_cast<_float*>(&m_InstanceDesc.vSinMaxAmount))) - { - Instane_Buffer_ReStruct(); - } - if (ImGui::DragFloat3("VelocityMin", reinterpret_cast<_float*>(&m_InstanceDesc.vVelocityMin))) - { - Instane_Buffer_ReStruct(); - } + if (GUI::TreeNode("Axis Turn")) + { - if (ImGui::DragFloat3("VelocityMax", reinterpret_cast<_float*>(&m_InstanceDesc.vVelocityMax))) - { - Instane_Buffer_ReStruct(); - } + if (GUI::Checkbox("AxisTurn", &m_InstanceDesc.isAxisTurn)) + { + Instane_Buffer_ReStruct(); + } - if (ImGui::DragFloat3("DeltaAngleMin", reinterpret_cast<_float*>(&m_InstanceDesc.vDeltaAngleMin))) - { - Instane_Buffer_ReStruct(); - } - if (ImGui::DragFloat3("DeltaAngleMax", reinterpret_cast<_float*>(&m_InstanceDesc.vDeltaAngleMax))) - { - Instane_Buffer_ReStruct(); + if (GUI::Checkbox("ExcludePos From PibotMove", &m_InstanceDesc.isExcludePos)) + { + Instane_Buffer_ReStruct(); + } + + + + + if (ImGui::DragFloat3("DeltaAxisAngleMin", reinterpret_cast<_float*>(&m_InstanceDesc.vDeltaAxisAngleMin))) + { + Instane_Buffer_ReStruct(); + } + + if (ImGui::DragFloat3("DeltaAxisAngleMax", reinterpret_cast<_float*>(&m_InstanceDesc.vDeltaAxisAngleMax))) + { + Instane_Buffer_ReStruct(); + } + + + GUI::TreePop(); + } + + if (GUI::TreeNode("Sin Turn")) + { + + + if (GUI::Checkbox("Sin Wave", &m_InstanceDesc.isSinWave)) + { + Instane_Buffer_ReStruct(); + } + + if (ImGui::DragFloat3("SinWaveMin", reinterpret_cast<_float*>(&m_InstanceDesc.vSinMinAmount))) + { + Instane_Buffer_ReStruct(); + } + + if (ImGui::DragFloat3("SinWaveMax", reinterpret_cast<_float*>(&m_InstanceDesc.vSinMaxAmount))) + { + Instane_Buffer_ReStruct(); + } + + + GUI::TreePop(); + } + + GUI::TreePop(); } - if (ImGui::DragFloat3("DeltaAxisAngleMin", reinterpret_cast<_float*>(&m_InstanceDesc.vDeltaAxisAngleMin))) + if (GUI::TreeNode("Size")) { - Instane_Buffer_ReStruct(); - } - if (ImGui::DragFloat3("DeltaAxisAngleMax", reinterpret_cast<_float*>(&m_InstanceDesc.vDeltaAxisAngleMax))) - { - Instane_Buffer_ReStruct(); - } + if (GUI::Checkbox("SizeLerp", &m_InstanceDesc.isSizeLerp)) + { + Instane_Buffer_ReStruct(); + } - _int iMoveLerpOption = (_int)m_InstanceDesc.fMoveLerpOption; + _int iSizeLerpOption = (_int)m_InstanceDesc.fSizeLerpOption; - if (ImGui::Combo("Move Lerp Option", &iMoveLerpOption, pLerp, 9)) - { - Instane_Buffer_ReStruct(); + if (ImGui::Combo("Size Lerp Option", &iSizeLerpOption, pLerp, 9)) + { + Instane_Buffer_ReStruct(); - m_InstanceDesc.fMoveLerpOption = (_float)iMoveLerpOption; - } + m_InstanceDesc.fSizeLerpOption = (_float)iSizeLerpOption; + } - if (ImGui::DragFloat3("PivotMin", reinterpret_cast<_float*>(&m_InstanceDesc.vPivotMin))) - { - Instane_Buffer_ReStruct(); - } + if (ImGui::DragFloat3("LerpSizeAmount", reinterpret_cast<_float*>(&m_InstanceDesc.vDeltaSize))) + { + Instane_Buffer_ReStruct(); + } - if (ImGui::DragFloat3("PivotMax", reinterpret_cast<_float*>(&m_InstanceDesc.vPivotMax))) - { - Instane_Buffer_ReStruct(); - } + if (ImGui::DragFloat2("Size Drag", reinterpret_cast<_float*>(&m_InstanceDesc.vSizeDrag))) + { + Instane_Buffer_ReStruct(); + } - if (ImGui::DragFloat2("Drag", reinterpret_cast<_float*>(&m_InstanceDesc.vDrag))) - { - Instane_Buffer_ReStruct(); + + GUI::TreePop(); } - _int iSizeLerpOption = (_int)m_InstanceDesc.fSizeLerpOption; - - if (ImGui::Combo("Size Lerp Option", &iSizeLerpOption, pLerp, 9)) + if (GUI::TreeNode("Time")) { - Instane_Buffer_ReStruct(); + if (ImGui::DragFloat2("LifeTime", reinterpret_cast<_float*>(&m_InstanceDesc.vLifeTime))) + { + Instane_Buffer_ReStruct(); + } - m_InstanceDesc.fSizeLerpOption = (_float)iSizeLerpOption; + if (ImGui::DragFloat2("Delay", reinterpret_cast<_float*>(&m_InstanceDesc.vDelay))) + { + Instane_Buffer_ReStruct(); + } + + if (ImGui::DragFloat2("DiffuseUVMoveTime", reinterpret_cast<_float*>(&m_InstanceDesc.vDiffuseUVMoveTime))) + { + Instane_Buffer_ReStruct(); + } + + if (ImGui::DragFloat2("MaskingUVMoveTime", reinterpret_cast<_float*>(&m_InstanceDesc.vMaskingUVMoveTime))) + { + Instane_Buffer_ReStruct(); + } + + + if (ImGui::DragFloat2("DistortionUVMoveTime", reinterpret_cast<_float*>(&m_InstanceDesc.vDistortionUVMoveTime))) + { + Instane_Buffer_ReStruct(); + } + + if (ImGui::DragFloat2("NoiseUVMoveTime", reinterpret_cast<_float*>(&m_InstanceDesc.vNoiseUVMoveTime))) + { + Instane_Buffer_ReStruct(); + } + + if (ImGui::DragFloat2("AniTime", reinterpret_cast<_float*>(&m_InstanceDesc.vAniTime))) + { + Instane_Buffer_ReStruct(); + } + + if (ImGui::DragFloat2("AniIndex", reinterpret_cast<_float*>(&m_InstanceDesc.vAniIndex))) + { + Instane_Buffer_ReStruct(); + } + + GUI::TreePop(); } - if (ImGui::DragFloat3("LerpSizeAmount", reinterpret_cast<_float*>(&m_InstanceDesc.vDeltaSize))) + if (GUI::TreeNode("Depth Compare")) { - Instane_Buffer_ReStruct(); - } - - if (ImGui::DragFloat2("Size Drag", reinterpret_cast<_float*>(&m_InstanceDesc.vSizeDrag))) - { - Instane_Buffer_ReStruct(); - } + if (GUI::Checkbox("DetphCompareStop", &m_InstanceDesc.isDetphCompareStop)) + { + Instane_Buffer_ReStruct(); + } - if (ImGui::DragFloat2("DropAttenuation", reinterpret_cast<_float*>(&m_InstanceDesc.vDropAttenuation))) - { - Instane_Buffer_ReStruct(); + if (GUI::Checkbox("Stop_Move_For_Depth_Compare", &m_InstanceDesc.isStop_Move_For_Depth_Compare)) + { + Instane_Buffer_ReStruct(); + } + + GUI::TreePop(); } + + + diff --git a/Jusin154_Team3D/Engine/Private/Material.cpp b/Jusin154_Team3D/Engine/Private/Material.cpp index 7dad02917..89b11dfdf 100644 --- a/Jusin154_Team3D/Engine/Private/Material.cpp +++ b/Jusin154_Team3D/Engine/Private/Material.cpp @@ -496,7 +496,7 @@ HRESULT CMaterial::UnbindAllMaterialTextures(CShader* shader) return S_OK; } -HRESULT CMaterial::Bind_SRV(CShader* pShader) +HRESULT CMaterial::Bind_SRV(CShader* pShader, MODEL eType) { if (FAILED(UnbindAllMaterialTextures(pShader))) { return E_FAIL; @@ -527,11 +527,16 @@ HRESULT CMaterial::Bind_SRV(CShader* pShader) break; case aiTextureType_SPECULAR: { - _float fUsingSurfaceParams = ((_float)iTextureType / (_float)AI_TEXTURE_TYPE_MAX); - pConstantName = "g_SurfaceParamsTexture"; - if (!m_SRVs[iTextureType].empty()) { - if (FAILED(pShader->Bind_RawValue("g_fUsingSurfaceParams", &fUsingSurfaceParams, sizeof(_float)))) { - return E_FAIL; + if (MODEL::PBR_ANIM == eType || MODEL::PBR_NONANIM == eType) { + pConstantName = "g_SpecularTexture"; + } + else { + pConstantName = "g_SurfaceParamsTexture"; + if (!m_SRVs[iTextureType].empty()) { + _float fUsingSurfaceParams = ((_float)iTextureType / (_float)AI_TEXTURE_TYPE_MAX); + if (FAILED(pShader->Bind_RawValue("g_fUsingSurfaceParams", &fUsingSurfaceParams, sizeof(_float)))) { + return E_FAIL; + } } } } break; @@ -542,37 +547,52 @@ HRESULT CMaterial::Bind_SRV(CShader* pShader) pConstantName = "g_EmissiveTexture"; break; case aiTextureType_HEIGHT: + pConstantName = "g_HeightTexture"; break; case aiTextureType_NORMALS: pConstantName = "g_NormalTexture"; break; case aiTextureType_SHININESS: + pConstantName = "g_ShininessTexture"; break; case aiTextureType_OPACITY: + pConstantName = "g_OpacityTexture"; break; case aiTextureType_DISPLACEMENT: + pConstantName = "g_DisplacementTexture"; break; case aiTextureType_LIGHTMAP: + pConstantName = "g_LightMapTexture"; break; case aiTextureType_REFLECTION: + pConstantName = "g_ReflectionTexture"; break; case aiTextureType_BASE_COLOR: + pConstantName = "g_BaseColorTexture"; break; case aiTextureType_NORMAL_CAMERA: + pConstantName = "g_NormalCameraTexture"; break; case aiTextureType_EMISSION_COLOR: + pConstantName = "g_EmissionColorTexture"; break; case aiTextureType_METALNESS: { - _float fUsingSurfaceParams = ((_float)iTextureType / (_float)AI_TEXTURE_TYPE_MAX); - pConstantName = "g_SurfaceParamsTexture"; - if (!m_SRVs[iTextureType].empty()) { - if (FAILED(pShader->Bind_RawValue("g_fUsingSurfaceParams", &fUsingSurfaceParams, sizeof(_float)))) { - return E_FAIL; + if (MODEL::PBR_ANIM == eType || MODEL::PBR_NONANIM == eType) { + pConstantName = "g_MetalnessTexture"; + } + else { + pConstantName = "g_SurfaceParamsTexture"; + if (!m_SRVs[iTextureType].empty()) { + _float fUsingSurfaceParams = ((_float)iTextureType / (_float)AI_TEXTURE_TYPE_MAX); + if (FAILED(pShader->Bind_RawValue("g_fUsingSurfaceParams", &fUsingSurfaceParams, sizeof(_float)))) { + return E_FAIL; + } } } } break; case aiTextureType_DIFFUSE_ROUGHNESS: + pConstantName = "g_Diffuse_RoughnessTexture"; break; case aiTextureType_AMBIENT_OCCLUSION: pConstantName = "g_AmbientOcclusionTexture"; @@ -581,27 +601,38 @@ HRESULT CMaterial::Bind_SRV(CShader* pShader) pConstantName = "g_UnknownTexture"; break; case aiTextureType_SHEEN: + pConstantName = "g_SheenTexture"; break; case aiTextureType_CLEARCOAT: + pConstantName = "g_ClearcoadTexture"; break; case aiTextureType_TRANSMISSION: pConstantName = "g_TransmissionTexture"; break; case aiTextureType_MAYA_BASE: + pConstantName = "g_Maya_BaseTexture"; break; case aiTextureType_MAYA_SPECULAR: + pConstantName = "g_Maya_SpecularTexture"; break; case aiTextureType_MAYA_SPECULAR_COLOR: + pConstantName = "g_Maya_Specular_ColorTexture"; break; case aiTextureType_MAYA_SPECULAR_ROUGHNESS: + pConstantName = "g_Maya_Specular_RoughnessTexture"; break; case aiTextureType_ANISOTROPY: { - _float fUsingSurfaceParams = ((_float)iTextureType / (_float)AI_TEXTURE_TYPE_MAX); - pConstantName = "g_SurfaceParamsTexture"; - if (!m_SRVs[iTextureType].empty()) { - if (FAILED(pShader->Bind_RawValue("g_fUsingSurfaceParams", &fUsingSurfaceParams, sizeof(_float)))) { - return E_FAIL; + if (MODEL::PBR_ANIM == eType || MODEL::PBR_NONANIM == eType) { + pConstantName = "g_AnisotropyTexture"; + } + else { + pConstantName = "g_SurfaceParamsTexture"; + if (!m_SRVs[iTextureType].empty()) { + _float fUsingSurfaceParams = ((_float)iTextureType / (_float)AI_TEXTURE_TYPE_MAX); + if (FAILED(pShader->Bind_RawValue("g_fUsingSurfaceParams", &fUsingSurfaceParams, sizeof(_float)))) { + return E_FAIL; + } } } } break; diff --git a/Jusin154_Team3D/Engine/Private/Model.cpp b/Jusin154_Team3D/Engine/Private/Model.cpp index 9482843a4..f0d1ed31b 100644 --- a/Jusin154_Team3D/Engine/Private/Model.cpp +++ b/Jusin154_Team3D/Engine/Private/Model.cpp @@ -92,7 +92,28 @@ HRESULT CModel::Bind_Material(_uint iMeshIndex, CShader* pShader) if (iMaterialIndex >= m_iNumMaterials) { return E_FAIL; } - return m_Materials[iMaterialIndex]->Bind_SRV(pShader); + return m_Materials[iMaterialIndex]->Bind_SRV(pShader, m_eType); +} + +HRESULT CModel::Begin(_uint iMeshIndex, CShader* pShader, _bool OutLine) +{ + if (iMeshIndex >= m_iNumMeshes) { + return E_FAIL; + } + + _uint iMaterialIndex = m_Meshes[iMeshIndex]->Get_MaterialIndex(); + + if (iMaterialIndex >= m_iNumMaterials) { + return E_FAIL; + } + HRESULT hr = { E_FAIL }; + if (false == OutLine) { + hr = pShader->Begin(m_Materials[iMaterialIndex]->Get_UsingPass()); + } + else { + hr = pShader->Begin(m_Materials[iMaterialIndex]->Get_OutLinePass()); + } + return hr; } HRESULT CModel::Bind_BoneMatrices(_uint iMeshIndex, CShader* pShader, const _char* pConstantName) @@ -197,11 +218,11 @@ _bool CModel::Play_Anim(_float fTimeDelta, CTransform* pTransform) _bool CModel::Play_Dual_Anim(_float fTimeDelta, CTransform* pTransform) { - if (m_bLoopRestarted) + /*if (m_bLoopRestarted) { m_vPrevRootPos = { 0,0,0 }; m_bLoopRestarted = false; - } + }*/ //ComputeAnimation(m_iCurrentAnimIndex); //ComputeAnimation_Second(m_iCurrSecondAnimIndex); @@ -239,16 +260,20 @@ _bool CModel::Play_Dual_Anim(_float fTimeDelta, CTransform* pTransform) { m_fSecondRatio = 1.f; } - else{ - m_fSecondBlendTime = 0.f; - } } } else { - m_fSecondBlendTime += fTimeDelta; - m_fSecondRatio = (m_fSecondBlendTime / m_fSecondBlendDuration); - if (m_fSecondRatio > 1.f) m_fSecondRatio = 1.f; + if (!m_bSecondStopBlend && m_iCurrSecondAnimIndex != -1) + { + m_fSecondBlendTime += fTimeDelta; + + if (m_fSecondBlendTime > m_fSecondBlendDuration) + m_fSecondBlendTime = m_fSecondBlendDuration; + + m_fSecondRatio = m_fSecondBlendTime / m_fSecondBlendDuration; + } + m_bIsFinishedAnim = m_Animations[m_iCurrentAnimIndex]->Update_TransformationMatrices(m_Bones, m_pLocalPos, m_bIsLoop, fTimeDelta, true, m_iBoneMask, m_vector); @@ -262,9 +287,6 @@ _bool CModel::Play_Dual_Anim(_float fTimeDelta, CTransform* pTransform) { m_fSecondRatio = 1.f; } - else{ - m_fSecondBlendTime = 0.f; - } } } @@ -294,11 +316,30 @@ _bool CModel::Play_Dual_Anim(_float fTimeDelta, CTransform* pTransform) m_bInitialRootRotSaved = false; } - if (!m_bIsSecondLoop && m_bIsSecondFinishedAnim) + if (m_bIsSecondFinishedAnim && !m_bIsSecondLoop) { - m_iCurrSecondAnimIndex = -1; + m_bSecondStopBlend = true; } + if (m_bSecondStopBlend) + { + m_fSecondBlendTime -= fTimeDelta; + + if (m_fSecondBlendTime < 0.f) + m_fSecondBlendTime = 0.f; + + m_fSecondRatio = m_fSecondBlendTime / m_fSecondBlendDuration; + + if (m_fSecondRatio <= 0.f) + { + m_fSecondRatio = 0.f; + m_bSecondStopBlend = false; + m_iCurrSecondAnimIndex = -1; + } + } + + + for (auto& pBone : m_Bones) { pBone->Update_CombinedTransformationMatrix(m_Bones, XMLoadFloat4x4(&m_PreTransformMatrix)); @@ -345,23 +386,38 @@ void CModel::Set_AnimationIndex(_uint iIndex, _bool isLoop, _float fAmount, _boo } -void CModel::Set_Second_AnimationIndex(_uint iIndex, _uint BoneIndex, _bool isLoop) +void CModel::Set_Second_AnimationIndex(_uint BoneIndex, _uint iIndex, _bool isLoop) { - if (m_iCurrSecondAnimIndex == iIndex) { - return; - } if (iIndex >= 0 && iIndex < m_iNumAnimations) { + if (m_iCurrSecondAnimIndex != -1) + { + m_Animations[m_iCurrSecondAnimIndex]->Depart_Animation(); + } + m_iCurrSecondAnimIndex = iIndex; m_bIsSecondLoop = isLoop; m_iBoneMask = m_BoneMask[BoneIndex]; + m_fSecondBlendTime = 0.f; + m_fSecondRatio = 0.f; + m_bIsSecondFinishedAnim = false; + + m_Animations[m_iCurrSecondAnimIndex]->Depart_Animation(); } - else { + else + { + if (m_iCurrSecondAnimIndex != -1) + m_Animations[m_iCurrSecondAnimIndex]->Depart_Animation(); + m_iCurrSecondAnimIndex = -1; + m_bIsSecondFinishedAnim = false; + m_fSecondBlendTime = 0.f; + m_fSecondRatio = 0.f; } } + void CModel::Update_RootBone(_float Amount) { if (m_Bones[m_iRootBoneIndex]->Compare_Name("Reference")&& @@ -1429,7 +1485,9 @@ HRESULT CModel::Initialize_Prototype(MODEL eType, const _char* pModelFilePath, _ if (FAILED(Ready_Materials(pModelFilePath))) { return E_FAIL; } - + if (MODEL::PBR_ANIM == m_eType || MODEL::PBR_NONANIM == m_eType) { + ParseMaterialXml(pModelFilePath); + } if (FAILED(Ready_Animations(m_Bones))) { return E_FAIL; } @@ -1464,6 +1522,9 @@ HRESULT CModel::Initialize_Prototype(MODEL eType, const _char* pModelFilePath, _ if (FAILED(Ready_Materials(pModelFilePath))) { return E_FAIL; } + if (MODEL::PBR_ANIM == m_eType || MODEL::PBR_NONANIM == m_eType) { + ParseMaterialXml(pModelFilePath); + } if (FAILED(Ready_Animations(m_Bones))) { return E_FAIL; @@ -1502,6 +1563,48 @@ void CModel::LoadAdditionalAnimations(const char* ModelFilePath) } } +void CModel::ParseMaterialXml(const _char* pFilePath) +{ + filesystem::path xmlFilePath = pFilePath; + xmlFilePath.replace_extension(".xml"); + + tinyxml2::XMLDocument xmlDoc; + if (xmlDoc.LoadFile(xmlFilePath.string().c_str()) != tinyxml2::XML_SUCCESS){ + return; + } + + tinyxml2::XMLElement* root = xmlDoc.FirstChildElement("Material"); + if (root == nullptr){ + return; + } + + _int iVisitIndex = 0; + + for (tinyxml2::XMLElement* pElement = root->FirstChildElement(); + pElement != nullptr; + pElement = pElement->NextSiblingElement(), ++iVisitIndex) + { + _int iOrderIndex = iVisitIndex; + { + const _char* szShaderIndex = pElement->Attribute("ShaderIndex"); + _int iShaderIndex = -1; + if (szShaderIndex != nullptr) { + iShaderIndex = atoi(szShaderIndex); + } + m_Materials[iOrderIndex]->Set_UsingPass(iShaderIndex); + } + + { + const _char* szShaderIndex = pElement->Attribute("OutLineWrite"); + _int iShaderIndex = -1; + if (szShaderIndex != nullptr) { + iShaderIndex = atoi(szShaderIndex); + } + m_Materials[iOrderIndex]->Set_OutLinePass(iShaderIndex); + } + + } +} _bool CModel::LoadData(const _char* filename) { @@ -1913,6 +2016,13 @@ void CModel::Free() void CModel::Describe_Entity() { GUI::Begin("Model_Desc"); + if (GUI::CollapsingHeader("ModelAnimations")) { + for (_uint i = 0; i < m_iNumAnimations; ++i) { + if (GUI::Button(m_Animations[i]->Get_Name().c_str())) { + Set_AnimationIndex(i, false); + } + } + } if (GUI::Button("SaveAnimIndexWithName")) { _wstring wstrPath = TEXT("../Bin/AnimIndex.txt"); HANDLE hFile = CreateFile(wstrPath.c_str(), diff --git a/Jusin154_Team3D/Engine/Private/Renderer.cpp b/Jusin154_Team3D/Engine/Private/Renderer.cpp index 28e1e1041..d8127586a 100644 --- a/Jusin154_Team3D/Engine/Private/Renderer.cpp +++ b/Jusin154_Team3D/Engine/Private/Renderer.cpp @@ -14,6 +14,7 @@ void CRenderer::Render() if (FAILED(m_pShader->Bind_RawValue("g_vResolution", &vResolution, sizeof(_float2)))) { assert(false); } + Render_Priority(); Render_Shadow(); Render_NonBlend(); diff --git a/Jusin154_Team3D/Engine/Private/Unit.cpp b/Jusin154_Team3D/Engine/Private/Unit.cpp index 91a63294d..1afee7b89 100644 --- a/Jusin154_Team3D/Engine/Private/Unit.cpp +++ b/Jusin154_Team3D/Engine/Private/Unit.cpp @@ -162,6 +162,24 @@ void CUnit::Add_Event(_uint AnimIndex, function Callback, _float fRatio, m_PendingEvents.push_back(Desc); } +void CUnit::Check_HitAngle(_vector ProjectileDir) +{ + _vector vProjectileDir = ProjectileDir; + + _vector vLook = m_pTransformCom->Get_State(STATE::LOOK); + + vLook = XMVector3Normalize(vLook); + vProjectileDir = XMVector3Normalize(vProjectileDir); + + _float fDot = XMVectorGetX(XMVector3Dot(vLook, vProjectileDir)); + fDot = clamp(fDot, -1.0f, 1.0f); + + _float fAngleRad = acosf(fDot); + m_fHitDegree = XMConvertToDegrees(fAngleRad); + _vector vCross = XMVector3Cross(vLook, vProjectileDir); + m_fHitCross = XMVectorGetY(vCross); +} + void CUnit::Free() { __super::Free(); diff --git a/Jusin154_Team3D/Engine/Public/Camera.h b/Jusin154_Team3D/Engine/Public/Camera.h index b850a9a7c..2cf5351f7 100644 --- a/Jusin154_Team3D/Engine/Public/Camera.h +++ b/Jusin154_Team3D/Engine/Public/Camera.h @@ -21,10 +21,10 @@ class ENGINE_DLL CCamera abstract : public CGameObject _float2 vTransitionTime = { 0.f, 1.f }; _bool bEnableLookLerp = { false }; - _float2 vLookLerpTime = { 0.f, BASIC_LERP_TIMER }; + _float2 vLookLerpTime = { 0.f, TIMER_SHORT_LERP }; _bool bEnableFollowLerp = { false }; - _float2 vFollowLerpTime = { 0.f, BASIC_LERP_TIMER }; + _float2 vFollowLerpTime = { 0.f, TIMER_SHORT_LERP }; }CAMERA_DESC; protected: @@ -55,10 +55,10 @@ class ENGINE_DLL CCamera abstract : public CGameObject _float m_fFar = {}; _float2 m_vTransitionTime = { 0.f, 1.f }; - _float2 m_vLookLerpTime = { 0.f, BASIC_LERP_TIMER }; + _float2 m_vLookLerpTime = { 0.f, TIMER_SHORT_LERP }; _float3 m_vLookPos_Src = { 0.f, 0.f, 1.f }; _float3 m_vLookPos_Dest = { 0.f, 0.f, 1.f }; - _float2 m_vFollowLerpTime = { 0.f, BASIC_LERP_TIMER }; + _float2 m_vFollowLerpTime = { 0.f, TIMER_SHORT_LERP }; _float3 m_vFollowPos_Src = { 0.f, 0.f, 0.f }; _float3 m_vFollowPos_Dest = { 0.f, 0.f, 0.f }; _uint m_iPriority = { UINT_MAX }; diff --git a/Jusin154_Team3D/Engine/Public/Engine_Enum.h b/Jusin154_Team3D/Engine/Public/Engine_Enum.h index ac47dc5d9..732969a8a 100644 --- a/Jusin154_Team3D/Engine/Public/Engine_Enum.h +++ b/Jusin154_Team3D/Engine/Public/Engine_Enum.h @@ -32,7 +32,7 @@ enum class PXBODYSTATE { enum class MOUSEKEYSTATE { LBUTTON, RBUTTON, WBUTTON, XBUTTON }; enum class MOUSEMOVESTATE { X, Y, W }; enum class D3DTS { VIEW, PROJ, VIEW_INV, PROJ_INV, END }; -enum class MODEL { ANIM, NONANIM, PBR_NONANIM, PBR_ANIM, ENVIRONMENT, ANIM_LOCAL,NONANIM_LOCAL}; +enum class MODEL { ANIM, NONANIM, PBR_NONANIM, PBR_ANIM, ENVIRONMENT, ANIM_LOCAL,NONANIM_LOCAL, END}; enum class NAVI_POINT { A, B, C, END }; enum class NAVI_LINE { AB, BC, CA, END }; diff --git a/Jusin154_Team3D/Engine/Public/Engine_Macro.h b/Jusin154_Team3D/Engine/Public/Engine_Macro.h index 026af1bbf..3a1da1fd2 100644 --- a/Jusin154_Team3D/Engine/Public/Engine_Macro.h +++ b/Jusin154_Team3D/Engine/Public/Engine_Macro.h @@ -90,7 +90,7 @@ #define SSAO_SAMPLE_NUMBER 64 -#define BASIC_LERP_TIMER 0.16f +#define TIMER_SHORT_LERP 0.16f constexpr unsigned int g_iMaxShadowWidth = 16384; constexpr unsigned int g_iMaxShadowHeight = 9216; @@ -145,8 +145,7 @@ constexpr unsigned int g_iMaxShadowHeight = 9216; unsigned int iRefCnt = {}; \ if(nullptr != s_pInstance) { \ iRefCnt = s_pInstance->Release(); \ - if(0 == iRefCnt) \ - s_pInstance = nullptr; \ + s_pInstance = nullptr; \ } \ return iRefCnt; \ } diff --git a/Jusin154_Team3D/Engine/Public/FSM.h b/Jusin154_Team3D/Engine/Public/FSM.h index eef1a200e..c481c7da5 100644 --- a/Jusin154_Team3D/Engine/Public/FSM.h +++ b/Jusin154_Team3D/Engine/Public/FSM.h @@ -21,7 +21,7 @@ enum ESTATE : _u64Flag SKILL2 = 1ULL << 14, ANCIENT_THROW = 1ULL << 15, MAPHELP = 1ULL << 16, - POTION = 1ULL << 17, + SHIELD = 1ULL << 17, STOP = 1ULL << 18, HIT = 1ULL << 19, BROOM_RIDE = 1ULL << 20, diff --git a/Jusin154_Team3D/Engine/Public/GameInstance.h b/Jusin154_Team3D/Engine/Public/GameInstance.h index 325f70a41..73cc0d71c 100644 --- a/Jusin154_Team3D/Engine/Public/GameInstance.h +++ b/Jusin154_Team3D/Engine/Public/GameInstance.h @@ -26,6 +26,7 @@ class ENGINE_DLL CGameInstance final : public CBase _float Real_Random_Float(_float fMin, _float fMax); _float2 Get_ViewPortSize(); void BillBoard(CTransform* pTransform); + void SlowMotion(_float fSlowIntense, _float fTime); #pragma region GRAPHIC_DEVICE public: @@ -275,6 +276,9 @@ class ENGINE_DLL CGameInstance final : public CBase size_t ModelFilePathCount(); #endif +private: + _float Update_SlowMotion(_float fTimeDelta); + private: class CGraphic_Device* m_pGraphic_Device = { nullptr }; class CTimer_Manager* m_pTimer_Manager = { nullptr }; @@ -299,6 +303,11 @@ class ENGINE_DLL CGameInstance final : public CBase mt19937 m_Rng{ random_device{}() }; _float2 m_vViewPortSize = {}; + +private: + _bool m_isSlowMotion = {}; + _float2 m_vSlowTime = {}; + _float m_fSlowIntense = {}; #ifdef _DEBUG private: _float m_fTimer_PriorityUpdate = { 0.f }; diff --git a/Jusin154_Team3D/Engine/Public/Instance_Model.h b/Jusin154_Team3D/Engine/Public/Instance_Model.h index 08e63f8af..a7e3917b9 100644 --- a/Jusin154_Team3D/Engine/Public/Instance_Model.h +++ b/Jusin154_Team3D/Engine/Public/Instance_Model.h @@ -73,16 +73,17 @@ class ENGINE_DLL CInstance_Model final : public CComponent _float3 vVelocityMin = {}; _float3 vVelocityMax = {}; - _float2 vPadding3 = {}; + _float2 vAcceleration = {}; + _float4 vPadding4 = {}; _float4 vPadding5 = {}; _float4 vPadding6 = {}; _bool isRandomAniIndex = {}; - _bool isPadding2 = {}; - _bool isPadding3 = {}; - _bool isPadding4 = {}; - _bool isPadding5 = {}; + _bool isMoveUp = {}; + _bool isMoveRight = {}; + _bool isExcludePos = {}; + _bool isStop_Move_For_Depth_Compare = {}; }INSTANCE_DESC; @@ -107,7 +108,7 @@ class ENGINE_DLL CInstance_Model final : public CComponent _float2 vDiffuseUVMoveTime = { 1.f, 1.f }; _float2 vDistortionUVMoveTime = { 1.f , 1.f }; _float2 vNoiseUVMoveTime = { 1.f ,1.f }; - _float2 vAniTime = { 1.f , 1.f }; + _float2 vAniTime = { 0.01f , 0.01f }; _float2 vAniIndex = {}; _bool isMoveForward = {}; @@ -170,6 +171,11 @@ class ENGINE_DLL CInstance_Model final : public CComponent _int isNoWorld = {}; _int isDetphCompareStop = {}; _int isRandomAniIndex = {}; + _int isMoveRight = {}; + + _int isMoveUp = {}; + _int isExcludePos = {}; + _int isStop_Move_For_Depth_Compare = {}; _int isPadding2 = {}; _float fTimeDelta = {}; @@ -222,6 +228,9 @@ class ENGINE_DLL CInstance_Model final : public CComponent _float fCollisionTime = {}; _float fDropAttenuation = {}; _float3 vVelocity = {}; + _float fAcceleration = {}; + + _bool isStop = {}; }CS_PARTICLE_VALUE_DESC; diff --git a/Jusin154_Team3D/Engine/Public/Material.h b/Jusin154_Team3D/Engine/Public/Material.h index c8abcc0e1..10f37e8e4 100644 --- a/Jusin154_Team3D/Engine/Public/Material.h +++ b/Jusin154_Team3D/Engine/Public/Material.h @@ -13,7 +13,11 @@ class ENGINE_DLL CMaterial final : public CBase public: HRESULT UnbindAllMaterialTextures(class CShader* shader); - HRESULT Bind_SRV(class CShader* pShader); + HRESULT Bind_SRV(class CShader* pShader, MODEL eType = MODEL::END); + _int Get_UsingPass() { return m_iUsingPass; } + void Set_UsingPass(_int iPass) { m_iUsingPass = iPass; } + _int Get_OutLinePass() { return m_iOutLinePass; } + void Set_OutLinePass(_int iPass) { m_iOutLinePass = iPass; } private: class CGameInstance* m_pGameInstance = { nullptr }; @@ -21,7 +25,8 @@ class ENGINE_DLL CMaterial final : public CBase ID3D11DeviceContext* m_pContext = { nullptr }; vector m_SRVs[AI_TEXTURE_TYPE_MAX]; - + _int m_iUsingPass = { -1 }; + _int m_iOutLinePass = { -1 }; #ifdef EDITOR_PROJECT public: diff --git a/Jusin154_Team3D/Engine/Public/Model.h b/Jusin154_Team3D/Engine/Public/Model.h index 9b6a022c0..98a1b9347 100644 --- a/Jusin154_Team3D/Engine/Public/Model.h +++ b/Jusin154_Team3D/Engine/Public/Model.h @@ -32,19 +32,19 @@ class ENGINE_DLL CModel final : public CComponent virtual HRESULT Render_Indexed(_uint iMeshIndex, _uint IndexCount, _uint StartIndexLocation, _uint BaseVertexLocation); #pragma endregion #pragma region Animation - _bool Play_Animation(_float fTimeDelta, class CTransform* pTransform = nullptr); // 애니메이션에 델타타임을 넣어줌 - _bool Play_Anim(_float fTimeDelta, CTransform* pTransform); - _bool Play_Dual_Anim(_float fTimeDelta, CTransform* pTransform); - void Set_AnimationIndex(_uint iIndex, _bool isLoop = true, _float fAmount = 1.f, _bool bRatio = false,_float fAnimSpeed = 1.f); - void Set_Second_AnimationIndex(_uint iIndex, _uint BoneIndex, _bool isLoop = false); - _bool IsFinishedAnim() const { return m_bIsFinishedAnim; } - _bool IsFinishedSecondAnim() const { return m_bIsSecondFinishedAnim; } - _bool IsLoopAnim() const { return m_bIsLoop; } - void Set_CurrentTrackPosition(_float TrackPosition); - const _char* Get_AnimList(_uint iIndex); - _float Get_CurrentTrackPosition(); - _float Get_CurrentTrackProgressRatio(); - _float Get_TrackProgressRatio(_uint iIndex); + _bool Play_Animation(_float fTimeDelta, class CTransform* pTransform = nullptr); // 애니메이션에 델타타임을 넣어줌 + _bool Play_Anim(_float fTimeDelta, CTransform* pTransform); + _bool Play_Dual_Anim(_float fTimeDelta, CTransform* pTransform); + void Set_AnimationIndex(_uint iIndex, _bool isLoop = true, _float fAmount = 1.f, _bool bRatio = false,_float fAnimSpeed = 1.f); + void Set_Second_AnimationIndex(_uint BoneIndex, _uint iIndex, _bool isLoop = false); + _bool IsFinishedAnim() const { return m_bIsFinishedAnim; } + _bool IsFinishedSecondAnim() const { return m_bIsSecondFinishedAnim; } + _bool IsLoopAnim() const { return m_bIsLoop; } + void Set_CurrentTrackPosition(_float TrackPosition); + const _char* Get_AnimList(_uint iIndex); + _float Get_CurrentTrackPosition(); + _float Get_CurrentTrackProgressRatio(); + _float Get_TrackProgressRatio(_uint iIndex); size_t Get_AnimSize() { return m_Animations.size(); } void Set_PlayAnim(_bool bPlayAnim) { m_bPlayAnim = bPlayAnim; } @@ -59,26 +59,25 @@ class ENGINE_DLL CModel final : public CComponent void Set_BlendDuration(_float Duration) { m_fBlendDuration = Duration; } #pragma endregion #pragma region Mesh - const _char* Get_MeshName(_uint iIndex); - _uint Get_NumMeshes() const { return m_iNumMeshes; } - void Update_RootBone(_float Amount = 1.f); - void Initialize_RootBone(); + const _char* Get_MeshName(_uint iIndex); + _uint Get_NumMeshes() const { return m_iNumMeshes; } + void Update_RootBone(_float Amount = 1.f); + void Initialize_RootBone(); #pragma endregion #pragma region Bone HRESULT Bind_BoneMatrices(_uint iMeshIndex, class CShader* pShader, const _char* pConstantName); - const _float4x4* Get_BoneMatrixPtr(const _char* pBoneName) const; - _matrix Get_BoneMatrix(const _char* pBoneName) const; - _matrix Get_BoneLocalMatrix(const _char* pBoneName) const; + const _float4x4* Get_BoneMatrixPtr(const _char* pBoneName) const; + _matrix Get_BoneMatrix(const _char* pBoneName) const; + _matrix Get_BoneLocalMatrix(const _char* pBoneName) const; static _int Get_BoneIndex(const _char* pBoneName, vector Bones); // 본의 벡터와 이름을 넘겨주면 인덱스를 넘겨줌 ( n 순회 ) _int Get_BoneIndex(const _char* pBoneName) const; _matrix Get_BoneMatrix(_uint iBoneIndex); void Combined_BoneMatrix(); - #pragma endregion #pragma region Material - HRESULT Bind_Material(_uint iMeshIndex, class CShader* pShader); - + HRESULT Bind_Material(_uint iMeshIndex, class CShader* pShader); + HRESULT Begin(_uint iMeshIndex, class CShader* pShader, _bool OutLine = false); #pragma endregion void ComputeAnimation(_uint AnimIndex); @@ -132,9 +131,10 @@ class ENGINE_DLL CModel final : public CComponent _float m_fBlendDuration = { 0.3f }; _float3 m_vRadiusOffset = {}; // 컬링용 Radius Offset - _float m_fSecondBlendTime = {}; - _float m_fSecondBlendDuration = { 0.3f }; - _float m_fSecondRatio = {}; + _float m_fSecondBlendTime = {}; + _float m_fSecondBlendDuration = { 0.3f }; + _float m_fSecondRatio = {}; + _bool m_bSecondStopBlend = {}; vector m_Animations; // 애니메이션의 벡터, @@ -208,6 +208,7 @@ class ENGINE_DLL CModel final : public CComponent void LoadAdditionalAnimations(const char* ModelFilePath); bool LoadData(const _char* filename); void LoadAnim(const _char* fileName); + void ParseMaterialXml(const _char* filePath); // virtual HRESULT Initialize(void* pArg) override; diff --git a/Jusin154_Team3D/Engine/Public/State.h b/Jusin154_Team3D/Engine/Public/State.h index df6098e3b..b1cf28c33 100644 --- a/Jusin154_Team3D/Engine/Public/State.h +++ b/Jusin154_Team3D/Engine/Public/State.h @@ -20,7 +20,7 @@ enum ESTATE MAPHELP,POTION, ACCIO,DESCENDO,DIFFINDO,DEPULSO,LUMOS,LUMOS_STOP,DISILLUSION_ENTER,DISILLUSION_EXIT, ANCIENT_THROW, SPELL_FAIL, SPELL_CHARGE, - BROOM_IDLE,BROOM_FWD,BROOM_LEFT,BROOM_RIGHT,BROOM_DOWN,BROOM_UP, BROOM_HOVER_IDLE, BROOM_HOVER_FWD, BROOM_HOVER_LEFT, BROOM_HOVER_RIGHT, BROOM_HOVER_START,BROOM_MOUNT, BROOM_MOUNT_END,BROOM_DISMOUNT, + BROOM_IDLE,BROOM_FWD,BROOM_LEFT,BROOM_RIGHT,BROOM_DOWN,BROOM_UP, BROOM_REVELIO, BROOM_HOVER_IDLE, BROOM_HOVER_FWD, BROOM_HOVER_LEFT, BROOM_HOVER_RIGHT, BROOM_HOVER_START, BROOM_HOVER_REVELIO,BROOM_MOUNT, BROOM_MOUNT_END,BROOM_DISMOUNT, RUSH_START,RUSH_LOOP,RUSH_END, THROW_ROCK_START,THROW_ROCK, BACKHAND_SWING_JOG,SWING_FWD,SLAM, @@ -34,8 +34,10 @@ enum ESTATE TUMBLE, TUMBLE2, PETRIFICUSED_START, STUN, + FLINCH_BWD,FLINCH_FWD, FLINCH_LEFT, FLINCH_RIGHT, + STUMBLE_BWD_L,STUMBLE_BWD_R,STUMBLE_FWD, ////////////////////////// 빗자루 - BROOM_MOUNT_B, BROOM_HOVER_IDLE_B, BROOM_HOVER_STOP_B,BROOM_HOVER_DOWN_B,BROOM_HOVER_UP_B,BROOM_HOVER_LEFT_B,BROOM_HOVER_RIGHT_B,BROOM_FLY_DOWN_B, BROOM_FLY_LEFT_B, BROOM_FLY_RIGHT_B, BROOM_FLY_UP_B,BROOM_FLY_B, + BROOM_MOUNT_B, BROOM_HOVER_IDLE_B, BROOM_HOVER_STOP_B,BROOM_HOVER_DOWN_B,BROOM_HOVER_UP_B,BROOM_HOVER_LEFT_B,BROOM_HOVER_RIGHT_B,BROOM_FLY_DOWN_B, BROOM_FLY_LEFT_B, BROOM_FLY_RIGHT_B, BROOM_FLY_UP_B,BROOM_FLY_B,BROOM_ADD, /// //////////////////////////// END }; diff --git a/Jusin154_Team3D/Engine/Public/Unit.h b/Jusin154_Team3D/Engine/Public/Unit.h index 226a1bcbf..012dee2bf 100644 --- a/Jusin154_Team3D/Engine/Public/Unit.h +++ b/Jusin154_Team3D/Engine/Public/Unit.h @@ -75,6 +75,9 @@ class ENGINE_DLL CUnit abstract : public CContainerObject vector m_PendingEvents; + _float m_fHitDegree = {}; + _float m_fHitCross = {}; + private: virtual void Add_FSM() {}; virtual void Set_FSM() {}; @@ -86,6 +89,7 @@ class ENGINE_DLL CUnit abstract : public CContainerObject HRESULT Ready_Components(void*pArg); void Play_Event(); void Add_Event(_uint AnimIndex, function Callback, _float fRatio = 0.f, _bool bKeep = false); + void Check_HitAngle(_vector ProjectileDir); public: virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr)PURE; virtual void Free() override;