diff --git a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl index da3d61395..3ac1e5d5d 100644 --- a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl +++ b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl @@ -32,6 +32,7 @@ float g_fHp; float2 g_fViewport; float2 g_fOrigin_Size; float2 g_fCurrent_Size; +float2 g_fPosition; float2 g_fHpBG; float2 g_Pos; float2 g_fImageSize; @@ -45,7 +46,6 @@ float2 g_fItemPosition1; float2 g_fItemImageSizes1; float2 g_fItemPosition2; float2 g_fItemImageSizes2; -float2 g_fPosition[4]; float2 g_fImageSizes[4]; float4 g_fImagesUV[4]; @@ -120,6 +120,20 @@ PS_OUT PS_MAIN(PS_IN In) return Out; } +PS_OUT PS_Texture_Color(PS_IN In) +{ + PS_OUT Out; + float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; + float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord); + float4 Color = g_Texture1.Sample(DefaultSampler, In.vTexcoord); + + tex1.rgb *= Color.rgb; + + tex1.a *= Alpha; + Out.vColor = tex1; + return Out; +} + PS_OUT PS_Logo(PS_IN In) { PS_OUT Out; @@ -517,12 +531,15 @@ PS_OUT PS_Rotation(PS_IN In) float2 center = float2(0.5f, 0.5f); float2 uv = In.vTexcoord - center; - float2 Rotation = In.vTexcoord; + float2 Rotation; Rotation.x = uv.x * cos(g_fMapAngle) - uv.y * sin(g_fMapAngle); Rotation.y = uv.x * sin(g_fMapAngle) + uv.y * cos(g_fMapAngle); Rotation += center; - float4 tex1 = g_Texture.Sample(ClampSampler, Rotation); + float4 tex1 = g_Texture.Sample(BorderZeroLinearSampler, Rotation); + + if (tex1.a <= 0.f) + discard; color = tex1; @@ -1757,7 +1774,7 @@ PS_OUT PS_SpellLearn(PS_IN In) Color = tex; tex1 *= 0.95f; - + Color.a = tex1; Color.a *= Alpha; @@ -1766,6 +1783,49 @@ PS_OUT PS_SpellLearn(PS_IN In) return Out; } +PS_OUT PS_SpellLearnColor(PS_IN In) +{ + PS_OUT Out; + float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; + + float4 Color = float4(1.f, 1.f, 1.f, 1.f); + + float4 tex = g_Texture.Sample(DefaultSampler, In.vTexcoord); + float4 tex1 = g_Texture1.Sample(DefaultSampler, In.vTexcoord); + Color = tex; + + Color.rgb *= tex1.rgb; + + float2 rectPos = g_fPosition; + float2 rectSize = g_fCurrent_Size; + + float2 itemPos = g_fItemPosition1; + float2 itemSize = g_fItemImageSizes1; + + float x0 = max(rectPos.x, itemPos.x); + float x1 = min(rectPos.x + rectSize.x, itemPos.x + itemSize.x); + float y0 = max(rectPos.y, itemPos.y); + float y1 = min(rectPos.y + rectSize.y, itemPos.y + itemSize.y); + + float uMin = (x0 - rectPos.x) / rectSize.x; + float uMax = (x1 - rectPos.x) / rectSize.x; + float vMin = (y0 - rectPos.y) / rectSize.y; + float vMax = (y1 - rectPos.y) / rectSize.y; + + vMin = 1.0f - vMin; + vMax = 1.0f - vMax; + + if (In.vTexcoord.x >= min(uMin, uMax) && In.vTexcoord.x <= max(uMin, uMax) && + In.vTexcoord.y >= min(vMin, vMax) && In.vTexcoord.y <= max(vMin, vMax)) + { + Color.rgb = float3(0.f, 0.f, 1.f); + } + + Color.a *= Alpha; + Out.vColor = Color; + return Out; +} + struct VS_IN3D { float3 vPosition : POSITION; @@ -1988,6 +2048,16 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_MAIN(); } + pass Texture_Color + { + 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_Texture_Color(); + } + pass Logo { SetRasterizerState(RS_Default); @@ -2336,6 +2406,16 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_SpellLearn(); } + pass SpellLearnColor + { + 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_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_SpellLearnColor(); + } + pass Enemy_Detection { SetRasterizerState(RS_Nocull); diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj index a7b65b57e..7706786dc 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj @@ -161,6 +161,16 @@ call Update_Resources.bat + + + + + + + + + + @@ -199,7 +209,7 @@ call Update_Resources.bat - + @@ -359,7 +369,7 @@ call Update_Resources.bat - + @@ -371,6 +381,16 @@ call Update_Resources.bat + + + + + + + + + + @@ -410,8 +430,8 @@ call Update_Resources.bat - - + + @@ -576,7 +596,7 @@ call Update_Resources.bat - + diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters index e014dbc0b..f367895e1 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters @@ -361,7 +361,7 @@ 04.Mechanic\State\Movement\IdleBreak - + 04.Mechanic\State\Troll_Combat\Troll_State_Rush @@ -596,14 +596,11 @@ 04.Mechanic\Quest - - 02.GameObjects\BroomRaceManager - 02.GameObjects\UI\Interaction_Key - - 02.GameObjects\NPC\Hostile\Monster\Ranrak + + 02.GameObjects\NPC\Hostile\Monster\Ranrok 04.Mechanic\State\State_Combat\State_FireBreath @@ -635,6 +632,12 @@ 02.GameObjects\Environment\03.MapElement\Static + + 02.GameObjects\Effect\Effects\Lightning + + + 02.GameObjects\Effect\Effects\Lightning\LightningSide + 04.Mechanic\State\State_Combat\State_FireSweep @@ -650,6 +653,33 @@ 04.Mechanic\State\State_Combat\State_Skill + + 02.GameObjects\BroomRaceManager + + + 04.Mechanic\Skill\SpellLearn_Data + + + 02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn + + + 02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_MovePointer + + + 02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Name + + + 02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel + + + 02.GameObjects\UI\SpellLearn_Canvas + + + 02.GameObjects\Effect\Effects\Blink + + + 04.Mechanic\State\State_Combat\State_Skill2 + @@ -1317,9 +1347,6 @@ {7672784a-86a8-4485-a4de-a979bd0c8f52} - - {bb981766-6030-4dd9-b92d-f6819a70c93d} - {24f6903f-8f6b-46ff-a387-ecb44d673887} @@ -1359,6 +1386,39 @@ {c3b86f00-da19-47ad-a26e-7ff641e2c4d4} + + {8abf6703-8c12-4dd5-9a10-a6747a1c6037} + + + {b494a051-9dcc-4739-9048-13fb963c441f} + + + {bb981766-6030-4dd9-b92d-f6819a70c93d} + + + {c00fdde9-9768-475d-bde2-d89305b759d9} + + + {1c4d53fe-facb-4a8e-9f4e-c02e3b333d07} + + + {f0015309-1656-42bb-8c06-58660586eeeb} + + + {ec3213cc-8976-4c8b-b317-6155cae388cd} + + + {7d84f56c-9d2f-483e-9ee1-2637d35ccb7d} + + + {69f95207-1e94-42f2-9690-d3e34e4ff5a9} + + + {262cc240-d062-406a-9d47-36702fe6b9f3} + + + {785b1fd0-ef6f-43ab-96fc-e233cd93b29d} + @@ -1712,7 +1772,7 @@ 04.Mechanic\State\Movement\IdleBreak - + 04.Mechanic\State\Troll_Combat\Troll_State_Rush @@ -1902,9 +1962,6 @@ 04.Mechanic\Quest - - 02.GameObjects\BroomRaceManager - 02.GameObjects\UI\Interaction_Key @@ -1917,11 +1974,11 @@ 02.GameObjects\Effect\Effects\Stupefy - - 02.GameObjects\NPC\Hostile\Monster\Ranrak + + 02.GameObjects\NPC\Hostile\Monster\Ranrok - - 02.GameObjects\NPC\Hostile\Monster\Ranrak + + 02.GameObjects\NPC\Hostile\Monster\Ranrok 04.Mechanic\State\State_Combat\State_FireBreath @@ -1956,6 +2013,39 @@ 02.GameObjects\Environment\03.MapElement\Static + + 02.GameObjects\Effect\Effects\Lightning + + + 02.GameObjects\Effect\Effects\Lightning\LightningSide + + + 02.GameObjects\BroomRaceManager + + + 04.Mechanic\Skill\SpellLearn_Data + + + 02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn + + + 02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_MovePointer + + + 02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Name + + + 02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel + + + 02.GameObjects\UI\SpellLearn_Canvas + + + 02.GameObjects\Effect\Effects\Blink + + + 04.Mechanic\State\State_Combat\State_Skill2 + diff --git a/Jusin154_Team3D/Client/Private/Accio.cpp b/Jusin154_Team3D/Client/Private/Accio.cpp index 8622c012a..2e1355d8e 100644 --- a/Jusin154_Team3D/Client/Private/Accio.cpp +++ b/Jusin154_Team3D/Client/Private/Accio.cpp @@ -113,7 +113,7 @@ void CAccio::Update(_float fTimeDelta) m_pRotate0->Get_Component()->Set_State(STATE::POSITION, vPos); m_pRotate1->Get_Component()->Set_State(STATE::POSITION, vPos); - m_pAccio_PT->Get_Component()->Set_State(STATE::POSITION, vPos); + m_pAccio_PT->Get_Component()->Set_State(STATE::POSITION, m_pEnemyCCT->Get_Position()); m_pAccio_Distortion->Get_Component()->Set_State(STATE::POSITION, vPos); } diff --git a/Jusin154_Team3D/Client/Private/Blink.cpp b/Jusin154_Team3D/Client/Private/Blink.cpp new file mode 100644 index 000000000..d3ab0e1b0 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Blink.cpp @@ -0,0 +1,295 @@ +#include "pch.h" +#include "Blink.h" + +#include "GameInstance.h" +#include "EffectParts.h" +#include "Player.h" +#include "Wand.h" +#include "TrailObject.h" + + +CBlink::CBlink(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CEffect_Container{ pDevice, pContext } +{ +} + +CBlink::CBlink(const CBlink& rhs) + : CEffect_Container(rhs) +{ +} + +HRESULT CBlink::Initialize_Prototype() +{ + + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Blink"))) + return E_FAIL; + + return S_OK; +} + +HRESULT CBlink::Initialize(void* pArg) +{ + if (FAILED(__super::Initialize(pArg))) + return E_FAIL; + + if (FAILED(Ready_Components(pArg))) + return E_FAIL; + + if (FAILED(Create_Effect())) + return E_FAIL; + + + m_wstrEffectName = L"Blink"; + + + m_pBlink_Swirl = Get_PartObject("BlinkSwirl"); + m_pBlink_Circle = Get_PartObject("Blink_Circle"); + m_pBlink_Circle2 = Get_PartObject("Blink_Circle2"); + m_pBlink_Distortion = Get_PartObject("Blink_Distortion"); + + for (size_t i = 0; i < 10; i++) + { + _string strPartsName = "Blink_Trail" + to_string(i); + CTrailObject* pTrail = Get_PartObject(strPartsName); + + m_Blink_Trails.push_back(pTrail); + SAFE_ADDREF(pTrail); + } + + m_BoneNames[0] = "SKT_Back"; + m_BoneNames[1] = "Neck"; + m_BoneNames[2] = "Spine2"; + m_BoneNames[3] = "LeftForeArm"; + m_BoneNames[4] = "Spine"; + m_BoneNames[5] = "RightArm"; + m_BoneNames[6] = "LeftArm"; + m_BoneNames[7] = "RightUpLegTwist1"; + m_BoneNames[8] = "LeftUpLegTwist1"; + m_BoneNames[9] = "RightForeArm"; + + + SAFE_ADDREF(m_pBlink_Swirl); + SAFE_ADDREF(m_pBlink_Circle); + SAFE_ADDREF(m_pBlink_Distortion); + SAFE_ADDREF(m_pBlink_Circle2); + + + m_Events.emplace(1.f, [&]() { + for (auto& pTrail : m_Blink_Trails) + { + pTrail->SetDissolve(true); + } + + + }); + + m_Events.emplace(1.5f, [&]() { + + m_isParticleEnd = true; + m_pBlink_Swirl->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f, -500.f, 0.f, 1.f)); + }); + + m_fAmountSize = 1.f; + m_fSpeed = 1.6f; + + + m_fDuration = 2.f; + + + + return S_OK; +} + +void CBlink::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); + +} + +void CBlink::Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Update(fTimeDelta); + + Update_Event(fTimeDelta); + + _uint iIndex = {}; + + + for (auto& pTrail : m_Blink_Trails) + { + _matrix BoneMatrix = XMLoadFloat4x4(m_pOwner->Get_Component()->Get_BoneMatrixPtr(m_BoneNames[iIndex++].c_str())); + _matrix PlayerWorld = m_pOwner->Get_Component()->Get_XMWorldMatrix(); + _matrix CombinedMat = BoneMatrix * PlayerWorld; + + + + if (m_fMoveAccTime > XM_2PI) + m_fMoveAccTime = 0.f; + + m_fMoveAccTime += fTimeDelta * m_fMoveSpeed; + + _float fAmount = sinf(m_fMoveAccTime) * m_fAmountMove; + + CombinedMat.r[3] += XMVectorSet(0.f, fAmount, 0.f, 0.f); + + pTrail->Oneside_Rope_Trail_Update(CombinedMat, fTimeDelta); + } + + + if (m_isParticleEnd == false) + { + m_pBlink_Swirl->Get_Component()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion()); + } + + + m_pBlink_Circle->Get_Component()->Set_WorldMatrix(m_pOwner->Get_Component()->Get_XMWorldMatrix()); + m_pBlink_Circle2->Get_Component()->Set_WorldMatrix(m_pOwner->Get_Component()->Get_XMWorldMatrix()); + + m_pBlink_Distortion->Get_Component()->Set_State(STATE::POSITION, m_pGameInstance->Get_CamXMPosition() + m_pGameInstance->Get_CameraLook() * m_fLength); + + + if (m_fSizeAccTime > XM_PIDIV2) + return; + + m_fSizeAccTime += fTimeDelta * m_fSpeed; + + _float fSize = sinf(m_fSizeAccTime) * m_fAmountSize; + _float3 vSize = _float3(fSize, fSize, fSize); + + m_pBlink_Circle->Get_Component()->Set_Scale(vSize); + m_pBlink_Circle2->Get_Component()->Set_Scale(vSize); +} + +void CBlink::Late_Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Late_Update(fTimeDelta); + + +} + +HRESULT CBlink::Pre_Setting(CGameObject* pObject, void* pArg) +{ + if (FAILED(__super::Pre_Setting(pObject, nullptr))) + return E_FAIL; + + m_pBlink_Swirl->Set_Visible(true); + m_pBlink_Circle->Set_Visible(true); + m_pBlink_Circle2->Set_Visible(true); + /*트레일 초기화 */ + + m_isTrailEnd = false; + m_isParticleEnd = false; + + for (auto& pTrail : m_Blink_Trails) + { + pTrail->SetDissolve(false); + pTrail->Set_Visible(true); + pTrail->Get_Component()->Reset_Trail(); + pTrail->Get_TrailInfo()->vDissolveTime.y = 0.5f; + } + + + m_pBlink_Swirl->Get_Component()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion()); + + + + m_pBlink_Distortion->Set_Visible(true); + + + m_fSizeAccTime = 0.f; + m_fMoveAccTime = 0.f; + + return S_OK; +} + +HRESULT CBlink::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CBlink::Ready_Child() +{ + return S_OK; +} + +CBlink* CBlink::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CBlink* pInstance = new CBlink(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CBlink"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + + +CGameObject* CBlink::Clone(void* pArg, CGameObject* pOwner) +{ + CBlink* pInstance = new CBlink(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CBlink"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CBlink::OnCollision(CGameObject* pOther, void* pDesc) +{ + ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc); + +} + +void CBlink::Free() +{ + __super::Free(); + + + SAFE_RELEASE(m_pBlink_Swirl); + SAFE_RELEASE(m_pBlink_Circle); + SAFE_RELEASE(m_pBlink_Distortion); + SAFE_RELEASE(m_pBlink_Circle2); + + for (auto& pTrail : m_Blink_Trails) + { + SAFE_RELEASE(pTrail); + } + + m_Blink_Trails.clear(); +} +#ifdef _DEBUG + +void CBlink::Describe_Entity() +{ + GUI::Begin("Blink"); + + GUI::DragFloat("Length", &m_fLength); + GUI::DragFloat("MoveAmount", &m_fAmountMove); + GUI::DragFloat("m_fMoveSpeed", &m_fMoveSpeed); + + GUI::End(); +} + +#endif // _DEBUG + +HRESULT CBlink::Bind_ShaderResources() +{ + return S_OK; +} + + diff --git a/Jusin154_Team3D/Client/Private/Broom.cpp b/Jusin154_Team3D/Client/Private/Broom.cpp index 0277db44f..6d7ec80f8 100644 --- a/Jusin154_Team3D/Client/Private/Broom.cpp +++ b/Jusin154_Team3D/Client/Private/Broom.cpp @@ -146,16 +146,6 @@ void CBroom::Late_Update(_float fTimeDelta) _vector vCameraLook = XMVector3Normalize(m_pGameInstance->Get_CameraLook()); WindTransform->Set_State(STATE::POSITION, m_pGameInstance->Get_CamXMPosition() + vCameraLook * m_fCameraOffset); -#if _DEBUG -#if 진우 - GUI::Begin("Wind"); - - m_pWindEffect->Get_Component()->Describe_Entity(); - GUI::Checkbox("BillBoard", &m_pWindEffect->Get_Effect_Info()->isBillboard); - GUI::DragFloat("Offset", &m_fCameraOffset); - GUI::End(); -#endif -#endif } m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this); diff --git a/Jusin154_Team3D/Client/Private/Broom_States.cpp b/Jusin154_Team3D/Client/Private/Broom_States.cpp index 264784bc6..a27fbba8e 100644 --- a/Jusin154_Team3D/Client/Private/Broom_States.cpp +++ b/Jusin154_Team3D/Client/Private/Broom_States.cpp @@ -76,7 +76,7 @@ void CBroom::Behavior_IdleEnter() pair<_uint, _bool> pairAnimInfo; pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE_B]; - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false); } HRESULT CBroom::Behavior_IdleExitCheck(_float fTimeDelta) @@ -85,7 +85,7 @@ HRESULT CBroom::Behavior_IdleExitCheck(_float fTimeDelta) pair<_uint, _bool> pairAnimInfo; if (m_bRide && !m_pFSM->IsEnable(FSMSTATE::MOUNT_B)) { pairAnimInfo = m_Animation[STATEANIM::BROOM_MOUNT_B]; - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false); m_pFSM->Enable_State(FSMSTATE::MOUNT_B); } @@ -103,7 +103,7 @@ HRESULT CBroom::Behavior_IdleExitCheck(_float fTimeDelta) if (m_pModelCom->IsFinishedAnim()) { pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE_B]; - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false); } } @@ -273,7 +273,7 @@ HRESULT CBroom::Behavior_Broom_HoverExitCheck(_float fTimeDelta) pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_UP_B]; else pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_DOWN_B]; - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false); } else if (ax >= az) { @@ -293,7 +293,7 @@ HRESULT CBroom::Behavior_Broom_HoverExitCheck(_float fTimeDelta) pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE_B]; } } - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false); } else { @@ -304,7 +304,7 @@ HRESULT CBroom::Behavior_Broom_HoverExitCheck(_float fTimeDelta) else { pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE_B]; } - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false); } } else { @@ -326,7 +326,7 @@ HRESULT CBroom::Behavior_Broom_HoverExitCheck(_float fTimeDelta) m_bTurbo = true; } - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false); } if (!m_bHoverToggle) @@ -355,7 +355,7 @@ void CBroom::Behavior_Broom_FlyEnter() m_pFSM->Enable_State(FSMSTATE::FLY); m_bHoverToggle = false; pairAnimInfo = pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B]; - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false); } HRESULT CBroom::Behavior_Broom_FlyExitCheck(_float fTimeDelta) @@ -455,7 +455,7 @@ HRESULT CBroom::Behavior_Broom_FlyExitCheck(_float fTimeDelta) pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_UP_B]; else pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_DOWN_B]; - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false); } else if (ax >= az) { @@ -475,7 +475,7 @@ HRESULT CBroom::Behavior_Broom_FlyExitCheck(_float fTimeDelta) pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B]; } } - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false); } else { @@ -486,12 +486,12 @@ HRESULT CBroom::Behavior_Broom_FlyExitCheck(_float fTimeDelta) else { pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B]; } - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false); } } else { pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B]; - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false); } } @@ -513,7 +513,7 @@ HRESULT CBroom::Behavior_Broom_FlyExitCheck(_float fTimeDelta) m_pTransformCom->Go_LerpStraight(m_fSpeed, fTimeDelta); pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_STOP_B]; - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false); if (bShift && iCurrentAnimIndex == m_Animation[STATEANIM::BROOM_HOVER_STOP_B].first) { @@ -556,7 +556,7 @@ void CBroom::Behavior_Broom_TurboFlyEnter() m_bTurbo = true; m_bHoverToggle = false; pairAnimInfo = pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B]; - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false); } HRESULT CBroom::Behavior_Broom_TurboFlyExitCheck(_float fTimeDelta) @@ -673,7 +673,7 @@ HRESULT CBroom::Behavior_Broom_TurboFlyExitCheck(_float fTimeDelta) pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_UP_B]; else pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_DOWN_B]; - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false); } else if (ax >= az) { @@ -693,7 +693,7 @@ HRESULT CBroom::Behavior_Broom_TurboFlyExitCheck(_float fTimeDelta) pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B]; } } - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false); } else { @@ -704,12 +704,12 @@ HRESULT CBroom::Behavior_Broom_TurboFlyExitCheck(_float fTimeDelta) else { pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B]; } - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false); } } else { pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B]; - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false); } } @@ -722,7 +722,7 @@ HRESULT CBroom::Behavior_Broom_TurboFlyExitCheck(_float fTimeDelta) m_pTransformCom->Go_LerpStraight(m_fSpeed, fTimeDelta); pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_STOP_B]; - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false); if (bShift && iCurrentAnimIndex == m_Animation[STATEANIM::BROOM_HOVER_STOP_B].first) { diff --git a/Jusin154_Team3D/Client/Private/Camera_Debug.cpp b/Jusin154_Team3D/Client/Private/Camera_Debug.cpp index 9d0d18c6c..810105416 100644 --- a/Jusin154_Team3D/Client/Private/Camera_Debug.cpp +++ b/Jusin154_Team3D/Client/Private/Camera_Debug.cpp @@ -71,6 +71,14 @@ void CCamera_Debug::Priority_Update(_float fTimeDelta) } } + _long LWheel = m_pGameInstance->Get_DIMouseMove(MOUSEMOVESTATE::W); + if (LWheel > 0) + { + m_pTransformCom->Add_SpeedPerSec(0.5f); + } + else if (LWheel < 0) + m_pTransformCom->Add_SpeedPerSec(-0.5f); + #pragma endregion #pragma region Angle @@ -86,7 +94,9 @@ void CCamera_Debug::Priority_Update(_float fTimeDelta) void CCamera_Debug::Update(_float fTimeDelta) { +#ifdef _DEBUG Describe_Entity(); +#endif // _DEBUG } void CCamera_Debug::Late_Update(_float fTimeDelta) diff --git a/Jusin154_Team3D/Client/Private/EffectObject.cpp b/Jusin154_Team3D/Client/Private/EffectObject.cpp index d15f605f2..8318389a5 100644 --- a/Jusin154_Team3D/Client/Private/EffectObject.cpp +++ b/Jusin154_Team3D/Client/Private/EffectObject.cpp @@ -101,6 +101,9 @@ HRESULT CEffectObject::Render_Blur() } + if (m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::NONPOS) + BlurPass = SHADER_PASS_INSTANCE_MODEL::NONPOS_BLUR; + for (_uint i = 0; i < m_pInstance_ModelCom->Get_NumMeshes(); i++) { diff --git a/Jusin154_Team3D/Client/Private/EffectPool.cpp b/Jusin154_Team3D/Client/Private/EffectPool.cpp index b23f9062c..d343bd67f 100644 --- a/Jusin154_Team3D/Client/Private/EffectPool.cpp +++ b/Jusin154_Team3D/Client/Private/EffectPool.cpp @@ -35,6 +35,9 @@ #include "Accio.h" #include "Screen_Wind.h" #include "Stupefy.h" +#include "Lightning.h" +#include "LightningSide.h" +#include "Blink.h" CEffectPool::CEffectPool(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) : CGameObject(pDevice, pContext) @@ -145,7 +148,7 @@ void CEffectPool::Priority_Update(_float fTimeDelta) #if 진우 - (*m_EffectList[ENUM_CLASS(SKILL_TYPE::ACCIO)].begin())->Describe_Entity(); + (*m_EffectList[ENUM_CLASS(SKILL_TYPE::BLINK)].begin())->Describe_Entity(); Describe_Entity(); @@ -381,6 +384,33 @@ HRESULT CEffectPool::Ready_Effect() return pEffect; } ))) return E_FAIL; + if (FAILED(Create_Effect(SKILL_TYPE::LIGHTNING, 3, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + + CLightning* pEffect = nullptr; + + pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr); + + return pEffect; } + ))) return E_FAIL; + + if (FAILED(Create_Effect(SKILL_TYPE::LIGHTNING_SIDE, 3, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + + CLightningSide* pEffect = nullptr; + + pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr); + + return pEffect; } + ))) return E_FAIL; + + + if (FAILED(Create_Effect(SKILL_TYPE::BLINK, 3, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + + CBlink* 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 a5b50cbbd..bb1f8fc3c 100644 --- a/Jusin154_Team3D/Client/Private/Effect_Container.cpp +++ b/Jusin154_Team3D/Client/Private/Effect_Container.cpp @@ -714,6 +714,11 @@ ON_COLLISION_INFO CEffect_Container::SweepTarget(_vector StartPos, _vector EndPo m_bHit = true; } break; + case PXOBJECT::RANROK: + { + pUserData->pOwner->OnCollision(this, &tagCollInfo); + m_bHit = true; + } } } } diff --git a/Jusin154_Team3D/Client/Private/Goblin.cpp b/Jusin154_Team3D/Client/Private/Goblin.cpp index dfa433348..8b797e76d 100644 --- a/Jusin154_Team3D/Client/Private/Goblin.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin.cpp @@ -9,6 +9,7 @@ #include "Goblin_Spector.h" #include "Effect_Container.h" #include "EffectPool.h" +#include "MapElement_Interactable.h" #pragma region STATE #include "State_Idle.h" @@ -292,32 +293,50 @@ void CGoblin::OnCollision(CGameObject* pOther, void* 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)); + + CEffect_Container* pEffect_Container = dynamic_cast(pOther); - switch (iSkillType) + pair<_float, _float> damagePair = {}; + + if (pEffect_Container != nullptr) { - case ENUM_CLASS(SKILL_TYPE::DESCENDO): - m_eHitSpell = ENUM_CLASS(SKILL_TYPE::DESCENDO); - break; - case ENUM_CLASS(SKILL_TYPE::BOMBARDA): - m_eHitSpell = ENUM_CLASS(SKILL_TYPE::BOMBARDA); - break; - case ENUM_CLASS(SKILL_TYPE::JAP): + _uint iSkillType = pEffect_Container->Get_SkillType(); + damagePair = Get_Damage(m_pInfoInstance->Get_Spell_Damage(iSkillType)); + + switch (iSkillType) + { + case ENUM_CLASS(SKILL_TYPE::DESCENDO): + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::DESCENDO); + break; + case ENUM_CLASS(SKILL_TYPE::BOMBARDA): + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::BOMBARDA); + break; + case ENUM_CLASS(SKILL_TYPE::JAP): + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::JAP); + break; + case ENUM_CLASS(SKILL_TYPE::LEVIOSO): + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::LEVIOSO); + break; + case ENUM_CLASS(SKILL_TYPE::ACCIO): + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::ACCIO); + break; + case ENUM_CLASS(SKILL_TYPE::STUPEFY): + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::STUPEFY); + break; + } + } + else { - m_eHitSpell = ENUM_CLASS(SKILL_TYPE::JAP); - } - break; - case ENUM_CLASS(SKILL_TYPE::LEVIOSO): - m_eHitSpell = ENUM_CLASS(SKILL_TYPE::LEVIOSO); - break; - case ENUM_CLASS(SKILL_TYPE::ACCIO): - m_eHitSpell = ENUM_CLASS(SKILL_TYPE::ACCIO); - break; + damagePair = Get_Damage(m_pInfoInstance->Get_Spell_Damage(ENUM_CLASS(SKILL_TYPE::ANCIENT_MAGIC_THROW))); + CMapElement_Interactable* pProps = dynamic_cast(pOther); + if (pProps != nullptr) + { + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::ANCIENT_MAGIC_THROW); + } } + m_DamageInfo.fDamage = damagePair.first; m_pInfoInstance->Event_CallBack(TEXT("Monster_Hit"), &m_DamageInfo); if (0 == damagePair.second) { diff --git a/Jusin154_Team3D/Client/Private/Goblin_Mage.cpp b/Jusin154_Team3D/Client/Private/Goblin_Mage.cpp index 6ce105aa7..e13fe5720 100644 --- a/Jusin154_Team3D/Client/Private/Goblin_Mage.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin_Mage.cpp @@ -8,6 +8,7 @@ #include "Goblin_Dagger.h" #include "Effect_Container.h" #include "EffectParts.h" +#include "MapElement_Interactable.h" #pragma region STATE #include "State_Idle.h" @@ -132,7 +133,7 @@ void CGoblin_Mage::Late_Update(_float fTimeDelta) } if (true == m_bLookAt) { - m_pTransformCom->LookAt_Lerp(XMLoadFloat4(&m_vTargetPos),fTimeDelta,3.f); + m_pTransformCom->LookAt_Horizontal_Lerp(XMLoadFloat4(&m_vTargetPos),fTimeDelta,3.f); } m_fHoverTime += fTimeDelta; @@ -285,34 +286,49 @@ void CGoblin_Mage::OnCollision(CGameObject* pOther, void* pDesc) Check_HitAngle(XMLoadFloat4(&CollisionDesc->vHitDir)); - _uint iSkillType = dynamic_cast(pOther)->Get_SkillType(); - m_fHitRadius = CMyTools::Get_Direction2D(m_pTransformCom->Get_State(STATE::LOOK), XMLoadFloat4(&CollisionDesc->vHitDir)); - switch (iSkillType) + CEffect_Container* pEffect_Container = dynamic_cast(pOther); + + pair<_float, _float> damagePair = {}; + + if (pEffect_Container != nullptr) { - case ENUM_CLASS(SKILL_TYPE::DESCENDO): - m_eHitSpell = ENUM_CLASS(SKILL_TYPE::DESCENDO); - break; - case ENUM_CLASS(SKILL_TYPE::BOMBARDA): - m_eHitSpell = ENUM_CLASS(SKILL_TYPE::BOMBARDA); - break; - case ENUM_CLASS(SKILL_TYPE::JAP): - { - m_eHitSpell = ENUM_CLASS(SKILL_TYPE::JAP); + _uint iSkillType = pEffect_Container->Get_SkillType(); + damagePair = Get_Damage(m_pInfoInstance->Get_Spell_Damage(iSkillType)); + + switch (iSkillType) + { + case ENUM_CLASS(SKILL_TYPE::DESCENDO): + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::DESCENDO); + break; + case ENUM_CLASS(SKILL_TYPE::BOMBARDA): + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::BOMBARDA); + break; + case ENUM_CLASS(SKILL_TYPE::JAP): + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::JAP); + break; + case ENUM_CLASS(SKILL_TYPE::LEVIOSO): + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::LEVIOSO); + break; + case ENUM_CLASS(SKILL_TYPE::ACCIO): + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::ACCIO); + break; + case ENUM_CLASS(SKILL_TYPE::STUPEFY): + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::STUPEFY); + break; + } } - break; - case ENUM_CLASS(SKILL_TYPE::LEVIOSO): - m_eHitSpell = ENUM_CLASS(SKILL_TYPE::LEVIOSO); - break; - case ENUM_CLASS(SKILL_TYPE::ACCIO): - m_eHitSpell = ENUM_CLASS(SKILL_TYPE::ACCIO); - break; + else + { + damagePair = Get_Damage(m_pInfoInstance->Get_Spell_Damage(ENUM_CLASS(SKILL_TYPE::ANCIENT_MAGIC_THROW))); + CMapElement_Interactable* pProps = dynamic_cast(pOther); + if (pProps != nullptr) + { + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::ANCIENT_MAGIC_THROW); + } } - if (!m_pFSM->IsEnable(FSMSTATE::BLINK)) { - m_pFSM->Change_State(FSMSTATE::HIT); - } #ifdef _DEBUG if (m_isDebugMode == true) @@ -320,8 +336,6 @@ void CGoblin_Mage::OnCollision(CGameObject* pOther, void* pDesc) #endif - auto damagePair = Get_Damage(m_pInfoInstance->Get_Spell_Damage(iSkillType)); - m_DamageInfo.fDamage = damagePair.first; m_pInfoInstance->Event_CallBack(TEXT("Monster_Hit"), &m_DamageInfo); if (0 == damagePair.second) { @@ -331,8 +345,9 @@ void CGoblin_Mage::OnCollision(CGameObject* pOther, void* pDesc) return; } - - + if (!m_pFSM->IsEnable(FSMSTATE::BLINK)) { + m_pFSM->Change_State(FSMSTATE::HIT); + } } void CGoblin_Mage::OnHit(CGameObject* pOther, CGameObject* pCaller) diff --git a/Jusin154_Team3D/Client/Private/Goblin_Mage_States.cpp b/Jusin154_Team3D/Client/Private/Goblin_Mage_States.cpp index 989517508..09971bdeb 100644 --- a/Jusin154_Team3D/Client/Private/Goblin_Mage_States.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin_Mage_States.cpp @@ -426,6 +426,9 @@ void CGoblin_Mage::Behavior_HitEnter() case ENUM_CLASS(SKILL_TYPE::ACCIO): pairAnimInfo = m_Animation[STATEANIM::INCARCEROUS]; break; + default: + pairAnimInfo = m_Animation[STATEANIM::STUMBLE_BWD_L]; + break; } m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); diff --git a/Jusin154_Team3D/Client/Private/Goblin_States.cpp b/Jusin154_Team3D/Client/Private/Goblin_States.cpp index 4a27dbefb..91814319a 100644 --- a/Jusin154_Team3D/Client/Private/Goblin_States.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin_States.cpp @@ -132,6 +132,7 @@ HRESULT CGoblin::Behavior_MoveExitCheck(_float fTimeDelta) _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex(); + if (m_fTargetDistance >= 6.f) { pairAnimInfo = m_Animation[STATEANIM::JOG_FWD]; @@ -182,7 +183,8 @@ 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 >= 4.f && m_fTargetDistance != 0.f) { m_pFSM->Change_State(FSMSTATE::COMBAT); return E_FAIL; @@ -508,6 +510,9 @@ void CGoblin::Behavior_HitEnter() case ENUM_CLASS(SKILL_TYPE::ACCIO): pairAnimInfo = m_Animation[STATEANIM::INCARCEROUS]; break; + default: + pairAnimInfo = m_Animation[STATEANIM::STUMBLE_BWD_R]; + break; } m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); @@ -611,11 +616,7 @@ void CGoblin::Behavior_DeadEnter() m_bLookAt = false; pair<_uint, _bool> pairAnimInfo = {}; m_pFSM->Enable_State(FSMSTATE::DEAD); - 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); + m_pCharacter_Controller->SetGravity(true); _bool bStrongerKnockDown = { false }; @@ -650,15 +651,13 @@ void CGoblin::Behavior_DeadEnter() } pairAnimInfo = m_Animation[iState + bStrongerKnockDown]; - //Get_PartObject("Goblin_Particle")->Set_Visible(false); - //Get_PartObject("Goblin_Particle2")->Set_Visible(false); - //Get_PartObject("Goblin_Smoke")->Set_Visible(false); m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); } HRESULT CGoblin::Behavior_DeadExitCheck(_float fTimeDelta) { if (FLT_EPSILON > m_pModelCom->Get_CurrentTrackProgressRatio()) { + return E_PENDING; } return S_OK; @@ -769,6 +768,11 @@ void CGoblin::Add_FSM() Desc.funcLateUpdate = [this](_float fDeadRatio) { m_fDeadRatio = fDeadRatio; if (m_fDeadRatio > 1.f) { + 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); m_bDead = true; } }; diff --git a/Jusin154_Team3D/Client/Private/InfoInstance.cpp b/Jusin154_Team3D/Client/Private/InfoInstance.cpp index 38ff9bf1a..b39e9f88a 100644 --- a/Jusin154_Team3D/Client/Private/InfoInstance.cpp +++ b/Jusin154_Team3D/Client/Private/InfoInstance.cpp @@ -8,6 +8,7 @@ #include "Skill_Data.h" #include "Quest_Data.h" #include "Damage_Font.h" +#include "SpellLearn_Data.h" #include "Player.h" IMPLEMENT_SINGLETON(CInfoInstance) @@ -206,6 +207,18 @@ void CInfoInstance::Key_Input(_uint Input) Event_CallBack(TEXT("Canvas_Change"), &m_eUI_State); } break; + case ENUM_CLASS(KEYINPUT::INPUT_ESPACE): + if (m_eUI_State == UI_STATE::GAMEPLAYER) + { + m_eUI_State = UI_STATE::SPELLNEARN; + Event_CallBack(TEXT("Canvas_Change"), &m_eUI_State); + } + else if (m_eUI_State == UI_STATE::SPELLNEARN) + { + m_eUI_State = UI_STATE::GAMEPLAYER; + Event_CallBack(TEXT("Canvas_Change"), &m_eUI_State); + } + break; default: break; @@ -292,6 +305,16 @@ HRESULT CInfoInstance::Set_AcceptQuest(_int Index) return m_pQuestInfo->Set_AcceptQuest(Index); } +const SPELLLEARNINFO& CInfoInstance::Get_SpellLearn(_int Index) const +{ + return m_pSpellLearn_Data->Get_SpellLearn(Index); +} + +_int CInfoInstance::Get_SpellLearnIndex() +{ + return m_pSpellLearn_Data->Get_Index(); +} + HRESULT CInfoInstance::Regist_ActiveInteractive(CMapElement_Interactable* pInteractive) { if (nullptr == s_pInstance || nullptr == m_pInteractiveInfo) { @@ -355,6 +378,10 @@ HRESULT CInfoInstance::Initialize_Information(ID3D11Device* pDevice, ID3D11Devic if (nullptr == m_pInteractiveInfo) { return E_FAIL; } + m_pSpellLearn_Data = CSpellLearn_Data::Create(pDevice, pContext); + if (nullptr == m_pSpellLearn_Data) { + return E_FAIL; + } return S_OK; } @@ -393,12 +420,14 @@ void CInfoInstance::Release_Information() DestroyInstance(); + SAFE_RELEASE(m_pSpellLearn_Data); SAFE_RELEASE(m_pMapInfo); SAFE_RELEASE(m_pPlayerInfo); SAFE_RELEASE(m_pMonsterInfo); SAFE_RELEASE(m_pSkillInfo); SAFE_RELEASE(m_pQuestInfo); SAFE_RELEASE(m_pInteractiveInfo); + SAFE_RELEASE(m_pSpellLearn_Data); SAFE_RELEASE(m_pDevice); SAFE_RELEASE(m_pContext); SAFE_RELEASE(m_pGameInstance); diff --git a/Jusin154_Team3D/Client/Private/Level_Field.cpp b/Jusin154_Team3D/Client/Private/Level_Field.cpp index 5fe834289..20f3c0f6f 100644 --- a/Jusin154_Team3D/Client/Private/Level_Field.cpp +++ b/Jusin154_Team3D/Client/Private/Level_Field.cpp @@ -8,7 +8,7 @@ #include "Camera_Debug.h" #include "Terrain.h" #include "SkyBox.h" - +#include "Ranrok.h" CLevel_Field::CLevel_Field(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID) : CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) } { @@ -42,6 +42,9 @@ HRESULT CLevel_Field::Initialize(void* pArg) if (FAILED(Ready_Layer_Effect(LAYER_EFFECT))) { return E_FAIL; } + if (FAILED(Ready_Layer_Monster())) { + return E_FAIL; + } return S_OK; } @@ -210,6 +213,15 @@ HRESULT CLevel_Field::Ready_Layer_Effect(const _wstring& strLayerTag) return S_OK; } +HRESULT CLevel_Field::Ready_Layer_Monster() +{ + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) { + return E_FAIL; + } + + return S_OK; +} + pair> CLevel_Field::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID, void* pArg) { CLevel_Field* pInstance = new CLevel_Field(pDevice, pContext, eLevelID); diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp index 0a0c0d30c..84ff31e33 100644 --- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp +++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp @@ -28,7 +28,7 @@ #include "Goblin_Spector.h" #include "NPC_Ollivander.h" #include "BroomRacerAI.h" -#include "Ranrak.h" +#include "Ranrok.h" #pragma endregion @@ -249,7 +249,7 @@ HRESULT CLevel_GamePlay::Ready_Background() isReady_Background = true; #endif // gimch #ifdef Bin - isReady_Background = false; + isReady_Background = true; #endif // #ifdef 진우 isReady_Background = false; @@ -258,7 +258,7 @@ HRESULT CLevel_GamePlay::Ready_Background() isReady_Background = true; #endif // #ifdef 인혁 - isReady_Background = true; + isReady_Background = false; #endif // @@ -621,14 +621,14 @@ HRESULT CLevel_GamePlay::Ready_Layer_SkyBox(const _wstring& strLayerTag) HRESULT CLevel_GamePlay::Ready_Layer_Monster() { - for (_uint i = 0; i <1; ++i) + for (_uint i = 0; i <0; ++i) { if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) { return E_FAIL; } } - for (_uint i = 0; i <1; ++i) + for (_uint i = 0; i <0; ++i) { if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) { return E_FAIL; @@ -640,9 +640,14 @@ HRESULT CLevel_GamePlay::Ready_Layer_Monster() return E_FAIL; } +#if 진우 +#else if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) { return E_FAIL; } +#endif + + return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Lightning.cpp b/Jusin154_Team3D/Client/Private/Lightning.cpp new file mode 100644 index 000000000..975c21975 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Lightning.cpp @@ -0,0 +1,243 @@ +#include "pch.h" +#include "Lightning.h" + +#include "GameInstance.h" +#include "EffectParts.h" +#include "Wand.h" +#include "Player.h" +#include "InfoInstance.h" + +CLightning::CLightning(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CEffect_Container{ pDevice, pContext } +{ +} + +CLightning::CLightning(const CLightning& rhs) + : CEffect_Container(rhs), + m_pInfoInstance(CInfoInstance::GetInstance()) +{ +} + +HRESULT CLightning::Initialize_Prototype() +{ + + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Lightning"))) + return E_FAIL; + + return S_OK; + +} + +HRESULT CLightning::Initialize(void* pArg) +{ + if (FAILED(__super::Initialize(pArg))) + return E_FAIL; + + if (FAILED(Ready_Components(pArg))) + return E_FAIL; + + if (FAILED(Create_Effect())) + return E_FAIL; + + m_iSkillType = ENUM_CLASS(SKILL_TYPE::LIGHTNING); + + m_wstrEffectName = L"Lightning"; + + m_Events.emplace(0.5f, [&]() { + + _float fShakeValue = clamp(15.f / m_fDistance, 2.f, 5.f); + + static_cast(m_pOwner->Get_Owner())->Start_CameraShake(0.5f, fShakeValue); + + }); + + + m_fDuration = 5.5f; + + return S_OK; +} + +void CLightning::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); + + +} + +void CLightning::Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Update(fTimeDelta); + + Update_Event(fTimeDelta); + +} + +void CLightning::Late_Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Late_Update(fTimeDelta); + + //if (false == m_bHit) { + // _vector vStartPos = XMLoadFloat4(&m_vStartPos); + // _vector vEndPos = XMLoadFloat4(&m_vEndPos); + // ON_COLLISION_INFO CollisionInfo = SweepTarget(vStartPos, vEndPos, 0.002f , true); + + // OnCollision(this, &CollisionInfo); + //} + +} + +HRESULT CLightning::Pre_Setting(CGameObject* pObject, void* pArg) +{ + if (FAILED(__super::Pre_Setting(pObject, nullptr))) + return E_FAIL; + + CWand* pWand = static_cast(m_pOwner); + + if (pWand == nullptr) + return E_FAIL; + + + CPartObject* pBottomLightning = Get_PartObject("BottomLightning"); + CPartObject* pFlare = Get_PartObject("Flare"); + CPartObject* pHitPT0 = Get_PartObject("HitPT0"); + CPartObject* pLightning_Tornado_PT = Get_PartObject("Lightning_Tornado_PT"); + CPartObject* pLightning0 = Get_PartObject("Lightning0"); + CPartObject* pStart_Line = Get_PartObject("Start_Line"); + CPartObject* pLightning_Smoke = Get_PartObject("Lightning_Smoke"); + CPartObject* pLightning_Rock_PT = Get_PartObject("Lightning_Rock_PT"); + + _vector vDirection = m_pOwner->Get_Component()->Get_State(STATE::LOOK); + XMStoreFloat3(&m_vCameraLook, vDirection); + + _vector vStartPos = pWand->Get_Owner()->Get_Component()->Get_FootPosition(); + XMStoreFloat4(&m_vStartPos, vStartPos); + + { /* 대상 위치 지정 */ + + m_pInfoInstance->Get_LockOnInfo(m_Info); + if (nullptr != m_Info.pUnit) { + + XMStoreFloat4(&m_vTargetPos, m_Info.pUnit->Get_Component()->Get_FootPosition()); + + XMStoreFloat3(&m_vCameraLook, XMVector3Normalize(XMLoadFloat4(&m_vTargetPos) - XMLoadFloat4(&m_vStartPos))); + } + else { + // 타겟이 없다면 현재위치 -> 카메라 룩벡터 * duration간 예상 이동거리 를 대상으로 지정 + XMStoreFloat4(&m_vTargetPos, vStartPos + vDirection * m_fLinearSpeed * 0.5f); + } + } + + pBottomLightning->Set_Visible(true); + pFlare->Set_Visible(true); + pHitPT0->Set_Visible(true); + pLightning_Tornado_PT->Set_Visible(true); + pLightning0->Set_Visible(true); + pStart_Line->Set_Visible(true); + pLightning_Smoke->Set_Visible(true); + //pLightning_Rock_PT->Set_Visible(true); + + pBottomLightning->Get_Component()->Set_State(STATE::POSITION, XMLoadFloat4(&m_vTargetPos)); + pFlare->Get_Component()->Set_State(STATE::POSITION, XMLoadFloat4(&m_vTargetPos)); + pHitPT0->Get_Component()->Set_State(STATE::POSITION, XMLoadFloat4(&m_vTargetPos)); + pLightning_Tornado_PT->Get_Component()->Set_State(STATE::POSITION, XMLoadFloat4(&m_vTargetPos)); + pLightning0->Get_Component()->Set_State(STATE::POSITION, XMLoadFloat4(&m_vTargetPos)); + pStart_Line->Get_Component()->Set_State(STATE::POSITION, XMLoadFloat4(&m_vTargetPos)); + pLightning_Smoke->Get_Component()->Set_State(STATE::POSITION, XMLoadFloat4(&m_vTargetPos)); + //pLightning_Rock_PT->Get_Component()->Set_State(STATE::POSITION, XMLoadFloat4(&m_vTargetPos)); + + m_fDistance = XMVectorGetX(XMVector3Length(XMLoadFloat4(&m_vTargetPos) - XMLoadFloat4(&m_vStartPos))); + + + + return S_OK; +} + +HRESULT CLightning::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CLightning::Ready_Child() +{ + return S_OK; +} + +CLightning* CLightning::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CLightning* pInstance = new CLightning(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CLightning"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + + +CGameObject* CLightning::Clone(void* pArg, CGameObject* pOwner) +{ + CLightning* pInstance = new CLightning(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CLightning"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CLightning::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); + } + + CWand* pWand = static_cast(m_pOwner)->Get_PartObject(); + + if (pWand == nullptr) + return; + + +} + +void CLightning::Free() +{ + __super::Free(); + +} +#ifdef _DEBUG +void CLightning::Describe_Entity() +{ + +} +#endif + +HRESULT CLightning::Bind_ShaderResources() +{ + return S_OK; +} + + diff --git a/Jusin154_Team3D/Client/Private/LightningSide.cpp b/Jusin154_Team3D/Client/Private/LightningSide.cpp new file mode 100644 index 000000000..55d0fd830 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/LightningSide.cpp @@ -0,0 +1,204 @@ +#include "pch.h" +#include "LightningSide.h" + +#include "GameInstance.h" +#include "EffectParts.h" +#include "Player.h" +#include "Wand.h" +#include "TrailObject.h" + + +CLightningSide::CLightningSide(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CEffect_Container{ pDevice, pContext } + +{ +} + +CLightningSide::CLightningSide(const CLightningSide& rhs) + : CEffect_Container(rhs) +{ +} + +HRESULT CLightningSide::Initialize_Prototype() +{ + + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/LightningSide"))) + return E_FAIL; + + return S_OK; + +} + +HRESULT CLightningSide::Initialize(void* pArg) +{ + if (FAILED(__super::Initialize(pArg))) + return E_FAIL; + + if (FAILED(Ready_Components(pArg))) + return E_FAIL; + + if (FAILED(Create_Effect())) + return E_FAIL; + + m_wstrEffectName = L"LightningSide"; + + m_pWandLight = Get_PartObject("Wand_Light_B"); + m_pWandTrail = Get_PartObject(); + + SAFE_ADDREF(m_pWandLight); + SAFE_ADDREF(m_pWandTrail); + + m_fDuration = 3.f; + + m_Events.emplace(0.5f, [&]() { + CWand* pWand = static_cast(m_pOwner); + + if (pWand == nullptr) + return; + + m_isTrailEnd = true; + + XMStoreFloat4x4(&m_TrailStopMat, pWand->Get_WorldMatrix()); + }); + + return S_OK; +} + +void CLightningSide::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); + +} + +void CLightningSide::Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Update(fTimeDelta); + + Update_Event(fTimeDelta); + + + CWand* pWand = static_cast(m_pOwner); + + if (pWand == nullptr) + return; + + m_pWandLight->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion()); + + _matrix TrailMat = m_isTrailEnd ? XMLoadFloat4x4(&m_TrailStopMat) : pWand->Get_WorldMatrix(); + m_pWandTrail->Trail_Update(TrailMat, fTimeDelta); + +} + +void CLightningSide::Late_Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Late_Update(fTimeDelta); + + +} + +HRESULT CLightningSide::Pre_Setting(CGameObject* pObject, void* pArg) +{ + if (FAILED(__super::Pre_Setting(pObject, nullptr))) + return E_FAIL; + + + CWand* pWand = static_cast(m_pOwner); + + if (pWand == nullptr) + return E_FAIL; + + m_isTrailEnd = false; + + CEffectParts* pWand_Lightning = Get_PartObject("Wand_Lightning"); + + m_pWandLight->Set_Visible(true); + pWand_Lightning->Set_Visible(true); + + /*트레일 초기화 */ + m_pWandTrail->Set_Visible(true); + m_pWandTrail->Get_Component()->Reset_Trail(); + + /*_vector pPos = pPlayer->Get_WandPos().r[3];*/ + + m_pWandLight->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion()); + pWand_Lightning->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion()); + + return S_OK; +} + +HRESULT CLightningSide::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CLightningSide::Ready_Child() +{ + return S_OK; +} + +CLightningSide* CLightningSide::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CLightningSide* pInstance = new CLightningSide(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CLightningSide"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + + +CGameObject* CLightningSide::Clone(void* pArg, CGameObject* pOwner) +{ + CLightningSide* pInstance = new CLightningSide(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CLightningSide"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CLightningSide::OnCollision(CGameObject* pOther, void* pDesc) +{ + ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc); + +} + +void CLightningSide::Free() +{ + __super::Free(); + + + Safe_Release(m_pWandLight); + Safe_Release(m_pWandTrail); +} +#ifdef _DEBUG + +void CLightningSide::Describe_Entity() +{ + +} + +#endif // _DEBUG + +HRESULT CLightningSide::Bind_ShaderResources() +{ + return S_OK; +} + + diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index 97b783d97..884442ef4 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -32,7 +32,7 @@ #include "Troll.h" #include "NPC_Ollivander.h" #include "BroomRacerAI.h" -#include "Ranrak.h" +#include "Ranrok.h" #pragma endregion @@ -113,6 +113,12 @@ #include "QuestInstance.h" +#include "SpellLearn_Canvas.h" +#include "SpellLearn_Panel.h" +#include "SpellLearn_Name.h" +#include "SpellLearn.h" +#include "SpellLearn_MovePointer.h" + #include "Interaction_Key.h" #pragma endregion @@ -145,6 +151,7 @@ #include "Levioso.h" #include "Lumos.h" #include "Accio.h" +#include "Blink.h" #include "Goblin_Teleport.h" @@ -152,6 +159,7 @@ #include "Troll_Nomal_Smoke.h" #include "Troll_Rush_Hit.h" + #include "WandEnd.h" #include "Goblin_Protego.h" #include "Goblin_Attack.h" @@ -166,6 +174,8 @@ #include "Barral_Splesh.h" #include "Screen_Wind.h" #include "Stupefy.h" +#include "Lightning.h" +#include "LightningSide.h" #pragma endregion @@ -329,16 +339,16 @@ HRESULT CLoader::Loading_For_GamePlay() isLoad_Background = true; #endif // gimch #ifdef Bin - isLoad_Background = false; + isLoad_Background = true; #endif // #ifdef 진우 isLoad_Background = false; #endif // #ifdef 기무리 - isLoad_Background = true; + isLoad_Background = flase; #endif // #ifdef 인혁 - isLoad_Background = true; + isLoad_Background = false; #endif // #pragma region MAP_MODELS @@ -732,6 +742,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/SpellUnlock", 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; @@ -929,6 +955,7 @@ HRESULT CLoader::Loading_For_GamePlay() #pragma endregion #if 진우 #elif 기무리 +#elif 인혁 #elif Bin #elif gimch #else @@ -1587,7 +1614,7 @@ HRESULT CLoader::Loading_For_GamePlay() return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Ranrak_Model"), + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Ranrok_Model"), CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/Dragon/Dragon.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) { return E_FAIL; } @@ -1749,8 +1776,18 @@ HRESULT CLoader::Loading_For_GamePlay() return E_FAIL; } + if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CLightning::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CLightningSide::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CBlink::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } - if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CGoblin_Teleport::Create(m_pDevice, m_pContext)))) { return E_FAIL; @@ -2066,13 +2103,39 @@ HRESULT CLoader::Loading_For_GamePlay() if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CQuest_Status::Create(m_pDevice, m_pContext)))) { return E_FAIL; - /* For.Prototype_GameObject_Quest_Slot*/ } + /* For.Prototype_GameObject_Quest_Slot*/ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CQuest_Slot::Create(m_pDevice, m_pContext)))) { return E_FAIL; } + /* For.Prototype_GameObject_SpellLearn_Canvas*/ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpellLearn_Canvas::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + /* For.Prototype_GameObject_SpellLearn_Panel*/ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpellLearn_Panel::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + /* For.Prototype_GameObject_SpellLearn_Name*/ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpellLearn_Name::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + /* For.Prototype_GameObject_SpellLearn*/ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpellLearn::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + /* For.Prototype_GameObject_SpellLearn_MovePointer*/ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpellLearn_MovePointer::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + /* For.Prototype_GameObject_Interaction_Key*/ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CInteraction_Key::Create(m_pDevice, m_pContext)))) { @@ -2392,8 +2455,8 @@ HRESULT CLoader::Loading_For_GamePlay() return E_FAIL; } - /* For.Prototype_GameObject_Ranrak */ - if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRanrak::Create(m_pDevice, m_pContext)))) { + /* For.Prototype_GameObject_Ranrok */ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRanrok::Create(m_pDevice, m_pContext)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/MainApp.cpp b/Jusin154_Team3D/Client/Private/MainApp.cpp index 09702f732..21ca68f0c 100644 --- a/Jusin154_Team3D/Client/Private/MainApp.cpp +++ b/Jusin154_Team3D/Client/Private/MainApp.cpp @@ -116,6 +116,12 @@ HRESULT CMainApp::Ready_Default_Setting() if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size21"), TEXT("../Bin/Resources/Fonts/Font_size21.spritefont")))) return E_FAIL; + if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size22"), TEXT("../Bin/Resources/Fonts/Font_size22.spritefont")))) + return E_FAIL; + + if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size23"), TEXT("../Bin/Resources/Fonts/Font_size23.spritefont")))) + return E_FAIL; + if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size30"), TEXT("../Bin/Resources/Fonts/Font_size30.spritefont")))) return E_FAIL; diff --git a/Jusin154_Team3D/Client/Private/Monster.cpp b/Jusin154_Team3D/Client/Private/Monster.cpp index 87f1a465a..6b0559e62 100644 --- a/Jusin154_Team3D/Client/Private/Monster.cpp +++ b/Jusin154_Team3D/Client/Private/Monster.cpp @@ -55,6 +55,19 @@ void CMonster::Update(_float fTimeDelta) void CMonster::Late_Update(_float fTimeDelta) { __super::Late_Update(fTimeDelta); + + + _vector vDir = XMLoadFloat4(&m_vTargetPos) - Get_WorldPostion(); + vDir = XMVector4Normalize(vDir); + _vector vLook = XMVector3Normalize( + XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f)); + _float dot = XMVectorGetX(XMVector3Dot(vLook, vDir)); + dot = max(-1.f, min(1.f, dot)); + + _float angle = acosf(dot); + m_fDegree = XMConvertToDegrees(angle); + + m_fCross = XMVectorGetY(XMVector3Cross(vLook, vDir)); } HRESULT CMonster::Render_DeadDisolve() diff --git a/Jusin154_Team3D/Client/Private/Player.cpp b/Jusin154_Team3D/Client/Private/Player.cpp index b8b0f4be9..fe45c113b 100644 --- a/Jusin154_Team3D/Client/Private/Player.cpp +++ b/Jusin154_Team3D/Client/Private/Player.cpp @@ -114,6 +114,9 @@ HRESULT CPlayer::Initialize(void* pArg) m_pInfoInstance->Add_Event(TEXT("Canvas_Change"), [this](void* p) {this->Get_UIState(*reinterpret_cast<_int*>(p)); }); m_bAI = false; + + XMLoadFloat4x4(m_pBroomModel->Get_BoneMatrixPtr("broomSocket")); + return S_OK; } @@ -133,15 +136,15 @@ void CPlayer::Update(_float fTimeDelta) UpdateGrapInteractive(fTimeDelta); m_pFSM->Update_State(fTimeDelta); - float ratio = m_pModelCom->Get_CurrentTrackProgressRatio(); +/* _float ratio = m_pModelCom->Get_CurrentTrackProgressRatio(); - float ease = 1.f; + _float ease = 1.f; if (ratio < 0.4f) ease = 1.15f; else if (ratio > 0.85f) - ease = 0.85f; + ease = 0.85f; */ - m_pModelCom->Play_Animation(fTimeDelta * ease, m_pTransformCom); + m_pModelCom->Play_Animation(fTimeDelta /** ease*/, m_pTransformCom); Play_Event(); @@ -220,7 +223,7 @@ void CPlayer::Late_Update(_float fTimeDelta) if (m_bLookAt && m_LockOnInfo.pUnit) { - m_pTransformCom->LookAt_Lerp(m_LockOnInfo.pUnit->Get_WorldPostion(), fTimeDelta, 5.f); + m_pTransformCom->LookAt_Horizontal_Lerp(m_LockOnInfo.pUnit->Get_WorldPostion(), fTimeDelta, 8.f); } //////////////////////////////////////////////////////////////////////////// _vector look = XMVector3Normalize(m_pTransformCom->Get_State(STATE::LOOK)); @@ -521,6 +524,8 @@ HRESULT CPlayer::Ready_Parts() return E_FAIL; } + + return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Player_States.cpp b/Jusin154_Team3D/Client/Private/Player_States.cpp index 6350d24fa..0131c5d3d 100644 --- a/Jusin154_Team3D/Client/Private/Player_States.cpp +++ b/Jusin154_Team3D/Client/Private/Player_States.cpp @@ -19,6 +19,7 @@ #pragma region STATE #include "State_Idle.h" #include "State_Dodge.h" +#include "State_Blink.h" #include "State_Jump.h" #include "State_Land.h" #include "State_Slide.h" @@ -73,6 +74,7 @@ HRESULT CPlayer::InputAction() || m_pGameInstance->Key_Down(DIK_B) || m_pGameInstance->Key_Down(DIK_T) || m_pGameInstance->Key_Down(DIK_TAB) + || m_pGameInstance->Key_Down(DIK_ESCAPE) ) { if (m_pGameInstance->Key_Down(DIK_T)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_T)); @@ -80,6 +82,7 @@ HRESULT CPlayer::InputAction() if (m_pGameInstance->Key_Down(DIK_X)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_X)); if (m_pGameInstance->Key_Down(DIK_G)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_G)); if (m_pGameInstance->Key_Down(DIK_Z)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_Z)); + if (m_pGameInstance->Key_Down(DIK_ESCAPE)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_ESPACE)); return S_OK; } } @@ -242,6 +245,9 @@ HRESULT CPlayer::Behavior_IdleExitCheck(_float fTimeDelta) else if (m_pGameInstance->Key_Down(DIK_Z)) { m_pFSM->Change_State(FSMSTATE::COMBAT); } + else if (m_pGameInstance->Key_Down(DIK_N)) { + m_pInfoInstance->Change_Canvas(); + } return E_FAIL; } @@ -342,7 +348,7 @@ void CPlayer::Behavior_MoveEnter() _bool bRight = m_pGameInstance->Key_Pressing(DIK_D); _bool bBackward = m_pGameInstance->Key_Pressing(DIK_S); m_pFSM->Enable_State(FSMSTATE::MOVE); - if (m_pFSM->IsEnable_Previous(FSMSTATE::IDLE | FSMSTATE::DODGE)) { + if (m_pFSM->IsEnable_Previous(FSMSTATE::IDLE | FSMSTATE::DODGE | FSMSTATE::LAND)) { if (m_pFSM->IsEnable_Previous(FSMSTATE::IDLE)) { @@ -749,6 +755,7 @@ void CPlayer::Behavior_MoveExit() void CPlayer::Behavior_JumpEnter() { pair<_uint, _bool> pairAnimInfo; + m_fOriginGravityAmount = m_pCharacter_Controller->Get_GravityAmount(); m_pFSM->Enable_State(FSMSTATE::JUMP); if (m_pFSM->IsEnable_Previous(FSMSTATE::IDLE | FSMSTATE::WALK | FSMSTATE::JOG | FSMSTATE::SPRINT)) { if (m_pFSM->IsEnable_Previous(FSMSTATE::IDLE)) { @@ -772,6 +779,8 @@ void CPlayer::Behavior_JumpEnter() HRESULT CPlayer::Behavior_JumpExitCheck() { + pair<_uint, _bool> pairAnimInfo; + _int iCurrAnim = m_pModelCom->Get_AnimIndex(); _float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio(); if (m_pGameInstance->Key_Down(DIK_B)) @@ -779,8 +788,9 @@ HRESULT CPlayer::Behavior_JumpExitCheck() m_pFSM->Change_State(FSMSTATE::BROOM_RIDE); return E_FAIL; } + - if (fRatio>=0.6f) { + if (fRatio >= 0.5f) { m_pFSM->Change_State(FSMSTATE::LAND); return E_FAIL; } @@ -794,28 +804,52 @@ void CPlayer::Behavior_JumpExit() void CPlayer::Behavior_LandEnter() { + pair<_uint, _bool> pairAnimInfo; m_pFSM->Enable_State(FSMSTATE::LAND); - pair<_uint, _bool> pairAnimInfo = m_Animation[STATEANIM::LAND]; + _int iCurrAnim = m_pModelCom->Get_AnimIndex(); + if (iCurrAnim == m_Animation[STATEANIM::JUMP].first) + { + pairAnimInfo = m_Animation[STATEANIM::LAND]; + } + else if (iCurrAnim == m_Animation[STATEANIM::JUMP_SPRINT].first) + { + pairAnimInfo = m_Animation[STATEANIM::LAND_TO_SPRINT]; + } + else if (iCurrAnim == m_Animation[STATEANIM::JUMP_JOG].first) + { + pairAnimInfo = m_Animation[STATEANIM::LAND_TO_JOG]; + } + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); } -HRESULT CPlayer::Behavior_LandExitCheck() +HRESULT CPlayer::Behavior_LandExitCheck(_float fTimeDelta) { - if (m_pModelCom->IsFinishedAnim()) { - m_pFSM->Change_State(FSMSTATE::IDLE); + _float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio(); + m_fGravityAmount += fTimeDelta*1.5f; + if (m_fOriginGravityAmount >= m_fGravityAmount) + { + m_pCharacter_Controller->Set_GravityAmount(m_fGravityAmount); + } + + if (fRatio >= 0.5f) { + if (SUCCEEDED(InputMove())) { + m_pFSM->Change_State(FSMSTATE::MOVE); + } + else { + m_pFSM->Change_State(FSMSTATE::IDLE); + } return E_FAIL; } // 혹시 Land to (Jog, Sprint, Dodge) 같은 애니메이션 있으면 여기에 분기 조건 넣으면 됨 - - if (SUCCEEDED(InputMove())) { - m_pFSM->Change_State(FSMSTATE::MOVE); - return E_FAIL; - } + return S_OK; } void CPlayer::Behavior_LandExit() { m_pFSM->Disable_State(FSMSTATE::LAND); + m_pCharacter_Controller->Set_GravityAmount(m_fOriginGravityAmount); + m_fGravityAmount = 0.f; } void CPlayer::Behavior_DodgeEnter() @@ -829,6 +863,16 @@ void CPlayer::Behavior_DodgeEnter() HRESULT CPlayer::Behavior_DodgeExitCheck(_float fTimeDelta) { _float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio(); + + if (fRatio >= 0.08f) + { + if (m_pGameInstance->Key_Pressing(DIK_LCONTROL)) + { + m_pFSM->Change_State(FSMSTATE::BLINK); + return E_FAIL; + } + } + if (m_pModelCom->IsFinishedAnim()) { m_pFSM->Change_State(FSMSTATE::IDLE); return E_FAIL; @@ -846,6 +890,66 @@ void CPlayer::Behavior_DodgeExit() m_pFSM->Disable_State(FSMSTATE::DODGE); } +void CPlayer::Behavior_BlinkEnter() +{ + m_pFSM->Enable_State(FSMSTATE::BLINK); + + + Add_Event(m_Animation[STATEANIM::DODGE].first, + [&]() { + m_pEffectPool->Use_Skill(SKILL_TYPE::BLINK, this); + m_bVisible = false; + }, + 0.1f); +} + +HRESULT CPlayer::Behavior_BlinkExitCheck(_float fTimeDelta) +{ + pair<_uint, _bool> pairAnimInfo; + _int iCurrAnimIndex = m_pModelCom->Get_AnimIndex(); + _float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio(); + m_fBlinkTime += fTimeDelta; + + + if (m_fBlinkTime >= 1.f && iCurrAnimIndex != m_Animation[STATEANIM::DODGE_BLINK].first) + { + m_bVisible = true; + pairAnimInfo = m_Animation[STATEANIM::DODGE_BLINK]; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 0.8f,false,1.5f); + } + else if(iCurrAnimIndex != m_Animation[STATEANIM::DODGE_BLINK].first) { + + + _vector vLook = m_pTransformCom->Get_State(STATE::LOOK); + vLook = XMVectorSetY(vLook, 0.f); + vLook = XMVector3Normalize(vLook); + _vector vPos = m_pCharacter_Controller->Get_Position(); + _vector vNextPos = vPos + vLook * 7.f * fTimeDelta; + m_pCharacter_Controller->Set_Position(vNextPos); + } + + if (iCurrAnimIndex == m_Animation[STATEANIM::DODGE_BLINK].first) + { + if (SUCCEEDED(InputMove()) && fRatio >= 0.2f) { + m_pFSM->Change_State(FSMSTATE::MOVE); + return E_FAIL; + } + + if (fRatio>=0.2f) { + m_pFSM->Change_State(FSMSTATE::IDLE); + return E_FAIL; + } + } + + return S_OK; +} + +void CPlayer::Behavior_BlinkExit() +{ + m_pFSM->Disable_State(FSMSTATE::BLINK); + m_fBlinkTime = 0.f; +} + void CPlayer::Behavior_SlideEnter() { pair<_uint, _bool> pairAnimInfo; @@ -863,6 +967,17 @@ HRESULT CPlayer::Behavior_SlideExitCheck(_float fTimeDelta) pair<_uint, _bool> pairAnimInfo; _int iCurrAnimIndex = m_pModelCom->Get_AnimIndex(); _float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio(); + if (iCurrAnimIndex == m_Animation[STATEANIM::SLIDE_LOOP_R].first || + iCurrAnimIndex == m_Animation[STATEANIM::SLIDE_START_R].first) + { + m_fSlideSpeed += (m_fTargetSpeed - m_fSlideSpeed) * fTimeDelta * m_fAccel; + _vector vLook = m_pTransformCom->Get_State(STATE::LOOK); + vLook = XMVectorSetY(vLook, 0.f); + vLook = XMVector3Normalize(vLook); + _vector vPos = m_pCharacter_Controller->Get_Position(); + _vector vNextPos = vPos + vLook * m_fSlideSpeed * fTimeDelta; + m_pCharacter_Controller->Set_Position(vNextPos); + } if (m_pGameInstance->Key_Up(DIK_E)) { pairAnimInfo = m_Animation[STATEANIM::SLIDE_STOP_R]; @@ -884,6 +999,7 @@ HRESULT CPlayer::Behavior_SlideExitCheck(_float fTimeDelta) void CPlayer::Behavior_SlideExit() { m_pFSM->Disable_State(FSMSTATE::SLIDE); + m_fSlideSpeed = 0.f; } void CPlayer::Behavior_CombatEnter() @@ -1218,7 +1334,7 @@ void CPlayer::Behavior_SpellEnter() if (Degree <= 30.f) { pairAnimInfo = m_Animation[STATEANIM::SPELL_180_R]; - fRatio = 0.15f; + fRatio = 0.18f; } else if (Degree <= 120.f) { @@ -1252,7 +1368,7 @@ void CPlayer::Behavior_SpellEnter() { case ENUM_CLASS(SKILL_TYPE::BOMBARDA): Add_Event(pairAnimInfo.first, - [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::STUPEFY, this); }, /* 임시로 바꿔놓음 */ + [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::BOMBARDA, this); }, /* 임시로 바꿔놓음 */ fRatio); Add_Event(pairAnimInfo.first, [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::BOMBARDA_SIDE, Get_PartObject()); }, @@ -1365,7 +1481,7 @@ HRESULT CPlayer::Behavior_SpellExitCheck() if (iCurr >= iStart && iCurr < iStart + 3) { - if (fRatio >= 0.15f) + if (fRatio >= 0.2f) { _uint iNext = iCurr + 1; pairAnimInfo = m_Animation[STATEANIM::SPELL]; @@ -1380,22 +1496,22 @@ HRESULT CPlayer::Behavior_SpellExitCheck() if (m_eSpell != ENUM_CLASS(SKILL_TYPE::END) && m_eSpell != -1) { - _float fRatio = 0.2f; + _float fAttackRatio = 0.2f; if (iNext - iStart == 2) { - fRatio = 0.17f; + fAttackRatio = 0.17f; } else if (iNext - iStart == 3) { - fRatio = 0.14f; + fAttackRatio = 0.14f; } else { - fRatio = 0.2f; + fAttackRatio = 0.2f; } switch (m_eSpell) { case ENUM_CLASS(SKILL_TYPE::BOMBARDA): Add_Event(pairAnimInfo.first, [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::BOMBARDA, this); }, - fRatio); + fAttackRatio); Add_Event(pairAnimInfo.first, [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::BOMBARDA_SIDE, Get_PartObject()); }, 0.f); @@ -1403,7 +1519,7 @@ HRESULT CPlayer::Behavior_SpellExitCheck() case ENUM_CLASS(SKILL_TYPE::DESCENDO): Add_Event(pairAnimInfo.first, [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::DESCENDO, Get_PartObject()); }, - fRatio); + fAttackRatio); Add_Event(pairAnimInfo.first, [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::DESCENDO_SIDE, Get_PartObject()); }, 0.f); @@ -1411,11 +1527,16 @@ HRESULT CPlayer::Behavior_SpellExitCheck() case ENUM_CLASS(SKILL_TYPE::LEVIOSO): Add_Event(pairAnimInfo.first, [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::LEVIOSO, this); }, - fRatio); + fAttackRatio); Add_Event(pairAnimInfo.first, [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::LEVIOSO_SIDE, Get_PartObject()); }, 0.f); break; + case ENUM_CLASS(SKILL_TYPE::ACCIO): + Add_Event(pairAnimInfo.first, + [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::ACCIO, this); }, + fAttackRatio); + break; case ENUM_CLASS(SKILL_TYPE::LUMOS): if (m_pModelCom->Get_SecondAnimIndex() != m_Animation[STATEANIM::LUMOS].first) { @@ -1481,6 +1602,7 @@ HRESULT CPlayer::Behavior_SpellExitCheck() { if (m_eSpell != ENUM_CLASS(SKILL_TYPE::END)) { + m_bLookAt = true; switch (m_eSpell) { case ENUM_CLASS(SKILL_TYPE::ACCIO): @@ -1503,12 +1625,10 @@ HRESULT CPlayer::Behavior_SpellExitCheck() if (SUCCEEDED(InputMove()) && fRatio >= 0.3f) { m_pFSM->Change_State(FSMSTATE::MOVE); - m_bLookAt = false; return E_FAIL; } if (m_pModelCom->IsFinishedAnim()) { - m_bLookAt = false; if (SUCCEEDED(InputMove())) { m_pFSM->Change_State(FSMSTATE::MOVE); @@ -1528,6 +1648,7 @@ void CPlayer::Behavior_SpellExit() m_pFSM->Disable_State(FSMSTATE::SPELL); m_pModelCom->Set_BlendDuration(0.3f); + m_bLookAt = false; } void CPlayer::Behavior_AncientSpellEnter() @@ -1541,6 +1662,19 @@ void CPlayer::Behavior_AncientSpellEnter() [&]() { pairAnimInfo = m_Animation[STATEANIM::ANCIENT_LIGHTNING]; m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); }, 0.5f); + + Add_Event(m_Animation[STATEANIM::ANCIENT_LIGHTNING].first, + [this]() { + m_pEffectPool->Use_Skill(SKILL_TYPE::LIGHTNING, Get_PartObject()); + }, + 0.15f); + + + Add_Event(pairAnimInfo.first, + [this]() { + m_pEffectPool->Use_Skill(SKILL_TYPE::LIGHTNING_SIDE, Get_PartObject()); + }, + 0.2f); } HRESULT CPlayer::Behavior_AncientSpellExitCheck() @@ -1549,14 +1683,16 @@ HRESULT CPlayer::Behavior_AncientSpellExitCheck() _int iCurrAnim = m_pModelCom->Get_AnimIndex(); _float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio(); - if (SUCCEEDED(InputMove()) && fRatio >= 0.3f) { - m_pFSM->Change_State(FSMSTATE::MOVE); - m_bLookAt = false; - return E_FAIL; + if (iCurrAnim == m_Animation[STATEANIM::ANCIENT_LIGHTNING].first) + { + if (SUCCEEDED(InputMove()) && fRatio >= 0.3f) { + m_pFSM->Change_State(FSMSTATE::MOVE); + return E_FAIL; + } } + if (m_pModelCom->IsFinishedAnim()) { - m_bLookAt = false; if (SUCCEEDED(InputMove())) { m_pFSM->Change_State(FSMSTATE::MOVE); @@ -1573,23 +1709,20 @@ HRESULT CPlayer::Behavior_AncientSpellExitCheck() void CPlayer::Behavior_AncientSpellExit() { m_pFSM->Disable_State(FSMSTATE::ANCIENT_SPELL); + m_bLookAt = false; } void CPlayer::Behavior_ShieldEnter() { pair<_uint, _bool> pairAnimInfo; - if (!m_bShield) - { - m_pFSM->Enable_State(FSMSTATE::SHIELD); - pairAnimInfo = m_Animation[STATEANIM::SKILL2]; - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f); + m_pFSM->Enable_State(FSMSTATE::SHIELD); + pairAnimInfo = m_Animation[STATEANIM::SKILL2]; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f); - Add_Event(pairAnimInfo.first, - [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::PROTEGO, this); }, - 0.1f); - - } + Add_Event(pairAnimInfo.first, + [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::PROTEGO, this); }, + 0.1f); } HRESULT CPlayer::Behavior_ShieldExitCheck() @@ -1600,7 +1733,6 @@ HRESULT CPlayer::Behavior_ShieldExitCheck() if (m_bShield) { - if (m_pGameInstance->Key_Pressing(DIK_Q)) { m_pFSM->Enable_State(FSMSTATE::PARRY); @@ -1643,6 +1775,10 @@ HRESULT CPlayer::Behavior_ShieldExitCheck() [this]() {m_bLookAt = true; }, 0.01f); + + Add_Event(pairAnimInfo.first, + [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::BOMBARDA_SIDE, Get_PartObject()); }, + 0.01f); } Start_CameraShake(0.3f, 2.f); @@ -2255,6 +2391,7 @@ HRESULT CPlayer::Behavior_Broom_DismountExitCheck(_float fTimeDelta) { _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex(); pair<_uint, _bool> pairAnimInfo; + _float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio(); if (iCurrAnimIndex == m_Animation[STATEANIM::BROOM_DISMOUNT].first) { m_BroomScale.x -= (m_TargetScale.x - m_BroomScale.x) * fTimeDelta * m_fScaleSmoothSpeed; @@ -2264,7 +2401,7 @@ HRESULT CPlayer::Behavior_Broom_DismountExitCheck(_float fTimeDelta) { m_pBroomTransform->Set_Scale(m_BroomScale); } - if (m_pModelCom->IsFinishedAnim()) { + if (fRatio >= 0.85f) { m_BroomScale = { 0.f,0.f,0.f }; if (SUCCEEDED(InputMove())) { @@ -2454,7 +2591,7 @@ void CPlayer::Add_FSM() CState_Land::STATE_LAND_DESC Desc{}; Desc.pOwner = this; Desc.funcEnterEvent = [this]() { Behavior_LandEnter(); }; - Desc.funcExitCheck = [this](_float fTimeDelta) { return Behavior_LandExitCheck(); }; + Desc.funcExitCheck = [this](_float fTimeDelta) { return Behavior_LandExitCheck(fTimeDelta); }; Desc.funcExitEvent = [this]() { Behavior_LandExit(); }; m_States.emplace(FSMSTATE::LAND, CState_Land::Create(&Desc)); } @@ -2504,13 +2641,95 @@ void CPlayer::Add_FSM() m_States.emplace(FSMSTATE::DODGE, CState_Dodge::Create(&Desc)); } + { + CState_Blink::STATE_BLINK_DESC Desc{}; + Desc.pOwner = this; + Desc.funcEnterEvent = [this]() { Behavior_BlinkEnter(); }; + Desc.funcExitCheck = [this](_float fTimeDelta) { return Behavior_BlinkExitCheck(fTimeDelta); }; + Desc.funcExitEvent = [this]() { Behavior_BlinkExit(); }; + Desc.funcPriorityUpdate = [this](_float fTimeDelta) { + + if (SUCCEEDED(InputMove())) + { + _vector xmvInputDir = XMVectorZero(); + + _vector xmvCamLook = XMVector4Normalize(XMVectorSet(m_vCameraLookDir.x, 0.f, m_vCameraLookDir.z, 0.f)); + _vector xmvCamRight = XMVector4Normalize(XMVectorSet(m_vCameraRightDir.x, 0.f, m_vCameraRightDir.z, 0.f)); + + if (m_pGameInstance->Key_Pressing(DIK_W)) + xmvInputDir += xmvCamLook; + if (m_pGameInstance->Key_Pressing(DIK_S)) + xmvInputDir -= xmvCamLook; + if (m_pGameInstance->Key_Pressing(DIK_A)) + xmvInputDir -= xmvCamRight; + if (m_pGameInstance->Key_Pressing(DIK_D)) + xmvInputDir += xmvCamRight; + + xmvInputDir = XMVector3Normalize(xmvInputDir); + + _float2 vInputDir = { XMVectorGetX(xmvInputDir),XMVectorGetZ(xmvInputDir) }; + _vector xmvCurLook = XMVector4Normalize( + XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f)); + _float2 vCurLook = { XMVectorGetX(xmvCurLook),XMVectorGetZ(xmvCurLook) }; + + _float vDir = CMyTools::Get_Direction2D(vCurLook, vInputDir); + _float absDir = fabsf(vDir); + _float cross = vCurLook.x * vInputDir.y - vCurLook.y * vInputDir.x; + if (cross > 0.f) + { + m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta); + } + else { + m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta); + } + } + }; + Desc.funcLateUpdate = nullptr; + m_States.emplace(FSMSTATE::BLINK, CState_Blink::Create(&Desc)); + } + { CState_Slide::STATE_SLIDE_DESC Desc{}; Desc.pOwner = this; Desc.funcEnterEvent = [this]() { Behavior_SlideEnter(); }; Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_SlideExitCheck(fTimedelta); }; Desc.funcExitEvent = [this]() { Behavior_SlideExit(); }; - Desc.funcPriorityUpdate = nullptr; + Desc.funcPriorityUpdate = [this](_float fTimeDelta) { + if (SUCCEEDED(InputMove())) + { + _vector xmvInputDir = XMVectorZero(); + + _vector xmvCamLook = XMVector4Normalize(XMVectorSet(m_vCameraLookDir.x, 0.f, m_vCameraLookDir.z, 0.f)); + _vector xmvCamRight = XMVector4Normalize(XMVectorSet(m_vCameraRightDir.x, 0.f, m_vCameraRightDir.z, 0.f)); + + if (m_pGameInstance->Key_Pressing(DIK_W)) + xmvInputDir += xmvCamLook; + if (m_pGameInstance->Key_Pressing(DIK_S)) + xmvInputDir -= xmvCamLook; + if (m_pGameInstance->Key_Pressing(DIK_A)) + xmvInputDir -= xmvCamRight; + if (m_pGameInstance->Key_Pressing(DIK_D)) + xmvInputDir += xmvCamRight; + + xmvInputDir = XMVector3Normalize(xmvInputDir); + + _float2 vInputDir = { XMVectorGetX(xmvInputDir),XMVectorGetZ(xmvInputDir) }; + _vector xmvCurLook = XMVector4Normalize( + XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f)); + _float2 vCurLook = { XMVectorGetX(xmvCurLook),XMVectorGetZ(xmvCurLook) }; + + _float vDir = CMyTools::Get_Direction2D(vCurLook, vInputDir); + _float absDir = fabsf(vDir); + _float cross = vCurLook.x * vInputDir.y - vCurLook.y * vInputDir.x; + if (cross > 0.f) + { + m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta); + } + else { + m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta); + } + } + }; Desc.funcLateUpdate = nullptr; m_States.emplace(FSMSTATE::SLIDE, CState_Slide::Create(&Desc)); } @@ -2605,7 +2824,6 @@ void CPlayer::Add_FSM() 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; @@ -2613,29 +2831,7 @@ void CPlayer::Add_FSM() { m_pBroomTransform->Set_Scale(m_BroomScale); } - _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]); - + Attach_Broom(); }; Desc.funcLateUpdate = nullptr; m_States.emplace(FSMSTATE::BROOM_RIDE, CState_Broom_Ride::Create(&Desc)); @@ -2738,19 +2934,22 @@ void CPlayer::Set_Anim() m_Animation[STATEANIM::JOG_AIM_BWD] = { 166,true }; m_Animation[STATEANIM::JUMP] = { 205,false }; - m_Animation[STATEANIM::JUMP_JOG] = { 203,false }; - m_Animation[STATEANIM::JUMP_SPRINT] = { 207,false }; + m_Animation[STATEANIM::JUMP_JOG] = { 203,false }; // 203 + m_Animation[STATEANIM::JUMP_SPRINT] = { 207,false }; // 207 + m_Animation[STATEANIM::FALL_LOOP] = { 29,true }; m_Animation[STATEANIM::SPRINT] = { 599,true }; - m_Animation[STATEANIM::LAND] = { 259,false }; + m_Animation[STATEANIM::LAND] = { 259,false }; // 259 + m_Animation[STATEANIM::LAND_TO_JOG] = {247,false}; + m_Animation[STATEANIM::LAND_TO_SPRINT] = { 249 ,false}; m_Animation[STATEANIM::SLIDE_STOP_R] = { 568,false }; m_Animation[STATEANIM::SLIDE_START_R] = { 566,false }; m_Animation[STATEANIM::SLIDE_LOOP_R] = { 564,true }; m_Animation[STATEANIM::DODGE] = { 878,false }; - m_Animation[STATEANIM::DODGE_BLINK] = { 876,true }; + m_Animation[STATEANIM::DODGE_BLINK] = { 874,false }; m_Animation[STATEANIM::SKILL] = { 593,false }; m_Animation[STATEANIM::SKILL2] = { 991,false }; @@ -2859,6 +3058,8 @@ void CPlayer::Set_Anim() // 755 기모으기 859 //568 566 564 슬라이드 스탑/스타트/루프 + + //874 } diff --git a/Jusin154_Team3D/Client/Private/Protego.cpp b/Jusin154_Team3D/Client/Private/Protego.cpp index 6558e1c7b..f71361785 100644 --- a/Jusin154_Team3D/Client/Private/Protego.cpp +++ b/Jusin154_Team3D/Client/Private/Protego.cpp @@ -129,14 +129,14 @@ HRESULT CProtego::Ready_Components(void* pArg) } - { // DO - CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; - Desc.iSubKind = ENUM_CLASS(PXOBJECT::SKILL_PROTEGO); - if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_SHIELD"), (CComponent**)&m_pRigidBody, &Desc))) { - return E_FAIL; - } - m_pGameInstance->Attach_Actor(*m_pRigidBody->Get_Actor()); - } + //{ // DO + // CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; + // Desc.iSubKind = ENUM_CLASS(PXOBJECT::SKILL_PROTEGO); + // if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_SHIELD"), (CComponent**)&m_pRigidBody, &Desc))) { + // return E_FAIL; + // } + // m_pGameInstance->Attach_Actor(*m_pRigidBody->Get_Actor()); + //} return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Quest_Info.cpp b/Jusin154_Team3D/Client/Private/Quest_Info.cpp index d15c82661..c929b94de 100644 --- a/Jusin154_Team3D/Client/Private/Quest_Info.cpp +++ b/Jusin154_Team3D/Client/Private/Quest_Info.cpp @@ -129,7 +129,11 @@ HRESULT CQuest_Info::Render() return E_FAIL; } - m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pInfoInstance->Get_Quest(m_iCurrentQuest ,m_iQuest_Index).pQuestInfo.c_str(), _float2(m_fFontX + m_fX, m_fFontY - m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha)); + if (m_iQuest_Index != 0) + { + m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pInfoInstance->Get_Quest(m_iCurrentQuest, m_iQuest_Index).pQuestInfo.c_str(), _float2(m_fFontX + m_fX, m_fFontY - m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha)); + } + return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Quest_Info_Header.cpp b/Jusin154_Team3D/Client/Private/Quest_Info_Header.cpp index 4d80896d8..b2c7954ea 100644 --- a/Jusin154_Team3D/Client/Private/Quest_Info_Header.cpp +++ b/Jusin154_Team3D/Client/Private/Quest_Info_Header.cpp @@ -129,8 +129,11 @@ HRESULT CQuest_Info_Header::Render() return E_FAIL; } - _float OffSet = (m_pGameInstance->FontSizeX(TEXT("Font_size20"), m_pInfoInstance->Get_Quest(m_iCurrentQuest, m_iQuest_Index).pQuestName.c_str()) - 30) * 0.5f; - m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pInfoInstance->Get_Quest(m_iCurrentQuest, m_iQuest_Index).pQuestName.c_str(), _float2((m_fFontX + m_fX) - OffSet, m_fFontY - m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha)); + if (m_iQuest_Index != 0) + { + _float OffSet = (m_pGameInstance->FontSizeX(TEXT("Font_size20"), m_pInfoInstance->Get_Quest(m_iCurrentQuest, m_iQuest_Index).pQuestName.c_str()) - 30) * 0.5f; + m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pInfoInstance->Get_Quest(m_iCurrentQuest, m_iQuest_Index).pQuestName.c_str(), _float2((m_fFontX + m_fX) - OffSet, m_fFontY - m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha)); + } return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Quest_Slot.cpp b/Jusin154_Team3D/Client/Private/Quest_Slot.cpp index f927a1486..11eba6548 100644 --- a/Jusin154_Team3D/Client/Private/Quest_Slot.cpp +++ b/Jusin154_Team3D/Client/Private/Quest_Slot.cpp @@ -102,6 +102,7 @@ void CQuest_Slot::Update(_float fTimeDelta) } } Hover(); + static_cast(m_pOwner)->Function_Callback(TEXT("QuestListHover"), &m_Info); @@ -117,6 +118,7 @@ void CQuest_Slot::Late_Update(_float fTimeDelta) } if (m_bVisible) { + m_pVIBufferCom->Set_Hover(m_iIndex); m_pGameInstance->Add_RenderGroup(RENDER::UI, this); } __super::Late_Update(fTimeDelta); @@ -153,14 +155,14 @@ void CQuest_Slot::Font_Size() for (_int i = 0; i < m_iQuestCount; ++i) { m_fFontY = 190 + i * 85.f; - if (m_Index == -1) + if (m_iIndex == -1) { m_Fonts[i].pFontSizeName = TEXT("Font_size20"); m_Fonts[i].m_fFontSize = _float2(m_fFontX + m_fX, m_fFontY - m_fY); } else { - if (i == m_Index) + if (i == m_iIndex) { m_Fonts[i].pFontSizeName = TEXT("Font_size30"); m_Fonts[i].m_fFontSize = _float2(m_fFontX - 10.f + m_fX, m_fFontY - 10.f - m_fY); @@ -194,7 +196,7 @@ _int CQuest_Slot::Mousechack(POINT Mouse) { for (_int i = 0; i < m_iQuestCount; ++i) { - RECT Box = { + RECT Box = { long(m_fPositionX - m_fSizeX * 0.5f), long((m_fPositionY - (i * m_fOffSetY)) - m_fSizeY * 0.5f), long(m_fPositionX + m_fSizeX * 0.5f), @@ -202,11 +204,11 @@ _int CQuest_Slot::Mousechack(POINT Mouse) if (PtInRect(&Box, Mouse)) { + return i; } } - return -1; } @@ -317,19 +319,15 @@ void CQuest_Slot::Hover() POINT Mouse{}; Mouse.x = _long(fMouse.x); Mouse.y = _long(fMouse.y); - - m_Index = Mousechack(Mouse); - m_pVIBufferCom->Set_Hover(m_Index); - if (m_Index != -1) + m_iIndex = Mousechack(Mouse); + + if (m_iIndex != m_iPrevIndex) { - m_bHover = true; + m_pVIBufferCom->Set_Hover(m_iIndex); + Font_Size(); + m_iPrevIndex = m_iIndex; } - else - { - m_bHover = false; - } - Font_Size(); } diff --git a/Jusin154_Team3D/Client/Private/Ranrak.cpp b/Jusin154_Team3D/Client/Private/Ranrok.cpp similarity index 57% rename from Jusin154_Team3D/Client/Private/Ranrak.cpp rename to Jusin154_Team3D/Client/Private/Ranrok.cpp index 0a84f3bf9..beca57f86 100644 --- a/Jusin154_Team3D/Client/Private/Ranrak.cpp +++ b/Jusin154_Team3D/Client/Private/Ranrok.cpp @@ -1,5 +1,5 @@ #include "pch.h" -#include "Ranrak.h" +#include "Ranrok.h" #include "GameInstance.h" #include "InfoInstance.h" @@ -16,26 +16,26 @@ #include "State_Move.h" #include "State_Combat.h" #include "State_Hit.h" -#include "Troll_State_Rush.h" +#include "State_Rush.h" #include "State_Throw.h" #pragma endregion -CRanrak::CRanrak(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +CRanrok::CRanrok(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) : CMonster(pDevice, pContext) { } -CRanrak::CRanrak(const CRanrak& Prototype) +CRanrok::CRanrok(const CRanrok& Prototype) : CMonster(Prototype) { } -HRESULT CRanrak::Initialize_Prototype() +HRESULT CRanrok::Initialize_Prototype() { return S_OK; } -HRESULT CRanrak::Initialize(void* pArg) +HRESULT CRanrok::Initialize(void* pArg) { if (FAILED(__super::Initialize(pArg))) return E_FAIL; @@ -62,32 +62,43 @@ HRESULT CRanrak::Initialize(void* pArg) m_pCallBack_Behavior->Initialize(m_pCharacter_Controller, m_pRigidBody); m_pCallBack_HitReport->Initialize(m_pCharacter_Controller, m_pRigidBody); - m_pCharacter_Controller->Set_Position(XMVectorSet(-52.f, 0.f, 4.f, 1.f)); - m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(-52.f, 0.f, 4.f, 1.f)); + if (NEXT_LEVEL == ENUM_CLASS(LEVEL::FIELD)) + { + m_pCharacter_Controller->Set_Position(XMVectorSet(20.226f, 6.46f, 142.8f, 1.f)); + m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(20.226f, 6.46f, 142.8f, 1.f)); + } + else { + + m_pCharacter_Controller->Set_Position(XMVectorSet(-44.704f, -2.860f, 16.071f, 1.f)); + m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(-44.704f, -2.860f, 16.071f, 1.f)); + } + + + Set_Points(); return S_OK; } -void CRanrak::Priority_Update(_float fTimeDelta) +void CRanrok::Priority_Update(_float fTimeDelta) { __super::Priority_Update(fTimeDelta); } -void CRanrak::Update(_float fTimeDelta) +void CRanrok::Update(_float fTimeDelta) { if (m_pGameInstance->Key_Up(DIK_H)) { - m_ePhase = ENUM_CLASS(RANRAK_PHASE::PHASE_GROUND); + m_ePhase = ENUM_CLASS(RANROK_PHASE::PHASE_GROUND); m_pFSM->Change_State(FSMSTATE::LAND); } if (m_pGameInstance->Key_Up(DIK_Y)) { - m_ePhase = ENUM_CLASS(RANRAK_PHASE::PHASE_AIR); + m_ePhase = ENUM_CLASS(RANROK_PHASE::PHASE_AIR); m_pFSM->Change_State(FSMSTATE::HOVER); } if (m_pGameInstance->Key_Up(DIK_I)) { - m_pFSM->Change_State(FSMSTATE::SKILL); + m_pFSM->Change_State(FSMSTATE::TUCKED); } m_pFSM->Update_State(fTimeDelta); @@ -124,13 +135,13 @@ void CRanrak::Update(_float fTimeDelta) #endif // _DEBUG - for (_uint i = 0; i < ENUM_CLASS(RANRAK_SKILL::END); i++) + for (_uint i = 0; i < ENUM_CLASS(RANROK_SKILL::END); i++) m_fSkillCoolTime[i] = max(0.f, m_fSkillCoolTime[i] - fTimeDelta); #pragma endregion } -void CRanrak::Late_Update(_float fTimeDelta) +void CRanrok::Late_Update(_float fTimeDelta) { __super::Late_Update(fTimeDelta); if (true == m_pCharacter_Controller->IsActive()) { @@ -140,28 +151,18 @@ void CRanrak::Late_Update(_float fTimeDelta) m_pTransformCom->Set_WorldMatrix(m_pRigidBody->Get_Actor()->getGlobalPose()); } - if (true == m_bLookAt) { - m_pTransformCom->LookAt_Lerp(XMLoadFloat4(&m_vTargetPos), fTimeDelta, 3.f); + if (!m_pFSM->IsEnable(FSMSTATE::TUCKED)) + { + if (true == m_bLookAt) { + m_pTransformCom->LookAt_Horizontal_Lerp(XMLoadFloat4(&m_vTargetPos), fTimeDelta, 3.f); + } } - - _vector vDir = XMLoadFloat4(&m_vTargetPos) - Get_WorldPostion(); - vDir = XMVector4Normalize(vDir); - _vector vLook = XMVector3Normalize( - XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f)); - float dot = XMVectorGetX(XMVector3Dot(vLook, vDir)); - dot = max(-1.f, min(1.f, dot)); - - float angle = acosf(dot); - m_fDegree = XMConvertToDegrees(angle); - - m_fCross = XMVectorGetY(XMVector3Cross(vLook, vDir)); - m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this); Set_Shadow(m_pGameInstance->IsIn_ShadowViewFrustum(m_pTransformCom->Get_State(STATE::POSITION), m_pTransformCom->Get_Radius())); } -HRESULT CRanrak::Render() +HRESULT CRanrok::Render() { if (!m_bVisible) return S_OK; @@ -225,10 +226,24 @@ HRESULT CRanrak::Render() } #endif + if (0.f < m_fDeadRatio) { + _bool bDisolve = false; + if (FAILED(m_pShaderCom->Bind_RawValue("g_bDisolve", &bDisolve, sizeof(_bool)))) { + return E_FAIL; + } + } + + { + _bool bDisolve = false; + _float zero = 0.f; + m_pShaderCom->Bind_RawValue("g_bDisolve", &bDisolve, sizeof(_bool)); + m_pShaderCom->Bind_RawValue("g_fDisolveRatio", &zero, sizeof(_float)); + } + return S_OK; } -HRESULT CRanrak::Render_Shadow(SHADOW eType) +HRESULT CRanrok::Render_Shadow(SHADOW eType) { if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) { return E_FAIL; @@ -265,7 +280,7 @@ HRESULT CRanrak::Render_Shadow(SHADOW eType) return S_OK; } -_vector CRanrak::Get_LockOnPos() +_vector CRanrok::Get_LockOnPos() { if (nullptr != m_pCharacter_Controller && true == m_pCharacter_Controller->IsActive()) { return m_pCharacter_Controller->Get_Position(); @@ -276,11 +291,13 @@ _vector CRanrak::Get_LockOnPos() return Get_WorldPostion(); } -void CRanrak::OnCollision(CGameObject* pOther, void* pDesc) +void CRanrok::OnCollision(CGameObject* pOther, void* pDesc) { if (true == m_bDead) { return; } + if (m_bFireBurst) + return; ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc); @@ -302,30 +319,34 @@ void CRanrak::OnCollision(CGameObject* pOther, void* pDesc) 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 = ENUM_CLASS(SKILL_TYPE::FLIPENDO); + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::BOMBARDA); break; case ENUM_CLASS(SKILL_TYPE::JAP): m_eHitSpell = ENUM_CLASS(SKILL_TYPE::JAP); break; - default: - m_eHitSpell = ENUM_CLASS(SKILL_TYPE::END); + case ENUM_CLASS(SKILL_TYPE::LEVIOSO): + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::LEVIOSO); + break; + case ENUM_CLASS(SKILL_TYPE::ACCIO): + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::ACCIO); + break; + case ENUM_CLASS(SKILL_TYPE::STUPEFY): + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::STUPEFY); break; } } else { damagePair = Get_Damage(m_pInfoInstance->Get_Spell_Damage(ENUM_CLASS(SKILL_TYPE::ANCIENT_MAGIC_THROW))); + + CMapElement_Interactable* pProps = dynamic_cast(pOther); + + if (pProps != nullptr) + { + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::ANCIENT_MAGIC_THROW); + } } - CMapElement_Interactable* pProps = dynamic_cast(pOther); - - if (pProps != nullptr) - { - m_eHitSpell = STATEANIM::KNOCKDOWN_FWD; - } m_DamageInfo.fDamage = damagePair.first; m_pInfoInstance->Event_CallBack(TEXT("Monster_Hit"), &m_DamageInfo); @@ -333,14 +354,19 @@ void CRanrak::OnCollision(CGameObject* pOther, void* pDesc) m_pFSM->Change_State(FSMSTATE::DEAD); return; } + if (damagePair.second <= Get_Hp().y / 2.f && m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_AIR)) + { + m_pFSM->Change_State(FSMSTATE::LAND); + return; + } m_pFSM->Change_State(FSMSTATE::HIT); } -void CRanrak::OnHit(CGameObject* pOther, CGameObject* pCaller) +void CRanrok::OnHit(CGameObject* pOther, CGameObject* pCaller) { } -HRESULT CRanrak::Ready_Components() +HRESULT CRanrok::Ready_Components() { CTransform::TRANSFORM_DESC Desc = {}; @@ -350,7 +376,7 @@ HRESULT CRanrak::Ready_Components() __super::Ready_Components(&Desc); - m_strModelPrototypeTag = TEXT("Prototype_Component_Ranrak_Model"); + m_strModelPrototypeTag = TEXT("Prototype_Component_Ranrok_Model"); /* Com_Model */ if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_strModelPrototypeTag, @@ -361,15 +387,15 @@ HRESULT CRanrak::Ready_Components() { // CCT CCharacter_Controller::Character_Controller_DESC Desc{}; - Desc.iSubKind = ENUM_CLASS(PXOBJECT::RANRAK); + Desc.iSubKind = ENUM_CLASS(PXOBJECT::RANROK); Desc.pTransform = m_pTransformCom; Desc.eBodyType = ACTOR::CAPSULE; Desc.fContactOffset = 0.001f; Desc.fMaterial = { 1.2f, 1.0f, 0.0f }; Desc.bAutoStepping = { false }; Desc.fStepOffset = { 0.12f }; - Desc.fRadius = 1.2f; - Desc.fHeight = 1.5f; + Desc.fRadius = 2.f; + Desc.fHeight = 2.f; Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_Monster_HitReport::Create(); Desc.pCallback_Behavior = m_pCallBack_Behavior = CCallBack_Monster_Behavior::Create(); Desc.eClimbingMode = PSX::PxCapsuleClimbingMode::eEASY; @@ -377,30 +403,32 @@ HRESULT CRanrak::Ready_Components() if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_CCT_CAPSULE"), (CComponent**)&m_pCharacter_Controller, &Desc))) { return E_FAIL; } + + m_pCharacter_Controller->SetGravity(false); } m_pCharacter_Controller->Set_Position(m_pTransformCom->Get_State(STATE::POSITION)); { // DO CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; - Desc.iSubKind = ENUM_CLASS(PXOBJECT::RANRAK); + Desc.iSubKind = ENUM_CLASS(PXOBJECT::RANROK); if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX"), (CComponent**)&m_pRigidBody, &Desc))) { return E_FAIL; } m_pGameInstance->Detach_Actor(*m_pRigidBody->Get_Actor()); } - if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("STAT_TROLL"), (CComponent**)&m_pStat))) { + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("STAT_RANROK"), (CComponent**)&m_pStat))) { return E_FAIL; } return S_OK; } -HRESULT CRanrak::Ready_Parts() +HRESULT CRanrok::Ready_Parts() { return S_OK; } -HRESULT CRanrak::Bind_ShaderResources() +HRESULT CRanrok::Bind_ShaderResources() { if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) { return E_FAIL; @@ -427,9 +455,144 @@ HRESULT CRanrak::Bind_ShaderResources() return S_OK; } -CRanrak* CRanrak::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +void CRanrok::Set_Points() { - CRanrak* pInstance = new CRanrak(pDevice, pContext); + m_Points = + { + { + XMVectorSet(-23.129f, 5.847f, 120.080f, 1.f), + XMVectorSet(-35.026f, 2.671f, 144.041f, 1.f), + XMVectorSet(-0.334f, -18.565f, 186.488f, 1.f), + }, + + { + XMVectorSet(16.141f, -50.299f, 221.423f, 1.f), + XMVectorSet(41.967f, -53.684f, 246.943f,1.f), + XMVectorSet(11.950f, -51.993f, 263.268f,1.f), + XMVectorSet(-17.090f, -51.099f, 236.738f,1.f), + XMVectorSet(-13.968f, -53.362f, 201.439f,1.f), + XMVectorSet(-13.968f, -53.362f, 201.439f,1.f), + XMVectorSet(35.842f, -48.150f, 189.827f,1.f), + XMVectorSet(51.975f, -47.209f, 207.986f,1.f), + XMVectorSet(40.875f, -48.956f, 256.929f,1.f) + }, + + { + XMVectorSet(14.121f, -41.890f, 248.021f,1.f), + XMVectorSet(-12.558f, -28.878f, 236.451f,1.f), + XMVectorSet(-20.145f, -48.688f, 216.771f,1.f), + XMVectorSet(11.854f, -50.864f, 182.233f,1.f), + XMVectorSet(44.661f, -52.001f, 202.435f,1.f), + XMVectorSet(29.840f, -60.349f, 212.004f,1.f), + XMVectorSet(23.993f, -58.307f, 220.465f,1.f) + } + }; +} + +void CRanrok::MoveTo(_float fTimeDelta) +{ + if (!m_pFSM->IsEnable(FSMSTATE::TUCKED)) + return; + + if (m_Points.empty()) + return; + + if (m_iCurrentFlow >= m_Points.size()) + { + m_iCurrentFlow = 0; + } + + _vector Target; + if (m_iCurrentFlow == 1) + { + _float fRandom = m_pGameInstance->Real_Random_Float(-20.f, 20.f); + Target = m_Points[m_iCurrentFlow][m_iCurrentPoint]; + Target += XMVectorSet(0.f, fRandom, 0.f, 0.f); + } + else + { + Target = m_Points[m_iCurrentFlow][m_iCurrentPoint]; + } + + _vector CurPos = m_pCharacter_Controller->Get_Position(); + + _vector toTarget = Target - CurPos; + _float fDist = XMVectorGetX(XMVector3Length(toTarget)); + + if (fDist < 10.f) + { + if (m_iCurrentPoint == m_Points[m_iCurrentFlow].size() - 1) + { + m_bTucked = true; + m_pFSM->Disable_State(FSMSTATE::TUCKED); + } + m_iCurrentPoint = (m_iCurrentPoint + 1) % m_Points[m_iCurrentFlow].size(); + return; + } + + /*if (m_iCurrentFlow == 1) + { + AroundPoint(fTimeDelta); + return; + }*/ + + _vector vDir = XMVector3Normalize(toTarget); + + m_vMoveDir = XMVectorLerp(m_vMoveDir, vDir,fTimeDelta * 4.f); + + m_vMoveDir = XMVector3Normalize(m_vMoveDir); + + m_pTransformCom->LookAt_Horizontal_Lerp(CurPos + m_vMoveDir,fTimeDelta,4.f); + + _float speed = 50.f; + m_pCharacter_Controller->Set_Position(CurPos + m_vMoveDir * speed * fTimeDelta); +} + + + +void CRanrok::AroundPoint(_float fTimeDelta) +{ + m_fAroundTime += fTimeDelta; + if (m_fAroundTime >= 6.f) + { + m_fAroundTime = 0.f; + m_iCurrentFlow++; + } + else { + _vector Center = XMVectorSet(16.141f, -50.299f, 221.423f, 1.f); + + m_fAroundAngle += m_fAroundSpeed * fTimeDelta; + if (m_fAroundAngle > XM_2PI) m_fAroundAngle -= XM_2PI; + + _float x = cosf(m_fAroundAngle) * m_fAroundRadius; + _float z = sinf(m_fAroundAngle) * m_fAroundRadius; + + _vector TargetPos = Center + XMVectorSet(x, 0.f, z, 0.f); + + _vector CurPos = m_pCharacter_Controller->Get_Position(); + _vector vDir = TargetPos - CurPos; + _float dist = XMVectorGetX(XMVector3Length(vDir)); + + if (dist > 0.001f) + { + vDir = XMVector3Normalize(vDir); + + _float moveSpeed = 50.f; + _vector NextPos = CurPos + vDir * (moveSpeed * fTimeDelta); + + m_pCharacter_Controller->Set_Position(NextPos); + } + + m_pTransformCom->LookAt_Horizontal_Lerp(Center, fTimeDelta, 3.f); + } +} + + + + +CRanrok* CRanrok::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CRanrok* pInstance = new CRanrok(pDevice, pContext); if (FAILED(pInstance->Initialize_Prototype())) { @@ -439,9 +602,9 @@ CRanrak* CRanrak::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) return pInstance; } -CGameObject* CRanrak::Clone(void* pArg, CGameObject* pOwner) +CGameObject* CRanrok::Clone(void* pArg, CGameObject* pOwner) { - CRanrak* pInstance = new CRanrak(*this); + CRanrok* pInstance = new CRanrok(*this); if (FAILED(pInstance->Initialize(pArg))) { @@ -451,7 +614,7 @@ CGameObject* CRanrak::Clone(void* pArg, CGameObject* pOwner) return pInstance; } -void CRanrak::Free() +void CRanrok::Free() { __super::Free(); @@ -469,12 +632,37 @@ void CRanrak::Free() } #ifdef _DEBUG -void CRanrak::Describe_Entity() +void CRanrok::Describe_Entity() { GUI::Begin("UNIT", 0, IMGUI_GLOBAL_BEGIN_FLAG); if (GUI::CollapsingHeader("Ranrak")) { __super::Describe_Entity(); + GUI::Text("Degree %.2f", m_fDegree); + GUI::Text("CurrFlow %d", m_iCurrentFlow); + + _float3 Pos; + XMStoreFloat3(&Pos, Get_WorldPostion()); + + if (GUI::DragFloat3("Pos", (_float*)&Pos, 0.01f)) + { + m_pCharacter_Controller->Set_Position(XMVectorSetW(XMLoadFloat3(&Pos), 1.f)); + } + + ImGui::SameLine(); + + if (GUI::SmallButton("Copy")) + { + char buf[64]; + sprintf_s(buf, "%.3ff, %.3ff, %.3ff", Pos.x, Pos.y, Pos.z); + ImGui::SetClipboardText(buf); + } + + if (GUI::Button("MovePos")) + { + m_pCharacter_Controller->Set_Position(XMVectorSet(m_pGameInstance->Get_CamPosition()->x, m_pGameInstance->Get_CamPosition()->y, m_pGameInstance->Get_CamPosition()->z,1.f)); + } + m_pTransformCom->Describe_Entity(); } GUI::End(); diff --git a/Jusin154_Team3D/Client/Private/Ranrak_States.cpp b/Jusin154_Team3D/Client/Private/Ranrok_States.cpp similarity index 66% rename from Jusin154_Team3D/Client/Private/Ranrak_States.cpp rename to Jusin154_Team3D/Client/Private/Ranrok_States.cpp index 678b38f83..e85e13a23 100644 --- a/Jusin154_Team3D/Client/Private/Ranrak_States.cpp +++ b/Jusin154_Team3D/Client/Private/Ranrok_States.cpp @@ -1,5 +1,5 @@ #include "pch.h" -#include "Ranrak.h" +#include "Ranrok.h" #include "InfoInstance.h" #include "GameInstance.h" #include "Player.h" @@ -18,6 +18,7 @@ #include "State_FireBall.h" #include "State_Swipe.h" #include "State_Skill.h" +#include "State_Skill2.h" #include "State_Pulse.h" #include "State_Tucked.h" #include "State_Hit.h" @@ -25,15 +26,15 @@ #pragma endregion -void CRanrak::Behavior_IdleEnter() +void CRanrok::Behavior_IdleEnter() { m_pFSM->Enable_State(FSMSTATE::IDLE); pair<_uint, _bool> pairAnimInfo = m_Animation[STATEANIM::HOVER_LOOP]; - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second,1.f,true); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); } -HRESULT CRanrak::Behavior_IdleExitCheck() +HRESULT CRanrok::Behavior_IdleExitCheck() { if (m_fTargetDistance <= 30.f && m_fTargetDistance !=0.f) { @@ -43,32 +44,43 @@ HRESULT CRanrak::Behavior_IdleExitCheck() return S_OK; } -void CRanrak::Behavior_IdleExit() +void CRanrok::Behavior_IdleExit() { m_pFSM->Disable_State(FSMSTATE::IDLE); } -void CRanrak::Behavior_IdleBreakEnter() +void CRanrok::Behavior_IdleBreakEnter() { m_pFSM->Enable_State(FSMSTATE::IDLEBREAK); pair<_uint, _bool> pairAnimInfo; + _int iRand = m_pGameInstance->Real_Random_Int(0, 1); + switch (iRand) + { + case 0 : + pairAnimInfo = m_Animation[STATEANIM::IDLE_BREAK1]; + break; + case 1: + pairAnimInfo = m_Animation[STATEANIM::IDLE_BREAK2]; + break; + } + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); } -HRESULT CRanrak::Behavior_IdleBreakExitCheck() +HRESULT CRanrok::Behavior_IdleBreakExitCheck() { if (m_pModelCom->IsFinishedAnim()) { - m_pFSM->Change_State(FSMSTATE::IDLE); + m_pFSM->Change_State(FSMSTATE::COMBAT); } return S_OK; } -void CRanrak::Behavior_IdleBreakExit() +void CRanrok::Behavior_IdleBreakExit() { m_pFSM->Disable_State(FSMSTATE::IDLEBREAK); } -void CRanrak::Behavior_MoveEnter() +void CRanrok::Behavior_MoveEnter() { pair<_uint, _bool> pairAnimInfo = {}; m_pFSM->Enable_State(FSMSTATE::MOVE); @@ -76,7 +88,7 @@ void CRanrak::Behavior_MoveEnter() m_pFSM->Enable_State(FSMSTATE::JOG); } -HRESULT CRanrak::Behavior_MoveExitCheck(_float fTimeDelta) +HRESULT CRanrok::Behavior_MoveExitCheck(_float fTimeDelta) { pair<_uint, _bool> pairAnimInfo = {}; _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex(); @@ -90,19 +102,19 @@ HRESULT CRanrak::Behavior_MoveExitCheck(_float fTimeDelta) return S_OK; } -void CRanrak::Behavior_MoveExit() +void CRanrok::Behavior_MoveExit() { m_pFSM->Disable_State(FSMSTATE::MOVE | FSMSTATE::SPRINT | FSMSTATE::JOG | FSMSTATE::WALK); } -void CRanrak::Behavior_CombatEnter() +void CRanrok::Behavior_CombatEnter() { pair<_uint, _bool> pairAnimInfo = {}; m_pFSM->Enable_State(FSMSTATE::COMBAT); m_bLookAt = true; } -HRESULT CRanrak::Behavior_CombatExitCheck(_float fTimeDelta) +HRESULT CRanrok::Behavior_CombatExitCheck(_float fTimeDelta) { if (m_fTargetDistance > 40.f && m_fTargetDistance != 0.f) { @@ -116,42 +128,43 @@ HRESULT CRanrak::Behavior_CombatExitCheck(_float fTimeDelta) } - if (m_fTargetDistance <= 30.f && m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIREBREATH)] <= 0.f) + if (m_fTargetDistance <= 30.f && m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIREBREATH)] <= 0.f) { m_pFSM->Change_State(FSMSTATE::FIREBREATH); return E_FAIL; } - else if (m_fTargetDistance <= 30.f && m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIREBALL)] <= 0.f) + else if (m_fTargetDistance <= 30.f && m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIREBALL)] <= 0.f) { m_pFSM->Change_State(FSMSTATE::FIREBALL); return E_FAIL; } - else if (m_fTargetDistance <= 30.f && m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIRESWEEP)] <= 0.f) + else if (m_fTargetDistance <= 30.f && m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIRESWEEP)] <= 0.f) { m_pFSM->Change_State(FSMSTATE::FIRESWEEP); return E_FAIL; } - else if (m_fTargetDistance <= 30.f && m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::SWIPE)] <= 0.f && m_ePhase == ENUM_CLASS(RANRAK_PHASE::PHASE_GROUND)) + else if (m_fTargetDistance <= 30.f && m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::RUSH)] <= 0.f && m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_GROUND)) + { + m_pFSM->Change_State(FSMSTATE::RUSH); + return E_FAIL; + } + else if (m_fTargetDistance <= 30.f && m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::SWIPE)] <= 0.f && m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_GROUND)) { m_pFSM->Change_State(FSMSTATE::SWIPE); return E_FAIL; } - else if (m_fTargetDistance <= 30.f && m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::PULSE)] <= 0.f) + + else if (m_fTargetDistance <= 30.f && m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::PULSE)] <= 0.f) { m_pFSM->Change_State(FSMSTATE::PULSE); return E_FAIL; } - else if (m_fTargetDistance <= 30.f && m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::TUCKED)] <= 0.f) - { - m_pFSM->Change_State(FSMSTATE::TUCKED); - return E_FAIL; - } else { - if (m_ePhase == ENUM_CLASS(RANRAK_PHASE::PHASE_AIR)) { + if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_AIR)) { m_pFSM->Change_State(FSMSTATE::HOVER); return E_FAIL; } - else if (m_ePhase == ENUM_CLASS(RANRAK_PHASE::PHASE_GROUND)) { + else if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_GROUND)) { if (m_pFSM->IsEnable_Previous(FSMSTATE::TUCKED| FSMSTATE::PULSE)) { m_pFSM->Change_State(FSMSTATE::LAND); @@ -166,12 +179,12 @@ HRESULT CRanrak::Behavior_CombatExitCheck(_float fTimeDelta) return S_OK; } -void CRanrak::Behavior_CombatExit() +void CRanrok::Behavior_CombatExit() { m_pFSM->Disable_State(FSMSTATE::COMBAT); } -void CRanrak::Behavior_GroundEnter() +void CRanrok::Behavior_GroundEnter() { pair<_uint, _bool> pairAnimInfo = {}; m_pFSM->Enable_State(FSMSTATE::GROUND); @@ -180,7 +193,7 @@ void CRanrak::Behavior_GroundEnter() m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); } -HRESULT CRanrak::Behavior_GroundExitCheck(_float fTimeDelta) +HRESULT CRanrok::Behavior_GroundExitCheck(_float fTimeDelta) { if (m_fTargetDistance <= 30.f && m_fTargetDistance != 0.f) { @@ -191,12 +204,12 @@ HRESULT CRanrak::Behavior_GroundExitCheck(_float fTimeDelta) return S_OK; } -void CRanrak::Behavior_GroundExit() +void CRanrok::Behavior_GroundExit() { m_pFSM->Disable_State(FSMSTATE::GROUND); } -void CRanrak::Behavior_HoverEnter() +void CRanrok::Behavior_HoverEnter() { pair<_uint, _bool> pairAnimInfo = {}; m_pFSM->Enable_State(FSMSTATE::HOVER); @@ -213,63 +226,91 @@ void CRanrak::Behavior_HoverEnter() m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); } -HRESULT CRanrak::Behavior_HoverExitCheck(_float fTimeDelta) +HRESULT CRanrok::Behavior_HoverExitCheck(_float fTimeDelta) { + _int iCurrAnimIndex = m_pModelCom->Get_AnimIndex(); + _float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio(); + + if (iCurrAnimIndex == m_Animation[STATEANIM::HOVER_DASH_LEFT].first) + { + if (fRatio<=0.6f) + { + _vector vRight = m_pTransformCom->Get_State(STATE::RIGHT); + vRight = XMVectorSetY(vRight, 0.f); + vRight = XMVector3Normalize(vRight); + _vector vPos = m_pCharacter_Controller->Get_Position(); + _vector vNextPos = vPos - vRight * 5.f * fTimeDelta; + m_pCharacter_Controller->Set_Position(vNextPos); + } + } + else if (iCurrAnimIndex == m_Animation[STATEANIM::HOVER_DASH_RIGHT].first) + { + if (fRatio <= 0.6f) + { + _vector vRight = m_pTransformCom->Get_State(STATE::RIGHT); + vRight = XMVectorSetY(vRight, 0.f); + vRight = XMVector3Normalize(vRight); + _vector vPos = m_pCharacter_Controller->Get_Position(); + _vector vNextPos = vPos + vRight * 5.f * fTimeDelta; + m_pCharacter_Controller->Set_Position(vNextPos); + } + } + if (m_pModelCom->IsFinishedAnim()) { - m_pFSM->Change_State(FSMSTATE::IDLE); + m_pFSM->Change_State(FSMSTATE::IDLEBREAK); return E_FAIL; } return S_OK; } -void CRanrak::Behavior_HoverExit() +void CRanrok::Behavior_HoverExit() { m_pFSM->Disable_State(FSMSTATE::HOVER); } -void CRanrak::Behavior_FlyEnter() +void CRanrok::Behavior_FlyEnter() { } -HRESULT CRanrak::Behavior_FlyExitCheck(_float fTimeDelta) +HRESULT CRanrok::Behavior_FlyExitCheck(_float fTimeDelta) { return E_NOTIMPL; } -void CRanrak::Behavior_FlyExit() +void CRanrok::Behavior_FlyExit() { m_pFSM->Disable_State(FSMSTATE::FLY); } -void CRanrak::Behavior_FireBreathEnter() +void CRanrok::Behavior_FireBreathEnter() { pair<_uint, _bool> pairAnimInfo = {}; m_pFSM->Enable_State(FSMSTATE::FIREBREATH); - if (m_ePhase == ENUM_CLASS(RANRAK_PHASE::PHASE_AIR)) + if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_AIR)) { pairAnimInfo = m_Animation[STATEANIM::FIREBREATH_WINDUP_A]; Add_Event(pairAnimInfo.first, [&]() { pairAnimInfo = m_Animation[STATEANIM::FIREBREATH_A]; - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); - m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIREBREATH)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIREBREATH)]; }, - 0.9f); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIREBREATH)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIREBREATH)]; }, + 0.95f); Add_Event(m_Animation[STATEANIM::FIREBREATH_A].first, [&]() { pairAnimInfo = m_Animation[STATEANIM::FIREBREATH_COOLDOWN_A]; - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); }, - 0.9f); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); }, + 0.95f); } - else if (m_ePhase == ENUM_CLASS(RANRAK_PHASE::PHASE_GROUND)) + else if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_GROUND)) { pairAnimInfo = m_Animation[STATEANIM::FIREBREATH_G]; - m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIREBREATH)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIREBREATH)]; + m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIREBREATH)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIREBREATH)]; } - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); } -HRESULT CRanrak::Behavior_FireBreathExitCheck(_float fTimeDelta) +HRESULT CRanrok::Behavior_FireBreathExitCheck(_float fTimeDelta) { pair<_uint, _bool> pairAnimInfo = {}; _int iCurrAnimIndex = m_pModelCom->Get_AnimIndex(); @@ -283,39 +324,39 @@ HRESULT CRanrak::Behavior_FireBreathExitCheck(_float fTimeDelta) return S_OK; } -void CRanrak::Behavior_FireBreathExit() +void CRanrok::Behavior_FireBreathExit() { m_pFSM->Disable_State(FSMSTATE::FIREBREATH); } -void CRanrak::Behavior_FireSweepEnter() +void CRanrok::Behavior_FireSweepEnter() { pair<_uint, _bool> pairAnimInfo = {}; m_pFSM->Enable_State(FSMSTATE::FIRESWEEP); - if (m_ePhase == ENUM_CLASS(RANRAK_PHASE::PHASE_AIR)) + if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_AIR)) { pairAnimInfo = m_Animation[STATEANIM::FIRESWEEP_WINDUP_A]; Add_Event(pairAnimInfo.first, [&]() { pairAnimInfo = m_Animation[STATEANIM::FIRESWEEP_A]; - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); - m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIRESWEEP)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIRESWEEP)]; }, + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIRESWEEP)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIRESWEEP)]; }, 0.95f); Add_Event(m_Animation[STATEANIM::FIRESWEEP_A].first, [&]() { pairAnimInfo = m_Animation[STATEANIM::FIRESWEEP_COOLDOWN_A]; - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); }, + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); }, 0.95f); } - else if (m_ePhase == ENUM_CLASS(RANRAK_PHASE::PHASE_GROUND)) + else if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_GROUND)) { pairAnimInfo = m_Animation[STATEANIM::FIRESWEEP_G]; - m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIRESWEEP)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIRESWEEP)]; + m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIRESWEEP)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIRESWEEP)]; } - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); } -HRESULT CRanrak::Behavior_FireSweepExitCheck(_float fTimeDelta) +HRESULT CRanrok::Behavior_FireSweepExitCheck(_float fTimeDelta) { pair<_uint, _bool> pairAnimInfo = {}; _int iCurrAnimIndex = m_pModelCom->Get_AnimIndex(); @@ -329,16 +370,16 @@ HRESULT CRanrak::Behavior_FireSweepExitCheck(_float fTimeDelta) return S_OK; } -void CRanrak::Behavior_FireSweepExit() +void CRanrok::Behavior_FireSweepExit() { m_pFSM->Disable_State(FSMSTATE::FIRESWEEP); } -void CRanrak::Behavior_FireBallEnter() +void CRanrok::Behavior_FireBallEnter() { pair<_uint, _bool> pairAnimInfo = {}; m_pFSM->Enable_State(FSMSTATE::FIREBALL); - if (m_ePhase == ENUM_CLASS(RANRAK_PHASE::PHASE_AIR)) + if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_AIR)) { _int iRand = m_pGameInstance->Real_Random_Int(0, 1); @@ -352,7 +393,7 @@ void CRanrak::Behavior_FireBallEnter() break; } } - else if (m_ePhase == ENUM_CLASS(RANRAK_PHASE::PHASE_GROUND)) + else if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_GROUND)) { _int iRand = m_pGameInstance->Real_Random_Int(0, 1); @@ -367,11 +408,11 @@ void CRanrak::Behavior_FireBallEnter() } } - m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIREBALL)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIREBALL)]; - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); + m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIREBALL)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIREBALL)]; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); } -HRESULT CRanrak::Behavior_FireBallExitCheck(_float fTimeDelta) +HRESULT CRanrok::Behavior_FireBallExitCheck(_float fTimeDelta) { pair<_uint, _bool> pairAnimInfo = {}; _int iCurrAnimIndex = m_pModelCom->Get_AnimIndex(); @@ -385,16 +426,16 @@ HRESULT CRanrak::Behavior_FireBallExitCheck(_float fTimeDelta) return S_OK; } -void CRanrak::Behavior_FireBallExit() +void CRanrok::Behavior_FireBallExit() { m_pFSM->Disable_State(FSMSTATE::FIREBALL); } -void CRanrak::Behavior_SwipeEnter() +void CRanrok::Behavior_SwipeEnter() { pair<_uint, _bool> pairAnimInfo = {}; m_pFSM->Enable_State(FSMSTATE::SWIPE); - if (m_ePhase == ENUM_CLASS(RANRAK_PHASE::PHASE_GROUND)) + if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_GROUND)) { _int iRand = m_pGameInstance->Real_Random_Int(0, 1); @@ -409,11 +450,11 @@ void CRanrak::Behavior_SwipeEnter() } } - m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::SWIPE)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::SWIPE)]; - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); + m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::SWIPE)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::SWIPE)]; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); } -HRESULT CRanrak::Behavior_SwipeExitCheck(_float fTimeDelta) +HRESULT CRanrok::Behavior_SwipeExitCheck(_float fTimeDelta) { pair<_uint, _bool> pairAnimInfo = {}; _int iCurrAnimIndex = m_pModelCom->Get_AnimIndex(); @@ -427,12 +468,12 @@ HRESULT CRanrak::Behavior_SwipeExitCheck(_float fTimeDelta) return S_OK; } -void CRanrak::Behavior_SwipeExit() +void CRanrok::Behavior_SwipeExit() { m_pFSM->Disable_State(FSMSTATE::SWIPE); } - -void CRanrak::Behavior_SkillEnter() +// FireBurst 란록은 평상시에 맞지않는데 특정 구체를 파괴해서 란록한테 피해를 입히면 버스트상태가 해제되고 이제 마법에 맞는다. 그리고 특정시간이 지나면 이 파이어버스트 상태가 되면서 다시 맞지않는다. +void CRanrok::Behavior_SkillEnter() { pair<_uint, _bool> pairAnimInfo = {}; m_pFSM->Enable_State(FSMSTATE::SKILL); @@ -440,7 +481,7 @@ void CRanrak::Behavior_SkillEnter() m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); } -HRESULT CRanrak::Behavior_SkillExitCheck(_float fTimeDelta) +HRESULT CRanrok::Behavior_SkillExitCheck(_float fTimeDelta) { if (m_pModelCom->IsFinishedAnim()) { @@ -450,27 +491,90 @@ HRESULT CRanrak::Behavior_SkillExitCheck(_float fTimeDelta) return S_OK; } -void CRanrak::Behavior_SkillExit() +void CRanrok::Behavior_SkillExit() { m_pFSM->Disable_State(FSMSTATE::SKILL); } - -void CRanrak::Behavior_PulseEnter() +// 깨물면서 돌진 +void CRanrok::Behavior_RushEnter() { pair<_uint, _bool> pairAnimInfo = {}; - m_pFSM->Enable_State(FSMSTATE::PULSE); - - pairAnimInfo = m_Animation[STATEANIM::PULSE]; - m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::PULSE)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::PULSE)]; - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); + m_pFSM->Enable_State(FSMSTATE::RUSH); + pairAnimInfo = m_Animation[STATEANIM::RUSH_LOOP]; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::RUSH)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::RUSH)]; + m_bLookAt = false; } -HRESULT CRanrak::Behavior_PulseExitCheck(_float fTimeDelta) +HRESULT CRanrok::Behavior_RushExitCheck(_float fTimeDelta) { pair<_uint, _bool> pairAnimInfo = {}; _int iCurrAnimIndex = m_pModelCom->Get_AnimIndex(); + m_fRushTime += fTimeDelta; + if(m_fRushTime>=2.5f && iCurrAnimIndex == m_Animation[STATEANIM::RUSH_LOOP].first) + { + if (m_fDegree >= 60.f) + { + if (m_fCross < 0) + { + pairAnimInfo = m_Animation[STATEANIM::IDLE_TURN_L]; + } + else { + pairAnimInfo = m_Animation[STATEANIM::IDLE_TURN_R]; + } + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + } + else + { + m_pFSM->Change_State(FSMSTATE::GROUND); + return E_FAIL; + } + + } + else if (iCurrAnimIndex == m_Animation[STATEANIM::RUSH_LOOP].first) + { + _vector vLook = m_pTransformCom->Get_State(STATE::LOOK); + vLook = XMVectorSetY(vLook, 0.f); + vLook = XMVector3Normalize(vLook); + _vector vPos = m_pCharacter_Controller->Get_Position(); + _vector vNextPos = vPos + vLook * 5.f * fTimeDelta; + m_pCharacter_Controller->Set_Position(vNextPos); + return S_OK; + } - if (m_pModelCom->IsFinishedAnim()) + if (m_pModelCom->IsFinishedAnim() && iCurrAnimIndex != m_Animation[STATEANIM::RUSH_LOOP].first) + { + m_pFSM->Change_State(FSMSTATE::GROUND); + return E_FAIL; + } + return S_OK; +} + +void CRanrok::Behavior_RushExit() +{ + m_pFSM->Disable_State(FSMSTATE::RUSH); + m_fRushTime = 0.f; + m_bLookAt = true; +} + +void CRanrok::Behavior_PulseEnter() +{ + pair<_uint, _bool> pairAnimInfo = {}; + m_pFSM->Enable_State(FSMSTATE::PULSE); + m_bLookAt = false; + + pairAnimInfo = m_Animation[STATEANIM::PULSE]; + m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::PULSE)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::PULSE)]; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); +} + +HRESULT CRanrok::Behavior_PulseExitCheck(_float fTimeDelta) +{ + pair<_uint, _bool> pairAnimInfo = {}; + _int iCurrAnimIndex = m_pModelCom->Get_AnimIndex(); + _float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio(); + + if (fRatio>=0.95f) { m_pFSM->Change_State(FSMSTATE::COMBAT); return E_FAIL; @@ -478,36 +582,39 @@ HRESULT CRanrak::Behavior_PulseExitCheck(_float fTimeDelta) return S_OK; } -void CRanrak::Behavior_PulseExit() +void CRanrok::Behavior_PulseExit() { m_pFSM->Disable_State(FSMSTATE::PULSE); + m_bLookAt = true; } -void CRanrak::Behavior_TuckedEnter() +void CRanrok::Behavior_TuckedEnter() { pair<_uint, _bool> pairAnimInfo = {}; m_pFSM->Enable_State(FSMSTATE::TUCKED); pairAnimInfo = m_Animation[STATEANIM::TUCKED]; m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); - m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::TUCKED)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::TUCKED)]; } -HRESULT CRanrak::Behavior_TuckedExitCheck(_float fTimeDelta) +HRESULT CRanrok::Behavior_TuckedExitCheck(_float fTimeDelta) { pair<_uint, _bool> pairAnimInfo = {}; _int iCurrAnimIndex = m_pModelCom->Get_AnimIndex(); - m_fTuckedTime += fTimeDelta; - if (m_fTuckedTime >= 5.f && iCurrAnimIndex == m_Animation[STATEANIM::TUCKED].first) + MoveTo(fTimeDelta); + + //m_fTuckedTime += fTimeDelta; + if (/*m_fTuckedTime >= 5.f &&*/m_bTucked&& iCurrAnimIndex == m_Animation[STATEANIM::TUCKED].first) { - m_fTuckedTime = 0.f; + /*m_fTuckedTime = 0.f;*/ + m_iCurrentFlow++; pairAnimInfo = m_Animation[STATEANIM::FLY_TO_HOVER]; - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); return S_OK; } - if (m_pModelCom->IsFinishedAnim()) + if (m_pModelCom->IsFinishedAnim() && iCurrAnimIndex == m_Animation[STATEANIM::FLY_TO_HOVER].first) { m_pFSM->Change_State(FSMSTATE::COMBAT); return E_FAIL; @@ -515,21 +622,33 @@ HRESULT CRanrak::Behavior_TuckedExitCheck(_float fTimeDelta) return S_OK; } -void CRanrak::Behavior_TuckedExit() +void CRanrok::Behavior_TuckedExit() { m_pFSM->Disable_State(FSMSTATE::TUCKED); + m_bTucked = false; } -void CRanrak::Behavior_LandEnter() +void CRanrok::Behavior_LandEnter() { pair<_uint, _bool> pairAnimInfo = {}; m_pFSM->Enable_State(FSMSTATE::LAND); + m_pCharacter_Controller->SetGravity(true); + m_ePhase = ENUM_CLASS(RANROK_PHASE::PHASE_GROUND); pairAnimInfo = m_Animation[STATEANIM::LAND]; - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + + Add_Event(pairAnimInfo.first, + [this]() { CPlayer* pPlayer = static_cast(m_pInfoInstance->Get_NearestPlayerAlly(Get_WorldPostion()).first); + if (pPlayer == nullptr) + return; + _float fDistance = XMVectorGetX(XMVector4Length(pPlayer->Get_WorldPostion() - Get_WorldPostion())); + _float fShakeValue = clamp(30.f / fDistance, 5.f, 10.f); + pPlayer->Start_CameraShake(1.2f, fShakeValue); }, + 0.53f); } -HRESULT CRanrak::Behavior_LandExitCheck(_float fTimeDelta) +HRESULT CRanrok::Behavior_LandExitCheck(_float fTimeDelta) { if (m_pModelCom->IsFinishedAnim()) { @@ -539,93 +658,48 @@ HRESULT CRanrak::Behavior_LandExitCheck(_float fTimeDelta) return S_OK; } -void CRanrak::Behavior_LandExit() +void CRanrok::Behavior_LandExit() { m_pFSM->Disable_State(FSMSTATE::LAND); } -void CRanrak::Behavior_HitEnter() +void CRanrok::Behavior_HitEnter() { pair<_uint, _bool> pairAnimInfo = {}; m_pFSM->Enable_State(FSMSTATE::HIT); m_bLookAt = false; - - switch (m_eHitSpell) + if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_AIR)) { - case ENUM_CLASS(SKILL_TYPE::DESCENDO): - pairAnimInfo = m_Animation[STATEANIM::KNOCKDOWN_FWD]; - break; - case ENUM_CLASS(SKILL_TYPE::BOMBARDA): - pairAnimInfo = m_Animation[STATEANIM::STUMBLE_BWD_L]; - break; - case ENUM_CLASS(SKILL_TYPE::JAP): - { - if (m_fHitDegree >= 90.f) - { - _int iRandIndex = m_pGameInstance->Real_Random_Int(0, 3); - 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]; - } + pairAnimInfo = m_Animation[STATEANIM::HIT_BWD]; // 스몰 } - break; - case ENUM_CLASS(SKILL_TYPE::LEVIOSO): - pairAnimInfo = m_Animation[STATEANIM::HIT_LEVIOSO]; - break; - case ENUM_CLASS(SKILL_TYPE::ACCIO): - pairAnimInfo = m_Animation[STATEANIM::INCARCEROUS]; - break; + else if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_GROUND)) + { + pairAnimInfo = m_Animation[STATEANIM::HIT_BWD4]; // 스몰 } m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); } -HRESULT CRanrak::Behavior_HitExitCheck(_float fTimeDelta) +HRESULT CRanrok::Behavior_HitExitCheck(_float fTimeDelta) { pair<_uint, _bool> pairAnimInfo = {}; _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex(); if (m_pModelCom->IsFinishedAnim()) { - m_pFSM->Change_State(FSMSTATE::IDLE); + m_pFSM->Change_State(FSMSTATE::COMBAT); return E_FAIL; } return E_FAIL; } -void CRanrak::Behavior_HitExit() +void CRanrok::Behavior_HitExit() { m_pFSM->Disable_State(FSMSTATE::HIT); m_bLookAt = true; } -void CRanrak::Behavior_DeadEnter() +void CRanrok::Behavior_DeadEnter() { m_bLookAt = false; pair<_uint, _bool> pairAnimInfo = {}; @@ -636,42 +710,12 @@ void CRanrak::Behavior_DeadEnter() m_pRigidBody->SetActive(false); m_pCharacter_Controller->SetActive(false); - _bool bStrongerKnockDown = { false }; - switch (m_eHitSpell) - { - case STATEANIM::KNOCKDOWN_FWD: - bStrongerKnockDown = true; - break; - case STATEANIM::TUMBLE2: - bStrongerKnockDown = true; - break; - default: - break; - } - - _float fabsRadius = fabsf(m_fHitRadius); - _uint iState = { UINT_MAX }; - - if (fabsRadius > 135.f) { - iState = STATEANIM::DEAD_FWD; - } - else if (fabsRadius < 45.f) { - iState = STATEANIM::DEAD_BWD; - } - else { - if (m_fHitRadius < 0.f) { - iState = STATEANIM::DEAD_L; - } - else { - iState = STATEANIM::DEAD_R; - } - } - pairAnimInfo = m_Animation[iState + bStrongerKnockDown]; + pairAnimInfo = m_Animation[STATEANIM::DEAD]; m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); } -HRESULT CRanrak::Behavior_DeadExitCheck(_float fTimeDelta) +HRESULT CRanrok::Behavior_DeadExitCheck(_float fTimeDelta) { if (FLT_EPSILON > m_pModelCom->Get_CurrentTrackProgressRatio()) { return E_PENDING; @@ -679,13 +723,13 @@ HRESULT CRanrak::Behavior_DeadExitCheck(_float fTimeDelta) return S_OK; } -void CRanrak::Behavior_DeadExit() +void CRanrok::Behavior_DeadExit() { m_bDead = true; } -void CRanrak::Add_FSM() +void CRanrok::Add_FSM() { #pragma region Behavior_Movement_NotFocus { @@ -830,6 +874,18 @@ void CRanrak::Add_FSM() Desc.funcLateUpdate = nullptr; m_States.emplace(FSMSTATE::SKILL, CState_Skill::Create(&Desc)); } + + { + CState_Skill2::STATE_SKILL2_DESC Desc{}; + Desc.pOwner = this; + Desc.funcEnterEvent = [this]() { Behavior_RushEnter(); }; + Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_RushExitCheck(fTimedelta); }; + Desc.funcExitEvent = [this]() { Behavior_RushExit(); }; + Desc.funcPriorityUpdate = nullptr; + Desc.funcLateUpdate = nullptr; + m_States.emplace(FSMSTATE::RUSH, CState_Skill2::Create(&Desc)); + } + { CState_Pulse::STATE_PULSE_DESC Desc{}; Desc.pOwner = this; @@ -901,12 +957,15 @@ void CRanrak::Add_FSM() } -void CRanrak::Set_Anim() +void CRanrok::Set_Anim() { - m_Animation[STATEANIM::IDLE_G] = { 52,true }; + m_Animation[STATEANIM::IDLE_G] = { 100,true }; m_Animation[STATEANIM::IDLE_BREAK1] = { 27,false }; m_Animation[STATEANIM::IDLE_BREAK2] = { 28,false }; + m_Animation[STATEANIM::IDLE_TURN_L] = { 124,false }; + m_Animation[STATEANIM::IDLE_TURN_R] = { 125,false }; + m_Animation[STATEANIM::HOVER_LOOP] = { 29,true }; m_Animation[STATEANIM::HOVER_DASH_BWD] = { 23,false }; m_Animation[STATEANIM::HOVER_DASH_FWD] = { 24,false }; @@ -941,8 +1000,21 @@ void CRanrak::Set_Anim() m_Animation[STATEANIM::LAND] = { 32,false }; - m_Animation[STATEANIM::SKILL] = { 12,false }; + m_Animation[STATEANIM::SKILL] = { 12,false }; // FireBurst + + m_Animation[STATEANIM::RUSH_LOOP] = { 91,true }; // 앞으로 물면서 돌진 + + m_Animation[STATEANIM::FIREBURST_REEL] = { 13,false }; // Air reel + + m_Animation[STATEANIM::HIT_BWD] = { 22,false }; // Air Small + m_Animation[STATEANIM::HIT_BWD2] = { 37,false }; // Air Large + + m_Animation[STATEANIM::HIT_BWD3] = { 35,false }; // Ground Large + m_Animation[STATEANIM::HIT_BWD4] = { 36,false }; // Ground Small + + m_Animation[STATEANIM::DEAD] = { 34,false }; + + - //12 } diff --git a/Jusin154_Team3D/Client/Private/SpellLearn.cpp b/Jusin154_Team3D/Client/Private/SpellLearn.cpp new file mode 100644 index 000000000..884254d57 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/SpellLearn.cpp @@ -0,0 +1,252 @@ +#include "pch.h" +#include "SpellLearn.h" +#include "GameInstance.h" +#include "InfoInstance.h" + +CSpellLearn::CSpellLearn(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CSpellLearn::CSpellLearn(const CSpellLearn& rhs) + :CElementObject(rhs), + m_pInfoInstance(CInfoInstance::GetInstance()) +{ +} + +HRESULT CSpellLearn::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CSpellLearn::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 600.f; + Desc.fY = 0.f; + Desc.fSizeX = 550.f; + Desc.fSizeY = 550.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_fTimeMult = 3.f; + m_fAlpha = 1.f; + m_fAlphaTime = 5.f; + Change_Image(0); + Visible(false); + return S_OK; +} + +void CSpellLearn::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CSpellLearn::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 * m_fAlphaTime;; + + if (m_fAlpha <= 0.f) + { + m_bFadeOut = false; + m_fAlpha = 0.f; + } + } + + m_fTime += fTimeDelta * m_fTimeMult; + __super::Update(fTimeDelta); +} + +void CSpellLearn::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + __super::Late_Update(fTimeDelta); + } +} + +HRESULT CSpellLearn::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::COLOR)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + + return S_OK; +} + +_vector CSpellLearn::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CSpellLearn::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_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_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float)))) + { + return E_FAIL; + } + return S_OK; +} + +HRESULT CSpellLearn::Ready_Components(void* pArg) +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_Levioso"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_Goldleaf_Large"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CSpellLearn::Change_Image(_int SpellID) +{ + _wstring pName = TEXT("Prototype_Texture_"); + _wstring pImageName = pName + m_pInfoInstance->Get_SpellLearn(SpellID).pImageName; + + if (m_pDiffuse_TextureCom) + { + Remove_Component(); + SAFE_RELEASE(m_pDiffuse_TextureCom); + } + if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, pImageName, reinterpret_cast(&m_pDiffuse_TextureCom)))) + return E_FAIL; + + return S_OK; +} + +CSpellLearn* CSpellLearn::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CSpellLearn* pInstance = new CSpellLearn(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CSpellLearn"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CSpellLearn::Clone(void* pArg, CGameObject* pOwner) +{ + CSpellLearn* pInstance = new CSpellLearn(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CSpellLearn"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CSpellLearn::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pDiffuse_TextureCom1); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +#ifdef _DEBUG +void CSpellLearn::Describe_Entity() +{ +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/SpellLearn_Canvas.cpp b/Jusin154_Team3D/Client/Private/SpellLearn_Canvas.cpp new file mode 100644 index 000000000..36d8e4dd0 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/SpellLearn_Canvas.cpp @@ -0,0 +1,140 @@ +#include "pch.h" +#include "UI_Manager.h" +#include "SpellLearn_Canvas.h" +#include "GameInstance.h" +#include "SpellLearn_Panel.h" + +CSpellLearn_Canvas::CSpellLearn_Canvas(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CCanvasObject(pDevice, pContext) +{ +} + +CSpellLearn_Canvas::CSpellLearn_Canvas(const CSpellLearn_Canvas& rhs) + :CCanvasObject(rhs) +{ +} + +HRESULT CSpellLearn_Canvas::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CSpellLearn_Canvas::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 0.f; + Desc.fY = 0.f; + Desc.fSizeX = 1920.f; + Desc.fSizeY = 1080.f; + + if (FAILED(__super::Initialize(&Desc))) + { + return E_FAIL; + } + if (FAILED(Ready_Components(pArg))) + { + return E_FAIL; + } + if (FAILED(Ready_Panel(pArg))) + { + return E_FAIL; + } + Visible(false); + return S_OK; +} + +void CSpellLearn_Canvas::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); +} + +void CSpellLearn_Canvas::Update(_float fTimeDelta) +{ + __super::Update(fTimeDelta); +} + +void CSpellLearn_Canvas::Late_Update(_float fTimeDelta) +{ + if (m_bVisible) { + } + __super::Late_Update(fTimeDelta); +} + +HRESULT CSpellLearn_Canvas::Render() +{ + return S_OK; +} + +_vector CSpellLearn_Canvas::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CSpellLearn_Canvas::Bind_ShaderResources() +{ + return S_OK; +} + +HRESULT CSpellLearn_Canvas::Ready_Components(void* pArg) +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CSpellLearn_Canvas::Ready_Panel(void* pArg) +{ + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pSpellLearn_Panel)))) + { + return E_FAIL; + } + Add_Panel(TEXT("SpellLearn_Panel"), m_pSpellLearn_Panel); + + return S_OK; +} + +void CSpellLearn_Canvas::Clear_Penel() +{ +} + +CSpellLearn_Canvas* CSpellLearn_Canvas::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CSpellLearn_Canvas* pInstance = new CSpellLearn_Canvas(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CSpellLearn_Canvas"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CSpellLearn_Canvas::Clone(void* pArg, CGameObject* pOwner) +{ + CSpellLearn_Canvas* pInstance = new CSpellLearn_Canvas(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CSpellLearn_Canvas"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CSpellLearn_Canvas::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pVIBufferCom); +} + +#ifdef _DEBUG +void CSpellLearn_Canvas::Describe_Entity() +{ +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/SpellLearn_Data.cpp b/Jusin154_Team3D/Client/Private/SpellLearn_Data.cpp new file mode 100644 index 000000000..0f4d1a4aa --- /dev/null +++ b/Jusin154_Team3D/Client/Private/SpellLearn_Data.cpp @@ -0,0 +1,106 @@ +#include "pch.h" +#include "SpellLearn_Data.h" +#include "UIObject.h" +#include "InfoInstance.h" + +CSpellLearn_Data::CSpellLearn_Data() + :m_pInfoInstance(CInfoInstance::GetInstance()) +{ +} + +HRESULT CSpellLearn_Data::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex) +{ + Load_SpellInfo("../Bin/Resources/Data/UI/SpellLearn.xml"); + + return S_OK; +} + +const SPELLLEARNINFO& CSpellLearn_Data::Get_SpellLearn(_int Index) const +{ + return m_SpellLearnInfos[Index]; +} + +_int CSpellLearn_Data::Get_Index() +{ + return m_iSpellLearn_Count; +} + +void CSpellLearn_Data::Update(_float fTimeDelta) +{ +} + +HRESULT CSpellLearn_Data::Load_SpellInfo(const _char* pFilePath) +{ + tinyxml2::XMLDocument doc; + if (doc.LoadFile(pFilePath) != tinyxml2::XML_SUCCESS) + return E_FAIL; + + tinyxml2::XMLElement* pSpellLearnInfo = doc.FirstChildElement("SpellLearnInfo"); + if (!pSpellLearnInfo) return E_FAIL; + + tinyxml2::XMLElement* pSpellLearnData = pSpellLearnInfo->FirstChildElement("SpellLearnData"); + if (!pSpellLearnData) return E_FAIL; + + // 모든 Name 요소 반복 + tinyxml2::XMLElement* pName = pSpellLearnData->FirstChildElement("Name"); + while (pName) + { + SPELLLEARNINFO Info{}; + + // 속성 읽기 + Info.pSpellName = CMyTools::ToWstring(pName->Attribute("SpellName")); + Info.pImageName = CMyTools::ToWstring(pName->Attribute("ImageName")); + pName->QueryFloatAttribute("Size", &Info.fSpellSize); + + _float fX{}, fY{}; + pName->QueryFloatAttribute("x", &fX); + pName->QueryFloatAttribute("y", &fY); + Info.fStartPosition = _float2(fX, fY); + + // Position 요소 반복 + tinyxml2::XMLElement* pPosition = pName->FirstChildElement("Position"); + while (pPosition) + { + tinyxml2::XMLElement* pPos = pPosition->FirstChildElement("Pos"); + if (pPos) + { + _float px{}, py{}; + pPos->QueryFloatAttribute("x", &px); + pPos->QueryFloatAttribute("y", &py); + Info.Lines.push_back(XMVectorSet(px, py, 0.f, 1.f)); + } + + // 다음 Position으로 이동 + pPosition = pPosition->NextSiblingElement("Position"); + } + + // 벡터에 추가 + m_SpellLearnInfos.push_back(Info); + m_iSpellLearn_Count++; + + // 다음 Name으로 이동 + pName = pName->NextSiblingElement("Name"); + } + + return S_OK; +} + +CSpellLearn_Data* CSpellLearn_Data::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CSpellLearn_Data* pInstance = new CSpellLearn_Data(); + + if (FAILED(pInstance->Initialize(pDevice, pContext))) + { + MSG_BOX("Failed to Cloned : CSpellLearn_Data"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CSpellLearn_Data::Free() +{ + __super::Free(); + + m_SpellLearnInfos.clear(); +} diff --git a/Jusin154_Team3D/Client/Private/SpellLearn_MovePointer.cpp b/Jusin154_Team3D/Client/Private/SpellLearn_MovePointer.cpp new file mode 100644 index 000000000..85ca12265 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/SpellLearn_MovePointer.cpp @@ -0,0 +1,284 @@ +#include "pch.h" +#include "SpellLearn_MovePointer.h" +#include "GameInstance.h" +#include "InfoInstance.h" + +CSpellLearn_MovePointer::CSpellLearn_MovePointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CSpellLearn_MovePointer::CSpellLearn_MovePointer(const CSpellLearn_MovePointer& rhs) + :CElementObject(rhs), + m_pInfoInstance(CInfoInstance::GetInstance()) +{ +} + +HRESULT CSpellLearn_MovePointer::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CSpellLearn_MovePointer::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 476.f; + Desc.fY = -253.f; + Desc.fSizeX = 32.f; + Desc.fSizeY = 32.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_fTimeMult = 3.f; + m_fAlpha = 1.f; + m_fAlphaTime = 5.f; + m_fMoveSpeed = 15.f; + Set_SpellLearn(0); + m_fAngle = XMConvertToRadians(0); + Visible(false); + return S_OK; +} + +void CSpellLearn_MovePointer::Set_SpellLearn(_int Index) +{ + m_iLineIndex = _int(m_pInfoInstance->Get_SpellLearn(Index).Lines.size()); + m_MoveLine = m_pInfoInstance->Get_SpellLearn(Index).Lines; + m_iCurrentLine = 0; + m_fX = m_pInfoInstance->Get_SpellLearn(Index).fStartPosition.x; + m_fY = m_pInfoInstance->Get_SpellLearn(Index).fStartPosition.y; +} + +void CSpellLearn_MovePointer::Line(_float fTime) +{ + m_vLerp_Position = m_MoveLine[m_iCurrentLine]; + + if (Start_Lerp(m_fMoveSpeed * fTime) == true) + { + if (m_iCurrentLine < m_iLineIndex - 1) + { + ++m_iCurrentLine; + } + else + { + m_bMoveStart = false; + } + } + +} + +void CSpellLearn_MovePointer::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CSpellLearn_MovePointer::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 * m_fAlphaTime;; + + if (m_fAlpha <= 0.f) + { + m_bFadeOut = false; + m_fAlpha = 0.f; + } + } + + if (m_pGameInstance->Key_Down(DIK_L)) + { + m_bMoveStart = true; + } + + if (m_bMoveStart == true) + { + Line(fTimeDelta); + } + + POINT ptMouse{}; + GetCursorPos(&ptMouse); + ScreenToClient(g_hWnd, &ptMouse); + _float2 fMouse; + fMouse.x = ptMouse.x - (g_iWinSizeX * 0.5f); + fMouse.y = -ptMouse.y + (g_iWinSizeY * 0.5f); + + fMouse.x = fMouse.x - m_fX; + fMouse.y = fMouse.y - m_fY; + + + m_fAngle = atan2(-fMouse.x, fMouse.y); + + m_fTime += fTimeDelta * m_fTimeMult; + __super::Update(fTimeDelta); +} + +void CSpellLearn_MovePointer::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + __super::Late_Update(fTimeDelta); + } +} + +HRESULT CSpellLearn_MovePointer::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ROTATION)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + + return S_OK; +} + +_vector CSpellLearn_MovePointer::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CSpellLearn_MovePointer::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_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_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_fMapAngle", &m_fAngle, sizeof(_float)))) + { + return E_FAIL; + } + return S_OK; +} + +HRESULT CSpellLearn_MovePointer::Ready_Components(void* pArg) +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_SU_Cursor"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + + return S_OK; +} + +CSpellLearn_MovePointer* CSpellLearn_MovePointer::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CSpellLearn_MovePointer* pInstance = new CSpellLearn_MovePointer(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CSpellLearn_MovePointer"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CSpellLearn_MovePointer::Clone(void* pArg, CGameObject* pOwner) +{ + CSpellLearn_MovePointer* pInstance = new CSpellLearn_MovePointer(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CSpellLearn_MovePointer"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CSpellLearn_MovePointer::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +#ifdef _DEBUG +void CSpellLearn_MovePointer::Describe_Entity() +{ +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/SpellLearn_Name.cpp b/Jusin154_Team3D/Client/Private/SpellLearn_Name.cpp new file mode 100644 index 000000000..ad96fa494 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/SpellLearn_Name.cpp @@ -0,0 +1,255 @@ +#include "pch.h" +#include "SpellLearn_Name.h" +#include "GameInstance.h" +#include "InfoInstance.h" + +CSpellLearn_Name::CSpellLearn_Name(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CSpellLearn_Name::CSpellLearn_Name(const CSpellLearn_Name& rhs) + :CElementObject(rhs), + m_pInfoInstance(CInfoInstance::GetInstance()) + +{ +} + +HRESULT CSpellLearn_Name::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CSpellLearn_Name::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 600.f; + Desc.fY = 420.f; + Desc.fSizeX = 432.f; + Desc.fSizeY = 27.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_fTimeMult = 3.f; + m_fAlpha = 1.f; + m_fAlphaTime = 5.f; + m_vNine_Slice = _float4(216.f, 216.f, 0.f, 27.f); + m_fFontX = 944.f; + m_fFontY = 520.f; + SizeUpX(550.f); + SizeUpY(27.f); + Set_Name(0); + Visible(false); + return S_OK; +} + +void CSpellLearn_Name::Set_Name(_int Index) +{ + SizeUpX(m_pInfoInstance->Get_SpellLearn(Index).fSpellSize); + m_pSpell_Name = m_pInfoInstance->Get_SpellLearn(Index).pSpellName; +} + +void CSpellLearn_Name::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CSpellLearn_Name::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 * m_fAlphaTime;; + + if (m_fAlpha <= 0.f) + { + m_bFadeOut = false; + m_fAlpha = 0.f; + } + } + + m_fTime += fTimeDelta * m_fTimeMult; + __super::Update(fTimeDelta); +} + +void CSpellLearn_Name::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + __super::Late_Update(fTimeDelta); + } +} + +HRESULT CSpellLearn_Name::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::QUEST_BORDER)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + + _float OffSet = (m_pGameInstance->FontSizeX(TEXT("Font_size20"), m_pSpell_Name.c_str()) - 30) * 0.5f; + m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pSpell_Name.c_str(), _float2((m_fFontX + m_fX) - OffSet, m_fFontY - m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha)); + + return S_OK; +} + +_vector CSpellLearn_Name::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CSpellLearn_Name::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_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_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_fNine_Slice", &m_vNine_Slice, sizeof(_float4)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fOrigin_Size", &m_fOrigin_Size, sizeof(_float2)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_vScale, sizeof(_float2)))) + { + return E_FAIL; + } + return S_OK; +} + +HRESULT CSpellLearn_Name::Ready_Components(void* pArg) +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_Spell_Name"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + + return S_OK; +} + +CSpellLearn_Name* CSpellLearn_Name::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CSpellLearn_Name* pInstance = new CSpellLearn_Name(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CSpellLearn_Name"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CSpellLearn_Name::Clone(void* pArg, CGameObject* pOwner) +{ + CSpellLearn_Name* pInstance = new CSpellLearn_Name(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CSpellLearn_Name"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CSpellLearn_Name::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +#ifdef _DEBUG +void CSpellLearn_Name::Describe_Entity() +{ +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/SpellLearn_Panel.cpp b/Jusin154_Team3D/Client/Private/SpellLearn_Panel.cpp new file mode 100644 index 000000000..ff5a40be3 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/SpellLearn_Panel.cpp @@ -0,0 +1,250 @@ +#include "pch.h" +#include "SpellLearn_Panel.h" +#include "GameInstance.h" +#include "SpellLearn_Name.h" +#include "SpellLearn.h" +#include "SpellLearn_MovePointer.h" +#include "SpellLearn_Data.h" +#include "InfoInstance.h" + +CSpellLearn_Panel::CSpellLearn_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CPanelObject(pDevice, pContext) +{ +} + +CSpellLearn_Panel::CSpellLearn_Panel(const CSpellLearn_Panel& rhs) + :CPanelObject(rhs), + m_pInfoInstance(CInfoInstance::GetInstance()) +{ +} + +HRESULT CSpellLearn_Panel::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CSpellLearn_Panel::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 960.f; + Desc.fY = -540.f; + Desc.fSizeX = g_iWinSizeX; + Desc.fSizeY = g_iWinSizeY; + + if (FAILED(__super::Initialize(&Desc))) + { + return E_FAIL; + } + if (FAILED(Ready_Components(pArg))) + { + return E_FAIL; + } + if (FAILED(Ready_Element(pArg))) + { + return E_FAIL; + } + m_fCanvasAlpha = 1.f; + m_fSortZ = 0.05f; + m_fDelayTime = 1.f; + Visible(true); + ElementAllVisible(true); + return S_OK; +} + +void CSpellLearn_Panel::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CSpellLearn_Panel::Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + + if (m_pGameInstance->Key_Down(DIK_M)) + { + if (Index >= m_pInfoInstance->Get_SpellLearnIndex() - 1) + { + Index = 0; + } + else + { + Index++; + } + static_cast(m_pSpellLearn)->Change_Image(Index); + static_cast(m_pSpellLearn_MovePointer)->Set_SpellLearn(Index); + static_cast(m_pSpellLearn_Name)->Set_Name(Index); + } + + __super::Update(fTimeDelta); +} + +void CSpellLearn_Panel::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + __super::Late_Update(fTimeDelta); + } +} + +HRESULT CSpellLearn_Panel::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::SPELL_LEARN)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + + return S_OK; +} + +_vector CSpellLearn_Panel::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CSpellLearn_Panel::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_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), 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_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float)))) + { + return E_FAIL; + } + return S_OK; +} + +HRESULT CSpellLearn_Panel::Ready_Components(void* pArg) +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_SpellLearn"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_SpellLinkDivide"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CSpellLearn_Panel::Ready_Element(void* pArg) +{ + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_Name)))) + { + return E_FAIL; + } + Add_Element(TEXT("SpellLearn_Name"), m_pSpellLearn_Name); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn)))) + { + return E_FAIL; + } + Add_Element(TEXT("SpellLearn"), m_pSpellLearn); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_MovePointer)))) + { + return E_FAIL; + } + Add_Element(TEXT("SpellLearn_MovePointer"), m_pSpellLearn_MovePointer); + + return S_OK; +} + +CSpellLearn_Panel* CSpellLearn_Panel::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CSpellLearn_Panel* pInstance = new CSpellLearn_Panel(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CSpellLearn_Panel"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CSpellLearn_Panel::Clone(void* pArg, CGameObject* pOwner) +{ + CSpellLearn_Panel* pInstance = new CSpellLearn_Panel(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CSpellLearn_Panel"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CSpellLearn_Panel::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pDiffuse_TextureCom1); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +#ifdef _DEBUG +void CSpellLearn_Panel::Describe_Entity() +{ +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Troll_State_Rush.cpp b/Jusin154_Team3D/Client/Private/State_Rush.cpp similarity index 57% rename from Jusin154_Team3D/Client/Private/Troll_State_Rush.cpp rename to Jusin154_Team3D/Client/Private/State_Rush.cpp index 4051d7793..3f217901c 100644 --- a/Jusin154_Team3D/Client/Private/Troll_State_Rush.cpp +++ b/Jusin154_Team3D/Client/Private/State_Rush.cpp @@ -1,20 +1,20 @@ #include "pch.h" -#include "Troll_State_Rush.h" +#include "State_Rush.h" #include "GameInstance.h" #include "Unit.h" -CTroll_State_Rush::CTroll_State_Rush() +CState_Rush::CState_Rush() :CState_Root() { } -void CTroll_State_Rush::Enter() +void CState_Rush::Enter() { *m_pRushPlayerHit = false; __super::Enter(); } -HRESULT CTroll_State_Rush::Update(_float fTimeDelta) +HRESULT CState_Rush::Update(_float fTimeDelta) { if (E_FAIL == (__super::Update(fTimeDelta))) { return E_FAIL; @@ -22,13 +22,13 @@ HRESULT CTroll_State_Rush::Update(_float fTimeDelta) return S_OK; } -void CTroll_State_Rush::Exit() +void CState_Rush::Exit() { *m_pRushPlayerHit = false; __super::Exit(); } -HRESULT CTroll_State_Rush::Initialize(TROLL_STATE_RUSH_DESC* pDesc) +HRESULT CState_Rush::Initialize(STATE_RUSH_DESC* pDesc) { if (FAILED(__super::Initialize(pDesc))) { return E_FAIL; @@ -40,20 +40,20 @@ HRESULT CTroll_State_Rush::Initialize(TROLL_STATE_RUSH_DESC* pDesc) return S_OK; } -CTroll_State_Rush* CTroll_State_Rush::Create(TROLL_STATE_RUSH_DESC* pDesc) +CState_Rush* CState_Rush::Create(STATE_RUSH_DESC* pDesc) { - CTroll_State_Rush* pInstance = new CTroll_State_Rush; + CState_Rush* pInstance = new CState_Rush; if (FAILED(pInstance->Initialize(pDesc))) { SAFE_RELEASE(pInstance); } return pInstance; } -void CTroll_State_Rush::Free() +void CState_Rush::Free() { __super::Free(); } -void CTroll_State_Rush::Describe_Entity() +void CState_Rush::Describe_Entity() { } diff --git a/Jusin154_Team3D/Client/Private/State_Skill2.cpp b/Jusin154_Team3D/Client/Private/State_Skill2.cpp new file mode 100644 index 000000000..fcba91c6e --- /dev/null +++ b/Jusin154_Team3D/Client/Private/State_Skill2.cpp @@ -0,0 +1,64 @@ +#include "pch.h" +#include "State_Skill2.h" +#include "Unit.h" + + +CState_Skill2::CState_Skill2() + :CState_Root() +{ +} + +void CState_Skill2::Enter() +{ + __super::Enter(); +} + +HRESULT CState_Skill2::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_Skill2::Exit() +{ + __super::Exit(); +} + +HRESULT CState_Skill2::Initialize(STATE_SKILL2_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_Skill2* CState_Skill2::Create(STATE_SKILL2_DESC* pDesc) +{ + CState_Skill2* pInstance = new CState_Skill2; + if (FAILED(pInstance->Initialize(pDesc))) { + SAFE_RELEASE(pInstance); + } + return pInstance; +} + +void CState_Skill2::Free() +{ + __super::Free(); +} + +void CState_Skill2::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Client/Private/Stupefy.cpp b/Jusin154_Team3D/Client/Private/Stupefy.cpp index 1bef7d85b..1654a8c12 100644 --- a/Jusin154_Team3D/Client/Private/Stupefy.cpp +++ b/Jusin154_Team3D/Client/Private/Stupefy.cpp @@ -140,13 +140,14 @@ HRESULT CStupefy::Pre_Setting(CGameObject* pObject, void* pArg) pStupefy_PJ1->Get_Component()->Set_State(STATE::POSITION, vWandPos); m_pStupefy_PJ_PT->Get_Component()->Set_State(STATE::POSITION, vWandPos); + + pStupefy_Light_Long->Get_Component()->Set_State(STATE::POSITION, vWandPos); + pBodyFlare->Get_Component()->Set_State(STATE::POSITION, vWandPos); // /*몸통 포지션*/ _vector vPlayerPos = m_pOwner->Get_Component()->Get_Position() + vDirection * -0.1f; - pStupefy_Light_Long->Get_Component()->Set_State(STATE::POSITION, vPlayerPos); - pBodyFlare->Get_Component()->Set_State(STATE::POSITION, vPlayerPos); pWand_Distortion->Get_Component()->Set_State(STATE::POSITION, vPlayerPos); /*발 포지션*/ diff --git a/Jusin154_Team3D/Client/Private/TrailObject.cpp b/Jusin154_Team3D/Client/Private/TrailObject.cpp index f61834d12..404be64cd 100644 --- a/Jusin154_Team3D/Client/Private/TrailObject.cpp +++ b/Jusin154_Team3D/Client/Private/TrailObject.cpp @@ -337,6 +337,14 @@ void CTrailObject::Rope_Trail_Update(_fmatrix WorldMat, _fmatrix EndWorldMat, _f m_pTrailCom->Rope_Trail_Update(WorldMat, fTimeDelta, m_TrailInfo.fDamping, m_TrailInfo.fRopeLength, m_TrailInfo.fMass, EndWorldMat); } +void CTrailObject::Oneside_Rope_Trail_Update(_fmatrix WorldMat, _float fTimeDelta) +{ + if (m_bVisible == false) + return; + + m_pTrailCom->Rope_Trail_Update(WorldMat, fTimeDelta, m_TrailInfo.fDamping, m_TrailInfo.fRopeLength, m_TrailInfo.fMass); +} + HRESULT CTrailObject::Render() { diff --git a/Jusin154_Team3D/Client/Private/Troll.cpp b/Jusin154_Team3D/Client/Private/Troll.cpp index 0bf500331..aaf4bf77d 100644 --- a/Jusin154_Team3D/Client/Private/Troll.cpp +++ b/Jusin154_Team3D/Client/Private/Troll.cpp @@ -18,7 +18,7 @@ #include "State_Move.h" #include "State_Combat.h" #include "State_Hit.h" -#include "Troll_State_Rush.h" +#include "State_Rush.h" #include "State_Throw.h" #pragma endregion @@ -165,22 +165,9 @@ void CTroll::Late_Update(_float fTimeDelta) } if (true == m_bLookAt) { - m_pTransformCom->LookAt_Lerp(XMLoadFloat4(&m_vTargetPos), fTimeDelta, 3.f); + m_pTransformCom->LookAt_Horizontal_Lerp(XMLoadFloat4(&m_vTargetPos), fTimeDelta, 3.f); } - - _vector vDir = XMLoadFloat4(&m_vTargetPos) - Get_WorldPostion(); - vDir = XMVector4Normalize(vDir); - _vector vLook = XMVector3Normalize( - XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f)); - float dot = XMVectorGetX(XMVector3Dot(vLook, vDir)); - dot = max(-1.f, min(1.f, dot)); - - float angle = acosf(dot); - m_fDegree = XMConvertToDegrees(angle); - - m_fCross = XMVectorGetY(XMVector3Cross(vLook, vDir)); - m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this); Set_Shadow(m_pGameInstance->IsIn_ShadowViewFrustum(m_pTransformCom->Get_State(STATE::POSITION), m_pTransformCom->Get_Radius())); } @@ -353,11 +340,10 @@ void CTroll::OnCollision(CGameObject* pOther, void* pDesc) return; } - ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc); - - m_DamageInfo.vTarget_Pos = m_pCharacter_Controller->Get_HeadPosition(); + ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc); + CEffect_Container* pEffect_Container = dynamic_cast(pOther); pair<_float, _float> damagePair = {}; @@ -373,30 +359,32 @@ void CTroll::OnCollision(CGameObject* pOther, void* pDesc) 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 = ENUM_CLASS(SKILL_TYPE::FLIPENDO); + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::BOMBARDA); break; case ENUM_CLASS(SKILL_TYPE::JAP): m_eHitSpell = ENUM_CLASS(SKILL_TYPE::JAP); break; - default: - m_eHitSpell = ENUM_CLASS(SKILL_TYPE::END); + case ENUM_CLASS(SKILL_TYPE::LEVIOSO): + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::LEVIOSO); + break; + case ENUM_CLASS(SKILL_TYPE::ACCIO): + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::ACCIO); + break; + case ENUM_CLASS(SKILL_TYPE::STUPEFY): + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::STUPEFY); break; } } else { damagePair = Get_Damage(m_pInfoInstance->Get_Spell_Damage(ENUM_CLASS(SKILL_TYPE::ANCIENT_MAGIC_THROW))); + CMapElement_Interactable* pProps = dynamic_cast(pOther); + if (pProps != nullptr) + { + m_eHitSpell = ENUM_CLASS(SKILL_TYPE::ANCIENT_MAGIC_THROW); + } } - - CMapElement_Interactable* pProps = dynamic_cast(pOther); - - if (pProps != nullptr) - { - m_eHitSpell = STATEANIM::KNOCKDOWN_FWD; - } + m_DamageInfo.fDamage = damagePair.first; m_pInfoInstance->Event_CallBack(TEXT("Monster_Hit"), &m_DamageInfo); diff --git a/Jusin154_Team3D/Client/Private/Troll_States.cpp b/Jusin154_Team3D/Client/Private/Troll_States.cpp index 6fbeae1c0..39d6b02bc 100644 --- a/Jusin154_Team3D/Client/Private/Troll_States.cpp +++ b/Jusin154_Team3D/Client/Private/Troll_States.cpp @@ -15,7 +15,7 @@ #include "State_Move.h" #include "State_Combat.h" #include "Troll_State_Stun.h" -#include "Troll_State_Rush.h" +#include "State_Rush.h" #include "Troll_State_BackHand_Swing.h" #include "State_Throw.h" #include "State_Swing.h" @@ -36,7 +36,7 @@ void CTroll::Behavior_IdleEnter() HRESULT CTroll::Behavior_IdleExitCheck() { if (m_fTargetDistance <= 18.f && m_fTargetDistance != 0) - m_pFSM->Change_State(FSMSTATE::MOVE); + m_pFSM->Change_State(FSMSTATE::IDLEBREAK); return E_FAIL; } @@ -48,6 +48,7 @@ void CTroll::Behavior_IdleExit() void CTroll::Behavior_IdleBreakEnter() { + m_pFSM->Enable_State(FSMSTATE::IDLEBREAK); pair<_uint, _bool> pairAnimInfo; m_bLookAt = true; @@ -100,6 +101,7 @@ void CTroll::Behavior_IdleBreakEnter() break; } m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + m_pModelCom->Set_BlendDuration(0.6f); } HRESULT CTroll::Behavior_IdleBreakExitCheck() @@ -115,6 +117,7 @@ HRESULT CTroll::Behavior_IdleBreakExitCheck() void CTroll::Behavior_IdleBreakExit() { m_pFSM->Disable_State(FSMSTATE::IDLEBREAK); + m_pModelCom->Set_BlendDuration(0.3f); } void CTroll::Behavior_MoveEnter() @@ -557,7 +560,7 @@ HRESULT CTroll::Behavior_SlamExitCheck(_float fTimeDelta) } else if (fRatio >= 0.4f) { m_bLookAt = true; - m_pFSM->Change_State(FSMSTATE::COMBAT); + m_pFSM->Change_State(FSMSTATE::IDLEBREAK); return E_FAIL; } @@ -789,13 +792,13 @@ void CTroll::Add_FSM() } { - CTroll_State_Rush::TROLL_STATE_RUSH_DESC Desc{}; + CState_Rush::STATE_RUSH_DESC Desc{}; Desc.pOwner = this; Desc.funcEnterEvent = [this]() { Behavior_RushEnter(); }; Desc.funcExitCheck = [this](_float fTimeDelta) { return Behavior_RushExitCheck(fTimeDelta); }; Desc.funcExitEvent = [this]() { Behavior_RushExit(); }; Desc.pCollisionPlayer = &m_bCollisionPlayer; - m_States.emplace(FSMSTATE::RUSH, CTroll_State_Rush::Create(&Desc)); + m_States.emplace(FSMSTATE::RUSH, CState_Rush::Create(&Desc)); } { diff --git a/Jusin154_Team3D/Client/Private/UI_Manager.cpp b/Jusin154_Team3D/Client/Private/UI_Manager.cpp index 16f414456..d77ff84e9 100644 --- a/Jusin154_Team3D/Client/Private/UI_Manager.cpp +++ b/Jusin154_Team3D/Client/Private/UI_Manager.cpp @@ -8,6 +8,7 @@ #include "Mouse_Cursor.h" #include "CameraLockOn.h" #include "Damage_Font.h" +#include "SpellLearn_Canvas.h" #include "Interaction_Key.h" CUI_Manager::CUI_Manager(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) @@ -53,6 +54,7 @@ void CUI_Manager::Canvas_Change(UI_STATE eType) static_cast(m_pGamePlay_Canves)->Visible(true); static_cast(m_pSpell_Canvas)->Visible(false); static_cast(m_pQuest_Canvas)->Visible(false); + static_cast(m_pSpellLearn_Canvas)->Visible(false); break; case UI_STATE::SPELL: @@ -72,6 +74,13 @@ void CUI_Manager::Canvas_Change(UI_STATE eType) case UI_STATE::INVENTORY: break; + case UI_STATE::SPELLNEARN: + m_pMouse_Cursor->Set_Visible(true); + m_pCamera_LockOn->Set_Visible(false); + static_cast(m_pSpellLearn_Canvas)->Visible(true); + static_cast(m_pGamePlay_Canves)->Visible(false); + break; + default: return; } @@ -172,6 +181,11 @@ HRESULT CUI_Manager::Ready_Components(void* pArg) } Add_Canvas(TEXT("Interaction_Key"), m_pInteraction_Key); + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_Canvas)))) { + return E_FAIL; + } + Add_Canvas(TEXT("SpellLearn_Canvas"), m_pSpellLearn_Canvas); + return S_OK; } diff --git a/Jusin154_Team3D/Client/Public/Blink.h b/Jusin154_Team3D/Client/Public/Blink.h new file mode 100644 index 000000000..79a78a4a4 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Blink.h @@ -0,0 +1,68 @@ +#pragma once + +#include "Client_Define.h" +#include "Effect_Container.h" + +NS_BEGIN(Engine) +NS_END + +NS_BEGIN(Client) + +class CBlink final : public CEffect_Container +{ +private: + CBlink(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CBlink(const CBlink& rhs); + virtual ~CBlink() = 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 = {}; + + _bool m_isParticleEnd = {}; + _bool m_isTrailEnd = {}; + _float4x4 m_TrailStopMat = {}; + + _float m_fMoveAccTime = {}; + _float m_fAmountMove = { 0.3f }; + _float m_fMoveSpeed = { 5.f }; + + _float m_fSizeAccTime = {}; + _float m_fAmountSize = {}; + _float m_fSpeed = {}; + + class CEffectParts* m_pBlink_Swirl = { nullptr }; + class CEffectParts* m_pBlink_Circle = { nullptr }; + class CEffectParts* m_pBlink_Circle2 = { nullptr }; + class CEffectParts* m_pBlink_Distortion = { nullptr }; + + vector m_Blink_Trails = {}; + + _float m_fLength = { 5.f }; + _string m_BoneNames[10] = {}; + + +public: + static CBlink* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual void Free() override; + CGameObject* Clone(void* pArg, CGameObject* pOwner) override; +#ifdef _DEBUG + void Describe_Entity() override; +#endif // _DEBUG +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Client_Enum.h b/Jusin154_Team3D/Client/Public/Client_Enum.h index 376caef68..39c10af71 100644 --- a/Jusin154_Team3D/Client/Public/Client_Enum.h +++ b/Jusin154_Team3D/Client/Public/Client_Enum.h @@ -11,15 +11,16 @@ namespace Client enum class SHADER_PASS_NORTEX { DEFAULT, TERRAIN, ENV_TERRAIN_ANISO, SHADOW, END }; enum class SHADER_PASS_PARTICLE { EXPLOSION, END }; enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, TRAIL_BLEND, TRAILWB_FOR_BLEND, TRAIL_BLUR, TRAIL_BLOOM, END }; - enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, BLEND, BLEND_NOWORLD, BLOOM, BLOOM_NOWORLD, BLUR_NO_EMMISVE, BLUR_NO_WORLD_NO_EMISSIVE, WEIGHTBLEND_FOR_BLEND, DEPTH_STOP, WB_CULLING, SCREEN_FX, DISTORTION,END }; + enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, BLEND, BLEND_NOWORLD, BLOOM, BLOOM_NOWORLD, BLUR_NO_EMMISVE, BLUR_NO_WORLD_NO_EMISSIVE, WEIGHTBLEND_FOR_BLEND, DEPTH_STOP, WB_CULLING, SCREEN_FX, DISTORTION, NONPOS, NONPOS_BLUR , END}; enum class SHADER_PASS_UIEDITOR { - DEFAULT, LOGO, LOGO_TEXT, LOGO_GLOW, ALPHABLEND, CLAMP, CURSOR, + DEFAULT, COLOR, LOGO, LOGO_TEXT, LOGO_GLOW, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTTYPE, 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, QUEST_BORDER, QUEST_INFO, QUEST_STATUS, BROOMSTICK, - ENEMY_DETECTION, INTERACTION_OBJECT, END}; + SPELL_LEARN, + ENEMY_DETECTION, INTERACTION_OBJECT, 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, QUEST_SLOT, END }; enum class SHADER_PASS_NPC_PBR_ANIM { @@ -27,7 +28,7 @@ namespace Client , 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, QUEST_CANVES, INVENTORY, END }; + enum class UI_STATE { GAMEPLAYER, SPELL, QUEST_CANVES, INVENTORY, SPELLNEARN, END }; enum class QUESTTYPE { MAIN, SUB, END }; enum class QUESTSTATE {NONE, ACCEPTED, CLEARED, END }; @@ -44,19 +45,19 @@ namespace Client AVADA_KEDAVRA, CRUCIO, IMPERIO, // 진녹색 BEAST_PETTING_BRUSH, BEAST_FEED, NAB_SACK, // 하늘색 JAP, REVELIO, PROTEGO, STUPEFY, // 검은색 - ANCIENT_MAGIC_THROW, ANCIENT_MAGIC, ALOHOMORA, PETRIFICUS_TOTALUS, + ANCIENT_MAGIC_THROW, ANCIENT_MAGIC, ALOHOMORA, PETRIFICUS_TOTALUS, LIGHTNING, /* PROPS */ BOX_SPLESH, CHAIL_SPLESH , BARRAL_SPLASH, /*상태 이펙트*/ - STUN, + STUN, BLINK, /*스크린 이펙트*/ SCREEN_WIND, /*사이드*/ - JAP_SIDE, BOMBARDA_SIDE, DESCENDO_SIDE, LEVIOSO_SIDE, WAND_END, + JAP_SIDE, BOMBARDA_SIDE, DESCENDO_SIDE, LEVIOSO_SIDE, WAND_END, LIGHTNING_SIDE, /*트롤*/ TROLL_ATTACK, TROLL_RUSH_HIT, TROLL_NOMAL_SMOKE, GOBLIN_PROTEGO, @@ -76,7 +77,7 @@ namespace Client enum class KEYINPUT { INPUT_1 = 1, INPUT_2, INPUT_3, INPUT_4, - INPUT_T, INPUT_G, INPUT_X, INPUT_Z, + INPUT_T, INPUT_G, INPUT_X, INPUT_Z, INPUT_ESPACE, INPUT_TAB, DIM_RBUTTON_UP, DIM_RBUTTON_DOWN, END diff --git a/Jusin154_Team3D/Client/Public/Client_Struct.h b/Jusin154_Team3D/Client/Public/Client_Struct.h index b3a9bda8d..b610406bc 100644 --- a/Jusin154_Team3D/Client/Public/Client_Struct.h +++ b/Jusin154_Team3D/Client/Public/Client_Struct.h @@ -91,6 +91,15 @@ namespace Client _int iAcceptState; }QUESTINFO; + typedef struct tagSpellLearnInfo + { + _wstring pSpellName{}; + _wstring pImageName{}; + _float fSpellSize{}; + _float2 fStartPosition{}; + vector<_vector> Lines; + }SPELLLEARNINFO; + typedef struct tagEffectInfo { _float4 vColor = { 0.f ,0.f ,0.f ,1.f }; diff --git a/Jusin154_Team3D/Client/Public/InfoInstance.h b/Jusin154_Team3D/Client/Public/InfoInstance.h index cce173060..526f60054 100644 --- a/Jusin154_Team3D/Client/Public/InfoInstance.h +++ b/Jusin154_Team3D/Client/Public/InfoInstance.h @@ -9,6 +9,7 @@ class CTransform; class CUnit; class CState; class CStat; +class CUIObject; NS_END NS_BEGIN(Client) @@ -75,6 +76,10 @@ DECLARE_SINGLETON(CInfoInstance) HRESULT Set_AcceptQuest(_int Index); #pragma endregion #pragma region Interactive_INFO +#pragma region SpellLearn_Data + const SPELLLEARNINFO& Get_SpellLearn(_int Index) const; + _int Get_SpellLearnIndex(); +#pragma endregion HRESULT Regist_ActiveInteractive(class CMapElement_Interactable* pInteractive); HRESULT Deregist_ActiveInteractive(class CMapElement_Interactable* pInteractive); #pragma endregion @@ -90,6 +95,7 @@ DECLARE_SINGLETON(CInfoInstance) class CQuest_Data* m_pQuestInfo= { nullptr }; class CInteractiveInfo* m_pInteractiveInfo = { nullptr }; class CDamage_Font* m_pDamage_Font = { nullptr }; + class CSpellLearn_Data* m_pSpellLearn_Data = { nullptr }; _uint m_eInput = ENUM_CLASS(KEYINPUT::END); _int m_eSpell = ENUM_CLASS(SKILL_TYPE::END); diff --git a/Jusin154_Team3D/Client/Public/Level_Field.h b/Jusin154_Team3D/Client/Public/Level_Field.h index c39876dd4..4e131b6b6 100644 --- a/Jusin154_Team3D/Client/Public/Level_Field.h +++ b/Jusin154_Team3D/Client/Public/Level_Field.h @@ -30,6 +30,7 @@ class CLevel_Field final : public CLevel HRESULT Ready_Layer_Camera(); HRESULT Ready_Layer_Sound(); HRESULT Ready_Layer_Effect(const _wstring& strLayerTag); + HRESULT Ready_Layer_Monster(); public: static pair> Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID, void* pArg); diff --git a/Jusin154_Team3D/Client/Public/Lightning.h b/Jusin154_Team3D/Client/Public/Lightning.h new file mode 100644 index 000000000..6a835f482 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Lightning.h @@ -0,0 +1,54 @@ +#pragma once + +#include "Client_Define.h" +#include "Effect_Container.h" + +NS_BEGIN(Engine) +NS_END + +NS_BEGIN(Client) + +class CLightning final : public CEffect_Container +{ +private: + CLightning(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CLightning(const CLightning& rhs); + virtual ~CLightning() = 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: + class CInfoInstance* m_pInfoInstance = { nullptr }; +private: + _wstring m_wstrEffectName = {}; + + _float4 m_vStartPos = { 0.f, 0.f, 0.f, 1.f }; // 현재 발사 된 위치 + _float4 m_vTargetPos = { 0.f, 0.f, 10.f, 1.f }; // 현재 타게팅 된 위치 + _float m_fLinearSpeed = 5.f; + _float3 m_vCameraLook = {}; + _float m_fDistance = {}; + +public: + static CLightning* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual void Free() override; + CGameObject* Clone(void* pArg, CGameObject* pOwner) override; +#ifdef _DEBUG + void Describe_Entity() override; +#endif // _DEBUG +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/LightningSide.h b/Jusin154_Team3D/Client/Public/LightningSide.h new file mode 100644 index 000000000..5d2369bde --- /dev/null +++ b/Jusin154_Team3D/Client/Public/LightningSide.h @@ -0,0 +1,51 @@ +#pragma once + +#include "Client_Define.h" +#include "Effect_Container.h" + +NS_BEGIN(Engine) +NS_END + +NS_BEGIN(Client) + +class CLightningSide final : public CEffect_Container +{ +private: + CLightningSide(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CLightningSide(const CLightningSide& rhs); + virtual ~CLightningSide() = 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 = {}; + + _bool m_isTrailEnd = {}; + _float4x4 m_TrailStopMat = {}; + + class CEffectParts* m_pWandLight = { nullptr }; + class CTrailObject* m_pWandTrail = { nullptr }; + +public: + static CLightningSide* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual void Free() override; + CGameObject* Clone(void* pArg, CGameObject* pOwner) override; +#ifdef _DEBUG + void Describe_Entity() override; +#endif // _DEBUG +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Monster.h b/Jusin154_Team3D/Client/Public/Monster.h index f58172a4e..5f90e5aff 100644 --- a/Jusin154_Team3D/Client/Public/Monster.h +++ b/Jusin154_Team3D/Client/Public/Monster.h @@ -40,6 +40,8 @@ class CMonster abstract : public CUnit _float m_fOutLinePower = { 1.f }; _float m_fDisolveTime = { 0.f }; _bool m_bDisolve = { false }; + _float m_fDegree = {}; + _float m_fCross = {}; protected: virtual HRESULT Initialize_Prototype() override; diff --git a/Jusin154_Team3D/Client/Public/Player.h b/Jusin154_Team3D/Client/Public/Player.h index 0fdb84a3e..7a711ade4 100644 --- a/Jusin154_Team3D/Client/Public/Player.h +++ b/Jusin154_Team3D/Client/Public/Player.h @@ -48,6 +48,8 @@ class CPlayer final : public CUnit _float2 m_vCameraShakeTimer = { 0.f, TIMER_SHORT_LERP }; _float m_fCameraShakeTime = TIMER_SHORT_LERP; _float m_fCameraShakeIntense = 5.f; + _float m_fOriginGravityAmount = {}; + _float m_fGravityAmount = {}; class CCamPosition_Socket* m_pCamPosition_TopDown_LookPart = { nullptr }; class CCamPosition_Arm* m_pCamPosition_TopDown_FollowPart = { nullptr }; @@ -121,13 +123,17 @@ class CPlayer final : public CUnit _bool m_bLookAt = {false}; _bool m_bSpellHit = {}; _float3 m_BroomScale = { 0.f, 0.f, 0.f }; + _float3 m_vScale = { 0.f, 0.f, 0.f }; _float3 m_TargetScale = { 1.f, 1.f, 1.f }; _float m_fScaleSmoothSpeed = 2.5f; _bool m_bLumos = {}; _bool m_bShield = {false}; _float m_fAnimTime = {}; _bool m_bTurbo = {}; - + _float m_fBlinkTime = { }; + _float m_fAccel = { 1.f }; + _float m_fSlideSpeed = {}; + _float m_fTargetSpeed = { 7.f }; /* 무적 불 변수*/ #ifdef _DEBUG _bool m_isDebugMode = { false }; @@ -153,13 +159,17 @@ class CPlayer final : public CUnit void Behavior_JumpExit(); void Behavior_LandEnter(); - HRESULT Behavior_LandExitCheck(); + HRESULT Behavior_LandExitCheck(_float fTimeDelta); void Behavior_LandExit(); void Behavior_DodgeEnter(); HRESULT Behavior_DodgeExitCheck(_float fTimeDelta); void Behavior_DodgeExit(); + void Behavior_BlinkEnter(); + HRESULT Behavior_BlinkExitCheck(_float fTimeDelta); + void Behavior_BlinkExit(); + void Behavior_SlideEnter(); HRESULT Behavior_SlideExitCheck(_float fTimeDelta); void Behavior_SlideExit(); diff --git a/Jusin154_Team3D/Client/Public/Quest_Slot.h b/Jusin154_Team3D/Client/Public/Quest_Slot.h index 5a51a0bcf..812531768 100644 --- a/Jusin154_Team3D/Client/Public/Quest_Slot.h +++ b/Jusin154_Team3D/Client/Public/Quest_Slot.h @@ -68,7 +68,8 @@ class CQuest_Slot final : public CElementObject _float m_fPositionX{}; _float m_fPositionY{}; - _int m_Index{}; + _int m_iIndex{}; + _int m_iPrevIndex{}; vector m_Fonts; public: static CQuest_Slot* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); diff --git a/Jusin154_Team3D/Client/Public/Ranrak.h b/Jusin154_Team3D/Client/Public/Ranrok.h similarity index 77% rename from Jusin154_Team3D/Client/Public/Ranrak.h rename to Jusin154_Team3D/Client/Public/Ranrok.h index ef4a46fcb..e2ba94917 100644 --- a/Jusin154_Team3D/Client/Public/Ranrak.h +++ b/Jusin154_Team3D/Client/Public/Ranrok.h @@ -7,29 +7,29 @@ NS_BEGIN(Client) -class CRanrak final : public CMonster +class CRanrok final : public CMonster { - enum class RANRAK_SKILL + enum class RANROK_SKILL { FIREBREATH, FIRESWEEP, FIREBALL, SWIPE, PULSE, - TUCKED, + RUSH, END }; - enum class RANRAK_PHASE + enum class RANROK_PHASE { PHASE_AIR, PHASE_GROUND, END }; private: - CRanrak(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); - CRanrak(const CRanrak& Prototype); - virtual ~CRanrak() = default; + CRanrok(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CRanrok(const CRanrok& Prototype); + virtual ~CRanrok() = default; public: virtual void Priority_Update(_float fTimeDelta) override; @@ -51,17 +51,18 @@ class CRanrak final : public CMonster _uint iIndex; DAMAGE_INFO m_DamageInfo; -private: - private: virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; HRESULT Ready_Components(); HRESULT Ready_Parts(); HRESULT Bind_ShaderResources(); + void Set_Points(); + void MoveTo(_float fTimeDelta); + void AroundPoint(_float fTimeDelta); public: - static CRanrak* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + static CRanrok* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr) override; virtual void Free() override; #ifdef _DEBUG @@ -73,14 +74,28 @@ class CRanrak final : public CMonster virtual void Add_FSM(); virtual void Set_Anim(); - _int m_ePhase = ENUM_CLASS(RANRAK_PHASE::PHASE_AIR); + _int m_ePhase = ENUM_CLASS(RANROK_PHASE::PHASE_AIR); - _float m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::END)] = {}; - _float m_fMaxSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::END)] = { 40.f,40.f ,15.f,40.f,40.f,40.f }; + _float m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::END)] = {}; + _float m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::END)] = { 40.f,40.f ,15.f,40.f,40.f,40.f}; - _float m_fDegree = {}; - _float m_fCross = {}; _float m_fTuckedTime = {}; + _bool m_bFireBurst = { false }; + _bool m_bTucked = {false}; + _vector m_vMoveDir = XMVectorZero(); + + + + vector> m_Points; + _int m_iCurrentPoint = 0; + _int m_iCurrentFlow = 0; + + _float m_fAroundAngle = 0.f; + _float m_fAroundSpeed = 1.2f; + _float m_fAroundRadius = 40.f; + _float m_fAroundTime = {}; + _float m_fRushTime = {}; + void Behavior_IdleEnter(); HRESULT Behavior_IdleExitCheck(); @@ -130,6 +145,10 @@ class CRanrak final : public CMonster HRESULT Behavior_SkillExitCheck(_float fTimeDelta); void Behavior_SkillExit(); + void Behavior_RushEnter(); + HRESULT Behavior_RushExitCheck(_float fTimeDelta); + void Behavior_RushExit(); + void Behavior_PulseEnter(); HRESULT Behavior_PulseExitCheck(_float fTimeDelta); void Behavior_PulseExit(); diff --git a/Jusin154_Team3D/Client/Public/SpellLearn.h b/Jusin154_Team3D/Client/Public/SpellLearn.h new file mode 100644 index 000000000..2e8e8f361 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/SpellLearn.h @@ -0,0 +1,54 @@ +#pragma once + +#include "Client_Define.h" +#include "ElementObject.h" + +NS_BEGIN(Engine) +class CTexture; +class CShader; +class CVIBuffer_Rect; +NS_END + +NS_BEGIN(Client) + +class CSpellLearn final : public CElementObject +{ +private: + CSpellLearn(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CSpellLearn(const CSpellLearn& rhs); + virtual ~CSpellLearn() = 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; + +public: + HRESULT Change_Image(_int SpellID); + +private: + CInfoInstance* m_pInfoInstance = { nullptr }; + + CTexture* m_pDiffuse_TextureCom = { nullptr }; + CTexture* m_pDiffuse_TextureCom1 = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + +public: + static CSpellLearn* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; +#ifdef _DEBUG + void Describe_Entity() override; +#endif // _DEBUG +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/SpellLearn_Canvas.h b/Jusin154_Team3D/Client/Public/SpellLearn_Canvas.h new file mode 100644 index 000000000..34719df3f --- /dev/null +++ b/Jusin154_Team3D/Client/Public/SpellLearn_Canvas.h @@ -0,0 +1,50 @@ +#pragma once + +#include "Client_Define.h" +#include "CanvasObject.h" + +NS_BEGIN(Engine) +class CVIBuffer_Rect; +NS_END + +NS_BEGIN(Client) + +class CSpellLearn_Canvas final : public CCanvasObject +{ +private: + CSpellLearn_Canvas(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CSpellLearn_Canvas(const CSpellLearn_Canvas& rhs); + virtual ~CSpellLearn_Canvas() = default; + +public: + virtual void Priority_Update(_float fTimeDelta); + virtual void Update(_float fTimeDelta); + virtual void Late_Update(_float fTimeDelta); + virtual HRESULT Render() override; + virtual _vector Get_WorldPostion() override; + +private: + virtual HRESULT Bind_ShaderResources() override; + virtual HRESULT Ready_Components(void* pArg) override; + virtual HRESULT Ready_Panel(void* pArg) override; + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + +public: + void Clear_Penel(); + +private: + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + CGameObject* m_pSpellLearn_Panel = { nullptr }; + +public: + static CSpellLearn_Canvas* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; +#ifdef _DEBUG + void Describe_Entity() override; +#endif // _DEBUG +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/SpellLearn_Data.h b/Jusin154_Team3D/Client/Public/SpellLearn_Data.h new file mode 100644 index 000000000..fa1942bee --- /dev/null +++ b/Jusin154_Team3D/Client/Public/SpellLearn_Data.h @@ -0,0 +1,44 @@ +#pragma once + +#include "Client_Define.h" +#include "Base.h" +#include "UIObject.h" + +NS_BEGIN(Engine) +class CGameInstance; +class CUIObject; +NS_END + +NS_BEGIN(Client) + +class CSpellLearn_Data final : public CBase +{ +private: + CSpellLearn_Data(); + ~CSpellLearn_Data() = default; + +public: + void Update(_float fTimeDelta); +public: + HRESULT Load_SpellInfo(const _char* pFilePath);\ + + +public: + const SPELLLEARNINFO& Get_SpellLearn(_int Index) const; + _int Get_Index(); + +private: + CInfoInstance* m_pInfoInstance = { nullptr }; + + _int m_iSpellLearn_Count{}; + vector m_SpellLearnInfos; + +private: + HRESULT Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex); + +public: + static CSpellLearn_Data* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual void Free() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/SpellLearn_MovePointer.h b/Jusin154_Team3D/Client/Public/SpellLearn_MovePointer.h new file mode 100644 index 000000000..a467bb9b9 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/SpellLearn_MovePointer.h @@ -0,0 +1,61 @@ +#pragma once + +#include "Client_Define.h" +#include "ElementObject.h" + +NS_BEGIN(Engine) +class CTexture; +class CShader; +class CVIBuffer_Rect; +NS_END + +NS_BEGIN(Client) + +class CSpellLearn_MovePointer final : public CElementObject +{ +private: + CSpellLearn_MovePointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CSpellLearn_MovePointer(const CSpellLearn_MovePointer& rhs); + virtual ~CSpellLearn_MovePointer() = 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; + +public: + void Set_SpellLearn(_int Index); +private: + void Line(_float fTime); + + +private: + CInfoInstance* m_pInfoInstance = { nullptr }; + CTexture* m_pDiffuse_TextureCom = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + _bool m_bMoveStart = { false }; + + _int m_iLineIndex{}; + _int m_iCurrentLine{}; + vector<_vector> m_MoveLine; + +public: + static CSpellLearn_MovePointer* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; +#ifdef _DEBUG + void Describe_Entity() override; +#endif // _DEBUG +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/SpellLearn_Name.h b/Jusin154_Team3D/Client/Public/SpellLearn_Name.h new file mode 100644 index 000000000..5e06df1dd --- /dev/null +++ b/Jusin154_Team3D/Client/Public/SpellLearn_Name.h @@ -0,0 +1,53 @@ +#pragma once + +#include "Client_Define.h" +#include "ElementObject.h" + +NS_BEGIN(Engine) +class CTexture; +class CShader; +class CVIBuffer_Rect; +NS_END + +NS_BEGIN(Client) +class CSpellLearn_Name final : public CElementObject +{ +private: + CSpellLearn_Name(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CSpellLearn_Name(const CSpellLearn_Name& rhs); + virtual ~CSpellLearn_Name() = 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; + +public: + void Set_Name(_int Index); + +private: + CInfoInstance* m_pInfoInstance = { nullptr }; + CTexture* m_pDiffuse_TextureCom = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + _wstring m_pSpell_Name; + +public: + static CSpellLearn_Name* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; +#ifdef _DEBUG + void Describe_Entity() override; +#endif // _DEBUG +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/SpellLearn_Panel.h b/Jusin154_Team3D/Client/Public/SpellLearn_Panel.h new file mode 100644 index 000000000..4d6a891bf --- /dev/null +++ b/Jusin154_Team3D/Client/Public/SpellLearn_Panel.h @@ -0,0 +1,62 @@ +#pragma once + +#include "Client_Define.h" +#include "PanelObject.h" + +NS_BEGIN(Engine) +class CTexture; +class CShader; +class CVIBuffer_Rect; +NS_END + +NS_BEGIN(Client) + +class CSpellLearn_Panel final : public CPanelObject +{ + +private: + CSpellLearn_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CSpellLearn_Panel(const CSpellLearn_Panel& rhs); + virtual ~CSpellLearn_Panel() = default; + +public: + virtual void Priority_Update(_float fTimeDelta); + virtual void Update(_float fTimeDelta); + virtual void Late_Update(_float fTimeDelta); + virtual HRESULT Render() override; + virtual _vector Get_WorldPostion() override; + +private: + virtual HRESULT Bind_ShaderResources() override; + virtual HRESULT Ready_Components(void* pArg) override; + virtual HRESULT Ready_Element(void* pArg) override; + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + +private: + CTexture* m_pDiffuse_TextureCom = { nullptr }; + CTexture* m_pDiffuse_TextureCom1 = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + CInfoInstance* m_pInfoInstance = { nullptr }; + + vector m_Info = {}; + + CGameObject* m_pSpellLearn_Name = { nullptr }; + CGameObject* m_pSpellLearn = { nullptr }; + CGameObject* m_pSpellLearn_MovePointer = { nullptr }; + CGameObject* m_pSpellLearn_Data = { nullptr }; + + _int Index{}; + +public: + static CSpellLearn_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; +#ifdef _DEBUG + void Describe_Entity() override; +#endif // _DEBUG +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Troll_State_Rush.h b/Jusin154_Team3D/Client/Public/State_Rush.h similarity index 54% rename from Jusin154_Team3D/Client/Public/Troll_State_Rush.h rename to Jusin154_Team3D/Client/Public/State_Rush.h index dadd9c7bb..5890f0150 100644 --- a/Jusin154_Team3D/Client/Public/Troll_State_Rush.h +++ b/Jusin154_Team3D/Client/Public/State_Rush.h @@ -4,15 +4,15 @@ NS_BEGIN(Client) -class CTroll_State_Rush final : public CState_Root +class CState_Rush final : public CState_Root { public: - typedef struct tagTrollRush : public CState_Root::STATE_ROOT_DESC { + typedef struct tagRush : public CState_Root::STATE_ROOT_DESC { _bool* pCollisionPlayer = { nullptr }; - }TROLL_STATE_RUSH_DESC; + }STATE_RUSH_DESC; public: - CTroll_State_Rush(); - virtual ~CTroll_State_Rush() = default; + CState_Rush(); + virtual ~CState_Rush() = default; public: virtual void Enter(); @@ -23,10 +23,10 @@ class CTroll_State_Rush final : public CState_Root _bool* m_pRushPlayerHit = { nullptr }; private: - HRESULT Initialize(TROLL_STATE_RUSH_DESC* pDesc); + HRESULT Initialize(STATE_RUSH_DESC* pDesc); public: - static CTroll_State_Rush* Create(TROLL_STATE_RUSH_DESC* pDesc); + static CState_Rush* Create(STATE_RUSH_DESC* pDesc); virtual void Free() override; virtual void Describe_Entity(); }; diff --git a/Jusin154_Team3D/Client/Public/State_Skill2.h b/Jusin154_Team3D/Client/Public/State_Skill2.h new file mode 100644 index 000000000..6aba4d608 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/State_Skill2.h @@ -0,0 +1,36 @@ +#pragma once +#include "Client_Define.h" +#include "State_Root.h" + +NS_BEGIN(Client) + +class CState_Skill2 final : public CState_Root +{ +public: + typedef struct tagSkill2 : public CState_Root::STATE_ROOT_DESC { + function funcPriorityUpdate = { nullptr }; + function funcLateUpdate = { nullptr }; + }STATE_SKILL2_DESC; +private: + CState_Skill2(); + virtual ~CState_Skill2() = 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_SKILL2_DESC* pDesc); + +public: + static CState_Skill2* Create(STATE_SKILL2_DESC* pDesc); + virtual void Free() override; + virtual void Describe_Entity(); +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Stupefy.h b/Jusin154_Team3D/Client/Public/Stupefy.h index 7d4653b9d..e2b3fd52c 100644 --- a/Jusin154_Team3D/Client/Public/Stupefy.h +++ b/Jusin154_Team3D/Client/Public/Stupefy.h @@ -41,7 +41,7 @@ class CStupefy final : public CEffect_Container _float4 m_vStartPos = { 0.f, 0.f, 0.f, 1.f }; // 현재 발사 된 위치 _float4 m_vTargetPos = { 0.f, 0.f, 10.f, 1.f }; // 현재 타게팅 된 위치 - _float m_fLinearSpeed = 0.65f; + _float m_fLinearSpeed = 0.7f; _float3 m_vCameraLook = {}; public: static CStupefy* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); diff --git a/Jusin154_Team3D/Client/Public/TrailObject.h b/Jusin154_Team3D/Client/Public/TrailObject.h index 36b48d0af..652d75a86 100644 --- a/Jusin154_Team3D/Client/Public/TrailObject.h +++ b/Jusin154_Team3D/Client/Public/TrailObject.h @@ -29,11 +29,12 @@ class CTrailObject final : public CPartObject public: void Trail_Update(_fmatrix WorldMat, _float fTimeDelta); void Rope_Trail_Update(_fmatrix WorldMat, _fmatrix EndWorldMat, _float fTimeDelta); + void Oneside_Rope_Trail_Update(_fmatrix WorldMat, _float fTimeDelta); HRESULT Load_Trail(CEffect_Container::TRAIL_SAVE_INFO Trail_Save_Info, LEVEL eLevel); HRESULT Load_Trail(const _char* pPath, LEVEL eLevel); - void SetDissolve(_bool isDissolve) { m_TrailInfo.isDissolve = true; } + void SetDissolve(_bool isDissolve) { m_TrailInfo.isDissolve = isDissolve; } TRAIL_INFO* Get_TrailInfo() { return &m_TrailInfo; } private: diff --git a/Jusin154_Team3D/Client/Public/Troll.h b/Jusin154_Team3D/Client/Public/Troll.h index a1f6835ca..d3b0a661a 100644 --- a/Jusin154_Team3D/Client/Public/Troll.h +++ b/Jusin154_Team3D/Client/Public/Troll.h @@ -97,9 +97,6 @@ class CTroll final : public CMonster _float m_fRushTime = {}; _float m_fAttackDelay = {}; - _float m_fDegree = {}; - _float m_fCross = {}; - void Behavior_IdleEnter(); HRESULT Behavior_IdleExitCheck(); void Behavior_IdleExit(); diff --git a/Jusin154_Team3D/Client/Public/UI_Manager.h b/Jusin154_Team3D/Client/Public/UI_Manager.h index afacb5176..8025623e5 100644 --- a/Jusin154_Team3D/Client/Public/UI_Manager.h +++ b/Jusin154_Team3D/Client/Public/UI_Manager.h @@ -54,6 +54,7 @@ class CUI_Manager final : public CUIObject CGameObject* m_pSpell_Canvas = { nullptr }; CGameObject* m_pMouse_Cursor = { nullptr }; CGameObject* m_pQuest_Canvas = { nullptr }; + CGameObject* m_pSpellLearn_Canvas = { nullptr }; CGameObject* m_pCamera_LockOn = { nullptr }; CGameObject* m_pDamage_Font = { nullptr }; CGameObject* m_pInteraction_Key = { nullptr }; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Accio/Accio_PT.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Accio/Accio_PT.bin index 6e2ef72e9..d35c40b6b 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Accio/Accio_PT.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Accio/Accio_PT.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:175aac600d5c9f1b436a72b48b18c9f21b2acb5ebec96fb6b01708deaf9d7e42 +oid sha256:ad20791a13c36bf69dc57293678b3e5d0cb7b7e5def2c9a19b685614081438fa size 1029 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/BlinkSwirl.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/BlinkSwirl.bin new file mode 100644 index 000000000..76e3e0d70 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/BlinkSwirl.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c3c8a9c6c3968cde96923ccbc8dff4680a118012cf22ae71570ac8c4a1382a9 +size 1045 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Circle.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Circle.bin new file mode 100644 index 000000000..a1f6e759a --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Circle.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3bd05cdd2e2bf977bd5a3dc383e942c42b17d7a811e17fad58d61a5c664be1ca +size 1144 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Circle2.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Circle2.bin new file mode 100644 index 000000000..72d6f0525 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Circle2.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61e76c76d41190974322470279f994bafe797060ca88967996bbfe35fceee858 +size 1144 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Distortion.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Distortion.bin new file mode 100644 index 000000000..0b86eeae4 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Distortion.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f035f2a3b5eb748d656548e12ecca2e105e7b1dc20d86c894f83fd27656a7e2f +size 1044 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Trail0.trail b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Trail0.trail new file mode 100644 index 000000000..c4112c6c7 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Trail0.trail differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Trail1.trail b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Trail1.trail new file mode 100644 index 000000000..c4112c6c7 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Trail1.trail differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Trail2.trail b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Trail2.trail new file mode 100644 index 000000000..c4112c6c7 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Trail2.trail differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Trail3.trail b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Trail3.trail new file mode 100644 index 000000000..c4112c6c7 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Trail3.trail differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Trail4.trail b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Trail4.trail new file mode 100644 index 000000000..c4112c6c7 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Trail4.trail differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Trail5.trail b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Trail5.trail new file mode 100644 index 000000000..c4112c6c7 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Trail5.trail differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Trail6.trail b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Trail6.trail new file mode 100644 index 000000000..c4112c6c7 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Trail6.trail differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Trail7.trail b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Trail7.trail new file mode 100644 index 000000000..c4112c6c7 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Trail7.trail differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Trail8.trail b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Trail8.trail new file mode 100644 index 000000000..c4112c6c7 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Trail8.trail differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Trail9.trail b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Trail9.trail new file mode 100644 index 000000000..c4112c6c7 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Blink/Blink_Trail9.trail differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Shoot_Projectile.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Shoot_Projectile.bin deleted file mode 100644 index 6b6478374..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Shoot_Projectile.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6396dfcf2ec2ae0c17043d76aae02724cb1357403c82c37b1bade33e0f9c8214 -size 1181 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Wand_Lightning.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Wand_Lightning.bin deleted file mode 100644 index 91c309536..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Wand_Lightning.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4b84e3cb83ac9a1be77660fff27de1149c747eea08526f39307557f7dd60e283 -size 1037 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Goblin/GoblinSide/Goblin_Smoke.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Goblin/GoblinSide/Goblin_Smoke.bin index ea061c68e..32ca4f5eb 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Goblin/GoblinSide/Goblin_Smoke.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Goblin/GoblinSide/Goblin_Smoke.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b6485f8ea045d881466f2da3b6b77b0827dea289c5fe71244f12f5ef9bb41b11 +oid sha256:84d4ffc55757088f1ce7781a79aa011ad8929f91543e3e5d70b4365a542cfb50 size 1121 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 index f232eae46..5ac517dbe 100644 --- 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 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:20c246c6fd9462e5f5f12980420ac6ada17273025f261400b068d2457d42391f +oid sha256:6f79f81eef408be36d1b07dc3e10a0c7446528070b634ed34d13c7ad4616693c size 1252 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/BottomLightning.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/BottomLightning.bin index 5d78c2328..4c055e8a9 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/BottomLightning.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/BottomLightning.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d57f5a8319c45c4ac54d543043b68d0d90fe997461c1a7300373294e0be8de33 -size 1028 +oid sha256:0e172004b5ad735d6e9f7f532102fdb2fbf0dc7d0be370e746c26bc102b507fc +size 1065 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/Flare.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/Flare.bin index 5ba45d50b..2a45b17e6 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/Flare.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/Flare.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:93d25aa8fdfd5e8c65c1dce21aec8951d92aa74363eba2493658d55175fd903d +oid sha256:6e7ada8319cd606a1f7761cbef65575eea9161062b46cf246c0ba681ea6f8593 size 1115 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/HitPT0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/HitPT0.bin index c0ad2cce1..0ee43f229 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/HitPT0.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/HitPT0.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:459775272ece67a02d7cafb050cae568ff71dd6137f304ff024352a8beaf89f3 -size 1097 +oid sha256:8dbce94d22ff6bfc3779d106d6904aa64e1c65a16ca623842d5b2ee17c0befc0 +size 1142 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/Lightning0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/Lightning0.bin index 26f94dc82..e33a1f143 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/Lightning0.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/Lightning0.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:750e826ebdd9f6d5325472e97044a4104954aa4f174d23050e748ff21cc135ba -size 1020 +oid sha256:1db31cd8ec5c47da31adcf42ff276f2da62517340a1c3cd18caa747178efcbe4 +size 1021 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/Lightning_Rock_PT.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/Lightning_Rock_PT.bin new file mode 100644 index 000000000..014cc2423 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/Lightning_Rock_PT.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:74c5cf1e8f0c1631adf3838bbf8280b7d2575fb2da55bf2ae964f0f996d04c98 +size 1031 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/Lightning_Smoke.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/Lightning_Smoke.bin new file mode 100644 index 000000000..84d3ecc19 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/Lightning_Smoke.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e44caeb96f183bf897293094bd20227461f7076de16848e7c09dabbe6966335d +size 1076 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/Lightning_Tornado_PT.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/Lightning_Tornado_PT.bin index c321e08bd..7e34f33b4 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/Lightning_Tornado_PT.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/Lightning_Tornado_PT.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7e2f249dcd8f88d8d1837bacb6508290d35f4b1a409acae5823ca25f5cc09a5c -size 1041 +oid sha256:cf9845e568ceb4f5ebc22c1c217859a7452487fef010df50615f739f9f6f3ef6 +size 1080 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/Start_Line.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/Start_Line.bin new file mode 100644 index 000000000..78acea0ba --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/Start_Line.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e52cd289fb4759b25d7789144aa9c640422e6c881e94fc2b383226e3dca40dd9 +size 1036 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/Straight_Lightning.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/Straight_Lightning.bin deleted file mode 100644 index f96bdd450..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/Straight_Lightning.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a8af0d8240c4f84b3d42b0211011ffe34c60dd049a059e01152bd5a27742426f -size 1028 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightningSide/Trail_B.trail b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightningSide/Trail_B.trail new file mode 100644 index 000000000..36591d9a0 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightningSide/Trail_B.trail differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightningSide/Wand_Light_B.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightningSide/Wand_Light_B.bin new file mode 100644 index 000000000..5227ac100 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightningSide/Wand_Light_B.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4b3b253080061a865f4cffba4f4c823aeab3799698edf9142ac5d0d69f0a1018 +size 1025 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightningSide/Wand_Lightning.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightningSide/Wand_Lightning.bin new file mode 100644 index 000000000..a85ee36d0 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightningSide/Wand_Lightning.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b894757a3108df8c516dcc636ee291e45f709700931f3a714b328a82c5ce9bfd +size 1037 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Blick.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Blick.bin new file mode 100644 index 000000000..e69de29bb diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Blink.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Blink.bin new file mode 100644 index 000000000..22edaff8d --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Blink.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8a1a056f3860ae0700373a981457f0cfc5bc31b30515f5ad4d80ab780d7790d1 +size 867 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Bombard.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Bombard.bin index 826e7f1a6..a81259ac6 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Bombard.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Bombard.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:561ed40eb850f6b15763b8c21409c7b4732457e0d1240cd8b5100c6e18734031 -size 788 +oid sha256:9df5ad1442d394cbdf4fad283cab9c519055dbffba9e9c1a242179983f335be5 +size 714 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Lightning.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Lightning.bin new file mode 100644 index 000000000..ba832cd89 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Lightning.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:21bcfe9b297b0aa4f00976963839e2ad0ea29c4a16b0259720b988c7ac44c647 +size 586 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/LightningSide.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/LightningSide.bin new file mode 100644 index 000000000..9007bde56 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/LightningSide.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e49c06b93f1940dd13f5425b1c7b00ac3acf7e797407e46c1dfce23a9d749815 +size 207 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Stupefy/Stupefy_Hit_PT.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Stupefy/Stupefy_Hit_PT.bin index bfd408570..083b3de97 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Stupefy/Stupefy_Hit_PT.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Stupefy/Stupefy_Hit_PT.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2f48908b38d319c106ad7086e41e60f89f03bc594b5ac30c8e834ff5c5284ffb +oid sha256:e02aca929e71381674f2a4572e208ccf2918d9592b86fbbf99b81f809c4900df size 1055 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Stupefy/Stupefy_PJ_PT.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Stupefy/Stupefy_PJ_PT.bin index fceb888b9..84ac95d26 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Stupefy/Stupefy_PJ_PT.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Stupefy/Stupefy_PJ_PT.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3735aed80e26b2a148a874943577d84245ffc898f18160054b48e3fb21edb317 -size 1066 +oid sha256:ff693c142b9583617b2206592bc24e5e52e61bf44d3f874636089b2844e94397 +size 1057 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollSide/Troll_Smoke.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollSide/Troll_Smoke.bin index 1a916f96b..0a6856c34 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollSide/Troll_Smoke.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollSide/Troll_Smoke.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fdac73008a58068ff482eb3361bc7a044fff87c43ad129628d0fe4e47c976c10 +oid sha256:09f1bd8fcf19ac3ac3cb9a584d46b89b4fcd4e59e235e3a73ba7f6e242aacaba size 1121 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Stat/Stat.xml b/Jusin154_Team3D/Editor/Bin/Resources/Data/Stat/Stat.xml index 06c4d8874..6da6e6bc5 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Stat/Stat.xml +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Stat/Stat.xml @@ -3,4 +3,5 @@ + diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/UI/Data.xml b/Jusin154_Team3D/Editor/Bin/Resources/Data/UI/Data.xml deleted file mode 100644 index 34ec5ed9b..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/UI/Data.xml +++ /dev/null @@ -1,258 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/UI/SpellLearn.xml b/Jusin154_Team3D/Editor/Bin/Resources/Data/UI/SpellLearn.xml new file mode 100644 index 000000000..a5a168e36 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/UI/SpellLearn.xml @@ -0,0 +1,340 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Local_Compute.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Local_Compute.hlsl index fa37c7a5f..e859e4d1d 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Local_Compute.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Local_Compute.hlsl @@ -251,7 +251,7 @@ void SampleLocalTRS_Prev(uint bone, float t, out float3 S, out float4 R, out flo if (ch.KeyCount < 2) { - KeyFrame k = g_KeyFrameBuffer[ch.StartIndex]; + KeyFrame k = g_PrevKeyFrameBuffer[ch.StartIndex]; S = k.vScale; T = k.vTranslation; R = QuatNormalize(k.vRotation); @@ -274,13 +274,13 @@ void SampleLocalTRS_Prev(uint bone, float t, out float3 S, out float4 R, out flo row_major float4x4 SampleBlendedLocal(uint bone) { - if (PrevAnimIndex == 0xFFFFFFFFu) + if (PrevAnimIndex == -1) { float3 S; float4 R; float3 T; SampleLocalTRS_Cur(bone, CurrentTime, S, R, T); - if ((int) bone == RootBoneIndex) + if (bone == RootBoneIndex) { T = 0; R = RootInitRot; @@ -295,7 +295,7 @@ row_major float4x4 SampleBlendedLocal(uint bone) float3 T; SampleLocalTRS_Cur(bone, CurrentTime, S, R, T); - if ((int) bone == RootBoneIndex) + if (bone == RootBoneIndex) { T = 0; R = RootInitRot; @@ -305,38 +305,17 @@ row_major float4x4 SampleBlendedLocal(uint bone) float br = saturate(BlendRatio); - if (br <= 0.0f) - { - float3 S; - float4 R; - float3 T; - SampleLocalTRS_Prev(bone, PrevTime, S, R, T); - - if ((int) bone == RootBoneIndex) - { - T = 0; - R = RootInitRot; - } - return MakeAffine(S, R, T); - } - - if (br >= 1.0f) - { - float3 S; - float4 R; - float3 T; - SampleLocalTRS_Cur(bone, CurrentTime, S, R, T); - - if ((int) bone == RootBoneIndex) - { - T = 0; - R = RootInitRot; - } - return MakeAffine(S, R, T); - } - float3 sA, sB, tA, tB; float4 rA, rB; + + float prevT = PrevTime; + + if (BlendRatio < 1e-4f) + { + prevT = CurrentTime; + } + + SampleLocalTRS_Prev(bone, PrevTime, sA, rA, tA); SampleLocalTRS_Cur(bone, CurrentTime, sB, rB, tB); @@ -345,7 +324,7 @@ row_major float4x4 SampleBlendedLocal(uint bone) float3 T = lerp(tA, tB, br); float4 R = QuatSlerp(rA, rB, br); - if ((int) bone == RootBoneIndex) + if (bone == RootBoneIndex) { T = 0; R = RootInitRot; 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 index da220009a..0f5360124 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_NPC_PBR_Anim.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_NPC_PBR_Anim.hlsl @@ -3,10 +3,9 @@ struct BoneOut { - row_major float4x4 Local; row_major float4x4 Combined; + row_major float4x4 Local; row_major float4x4 LocalCombined; - }; float4x4 g_WorldMatrix, g_ViewMatrix, g_ProjMatrix; float4x4 g_PrevWorldMatrix, g_PrevViewMatrix, g_PrevProjMatrix; 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 e66a6f4e0..69a0eb915 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl @@ -52,6 +52,9 @@ struct ParticleValue float fAcceleration; bool isStop; + + float fRotateAttenuation; + float fRotateAttDelay; }; @@ -85,7 +88,7 @@ cbuffer g_ConstantBuffer : register(b0) // b0 << 이 숫자와 컨스턴트 쉐 bool isMoveUp; bool isExcludePos; bool isStopMove_For_Depth_Compare; - bool isPadding2; + bool isNoPos; float fTimeDelta; float fSizeLerpOption; // 반드시 상수버퍼는 16바이트 배수로 만들어져야 한다. @@ -143,6 +146,11 @@ void CS_MAIN( particle.vTranslation = CurMat[3].xyzw; } + if (isNoPos) + { + particle.vTranslation.xyz += WorldMatrix[3].xyz; + } + } // 라이프타임 움직임 @@ -175,7 +183,13 @@ void CS_MAIN( particle.vLifeTime.x = 0.f; particleValue.vDelay.x = 0.f; particleValue.isStop = false; - + + particleValue.vMaskingUVMoveTime.x = 0.f; + particleValue.vDiffuseUVMoveTime.x = 0.f; + particleValue.vNoiseUVMoveTime.x = 0.f; + particleValue.vDistortionUVMoveTime.x = 0.f; + particleValue.vDissolveUVMoveTime.x = 0.f; + if (isRandomAniIndex == false) particleValue.vAniIndex.x = 0.f; @@ -316,6 +330,21 @@ void CS_MAIN( particle.vTranslation += vector( sin(particle.vLifeTime.x * 3.141592 * 2.f) * particleValue.vSinAmount, 0.f); } + + /* Rotate Time */ + float fTimeX = (particle.vLifeTime.x - particleValue.fRotateAttDelay); + float fTimeY = (particle.vLifeTime.y - particleValue.fRotateAttDelay); + float fRotateTimeRatio = 0; + + if (particleValue.fRotateAttDelay <= FLT_EPSILON5) + { + fRotateTimeRatio = particle.vLifeTime.x / particle.vLifeTime.y; + } + else if (fTimeX > 0 && fTimeY != 0) + { + fRotateTimeRatio = saturate(fTimeX / fTimeY); + } + if (isTurn == true) { float fRotationSpeed = 1.f; @@ -323,6 +352,11 @@ void CS_MAIN( if (particleValue.fRotaionSpeed > FLT_EPSILON5) fRotationSpeed = particleValue.fRotaionSpeed; + fRotationSpeed = fRotationSpeed - fRotateTimeRatio * particleValue.fRotateAttenuation; + + if (fRotationSpeed < FLT_EPSILON5) + fRotationSpeed = 0.f; + /* ROTATE */ float4x4 RotateXMat = RotateX(particleValue.vDeltaAngle.x * fTimeDelta * fRotationSpeed); float4x4 RotateYMat = RotateY(particleValue.vDeltaAngle.y * fTimeDelta * fRotationSpeed); @@ -350,6 +384,11 @@ void CS_MAIN( if (particleValue.fRotaionSpeed > FLT_EPSILON5) fRotationSpeed = particleValue.fRotaionSpeed; + fRotationSpeed = fRotationSpeed - fRotateTimeRatio * particleValue.fRotateAttenuation; + + if (fRotationSpeed < FLT_EPSILON5) + fRotationSpeed = 0.f; + 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); diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl index da3d61395..3ac1e5d5d 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl @@ -32,6 +32,7 @@ float g_fHp; float2 g_fViewport; float2 g_fOrigin_Size; float2 g_fCurrent_Size; +float2 g_fPosition; float2 g_fHpBG; float2 g_Pos; float2 g_fImageSize; @@ -45,7 +46,6 @@ float2 g_fItemPosition1; float2 g_fItemImageSizes1; float2 g_fItemPosition2; float2 g_fItemImageSizes2; -float2 g_fPosition[4]; float2 g_fImageSizes[4]; float4 g_fImagesUV[4]; @@ -120,6 +120,20 @@ PS_OUT PS_MAIN(PS_IN In) return Out; } +PS_OUT PS_Texture_Color(PS_IN In) +{ + PS_OUT Out; + float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; + float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord); + float4 Color = g_Texture1.Sample(DefaultSampler, In.vTexcoord); + + tex1.rgb *= Color.rgb; + + tex1.a *= Alpha; + Out.vColor = tex1; + return Out; +} + PS_OUT PS_Logo(PS_IN In) { PS_OUT Out; @@ -517,12 +531,15 @@ PS_OUT PS_Rotation(PS_IN In) float2 center = float2(0.5f, 0.5f); float2 uv = In.vTexcoord - center; - float2 Rotation = In.vTexcoord; + float2 Rotation; Rotation.x = uv.x * cos(g_fMapAngle) - uv.y * sin(g_fMapAngle); Rotation.y = uv.x * sin(g_fMapAngle) + uv.y * cos(g_fMapAngle); Rotation += center; - float4 tex1 = g_Texture.Sample(ClampSampler, Rotation); + float4 tex1 = g_Texture.Sample(BorderZeroLinearSampler, Rotation); + + if (tex1.a <= 0.f) + discard; color = tex1; @@ -1757,7 +1774,7 @@ PS_OUT PS_SpellLearn(PS_IN In) Color = tex; tex1 *= 0.95f; - + Color.a = tex1; Color.a *= Alpha; @@ -1766,6 +1783,49 @@ PS_OUT PS_SpellLearn(PS_IN In) return Out; } +PS_OUT PS_SpellLearnColor(PS_IN In) +{ + PS_OUT Out; + float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; + + float4 Color = float4(1.f, 1.f, 1.f, 1.f); + + float4 tex = g_Texture.Sample(DefaultSampler, In.vTexcoord); + float4 tex1 = g_Texture1.Sample(DefaultSampler, In.vTexcoord); + Color = tex; + + Color.rgb *= tex1.rgb; + + float2 rectPos = g_fPosition; + float2 rectSize = g_fCurrent_Size; + + float2 itemPos = g_fItemPosition1; + float2 itemSize = g_fItemImageSizes1; + + float x0 = max(rectPos.x, itemPos.x); + float x1 = min(rectPos.x + rectSize.x, itemPos.x + itemSize.x); + float y0 = max(rectPos.y, itemPos.y); + float y1 = min(rectPos.y + rectSize.y, itemPos.y + itemSize.y); + + float uMin = (x0 - rectPos.x) / rectSize.x; + float uMax = (x1 - rectPos.x) / rectSize.x; + float vMin = (y0 - rectPos.y) / rectSize.y; + float vMax = (y1 - rectPos.y) / rectSize.y; + + vMin = 1.0f - vMin; + vMax = 1.0f - vMax; + + if (In.vTexcoord.x >= min(uMin, uMax) && In.vTexcoord.x <= max(uMin, uMax) && + In.vTexcoord.y >= min(vMin, vMax) && In.vTexcoord.y <= max(vMin, vMax)) + { + Color.rgb = float3(0.f, 0.f, 1.f); + } + + Color.a *= Alpha; + Out.vColor = Color; + return Out; +} + struct VS_IN3D { float3 vPosition : POSITION; @@ -1988,6 +2048,16 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_MAIN(); } + pass Texture_Color + { + 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_Texture_Color(); + } + pass Logo { SetRasterizerState(RS_Default); @@ -2336,6 +2406,16 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_SpellLearn(); } + pass SpellLearnColor + { + 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_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_SpellLearnColor(); + } + pass Enemy_Detection { SetRasterizerState(RS_Nocull); diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl index 796b75987..06f613a04 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl @@ -42,6 +42,9 @@ struct ParticleValue float fAcceleration; bool isStop; + + float fRotateAttenuation; + float fRotateAttDelay; }; @@ -270,6 +273,42 @@ VS_OUT VS_NOWORLD(VS_IN In, uint iGPUIndex : SV_InstanceID) return Out; } +VS_OUT VS_NONPOS(VS_IN In, uint iGPUIndex : SV_InstanceID) +{ + VS_OUT Out = (VS_OUT) 0; + + matrix matW, matWV, matWVP; + + row_major matrix TransformMatrix = float4x4(In.vRight, In.vUp, In.vLook, In.vTranslation); + + row_major matrix Wolrd_NonPosMatrix = g_WorldMatrix; + + Wolrd_NonPosMatrix[3] = vector(0.f, 0.f, 0.f, 1.f); + + matW = mul(TransformMatrix, Wolrd_NonPosMatrix); + + matW[3] = In.vTranslation; + + matWV = mul(matW, g_ViewMatrix); + matWVP = mul(matWV, g_ProjMatrix); + + vector vPosition = mul(vector(In.vPosition, 1.f), matWVP); + + Out.vPosition = vPosition; + Out.vNormal = normalize(mul(vector(In.vNormal, 0.f), matW)); + Out.vTangent = normalize(mul(vector(In.vTangent, 0.f), matW)).xyz; + Out.vBinormal = normalize(mul(vector(In.vBinormal, 0.f), matW)).xyz; + Out.vTexcoord = In.vTexcoord; + Out.vLifeTime = In.vLifeTime; + Out.vWorldPos = mul(vector(In.vPosition, 1.f), matW); + Out.iGPUIndex = iGPUIndex; + Out.vProjPos = vPosition; + + return Out; +} + + + struct PS_IN { float4 vPosition : SV_POSITION; @@ -789,6 +828,36 @@ VS_OUT VS_BLUR_NOWORLD(VS_IN In, uint iGPUIndex : SV_InstanceID) return Out; } +VS_OUT VS_BLUR_NOPOS(VS_IN In, uint iGPUIndex : SV_InstanceID) +{ + VS_OUT Out = (VS_OUT) 0; + + matrix matW, matWV, matWVP; + + row_major matrix TransformMatrix = float4x4(In.vRight, In.vUp, In.vLook, In.vTranslation); + + row_major matrix Wolrd_NonPosMatrix = g_WorldMatrix; + + Wolrd_NonPosMatrix[3] = vector(0.f, 0.f, 0.f, 1.f); + + matW = mul(TransformMatrix, Wolrd_NonPosMatrix); + + matW[3] = In.vTranslation; + + matWV = mul(matW, g_ViewMatrix); + matWVP = mul(matWV, g_ProjMatrix); + + vector vPosition = mul(vector(In.vPosition, 1.f), matWVP); + + Out.vPosition = vPosition; + Out.vTexcoord = In.vTexcoord; + Out.vLifeTime = In.vLifeTime; + Out.iGPUIndex = iGPUIndex; + Out.vProjPos = vPosition; + + return Out; +} + struct PS_BLUR_OUT { float4 vDiffuse : SV_TARGET0; @@ -1152,6 +1221,29 @@ technique11 DefaultTechnique GeometryShader = NULL; PixelShader = compile ps_5_0 PS_DISTORTION(); } + +//17 + pass NONPOS + { + SetRasterizerState(RS_Nocull); + SetDepthStencilState(DSS_None, 0); + SetBlendState(BS_WB_Acc, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_NONPOS(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_NON_NORMALMAP(); + } + +//18 + pass NONPOS_BLUR + { + SetRasterizerState(RS_Nocull); + SetDepthStencilState(DSS_None, 0); + SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_BLUR_NOPOS(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_BLUR(); + } + } diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Accio_Path.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/Accio.png similarity index 100% rename from Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Accio_Path.png rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/Accio.png diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Bombarda_Path.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/Bombarda.png similarity index 100% rename from Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Bombarda_Path.png rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/Bombarda.png diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Descendo_Path.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/Descendo.png similarity index 100% rename from Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Descendo_Path.png rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/Descendo.png diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Levioso_Path.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/Levioso.png similarity index 100% rename from Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Levioso_Path.png rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/Levioso.png diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Lumos_Path.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/Lumos.png similarity index 100% rename from Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Lumos_Path.png rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/Lumos.png diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Revelio_Path.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/Revelio.png similarity index 100% rename from Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Revelio_Path.png rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/Revelio.png diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Cursor.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Cursor.png index 25f79bf8d..3398d2963 100644 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Cursor.png and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Cursor.png differ diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj b/Jusin154_Team3D/Editor/Default/Editor.vcxproj index 39ddab3ef..d026e6ada 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj @@ -175,6 +175,7 @@ call Update_Shaders.bat + @@ -197,8 +198,10 @@ call Update_Shaders.bat + + @@ -398,6 +401,7 @@ call Update_Shaders.bat + @@ -420,8 +424,10 @@ call Update_Shaders.bat + + diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters index 5efb931c5..9b40d75f3 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters @@ -628,6 +628,15 @@ {eef1db06-8a9f-42b4-93e2-cc29de2b275d} + + {6e769435-83c4-4f64-b306-1b8c5f2d228d} + + + {54a92f0d-26f1-49bf-a13b-ab11995968c7} + + + {3b207257-c396-473b-9906-df04b28fb0cd} + @@ -1251,6 +1260,15 @@ 50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_MovePointer + + 50.UI\SpellLearn_Data + + + 50.UI\SpellLearn_Canvas\SpellLearn_Panel\SPellLeam_SpeedPointer + + + 02.GameObjects\Layer_Effect\Effect\Magic\Blink + @@ -1876,6 +1894,15 @@ 50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_MovePointer + + 50.UI\SpellLearn_Data + + + 50.UI\SpellLearn_Canvas\SpellLearn_Panel\SPellLeam_SpeedPointer + + + 02.GameObjects\Layer_Effect\Effect\Magic\Blink + diff --git a/Jusin154_Team3D/Editor/Private/Blink.cpp b/Jusin154_Team3D/Editor/Private/Blink.cpp new file mode 100644 index 000000000..b4b5377ec --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/Blink.cpp @@ -0,0 +1,293 @@ +#include "pch.h" +#include "Blink.h" + +#include "GameInstance.h" +#include "EditEffect.h" +#include "Player.h" +#include "Wand.h" +#include "TrailObject.h" + + +CBlink::CBlink(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CEffect_Container{ pDevice, pContext } +{ +} + +CBlink::CBlink(const CBlink& rhs) + : CEffect_Container(rhs) +{ +} + +HRESULT CBlink::Initialize_Prototype() +{ + + + return S_OK; +} + +HRESULT CBlink::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/Blink"))) + return E_FAIL; + + m_wstrEffectName = L"Blink"; + + + m_pBlink_Swirl = Get_PartObject("BlinkSwirl"); + m_pBlink_Circle = Get_PartObject("Blink_Circle"); + m_pBlink_Circle2 = Get_PartObject("Blink_Circle2"); + m_pBlink_Distortion = Get_PartObject("Blink_Distortion"); + + for (size_t i = 0; i < 10; i++) + { + _string strPartsName = "Blink_Trail" + to_string(i); + CTrailObject* pTrail = Get_PartObject(strPartsName); + + m_Blink_Trails.push_back(pTrail); + SAFE_ADDREF(pTrail); + } + + m_BoneNames[0] = "SKT_Back"; + m_BoneNames[1] = "Neck"; + m_BoneNames[2] = "Spine2"; + m_BoneNames[3] = "LeftForeArm"; + m_BoneNames[4] = "Spine"; + m_BoneNames[5] = "RightArm"; + m_BoneNames[6] = "LeftArm"; + m_BoneNames[7] = "RightUpLegTwist1"; + m_BoneNames[8] = "LeftUpLegTwist1"; + m_BoneNames[9] = "RightForeArm"; + + + SAFE_ADDREF(m_pBlink_Swirl); + SAFE_ADDREF(m_pBlink_Circle); + SAFE_ADDREF(m_pBlink_Distortion); + SAFE_ADDREF(m_pBlink_Circle2); + + + m_Events.emplace(1.f, [&]() { + for (auto& pTrail : m_Blink_Trails) + { + pTrail->SetDissolve(true); + } + + + }); + + m_Events.emplace(1.5f, [&]() { + + m_isParticleEnd = true; + m_pBlink_Swirl->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f, -500.f, 0.f, 1.f)); + }); + + m_fAmountSize = 1.f; + m_fSpeed = 1.6f; + + + m_fDuration = 2.f; + + + + return S_OK; +} + +void CBlink::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); + +} + +void CBlink::Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Update(fTimeDelta); + + Update_Event(fTimeDelta); + + _uint iIndex = {}; + + + for (auto& pTrail : m_Blink_Trails) + { + _matrix BoneMatrix = XMLoadFloat4x4(m_pOwner->Get_Component()->Get_BoneMatrixPtr(m_BoneNames[iIndex++].c_str())); + _matrix PlayerWorld = m_pOwner->Get_Component()->Get_XMWorldMatrix(); + _matrix CombinedMat = BoneMatrix * PlayerWorld; + + + + if (m_fMoveAccTime > XM_2PI) + m_fMoveAccTime = 0.f; + + m_fMoveAccTime += fTimeDelta * m_fMoveSpeed; + + _float fAmount = sinf(m_fMoveAccTime) * m_fAmountMove; + + CombinedMat.r[3] += XMVectorSet(0.f, fAmount, 0.f, 0.f); + + pTrail->Oneside_Rope_Trail_Update(CombinedMat, fTimeDelta); + } + + + if (m_isParticleEnd == false) + { + m_pBlink_Swirl->Get_Component()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion()); + } + + + m_pBlink_Circle->Get_Component()->Set_WorldMatrix(m_pOwner->Get_Component()->Get_XMWorldMatrix()); + m_pBlink_Circle2->Get_Component()->Set_WorldMatrix(m_pOwner->Get_Component()->Get_XMWorldMatrix()); + + m_pBlink_Distortion->Get_Component()->Set_State(STATE::POSITION, m_pGameInstance->Get_CamXMPosition() + m_pGameInstance->Get_CameraLook() * m_fLength); + + + if (m_fSizeAccTime > XM_PIDIV2) + return; + + m_fSizeAccTime += fTimeDelta * m_fSpeed; + + _float fSize = sinf(m_fSizeAccTime) * m_fAmountSize; + _float3 vSize = _float3(fSize, fSize, fSize); + + m_pBlink_Circle->Get_Component()->Set_Scale(vSize); + m_pBlink_Circle2->Get_Component()->Set_Scale(vSize); +} + +void CBlink::Late_Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Late_Update(fTimeDelta); + + +} + +HRESULT CBlink::Pre_Setting(CGameObject* pObject, void* pArg) +{ + if (FAILED(__super::Pre_Setting(pObject, nullptr))) + return E_FAIL; + + m_pBlink_Swirl->Set_Visible(true); + m_pBlink_Circle->Set_Visible(true); + m_pBlink_Circle2->Set_Visible(true); + /*트레일 초기화 */ + + m_isTrailEnd = false; + m_isParticleEnd = false; + + for (auto& pTrail : m_Blink_Trails) + { + pTrail->SetDissolve(false); + pTrail->Set_Visible(true); + pTrail->Get_Component()->Reset_Trail(); + pTrail->Get_TrailInfo()->vDissolveTime.y = 0.5f; + } + + + m_pBlink_Swirl->Get_Component()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion()); + + + + m_pBlink_Distortion->Set_Visible(true); + + + m_fSizeAccTime = 0.f; + m_fMoveAccTime = 0.f; + + return S_OK; +} + +HRESULT CBlink::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CBlink::Ready_Child() +{ + return S_OK; +} + +CBlink* CBlink::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CBlink* pInstance = new CBlink(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CBlink"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + + +CGameObject* CBlink::Clone(void* pArg, CGameObject* pOwner) +{ + CBlink* pInstance = new CBlink(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CBlink"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CBlink::OnCollision(CGameObject* pOther, void* pDesc) +{ + ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc); + +} + +void CBlink::Free() +{ + __super::Free(); + + + SAFE_RELEASE(m_pBlink_Swirl); + SAFE_RELEASE(m_pBlink_Circle); + SAFE_RELEASE(m_pBlink_Distortion); + SAFE_RELEASE(m_pBlink_Circle2); + + for (auto& pTrail : m_Blink_Trails) + { + SAFE_RELEASE(pTrail); + } + + m_Blink_Trails.clear(); +} +#ifdef _DEBUG + +void CBlink::Describe_Entity() +{ + GUI::Begin("Blink"); + + GUI::DragFloat("Length", &m_fLength); + GUI::DragFloat("MoveAmount", &m_fAmountMove); + GUI::DragFloat("m_fMoveSpeed", &m_fMoveSpeed); + + GUI::End(); +} + +#endif // _DEBUG + +HRESULT CBlink::Bind_ShaderResources() +{ + return S_OK; +} + + diff --git a/Jusin154_Team3D/Editor/Private/EditEffect.cpp b/Jusin154_Team3D/Editor/Private/EditEffect.cpp index bfa3dfb6b..a0aefb682 100644 --- a/Jusin154_Team3D/Editor/Private/EditEffect.cpp +++ b/Jusin154_Team3D/Editor/Private/EditEffect.cpp @@ -433,7 +433,9 @@ void CEditEffect::Describe_Entity() const char* pRenderNames[] = { "PRIORITY" , "SHADOW_NEAR", "NONBLEND", "DECAL", "BLUR" , "NONLIGHT" ,"EFFECT", "BLEND" ,"BLOOM", "DISTORTION" , "UI", "OCCLUSION" , "SHADOW_MIDDLE", "SHADOW_FAR" , "PRESHADOW" , "UI_OVERLAY" }; const char* pEffectType[] = { "EFFECT" , "TRAIL" }; - const char* pShaderPass[] = { "DEFAULT" , "NON_NOMALMAP" , "BLUR" , "WEIGHTBLEND" , "NON_WORLD" , "NON_WORLD_BLUR", "BLEND", "BLEND_NOWORLD", "BLOOM" ,"BLOOM_NOWORLD" ,"BLUR_NO_EMMISVE", "BLUR_NO_WORLD_NO_EMISSIVE","WEIGHTBLEND_FOR_BLEND" , "DEPTH_STOP" , "WB_CULLING", "SCREEN_FX" , "DISTORTION"}; + const char* pShaderPass[] = { "DEFAULT" , "NON_NOMALMAP" , "BLUR" , "WEIGHTBLEND" , "NON_WORLD" , "NON_WORLD_BLUR", "BLEND", "BLEND_NOWORLD", "BLOOM" ,"BLOOM_NOWORLD" ,"BLUR_NO_EMMISVE", + "BLUR_NO_WORLD_NO_EMISSIVE","WEIGHTBLEND_FOR_BLEND" , "DEPTH_STOP" , "WB_CULLING", "SCREEN_FX" , "DISTORTION" ,"NONPOS" , "NONPOS_BLUR" }; + const char* pBloomType[] = { "NONE" , "BASIC" , "MUILTY"}; _int iCurrentItem = static_cast<_int>(m_EffectInfo.eRenderOrder); _int iCurrentType = static_cast<_int>(m_EffectInfo.eEffectType); diff --git a/Jusin154_Team3D/Editor/Private/EffectObject.cpp b/Jusin154_Team3D/Editor/Private/EffectObject.cpp index 1e1350096..f382548e6 100644 --- a/Jusin154_Team3D/Editor/Private/EffectObject.cpp +++ b/Jusin154_Team3D/Editor/Private/EffectObject.cpp @@ -96,10 +96,11 @@ HRESULT CEffectObject::Render_Blur() { BlurPass = SHADER_PASS_INSTANCE_MODEL::BLUR_NO_EMMISVE; } - - } + if (m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::NONPOS) + BlurPass = SHADER_PASS_INSTANCE_MODEL::NONPOS_BLUR; + for (_uint i = 0; i < m_pInstance_ModelCom->Get_NumMeshes(); i++) { diff --git a/Jusin154_Team3D/Editor/Private/EffectPool.cpp b/Jusin154_Team3D/Editor/Private/EffectPool.cpp index beb0d7c67..2e3ca5a28 100644 --- a/Jusin154_Team3D/Editor/Private/EffectPool.cpp +++ b/Jusin154_Team3D/Editor/Private/EffectPool.cpp @@ -20,6 +20,7 @@ #include "Troll_Nomal_Smoke.h" #include "TrollSwing.h" #include "StunEffect.h" +#include "Blink.h" CEffectPool::CEffectPool(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) : CGameObject(pDevice, pContext) @@ -96,6 +97,17 @@ void CEffectPool::Priority_Update(_float fTimeDelta) } } +#ifdef _DEBUG +#if 진우 + + + (*m_EffectList[ENUM_CLASS(SKILL_TYPE::BLINK)].begin())->Describe_Entity(); + + Describe_Entity(); + +#endif +#endif + } @@ -246,6 +258,14 @@ HRESULT CEffectPool::Ready_Effect() return pEffect; } ))) return E_FAIL; + if (FAILED(Create_Effect(SKILL_TYPE::BLINK, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + + CBlink* pEffect = nullptr; + + pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr); + + return pEffect; } + ))) return E_FAIL; return S_OK; } diff --git a/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp b/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp index be42ec95d..46411b937 100644 --- a/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp +++ b/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp @@ -82,7 +82,7 @@ void CEffect_Editor::Update(_float fTimeDelta) { _matrix vWandPos = m_pGameInstance->Get_Layer(CURRENT_LEVEL, LAYER_PLAYER)->Get_Object()->Get_PartObject()->Get_WorldMatrix(); - m_pTrailObject->Rope_Trail_Update(vWandPos, m_pTransformCom->Get_XMWorldMatrix(), fTimeDelta); + m_pTrailObject->Oneside_Rope_Trail_Update(vWandPos, fTimeDelta); } diff --git a/Jusin154_Team3D/Editor/Private/Levioso.cpp b/Jusin154_Team3D/Editor/Private/Levioso.cpp index 89da4acd8..e415244e8 100644 --- a/Jusin154_Team3D/Editor/Private/Levioso.cpp +++ b/Jusin154_Team3D/Editor/Private/Levioso.cpp @@ -266,9 +266,9 @@ void CLevioso::OnCollision(CGameObject* pOther, void* pDesc) - //Get_PartObject("Levioso_Tornado") - //CEffectParts* pLevioso_Hit = Get_PartObject("Levioso_Hit"); - //CEffectParts* pLevioso_Bottom_Wind = Get_PartObject("Levioso_Bottom_Wind"); + //Get_PartObject("Levioso_Tornado") + //CEditEffect* pLevioso_Hit = Get_PartObject("Levioso_Hit"); + //CEditEffect* pLevioso_Bottom_Wind = Get_PartObject("Levioso_Bottom_Wind"); diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp index 05c32c8f4..752d4b5f0 100644 --- a/Jusin154_Team3D/Editor/Private/Loader.cpp +++ b/Jusin154_Team3D/Editor/Private/Loader.cpp @@ -111,6 +111,8 @@ #include "QuestInstance.h" +#include "SpellLearn_Data.h" + #include "SpellLearn_Canvas.h" #include "SpellLearn_Panel.h" #include "SpellLearn_Name.h" @@ -178,6 +180,7 @@ #include "Goblin_BattleAxe.h" #include "Goblin_Spector.h" #include "StunEffect.h" +#include "Blink.h" #pragma endregion #pragma region PHYSX_HEADER @@ -1207,6 +1210,10 @@ HRESULT CLoader::Loading_For_UI() return E_FAIL; } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpellLearn_Data::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpellLearn_Canvas::Create(m_pDevice, m_pContext)))) { return E_FAIL; @@ -1692,6 +1699,11 @@ HRESULT CLoader::Loading_For_Effect() } + if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CBlink::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } + + /* For.Prototype_GameObject_Wand */ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CWand::Create(m_pDevice, m_pContext)))) return E_FAIL; @@ -2375,11 +2387,6 @@ HRESULT CLoader::Loading_For_ObjectViewer() TEXT("Prototype_Component_Dragon_Model") )); - futures.emplace_back(Deferred_ModelLoad( - MODEL::ANIM, "../Bin/Resources/Models/Monster/Dragon/Dragon_Anim.fbx", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixIdentity(), - TEXT("Prototype_Component_Dragon_Model") - )); - #pragma endregion futures.emplace_back(Deferred_ModelLoad( @@ -2407,12 +2414,6 @@ HRESULT CLoader::Loading_For_ObjectViewer() TEXT("Prototype_Component_Npc_Model") )); - - //futures.emplace_back(Deferred_ModelLoad( - // MODEL::ANIM, "../Bin/Resources/Models/Monster/Dragon/SK_ConjuredDragon_Anim.fbx", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - // TEXT("Prototype_Component_Npc_Model") - //)); - futures.emplace_back(Deferred_ModelLoad( MODEL::ANIM, "../Bin/Resources/Models/Object/Wand/Wand.bin",XMMatrixIdentity(), TEXT("Prototype_Component_Wand_Model") diff --git a/Jusin154_Team3D/Editor/Private/Player.cpp b/Jusin154_Team3D/Editor/Private/Player.cpp index 12dd623cd..58b6ba471 100644 --- a/Jusin154_Team3D/Editor/Private/Player.cpp +++ b/Jusin154_Team3D/Editor/Private/Player.cpp @@ -136,6 +136,9 @@ void CPlayer::Late_Update(_float fTimeDelta) { m_pTransformCom->Set_State(STATE::POSITION, m_pCharacter_Controller->Get_FootPosition()); + if (m_bVisible == false) + return; + m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this); __super::Late_Update(fTimeDelta); diff --git a/Jusin154_Team3D/Editor/Private/Player_States.cpp b/Jusin154_Team3D/Editor/Private/Player_States.cpp index c7dcda6a9..c5ab6bf28 100644 --- a/Jusin154_Team3D/Editor/Private/Player_States.cpp +++ b/Jusin154_Team3D/Editor/Private/Player_States.cpp @@ -21,6 +21,7 @@ #include "State_Land.h" #include "State_Move.h" #include "State_Combat.h" +#include "State_Blink.h" #pragma endregion #include "EffectPool.h" @@ -285,6 +286,67 @@ HRESULT CPlayer::Behavior_IdleExitCheck(_float fTimeDelta) return S_OK; } + +void CPlayer::Behavior_BlinkEnter() +{ + m_pFSM->Enable_State(FSMSTATE::BLINK); + + + Add_Event(m_Animation[STATEANIM::DODGE].first, + [&]() { + m_pEffectPool->Use_Skill(SKILL_TYPE::BLINK, this); + m_bVisible = false; + }, + 0.1f); +} + +HRESULT CPlayer::Behavior_BlinkExitCheck(_float fTimeDelta) +{ + pair<_uint, _bool> pairAnimInfo; + _int iCurrAnimIndex = m_pModelCom->Get_AnimIndex(); + _float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio(); + m_fBlinkTime += fTimeDelta; + + if (m_fBlinkTime >= 1.f && iCurrAnimIndex != m_Animation[STATEANIM::DODGE_BLINK].first) + { + m_bVisible = true; + pairAnimInfo = m_Animation[STATEANIM::DODGE_BLINK]; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 0.8f, false, 1.5f); + m_BroomScale = { 1.f,1.f,1.f }; + } + else if (iCurrAnimIndex != m_Animation[STATEANIM::DODGE_BLINK].first) { + + + _vector vLook = m_pTransformCom->Get_State(STATE::LOOK); + vLook = XMVectorSetY(vLook, 0.f); + vLook = XMVector3Normalize(vLook); + _vector vPos = m_pCharacter_Controller->Get_Position(); + _vector vNextPos = vPos + vLook * 7.f * fTimeDelta; + m_pCharacter_Controller->Set_Position(vNextPos); + } + + if (iCurrAnimIndex == m_Animation[STATEANIM::DODGE_BLINK].first) + { + if (SUCCEEDED(InputMove()) && fRatio >= 0.2f) { + m_pFSM->Change_State(FSMSTATE::MOVE); + return E_FAIL; + } + + if (fRatio >= 0.2f) { + m_pFSM->Change_State(FSMSTATE::IDLE); + return E_FAIL; + } + } + + return S_OK; +} + +void CPlayer::Behavior_BlinkExit() +{ + m_pFSM->Disable_State(FSMSTATE::BLINK); + m_fBlinkTime = 0.f; +} + void CPlayer::Behavior_IdleExit() { m_pFSM->Disable_State(FSMSTATE::IDLE | FSMSTATE::IDLE_TURN); @@ -298,7 +360,7 @@ void CPlayer::Behavior_MoveEnter() _bool bRight = m_pGameInstance->Key_Pressing(DIK_D); _bool bBackward = m_pGameInstance->Key_Pressing(DIK_S); m_pFSM->Enable_State(FSMSTATE::MOVE); - if (m_pFSM->IsEnable_Previous(FSMSTATE::IDLE | FSMSTATE::DODGE)) { + if (m_pFSM->IsEnable_Previous(FSMSTATE::IDLE | FSMSTATE::DODGE | FSMSTATE::BLINK)) { if (true == m_bSprintToggle) { m_pFSM->Enable_State(FSMSTATE::SPRINT); m_bWalkToggle = false; @@ -699,17 +761,28 @@ void CPlayer::Behavior_DodgeEnter() // 혹시 @@ to Dodge 있으면 여기에 m_pFSM->Enable_State(FSMSTATE::DODGE); pair<_uint, _bool> pairAnimInfo = m_Animation[STATEANIM::DODGE]; - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, false, 1.3f); } -HRESULT CPlayer::Behavior_DodgeExitCheck() +HRESULT CPlayer::Behavior_DodgeExitCheck(_float fTimeDelta) { + _float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio(); + + if (fRatio >= 0.08f) + { + if (m_pGameInstance->Key_Pressing(DIK_LCONTROL)) + { + m_pFSM->Change_State(FSMSTATE::BLINK); + return E_FAIL; + } + } + if (m_pModelCom->IsFinishedAnim()) { m_pFSM->Change_State(FSMSTATE::IDLE); return E_FAIL; } - if (SUCCEEDED(InputMove()) && IsCurrentKeyFrame("Throw")) { + if (SUCCEEDED(InputMove()) && fRatio >= 0.3f) { m_pFSM->Change_State(FSMSTATE::MOVE); return E_FAIL; } @@ -1147,6 +1220,55 @@ void CPlayer::Add_FSM() m_States.emplace(FSMSTATE::MOVE, CState_Move::Create(&Desc)); } #pragma endregion + + + { + CState_Blink::STATE_BLINK_DESC Desc{}; + Desc.pOwner = this; + Desc.funcEnterEvent = [this]() { Behavior_BlinkEnter(); }; + Desc.funcExitCheck = [this](_float fTimeDelta) { return Behavior_BlinkExitCheck(fTimeDelta); }; + Desc.funcExitEvent = [this]() { Behavior_BlinkExit(); }; + Desc.funcPriorityUpdate = [this](_float fTimeDelta) { + + if (SUCCEEDED(InputMove())) + { + _vector xmvInputDir = XMVectorZero(); + + _vector xmvCamLook = XMVector4Normalize(XMVectorSet(m_vCameraLookDir.x, 0.f, m_vCameraLookDir.z, 0.f)); + _vector xmvCamRight = XMVector4Normalize(XMVectorSet(m_vCameraRightDir.x, 0.f, m_vCameraRightDir.z, 0.f)); + + if (m_pGameInstance->Key_Pressing(DIK_W)) + xmvInputDir += xmvCamLook; + if (m_pGameInstance->Key_Pressing(DIK_S)) + xmvInputDir -= xmvCamLook; + if (m_pGameInstance->Key_Pressing(DIK_A)) + xmvInputDir -= xmvCamRight; + if (m_pGameInstance->Key_Pressing(DIK_D)) + xmvInputDir += xmvCamRight; + + xmvInputDir = XMVector3Normalize(xmvInputDir); + + _float2 vInputDir = { XMVectorGetX(xmvInputDir),XMVectorGetZ(xmvInputDir) }; + _vector xmvCurLook = XMVector4Normalize( + XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f)); + _float2 vCurLook = { XMVectorGetX(xmvCurLook),XMVectorGetZ(xmvCurLook) }; + + _float vDir = CMyTools::Get_Direction2D(vCurLook, vInputDir); + _float absDir = fabsf(vDir); + _float cross = vCurLook.x * vInputDir.y - vCurLook.y * vInputDir.x; + if (cross > 0.f) + { + m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta); + } + else { + m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta); + } + } + }; + Desc.funcLateUpdate = nullptr; + m_States.emplace(FSMSTATE::BLINK, CState_Blink::Create(&Desc)); + } + #pragma region Behavior_Movement_Focus { CState_Jump::STATE_JUMP_DESC Desc{}; @@ -1168,7 +1290,7 @@ void CPlayer::Add_FSM() CState_Dodge::STATE_DODGE_DESC Desc{}; Desc.pOwner = this; Desc.funcEnterEvent = [this]() { Behavior_DodgeEnter(); }; - Desc.funcExitCheck = [this](_float fTimeDelta) { return Behavior_DodgeExitCheck(); }; + Desc.funcExitCheck = [this](_float fTimeDelta) { return Behavior_DodgeExitCheck(fTimeDelta); }; Desc.funcExitEvent = [this]() { Behavior_DodgeExit(); }; Desc.funcPriorityUpdate = [this](_float fTimeDelta) { if (m_pGameInstance->Key_Pressing(DIK_A)) { m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta); } @@ -1239,7 +1361,7 @@ void CPlayer::Set_Anim() m_Animation[STATEANIM::LAND] = { 259,false }; m_Animation[STATEANIM::DODGE] = { 878,false }; - m_Animation[STATEANIM::DODGE_BLINK] = { 876,true }; + m_Animation[STATEANIM::DODGE_BLINK] = { 874,false }; m_Animation[STATEANIM::SKILL] = { 593,false }; m_Animation[STATEANIM::SKILL2] = { 991,false }; diff --git a/Jusin154_Team3D/Editor/Private/Quest_Data.cpp b/Jusin154_Team3D/Editor/Private/Quest_Data.cpp index 87145ea6f..398972733 100644 --- a/Jusin154_Team3D/Editor/Private/Quest_Data.cpp +++ b/Jusin154_Team3D/Editor/Private/Quest_Data.cpp @@ -242,6 +242,7 @@ void CQuest_Data::Free() { __super::Free(); + SAFE_RELEASE(m_pVIBufferCom); } void CQuest_Data::Describe_Entity() diff --git a/Jusin154_Team3D/Editor/Private/SPellLeam_SpeedPointer.cpp b/Jusin154_Team3D/Editor/Private/SPellLeam_SpeedPointer.cpp new file mode 100644 index 000000000..de1ee7712 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/SPellLeam_SpeedPointer.cpp @@ -0,0 +1,96 @@ +#include "pch.h" +#include "SPellLeam_SpeedPointer.h" +#include "GameInstance.h" + +CSPellLeam_SpeedPointer::CSPellLeam_SpeedPointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CSPellLeam_SpeedPointer::CSPellLeam_SpeedPointer(const CSPellLeam_SpeedPointer& rhs) + :CElementObject(rhs) +{ +} + +HRESULT CSPellLeam_SpeedPointer::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CSPellLeam_SpeedPointer::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 476.f; + Desc.fY = -253.f; + Desc.fSizeX = 32.f; + Desc.fSizeY = 32.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_fTimeMult = 3.f; + m_fAlpha = 1.f; + m_fAlphaTime = 5.f; + m_fMoveSpeed = 15.f; + m_fAngle = XMConvertToRadians(0); + Visible(false); + return S_OK; +} + +void CSPellLeam_SpeedPointer::Priority_Update(_float fTimeDelta) +{ +} + +void CSPellLeam_SpeedPointer::Update(_float fTimeDelta) +{ +} + +void CSPellLeam_SpeedPointer::Late_Update(_float fTimeDelta) +{ +} + +HRESULT CSPellLeam_SpeedPointer::Render() +{ + return S_OK; +} + +_vector CSPellLeam_SpeedPointer::Get_WorldPostion() +{ + return _vector(); +} + +HRESULT CSPellLeam_SpeedPointer::Bind_ShaderResources() +{ + return S_OK; +} + +HRESULT CSPellLeam_SpeedPointer::Ready_Components(void* pArg) +{ + return S_OK; +} + +CSPellLeam_SpeedPointer* CSPellLeam_SpeedPointer::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + return nullptr; +} + +CGameObject* CSPellLeam_SpeedPointer::Clone(void* pArg, CGameObject* pOwner) +{ + return nullptr; +} + +void CSPellLeam_SpeedPointer::Free() +{ +} + +void CSPellLeam_SpeedPointer::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Editor/Private/SpellLearn.cpp b/Jusin154_Team3D/Editor/Private/SpellLearn.cpp index 947fe07b2..8a0468f02 100644 --- a/Jusin154_Team3D/Editor/Private/SpellLearn.cpp +++ b/Jusin154_Team3D/Editor/Private/SpellLearn.cpp @@ -1,6 +1,7 @@ #include "pch.h" #include "SpellLearn.h" #include "GameInstance.h" +#include "SpellLearn_MovePointer.h" CSpellLearn::CSpellLearn(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) :CElementObject(pDevice, pContext) @@ -39,6 +40,7 @@ HRESULT CSpellLearn::Initialize(void* pArg) m_fTimeMult = 3.f; m_fAlpha = 1.f; m_fAlphaTime = 5.f; + Change_Image(0); Visible(false); return S_OK; } @@ -95,6 +97,11 @@ void CSpellLearn::Late_Update(_float fTimeDelta) return; } if (m_bVisible) { + if (m_pPointer != nullptr) + { + m_vPointerPosition = m_pPointer->Get_Position(); + m_vPointerScale = m_pPointer->Get_Current_Size(); + } m_pGameInstance->Add_RenderGroup(RENDER::UI, this); __super::Late_Update(fTimeDelta); } @@ -105,7 +112,7 @@ HRESULT CSpellLearn::Render() if (FAILED(Bind_ShaderResources())) { return E_FAIL; } - if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::DEFAULT)))) { + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::SPELLLEARNCOLOR)))) { return E_FAIL; } if (FAILED(m_pVIBufferCom->Bind_Resources())) { @@ -133,7 +140,6 @@ HRESULT CSpellLearn::Bind_ShaderResources() { return E_FAIL; } - if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix))) { return E_FAIL; @@ -142,6 +148,10 @@ HRESULT CSpellLearn::Bind_ShaderResources() { return E_FAIL; } + if (FAILED(m_pDiffuse_TextureCom1->Bind_ShaderResource(m_pShaderCom, "g_Texture1", 0))) + { + return E_FAIL; + } if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) { return E_FAIL; @@ -162,6 +172,23 @@ HRESULT CSpellLearn::Bind_ShaderResources() { return E_FAIL; } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fItemPosition1", &m_vPointerPosition, sizeof(_float2)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fItemImageSizes1", &m_vPointerScale, sizeof(_float2)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_vScale, sizeof(_float2)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fPosition", &m_fCurrent_Position, sizeof(_float2)))) + { + return E_FAIL; + } + return S_OK; } @@ -171,7 +198,11 @@ HRESULT CSpellLearn::Ready_Components(void* pArg) { return E_FAIL; } - if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_SU_Levioso_Path"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_Levioso"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_Goldleaf_Large"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr))) { return E_FAIL; } @@ -183,6 +214,27 @@ HRESULT CSpellLearn::Ready_Components(void* pArg) return S_OK; } +HRESULT CSpellLearn::Change_Image(_int SpellID) +{ + _wstring pName = TEXT("Prototype_Texture_"); + _wstring pImageName = pName + static_cast(m_pOwner)->Get_Learninfo(SpellID).pImageName; + + if (m_pDiffuse_TextureCom) + { + Remove_Component(); + SAFE_RELEASE(m_pDiffuse_TextureCom); + } + if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(LEVEL::UI), pImageName, reinterpret_cast(&m_pDiffuse_TextureCom)))) + return E_FAIL; + + return S_OK; +} + +void CSpellLearn::Set_Pointer(CSpellLearn_MovePointer* Pointer) +{ + m_pPointer = Pointer; +} + CSpellLearn* CSpellLearn::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) { CSpellLearn* pInstance = new CSpellLearn(pDevice, pContext); @@ -202,7 +254,7 @@ CGameObject* CSpellLearn::Clone(void* pArg, CGameObject* pOwner) pInstance->m_pOwner = pOwner; if (FAILED(pInstance->Initialize(pArg))) { - MSG_BOX("Failed to Cloned : CSpell_Header"); + MSG_BOX("Failed to Cloned : CSpellLearn"); SAFE_RELEASE(pInstance); } @@ -214,6 +266,7 @@ void CSpellLearn::Free() __super::Free(); SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pDiffuse_TextureCom1); SAFE_RELEASE(m_pShaderCom); SAFE_RELEASE(m_pVIBufferCom); } diff --git a/Jusin154_Team3D/Editor/Private/SpellLearn_Data.cpp b/Jusin154_Team3D/Editor/Private/SpellLearn_Data.cpp new file mode 100644 index 000000000..da293f8fe --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/SpellLearn_Data.cpp @@ -0,0 +1,153 @@ +#include "pch.h" +#include "SpellLearn_Data.h" +#include "GameObject.h" +#include "UIObject.h" + +CSpellLearn_Data::CSpellLearn_Data(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CGameObject(pDevice, pContext) +{ +} + +CSpellLearn_Data::CSpellLearn_Data(const CSpellLearn_Data& rhs) + :CGameObject(rhs) +{ +} + +HRESULT CSpellLearn_Data::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CSpellLearn_Data::Initialize(void* pArg) +{ + auto* pInfo = static_cast*>(pArg); + + tinyxml2::XMLDocument doc; + if (doc.LoadFile("../Bin/Resources/Data/UI/SpellLearn.xml") != tinyxml2::XML_SUCCESS) + return E_FAIL; + + tinyxml2::XMLElement* pSpellLearnInfo = doc.FirstChildElement("SpellLearnInfo"); + if (!pSpellLearnInfo) return E_FAIL; + + tinyxml2::XMLElement* pSpellLearnData = pSpellLearnInfo->FirstChildElement("SpellLearnData"); + if (!pSpellLearnData) return E_FAIL; + + // 모든 Name 요소 반복 + tinyxml2::XMLElement* pName = pSpellLearnData->FirstChildElement("Name"); + while (pName) + { + CUIObject::SPELLLEARNINFO Info{}; + + // 속성 읽기 + Info.pSpellName = CMyTools::ToWstring(pName->Attribute("SpellName")); + Info.pImageName = CMyTools::ToWstring(pName->Attribute("ImageName")); + pName->QueryFloatAttribute("Size", &Info.fSpellSize); + + _float fX{}, fY{}; + pName->QueryFloatAttribute("x", &fX); + pName->QueryFloatAttribute("y", &fY); + Info.fStartPosition = _float2(fX, fY); + + // Position 요소 반복 + tinyxml2::XMLElement* pPosition = pName->FirstChildElement("Position"); + while (pPosition) + { + tinyxml2::XMLElement* pPos = pPosition->FirstChildElement("Pos"); + if (pPos) + { + _float px{}, py{}; + pPos->QueryFloatAttribute("x", &px); + pPos->QueryFloatAttribute("y", &py); + Info.Lines.push_back(XMVectorSet(px, py, 0.f, 1.f)); + } + + // 다음 Position으로 이동 + pPosition = pPosition->NextSiblingElement("Position"); + } + + // 벡터에 추가 + m_SpellLearnInfos.push_back(Info); + m_iSpellLearn_Count++; + + // 다음 Name으로 이동 + pName = pName->NextSiblingElement("Name"); + } + + *pInfo = m_SpellLearnInfos; + + return S_OK; +} + +const CUIObject::SPELLLEARNINFO& CSpellLearn_Data::Get_SpellLearn(_int Index) const +{ + return m_SpellLearnInfos[Index]; +} + +void CSpellLearn_Data::Priority_Update(_float fTimeDelta) +{ +} + +void CSpellLearn_Data::Update(_float fTimeDelta) +{ +} + +void CSpellLearn_Data::Late_Update(_float fTimeDelta) +{ +} + +HRESULT CSpellLearn_Data::Render() +{ + return S_OK; +} + +_vector CSpellLearn_Data::Get_WorldPostion() +{ + return _vector(); +} + +HRESULT CSpellLearn_Data::Bind_ShaderResources() +{ + return S_OK; +} + +HRESULT CSpellLearn_Data::Ready_Components(void* pArg) +{ + return S_OK; +} + +CSpellLearn_Data* CSpellLearn_Data::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CSpellLearn_Data* pInstance = new CSpellLearn_Data(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CSpellLearn_Data"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CSpellLearn_Data::Clone(void* pArg, CGameObject* pOwner) +{ + CSpellLearn_Data* pInstance = new CSpellLearn_Data(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CSpellLearn_Data"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CSpellLearn_Data::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pVIBufferCom); +} + +void CSpellLearn_Data::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Editor/Private/SpellLearn_MovePointer.cpp b/Jusin154_Team3D/Editor/Private/SpellLearn_MovePointer.cpp index 86b1ccd78..2c9c95b4c 100644 --- a/Jusin154_Team3D/Editor/Private/SpellLearn_MovePointer.cpp +++ b/Jusin154_Team3D/Editor/Private/SpellLearn_MovePointer.cpp @@ -21,8 +21,8 @@ HRESULT CSpellLearn_MovePointer::Initialize(void* pArg) { CUIObject::UIOBJECT_DESC Desc{}; - Desc.fX = 454.f; - Desc.fY = -240.f; + Desc.fX = 476.f; + Desc.fY = -253.f; Desc.fSizeX = 32.f; Desc.fSizeY = 32.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) }; @@ -40,32 +40,30 @@ HRESULT CSpellLearn_MovePointer::Initialize(void* pArg) m_fAlpha = 1.f; m_fAlphaTime = 5.f; m_fMoveSpeed = 15.f; - m_MoveLine.push_back(XMVectorSet(454.f, -240.f, 0.f, 1.f)); - m_MoveLine.push_back(XMVectorSet(454.f, 90.f, 0.f, 1.f)); - - - - Index = 0; - + Set_SpellLearn(0); + m_fAngle = XMConvertToRadians(0); Visible(false); return S_OK; } -void CSpellLearn_MovePointer::SpellLearn(_int Index) +void CSpellLearn_MovePointer::Set_SpellLearn(_int Index) { - m_iSpell = Index; - m_bMoveStart = true; + m_iLineIndex = _int(static_cast(m_pOwner)->Get_Learninfo(Index).Lines.size()); + m_MoveLine = static_cast(m_pOwner)->Get_Learninfo(Index).Lines; + m_iCurrentLine = 0; + m_fX = static_cast(m_pOwner)->Get_Learninfo(Index).fStartPosition.x; + m_fY = static_cast(m_pOwner)->Get_Learninfo(Index).fStartPosition.y; } void CSpellLearn_MovePointer::Line(_float fTime) { - m_vLerp_Position = m_MoveLine[Index]; + m_vLerp_Position = m_MoveLine[m_iCurrentLine]; if (Start_Lerp(m_fMoveSpeed * fTime) == true) { - if (Index < m_MoveLine.size() -1) + if (m_iCurrentLine < m_iLineIndex - 1) { - ++Index; + ++m_iCurrentLine; } else { @@ -123,16 +121,22 @@ void CSpellLearn_MovePointer::Update(_float fTimeDelta) if (m_bMoveStart == true) { - if (m_iSpell == ENUM_CLASS(SPELL_LINE::LINE)) - { - Line(fTimeDelta); - } - else if (m_iSpell == ENUM_CLASS(SPELL_LINE::CURVE)) - { - //Curve(); - } + Line(fTimeDelta); } + POINT ptMouse{}; + GetCursorPos(&ptMouse); + ScreenToClient(g_hWnd, &ptMouse); + _float2 fMouse; + fMouse.x = ptMouse.x - (g_iWinSizeX * 0.5f); + fMouse.y = -ptMouse.y + (g_iWinSizeY * 0.5f); + + fMouse.x = fMouse.x - m_fX; + fMouse.y = fMouse.y - m_fY; + + + m_fAngle = atan2(-fMouse.x, fMouse.y); + m_fTime += fTimeDelta * m_fTimeMult; __super::Update(fTimeDelta); } @@ -154,7 +158,7 @@ HRESULT CSpellLearn_MovePointer::Render() if (FAILED(Bind_ShaderResources())) { return E_FAIL; } - if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::DEFAULT)))) { + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ROTATION)))) { return E_FAIL; } if (FAILED(m_pVIBufferCom->Bind_Resources())) { @@ -211,6 +215,10 @@ HRESULT CSpellLearn_MovePointer::Bind_ShaderResources() { return E_FAIL; } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fMapAngle", &m_fAngle, sizeof(_float)))) + { + return E_FAIL; + } return S_OK; } diff --git a/Jusin154_Team3D/Editor/Private/SpellLearn_Name.cpp b/Jusin154_Team3D/Editor/Private/SpellLearn_Name.cpp index ed9106018..ec41f369f 100644 --- a/Jusin154_Team3D/Editor/Private/SpellLearn_Name.cpp +++ b/Jusin154_Team3D/Editor/Private/SpellLearn_Name.cpp @@ -43,10 +43,16 @@ HRESULT CSpellLearn_Name::Initialize(void* pArg) m_fFontY = 520.f; SizeUpX(550.f); SizeUpY(27.f); + Set_Name(0); Visible(false); return S_OK; } +void CSpellLearn_Name::Set_Name(_int Index) +{ + SizeUpX(static_cast(m_pOwner)->Get_Learninfo(Index).fSpellSize); + m_pSpell_Name = static_cast(m_pOwner)->Get_Learninfo(Index).pSpellName; +} void CSpellLearn_Name::Priority_Update(_float fTimeDelta) { @@ -120,8 +126,8 @@ HRESULT CSpellLearn_Name::Render() return E_FAIL; } - _float OffSet = (m_pGameInstance->FontSizeX(TEXT("Font_size20"), TEXT("봄바르다")) - 30) * 0.5f; - m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("봄바르다"), _float2((m_fFontX + m_fX) - OffSet, m_fFontY - m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha)); + _float OffSet = (m_pGameInstance->FontSizeX(TEXT("Font_size20"), m_pSpell_Name.c_str()) - 30) * 0.5f; + m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pSpell_Name.c_str(), _float2((m_fFontX + m_fX) - OffSet, m_fFontY - m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha)); return S_OK; } diff --git a/Jusin154_Team3D/Editor/Private/SpellLearn_Panel.cpp b/Jusin154_Team3D/Editor/Private/SpellLearn_Panel.cpp index fc448de6a..928db31af 100644 --- a/Jusin154_Team3D/Editor/Private/SpellLearn_Panel.cpp +++ b/Jusin154_Team3D/Editor/Private/SpellLearn_Panel.cpp @@ -4,6 +4,7 @@ #include "SpellLearn_Name.h" #include "SpellLearn.h" #include "SpellLearn_MovePointer.h" +#include "SpellLearn_Data.h" CSpellLearn_Panel::CSpellLearn_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) :CPanelObject(pDevice, pContext) @@ -44,11 +45,17 @@ HRESULT CSpellLearn_Panel::Initialize(void* pArg) m_fCanvasAlpha = 1.f; m_fSortZ = 0.05f; m_fDelayTime = 1.f; + static_cast(m_pSpellLearn)->Set_Pointer(static_cast(m_pSpellLearn_MovePointer)); Visible(true); ElementAllVisible(true); return S_OK; } +const CUIObject::SPELLLEARNINFO CSpellLearn_Panel::Get_Learninfo(_int Index) +{ + return static_cast(m_pSpellLearn_Data)->Get_SpellLearn(Index); +} + void CSpellLearn_Panel::Priority_Update(_float fTimeDelta) { if (!__super::Chack_Visible()) @@ -64,6 +71,22 @@ void CSpellLearn_Panel::Update(_float fTimeDelta) { return; } + + if (m_pGameInstance->Key_Down(DIK_M)) + { + if (Index >= m_Info.size() - 1) + { + Index = 0; + } + else + { + Index++; + } + static_cast(m_pSpellLearn)->Change_Image(Index); + static_cast(m_pSpellLearn_MovePointer)->Set_SpellLearn(Index); + static_cast(m_pSpellLearn_Name)->Set_Name(Index); + } + __super::Update(fTimeDelta); } @@ -167,6 +190,11 @@ HRESULT CSpellLearn_Panel::Ready_Components(void* pArg) HRESULT CSpellLearn_Panel::Ready_Element(void* pArg) { + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, &m_Info, this, reinterpret_cast(&m_pSpellLearn_Data)))) + { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_Name)))) { return E_FAIL; diff --git a/Jusin154_Team3D/Editor/Private/TrailObject.cpp b/Jusin154_Team3D/Editor/Private/TrailObject.cpp index 58ba64ba3..3190708db 100644 --- a/Jusin154_Team3D/Editor/Private/TrailObject.cpp +++ b/Jusin154_Team3D/Editor/Private/TrailObject.cpp @@ -68,7 +68,9 @@ void CTrailObject::Update(_float fTimeDelta) if (m_TrailInfo.vDissolveTime.x > m_TrailInfo.vDissolveTime.y) { + m_bVisible = false; m_TrailInfo.vDissolveTime.x = 0.f; + m_TrailInfo.isDissolve = false; } } } @@ -137,6 +139,14 @@ void CTrailObject::Rope_Trail_Update(_fmatrix WorldMat, _fmatrix EndWorldMat, _f m_pTrailCom->Rope_Trail_Update(WorldMat, fTimeDelta, m_TrailInfo.fDamping, m_TrailInfo.fRopeLength, m_TrailInfo.fMass, EndWorldMat); } +void CTrailObject::Oneside_Rope_Trail_Update(_fmatrix WorldMat, _float fTimeDelta) +{ + if (m_bVisible == false) + return; + + m_pTrailCom->Rope_Trail_Update(WorldMat, fTimeDelta, m_TrailInfo.fDamping, m_TrailInfo.fRopeLength, m_TrailInfo.fMass); + +} #ifdef _DEBUG @@ -357,6 +367,7 @@ HRESULT CTrailObject::Load_Trail(const _char* pPath, LEVEL eLevel) m_pTrailCom->ReStructVB(m_TrailInfo.iNumVertex); + CloseHandle(hFile); return S_OK; diff --git a/Jusin154_Team3D/Editor/Private/Troll.cpp b/Jusin154_Team3D/Editor/Private/Troll.cpp index b87e9dbeb..15e4370cf 100644 --- a/Jusin154_Team3D/Editor/Private/Troll.cpp +++ b/Jusin154_Team3D/Editor/Private/Troll.cpp @@ -157,7 +157,7 @@ void CTroll::Late_Update(_float fTimeDelta) } if (m_bLookAt) { - m_pTransformCom->LookAt_Lerp(XMLoadFloat4(&m_vTargetPos),fTimeDelta, 3.f); + m_pTransformCom->LookAt_Horizontal_Lerp(XMLoadFloat4(&m_vTargetPos),fTimeDelta, 3.f); } diff --git a/Jusin154_Team3D/Editor/Public/Blink.h b/Jusin154_Team3D/Editor/Public/Blink.h new file mode 100644 index 000000000..6764c90b8 --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/Blink.h @@ -0,0 +1,68 @@ +#pragma once + +#include "Editor_Define.h" +#include "Effect_Container.h" + +NS_BEGIN(Engine) +NS_END + +NS_BEGIN(Editor) + +class CBlink final : public CEffect_Container +{ +private: + CBlink(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CBlink(const CBlink& rhs); + virtual ~CBlink() = 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 = {}; + + _bool m_isParticleEnd = {}; + _bool m_isTrailEnd = {}; + _float4x4 m_TrailStopMat = {}; + + _float m_fMoveAccTime = {}; + _float m_fAmountMove = {0.3f}; + _float m_fMoveSpeed = {5.f}; + + _float m_fSizeAccTime = {}; + _float m_fAmountSize = {}; + _float m_fSpeed = {}; + + class CEditEffect* m_pBlink_Swirl = { nullptr }; + class CEditEffect* m_pBlink_Circle = { nullptr }; + class CEditEffect* m_pBlink_Circle2 = { nullptr }; + class CEditEffect* m_pBlink_Distortion = { nullptr }; + + vector m_Blink_Trails = {}; + + _float m_fLength = { 5.f }; + _string m_BoneNames[10] = {}; + + +public: + static CBlink* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual void Free() override; + CGameObject* Clone(void* pArg, CGameObject* pOwner) override; +#ifdef _DEBUG + void Describe_Entity() override; +#endif // _DEBUG +}; + +NS_END diff --git a/Jusin154_Team3D/Editor/Public/Editor_Define.h b/Jusin154_Team3D/Editor/Public/Editor_Define.h index 35c5b4156..b84dc5d83 100644 --- a/Jusin154_Team3D/Editor/Public/Editor_Define.h +++ b/Jusin154_Team3D/Editor/Public/Editor_Define.h @@ -28,15 +28,15 @@ namespace Editor 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, + enum class SHADER_PASS_UIEDITOR { DEFAULT, COLOR, LOGO, LOGO_TEXT, LOGO_GLOW, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTTYPE, 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, QUEST_BORDER, QUEST_INFO, QUEST_STATUS, BROOMSTICK, - SPELL_LEARN, + SPELL_LEARN, SPELLLEARNCOLOR, ENEMY_DETECTION, INTERACTION_OBJECT, END }; - enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, BLEND, BLEND_NOWORLD, BLOOM, BLOOM_NOWORLD, BLUR_NO_EMMISVE, BLUR_NO_WORLD_NO_EMISSIVE, WEIGHTBLEND_FOR_BLEND, DEPTH_STOP, WB_CULLING, SCREEN_FX , DISTORTION ,END }; + enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, BLEND, BLEND_NOWORLD, BLOOM, BLOOM_NOWORLD, BLUR_NO_EMMISVE, BLUR_NO_WORLD_NO_EMISSIVE, WEIGHTBLEND_FOR_BLEND, DEPTH_STOP, WB_CULLING, SCREEN_FX , DISTORTION , NONPOS , NONPOS_BLUR, 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, QUEST_SLOT, END }; enum class QUESTTYPE { MAIN, SUB, END }; @@ -55,7 +55,7 @@ namespace Editor JAP_SIDE, BOMBARDA_SIDE, DESCENDO_SIDE, LEVIOSO_SIDE, STUN, - TROLL_ATTACK, TROLL_RUSH_HIT, TROLL_NOMAL_SMOKE, + TROLL_ATTACK, TROLL_RUSH_HIT, TROLL_NOMAL_SMOKE, BLINK, END }; diff --git a/Jusin154_Team3D/Editor/Public/Player.h b/Jusin154_Team3D/Editor/Public/Player.h index 4e2592dbf..050849905 100644 --- a/Jusin154_Team3D/Editor/Public/Player.h +++ b/Jusin154_Team3D/Editor/Public/Player.h @@ -102,10 +102,30 @@ class CPlayer final : public CUnit function m_InputAction = nullptr; - _float3 m_OffsetPos = {}; - _float m_fAmount = { 1.f }; - _float m_fInputTime = {}; - _bool m_bRatio = { false }; + _int m_eUIState = { }; + _uint m_iLightCombo = { 0 }; + + _float3 m_OffsetPos = {}; + _float m_fAmount = { 1.f }; + _float m_fInputTime = {}; + _bool m_bRatio = { false }; + _bool m_bAim = { false }; + _float m_fAnimSpeed = {}; + _bool m_bOnce = { }; + _bool m_bLookAt = { false }; + _bool m_bSpellHit = {}; + _float3 m_BroomScale = { 0.f, 0.f, 0.f }; + _float3 m_vScale = { 0.f, 0.f, 0.f }; + _float3 m_TargetScale = { 1.f, 1.f, 1.f }; + _float m_fScaleSmoothSpeed = 2.5f; + _bool m_bLumos = {}; + _bool m_bShield = { false }; + _float m_fAnimTime = {}; + _bool m_bTurbo = {}; + _float m_fBlinkTime = { }; + _float m_fAccel = { 1.f }; + _float m_fSlideSpeed = {}; + _float m_fTargetSpeed = { 7.f }; HRESULT InputAction(); HRESULT InputMove(); @@ -117,6 +137,10 @@ class CPlayer final : public CUnit HRESULT Behavior_IdleExitCheck(_float fTimeDelta); void Behavior_IdleExit(); + void Behavior_BlinkEnter(); + HRESULT Behavior_BlinkExitCheck(_float fTimeDelta); + void Behavior_BlinkExit(); + void Behavior_MoveEnter(); HRESULT Behavior_MoveExitCheck(_float fTimeDelta); void Behavior_MoveExit(); @@ -130,7 +154,7 @@ class CPlayer final : public CUnit void Behavior_LandExit(); void Behavior_DodgeEnter(); - HRESULT Behavior_DodgeExitCheck(); + HRESULT Behavior_DodgeExitCheck(_float fTimeDelta); void Behavior_DodgeExit(); void Behavior_CombatEnter(); diff --git a/Jusin154_Team3D/Editor/Public/SPellLeam_SpeedPointer.h b/Jusin154_Team3D/Editor/Public/SPellLeam_SpeedPointer.h new file mode 100644 index 000000000..a2c881d6d --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/SPellLeam_SpeedPointer.h @@ -0,0 +1,40 @@ +#pragma once + +#include "Editor_Define.h" +#include "ElementObject.h" + +NS_BEGIN(Editor) + +class CSPellLeam_SpeedPointer final : public CElementObject +{ +private: + CSPellLeam_SpeedPointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CSPellLeam_SpeedPointer(const CSPellLeam_SpeedPointer& rhs); + virtual ~CSPellLeam_SpeedPointer() = 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: + CTexture* m_pDiffuse_TextureCom = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + +public: + static CSPellLeam_SpeedPointer* 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/SpellLearn.h b/Jusin154_Team3D/Editor/Public/SpellLearn.h index e5dcfcd5b..d7d9db4b4 100644 --- a/Jusin154_Team3D/Editor/Public/SpellLearn.h +++ b/Jusin154_Team3D/Editor/Public/SpellLearn.h @@ -25,11 +25,19 @@ class CSpellLearn final : public CElementObject virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; +public: + HRESULT Change_Image(_int SpellID); + void Set_Pointer(class CSpellLearn_MovePointer* Pointer); private: CTexture* m_pDiffuse_TextureCom = { nullptr }; + CTexture* m_pDiffuse_TextureCom1 = { nullptr }; CShader* m_pShaderCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + class CSpellLearn_MovePointer* m_pPointer = { nullptr }; + + _float2 m_vPointerPosition{}; + _float3 m_vPointerScale{}; public: static CSpellLearn* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Editor/Public/SpellLearn_Data.h b/Jusin154_Team3D/Editor/Public/SpellLearn_Data.h new file mode 100644 index 000000000..b3c9f6f4e --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/SpellLearn_Data.h @@ -0,0 +1,57 @@ +#pragma once + +#include "Editor_Define.h" +#include "GameObject.h" +#include "UIObject.h" + +NS_BEGIN(Engine) +class CGameObject; +NS_END + +NS_BEGIN(Editor) + +class CSpellLearn_Data final : public CGameObject +{ +private: + //typedef struct tagSpellLearnInfo + //{ + // _wstring pSpellName; + // _wstring pImageName; + // _float fSpellSize{}; + // _float2 fStartPosition{}; + // vector<_float2> Lines; + //}SPELLLEARNINFO; +private: + CSpellLearn_Data(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CSpellLearn_Data(const CSpellLearn_Data& rhs); + virtual ~CSpellLearn_Data() = default; + +public: + virtual void Priority_Update(_float fTimeDelta); + virtual void Update(_float fTimeDelta); + virtual void Late_Update(_float fTimeDelta); + virtual HRESULT Render() override; + virtual _vector Get_WorldPostion() override; + +private: + virtual HRESULT Bind_ShaderResources() override; + virtual HRESULT Ready_Components(void* pArg) override; + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + +public: + const CUIObject::SPELLLEARNINFO& Get_SpellLearn(_int Index) const; + +private: + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + _int m_iSpellLearn_Count{}; + vector m_SpellLearnInfos; +public: + static CSpellLearn_Data* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; + void Describe_Entity() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Editor/Public/SpellLearn_MovePointer.h b/Jusin154_Team3D/Editor/Public/SpellLearn_MovePointer.h index 1cbad5c47..b3c0b4b60 100644 --- a/Jusin154_Team3D/Editor/Public/SpellLearn_MovePointer.h +++ b/Jusin154_Team3D/Editor/Public/SpellLearn_MovePointer.h @@ -26,7 +26,8 @@ class CSpellLearn_MovePointer final : public CElementObject virtual HRESULT Initialize(void* pArg) override; public: - void SpellLearn(_int Index); + void Set_SpellLearn(_int Index); + private: void Line(_float fTime); @@ -36,10 +37,11 @@ class CSpellLearn_MovePointer final : public CElementObject CShader* m_pShaderCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; - _bool m_bMoveStart = { false }; - _int m_iSpell{}; - _int Index{}; + _bool m_bMoveStart = { false }; + + _int m_iLineIndex{}; + _int m_iCurrentLine{}; vector<_vector> m_MoveLine; public: diff --git a/Jusin154_Team3D/Editor/Public/SpellLearn_Name.h b/Jusin154_Team3D/Editor/Public/SpellLearn_Name.h index 6449ec521..c97d6dcd5 100644 --- a/Jusin154_Team3D/Editor/Public/SpellLearn_Name.h +++ b/Jusin154_Team3D/Editor/Public/SpellLearn_Name.h @@ -25,11 +25,16 @@ class CSpellLearn_Name final : public CElementObject virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; +public: + void Set_Name(_int Index); + private: CTexture* m_pDiffuse_TextureCom = { nullptr }; CShader* m_pShaderCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + _wstring m_pSpell_Name; + public: static CSpellLearn_Name* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Editor/Public/SpellLearn_Panel.h b/Jusin154_Team3D/Editor/Public/SpellLearn_Panel.h index 8cb5c3066..5405b5c18 100644 --- a/Jusin154_Team3D/Editor/Public/SpellLearn_Panel.h +++ b/Jusin154_Team3D/Editor/Public/SpellLearn_Panel.h @@ -31,15 +31,23 @@ class CSpellLearn_Panel final : public CPanelObject virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; +public: + virtual const SPELLLEARNINFO Get_Learninfo(_int Index) override; + private: CTexture* m_pDiffuse_TextureCom = { nullptr }; CTexture* m_pDiffuse_TextureCom1 = { nullptr }; CShader* m_pShaderCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + vector m_Info = {}; + CGameObject* m_pSpellLearn_Name = { nullptr }; CGameObject* m_pSpellLearn = { nullptr }; CGameObject* m_pSpellLearn_MovePointer = { nullptr }; + CGameObject* m_pSpellLearn_Data = { nullptr }; + + _int Index{}; public: static CSpellLearn_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); diff --git a/Jusin154_Team3D/Editor/Public/TrailObject.h b/Jusin154_Team3D/Editor/Public/TrailObject.h index e982cb55f..28214fac5 100644 --- a/Jusin154_Team3D/Editor/Public/TrailObject.h +++ b/Jusin154_Team3D/Editor/Public/TrailObject.h @@ -106,6 +106,9 @@ class CTrailObject final : public CPartObject void Set_Target(class CTransform* pTargetTransform); void Trail_Update(_fmatrix WorldMat, _float fTimeDelta); void Rope_Trail_Update(_fmatrix WorldMat, _fmatrix EndWorldMat, _float fTimeDelta); + void Oneside_Rope_Trail_Update(_fmatrix WorldMat, _float fTimeDelta); + void SetDissolve(_bool isDissolve) { m_TrailInfo.isDissolve = isDissolve; } + TRAIL_INFO* Get_TrailInfo() { return &m_TrailInfo; } public: #ifdef _DEBUG HRESULT Save_Trail(const _char* pPath); diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Local_Compute.hlsl b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Local_Compute.hlsl index fa37c7a5f..e859e4d1d 100644 --- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Local_Compute.hlsl +++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Local_Compute.hlsl @@ -251,7 +251,7 @@ void SampleLocalTRS_Prev(uint bone, float t, out float3 S, out float4 R, out flo if (ch.KeyCount < 2) { - KeyFrame k = g_KeyFrameBuffer[ch.StartIndex]; + KeyFrame k = g_PrevKeyFrameBuffer[ch.StartIndex]; S = k.vScale; T = k.vTranslation; R = QuatNormalize(k.vRotation); @@ -274,13 +274,13 @@ void SampleLocalTRS_Prev(uint bone, float t, out float3 S, out float4 R, out flo row_major float4x4 SampleBlendedLocal(uint bone) { - if (PrevAnimIndex == 0xFFFFFFFFu) + if (PrevAnimIndex == -1) { float3 S; float4 R; float3 T; SampleLocalTRS_Cur(bone, CurrentTime, S, R, T); - if ((int) bone == RootBoneIndex) + if (bone == RootBoneIndex) { T = 0; R = RootInitRot; @@ -295,7 +295,7 @@ row_major float4x4 SampleBlendedLocal(uint bone) float3 T; SampleLocalTRS_Cur(bone, CurrentTime, S, R, T); - if ((int) bone == RootBoneIndex) + if (bone == RootBoneIndex) { T = 0; R = RootInitRot; @@ -305,38 +305,17 @@ row_major float4x4 SampleBlendedLocal(uint bone) float br = saturate(BlendRatio); - if (br <= 0.0f) - { - float3 S; - float4 R; - float3 T; - SampleLocalTRS_Prev(bone, PrevTime, S, R, T); - - if ((int) bone == RootBoneIndex) - { - T = 0; - R = RootInitRot; - } - return MakeAffine(S, R, T); - } - - if (br >= 1.0f) - { - float3 S; - float4 R; - float3 T; - SampleLocalTRS_Cur(bone, CurrentTime, S, R, T); - - if ((int) bone == RootBoneIndex) - { - T = 0; - R = RootInitRot; - } - return MakeAffine(S, R, T); - } - float3 sA, sB, tA, tB; float4 rA, rB; + + float prevT = PrevTime; + + if (BlendRatio < 1e-4f) + { + prevT = CurrentTime; + } + + SampleLocalTRS_Prev(bone, PrevTime, sA, rA, tA); SampleLocalTRS_Cur(bone, CurrentTime, sB, rB, tB); @@ -345,7 +324,7 @@ row_major float4x4 SampleBlendedLocal(uint bone) float3 T = lerp(tA, tB, br); float4 R = QuatSlerp(rA, rB, br); - if ((int) bone == RootBoneIndex) + if (bone == RootBoneIndex) { T = 0; R = RootInitRot; 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 e66a6f4e0..69a0eb915 100644 --- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl +++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl @@ -52,6 +52,9 @@ struct ParticleValue float fAcceleration; bool isStop; + + float fRotateAttenuation; + float fRotateAttDelay; }; @@ -85,7 +88,7 @@ cbuffer g_ConstantBuffer : register(b0) // b0 << 이 숫자와 컨스턴트 쉐 bool isMoveUp; bool isExcludePos; bool isStopMove_For_Depth_Compare; - bool isPadding2; + bool isNoPos; float fTimeDelta; float fSizeLerpOption; // 반드시 상수버퍼는 16바이트 배수로 만들어져야 한다. @@ -143,6 +146,11 @@ void CS_MAIN( particle.vTranslation = CurMat[3].xyzw; } + if (isNoPos) + { + particle.vTranslation.xyz += WorldMatrix[3].xyz; + } + } // 라이프타임 움직임 @@ -175,7 +183,13 @@ void CS_MAIN( particle.vLifeTime.x = 0.f; particleValue.vDelay.x = 0.f; particleValue.isStop = false; - + + particleValue.vMaskingUVMoveTime.x = 0.f; + particleValue.vDiffuseUVMoveTime.x = 0.f; + particleValue.vNoiseUVMoveTime.x = 0.f; + particleValue.vDistortionUVMoveTime.x = 0.f; + particleValue.vDissolveUVMoveTime.x = 0.f; + if (isRandomAniIndex == false) particleValue.vAniIndex.x = 0.f; @@ -316,6 +330,21 @@ void CS_MAIN( particle.vTranslation += vector( sin(particle.vLifeTime.x * 3.141592 * 2.f) * particleValue.vSinAmount, 0.f); } + + /* Rotate Time */ + float fTimeX = (particle.vLifeTime.x - particleValue.fRotateAttDelay); + float fTimeY = (particle.vLifeTime.y - particleValue.fRotateAttDelay); + float fRotateTimeRatio = 0; + + if (particleValue.fRotateAttDelay <= FLT_EPSILON5) + { + fRotateTimeRatio = particle.vLifeTime.x / particle.vLifeTime.y; + } + else if (fTimeX > 0 && fTimeY != 0) + { + fRotateTimeRatio = saturate(fTimeX / fTimeY); + } + if (isTurn == true) { float fRotationSpeed = 1.f; @@ -323,6 +352,11 @@ void CS_MAIN( if (particleValue.fRotaionSpeed > FLT_EPSILON5) fRotationSpeed = particleValue.fRotaionSpeed; + fRotationSpeed = fRotationSpeed - fRotateTimeRatio * particleValue.fRotateAttenuation; + + if (fRotationSpeed < FLT_EPSILON5) + fRotationSpeed = 0.f; + /* ROTATE */ float4x4 RotateXMat = RotateX(particleValue.vDeltaAngle.x * fTimeDelta * fRotationSpeed); float4x4 RotateYMat = RotateY(particleValue.vDeltaAngle.y * fTimeDelta * fRotationSpeed); @@ -350,6 +384,11 @@ void CS_MAIN( if (particleValue.fRotaionSpeed > FLT_EPSILON5) fRotationSpeed = particleValue.fRotaionSpeed; + fRotationSpeed = fRotationSpeed - fRotateTimeRatio * particleValue.fRotateAttenuation; + + if (fRotationSpeed < FLT_EPSILON5) + fRotationSpeed = 0.f; + 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); diff --git a/Jusin154_Team3D/Engine/Default/Engine.vcxproj b/Jusin154_Team3D/Engine/Default/Engine.vcxproj index d1ab424f7..89a3cb2f2 100644 --- a/Jusin154_Team3D/Engine/Default/Engine.vcxproj +++ b/Jusin154_Team3D/Engine/Default/Engine.vcxproj @@ -629,12 +629,18 @@ call Update_Lib.bat - + + Effect + 5.0 + Effect 5.0 - + + Effect + 5.0 + Effect 5.0 diff --git a/Jusin154_Team3D/Engine/Private/GameInstance.cpp b/Jusin154_Team3D/Engine/Private/GameInstance.cpp index 99495c23e..d2908f2e2 100644 --- a/Jusin154_Team3D/Engine/Private/GameInstance.cpp +++ b/Jusin154_Team3D/Engine/Private/GameInstance.cpp @@ -888,10 +888,7 @@ HRESULT CGameInstance::Bind_CS_RenderTarget(_uint iIndex, const _wstring& strTar { return m_pRenderTarget_Manager->Bind_CS_RenderTarget(iIndex, strTargetTag); } -_float2 CGameInstance::Get_RenderTargetSize(const _wstring& wstrTargetKey) -{ - return m_pRenderTarget_Manager->Get_RenderTargetSize(wstrTargetKey); -} + #ifdef _DEBUG void CGameInstance::RenderTarget_Debuger() { @@ -1213,6 +1210,11 @@ _float3 CGameInstance::Get_MouseMove() return { 0.f, 0.f, 0.f }; } +_long CGameInstance::Get_DIMouseMove(MOUSEMOVESTATE eMouseState) +{ + return m_pKey_Manager->Get_DIMouseMove(eMouseState); +} + void CGameInstance::Picking() { return m_pMouse_Manager->Picking(); diff --git a/Jusin154_Team3D/Engine/Private/Instance_Model.cpp b/Jusin154_Team3D/Engine/Private/Instance_Model.cpp index f1e1a91f1..754254934 100644 --- a/Jusin154_Team3D/Engine/Private/Instance_Model.cpp +++ b/Jusin154_Team3D/Engine/Private/Instance_Model.cpp @@ -569,6 +569,8 @@ void CInstance_Model::Compute_CS(_float fTimeDelta) pDesc->isRandomAniIndex = m_InstanceDesc.isRandomAniIndex; pDesc->isExcludePos = m_InstanceDesc.isExcludePos; pDesc->isStop_Move_For_Depth_Compare = m_InstanceDesc.isStop_Move_For_Depth_Compare; + pDesc->isNoPos = m_InstanceDesc.isNoPos; + pDesc->WorldMatrix = *m_pOwner->Get_Component()->Get_WorldMatrixPtr(); pDesc->fSizeLerpOption = m_InstanceDesc.fSizeLerpOption; @@ -741,7 +743,9 @@ void CInstance_Model::Instane_Buffer_ReStruct() 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].fRotateAttenuation = _float(m_pGameInstance->Random_Float(m_InstanceDesc.vRotateAttenuation.x, m_InstanceDesc.vRotateAttenuation.y)); + pParticleValues[i].fRotateAttDelay = _float(m_pGameInstance->Random_Float(m_InstanceDesc.vRotateAttDelay.x, m_InstanceDesc.vRotateAttDelay.y)); + pParticleValues[i].fCollisionTime = 0.f; pParticleValues[i].isCompareStop = false; pParticleValues[i].isStop = false; @@ -855,6 +859,13 @@ void CInstance_Model::Describe_Entity() Instane_Buffer_ReStruct(); } + if (GUI::Checkbox("NoPos", &m_InstanceDesc.isNoPos)) + { + Instane_Buffer_ReStruct(); + } + + + if (GUI::Checkbox("RandomIndex", &m_InstanceDesc.isRandomAniIndex)) { Instane_Buffer_ReStruct(); @@ -1011,6 +1022,18 @@ void CInstance_Model::Describe_Entity() Instane_Buffer_ReStruct(); } + if (ImGui::DragFloat2("RotateAttenuation", reinterpret_cast<_float*>(&m_InstanceDesc.vRotateAttenuation))) + { + Instane_Buffer_ReStruct(); + } + + if (ImGui::DragFloat2("RotateAttDelay", reinterpret_cast<_float*>(&m_InstanceDesc.vRotateAttDelay))) + { + Instane_Buffer_ReStruct(); + } + + + if (GUI::TreeNode("Nomal Turn")) { if (GUI::Checkbox("Turn", &m_InstanceDesc.isTurn)) diff --git a/Jusin154_Team3D/Engine/Private/Model.cpp b/Jusin154_Team3D/Engine/Private/Model.cpp index c811d2423..733d04233 100644 --- a/Jusin154_Team3D/Engine/Private/Model.cpp +++ b/Jusin154_Team3D/Engine/Private/Model.cpp @@ -174,6 +174,9 @@ _bool CModel::Play_Anim(_float fTimeDelta, CTransform* pTransform) m_iPreAnimIndex = m_iCurrentAnimIndex; } + + ComputeAnimation(m_iCurrentAnimIndex, 0); + if (m_bIsFinishedAnim) { if (m_bIsLoop) @@ -186,9 +189,6 @@ _bool CModel::Play_Anim(_float fTimeDelta, CTransform* pTransform) } } - ComputeAnimation(m_iCurrentAnimIndex, 0); - - if (m_bRatio) { Update_RootBone(m_fAmount * m_fRatio); @@ -1621,7 +1621,6 @@ HRESULT CModel::Create_Local() void CModel::ComputeAnimation(_uint AnimIndex,_uint MeshIndex) { - ComputeLocal(AnimIndex,MeshIndex); if (m_pComputeShader == nullptr) @@ -1660,17 +1659,26 @@ void CModel::ComputeAnimation(_uint AnimIndex,_uint MeshIndex) 1, m_pConstantBuffer ); + + ID3D11UnorderedAccessView* nullUAV[1] = { nullptr }; + UINT counts[1] = { 0 }; + m_pContext->CSSetUnorderedAccessViews(0, 1, nullUAV, counts); + + ID3D11ShaderResourceView* nullSRV[3] = { nullptr }; + m_pContext->CSSetShaderResources(0, 3, nullSRV); + } void CModel::ComputeLocal(_uint AnimIndex, _uint MeshIndex) { D3D11_MAPPED_SUBRESOURCE ConstantSubResource = {}; + auto* anim = m_Animations[AnimIndex]; + if (SUCCEEDED(m_pContext->Map(m_pConstantBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &ConstantSubResource))) { ANIMSTATE_DESC* pDesc = static_cast(ConstantSubResource.pData); - auto* anim = m_Animations[AnimIndex]; pDesc->CurrentTime = anim->Get_CurrentTrackPosition(); pDesc->Duration = anim->Get_Duration(); pDesc->MeshBoneCount = m_Meshes[MeshIndex]->Get_NumBone(); @@ -1702,7 +1710,6 @@ void CModel::ComputeLocal(_uint AnimIndex, _uint MeshIndex) m_Meshes[MeshIndex]->Get_BoneRemapBuffer() }; - auto* anim = m_Animations[AnimIndex]; ID3D11ShaderResourceView* srvs[] = { anim->Get_KeyFrameSrv(), @@ -1734,6 +1741,11 @@ void CModel::ComputeLocal(_uint AnimIndex, _uint MeshIndex) UINT counts[1] = { 0 }; m_pContext->CSSetUnorderedAccessViews(0, 1, nullUAV, counts); + ID3D11ShaderResourceView* nullSRV[7] = { nullptr }; + + m_pContext->CSSetShaderResources(0, 7, nullSRV); + + } @@ -1811,7 +1823,7 @@ HRESULT CModel::Initialize_Prototype(MODEL eType, const _char* pModelFilePath, _ #ifndef _DEBUG -HRESULT CModel::Initialize_Prototype(MODEL eType, const _char* pModelFilePath, _fmatrix PreTransformMatrix) +HRESULT CModel::Initialize_Prototype(MODEL eType, const _char* pModelFilePath, _fmatrix PreTransformMatrix, _uint iLevel) { m_eType = eType; @@ -1829,7 +1841,7 @@ HRESULT CModel::Initialize_Prototype(MODEL eType, const _char* pModelFilePath, _ return E_FAIL; } - if (FAILED(Ready_Materials(pModelFilePath))) { + if (FAILED(Ready_Materials(pModelFilePath, iLevel))) { return E_FAIL; } if (MODEL::PBR_ANIM == m_eType || MODEL::PBR_NONANIM == m_eType) { diff --git a/Jusin154_Team3D/Engine/Private/RenderTarget.cpp b/Jusin154_Team3D/Engine/Private/RenderTarget.cpp index 39aeceb80..a87c26739 100644 --- a/Jusin154_Team3D/Engine/Private/RenderTarget.cpp +++ b/Jusin154_Team3D/Engine/Private/RenderTarget.cpp @@ -16,8 +16,6 @@ HRESULT CRenderTarget::Initialize(_uint iSizeX, _uint iSizeY, DXGI_FORMAT ePixel { D3D11_TEXTURE2D_DESC TextureDesc{}; - m_vTargetSize.x = (_float)iSizeX; - m_vTargetSize.y = (_float)iSizeY; TextureDesc.Width = iSizeX; TextureDesc.Height = iSizeY; TextureDesc.MipLevels = 1; diff --git a/Jusin154_Team3D/Engine/Private/RenderTarget_Manager.cpp b/Jusin154_Team3D/Engine/Private/RenderTarget_Manager.cpp index cdbec8ce2..a627e723b 100644 --- a/Jusin154_Team3D/Engine/Private/RenderTarget_Manager.cpp +++ b/Jusin154_Team3D/Engine/Private/RenderTarget_Manager.cpp @@ -496,15 +496,6 @@ HRESULT CRenderTarget_Manager::Finish_RenderTarget(CVIBuffer_Rect* pVIBuffer, CS return S_OK; } -_float2 CRenderTarget_Manager::Get_RenderTargetSize(const _wstring& wstrTargetKey) -{ - CRenderTarget* pRenderTarget = Find_RenderTarget(wstrTargetKey); - if (nullptr == pRenderTarget) { - return _float2(); - } - - return pRenderTarget->Get_TargetSize(); -} HRESULT CRenderTarget_Manager::End_MRT() { diff --git a/Jusin154_Team3D/Engine/Private/Trail.cpp b/Jusin154_Team3D/Engine/Private/Trail.cpp index 6b22aa77d..829996ad2 100644 --- a/Jusin154_Team3D/Engine/Private/Trail.cpp +++ b/Jusin154_Team3D/Engine/Private/Trail.cpp @@ -180,6 +180,7 @@ void CTrail::Trail_Update(_float fDeltaTime, _fmatrix WorldMatrix) XMStoreFloat3(&m_pVertices[m_iNumCount++].vPosition, vLerpLow); XMStoreFloat3(&m_pVertices[m_iNumCount++].vPosition, vLerpHigh); + if (m_iNumCount >= m_iNumVertices) { memmove(m_pVertices, m_pVertices + 2, sizeof(VTXPOSTEX) * (m_iNumCount - 2)); @@ -189,7 +190,7 @@ void CTrail::Trail_Update(_float fDeltaTime, _fmatrix WorldMatrix) } - for (_uint i = 0; i < m_iNumCount; i += 2) + for (_uint i = 0; i + 1 < m_iNumCount; i += 2) { _float u = ((_float)i / (m_iNumCount - 2)); @@ -201,7 +202,6 @@ void CTrail::Trail_Update(_float fDeltaTime, _fmatrix WorldMatrix) m_pVertices[i + 1].vTexcoord = _float2(u, 1); // High - } @@ -248,7 +248,7 @@ void CTrail::Rope_Trail_Update(_fmatrix WorldMatrix, _float fTimeDelta, _float f _vector vLow = XMVector3TransformCoord(XMLoadFloat3(&m_TrailDesc.vLow), WorldMat); _vector vHigh = XMVector3TransformCoord(XMLoadFloat3(&m_TrailDesc.vHigh), WorldMat); - /* 시작시 고정점 업데이트 */ + /* 시작 시 고정점 업데이트 */ XMStoreFloat3(&m_pVertices[0].vPosition, vLow); XMStoreFloat3(&m_pVertices[1].vPosition, vHigh); @@ -323,12 +323,12 @@ void CTrail::Rope_Trail_Update(_fmatrix WorldMatrix, _float fTimeDelta, _float f _float fHighDiff = (fLength - fHighDist) / fHighDist; // 각 점을 절반씩 밀거나 당겨서 거리 맞춤 - // 손잡이(Pinned)는 움직이지 않도록 질량 비율 조절 가능 (여기선 0.5씩) _vector vLowOffset = vDeltaLow * (fMass * fLowDiff); _vector vHighOffset = vDeltaHigh * (fMass * fHighDiff); - // k!=0 (즉, 움직이는 마디)일 때만 vFirst를 움직임 + // k!=0일 때만 vFirst를 움직임 + if (k != 0) { vFirst[0] -= vLowOffset; @@ -340,12 +340,11 @@ void CTrail::Rope_Trail_Update(_fmatrix WorldMatrix, _float fTimeDelta, _float f vNext[1] += vHighOffset; - // --- 2. 고정점 몫 몰아주기 (k=0 일 때만) --- + // k=0일 때 vFirst (손잡이)가 움직이지 않은 몫을 vNext에게 전부 몰아줌 - // k=0일 때 vFirst (손잡이)가 움직이지 않은 몫을 vNext (첫 마디)에게 전부 몰아줌 if (k == 0) { - // vFirst가 움직여야 할 양(-Offset)만큼 vNext에 추가 보정 (+Offset) + // vFirst가 움직여야 할 만큼 vNext에 추가 보정 vNext[0] += vLowOffset; vNext[1] += vHighOffset; } @@ -357,10 +356,7 @@ void CTrail::Rope_Trail_Update(_fmatrix WorldMatrix, _float fTimeDelta, _float f vFirst[1] -= vHighOffset; } - // --- 3. 결과 저장 --- - // vFirst 저장 (k=0 일 때는 vFirst가 vLow/vHigh의 값을 가지지만, - // 움직이지 않았으므로 저장해도 무방. 하지만 명확성을 위해 조건부 저장 가능) if (k != 0) { @@ -406,6 +402,176 @@ void CTrail::Rope_Trail_Update(_fmatrix WorldMatrix, _float fTimeDelta, _float f } } +void CTrail::Rope_Trail_Update(_fmatrix WorldMatrix, _float fTimeDelta, _float fDamping, _float fLength, _float fMass) +{ + _matrix WorldMat = {}; + + WorldMat.r[0] = XMVector3Normalize(WorldMatrix.r[0]); + WorldMat.r[1] = XMVector3Normalize(WorldMatrix.r[1]); + WorldMat.r[2] = XMVector3Normalize(WorldMatrix.r[2]); + WorldMat.r[3] = WorldMatrix.r[3]; + + _vector vLow = XMVector3TransformCoord(XMLoadFloat3(&m_TrailDesc.vLow), WorldMat); + _vector vHigh = XMVector3TransformCoord(XMLoadFloat3(&m_TrailDesc.vHigh), WorldMat); + + + if (m_iNumCount == 0) + { + for (_uint i = 0; i < m_iNumVertices; i += 2) + { + XMStoreFloat3(&m_pVertices[i].vPosition, vLow); + XMStoreFloat3(&m_pVertices[i + 1].vPosition, vHigh); + + m_pOldPosition[i] = m_pVertices[i].vPosition; + m_pOldPosition[i + 1] = m_pVertices[i + 1].vPosition; + } + + // 처음엔 마디 1개(정점 2개)만 보여주며 시작 + m_iNumCount = 2; + } + else + { + if (m_iNumCount > 2) + { + memmove(m_pVertices + 2, m_pVertices, sizeof(VTXPOSTEX) * (m_iNumCount - 2)); + memmove(m_pOldPosition + 2, m_pOldPosition, sizeof(_float3) * (m_iNumCount - 2)); + } + + if (m_iNumCount >= m_iNumVertices) + m_iNumCount -= 2; + + /* 시작 시 고정점 업데이트 */ + XMStoreFloat3(&m_pVertices[0].vPosition, vLow); + XMStoreFloat3(&m_pVertices[1].vPosition, vHigh); + + + m_pOldPosition[0] = m_pVertices[0].vPosition; + m_pOldPosition[1] = m_pVertices[1].vPosition; + + m_iNumCount += 2; + } + + + for (_uint i = 2; i < m_iNumCount; i++) /* 고정점은 연산에서 제외 0 , 1*/ + { + + _vector vCurrentPos = XMLoadFloat3(&m_pVertices[i].vPosition); + vCurrentPos = XMVectorSetW(vCurrentPos, 1.f); + + + _vector vOldPos = XMLoadFloat3(&m_pOldPosition[i]); + vOldPos = XMVectorSetW(vOldPos, 1.f); + + //if (XMVectorGetX(XMVector3Length(vOldPos)) <= 0) + // continue; + + _vector vVelocity = (vCurrentPos - vOldPos) * fDamping; + + _vector vGravity = XMVectorSet(0.0f, m_fGravity, 0.0f, 0.0f); + + // Verlet 공식: Next = Curr + Vel + Acc * dt * dt + _vector vNextPos = vCurrentPos + vVelocity + vGravity * (fTimeDelta * fTimeDelta); + + // 과거 위치 갱신 + XMStoreFloat3(&m_pOldPosition[i], XMLoadFloat3(&m_pVertices[i].vPosition)); + + // 현재 위치 갱신 + XMStoreFloat3(&m_pVertices[i].vPosition, vNextPos); + + } + + for (int i = 0; i < 10; ++i) { + for (_uint k = 0; k < m_iNumCount - 2; k += 2) { + + /* Low , High */ + _vector vFirst[2] = { XMLoadFloat3(&m_pVertices[k].vPosition) , XMLoadFloat3(&m_pVertices[k + 1].vPosition) }; + _vector vNext[2] = { XMLoadFloat3(&m_pVertices[k + 2].vPosition) , XMLoadFloat3(&m_pVertices[k + 3].vPosition) }; + + + _vector vDeltaLow = vNext[0] - vFirst[0]; + _vector vDeltaHigh = vNext[1] - vFirst[1]; + + + _float fLowDist = XMVectorGetX(XMVector3Length(vDeltaLow)); + _float fHighDist = XMVectorGetX(XMVector3Length(vDeltaHigh)); + + // 거리가 0이면 오류 방지 + if (fLowDist < FLT_EPSILON5) continue; + if (fHighDist < FLT_EPSILON5) continue; + + // 늘어나거나 줄어든 비율 계산 (Difference) + _float fLowDiff = (fLength - fLowDist) / fLowDist; + _float fHighDiff = (fLength - fHighDist) / fHighDist; + + // 각 점을 절반씩 밀거나 당겨서 거리 맞춤 + + _vector vLowOffset = vDeltaLow * (fMass * fLowDiff); + _vector vHighOffset = vDeltaHigh * (fMass * fHighDiff); + + // k!=0일 때만 vFirst를 움직임 + + if (k != 0) + { + vFirst[0] -= vLowOffset; + vFirst[1] -= vHighOffset; + } + + // vNext는 모든 경우에 움직임 + vNext[0] += vLowOffset; + vNext[1] += vHighOffset; + + + // k=0일 때 vFirst (손잡이)가 움직이지 않은 몫을 vNext에게 전부 몰아줌 + + if (k == 0) + { + // vFirst가 움직여야 할 만큼 vNext에 추가 보정 + vNext[0] += vLowOffset; + vNext[1] += vHighOffset; + } + + if (k != 0) + { + XMStoreFloat3(&m_pVertices[k].vPosition, vFirst[0]); + XMStoreFloat3(&m_pVertices[k + 1].vPosition, vFirst[1]); + } + + // vNext 저장 + XMStoreFloat3(&m_pVertices[k + 2].vPosition, vNext[0]); + XMStoreFloat3(&m_pVertices[k + 3].vPosition, vNext[1]); + } + } + + + for (_uint i = 0; i < m_iNumCount; i += 2) + { + + _float u = ((_float)i / (m_iNumCount - 2)); + + if (m_iNumCount - 2 <= 0) + u = 0; + + m_pVertices[i].vTexcoord = _float2(u, 0); // Low + + m_pVertices[i + 1].vTexcoord = _float2(u, 1); // High + + + } + + + D3D11_MAPPED_SUBRESOURCE VBResource{}; + + if (SUCCEEDED(m_pContext->Map(m_pVB, 0, D3D11_MAP_WRITE_DISCARD, 0, &VBResource))) + { + + memcpy(VBResource.pData, m_pVertices, sizeof(VTXPOSTEX) * m_iNumVertices); + + VTXPOSTEX* pDebug = static_cast(VBResource.pData); + + m_pContext->Unmap(m_pVB, 0); + } +} + void CTrail::Reset_Trail() { ZeroMemory(m_pVertices, sizeof(VTXPOSTEX) * m_iNumVertices); @@ -422,17 +588,24 @@ HRESULT CTrail::ReStructVB(_uint iNumVertices) { m_iNumVertices = iNumVertices; + + Safe_Delete_Array(m_pVertices); + Safe_Delete_Array(m_pOldPosition); + if (FAILED(Create_VB())) return E_FAIL; if (FAILED(Create_IB())) return E_FAIL; - Safe_Delete_Array(m_pVertices); - Safe_Delete_Array(m_pOldPosition); - m_pOldPosition = new _float3[m_iNumVertices]; - m_pVertices = new VTXPOSTEX[m_iNumVertices]{}; + m_pVertices = new VTXPOSTEX[m_iNumVertices]; + + ZeroMemory(m_pVertices, sizeof(VTXPOSTEX) * m_iNumVertices); + ZeroMemory(m_pOldPosition, sizeof(_float3) * m_iNumVertices); + + + Reset_Trail(); return S_OK; } @@ -453,6 +626,7 @@ HRESULT CTrail::Save_Trail(HANDLE hFile) HRESULT CTrail::Load_Trail(TRAIL_DESC TrailDesc) { m_TrailDesc = TrailDesc; + return S_OK; } diff --git a/Jusin154_Team3D/Engine/Private/Transform.cpp b/Jusin154_Team3D/Engine/Private/Transform.cpp index 068c00e44..1e70caffd 100644 --- a/Jusin154_Team3D/Engine/Private/Transform.cpp +++ b/Jusin154_Team3D/Engine/Private/Transform.cpp @@ -212,6 +212,26 @@ _vector CTransform::Go_LerpStraight(_float fSpeed, _float fTimeDelta) return +vMomentum; } +_vector CTransform::Go_LerpLeft(_float fSpeed, _float fTimeDelta) +{ + _vector vPos = Get_State(STATE::POSITION); + _vector vRight = Get_State(STATE::RIGHT); + _vector vMomentum = XMVector3Normalize(vRight) * fSpeed * fTimeDelta; + vPos -= vMomentum; + Set_State(STATE::POSITION, vPos); + return -vMomentum; +} + +_vector CTransform::Go_LerpRight(_float fSpeed, _float fTimeDelta) +{ + _vector vPos = Get_State(STATE::POSITION); + _vector vRight = Get_State(STATE::RIGHT); + _vector vMomentum = XMVector3Normalize(vRight) * fSpeed * fTimeDelta; + vPos += vMomentum; + Set_State(STATE::POSITION, vPos); + return +vMomentum; +} + _vector CTransform::Go_LerpUp(_float fSpeed, _float fTimeDelta) { _vector vPos = Get_State(STATE::POSITION); @@ -392,6 +412,27 @@ void CTransform::LookAt_Lerp(_fvector vAt, _float fTimeDelta, _float fSpeed) { _vector vPos = Get_State(STATE::POSITION); + _vector vDir = vAt - vPos; + + _vector vTargetLook = XMVector3Normalize(vDir); + _vector vCurrentLook = Get_State(STATE::LOOK); + + _vector vNewLook = XMVector3Normalize( + XMVectorLerp(vCurrentLook, vTargetLook, fTimeDelta * fSpeed) + ); + + _vector vRight = XMVector3Normalize(XMVector3Cross(XMVectorSet(0.f, 1.f, 0.f, 0.f), vNewLook)); + _vector vUp = XMVector3Normalize(XMVector3Cross(vNewLook, vRight)); + + Set_State(STATE::LOOK, vNewLook); + Set_State(STATE::RIGHT, vRight); + Set_State(STATE::UP, vUp); +} + +void CTransform::LookAt_Horizontal_Lerp(_fvector vAt, _float fTimeDelta, _float fSpeed) +{ + _vector vPos = Get_State(STATE::POSITION); + _float3 vMyPos, vTarget; XMStoreFloat3(&vMyPos, vPos); XMStoreFloat3(&vTarget, vAt); @@ -447,6 +488,13 @@ _float CTransform::TargetDis(_fvector vTarget) return dist; } +void CTransform::Add_SpeedPerSec(_float fSpeedPerSec) +{ + m_fSpeedPerSec += fSpeedPerSec; + if (m_fSpeedPerSec < 0.f) + m_fSpeedPerSec = 0.f; +} + CTransform* CTransform::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) { CTransform* pInstance = new CTransform(pDevice, pContext); diff --git a/Jusin154_Team3D/Engine/Private/UIObject.cpp b/Jusin154_Team3D/Engine/Private/UIObject.cpp index d88e3d418..cf9262857 100644 --- a/Jusin154_Team3D/Engine/Private/UIObject.cpp +++ b/Jusin154_Team3D/Engine/Private/UIObject.cpp @@ -138,6 +138,11 @@ void CUIObject::Move(_float fX, _float fY) m_fY = fY; } +_float2 CUIObject::Get_Position() +{ + return _float2(m_fX, m_fY); +} + void CUIObject::SizeUpdate(_float fSizeX, _float fSizeY) { m_fSizeX = fSizeX; @@ -513,6 +518,11 @@ const CUIObject::QUESTINFO CUIObject::Get_QuestInfo(_int Index) return QUESTINFO(); } +const CUIObject::SPELLLEARNINFO CUIObject::Get_Learninfo(_int Index) +{ + return SPELLLEARNINFO(); +} + void CUIObject::Set_FontX(_float fFontX) { m_fFontX = fFontX; diff --git a/Jusin154_Team3D/Engine/Public/Character_Controller.h b/Jusin154_Team3D/Engine/Public/Character_Controller.h index 9ffd5791a..f0c3bafaa 100644 --- a/Jusin154_Team3D/Engine/Public/Character_Controller.h +++ b/Jusin154_Team3D/Engine/Public/Character_Controller.h @@ -76,6 +76,8 @@ class ENGINE_DLL CCharacter_Controller final : _bool IsActive() const { return m_bActive; } void SetActive(_bool bCondition) { m_bActive = bCondition; } _bool UpdateGroundByCast(_float fTimeDelta); + void Set_GravityAmount(_float Amount) { m_fGravity = Amount; } + _float Get_GravityAmount() { return m_fGravity; } private: ACTOR m_eBodyType = { ACTOR::END }; diff --git a/Jusin154_Team3D/Engine/Public/Engine_Enum.h b/Jusin154_Team3D/Engine/Public/Engine_Enum.h index 7989b842c..165a1c369 100644 --- a/Jusin154_Team3D/Engine/Public/Engine_Enum.h +++ b/Jusin154_Team3D/Engine/Public/Engine_Enum.h @@ -130,7 +130,7 @@ enum class PXOBJECT : _uint { GOBLIN_THEIF, TROLL, PENSIVE_GUARDIAN, - RANRAK, + RANROK, #pragma endregion #pragma region HOSTILE_HITBOX diff --git a/Jusin154_Team3D/Engine/Public/Engine_Macro.h b/Jusin154_Team3D/Engine/Public/Engine_Macro.h index 8a05494c6..523d96f33 100644 --- a/Jusin154_Team3D/Engine/Public/Engine_Macro.h +++ b/Jusin154_Team3D/Engine/Public/Engine_Macro.h @@ -47,7 +47,7 @@ #undef ASSERT_INHYUK #define ASSERT_INHYUK(expression) assert(expression) //#undef OPTIONAL_TRUE_KEYINPUTGUICHECK -#define OPTIONAL_TRUE_KEYINPUTGUICHECK ||true +//#define OPTIONAL_TRUE_KEYINPUTGUICHECK || true #endif diff --git a/Jusin154_Team3D/Engine/Public/GameInstance.h b/Jusin154_Team3D/Engine/Public/GameInstance.h index d5e0349ce..45785c6e3 100644 --- a/Jusin154_Team3D/Engine/Public/GameInstance.h +++ b/Jusin154_Team3D/Engine/Public/GameInstance.h @@ -123,6 +123,7 @@ class ENGINE_DLL CGameInstance final : public CBase POINT Get_MouseViewPortPos(); _bool Toggle_MouseCenter(); _float3 Get_MouseMove(); + _long Get_DIMouseMove(MOUSEMOVESTATE eMouseState); void Picking(); HRESULT Ray_WorldToLocal(_fmatrix* InvWorldMatrix); _bool MousePicking_InLocalSpace(const _float3& vPointA, const _float3& vPointB, const _float3& vPointC, _float3& pOut); @@ -180,7 +181,6 @@ class ENGINE_DLL CGameInstance final : public CBase HRESULT Refit_RenderTarget(class CVIBuffer_Rect* pVIBuffer, class CShader* pShader, const _wstring& wstrRenderTargetInput, const _wstring& wstrRenderTargetOutput, SHADER_PASS_DEFERRED ePass); HRESULT Finish_RenderTarget(class CVIBuffer_Rect* pVIBuffer, class CShader* pShader, const _wstring& wstrRenderTargetOriginal, const _wstring& wstrRenderTargetBloomed, SHADER_PASS_DEFERRED ePass); HRESULT Bind_CS_RenderTarget(_uint iIndex, const _wstring& strTargetTag); - _float2 Get_RenderTargetSize(const _wstring& wstrTargetKey); #ifdef _DEBUG void RenderTarget_Debuger(); HRESULT Render_RenderTarget_Debug(class CShader* pShader, class CVIBuffer_Rect* pVIBuffer); diff --git a/Jusin154_Team3D/Engine/Public/Instance_Model.h b/Jusin154_Team3D/Engine/Public/Instance_Model.h index 9e4f0c108..f2dcf34c0 100644 --- a/Jusin154_Team3D/Engine/Public/Instance_Model.h +++ b/Jusin154_Team3D/Engine/Public/Instance_Model.h @@ -61,14 +61,14 @@ class ENGINE_DLL CInstance_Model final : public CComponent _float2 vDropAttenuation = { 1.f , 1.f }; - _float fPadding0 = {}; - _float3 vPadding1 = {}; + _float2 vRotateAttenuation = {}; + _float2 vRotateAttDelay = {}; _float fSizeLerpOption = {}; _float fMoveLerpOption = {}; _bool isDetphCompareStop = {}; - _bool isPadding0 = {}; + _bool isNoPos = {}; _float3 vVelocityMin = {}; _float3 vVelocityMax = {}; @@ -176,7 +176,7 @@ class ENGINE_DLL CInstance_Model final : public CComponent _int isMoveUp = {}; _int isExcludePos = {}; _int isStop_Move_For_Depth_Compare = {}; - _int isPadding2 = {}; + _int isNoPos = {}; _float fTimeDelta = {}; _float fSizeLerpOption = {}; @@ -231,6 +231,8 @@ class ENGINE_DLL CInstance_Model final : public CComponent _float fAcceleration = {}; _bool isStop = {}; + _float fRotateAttenuation = {}; + _float fRotateAttDelay = {}; }CS_PARTICLE_VALUE_DESC; diff --git a/Jusin154_Team3D/Engine/Public/Key_Manager.h b/Jusin154_Team3D/Engine/Public/Key_Manager.h index 17df151dd..fdb7cee95 100644 --- a/Jusin154_Team3D/Engine/Public/Key_Manager.h +++ b/Jusin154_Team3D/Engine/Public/Key_Manager.h @@ -1,4 +1,4 @@ -#pragma once +#pragma once #include "Base.h" @@ -13,19 +13,19 @@ class CKey_Manager final : public CBase public: /* Keyboard */ - // ²Ú ´©¸¦ ¶§ + // 꾹 누를 때 _bool Key_Pressing(int _iKey) const; - // ´­·¶´ٰ¡ ¶ÃÀ» ¶§ + // 눌렀다가 뗐을 때 _bool Key_Up(int _iKey) const; - // ´©¸¥ ŸÀ̹Ö µü ÇÑ ¹ø ¸¸ + // 누른 타이밍 딱 한 번 만 _bool Key_Down(int _iKey) const; /* Mouse */ - // ²Ú ´©¸¦ ¶§ + // 꾹 누를 때 _bool Mouse_Pressing(int _iKey) const; - // ´­·¶´ٰ¡ ¶ÃÀ» ¶§ + // 눌렀다가 뗐을 때 _bool Mouse_Up(int _iKey) const; - // ´©¸¥ ŸÀ̹Ö µü ÇÑ ¹ø ¸¸ + // 누른 타이밍 딱 한 번 만 _bool Mouse_Down(int _iKey) const; _bool Mouse_StartMove() const; @@ -33,6 +33,11 @@ class CKey_Manager final : public CBase _bool Mouse_StopMove() const; _float3 Get_MouseMove() const; + _long Get_DIMouseMove(MOUSEMOVESTATE eMouseState) + { + return *((reinterpret_cast<_int*>(&m_tNewMouseState)) + static_cast<_uint>(eMouseState)); + } + void Update(); private: LPDIRECTINPUT8 m_pInputSDK = { nullptr }; @@ -48,7 +53,6 @@ class CKey_Manager final : public CBase DIMOUSESTATE2 m_tOldMouseState = {}; DIMOUSESTATE2 m_tNewMouseState = {}; - private: HRESULT Initialize(HINSTANCE hInst, HWND hWnd); @@ -58,4 +62,4 @@ class CKey_Manager final : public CBase virtual void Free() override; }; -NS_END \ No newline at end of file +NS_END diff --git a/Jusin154_Team3D/Engine/Public/RenderTarget.h b/Jusin154_Team3D/Engine/Public/RenderTarget.h index 00abc3ec4..4c9d22439 100644 --- a/Jusin154_Team3D/Engine/Public/RenderTarget.h +++ b/Jusin154_Team3D/Engine/Public/RenderTarget.h @@ -22,7 +22,6 @@ class CRenderTarget final : public CBase void Copy_ResourceFrom(ID3D11Texture2D* pTexture2D); void Copy_ResourceFrom(const CRenderTarget& Target); void Get_TextureDesc(D3D11_TEXTURE2D_DESC& Desc); - _float2 Get_TargetSize() { return m_vTargetSize; }; #ifdef _DEBUG public: @@ -45,7 +44,6 @@ class CRenderTarget final : public CBase private: _float4x4 m_WorldMatrix = {}; _point m_ptWindowSize = {}; - _float2 m_vTargetSize = {}; _bool m_isDraw = { false }; #endif diff --git a/Jusin154_Team3D/Engine/Public/RenderTarget_Manager.h b/Jusin154_Team3D/Engine/Public/RenderTarget_Manager.h index f8f42c8af..2da01ffb3 100644 --- a/Jusin154_Team3D/Engine/Public/RenderTarget_Manager.h +++ b/Jusin154_Team3D/Engine/Public/RenderTarget_Manager.h @@ -29,7 +29,6 @@ class CRenderTarget_Manager final : public CBase // 랜더 타겟의 크기를 dest로 다시 맞춤 HRESULT Refit_RenderTarget(class CVIBuffer_Rect* pVIBuffer, class CShader* pShader, const _wstring& wstrRenderTargetInput, const _wstring& wstrRenderTargetOutput, SHADER_PASS_DEFERRED ePass); HRESULT Finish_RenderTarget(class CVIBuffer_Rect* pVIBuffer, class CShader* pShader, const _wstring& wstrRenderTargetOriginal, const _wstring& wstrRenderTargetBloomed, SHADER_PASS_DEFERRED ePass); - _float2 Get_RenderTargetSize(const _wstring& wstrRenderTargetOriginal); #ifdef _DEBUG public: diff --git a/Jusin154_Team3D/Engine/Public/State.h b/Jusin154_Team3D/Engine/Public/State.h index 281194e38..b6ac81f1a 100644 --- a/Jusin154_Team3D/Engine/Public/State.h +++ b/Jusin154_Team3D/Engine/Public/State.h @@ -10,8 +10,8 @@ enum ESTATE JOG,JOG_START, JOG_FWD, JOG_RIGHT, JOG_LEFT, JOG_BWD, JOG_STOP, JOG_AIM_LEFT, JOG_AIM_RIGHT, JOG_AIM_BWD, JOG_AIM_STOP_L, JOG_AIM_STOP_R, JOG_AIM_STOP_BWD,JOG_LEFT_TURN,JOG_RIGHT_TURN,JOG_112_L,JOG_112_R,JOG_90_L,JOG_90_R, SPRINT, SLIDE_START_R,SLIDE_LOOP_R,SLIDE_STOP_R, - JUMP,JUMP_JOG,JUMP_SPRINT, - LAND, + JUMP,JUMP_JOG,JUMP_SPRINT,FALL_LOOP, + LAND,LAND_TO_JOG,LAND_TO_SPRINT, DODGE,DODGE_BLINK, DODGE_LEFT, DODGE_RIGHT, COMBAT, SKILL, SKILL2, SPELL, SPELL_180_R, SPELL_90_L, @@ -45,6 +45,7 @@ enum ESTATE PULSE, GROUND_SWIPE_L,GROUND_SWIPE_R, TUCKED,FLY_TO_HOVER, + FIREBURST_REEL, ////////////////////////// 빗자루 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, /// //////////////////////////// diff --git a/Jusin154_Team3D/Engine/Public/Trail.h b/Jusin154_Team3D/Engine/Public/Trail.h index d6b3a8314..89c34c30b 100644 --- a/Jusin154_Team3D/Engine/Public/Trail.h +++ b/Jusin154_Team3D/Engine/Public/Trail.h @@ -30,6 +30,7 @@ class ENGINE_DLL CTrail final : public: void Rope_Trail_Update(_fmatrix WorldMatrix, _float fTimeDelta , _float fDamping, _float fLength, _float fMass, _fmatrix EndWorldMatrix); + void Rope_Trail_Update(_fmatrix WorldMatrix, _float fTimeDelta, _float fDamping, _float fLength, _float fMass); void Rope_Fix(_bool isFix) { m_isFix = isFix; } private: virtual HRESULT Initialize_Prototype() override; diff --git a/Jusin154_Team3D/Engine/Public/Transform.h b/Jusin154_Team3D/Engine/Public/Transform.h index c876d9e03..a6bafbad2 100644 --- a/Jusin154_Team3D/Engine/Public/Transform.h +++ b/Jusin154_Team3D/Engine/Public/Transform.h @@ -53,6 +53,8 @@ class ENGINE_DLL CTransform final : void Move_Right(_float fScala); /////////////////////////////////// _vector Go_LerpStraight(_float fSpeed, _float fTimeDelta); + _vector Go_LerpLeft(_float fSpeed, _float fTimeDelta); + _vector Go_LerpRight(_float fSpeed, _float fTimeDelta); _vector Go_LerpUp(_float fSpeed, _float fTimeDelta); _vector Go_LerpDown(_float fSpeed, _float fTimeDelta); @@ -77,9 +79,13 @@ class ENGINE_DLL CTransform final : // Up, Down 벡터를 바라보게 하면 터짐, w에 1 있어야함 void LookAt(_fvector vAt); void LookAt_Lerp(_fvector vAt, _float fTimeDelta, _float fSpeed); + void LookAt_Horizontal_Lerp(_fvector vAt, _float fTimeDelta, _float fSpeed); void LookAt_Horizontal(_fvector vAt); _float TargetDis(_fvector vTarget); + + void Add_SpeedPerSec(_float fSpeedPerSec); + private: _float m_fSpeedPerSec = {}; _float m_fRotationPerSec = {}; diff --git a/Jusin154_Team3D/Engine/Public/UIObject.h b/Jusin154_Team3D/Engine/Public/UIObject.h index cbd2bff11..b2104dc38 100644 --- a/Jusin154_Team3D/Engine/Public/UIObject.h +++ b/Jusin154_Team3D/Engine/Public/UIObject.h @@ -74,6 +74,15 @@ typedef struct tagCurrentQeustSerectInfo _int iQuestIndex{}; }CURRENTQUESTSECETINFO; +typedef struct tagSpellLearnInfo +{ + _wstring pSpellName{}; + _wstring pImageName{}; + _float fSpellSize{}; + _float2 fStartPosition{}; + vector<_vector> Lines; +}SPELLLEARNINFO; + protected: CUIObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); CUIObject(const CUIObject& rhs); @@ -90,6 +99,7 @@ typedef struct tagCurrentQeustSerectInfo virtual void MoveX(_float fX); virtual void MoveY(_float fY); virtual void Move(_float fX, _float fY); + virtual _float2 Get_Position(); virtual void SizeUpdate(_float fSizeX, _float fSizeY); virtual void SizeUpX(_float fSizeX); virtual void SizeUpY(_float fSizeY); @@ -175,6 +185,7 @@ typedef struct tagCurrentQeustSerectInfo virtual const SPELLINFO Get_Info(_int Index); virtual const QUESTINFO Get_QuestInfo(_int Index); + virtual const SPELLLEARNINFO Get_Learninfo(_int Index); virtual void Set_FontX(_float fFontX); virtual void Set_FontY(_float fFontY);