diff --git a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl index 37238d940..e0f824a57 100644 --- a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl +++ b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl @@ -1097,6 +1097,7 @@ PS_OUT PS_Spell_Header(PS_IN In) return Out; } + PS_OUT PS_Spell_Header_Line(PS_IN In) { PS_OUT Out; @@ -1159,6 +1160,39 @@ PS_OUT PS_Spell_Header_Line(PS_IN In) return Out; } +PS_OUT PS_Spell_Drag(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 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord); + float4 tex2 = g_Texture1.Sample(DefaultSampler, In.vTexcoord); + float4 tex2Color = g_Texture3.Sample(DefaultSampler, In.vTexcoord); + + Color = tex1; + tex2.rgb = tex2Color; + + Color = lerp(Color, tex2, tex2.a); + + float2 Imagetexpos1 = g_fImageUV.xy / g_fCurrent_Size; + float2 Imagetexsize1 = g_fImageUV.zw / g_fCurrent_Size; + float2 Imagelocal = (In.vTexcoord - Imagetexpos1) / Imagetexsize1; + bool inside1 = all(Imagelocal >= 0.0f && Imagelocal <= 1.0f); + float4 tex3 = g_Texture2.Sample(DefaultSampler, In.vTexcoord); + + if (inside1) + { + Color = lerp(Color, tex3, tex3.a); + } + + Color.a *= Alpha; + + Out.vColor = Color; + + return Out; +} + technique11 PosTexTechnique11 { pass Default @@ -1389,4 +1423,14 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Spell_Header_Line(); } + pass Spell_Drag + { + SetRasterizerState(RS_Default); + SetDepthStencilState(DSS_Default, 0); + SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_Spell_Drag(); + } + } diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj index 2160d16e0..f1cdbb10a 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj @@ -160,13 +160,23 @@ call Update_Resources.bat + + + + + + + + + + @@ -229,9 +239,21 @@ call Update_Resources.bat + + + + + + + + + + + + @@ -253,13 +275,23 @@ call Update_Resources.bat + + + + + + + + + + @@ -324,9 +356,21 @@ call Update_Resources.bat + + + + + + + + + + + + diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters index 71c636150..1bee452e8 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters @@ -184,9 +184,6 @@ 02.GameObjects\Environment\Terrain - - 02.GameObjects\UI - 02.GameObjects\UI\GamePlay_Canvas\Loding_Panel\LoadingWidget @@ -260,7 +257,16 @@ 04.Mechanic\Skill\Skill_Data - 02.GameObjects\Effect\Revelio + 02.GameObjects\Effect\Effects\Revelio + + + 02.GameObjects\Effect\Effects\NomalJap\NomalJapSide + + + 02.GameObjects\Effect\Effects\Levioso + + + 02.GameObjects\Effect\Effects\Lumos 02.GameObjects\Monster\Troll @@ -268,6 +274,66 @@ 02.GameObjects\Item\Troll_Weapon + + 02.GameObjects\Effect\Effects\Levioso\LeviosoSide + + + 02.GameObjects\Effect\Effects\Decendo\DecendoSide + + + 02.GameObjects\Effect\Effects\Bombard\BombardSide + + + 02.GameObjects\UI\GamePlay_Canvas + + + 02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Vidio_Border + + + 02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_State + + + 02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Preview + + + 02.GameObjects\UI\Spell_Canvas\Spell_Panel + + + 02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_List_Image + + + 02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_List + + + 02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Hover_Effect + + + 02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Hover + + + 02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Header_Line + + + 02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Header + + + 02.GameObjects\UI\Spell_Canvas + + + 02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Anim + + + 02.GameObjects\UI\Spell_Canvas\Spell_Panel\Eessential_Spell_Slot + + + 02.GameObjects\UI\Spell_Canvas\Spell_Panel\Eessential_Spell + + + 02.GameObjects\UI\Spell_Canvas\Spell_Panel\Current_Spell_Slot + + + 02.GameObjects\UI\Spell_Canvas\Spell_Panel\Current_Slot_Number + 02.GameObjects\Environment\03.MapElement @@ -581,9 +647,15 @@ {e12a4228-0754-4217-b65d-7f962409f85c} - + {19a2325e-1184-4ee0-92e1-657bf184418c} + + {b982d9d6-7561-43d4-b542-88483119047b} + + + {6bc9fd95-31bc-40f3-83cc-15ebb756b04a} + {c5b61cb3-bc5f-4429-8715-b309dcf054b2} @@ -608,6 +680,69 @@ {1d6c078d-dddd-493d-a6f0-f2cac2e4107e} + + {d260ec7e-150c-4a25-8e25-83eb141652bc} + + + {dc00cfd8-105f-419f-a4e4-109096258347} + + + {1cb823f5-a6fe-4bef-9292-b49480a42524} + + + {b6076bdb-df15-498f-b951-6b2d0b777a0b} + + + {257a5a09-b15b-4fd2-9615-054a00cf4b25} + + + {978f1d19-2da4-48fe-ad5e-2622b0c668a5} + + + {8c3162f4-bb70-443f-901d-61d194972ccc} + + + {fa8badcc-02d7-4e2f-bd3d-5689cb13629c} + + + {5519da22-ce61-4c5c-91fc-44859d126f26} + + + {1584a13f-7fd5-413c-9b6b-11f07b50bf58} + + + {378ce73b-f242-470c-8737-9a54b967bfd8} + + + {1f768f30-3484-4ce8-9bef-be71c043f229} + + + {6f8a7e8c-2b91-44c7-89c0-8da07283e656} + + + {f0dcd3f2-2f47-4867-8f7a-27283d7f012f} + + + {3db1d2a8-b9f2-4585-b044-49e38edf68b6} + + + {294d9db3-97d6-47a9-9087-adb17525d6ec} + + + {3819fb90-dbd9-4465-a12e-bac7ba19c7d7} + + + {8628d773-0dcf-48e4-8c51-eca66e7f8d1e} + + + {ee8108db-4fe3-4ed7-ac2a-156e2b22591e} + + + {e24f4ced-ec48-46dd-b52f-3eb4b0d9588f} + + + {00b37924-ab02-4287-b67e-80375a8d3268} + @@ -787,9 +922,6 @@ 02.GameObjects\UI\GamePlay_Canvas\Loding_Panel\LoadingWidget - - 02.GameObjects\UI - 02.GameObjects\UI\GamePlay_Canvas\Action_Panel @@ -857,7 +989,16 @@ 02.GameObjects\Environment\00.MapContainer\StreetContainer - 02.GameObjects\Effect\Revelio + 02.GameObjects\Effect\Effects\Revelio + + + 02.GameObjects\Effect\Effects\NomalJap\NomalJapSide + + + 02.GameObjects\Effect\Effects\Levioso + + + 02.GameObjects\Effect\Effects\Lumos 04.Mechanic\Skill\Skill_Data @@ -883,6 +1024,66 @@ 02.GameObjects\Item\Troll_Weapon + + 02.GameObjects\Effect\Effects\Levioso\LeviosoSide + + + 02.GameObjects\Effect\Effects\Decendo\DecendoSide + + + 02.GameObjects\Effect\Effects\Bombard\BombardSide + + + 02.GameObjects\UI\GamePlay_Canvas + + + 02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Vidio_Border + + + 02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_State + + + 02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Preview + + + 02.GameObjects\UI\Spell_Canvas\Spell_Panel + + + 02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_List_Image + + + 02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_List + + + 02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Hover_Effect + + + 02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Hover + + + 02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Header_Line + + + 02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Header + + + 02.GameObjects\UI\Spell_Canvas + + + 02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Anim + + + 02.GameObjects\UI\Spell_Canvas\Spell_Panel\Eessential_Spell_Slot + + + 02.GameObjects\UI\Spell_Canvas\Spell_Panel\Eessential_Spell + + + 02.GameObjects\UI\Spell_Canvas\Spell_Panel\Current_Spell_Slot + + + 02.GameObjects\UI\Spell_Canvas\Spell_Panel\Current_Slot_Number + diff --git a/Jusin154_Team3D/Client/Private/Bombard.cpp b/Jusin154_Team3D/Client/Private/Bombard.cpp index 8fb9d462b..db881416e 100644 --- a/Jusin154_Team3D/Client/Private/Bombard.cpp +++ b/Jusin154_Team3D/Client/Private/Bombard.cpp @@ -4,7 +4,8 @@ #include "GameInstance.h" #include "EffectParts.h" #include "PhysXEffectHitBox.h" - +#include "Wand.h" +#include "Player.h" CBombard::CBombard(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) : CEffect_Container{ pDevice, pContext } @@ -50,6 +51,7 @@ void CBombard::Priority_Update(_float fTimeDelta) { __super::Priority_Update(fTimeDelta); + XMStoreFloat4(&m_vStartPos, m_pLight_Projectile->Get_WorldPostion()); } void CBombard::Update(_float fTimeDelta) @@ -61,9 +63,18 @@ void CBombard::Update(_float fTimeDelta) Update_Event(fTimeDelta); - _vector vOwnerLook = m_pOwner->Get_Component()->Get_State(STATE::LOOK); + CTransform* pPJTransform = m_pLight_Projectile->Get_Component(); + + pPJTransform->Translation(m_vCameraLook * 2.f); + + + + if (true == m_pGameInstance->SphereCast(0.125f, XMLoadFloat4(&m_vStartPos), m_vCameraLook, XMVectorGetX(XMVector3Length(m_vCameraLook * 2.f)) + , PSX::PxHitFlag::ePOSITION | PSX::PxHitFlag::eNORMAL, PSX::PxQueryFlag::eSTATIC, hitBuffer)) + { + OnCollision(); + } - m_pLight_Projectile->Get_Component()->Translation(vOwnerLook * 2.f); } void CBombard::Late_Update(_float fTimeDelta) @@ -72,6 +83,8 @@ void CBombard::Late_Update(_float fTimeDelta) return; __super::Late_Update(fTimeDelta); + + XMStoreFloat4(&m_vEndPos, m_pLight_Projectile->Get_WorldPostion()); } @@ -91,15 +104,20 @@ HRESULT CBombard::Pre_Setting(CGameObject* pObject) __super::m_fAccTime = 0.f; m_fPreAccTime = 0.f; + CWand* pWand = static_cast(m_pOwner)->Get_PartObject(); + + if (pWand == nullptr) + return E_FAIL; CPartObject* pShootPt = Get_PartObject("Bombard_Shoot_Pt"); - CPartObject* pCircle0 = Get_PartObject("Bombard_Circle0"); - pShootPt->Get_Component()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion()); - m_pLight_Projectile->Get_Component()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion()); - pCircle0->Get_Component()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion()); + m_vCameraLook = m_pOwner->Get_Component()->Get_State(STATE::LOOK); + + pShootPt->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion()); + m_pLight_Projectile->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion()); + pCircle0->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion()); pCircle0->Set_Visible(true); pShootPt->Set_Visible(true); @@ -124,32 +142,6 @@ HRESULT CBombard::Ready_Components(void* pArg) HRESULT CBombard::Ready_Child() { - CPhysXEffectHitBox::PHYSXDUMMY_DESC Desc{}; - - m_pTransformCom->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion()); - - XMStoreFloat3(&Desc.vPos, m_pOwner->Get_WorldPostion() + XMVectorSet(0.f, 0.f, 1.f, 0.f)); - - - _vector vOwnerLook = m_pOwner->Get_Component()->Get_State(STATE::LOOK); - - _float3 vDir = {}; - - XMStoreFloat3(&Desc.vPos, m_pOwner->Get_WorldPostion() + XMVectorSet(0.f, 0.f, 1.f, 0.f)); - - XMStoreFloat3(&vDir, vOwnerLook * 2.f); - - Desc.vRotRPY = { 0.f, 0.f, 0.f }; - Desc.iSubKind = 70; - Desc.vDeltaPos = vDir; - Desc.vLifeTime = { 0.f, 2.f }; - - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, CURRENT_LEVEL, LAYER_HITBOX, &Desc, this, &m_pPhysHitBox))) { - assert(false); - return E_FAIL; - } - - SAFE_ADDREF(m_pPhysHitBox); return S_OK; } @@ -183,15 +175,16 @@ CGameObject* CBombard::Clone(void* pArg, CGameObject* pOwner) void CBombard::OnCollision(CGameObject* pOther, void* pDesc) { //CTransform* pOtherTransform = p - ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc); + + _vector vPos = XMVectorSet(hitBuffer.block.position.x, hitBuffer.block.position.y, hitBuffer.block.position.z, 1.f); + for (auto& pPair : m_PartObjects) { pPair.second->Set_Visible(true); - pPair.second->Get_Component()->Set_State(STATE::POSITION, CollisionDesc->vWorldPos); + pPair.second->Get_Component()->Set_State(STATE::POSITION, vPos); } - m_pLight_Projectile->Set_Visible(false); Get_PartObject("Bombard_Shoot_Pt")->Set_Visible(false); @@ -200,18 +193,12 @@ void CBombard::OnCollision(CGameObject* pOther, void* pDesc) Get_PartObject("Bombard_Circle0")->Set_Visible(false); - - m_pPhysHitBox->Set_Dead(); - SAFE_RELEASE(m_pPhysHitBox); } void CBombard::Free() { __super::Free(); - if (m_pPhysHitBox != nullptr) - SAFE_RELEASE(m_pPhysHitBox); - SAFE_RELEASE(m_pLight_Projectile); } diff --git a/Jusin154_Team3D/Client/Private/BombardSide.cpp b/Jusin154_Team3D/Client/Private/BombardSide.cpp new file mode 100644 index 000000000..188e867e4 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/BombardSide.cpp @@ -0,0 +1,205 @@ +#include "pch.h" +#include "BombardSide.h" + +#include "GameInstance.h" +#include "EffectParts.h" +#include "Player.h" +#include "Wand.h" +#include "TrailObject.h" + + +CBombardSide::CBombardSide(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CEffect_Container{ pDevice, pContext } +{ +} + +CBombardSide::CBombardSide(const CBombardSide& rhs) + : CEffect_Container(rhs) +{ +} + +HRESULT CBombardSide::Initialize_Prototype() +{ + + return S_OK; + +} + +HRESULT CBombardSide::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/BombardaSide"))) + return E_FAIL; + + m_wstrEffectName = L"BombardSide"; + + + m_pWandParticle = Get_PartObject("WandParticle_B_100"); + m_pWandLight = Get_PartObject("Wand_Light_B"); + m_pWandTrail = Get_PartObject(); + + SAFE_ADDREF(m_pWandLight); + SAFE_ADDREF(m_pWandTrail); + SAFE_ADDREF(m_pWandParticle); + + m_fDuration = 1.f; + + m_Events.emplace(0.4f, [&](){ + m_pWandTrail->Set_Visible(false); + }); + + return S_OK; +} + +void CBombardSide::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); + +} + +void CBombardSide::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()); + + m_pWandTrail->Get_Component()->Trail_Update(fTimeDelta, pWand->Get_WorldMatrix()); + m_pWandParticle->Get_Component()->Set_WorldMatrix(pWand->Get_WorldMatrix()); + +} + +void CBombardSide::Late_Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Late_Update(fTimeDelta); + + +} + +HRESULT CBombardSide::Pre_Setting(CGameObject* pObject) +{ + if (pObject == nullptr) + return E_FAIL; + + m_pOwner = pObject; + + Reset_EffectParts(); + + m_fAccTime = 0.f; + __super::m_fAccTime = 0.f; + m_fPreAccTime = 0.f; + + + CWand* pWand = static_cast(m_pOwner); + + if (pWand == nullptr) + return E_FAIL; + + m_pWandParticle->Set_Visible(true); + + m_pWandLight->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()); + + + m_bVisible = true; + + return S_OK; +} + +HRESULT CBombardSide::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CBombardSide::Ready_Child() +{ + return S_OK; +} + +CBombardSide* CBombardSide::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CBombardSide* pInstance = new CBombardSide(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CBombardSide"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + + +CGameObject* CBombardSide::Clone(void* pArg, CGameObject* pOwner) +{ + CBombardSide* pInstance = new CBombardSide(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CBombardSide"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CBombardSide::OnCollision(CGameObject* pOther, void* pDesc) +{ + ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc); + +} + +void CBombardSide::Free() +{ + __super::Free(); + + + Safe_Release(m_pWandLight); + Safe_Release(m_pWandTrail); + Safe_Release(m_pWandParticle); +} +#ifdef _DEBUG + +void CBombardSide::Describe_Entity() +{ + +} + +#endif // _DEBUG + +HRESULT CBombardSide::Bind_ShaderResources() +{ + return S_OK; +} + + diff --git a/Jusin154_Team3D/Client/Private/BuildingContainer.cpp b/Jusin154_Team3D/Client/Private/BuildingContainer.cpp index 0d8571861..c07d27a4e 100644 --- a/Jusin154_Team3D/Client/Private/BuildingContainer.cpp +++ b/Jusin154_Team3D/Client/Private/BuildingContainer.cpp @@ -34,15 +34,15 @@ void CBuildingContainer::Update(_float fTimeDelta) void CBuildingContainer::Late_Update(_float fTimeDelta) { - if (m_pOcclusionQueryCom->isDraw()){ + // if (m_pOcclusionQueryCom->isDraw()){ __super::Late_Update(fTimeDelta); - } + //} for (auto& pCollisiton : m_ColiisonPartObjects){ pCollisiton->Late_Update(fTimeDelta); } - m_pGameInstance->Add_RenderGroup(RENDER::OCCLUSION, this); + //m_pGameInstance->Add_RenderGroup(RENDER::OCCLUSION, this); } HRESULT CBuildingContainer::Render() diff --git a/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp b/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp index dd7935bdb..efc34983a 100644 --- a/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp +++ b/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp @@ -63,34 +63,59 @@ void CCamPosition_Shoulder::Priority_Update(_float fTimeDelta) if (FAILED(m_pGameInstance->IsBinded_Camera(CAMERA_SHOULDER))) { return; } + + if (m_pGameInstance->Key_Up(DIK_PGDN)) + { + m_bLerp = !m_bLerp; + } if (true == m_bMovable) { m_vAccDegreeXY.y += m_pGameInstance->Get_MouseMove().x * m_fMouseSensor; m_vAccDegreeXY.x += m_pGameInstance->Get_MouseMove().y * m_fMouseSensor; CMyTools::AdjustAccumulateDegreePitchYawDegree(m_vAccDegreeXY); } - m_vPosLerpTimer.x += fTimeDelta; - if (m_vPosLerpTimer.x > m_vPosLerpTimer.y) { - m_vPosLerpTimer.x = 0.f; - Start_LerpShoulderPos(); + if (m_bLerp) + { + m_vPosLerpTimer.x += fTimeDelta; + if (m_vPosLerpTimer.x > m_vPosLerpTimer.y) { + m_vPosLerpTimer.x = 0.f; + Start_LerpShoulderPos(); + } + _vector vShoulderPos = XMVectorLerp(XMLoadFloat4(&m_StartPos), XMLoadFloat4(&m_DestPos), (m_vPosLerpTimer.x / m_vPosLerpTimer.y)); + m_pTransformCom->Set_State(STATE::POSITION, vShoulderPos); + + _vector vRotCameraq = XMQuaternionRotationRollPitchYaw(XMConvertToRadians(m_vAccDegreeXY.x), XMConvertToRadians(m_vAccDegreeXY.y), 0.f); + _vector vCameraLook = XMVector3Normalize(XMVector3Rotate(XMVectorSet(0.f, 0.f, 1.f, 0.f), vRotCameraq)); + + CTransform* pLookTransform = m_pTarget_LookPart->Get_Component(); + CTransform* pFollowTransform = m_pTarget_FollowPart->Get_Component(); + + pLookTransform->Set_State(STATE::POSITION, vShoulderPos + vCameraLook * (m_fCameraFocalLength * m_fBackFrontRatio)); + pFollowTransform->Set_State(STATE::POSITION, vShoulderPos - vCameraLook * (m_fCameraFocalLength * (1 - m_fBackFrontRatio))); } - _vector vShoulderPos = XMVectorLerp(XMLoadFloat4(&m_StartPos), XMLoadFloat4(&m_DestPos), (m_vPosLerpTimer.x / m_vPosLerpTimer.y)); - m_pTransformCom->Set_State(STATE::POSITION, vShoulderPos); + else + { + _vector vLook = XMVector3Normalize(XMLoadFloat3(&m_vShoulderPosRatio)); + _vector vRotq = XMQuaternionRotationRollPitchYaw(0.f, XMConvertToRadians(m_vAccDegreeXY.y), 0.f); + vLook = XMVector3Normalize(XMVector3Rotate(vLook, vRotq)); - _vector vRotCameraq = XMQuaternionRotationRollPitchYaw(XMConvertToRadians(m_vAccDegreeXY.x), XMConvertToRadians(m_vAccDegreeXY.y), 0.f); - _vector vCameraLook = XMVector3Normalize(XMVector3Rotate(XMVectorSet(0.f, 0.f, 1.f, 0.f), vRotCameraq)); + m_pTransformCom->Set_State(STATE::POSITION, m_pParentTransformCom->Get_State(STATE::POSITION) + XMVector3Normalize(vLook) * m_fShoulderDistance); + _vector vShoulderPos = Get_WorldPostion(); + _vector vCameraLook = XMVectorSet(0.f, 0.f, 1.f, 0.f); + _vector vRotCameraq = XMQuaternionRotationRollPitchYaw(XMConvertToRadians(m_vAccDegreeXY.x), XMConvertToRadians(m_vAccDegreeXY.y), 0.f); + vCameraLook = XMVector3Normalize(XMVector3Rotate(vCameraLook, vRotCameraq)); - CTransform* pLookTransform = m_pTarget_LookPart->Get_Component(); - CTransform* pFollowTransform = m_pTarget_FollowPart->Get_Component(); + CTransform* pLookTransform = m_pTarget_LookPart->Get_Component(); + CTransform* pFollowTransform = m_pTarget_FollowPart->Get_Component(); - pLookTransform->Set_State(STATE::POSITION, vShoulderPos + vCameraLook * (m_fCameraFocalLength * m_fBackFrontRatio)); - pFollowTransform->Set_State(STATE::POSITION, vShoulderPos - vCameraLook * (m_fCameraFocalLength * (1 - m_fBackFrontRatio))); + pLookTransform->Set_State(STATE::POSITION, vShoulderPos + vCameraLook * (m_fCameraFocalLength * m_fBackFrontRatio)); + pFollowTransform->Set_State(STATE::POSITION, vShoulderPos - vCameraLook * (m_fCameraFocalLength * (1 - m_fBackFrontRatio))); + } + } void CCamPosition_Shoulder::Update(_float fTimeDelta) { - GUI::DragFloat3("Camera Shoulder Position",(_float*)&m_vShoulderPosRatio,0.01f); - GUI::DragFloat("Camera Shoulder Length",&m_fCameraFocalLength, 0.01f); if (m_pGameInstance->Key_Up(DIK_INSERT)) { m_pBinded_Camera->Toggle_Priority(); diff --git a/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp b/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp index 03e703357..122b65d28 100644 --- a/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp +++ b/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp @@ -41,7 +41,6 @@ void CCamera_Gaze::Priority_Update(_float fTimeDelta) void CCamera_Gaze::Update(_float fTimeDelta) { - GUI::Text("CAM_GAZE_PRIORITY : %d", m_iPriority); if (false == m_bActive) { return; } diff --git a/Jusin154_Team3D/Client/Private/Current_Slot_Number.cpp b/Jusin154_Team3D/Client/Private/Current_Slot_Number.cpp new file mode 100644 index 000000000..62b9c3fee --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Current_Slot_Number.cpp @@ -0,0 +1,280 @@ +#include "pch.h" +#include "Current_Slot_Number.h" +#include "GameInstance.h" + +CCurrent_Slot_Number::CCurrent_Slot_Number(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CCurrent_Slot_Number::CCurrent_Slot_Number(const CCurrent_Slot_Number& rhs) + :CElementObject(rhs) +{ +} + +HRESULT CCurrent_Slot_Number::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CCurrent_Slot_Number::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 0.f; + Desc.fY = 0.f; + Desc.fSizeX = 35.f; + Desc.fSizeY = 35.f; + + m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) }; + + if (FAILED(__super::Initialize(&Desc))) + { + return E_FAIL; + } + if (FAILED(Ready_Components(pArg))) + { + return E_FAIL; + } + m_fAlpha = 1.f; + m_fTimeMult = 3.f; + m_fAlphaTime = 1.f; + m_fOffSetX = 105.f; + m_fOffSetY = 101.f; + m_iCols = 4; + UV(); + m_pVIBufferCom->Set_Cloned(true); + m_pVIBufferCom->Set_Pos(-805.f, 380.f, m_fOffSetX, m_fOffSetY, m_iCols); + m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); + m_pVIBufferCom->Set_ImageUV(pUVDesc); + return S_OK; +} + +void CCurrent_Slot_Number::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CCurrent_Slot_Number::Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + + if (m_bFadeIn == true) + { + if (m_fAlpha <= 1.f) + m_fAlpha += fTimeDelta * m_fAlphaTime; + + if (m_fAlpha >= 1.f) + { + m_bFadeIn = false; + m_fAlpha = 1.f; + } + } + + if (m_bFadeOut == true) + { + if (m_fAlpha >= 0.f) + m_fAlpha -= fTimeDelta; + + if (m_fAlpha <= 0.f) + { + m_bFadeOut = false; + m_fAlpha = 0.f; + } + } + m_fTime += fTimeDelta * m_fTimeMult; + __super::Update(fTimeDelta); +} + +void CCurrent_Slot_Number::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) + { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + } + __super::Late_Update(fTimeDelta); +} + +HRESULT CCurrent_Slot_Number::Render() +{ + if (FAILED(Bind_ShaderResources())) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ALPHABLEND)))) + { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) + { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) + { + return E_FAIL; + } + + return S_OK; +} + +_vector CCurrent_Slot_Number::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +void CCurrent_Slot_Number::SizeUpX(_float fSizeX) +{ + m_fSizeX = fSizeX; + m_pVIBufferCom->Set_SizeX(m_fSizeX); +} + +void CCurrent_Slot_Number::SizeUpY(_float fSizeY) +{ + m_fSizeY = fSizeY; + m_pVIBufferCom->Set_SizeY(m_fSizeY); +} + +void CCurrent_Slot_Number::SizeUpdate(_float fSizeX, _float fSizeY) +{ + m_fSizeX = fSizeX; + m_fSizeY = fSizeY; + m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); +} + +HRESULT CCurrent_Slot_Number::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_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 CCurrent_Slot_Number::Ready_Components(void* pArg) +{ + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Slot_Number_UI_Instance"), (CComponent**)&m_pVIBufferCom, nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_Atlas_Number"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIINSTANCE, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + + return S_OK; +} + +void CCurrent_Slot_Number::UV() +{ + pUVDesc[0].fUV = Meter_Index(1); + pUVDesc[1].fUV = Meter_Index(2); + pUVDesc[2].fUV = Meter_Index(3); + pUVDesc[3].fUV = Meter_Index(4); +} + +_float4 CCurrent_Slot_Number::Meter_Index(_uint Number) +{ + m_fIamge_Size = { 320.f, 128.f }; + + _uint iXCount = 5; + _uint iYCount = 2; + + _float frameWidth = 64.f; + _float frameHeight = 64.f; + + _uint frameX = Number % iXCount; + _uint frameY = Number / iXCount; + + _float4 UV; + UV.x = frameX * frameWidth / m_fIamge_Size.x; + UV.y = frameY * frameHeight / m_fIamge_Size.y; + UV.z = UV.x + (frameWidth / m_fIamge_Size.x); + UV.w = UV.y + (frameHeight / m_fIamge_Size.y); + + return UV; +} + +CCurrent_Slot_Number* CCurrent_Slot_Number::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CCurrent_Slot_Number* pInstance = new CCurrent_Slot_Number(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CCurrent_Slot_Number"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CCurrent_Slot_Number::Clone(void* pArg, CGameObject* pOwner) +{ + CCurrent_Slot_Number* pInstance = new CCurrent_Slot_Number(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CSlot_Number"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CCurrent_Slot_Number::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +#ifdef _DEBUG +void CCurrent_Slot_Number::Describe_Entity() +{ +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Current_Spell_Slot.cpp b/Jusin154_Team3D/Client/Private/Current_Spell_Slot.cpp new file mode 100644 index 000000000..7828ca304 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Current_Spell_Slot.cpp @@ -0,0 +1,254 @@ +#include "pch.h" +#include "Current_Spell_Slot.h" +#include "GameInstance.h" + +CCurrent_Spell_Slot::CCurrent_Spell_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CCurrent_Spell_Slot::CCurrent_Spell_Slot(const CCurrent_Spell_Slot& rhs) + :CElementObject(rhs) +{ +} + +HRESULT CCurrent_Spell_Slot::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CCurrent_Spell_Slot::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 0.f; + Desc.fY = 0.f; + Desc.fSizeX = 105.f; + Desc.fSizeY = 105.f; + + m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) }; + + if (FAILED(__super::Initialize(&Desc))) + { + return E_FAIL; + } + if (FAILED(Ready_Components(pArg))) + { + return E_FAIL; + } + + m_fAlpha = 1.f; + m_fTimeMult = 3.f; + m_fAngle = XMConvertToRadians(-135); + m_fAlphaTime = 1.f; + m_fOffSetX = 105.f; + m_fOffSetY = 150.f; + m_iCols = 4; + m_pVIBufferCom->Set_Cloned(true); + m_pVIBufferCom->Set_Pos(-780.f, 340.f, m_fOffSetX, m_fOffSetY, m_iCols); + m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); + return S_OK; +} + +void CCurrent_Spell_Slot::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CCurrent_Spell_Slot::Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + + if (m_bFadeIn == true) + { + if (m_fAlpha <= 1.f) + m_fAlpha += fTimeDelta * m_fAlphaTime; + + if (m_fAlpha >= 1.f) + { + m_bFadeIn = false; + m_fAlpha = 1.f; + } + } + + if (m_bFadeOut == true) + { + if (m_fAlpha >= 0.f) + m_fAlpha -= fTimeDelta; + + if (m_fAlpha <= 0.f) + { + m_bFadeOut = false; + m_fAlpha = 0.f; + } + } + m_fTime += fTimeDelta * m_fTimeMult; + __super::Update(fTimeDelta); +} + +void CCurrent_Spell_Slot::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) + { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + } + __super::Late_Update(fTimeDelta); +} + +HRESULT CCurrent_Spell_Slot::Render() +{ + if (FAILED(Bind_ShaderResources())) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIINTANCE::DEFAULT)))) + { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) + { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) + { + return E_FAIL; + } + + return S_OK; +} + +_vector CCurrent_Spell_Slot::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +void CCurrent_Spell_Slot::SizeUpX(_float fSizeX) +{ + m_fSizeX = fSizeX; + m_pVIBufferCom->Set_SizeX(m_fSizeX); +} + +void CCurrent_Spell_Slot::SizeUpY(_float fSizeY) +{ + m_fSizeY = fSizeY; + m_pVIBufferCom->Set_SizeY(m_fSizeY); +} + +void CCurrent_Spell_Slot::SizeUpdate(_float fSizeX, _float fSizeY) +{ + m_fSizeX = fSizeX; + m_fSizeY = fSizeY; + m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); +} + +HRESULT CCurrent_Spell_Slot::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_fAngle", &m_fAngle, 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 CCurrent_Spell_Slot::Ready_Components(void* pArg) +{ + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_UI_Current_Spell_Slot"), (CComponent**)&m_pVIBufferCom, nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_ActionItemGoldleaf_4K"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIINSTANCE, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + + return S_OK; +} + +CCurrent_Spell_Slot* CCurrent_Spell_Slot::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CCurrent_Spell_Slot* pInstance = new CCurrent_Spell_Slot(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CCurrent_Spell_Slot"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CCurrent_Spell_Slot::Clone(void* pArg, CGameObject* pOwner) +{ + CCurrent_Spell_Slot* pInstance = new CCurrent_Spell_Slot(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CSpell_Slot"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CCurrent_Spell_Slot::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +#ifdef _DEBUG +void CCurrent_Spell_Slot::Describe_Entity() +{ +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Decendo.cpp b/Jusin154_Team3D/Client/Private/Decendo.cpp index 845818acd..faa571951 100644 --- a/Jusin154_Team3D/Client/Private/Decendo.cpp +++ b/Jusin154_Team3D/Client/Private/Decendo.cpp @@ -6,6 +6,9 @@ #include "PhysXEffectHitBox.h" #include "TrailObject.h" +#include "Wand.h" +#include "Player.h" + CDecendo::CDecendo(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) : CEffect_Container{ pDevice, pContext } @@ -53,11 +56,7 @@ void CDecendo::Priority_Update(_float fTimeDelta) { __super::Priority_Update(fTimeDelta); - - if (nullptr != m_pPhysHitBox) { - m_pPhysHitBox->Get_Component()->RewindMomentum(); - } - + XMStoreFloat4(&m_vStartPos, m_pProjectile->Get_WorldPostion()); } void CDecendo::Update(_float fTimeDelta) @@ -73,11 +72,6 @@ void CDecendo::Update(_float fTimeDelta) m_pProjectile->Get_Component()->Translation(m_vCameraLook * 0.5f); - if (nullptr != m_pPhysHitBox) { - m_pPhysHitBox->Get_Component()->AccumulateMomentum(m_vCameraLook * 0.5f); - } - - if (m_fAccTime > XM_2PI) return; @@ -86,9 +80,14 @@ void CDecendo::Update(_float fTimeDelta) m_pProjectile_Blur->Get_Component()->Translation(m_vRotateUp * 0.2f * sinf(m_fAccTime)); m_pProjectile->Get_Component()->Translation(m_vRotateUp * 0.2f * sinf(m_fAccTime)); - if (nullptr != m_pPhysHitBox) { - m_pPhysHitBox->Get_Component()->AccumulateMomentum(m_vRotateUp * 0.2f * sinf(m_fAccTime)); + + //TODO : 다시 위치 잡기 + if (true == m_pGameInstance->SphereCast(0.125f, XMLoadFloat4(&m_vStartPos), m_vCameraLook, XMVectorGetX(XMVector3Length(m_vCameraLook * 0.5f)) + , PSX::PxHitFlag::ePOSITION | PSX::PxHitFlag::eNORMAL, PSX::PxQueryFlag::eSTATIC, hitBuffer)) + { + OnCollision(); } + } void CDecendo::Late_Update(_float fTimeDelta) @@ -98,6 +97,8 @@ void CDecendo::Late_Update(_float fTimeDelta) Get_PartObject()->Trail_Update(m_pProjectile->Get_Component()->Get_XMWorldMatrix(), fTimeDelta); + XMStoreFloat4(&m_vEndPos, m_pProjectile->Get_WorldPostion()); + __super::Late_Update(fTimeDelta); } @@ -120,12 +121,18 @@ HRESULT CDecendo::Pre_Setting(CGameObject* pObject) m_fPreAccTime = 0.f; + CWand* pWand = static_cast(m_pOwner)->Get_PartObject(); + + if (pWand == nullptr) + return E_FAIL; + + CPartObject* pCircle0 = Get_PartObject(); /* 초기 객체 위치 초기화 */ pCircle0->Get_Component()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion()); - m_pProjectile->Get_Component()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion()); - m_pProjectile_Blur->Get_Component()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion()); + m_pProjectile->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion()); + m_pProjectile_Blur->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion()); /* 초기 객체 비지블 */ pCircle0->Set_Visible(true); @@ -163,24 +170,6 @@ HRESULT CDecendo::Ready_Components(void* pArg) HRESULT CDecendo::Ready_Child() { - CPhysXEffectHitBox::PHYSXDUMMY_DESC Desc{}; - - m_pTransformCom->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion()); - - XMStoreFloat3(&Desc.vPos, m_pOwner->Get_WorldPostion() + XMVectorSet(0.f, 0.f, 1.f, 0.f)); - - - Desc.vRotRPY = { 0.f, 0.f, 0.f }; - Desc.iSubKind = 70; - Desc.vDeltaPos = _float3(0.f, 0.f, 0.f); - Desc.vLifeTime = { 0.f, 1.f }; - - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, CURRENT_LEVEL, LAYER_HITBOX, &Desc, this, &m_pPhysHitBox))) { - assert(false); - return E_FAIL; - } - - SAFE_ADDREF(m_pPhysHitBox); return S_OK; } @@ -214,13 +203,13 @@ CGameObject* CDecendo::Clone(void* pArg, CGameObject* pOwner) void CDecendo::OnCollision(CGameObject* pOther, void* pDesc) { //CTransform* pOtherTransform = p - ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc); + _vector vPos = XMVectorSet(hitBuffer.block.position.x, hitBuffer.block.position.y, hitBuffer.block.position.z, 1.f); for (auto& pPair : m_PartObjects) { pPair.second->Set_Visible(true); - pPair.second->Get_Component()->Set_State(STATE::POSITION, CollisionDesc->vWorldPos); + pPair.second->Get_Component()->Set_State(STATE::POSITION, vPos); } @@ -240,18 +229,12 @@ void CDecendo::OnCollision(CGameObject* pOther, void* pDesc) Get_PartObject()->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f, 0.f, 0.f, 1.f)); Get_PartObject()->Set_Visible(false); - - m_pPhysHitBox->Set_Dead(); - SAFE_RELEASE(m_pPhysHitBox); } void CDecendo::Free() { __super::Free(); - if (m_pPhysHitBox != nullptr) - SAFE_RELEASE(m_pPhysHitBox); - SAFE_RELEASE(m_pProjectile_Blur); SAFE_RELEASE(m_pProjectile); diff --git a/Jusin154_Team3D/Client/Private/DecendoSide.cpp b/Jusin154_Team3D/Client/Private/DecendoSide.cpp new file mode 100644 index 000000000..e1cb2f70f --- /dev/null +++ b/Jusin154_Team3D/Client/Private/DecendoSide.cpp @@ -0,0 +1,194 @@ +#include "pch.h" +#include "DecendoSide.h" + +#include "GameInstance.h" +#include "EffectParts.h" +#include "Player.h" +#include "Wand.h" +#include "TrailObject.h" + + +CDecendoSide::CDecendoSide(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CEffect_Container{ pDevice, pContext } +{ +} + +CDecendoSide::CDecendoSide(const CDecendoSide& rhs) + : CEffect_Container(rhs) +{ +} + +HRESULT CDecendoSide::Initialize_Prototype() +{ + + return S_OK; + +} + +HRESULT CDecendoSide::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/DecendoSide"))) + return E_FAIL; + + m_wstrEffectName = L"DecendoSide"; + + m_pWandLight = Get_PartObject("Wand_Light_R"); + m_pWandTrail = Get_PartObject(); + + SAFE_ADDREF(m_pWandLight); + SAFE_ADDREF(m_pWandTrail); + + m_fDuration = 1.f; + + return S_OK; +} + +void CDecendoSide::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); + +} + +void CDecendoSide::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()); + + m_pWandTrail->Get_Component()->Trail_Update(fTimeDelta, pWand->Get_WorldMatrix()); + +} + +void CDecendoSide::Late_Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Late_Update(fTimeDelta); + + +} + +HRESULT CDecendoSide::Pre_Setting(CGameObject* pObject) +{ + if (pObject == nullptr) + return E_FAIL; + + m_pOwner = pObject; + + Reset_EffectParts(); + + m_fAccTime = 0.f; + __super::m_fAccTime = 0.f; + m_fPreAccTime = 0.f; + + + CWand* pWand = static_cast(m_pOwner); + + if (pWand == nullptr) + return E_FAIL; + + m_pWandLight->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()); + + + m_bVisible = true; + + return S_OK; +} + +HRESULT CDecendoSide::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CDecendoSide::Ready_Child() +{ + return S_OK; +} + +CDecendoSide* CDecendoSide::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CDecendoSide* pInstance = new CDecendoSide(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CDecendoSide"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + + +CGameObject* CDecendoSide::Clone(void* pArg, CGameObject* pOwner) +{ + CDecendoSide* pInstance = new CDecendoSide(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CDecendoSide"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CDecendoSide::OnCollision(CGameObject* pOther, void* pDesc) +{ + ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc); + +} + +void CDecendoSide::Free() +{ + __super::Free(); + + + Safe_Release(m_pWandLight); + Safe_Release(m_pWandTrail); +} +#ifdef _DEBUG + +void CDecendoSide::Describe_Entity() +{ + +} + +#endif // _DEBUG + +HRESULT CDecendoSide::Bind_ShaderResources() +{ + return S_OK; +} + + diff --git a/Jusin154_Team3D/Client/Private/Eessential_Spell.cpp b/Jusin154_Team3D/Client/Private/Eessential_Spell.cpp new file mode 100644 index 000000000..97b5f2e73 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Eessential_Spell.cpp @@ -0,0 +1,286 @@ + +#include "pch.h" +#include "Eessential_Spell.h" +#include "GameInstance.h" + +CEessential_Spell::CEessential_Spell(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CEessential_Spell::CEessential_Spell(const CEessential_Spell& rhs) + :CElementObject(rhs) +{ +} + +HRESULT CEessential_Spell::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CEessential_Spell::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 0.f; + Desc.fY = 0.f; + Desc.fSizeX = 40.f; + Desc.fSizeY = 40.f; + + m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) }; + + if (FAILED(__super::Initialize(&Desc))) + { + return E_FAIL; + } + if (FAILED(Ready_Components(pArg))) + { + return E_FAIL; + } + + m_fAlpha = 1.f; + m_fTimeMult = 3.f; + m_fAlphaTime = 1.f; + m_fOffSetX = 80.f; + m_fOffSetY = 80.f; + m_iCols = 4; + UV(); + m_pVIBufferCom->Set_Cloned(true); + m_pVIBufferCom->Set_Pos(-731.f, -300.f, m_fOffSetX, m_fOffSetY, m_iCols); + m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); + m_pVIBufferCom->Set_ImageUV(pUVDesc); + return S_OK; +} + +void CEessential_Spell::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CEessential_Spell::Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + + if (m_bFadeIn == true) + { + if (m_fAlpha <= 1.f) + m_fAlpha += fTimeDelta * m_fAlphaTime; + + if (m_fAlpha >= 1.f) + { + m_bFadeIn = false; + m_fAlpha = 1.f; + } + } + + if (m_bFadeOut == true) + { + if (m_fAlpha >= 0.f) + m_fAlpha -= fTimeDelta; + + if (m_fAlpha <= 0.f) + { + m_bFadeOut = false; + m_fAlpha = 0.f; + } + } + m_fTime += fTimeDelta * m_fTimeMult; + __super::Update(fTimeDelta); +} + +void CEessential_Spell::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) + { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + } + __super::Late_Update(fTimeDelta); +} + +HRESULT CEessential_Spell::Render() +{ + if (FAILED(Bind_ShaderResources())) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIINTANCE::EESSENTIAL_SPELL)))) + { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) + { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) + { + return E_FAIL; + } + + return S_OK; +} + +_vector CEessential_Spell::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +void CEessential_Spell::SizeUpX(_float fSizeX) +{ + m_fSizeX = fSizeX; + m_pVIBufferCom->Set_SizeX(m_fSizeX); +} + +void CEessential_Spell::SizeUpY(_float fSizeY) +{ + m_fSizeY = fSizeY; + m_pVIBufferCom->Set_SizeY(m_fSizeY); +} + +void CEessential_Spell::SizeUpdate(_float fSizeX, _float fSizeY) +{ + m_fSizeX = fSizeX; + m_fSizeY = fSizeY; + m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); +} + +void CEessential_Spell::UV() +{ + for (_uint i = 0; i < 8; ++i) + { + pUVDesc[i].fUV = Meter_Index(i); + } +} + +_float4 CEessential_Spell::Meter_Index(_uint Number) +{ + _float2 fImage_Size = _float2{ 512.f, 256.f}; + + _uint iXCount = 4; + _uint iYCount = 2; + + _float frameWidth = 128.f; + _float frameHeight = 128.f; + + _uint frameX = Number % iXCount; + _uint frameY = Number / iXCount; + + _float4 UV{}; + UV.x = frameX * frameWidth / fImage_Size.x; + UV.y = frameY * frameHeight / fImage_Size.y; + UV.z = UV.x + (frameWidth / fImage_Size.x); + UV.w = UV.y + (frameHeight / fImage_Size.y); + + return UV; +} + +HRESULT CEessential_Spell::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_fAngle", &m_fAngle, 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 CEessential_Spell::Ready_Components(void* pArg) +{ + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_UI_Eessential_Spell"), (CComponent**)&m_pVIBufferCom, nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_Altas_Eessential"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIINSTANCE, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + + return S_OK; +} + +CEessential_Spell* CEessential_Spell::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CEessential_Spell* pInstance = new CEessential_Spell(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CEessential_Spell"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CEessential_Spell::Clone(void* pArg, CGameObject* pOwner) +{ + CEessential_Spell* pInstance = new CEessential_Spell(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CEessential_Spell"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CEessential_Spell::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +#ifdef _DEBUG +void CEessential_Spell::Describe_Entity() +{ +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Eessential_Spell_Slot.cpp b/Jusin154_Team3D/Client/Private/Eessential_Spell_Slot.cpp new file mode 100644 index 000000000..57ffb8784 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Eessential_Spell_Slot.cpp @@ -0,0 +1,300 @@ +#include "pch.h" +#include "Eessential_Spell_Slot.h" +#include "GameInstance.h" + +CEessential_Spell_Slot::CEessential_Spell_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CEessential_Spell_Slot::CEessential_Spell_Slot(const CEessential_Spell_Slot& rhs) + :CElementObject(rhs) +{ +} + +HRESULT CEessential_Spell_Slot::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CEessential_Spell_Slot::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 0.f; + Desc.fY = 0.f; + Desc.fSizeX = 65.f; + Desc.fSizeY = 65.f; + + m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) }; + + if (FAILED(__super::Initialize(&Desc))) + { + return E_FAIL; + } + if (FAILED(Ready_Components(pArg))) + { + return E_FAIL; + } + + m_fAlpha = 1.f; + m_fTimeMult = 3.f; + m_fAlphaTime = 1.f; + m_fOffSetX = 80.f; + m_fOffSetY = 80.f; + m_iCols = 4; + m_pVIBufferCom->Set_Cloned(true); + m_pVIBufferCom->Set_Pos(-731.f, -300.f, m_fOffSetX, m_fOffSetY, m_iCols); + m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); + m_fDelayTime = 0.5f; + m_iPerSpell_Slot = -1; + return S_OK; +} + +void CEessential_Spell_Slot::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CEessential_Spell_Slot::Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + + if (m_bFadeIn == true) + { + if (m_fAlpha <= 1.f) + m_fAlpha += fTimeDelta * m_fAlphaTime; + + if (m_fAlpha >= 1.f) + { + m_bFadeIn = false; + m_fAlpha = 1.f; + } + } + + if (m_bFadeOut == true) + { + if (m_fAlpha >= 0.f) + m_fAlpha -= fTimeDelta; + + if (m_fAlpha <= 0.f) + { + m_bFadeOut = false; + m_fAlpha = 0.f; + } + } + + Hover(fTimeDelta); + + m_fTime += fTimeDelta * m_fTimeMult; + __super::Update(fTimeDelta); +} + +void CEessential_Spell_Slot::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) + { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + } + __super::Late_Update(fTimeDelta); +} + +HRESULT CEessential_Spell_Slot::Render() +{ + if (FAILED(Bind_ShaderResources())) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIINTANCE::EESSENTIAL_SPELL_SOLT)))) + { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) + { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) + { + return E_FAIL; + } + + return S_OK; +} + +_vector CEessential_Spell_Slot::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +void CEessential_Spell_Slot::SizeUpX(_float fSizeX) +{ + m_fSizeX = fSizeX; + m_pVIBufferCom->Set_SizeX(m_fSizeX); +} + +void CEessential_Spell_Slot::SizeUpY(_float fSizeY) +{ + m_fSizeY = fSizeY; + m_pVIBufferCom->Set_SizeY(m_fSizeY); +} + +void CEessential_Spell_Slot::SizeUpdate(_float fSizeX, _float fSizeY) +{ + m_fSizeX = fSizeX; + m_fSizeY = fSizeY; + m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); +} + +void CEessential_Spell_Slot::Hover(_float 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 -= m_pOwner->Get_WorldPostion().m128_f32[0]; + fMouse.y -= m_pOwner->Get_WorldPostion().m128_f32[1]; + + + m_iSpellType = m_pVIBufferCom->Set_Mouse_Hover(fMouse); + CUIObject::HOVER_INFO Info; + Info.iSlotID = 1; + if (m_iSpellType == -1) + { + Info.iHover_Index = -1; + static_cast(m_pOwner)->Function_Callback(TEXT("Hover"), &Info); + + } + + else + { + Info.iHover_Index = m_iSpellType + ENUM_CLASS(SKILL_TYPE::JAP); + static_cast(m_pOwner)->Function_Callback(TEXT("Hover"), &Info); + + } + +} + +HRESULT CEessential_Spell_Slot::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_fAngle", &m_fAngle, 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 CEessential_Spell_Slot::Ready_Components(void* pArg) +{ + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_UI_Eessential_Spell_Slot"), (CComponent**)&m_pVIBufferCom, nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_ActionItemBG"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_ActionDiamondTriggerBack_4K"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIINSTANCE, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + + return S_OK; +} + +CEessential_Spell_Slot* CEessential_Spell_Slot::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CEessential_Spell_Slot* pInstance = new CEessential_Spell_Slot(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CEessential_Spell_Slot"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CEessential_Spell_Slot::Clone(void* pArg, CGameObject* pOwner) +{ + CEessential_Spell_Slot* pInstance = new CEessential_Spell_Slot(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CEessential_Spell_Slot"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CEessential_Spell_Slot::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pDiffuse_TextureCom1); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +#ifdef _DEBUG +void CEessential_Spell_Slot::Describe_Entity() +{ +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/EffectObject.cpp b/Jusin154_Team3D/Client/Private/EffectObject.cpp index acbcde1d7..6dffece71 100644 --- a/Jusin154_Team3D/Client/Private/EffectObject.cpp +++ b/Jusin154_Team3D/Client/Private/EffectObject.cpp @@ -74,13 +74,30 @@ HRESULT CEffectObject::Render_Blur() SHADER_PASS_INSTANCE_MODEL BlurPass = {}; + if (m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::NON_WORLD || m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::BLEND_NOWORLD) { - BlurPass = SHADER_PASS_INSTANCE_MODEL::NON_WORLD_BLUR; + if (m_EffectInfo.isBlurNoEmissive == false) + { + BlurPass = SHADER_PASS_INSTANCE_MODEL::NON_WORLD_BLUR; + } + else + { + BlurPass = SHADER_PASS_INSTANCE_MODEL::BLUR_NO_WORLD_NO_EMISSIVE; + } } else { - BlurPass = SHADER_PASS_INSTANCE_MODEL::BLUR; + if (m_EffectInfo.isBlurNoEmissive == false) + { + BlurPass = SHADER_PASS_INSTANCE_MODEL::BLUR; + } + else + { + BlurPass = SHADER_PASS_INSTANCE_MODEL::BLUR_NO_EMMISVE; + } + + } for (_uint i = 0; i < m_pInstance_ModelCom->Get_NumMeshes(); i++) @@ -524,11 +541,11 @@ HRESULT CEffectObject::Bind_ShaderResources() } - if (FAILED(m_pShaderCom->Bind_RawValue("g_isDiffuseBlur", &m_EffectInfo.isDiffuseBlur, sizeof(_bool)))) { + if (FAILED(m_pShaderCom->Bind_RawValue("g_isBlurNoEmissive", &m_EffectInfo.isBlurNoEmissive, sizeof(_bool)))) { return E_FAIL; } - if (FAILED(m_pShaderCom->Bind_RawValue("g_isMaskBlur", &m_EffectInfo.isMaskBlur, sizeof(_bool)))) { + if (FAILED(m_pShaderCom->Bind_RawValue("g_isTexBlur", &m_EffectInfo.isTexBlur, sizeof(_bool)))) { return E_FAIL; } @@ -687,11 +704,6 @@ HRESULT CEffectObject::Bind_ShaderResources() } - - - return S_OK; - - return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/EffectParts.cpp b/Jusin154_Team3D/Client/Private/EffectParts.cpp index af3fd16e0..543141d32 100644 --- a/Jusin154_Team3D/Client/Private/EffectParts.cpp +++ b/Jusin154_Team3D/Client/Private/EffectParts.cpp @@ -88,6 +88,11 @@ void CEffectParts::Late_Update(_float fTimeDelta) } +_vector CEffectParts::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + HRESULT CEffectParts::Ready_Components(void* pArg) diff --git a/Jusin154_Team3D/Client/Private/EffectPool.cpp b/Jusin154_Team3D/Client/Private/EffectPool.cpp index 71e8cdfc3..9d0a698cb 100644 --- a/Jusin154_Team3D/Client/Private/EffectPool.cpp +++ b/Jusin154_Team3D/Client/Private/EffectPool.cpp @@ -9,6 +9,14 @@ #include "Decendo.h" #include "Protego.h" #include "Revelio.h" +#include "Levioso.h" + +#include "BombardSide.h" +#include "LeviosoSide.h" +#include "DecendoSide.h" + +#include "NomalJapSide.h" +#include "Lumos.h" CEffectPool::CEffectPool(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) : CGameObject(pDevice, pContext) @@ -158,6 +166,65 @@ HRESULT CEffectPool::Ready_Effect() ))) return E_FAIL; + if (FAILED(Create_Effect(SKILL_TYPE::JAP_SIDE, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* { + + CNomalJapSide* pEffect = nullptr; + + pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr); + + return pEffect; } + ))) return E_FAIL; + + if (FAILED(Create_Effect(SKILL_TYPE::LEVIOSO, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + + CLevioso* pEffect = nullptr; + + pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr); + + return pEffect; } + ))) return E_FAIL; + + + if (FAILED(Create_Effect(SKILL_TYPE::LUMOS, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + + CLumos* pEffect = nullptr; + + pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr); + + return pEffect; } + ))) return E_FAIL; + + + if (FAILED(Create_Effect(SKILL_TYPE::BOMBARDA_SIDE, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + + CBombardSide* pEffect = nullptr; + + pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr); + + return pEffect; } + ))) return E_FAIL; + + if (FAILED(Create_Effect(SKILL_TYPE::LEVIOSO_SIDE, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + + CLeviosoSide* pEffect = nullptr; + + pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr); + + return pEffect; } + ))) return E_FAIL; + + + if (FAILED(Create_Effect(SKILL_TYPE::DESCENDO_SIDE, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + + CDecendoSide* 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 a21c80590..b893f88c5 100644 --- a/Jusin154_Team3D/Client/Private/Effect_Container.cpp +++ b/Jusin154_Team3D/Client/Private/Effect_Container.cpp @@ -208,11 +208,6 @@ void CEffect_Container::Update_Event(_float fTimeDelta) pPart.second->Set_Visible(false); } - if (m_pPhysHitBox != nullptr && m_pPhysHitBox->isDead() == false) - { - m_pPhysHitBox->Set_Dead(); - SAFE_RELEASE(m_pPhysHitBox); - } } } diff --git a/Jusin154_Team3D/Client/Private/Level_Field.cpp b/Jusin154_Team3D/Client/Private/Level_Field.cpp index 251db9428..3ec8449e3 100644 --- a/Jusin154_Team3D/Client/Private/Level_Field.cpp +++ b/Jusin154_Team3D/Client/Private/Level_Field.cpp @@ -57,7 +57,46 @@ void CLevel_Field::Update(_float fTimeDelta) HRESULT CLevel_Field::Render() { - SetWindowText(g_hWnd, TEXT("필드레벨")); + _float fDeltaTimeSeconds = m_pGameInstance->Get_TimeDelta(TEXT("Timer_60")); + + static _float fAccumulatedTimeSeconds = 0.0f; + static _uint iFrameCountForFps = 0; + static _float fCurrentFps = 0.0f; + static _float fAverageFrameTimeMilliseconds = 0.0f; + + fAccumulatedTimeSeconds += fDeltaTimeSeconds; + ++iFrameCountForFps; + + if (fAccumulatedTimeSeconds >= 1.0f) + { + if (fAccumulatedTimeSeconds > 0.0f) + { + fCurrentFps = static_cast<_float>(iFrameCountForFps) / fAccumulatedTimeSeconds; + if (fCurrentFps > 0.0f) + { + fAverageFrameTimeMilliseconds = 1000.0f / fCurrentFps; + } + } + + fAccumulatedTimeSeconds = 0.0f; + iFrameCountForFps = 0; + } + + _float fCurrentFrameTimeMilliseconds = fDeltaTimeSeconds * 1000.0f; + + _tchar szWindowTitle[256] = {}; + + // 현재 프레임 시간 + 평균 FPS / 평균 프레임 타임(ms) + _stprintf_s( + szWindowTitle, + TEXT("필드레벨입니다 | Frame: %.3f ms | Avg: %.3f ms | FPS: %.1f"), + fCurrentFrameTimeMilliseconds, + fAverageFrameTimeMilliseconds, + fCurrentFps + ); + + SetWindowText(g_hWnd, szWindowTitle); + return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp index 48aadfbd1..ec7bc467e 100644 --- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp +++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp @@ -6,6 +6,7 @@ #include "Camera_Debug.h" #include "InfoInstance.h" #include "GamePlay_Canvas.h" +#include "Spell_Canvas.h" #include "Layer.h" #include "SkyBox.h" #include "Broom.h" @@ -92,7 +93,46 @@ void CLevel_GamePlay::Update(_float fTimeDelta) HRESULT CLevel_GamePlay::Render() { - SetWindowText(g_hWnd, TEXT("게임플레이레벨입니다")); + _float fDeltaTimeSeconds = m_pGameInstance->Get_TimeDelta(TEXT("Timer_60")); + + static _float fAccumulatedTimeSeconds = 0.0f; + static _uint iFrameCountForFps = 0; + static _float fCurrentFps = 0.0f; + static _float fAverageFrameTimeMilliseconds = 0.0f; + + fAccumulatedTimeSeconds += fDeltaTimeSeconds; + ++iFrameCountForFps; + + if (fAccumulatedTimeSeconds >= 1.0f) + { + if (fAccumulatedTimeSeconds > 0.0f) + { + fCurrentFps = static_cast<_float>(iFrameCountForFps) / fAccumulatedTimeSeconds; + if (fCurrentFps > 0.0f) + { + fAverageFrameTimeMilliseconds = 1000.0f / fCurrentFps; + } + } + + fAccumulatedTimeSeconds = 0.0f; + iFrameCountForFps = 0; + } + + _float fCurrentFrameTimeMilliseconds = fDeltaTimeSeconds * 1000.0f; + + _tchar szWindowTitle[256] = {}; + + // 현재 프레임 시간 + 평균 FPS / 평균 프레임 타임(ms) + _stprintf_s( + szWindowTitle, + TEXT("게임플레이레벨입니다 | Frame: %.3f ms | Avg: %.3f ms | FPS: %.1f"), + fCurrentFrameTimeMilliseconds, + fAverageFrameTimeMilliseconds, + fCurrentFps + ); + + SetWindowText(g_hWnd, szWindowTitle); + return S_OK; } @@ -120,6 +160,7 @@ HRESULT CLevel_GamePlay::Ready_Background() /* Map Containters */ /* 테스트용 맵 */ + //CInfoInstance::GetInstance()->Load_MapObjects("ClientTest"); /* 전체 맵 */ CInfoInstance::GetInstance()->Load_MapObjects("Map1129"); @@ -152,6 +193,9 @@ HRESULT CLevel_GamePlay::Ready_Layer_UI(const _wstring& strLayerTag) if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI))) { return E_FAIL; } + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI))) { + return E_FAIL; + } return S_OK; } @@ -236,15 +280,15 @@ HRESULT CLevel_GamePlay::Ready_Layer_SkyBox(const _wstring& strLayerTag) HRESULT CLevel_GamePlay::Ready_Layer_Monster() { - //for (_uint i = 0; i < 2; ++i) - //{ - // if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER,&i))) { - // return E_FAIL; - // } - //} - //if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) { - // return E_FAIL; - //} + for (_uint i = 0; i < 2; ++i) + { + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER,&i))) { + return E_FAIL; + } + } + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) { + return E_FAIL; + } return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Level_Logo.cpp b/Jusin154_Team3D/Client/Private/Level_Logo.cpp index d0bd0854a..c26fdbc90 100644 --- a/Jusin154_Team3D/Client/Private/Level_Logo.cpp +++ b/Jusin154_Team3D/Client/Private/Level_Logo.cpp @@ -39,7 +39,46 @@ void CLevel_Logo::Update(_float fTimeDelta) HRESULT CLevel_Logo::Render() { - SetWindowText(g_hWnd, TEXT("로고레벨입니다")); + _float fDeltaTimeSeconds = m_pGameInstance->Get_TimeDelta(TEXT("Timer_60")); + + static _float fAccumulatedTimeSeconds = 0.0f; + static _uint iFrameCountForFps = 0; + static _float fCurrentFps = 0.0f; + static _float fAverageFrameTimeMilliseconds = 0.0f; + + fAccumulatedTimeSeconds += fDeltaTimeSeconds; + ++iFrameCountForFps; + + if (fAccumulatedTimeSeconds >= 1.0f) + { + if (fAccumulatedTimeSeconds > 0.0f) + { + fCurrentFps = static_cast<_float>(iFrameCountForFps) / fAccumulatedTimeSeconds; + if (fCurrentFps > 0.0f) + { + fAverageFrameTimeMilliseconds = 1000.0f / fCurrentFps; + } + } + + fAccumulatedTimeSeconds = 0.0f; + iFrameCountForFps = 0; + } + + _float fCurrentFrameTimeMilliseconds = fDeltaTimeSeconds * 1000.0f; + + _tchar szWindowTitle[256] = {}; + + // 현재 프레임 시간 + 평균 FPS / 평균 프레임 타임(ms) + _stprintf_s( + szWindowTitle, + TEXT("로고 레벨입니다 | Frame: %.3f ms | Avg: %.3f ms | FPS: %.1f"), + fCurrentFrameTimeMilliseconds, + fAverageFrameTimeMilliseconds, + fCurrentFps + ); + + SetWindowText(g_hWnd, szWindowTitle); + return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Level_Restart.cpp b/Jusin154_Team3D/Client/Private/Level_Restart.cpp index ddab4e3cf..1777b9e2b 100644 --- a/Jusin154_Team3D/Client/Private/Level_Restart.cpp +++ b/Jusin154_Team3D/Client/Private/Level_Restart.cpp @@ -38,7 +38,46 @@ void CLevel_Restart::Update(_float fTimeDelta) HRESULT CLevel_Restart::Render() { - SetWindowText(g_hWnd, TEXT("리스타트레벨")); + _float fDeltaTimeSeconds = m_pGameInstance->Get_TimeDelta(TEXT("Timer_60")); + + static _float fAccumulatedTimeSeconds = 0.0f; + static _uint iFrameCountForFps = 0; + static _float fCurrentFps = 0.0f; + static _float fAverageFrameTimeMilliseconds = 0.0f; + + fAccumulatedTimeSeconds += fDeltaTimeSeconds; + ++iFrameCountForFps; + + if (fAccumulatedTimeSeconds >= 1.0f) + { + if (fAccumulatedTimeSeconds > 0.0f) + { + fCurrentFps = static_cast<_float>(iFrameCountForFps) / fAccumulatedTimeSeconds; + if (fCurrentFps > 0.0f) + { + fAverageFrameTimeMilliseconds = 1000.0f / fCurrentFps; + } + } + + fAccumulatedTimeSeconds = 0.0f; + iFrameCountForFps = 0; + } + + _float fCurrentFrameTimeMilliseconds = fDeltaTimeSeconds * 1000.0f; + + _tchar szWindowTitle[256] = {}; + + // 현재 프레임 시간 + 평균 FPS / 평균 프레임 타임(ms) + _stprintf_s( + szWindowTitle, + TEXT("리스타트레벨입니다 | Frame: %.3f ms | Avg: %.3f ms | FPS: %.1f"), + fCurrentFrameTimeMilliseconds, + fAverageFrameTimeMilliseconds, + fCurrentFps + ); + + SetWindowText(g_hWnd, szWindowTitle); + return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Levioso.cpp b/Jusin154_Team3D/Client/Private/Levioso.cpp new file mode 100644 index 000000000..cc8a37be7 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Levioso.cpp @@ -0,0 +1,262 @@ +#include "pch.h" +#include "Levioso.h" + +#include "GameInstance.h" +#include "EffectParts.h" +#include "Player.h" +#include "TrailObject.h" +#include "PhysXEffectHitBox.h" + + +CLevioso::CLevioso(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CEffect_Container{ pDevice, pContext } +{ +} + +CLevioso::CLevioso(const CLevioso& rhs) + : CEffect_Container(rhs) +{ +} + +HRESULT CLevioso::Initialize_Prototype() +{ + + return S_OK; + +} + +HRESULT CLevioso::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/Levioso"))) + return E_FAIL; + + m_pLeviosoPJ_0 = Get_PartObject("Levioso_PJ0"); + m_pLeviosoPJ_1 = Get_PartObject("Levioso_PJ1"); + m_pLeviosoTrail = Get_PartObject("Levioso_Trail"); + m_pTrail_PT_0 = Get_PartObject("Trail_PT0"); + + SAFE_ADDREF(m_pLeviosoPJ_0); + SAFE_ADDREF(m_pLeviosoPJ_1); + SAFE_ADDREF(m_pLeviosoTrail); + SAFE_ADDREF(m_pTrail_PT_0); + + m_wstrEffectName = L"Levioso"; + + m_fTurnSpeed = 10.f; + m_fRange = 1.f; + + m_fDuration = 2.f; + + return S_OK; +} + +void CLevioso::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); + + + XMStoreFloat4(&m_vStartPos, m_pLeviosoPJ_0->Get_WorldPostion()); + +} + +void CLevioso::Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Update(fTimeDelta); + + Update_Event(fTimeDelta); + + m_pLeviosoPJ_0->Get_Component()->Translation(m_vOwnerLook * 0.25f); + m_pLeviosoPJ_1->Get_Component()->Translation(m_vOwnerLook * 0.25f); + + + m_pTrail_PT_0->Get_Component()->Translation(m_vOwnerLook * 0.25f); + + if (true == m_pGameInstance->SphereCast(0.125f, XMLoadFloat4(&m_vStartPos), m_vOwnerLook, XMVectorGetX(XMVector3Length(m_vOwnerLook * 1.f)) + , PSX::PxHitFlag::ePOSITION | PSX::PxHitFlag::eNORMAL, PSX::PxQueryFlag::eSTATIC, hitBuffer)) + { + OnCollision(); + } + + _matrix WorldMat = m_pTrail_PT_0->Get_Component()->Get_XMWorldMatrix(); + + m_pLeviosoTrail->Trail_Update(WorldMat, fTimeDelta); + +} + +void CLevioso::Late_Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + CPlayer* pPlayer = static_cast(m_pOwner); + + if (pPlayer == nullptr) + return; + + _matrix WandWorld = pPlayer->Get_WandPos(); + + //m_pLeviosoTrail->Get_Component()->Fixed_Trail(WandWorld); + + XMStoreFloat4(&m_vEndPos, m_pLeviosoPJ_0->Get_WorldPostion()); + + __super::Late_Update(fTimeDelta); + + +} + +HRESULT CLevioso::Pre_Setting(CGameObject* pObject) +{ + if (pObject == nullptr) + return E_FAIL; + + m_pOwner = pObject; + + + Reset_EffectParts(); + + __super::m_fAccTime = 0.f; + m_fPreAccTime = 0.f; + + m_fAccRotateTime = 0.f; + + if (FAILED(Ready_Child())) + return E_FAIL; + + CPlayer* pPlayer = static_cast(m_pOwner); + + if (pPlayer == nullptr) + return E_FAIL; + + _vector WandPos = pPlayer->Get_WandPos().r[3]; + + m_pLeviosoPJ_0->Get_Component()->Set_WorldMatrix(m_pOwner->Get_Component()->Get_XMWorldMatrix()); + m_pLeviosoPJ_1->Get_Component()->Set_WorldMatrix(m_pOwner->Get_Component()->Get_XMWorldMatrix()); + m_pTrail_PT_0->Get_Component()->Set_WorldMatrix(m_pOwner->Get_Component()->Get_XMWorldMatrix()); + + m_pLeviosoPJ_0->Get_Component()->Set_State(STATE::POSITION, WandPos); + m_pLeviosoPJ_1->Get_Component()->Set_State(STATE::POSITION, WandPos); + m_pTrail_PT_0->Get_Component()->Set_State(STATE::POSITION, WandPos); + + + m_pLeviosoPJ_0 ->Set_Visible(true); + m_pLeviosoPJ_1->Set_Visible(true); + m_pTrail_PT_0->Set_Visible(true); + + m_pLeviosoTrail->Set_Visible(true); + m_pLeviosoTrail->Get_Component()->Reset_Trail(); + + m_vOwnerLook = XMVector3Normalize(m_pOwner->Get_Component()->Get_State(STATE::LOOK)); + + m_bVisible = true; + + return S_OK; +} + +HRESULT CLevioso::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CLevioso::Ready_Child() +{ + + return S_OK; +} + +CLevioso* CLevioso::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CLevioso* pInstance = new CLevioso(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CLevioso"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + + +CGameObject* CLevioso::Clone(void* pArg, CGameObject* pOwner) +{ + CLevioso* pInstance = new CLevioso(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CLevioso"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CLevioso::OnCollision(CGameObject* pOther, void* pDesc) +{ + _vector vPos = XMVectorSet(hitBuffer.block.position.x, hitBuffer.block.position.y, hitBuffer.block.position.z, 1.f); + + + for (auto& pPair : m_PartObjects) + { + pPair.second->Set_Visible(true); + pPair.second->Get_Component()->Set_State(STATE::POSITION, vPos); + } + + __super::m_fAccTime = 0.f; + m_fDuration = 3.f; //적중하면 지속시간 3초 + + //CEditEffect* pLevioso_Hit = Get_PartObject("Levioso_Hit"); + //CEditEffect* pLevioso_Bottom_Wind = Get_PartObject("Levioso_Bottom_Wind"); + //CEditEffect* pLevioso_Rotate0 = Get_PartObject("Levioso_Rotate0"); + //CEditEffect* pLevioso_Rotate1 = Get_PartObject("Levioso_Rotate1"); + //CEditEffect* pLevioso_Tornado = Get_PartObject("Levioso_Tornado"); + + m_pLeviosoPJ_0->Set_Visible(false); + m_pLeviosoPJ_1->Set_Visible(false); + m_pTrail_PT_0->Set_Visible(false); + m_pLeviosoTrail->Set_Visible(false); +} + +void CLevioso::Free() +{ + __super::Free(); + + + SAFE_RELEASE(m_pLeviosoPJ_0); + SAFE_RELEASE(m_pLeviosoPJ_1); + SAFE_RELEASE(m_pLeviosoTrail); + SAFE_RELEASE(m_pTrail_PT_0); +} +#ifdef _DEBUG + +void CLevioso::Describe_Entity() +{ + GUI::Begin("LEVIOSO"); + + GUI::DragFloat("TURN SPEED", &m_fTurnSpeed); + GUI::DragFloat("RANGE", &m_fRange); + GUI::End(); + +} + +#endif // _DEBUG + +HRESULT CLevioso::Bind_ShaderResources() +{ + return S_OK; +} + + diff --git a/Jusin154_Team3D/Client/Private/LeviosoSide.cpp b/Jusin154_Team3D/Client/Private/LeviosoSide.cpp new file mode 100644 index 000000000..194a6b5f4 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/LeviosoSide.cpp @@ -0,0 +1,196 @@ +#include "pch.h" +#include "LeviosoSide.h" + +#include "GameInstance.h" +#include "EffectParts.h" +#include "Player.h" +#include "Wand.h" +#include "TrailObject.h" + + +CLeviosoSide::CLeviosoSide(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CEffect_Container{ pDevice, pContext } +{ +} + +CLeviosoSide::CLeviosoSide(const CLeviosoSide& rhs) + : CEffect_Container(rhs) +{ +} + +HRESULT CLeviosoSide::Initialize_Prototype() +{ + + return S_OK; + +} + +HRESULT CLeviosoSide::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/LeviosoSide"))) + return E_FAIL; + + m_wstrEffectName = L"LeviosoSide"; + + + m_pWandLight = Get_PartObject("Wand_Light_P"); + m_pWandTrail = Get_PartObject(); + + SAFE_ADDREF(m_pWandLight); + SAFE_ADDREF(m_pWandTrail); + + m_fDuration = 1.f; + + return S_OK; +} + +void CLeviosoSide::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); + +} + +void CLeviosoSide::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()); + + m_pWandTrail->Get_Component()->Trail_Update(fTimeDelta, pWand->Get_WorldMatrix()); + +} + +void CLeviosoSide::Late_Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Late_Update(fTimeDelta); + + +} + +HRESULT CLeviosoSide::Pre_Setting(CGameObject* pObject) +{ + if (pObject == nullptr) + return E_FAIL; + + m_pOwner = pObject; + + Reset_EffectParts(); + + m_fAccTime = 0.f; + __super::m_fAccTime = 0.f; + m_fPreAccTime = 0.f; + + + CWand* pWand = static_cast(m_pOwner); + + if (pWand == nullptr) + return E_FAIL; + + + m_pWandLight->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()); + + + m_bVisible = true; + + return S_OK; +} + +HRESULT CLeviosoSide::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CLeviosoSide::Ready_Child() +{ + return S_OK; +} + +CLeviosoSide* CLeviosoSide::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CLeviosoSide* pInstance = new CLeviosoSide(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CNomalJapSide"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + + +CGameObject* CLeviosoSide::Clone(void* pArg, CGameObject* pOwner) +{ + CLeviosoSide* pInstance = new CLeviosoSide(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CNomalJapSide"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CLeviosoSide::OnCollision(CGameObject* pOther, void* pDesc) +{ + ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc); + +} + +void CLeviosoSide::Free() +{ + __super::Free(); + + + Safe_Release(m_pWandLight); + Safe_Release(m_pWandTrail); +} +#ifdef _DEBUG + +void CLeviosoSide::Describe_Entity() +{ + +} + +#endif // _DEBUG + +HRESULT CLeviosoSide::Bind_ShaderResources() +{ + return S_OK; +} + + diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index f86ccbcca..92951e71e 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -50,6 +50,23 @@ #include "Mission_Panel.h" +#include "Spell_Canvas.h" +#include "Spell_Panel.h" +#include "Current_Spell_Slot.h" +#include "Spell_List.h" +#include "Eessential_Spell_Slot.h" +#include "Eessential_Spell.h" +#include "Spell_List_Image.h" +#include "Spell_State.h" +#include "Spell_Hover.h" +#include "Spell_Hover_Effect.h" +#include "Spell_Preview.h" +#include "Spell_Header.h" +#include "Spell_Header_Line.h" +#include "Spell_Vidio_Border.h" +#include "Spell_Anim.h" +#include "Current_Slot_Number.h" + #pragma endregion #pragma region PHYSX @@ -68,11 +85,17 @@ #include "NomalJap.h" #include "Protego.h" #include "Revelio.h" +#include "NomalJapSide.h" +#include "DecendoSide.h" +#include "BombardSide.h" +#include "LeviosoSide.h" #include "TrailObject.h" #include "Instance_Model.h" #include "Trail.h" #include "EffectPool.h" +#include "Levioso.h" +#include "Lumos.h" @@ -493,6 +516,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/SpellWidget", 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; @@ -615,11 +654,230 @@ HRESULT CLoader::Loading_For_GamePlay() }); + Asset_FileLoad("../Bin/Resources/Textures/GadgetWheel", 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; + } + + return S_OK; + + }); if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Item"), CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("../Bin/Resources/Textures/GadgetWheel/Item%d.png"), 8)))) { return E_FAIL; } + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Accio"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Accio\\Accio%d.png"), 151)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Altering_Spell"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Altering_Spell\\Altering_Spell%d.png"), 349)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Alohomora"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Alohomora\\Alohomora%d.png"), 394)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Ancient_Magic"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Ancient_Magic\\Ancient_Magic%d.png"), 152)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Ancient_Magic_Throw"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Ancient_Magic_Throw\\Ancient_Magic_Throw%d.png"), 89)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Arresto_Momentum"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Arresto_Momentum\\Arresto_Momentum%d.png"), 120)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Avada_Kedavra"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Avada_Kedavra\\Avada_Kedavra%d.png"), 208)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Basic_Cast"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Basic_Cast\\Basic_Cast%d.png"), 308)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Beast_Feed"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Beast_Feed\\Beast_Feed%d.png"), 378)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Beast_Petting_Brush"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Beast_Petting_Brush\\Beast_Petting_Brush%d.png"), 327)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Bombarda"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Bombarda\\Bombarda%d.png"), 262)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Confringo"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Confringo\\Confringo%d.png"), 157)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Conjuring_Spell"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Conjuring_Spell\\Conjuring_Spell%d.png"), 115)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Descendo"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Descendo\\Descendo%d.png"), 155)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Depulso"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Depulso\\Depulso%d.png"), 152)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Diffindo"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Diffindo\\Diffindo%d.png"), 150)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Disillusionment"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Disillusionment\\Disillusionment%d.png"), 260)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Evanesco"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Evanesco\\Evanesco%d.png"), 136)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Expelliarmus"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Expelliarmus\\Expelliarmus%d.png"), 146)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Flipendo"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Flipendo\\Flipendo%d.png"), 188)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Glacius"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Glacius\\Glacius%d.png"), 156)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Imperio"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Imperio\\Imperio%d.png"), 462)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Incendio"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Incendio\\Incendio%d.png"), 213)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Levioso"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Levioso\\Levioso%d.png"), 180)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Lumos"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Lumos\\Lumos%d.png"), 365)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Nab_Sack"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Nab_Sack\\Nab_Sack%d.png"), 235)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Petrificus_Totalus"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Petrificus_Totalus\\Petrificus_Totalus%d.png"), 275)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Protego"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Protego\\Protego%d.png"), 285)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Reparo"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Reparo\\Reparo%d.png"), 385)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Revelio"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Revelio\\Revelio%d.png"), 227)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Stupefy"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Stupefy\\Stupefy%d.png"), 222)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Transformation"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Transformation\\Transformation%d.png"), 146)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Wingardium_Leviosa"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Wingardium_Leviosa\\Wingardium_Leviosa%d.png"), 273)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Crucio"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Crucio\\Crucio%d.png"), 216)))) + { + return E_FAIL; + } + #pragma endregion #pragma region TERRAIN_TEXTURE @@ -666,6 +924,25 @@ HRESULT CLoader::Loading_For_GamePlay() } #pragma endregion +#pragma region EFFECT + + Asset_FileLoad("../Bin/Resources/Textures/Effect/Trails", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath) { + + _string strFilePath = pFilePath; + _wstring wstrFilePath = CMyTools::ToWstring(strFilePath); + + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::GAMEPLAY), 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/Effect/Noises", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath) { @@ -726,6 +1003,8 @@ HRESULT CLoader::Loading_For_GamePlay() }); +#pragma endregion + m_strMessage = TEXT("셰이더를(을) 로딩 중 입니다."); if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_UIEDITOR, @@ -787,11 +1066,56 @@ HRESULT CLoader::Loading_For_GamePlay() SpellSlotUIDesc.iNum = 4; - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_UI_Instance"), + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_UI_Spell_Slot"), CVIBuffer_UI_Instance::Create(m_pDevice, m_pContext, &SpellSlotUIDesc)))) { return E_FAIL; } + CVIBuffer_UI_Instance::UI_INSTANCE_DESC CurrentSpellSlotUIDesc{}; + + CurrentSpellSlotUIDesc.iNum = 16; + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_UI_Current_Spell_Slot"), + CVIBuffer_UI_Instance::Create(m_pDevice, m_pContext, &CurrentSpellSlotUIDesc)))) { + return E_FAIL; + } + + CVIBuffer_UI_Instance::UI_INSTANCE_DESC Spell_List{}; + + Spell_List.iNum = 26; + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_UI_Spell_List"), + CVIBuffer_UI_Instance::Create(m_pDevice, m_pContext, &Spell_List)))) { + return E_FAIL; + } + + CVIBuffer_UI_Instance::UI_INSTANCE_DESC Eessential_Spell_Slot{}; + + Eessential_Spell_Slot.iNum = 8; + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_UI_Eessential_Spell_Slot"), + CVIBuffer_UI_Instance::Create(m_pDevice, m_pContext, &Eessential_Spell_Slot)))) { + return E_FAIL; + } + + CVIBuffer_UI_Instance::UI_INSTANCE_DESC Eessential_Spell{}; + + Eessential_Spell.iNum = 8; + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_UI_Eessential_Spell"), + CVIBuffer_UI_Instance::Create(m_pDevice, m_pContext, &Eessential_Spell)))) { + return E_FAIL; + } + + CVIBuffer_UI_Instance::UI_INSTANCE_DESC Spell_List_Image{}; + + Spell_List_Image.iNum = 26; + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_UI_Spell_List_Image"), + CVIBuffer_UI_Instance::Create(m_pDevice, m_pContext, &Spell_List_Image)))) { + return E_FAIL; + } + CVIBuffer_UI_Instance::UI_INSTANCE_DESC SlotNumberUIDesc{}; SlotNumberUIDesc.iNum = 4; @@ -801,6 +1125,24 @@ HRESULT CLoader::Loading_For_GamePlay() return E_FAIL; } + CVIBuffer_UI_Instance::UI_INSTANCE_DESC Magic_MeterDesc{}; + + Magic_MeterDesc.iNum = 5; + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Magic_Meter_UI_Instance"), + CVIBuffer_UI_Instance::Create(m_pDevice, m_pContext, &Magic_MeterDesc)))) { + return E_FAIL; + } + + CVIBuffer_UI_Instance::UI_INSTANCE_DESC Spell_Slot_PreviewDesc{}; + + Spell_Slot_PreviewDesc.iNum = 4; + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Spell_Slot_Previe_UI_Instance"), + CVIBuffer_UI_Instance::Create(m_pDevice, m_pContext, &Spell_Slot_PreviewDesc)))) { + return E_FAIL; + } + // Heavy Wall CRigidBody_Dynamic::RIGIDBODY_PROTOTYPE_DYNAMIC_DESC Desc{}; @@ -902,6 +1244,30 @@ HRESULT CLoader::Loading_For_GamePlay() return E_FAIL; } + if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CNomalJapSide::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CLevioso::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CLumos::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CLeviosoSide::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CBombardSide::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CDecendoSide::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } + + + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CEffectPool::Create(m_pDevice, m_pContext)))) { return E_FAIL; } @@ -939,6 +1305,326 @@ HRESULT CLoader::Loading_For_GamePlay() }); +//#pragma region MAP_MODELS +// vector> jobFutures; +// +// _uint iLoadCount = 46; +// vector*> Contents(iLoadCount); +//{ +// { /* Terrain */ +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Collision/Terrain", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Meshes/Terrain", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// } +// +// { /* Ollivanders*/ +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Ollivanders/Meshes", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Ollivanders/Collision", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// } +// +// { /* Gatehouse*/ +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Gatehouse/Meshes", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// } +// +// { /* TScrolls */ +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TScrolls/Meshes", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TScrolls/Collisions", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// } +// { /* 3BroomStick*/ +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_ThreeBroomsticks/Meshes", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_ThreeBroomsticks/Collision", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_ThreeBroomsticks/Meshes/3Broom_Kit", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// } +// +// +// { /* BLDG_QuidditchShop */ +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_QuidditchShop/Meshes", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_QuidditchShop/Collision", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// } +// { /* BLDG_HogsheadInn */ +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_HogsheadInn/Meshes", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_HogsheadInn/Collision", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// } +// { /* BLDG_Honeydukes */ +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Honeydukes/Meshes", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Honeydukes/Collision", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// } +// { /* BLDG_OwlPost */ +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_OwlPost/Meshes", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_OwlPost/Collision", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// } +// { /* BLDG_TeaShop */ +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TeaShop/Meshes", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TeaShop/Collision", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// } +// { /* BLDG_Zonkos */ +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Zonkos/Meshes", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Zonkos/Collision", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// } +// { /* BLDG_DB_GR */ +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_DB_GR/Meshes", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_DB_GR/Collision", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// } +// { /* BLDG_Potions */ +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Potions/Meshes", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Potions/Collisions", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// } +// { /* BLDG_Salon */ +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Salon/Meshes", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Salon/Collision", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// } +// { /* Hengist_Tree */ +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Meshes/Vegetation/Hengist_Tree", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Collision/Vegetation", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// } +// { /* GEN A*/ +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_A/Meshes", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_A/Collision", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// } +// { /* GEN B*/ +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_B/Meshes", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_B/Collision", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// } +// { /* GEN C*/ +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_C/Meshes", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_C/Collision", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// } +// { /* GEN E*/ +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_E/Meshes", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_E/Collision", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// } +// { /* GEN F*/ +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_F/Meshes", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_F/Collision", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// } +// { /* GEN G*/ +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_G/Meshes", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_G/Collision", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// } +// { /* GEN H*/ +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_H/Meshes", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_H/Collision", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// } +// { /* GEN J*/ +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_J/Meshes", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// jobFutures.emplace_back(Deferred_FolderLoad( +// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_J/Collision", +// ".bin", false, +// &Contents[jobFutures.size()] +// )); +// } +//} +// +// +// for (auto& jobFuture : jobFutures) +// { +// jobFuture.get(); +// } +// +// for (_uint i = 0; i < Contents.size(); ++i) { +// for (_uint j = 0; j < (Contents[i])->size(); ++j) { +// FOLDER_LOAD* pContents = (*Contents[i])[j]; +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, pContents->pModelTag, pContents->pLoadedModel))) { +// return E_FAIL; +// } +// +// for (_uint k = 0; k < pContents->pRigidBodyTags.size(); ++k) { +// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, pContents->pRigidBodyTags[k], pContents->LoadedRigidBody[k]))) { +// return E_FAIL; +// } +// } +// +// } +// } +// +// for (_uint i = 0; i < Contents.size(); ++i) { +// for (_uint j = 0; j < (Contents[i])->size(); ++j) { +// Safe_Delete((*Contents[i])[j]); +// } +// Safe_Delete(Contents[i]); +// } +//#pragma endregion +// + m_strMessage = TEXT("객체원형를(을) 로딩 중 입니다."); @@ -1028,6 +1714,71 @@ HRESULT CLoader::Loading_For_GamePlay() return E_FAIL; } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpell_Canvas::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpell_Panel::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CCurrent_Spell_Slot::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpell_List::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CEessential_Spell_Slot::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CEessential_Spell::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpell_List_Image::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpell_State::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpell_Hover::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpell_Hover_Effect::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpell_Preview::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpell_Header::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpell_Header_Line::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpell_Vidio_Border::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpell_Anim::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CCurrent_Slot_Number::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + /* For.Prototype_GameObject_SkyBox */ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSkyBox::Create(m_pDevice, m_pContext)))) return E_FAIL; diff --git a/Jusin154_Team3D/Client/Private/Lumos.cpp b/Jusin154_Team3D/Client/Private/Lumos.cpp new file mode 100644 index 000000000..f4e176f86 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Lumos.cpp @@ -0,0 +1,180 @@ +#include "pch.h" +#include "Lumos.h" + +#include "GameInstance.h" +#include "EffectParts.h" +#include "Wand.h" + +CLumos::CLumos(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CEffect_Container{ pDevice, pContext } +{ +} + +CLumos::CLumos(const CLumos& rhs) + : CEffect_Container(rhs) +{ +} + +HRESULT CLumos::Initialize_Prototype() +{ + + return S_OK; + +} + +HRESULT CLumos::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/Lumos"))) + return E_FAIL; + + m_wstrEffectName = L"Lumos"; + + m_pLumos_Light = Get_PartObject("Lumos"); + + SAFE_ADDREF(m_pLumos_Light); + + m_fDuration = 2.5f; + + return S_OK; +} + +void CLumos::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); + +} + +void CLumos::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_pLumos_Light->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion()); + +} + +void CLumos::Late_Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Late_Update(fTimeDelta); + + +} + +HRESULT CLumos::Pre_Setting(CGameObject* pObject) +{ + if (pObject == nullptr) + return E_FAIL; + + m_pOwner = pObject; + + Reset_EffectParts(); + + m_fAccTime = 0.f; + __super::m_fAccTime = 0.f; + m_fPreAccTime = 0.f; + + CWand* pWand = static_cast(m_pOwner); + + if (pWand == nullptr) + return E_FAIL; + + m_pLumos_Light->Set_Visible(true); + m_pLumos_Light->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion()); + + m_bVisible = true; + + m_isLoop = true; + + return S_OK; +} + +HRESULT CLumos::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CLumos::Ready_Child() +{ + return S_OK; +} + +CLumos* CLumos::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CLumos* pInstance = new CLumos(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CLumos"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + + +CGameObject* CLumos::Clone(void* pArg, CGameObject* pOwner) +{ + CLumos* pInstance = new CLumos(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CLumos"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CLumos::OnCollision(CGameObject* pOther, void* pDesc) +{ + //CTransform* pOtherTransform = p + ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc); + +} + +void CLumos::Free() +{ + __super::Free(); + + Safe_Release(m_pLumos_Light); + +} +#ifdef _DEBUG + +void CLumos::Describe_Entity() +{ + +} + +#endif // _DEBUG + +HRESULT CLumos::Bind_ShaderResources() +{ + return S_OK; +} + + diff --git a/Jusin154_Team3D/Client/Private/Magic_Item.cpp b/Jusin154_Team3D/Client/Private/Magic_Item.cpp index 9ea657f63..8102488dd 100644 --- a/Jusin154_Team3D/Client/Private/Magic_Item.cpp +++ b/Jusin154_Team3D/Client/Private/Magic_Item.cpp @@ -220,6 +220,10 @@ HRESULT CMagic_Item::Bind_ShaderResources() { return E_FAIL; } + if (FAILED(m_pDiffuse_TextureCom6->Bind_ShaderResource(m_pShaderCom, "g_MaskingTexture", 0))) + { + return E_FAIL; + } if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) { return E_FAIL; @@ -317,6 +321,10 @@ HRESULT CMagic_Item::Ready_Components(void* pArg) { return E_FAIL; } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_tillingSmokes"), reinterpret_cast(&m_pDiffuse_TextureCom6), nullptr))) + { + return E_FAIL; + } if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr))) { return E_FAIL; @@ -361,6 +369,7 @@ void CMagic_Item::Free() SAFE_RELEASE(m_pDiffuse_TextureCom3); SAFE_RELEASE(m_pDiffuse_TextureCom4); SAFE_RELEASE(m_pDiffuse_TextureCom5); + SAFE_RELEASE(m_pDiffuse_TextureCom6); SAFE_RELEASE(m_pShaderCom); SAFE_RELEASE(m_pVIBufferCom); } diff --git a/Jusin154_Team3D/Client/Private/MapContainer.cpp b/Jusin154_Team3D/Client/Private/MapContainer.cpp index 7b2e2c76e..7cebfa2b1 100644 --- a/Jusin154_Team3D/Client/Private/MapContainer.cpp +++ b/Jusin154_Team3D/Client/Private/MapContainer.cpp @@ -1,6 +1,7 @@ #include "pch.h" #include "MapContainer.h" #include "PartObject.h" +#include "MapObject_Collision.h" //#include "MapObject_LOD.h" @@ -44,6 +45,10 @@ void CMapContainer::Priority_Update(_float fTimeDelta) void CMapContainer::Update(_float fTimeDelta) { +#ifdef _DEBUG + Describe_Entity(); +#endif // _DEBUG + __super::Update(fTimeDelta); } @@ -57,7 +62,33 @@ HRESULT CMapContainer::Render() return S_OK; } +void CMapContainer::ReadyForPhysX() +{ + vector::iterator iter = m_ColiisonPartObjects.begin(); + for (; iter != m_ColiisonPartObjects.end(); ++iter) { + CMapObject_Collision* pObject = static_cast(*iter); + pObject->ReadyForPhysX(); + } +} + +void CMapContainer::ConvertToPhysX() +{ + vector::iterator iter = m_ColiisonPartObjects.begin(); + for (; iter != m_ColiisonPartObjects.end(); ++iter) { + CMapObject_Collision* pObject = static_cast(*iter); + pObject->ConvertToPhysX(); + } +} + void CMapContainer::Free() { __super::Free(); } + +#ifdef _DEBUG + +void CMapContainer::Describe_Entity() +{ +} + +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/MapInfo.cpp b/Jusin154_Team3D/Client/Private/MapInfo.cpp index 3335b597b..35d2a9889 100644 --- a/Jusin154_Team3D/Client/Private/MapInfo.cpp +++ b/Jusin154_Team3D/Client/Private/MapInfo.cpp @@ -8,6 +8,7 @@ #include "MapObject_Render.h" #include "MapObject_Collision.h" #include "MapElement_Light.h" +#include "Layer.h" CMapInfo::CMapInfo() { @@ -15,6 +16,41 @@ CMapInfo::CMapInfo() void CMapInfo::Update(_float fTimeDelta) { +#ifdef _DEBUG + Describe_Entity(); +#endif // _DEBUG + + static _bool s_bConverted = { false }; + static _bool s_bReadyToCreate = { false }; + + if (true != s_bConverted || true != s_bReadyToCreate) { + CLayer* pLayer = m_pGameInstance->Get_Layer(CURRENT_LEVEL, LAYER_BACKGROUND); + if (nullptr == pLayer) { + return; + } + const list* pObjects = pLayer->Get_Objects(); + + if (false == s_bReadyToCreate) { + s_bReadyToCreate = true; + list::const_iterator iter = pObjects->begin(); + for (; iter != pObjects->end(); ++iter) { + CMapContainer* pContainer = dynamic_cast(*iter); + if (nullptr != pContainer) { + pContainer->ReadyForPhysX(); + } + } + } + else if (false == s_bConverted) { + s_bConverted = true; + list::const_iterator iter = pObjects->begin(); + for (; iter != pObjects->end(); ++iter) { + CMapContainer* pContainer = dynamic_cast(*iter); + if (nullptr != pContainer) { + pContainer->ConvertToPhysX(); + } + } + } + } } void CMapInfo::Change_Level() @@ -214,8 +250,9 @@ HRESULT CMapInfo::Load_MapRenderObjects(tinyxml2::XMLElement* Container, CMapCon Rotation->QueryFloatAttribute("y", &Desc.vRotation.y); Rotation->QueryFloatAttribute("z", &Desc.vRotation.z); - if (FAILED(pContainerObject->Add_Part(strKey, g_iStaticLevel, nullptr, &Desc))) + if (FAILED(pContainerObject->Add_Part(strKey, g_iStaticLevel, nullptr, &Desc))){ return E_FAIL; + } #pragma endregion } @@ -263,7 +300,6 @@ HRESULT CMapInfo::Load_MapCollisionObjects(tinyxml2::XMLElement* Container, CMap pContainerObject->Add_Collision(g_iStaticLevel, &Desc); #pragma endregion - } #pragma endregion @@ -397,3 +433,49 @@ void CMapInfo::Free() SAFE_RELEASE(m_pContext); } +#ifdef _DEBUG + +void CMapInfo::Describe_Entity() +{ + CLayer* pLayer = m_pGameInstance->Get_Layer(CURRENT_LEVEL, LAYER_BACKGROUND); + if (nullptr == pLayer) { + return; + } + static _bool s_bConverted = { false }; + static _bool s_bReadyToCreate = { false }; + + const list* pObjects = pLayer->Get_Objects(); + + GUI::Begin("MapInfoDesc"); + GUI::SetNextItemWidth(80.f); + GUI::BeginChild("CollisonPartObjects"); + GUI::SetNextItemWidth(80.f); + if (false == s_bReadyToCreate) { + if (GUI::Button("Ready_StaticMeshesForPhyX_ALL")) { + s_bReadyToCreate = true; + list::const_iterator iter = pObjects->begin(); + for (; iter != pObjects->end(); ++iter) { + CMapContainer* pContainer = dynamic_cast(*iter); + if (nullptr != pContainer) { + pContainer->ReadyForPhysX(); + } + } + } + } + else if (false == s_bConverted) { + if (GUI::Button("Convert_StaticMeshesForPhyX_ALL")) { + s_bConverted = true; + list::const_iterator iter = pObjects->begin(); + for (; iter != pObjects->end(); ++iter) { + CMapContainer* pContainer = dynamic_cast(*iter); + if (nullptr != pContainer) { + pContainer->ConvertToPhysX(); + } + } + } + } + GUI::EndChild(); + GUI::End(); +} + +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/MapObject_Collision.cpp b/Jusin154_Team3D/Client/Private/MapObject_Collision.cpp index a68619e07..eb4ef3e79 100644 --- a/Jusin154_Team3D/Client/Private/MapObject_Collision.cpp +++ b/Jusin154_Team3D/Client/Private/MapObject_Collision.cpp @@ -72,12 +72,59 @@ HRESULT CMapObject_Collision::Initialize(void* pArg) _wstring CMapObject_Collision::Get_PrototypeTag(_uint iLodIndex) { - if (m_iMaxLodLevel < iLodIndex) + if (m_iMaxLodLevel < iLodIndex){ return m_ModelPrototypeTags[0]; + } return m_ModelPrototypeTags[iLodIndex]; } +void CMapObject_Collision::ReadyForPhysX() +{ + if (true == m_bConverted) { + return; + } + m_bConverted = true; + + for (_uint iIndexLOD = 0; iIndexLOD < m_iMaxLodLevel + 1; ++iIndexLOD) + { + CModel* pModel = m_pModelComs[iIndexLOD]; + + if (FAILED(pModel->Ready_PhysXMeshes(XMLoadFloat4x4(&m_CombinedWorldMatrix)))) { + assert(false); + } + } +} + +void CMapObject_Collision::ConvertToPhysX() +{ + if (true == m_bReadyToCreatePhysX) { + return; + } + m_bReadyToCreatePhysX = true; + + m_RigidBodies.resize(m_iMaxLodLevel + 1); + for (_uint iIndexLOD = 0; iIndexLOD < m_iMaxLodLevel + 1; ++iIndexLOD) + { + CModel* pModel = m_pModelComs[iIndexLOD]; + + _uint iNumMeshes = pModel->Get_NumMeshes(); + + for (_uint iIndex = 0; iIndex < iNumMeshes; ++iIndex) + { + _wstring wstrName = CMyTools::ToWstring(pModel->Get_MeshName(iIndex)) + to_wstring(iIndex); + CRigidBody_Static* pRigidBody = { nullptr }; + CRigidBody_Static::RIGIDBODY_STATIC_DESC Desc = {}; + Desc.iSubKind = ENUM_CLASS(PXOBJECT::TERRAIN); + Desc.pMeshName = wstrName.c_str(); + if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, wstrName, (CComponent**)&pRigidBody, &Desc))) { + assert(false); + } + m_RigidBodies[iIndexLOD].push_back(pRigidBody); + } + } +} + HRESULT CMapObject_Collision::Ready_Components() { __super::Ready_Components(); @@ -93,19 +140,6 @@ HRESULT CMapObject_Collision::Ready_Components() } m_pModelComs.push_back(pModel); - - // _uint iMeshes = pModel->Get_NumMeshes(); - // for (_uint iIndex = 0; iIndex < iMeshes; ++iIndex) { - // _wstring wstrName = CMyTools::ToWstring(pModel->Get_MeshName(iIndex)) + to_wstring(iIndex); - // CRigidBody_Static* pRigidBody = { nullptr }; - // CRigidBody_Static::RIGIDBODY_STATIC_DESC Desc = {}; - // Desc.iSubKind = ENUM_CLASS(PXOBJECT::TERRAIN); - // Desc.pMeshName = wstrName.c_str(); - // if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, wstrName, (CComponent**)&pRigidBody, &Desc))) { - // return E_FAIL; - // } - // m_RigidBodies[iIndexLOD].push_back(pRigidBody); - // } } /* Com_Shader */ diff --git a/Jusin154_Team3D/Client/Private/NomalJap.cpp b/Jusin154_Team3D/Client/Private/NomalJap.cpp index 7b60c48a9..df6fd1f2b 100644 --- a/Jusin154_Team3D/Client/Private/NomalJap.cpp +++ b/Jusin154_Team3D/Client/Private/NomalJap.cpp @@ -50,7 +50,7 @@ HRESULT CNomalJap::Initialize(void* pArg) SAFE_ADDREF(m_pProjectile); SAFE_ADDREF(m_pProjectile_Side); - m_fDuration = 1.f; + m_fDuration = 1.7f; assert(m_fDuration > 0.f); return S_OK; } @@ -59,10 +59,6 @@ void CNomalJap::Priority_Update(_float fTimeDelta) { __super::Priority_Update(fTimeDelta); - if (nullptr != m_pPhysHitBox) { - m_pPhysHitBox->Get_Component()->RewindMomentum(); - } - } void CNomalJap::Update(_float fTimeDelta) @@ -80,15 +76,24 @@ void CNomalJap::Update(_float fTimeDelta) _vector vDirection = XMLoadFloat3(&m_vDirection); + //_vector vStartPos = Get_WorldPostion(); + //_float3 vfStartPos = {}; + //XMStoreFloat3(&vfStartPos, Get_WorldPostion()); // 선속도 m_pProjectile_Side->Get_Component()->Translation(vDirection * m_fLinearSpeed * fTimeDelta); m_pProjectile->Get_Component()->Translation(vDirection * m_fLinearSpeed * fTimeDelta); + //_vector vEndPos = Get_WorldPostion(); + + //_float3 vfEndPos = {}; + //XMStoreFloat3(&vfEndPos, Get_WorldPostion()); + + //_float3 vDir = {}; + //XMStoreFloat3(&vDir, vEndPos - vStartPos); + + //m_pGameInstance->SphereCast(0.125f, vfStartPos, vDir, XMVectorGetX(XMVector3Length(vEndPos - vStartPos)), ) - if (nullptr != m_pPhysHitBox) { - m_pPhysHitBox->Get_Component()->AccumulateMomentum(vDirection * m_fLinearSpeed * fTimeDelta); - } if (false == m_bTrailPulseEnded && m_fAccTime > m_fDuration * 0.3f) { m_bTrailPulseEnded = true; @@ -104,11 +109,10 @@ void CNomalJap::Update(_float fTimeDelta) SAFE_RELEASE(m_pTargetUnit); } - MoveHitBox(fTimeDelta); return; } if (true == m_bTrailPulseEnded) { - MoveHitBox(fTimeDelta); + return; } _vector vRotateUp = XMLoadFloat3(&m_vRotateUp); @@ -117,24 +121,14 @@ void CNomalJap::Update(_float fTimeDelta) // 각속도 m_pProjectile_Side->Get_Component()->Translation(vRotateUp * 0.6f * sinf(m_fAngularSpeed * m_fAccTime)); m_pProjectile->Get_Component()->Translation(vRotateUp * 0.6f * sinf(m_fAngularSpeed * m_fAccTime)); - - if (nullptr != m_pPhysHitBox) { - m_pPhysHitBox->Get_Component()->AccumulateMomentum(vRotateUp * 0.6f * sinf(m_fAngularSpeed * m_fAccTime)); - MoveHitBox(fTimeDelta); - } } -void CNomalJap::MoveHitBox(Engine::_float fTimeDelta) -{ - if (nullptr != m_pPhysHitBox) { - m_pPhysHitBox->Get_Component()->Move(fTimeDelta); - } -} void CNomalJap::Late_Update(_float fTimeDelta) { - if (m_bVisible == false) + if (m_bVisible == false){ return; + } Get_PartObject()->Trail_Update(m_pProjectile->Get_Component()->Get_XMWorldMatrix(), fTimeDelta); @@ -182,6 +176,9 @@ HRESULT CNomalJap::Pre_Setting(CGameObject* pObject) _vector vUp = XMVectorSet(0.f, 1.f, 0.f, 0.f); XMStoreFloat3(&m_vDirection, vDirection); + //Get_PartObject("Circle_Particle_Red")->Set_Visible(true); + //Get_PartObject("Circle_Particle_Red")->Get_Component()->Set_WorldMatrix(m_pOwner->Get_Component()->Get_XMWorldMatrix()); + _vector vQuaternion = XMQuaternionRotationAxis(vDirection, m_pGameInstance->Random_Float(0.f, XM_PIDIV2)); { /* 대상 위치 지정 */ @@ -223,23 +220,7 @@ HRESULT CNomalJap::Ready_Components(void* pArg) HRESULT CNomalJap::Ready_Child() { - CPhysXEffectHitBox::PHYSXDUMMY_DESC Desc{}; - m_pTransformCom->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion()); - - XMStoreFloat3(&Desc.vPos, m_pOwner->Get_WorldPostion() + XMVectorSet(0.f, 0.f, 1.f, 0.f)); - - Desc.vRotRPY = { 0.f, 0.f, 0.f }; - Desc.iSubKind = ENUM_CLASS(PXOBJECT::SKILL_NORMALJAP); - Desc.vDeltaPos = _float3(0.f, 0.f, 0.f); - Desc.vLifeTime = { 0.f, 1.f }; - - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, CURRENT_LEVEL, LAYER_HITBOX, &Desc, this, &m_pPhysHitBox))) { - assert(false); - return E_FAIL; - } - - SAFE_ADDREF(m_pPhysHitBox); return S_OK; } @@ -287,24 +268,17 @@ void CNomalJap::OnCollision(CGameObject* pOther, void* pDesc) SAFE_RELEASE(m_pTargetUnit); m_pProjectile_Side->Set_Visible(false); m_pProjectile->Set_Visible(false); + Get_PartObject("Circle_Particle_Red")->Set_Visible(false); Get_PartObject()->Set_Visible(false); Get_PartObject()->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f, 0.f, 0.f, 1.f)); - if (nullptr != m_pPhysHitBox) { - m_pPhysHitBox->Set_Dead(); - SAFE_RELEASE(m_pPhysHitBox); - } } void CNomalJap::Free() { __super::Free(); - if (m_pPhysHitBox != nullptr){ - SAFE_RELEASE(m_pPhysHitBox); - } - SAFE_RELEASE(m_pTargetUnit); Safe_Release(m_pProjectile); Safe_Release(m_pProjectile_Side); diff --git a/Jusin154_Team3D/Client/Private/NomalJapSide.cpp b/Jusin154_Team3D/Client/Private/NomalJapSide.cpp new file mode 100644 index 000000000..eef2a8b95 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/NomalJapSide.cpp @@ -0,0 +1,201 @@ +#include "pch.h" +#include "NomalJapSide.h" + +#include "GameInstance.h" +#include "EffectParts.h" +#include "Player.h" +#include "Wand.h" +#include "TrailObject.h" + + +CNomalJapSide::CNomalJapSide(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CEffect_Container{ pDevice, pContext } +{ +} + +CNomalJapSide::CNomalJapSide(const CNomalJapSide& rhs) + : CEffect_Container(rhs) +{ +} + +HRESULT CNomalJapSide::Initialize_Prototype() +{ + + return S_OK; + +} + +HRESULT CNomalJapSide::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/JapsideEffect"))) + return E_FAIL; + + m_wstrEffectName = L"JapSideEffect"; + + + m_pWandParticle = Get_PartObject("WandParticle1"); + m_pWandLight = Get_PartObject("Wand_Red_Long"); + m_pWandTrail = Get_PartObject(); + + SAFE_ADDREF(m_pWandLight); + SAFE_ADDREF(m_pWandTrail); + SAFE_ADDREF(m_pWandParticle); + + m_fDuration = 1.f; + + return S_OK; +} + +void CNomalJapSide::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); + +} + +void CNomalJapSide::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()); + + m_pWandTrail->Get_Component()->Trail_Update(fTimeDelta, pWand->Get_WorldMatrix()); + m_pWandParticle->Get_Component()->Set_WorldMatrix(pWand->Get_WorldMatrix()); + +} + +void CNomalJapSide::Late_Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Late_Update(fTimeDelta); + + +} + +HRESULT CNomalJapSide::Pre_Setting(CGameObject* pObject) +{ + if (pObject == nullptr) + return E_FAIL; + + m_pOwner = pObject; + + Reset_EffectParts(); + + m_fAccTime = 0.f; + __super::m_fAccTime = 0.f; + m_fPreAccTime = 0.f; + + + CWand* pWand = static_cast(m_pOwner); + + if (pWand == nullptr) + return E_FAIL; + + m_pWandParticle->Set_Visible(true); + + m_pWandLight->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()); + + + m_bVisible = true; + + return S_OK; +} + +HRESULT CNomalJapSide::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CNomalJapSide::Ready_Child() +{ + return S_OK; +} + +CNomalJapSide* CNomalJapSide::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CNomalJapSide* pInstance = new CNomalJapSide(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CNomalJapSide"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + + +CGameObject* CNomalJapSide::Clone(void* pArg, CGameObject* pOwner) +{ + CNomalJapSide* pInstance = new CNomalJapSide(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CNomalJapSide"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CNomalJapSide::OnCollision(CGameObject* pOther, void* pDesc) +{ + ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc); + +} + +void CNomalJapSide::Free() +{ + __super::Free(); + + + Safe_Release(m_pWandLight); + Safe_Release(m_pWandTrail); + Safe_Release(m_pWandParticle); +} +#ifdef _DEBUG + +void CNomalJapSide::Describe_Entity() +{ + +} + +#endif // _DEBUG + +HRESULT CNomalJapSide::Bind_ShaderResources() +{ + return S_OK; +} + + diff --git a/Jusin154_Team3D/Client/Private/Player.cpp b/Jusin154_Team3D/Client/Private/Player.cpp index 68f69638e..999da4f0e 100644 --- a/Jusin154_Team3D/Client/Private/Player.cpp +++ b/Jusin154_Team3D/Client/Private/Player.cpp @@ -392,22 +392,12 @@ void CPlayer::Update_CameraCoordinateSystem() _matrix CPlayer::Get_WandPos() { - CModel* pWand = Get_PartObject()->Get_Component(); + CWand* pWand = Get_PartObject(); if (pWand == nullptr) return _matrix(); - _matrix BoneMatrix = XMLoadFloat4x4(pWand->Get_BoneMatrixPtr("root")); - - BoneMatrix = BoneMatrix * m_pTransformCom->Get_XMWorldMatrix(); - - _float3 vOffset = _float3(0.f, -0.27f, -0.32f); - - BoneMatrix.r[3] += XMVector3Normalize(BoneMatrix.r[0]) * vOffset.x; - BoneMatrix.r[3] += XMVector3Normalize(BoneMatrix.r[1]) * vOffset.y; - BoneMatrix.r[3] += XMVector3Normalize(BoneMatrix.r[2]) * vOffset.z; - - return BoneMatrix; + return pWand->Get_WorldMatrix(); } void CPlayer::Play_Event() diff --git a/Jusin154_Team3D/Client/Private/Player_States.cpp b/Jusin154_Team3D/Client/Private/Player_States.cpp index 2b9aa349e..5c13af692 100644 --- a/Jusin154_Team3D/Client/Private/Player_States.cpp +++ b/Jusin154_Team3D/Client/Private/Player_States.cpp @@ -56,6 +56,8 @@ void CPlayer::TestKeyInput(_float fTimeDelta) if (m_pGameInstance->Key_Down(DIK_F7)) { m_eSpell = STATEANIM::LUMOS; + + m_pEffectPool->Use_Skill(SKILL_TYPE::LUMOS, Get_PartObject()); } } @@ -718,7 +720,10 @@ void CPlayer::Behavior_CombatEnter() else if (m_pGameInstance->Mouse_Up(DIM_LBUTTON)) { m_pFSM->Enable_State(FSMSTATE::LIGHT_ATTACK); pairAnimInfo = m_Animation[STATEANIM::LIGHT_ATTACK]; + Add_Event(pairAnimInfo.first, [this]() { m_pEffectPool->Use_Skill(SKILL_TYPE::JAP, Get_PartObject()); }, 0.1f); + + Add_Event(pairAnimInfo.first, [this]() { m_pEffectPool->Use_Skill(SKILL_TYPE::JAP_SIDE, Get_PartObject()); }, 0.0f); } else if (SUCCEEDED(InputSpell())) { m_pFSM->Enable_State(FSMSTATE::SPELL); @@ -726,13 +731,45 @@ void CPlayer::Behavior_CombatEnter() { switch (m_eSpell) { + case STATEANIM::ACCIO: + + pairAnimInfo = m_Animation[STATEANIM::SPELL]; + + Add_Event(pairAnimInfo.first, + [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::BOMBARDA_SIDE, Get_PartObject()); }, + 0.f); + + break; + + case STATEANIM::DESCENDO: + + pairAnimInfo = m_Animation[STATEANIM::SPELL]; + + Add_Event(pairAnimInfo.first, + [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::DESCENDO_SIDE, Get_PartObject()); }, + 0.f); + + break; case STATEANIM::DEPULSO: pairAnimInfo = m_Animation[STATEANIM::DEPULSO]; + + + Add_Event(pairAnimInfo.first, + [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::LEVIOSO, this); }, + 0.2f); + + Add_Event(pairAnimInfo.first, + [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::LEVIOSO_SIDE, Get_PartObject()); }, + 0.f); + m_eSpell = STATEANIM::END; break; case STATEANIM::DIFFINDO: pairAnimInfo = m_Animation[STATEANIM::DIFFINDO]; + + + m_eSpell = STATEANIM::END; break; case STATEANIM::DISILLUSION_ENTER: @@ -790,7 +827,12 @@ void CPlayer::Behavior_CombatEnter() } } else + { + + + pairAnimInfo = m_Animation[STATEANIM::SPELL]; + } } else if (m_pGameInstance->Key_Down(DIK_V)) { m_pFSM->Enable_State(FSMSTATE::MAPHELP); @@ -916,9 +958,14 @@ HRESULT CPlayer::Behavior_CombatExitCheck() { pairAnimInfo = m_Animation[STATEANIM::ACCIO]; Add_Event(pairAnimInfo.first, + [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::BOMBARDA, this);}, 0.15f); + + + m_eSpell = STATEANIM::END; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); } break; @@ -928,10 +975,21 @@ HRESULT CPlayer::Behavior_CombatExitCheck() Add_Event(pairAnimInfo.first, [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::DESCENDO, this);}, 0.1f); + m_eSpell = STATEANIM::END; m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); } break; + + case STATEANIM::DEPULSO: + { + pairAnimInfo = m_Animation[STATEANIM::DEPULSO]; + + + m_eSpell = STATEANIM::END; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + } + break; default: break; } diff --git a/Jusin154_Team3D/Client/Private/Potion.cpp b/Jusin154_Team3D/Client/Private/Potion.cpp index d6885dcba..2d52f3062 100644 --- a/Jusin154_Team3D/Client/Private/Potion.cpp +++ b/Jusin154_Team3D/Client/Private/Potion.cpp @@ -40,9 +40,8 @@ HRESULT CPotion::Initialize(void* pArg) m_fTimeMult = 3.f; m_fAlpha = 1.f; m_fAlphaTime = 1.f; - m_vImageSlotPos = _float2(45.f,45.f); - m_vImageSize = _float2(32.f,32.f); - m_bActive = true; + m_vImageSlotPos = _float2(45.f, 45.f); + m_vImageSize = _float2(32.f, 32.f); return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Skill_Data.cpp b/Jusin154_Team3D/Client/Private/Skill_Data.cpp index bcb5590be..eb1b84575 100644 --- a/Jusin154_Team3D/Client/Private/Skill_Data.cpp +++ b/Jusin154_Team3D/Client/Private/Skill_Data.cpp @@ -1 +1,146 @@ #include "pch.h" +#include "Skill_Data.h" +#include "GameObject.h" +#include "UIObject.h" +#include "tinyxml2.h" + +; + +CSkill_Data::CSkill_Data(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CGameObject(pDevice, pContext) +{ +} + +CSkill_Data::CSkill_Data(const CSkill_Data& rhs) + :CGameObject(rhs) +{ +} + +HRESULT CSkill_Data::Initialize_Prototype() +{ + + return S_OK; +} + +HRESULT CSkill_Data::Initialize(void* pArg) +{ + auto* pInfo = static_cast(pArg); + + tinyxml2::XMLDocument doc; + tinyxml2::XMLError Error = doc.LoadFile("../Bin/Resources/Data/UI/Spell/SpellInfo.xml"); + if (Error != tinyxml2::XML_SUCCESS) + return E_FAIL; + + tinyxml2::XMLElement* pSpellInfo = doc.FirstChildElement("SpellInfo"); + if (!pSpellInfo) + return E_FAIL; + + tinyxml2::XMLElement* pSpell = pSpellInfo->FirstChildElement("Spell"); + while (pSpell) + { + int id = 0; + pSpell->QueryIntAttribute("Spell_ID", &id); + + if (id < 0 || id > 34) + { + pSpell = pSpell->NextSiblingElement("Spell"); + continue; + } + + pInfo[id].iSpell_ID = id; + pInfo[id].pSpell_Name = CMyTools::ToWstring(pSpell->Attribute("Spell_Name")); + pInfo[id].pImage_Name = CMyTools::ToWstring(pSpell->Attribute("Image_Name")); + pSpell->QueryIntAttribute("Spell_Type", &pInfo[id].iSpell_Type); + pSpell->QueryIntAttribute("Skill_Type", &pInfo[id].iSkill_Type); + pSpell->QueryFloatAttribute("Spell_Cooltime", &pInfo[id].fSpell_CoolTime); + pSpell->QueryFloatAttribute("Duration", &pInfo[id].fDuration); + pSpell->QueryIntAttribute("AnimNum", &pInfo[id].iAnimNum); + pInfo[id].pSpellInfo = CMyTools::ToWstring(pSpell->Attribute("SpellInfo")); + int lock = 0, equip = 0; + pSpell->QueryIntAttribute("Spell_Lock", &lock); + pSpell->QueryIntAttribute("Equip_Spell", &equip); + pInfo[id].bSpell_Lock = lock != 0; + pInfo[id].bEquip_Spell = equip != 0; + + pSpell = pSpell->NextSiblingElement("Spell"); + } + + //pInfo = SpellInfo; + return S_OK; +} + +//const CUIObject::SPELLINFO& CSkill_Data::Get_Info(_uint SpellID) const +//{ +// return SpellInfo[SpellID]; +//} + +void CSkill_Data::Priority_Update(_float fTimeDelta) +{ +} + +void CSkill_Data::Update(_float fTimeDelta) +{ +} + +void CSkill_Data::Late_Update(_float fTimeDelta) +{ +} + +HRESULT CSkill_Data::Render() +{ + return S_OK; +} + +_vector CSkill_Data::Get_WorldPostion() +{ + return _vector(); +} + +HRESULT CSkill_Data::Bind_ShaderResources() +{ + return S_OK; +} + +HRESULT CSkill_Data::Ready_Components(void* pArg) +{ + return S_OK; +} + +CSkill_Data* CSkill_Data::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CSkill_Data* pInstance = new CSkill_Data(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CSkill_Data"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CSkill_Data::Clone(void* pArg, CGameObject* pOwner) +{ + CSkill_Data* pInstance = new CSkill_Data(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CSkill_Data"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CSkill_Data::Free() +{ + __super::Free(); + +} +#ifdef _DEBUG + +void CSkill_Data::Describe_Entity() +{ +} + +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Spell_Anim.cpp b/Jusin154_Team3D/Client/Private/Spell_Anim.cpp new file mode 100644 index 000000000..cf6daec60 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Spell_Anim.cpp @@ -0,0 +1,278 @@ +#include "pch.h" +#include "Spell_Anim.h" +#include "GameInstance.h" + +CSpell_Anim::CSpell_Anim(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CSpell_Anim::CSpell_Anim(const CSpell_Anim& rhs) + :CElementObject(rhs) +{ +} + +HRESULT CSpell_Anim::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CSpell_Anim::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 590.f; + Desc.fY = -100.f; + Desc.fSizeX = 470.f; + Desc.fSizeY = 250.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 = 0.f; + m_fAlphaTime = 9.f; + m_fSortZ = 0.01f; + m_iTotalFrames = 120; + m_fFrameTime = 0.1f; + m_iCurrentFrame = 0; + m_bAnim_Start = false; + static_cast(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); }); + static_cast(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); }); + static_cast(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); }); + return S_OK; +} + +void CSpell_Anim::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CSpell_Anim::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) + { + m_bFadeOut = false; + m_fAlpha = 0.f; + m_bAnim_Start = false; + } + + + if (m_bAnim_Start == true) + { + m_fTime += fTimeDelta * m_fTimeMult; + } + else + { + m_iCurrentFrame = 0; + } + + if (m_fTime >= m_fFrameTime) + { + m_iCurrentFrame++; + m_fTime -= m_fFrameTime; + + if (m_iCurrentFrame >= m_iTotalFrames) + m_iCurrentFrame = 0; + } + + __super::Update(fTimeDelta); +} + +void CSpell_Anim::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) { + if (m_pDiffuse_TextureCom != nullptr) + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + } + __super::Late_Update(fTimeDelta); +} + +HRESULT CSpell_Anim::Render() +{ + + if (FAILED(Bind_ShaderResources())) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ALPHABLEND)))) + { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) + { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) + { + return E_FAIL; + } + + return S_OK; +} + +_vector CSpell_Anim::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +void CSpell_Anim::Set_FadeIn() +{ + if (!m_bFadeIn && m_fAlpha < 1.f) + { + m_bFadeIn = true; + m_bFadeOut = false; + } + m_bAnim_Start = true; +} + +void CSpell_Anim::Change_Image(_int SpellID) +{ + _wstring pImageName = static_cast(m_pOwner)->Get_Info(SpellID).pImage_Name; + m_iTotalFrames = static_cast(m_pOwner)->Get_Info(SpellID).iAnimNum; + 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; +} + +void CSpell_Anim::Set_SkillType(_int eType) +{ + if (eType != -1 && eType != m_iPerSpell) + { + m_iPerSpell = eType; + m_iCurrentFrame = 0; + Change_Image(eType); + } +} + +HRESULT CSpell_Anim::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", m_iCurrentFrame))) + { + 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 CSpell_Anim::Ready_Components(void* pArg) +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Arresto_Momentum"), 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; +} + + +CSpell_Anim* CSpell_Anim::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CSpell_Anim* pInstance = new CSpell_Anim(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CSpell_Anim"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CSpell_Anim::Clone(void* pArg, CGameObject* pOwner) +{ + CSpell_Anim* pInstance = new CSpell_Anim(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CSpell_Anim"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CSpell_Anim::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +#ifdef _DEBUG +void CSpell_Anim::Describe_Entity() +{ +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Spell_Canvas.cpp b/Jusin154_Team3D/Client/Private/Spell_Canvas.cpp new file mode 100644 index 000000000..c44c70c76 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Spell_Canvas.cpp @@ -0,0 +1,138 @@ +#include "pch.h" +#include "Spell_Canvas.h" +#include "GameInstance.h" +#include "Spell_Panel.h" + +CSpell_Canvas::CSpell_Canvas(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CCanvasObject(pDevice, pContext) +{ +} + +CSpell_Canvas::CSpell_Canvas(const CSpell_Canvas& rhs) + :CCanvasObject(rhs) +{ +} + +HRESULT CSpell_Canvas::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CSpell_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; + } + return S_OK; +} + +void CSpell_Canvas::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); +} + +void CSpell_Canvas::Update(_float fTimeDelta) +{ + __super::Update(fTimeDelta); +} + +void CSpell_Canvas::Late_Update(_float fTimeDelta) +{ + if (m_bVisible) { + } + __super::Late_Update(fTimeDelta); +} + +HRESULT CSpell_Canvas::Render() +{ + return S_OK; +} + +_vector CSpell_Canvas::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CSpell_Canvas::Bind_ShaderResources() +{ + return S_OK; +} + +HRESULT CSpell_Canvas::Ready_Components(void* pArg) +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CSpell_Canvas::Ready_Panel(void* pArg) +{ + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pSpell_Panel)))) + { + return E_FAIL; + } + Add_Panel(TEXT("Spell_Panel"), m_pSpell_Panel); + return S_OK; +} + +void CSpell_Canvas::Clear_Penel() +{ + +} + +CSpell_Canvas* CSpell_Canvas::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CSpell_Canvas* pInstance = new CSpell_Canvas(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CSpell_Canvas"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CSpell_Canvas::Clone(void* pArg, CGameObject* pOwner) +{ + CSpell_Canvas* pInstance = new CSpell_Canvas(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CSpell_Canvas"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CSpell_Canvas::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pVIBufferCom); +} + +#ifdef _DEBUG +void CSpell_Canvas::Describe_Entity() +{ +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Spell_Header.cpp b/Jusin154_Team3D/Client/Private/Spell_Header.cpp new file mode 100644 index 000000000..f0a2db064 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Spell_Header.cpp @@ -0,0 +1,239 @@ +#include "pch.h" +#include "Spell_Header.h" +#include "GameInstance.h" + +CSpell_Header::CSpell_Header(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CSpell_Header::CSpell_Header(const CSpell_Header& rhs) + :CElementObject(rhs) +{ +} + +HRESULT CSpell_Header::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CSpell_Header::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 600.f; + Desc.fY = -385.f; + Desc.fSizeX = 512.f; + Desc.fSizeY = 64.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 = 0.f; + m_fAlphaTime = 5.f; + m_fMoveSpeed = 5.f; + m_fLerpX = m_fX; + m_fLerpY = 45; + static_cast(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); }); + static_cast(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); }); + static_cast(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); }); + return S_OK; +} + +void CSpell_Header::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CSpell_Header::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_iSpellType != -1) + { + m_iSkillType = static_cast(m_pOwner)->Get_Info(m_iSpellType).iSpell_Type; + } + + m_fTime += fTimeDelta * m_fTimeMult; + __super::Update(fTimeDelta); +} + +void CSpell_Header::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + __super::Late_Update(fTimeDelta); + } +} + +HRESULT CSpell_Header::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::SPELL_HEADER)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + + return S_OK; +} + +_vector CSpell_Header::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CSpell_Header::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_iSpellType", &m_iSkillType, sizeof(_int)))) + { + return E_FAIL; + } + return S_OK; +} + +HRESULT CSpell_Header::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_LighthouseHeaderBack"), 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; +} + +CSpell_Header* CSpell_Header::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CSpell_Header* pInstance = new CSpell_Header(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CSpell_Header"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CSpell_Header::Clone(void* pArg, CGameObject* pOwner) +{ + CSpell_Header* pInstance = new CSpell_Header(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CSpell_Header"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CSpell_Header::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +#ifdef _DEBUG +void CSpell_Header::Describe_Entity() +{ +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Spell_Header_Line.cpp b/Jusin154_Team3D/Client/Private/Spell_Header_Line.cpp new file mode 100644 index 000000000..1bd1c8aa5 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Spell_Header_Line.cpp @@ -0,0 +1,225 @@ +#include "pch.h" +#include "Spell_Header_Line.h" +#include "GameInstance.h" + +CSpell_Header_Line::CSpell_Header_Line(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CSpell_Header_Line::CSpell_Header_Line(const CSpell_Header_Line& rhs) + :CElementObject(rhs) +{ +} + +HRESULT CSpell_Header_Line::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CSpell_Header_Line::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 600.f; + Desc.fY = -345.f; + Desc.fSizeX = 487.f; + Desc.fSizeY = 18.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 = 0.f; + m_fAlphaTime = 5.f; + static_cast(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); }); + static_cast(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); }); + return S_OK; +} + +void CSpell_Header_Line::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CSpell_Header_Line::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 CSpell_Header_Line::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + __super::Late_Update(fTimeDelta); + } +} + +HRESULT CSpell_Header_Line::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ALPHABLEND)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + + return S_OK; +} + +_vector CSpell_Header_Line::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CSpell_Header_Line::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; + } + return S_OK; +} + +HRESULT CSpell_Header_Line::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_Header_Line"), 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; +} + +CSpell_Header_Line* CSpell_Header_Line::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CSpell_Header_Line* pInstance = new CSpell_Header_Line(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CSpell_Header_Line"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CSpell_Header_Line::Clone(void* pArg, CGameObject* pOwner) +{ + CSpell_Header_Line* pInstance = new CSpell_Header_Line(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CSpell_Header"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CSpell_Header_Line::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +#ifdef _DEBUG +void CSpell_Header_Line::Describe_Entity() +{ +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Spell_Hover.cpp b/Jusin154_Team3D/Client/Private/Spell_Hover.cpp new file mode 100644 index 000000000..999d66fdc --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Spell_Hover.cpp @@ -0,0 +1,302 @@ +#include "pch.h" +#include "Spell_Hover.h" +#include "GameInstance.h" + +CSpell_Hover::CSpell_Hover(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CSpell_Hover::CSpell_Hover(const CSpell_Hover& rhs) + :CElementObject(rhs) +{ +} + +HRESULT CSpell_Hover::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CSpell_Hover::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 0.f; + Desc.fY = 0.f; + Desc.fSizeX = 105.f; + Desc.fSizeY = 105.f; + + m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) }; + + if (FAILED(__super::Initialize(&Desc))) + { + return E_FAIL; + } + if (FAILED(Ready_Components(pArg))) + { + return E_FAIL; + } + + m_fAlpha = 1.f; + m_fTimeMult = 3.f; + m_fAlphaTime = 1.f; + m_fOffSetX = 120.f; + m_fOffSetY = 122.f; + m_iCols = 4; + m_pVIBufferCom->Set_Cloned(true); + m_pVIBufferCom->Set_Pos(-185.f, 375.f, m_fOffSetX, m_fOffSetY, m_iCols); + m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); + static_cast(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); }); + return S_OK; +} + +void CSpell_Hover::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CSpell_Hover::Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + + if (m_bFadeIn == true) + { + if (m_fAlpha <= 1.f) + m_fAlpha += fTimeDelta * m_fAlphaTime; + + if (m_fAlpha >= 1.f) + { + m_bFadeIn = false; + m_fAlpha = 1.f; + } + } + + if (m_bFadeOut == true) + { + if (m_fAlpha >= 0.f) + m_fAlpha -= fTimeDelta; + + if (m_fAlpha <= 0.f) + { + m_bFadeOut = false; + m_fAlpha = 0.f; + } + } + + m_pVIBufferCom->Set_Hover_Index(m_iSpellType); + + m_fTime += fTimeDelta * m_fTimeMult; + __super::Update(fTimeDelta); +} + +void CSpell_Hover::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) + { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + } + __super::Late_Update(fTimeDelta); +} + +HRESULT CSpell_Hover::Render() +{ + if (FAILED(Bind_ShaderResources())) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIINTANCE::SPELL_HOVER)))) + { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) + { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) + { + return E_FAIL; + } + + return S_OK; +} + +_vector CSpell_Hover::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +void CSpell_Hover::SizeUpX(_float fSizeX) +{ + m_fSizeX = fSizeX; + m_pVIBufferCom->Set_SizeX(m_fSizeX); +} + +void CSpell_Hover::SizeUpY(_float fSizeY) +{ + m_fSizeY = fSizeY; + m_pVIBufferCom->Set_SizeY(m_fSizeY); +} + +void CSpell_Hover::SizeUpdate(_float fSizeX, _float fSizeY) +{ + m_fSizeX = fSizeX; + m_fSizeY = fSizeY; + m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); +} + +HRESULT CSpell_Hover::Bind_ShaderResources() +{ + if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom1->Bind_ShaderResource(m_pShaderCom, "g_Texture1", 0))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom2->Bind_ShaderResource(m_pShaderCom, "g_Texture2", 0))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom3->Bind_ShaderResource(m_pShaderCom, "g_Texture3", 0))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom4->Bind_ShaderResource(m_pShaderCom, "g_Texture4", 0))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom5->Bind_ShaderResource(m_pShaderCom, "g_Texture5", 0))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fAngle", &m_fAngle, 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 CSpell_Hover::Ready_Components(void* pArg) +{ + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_UI_Spell_List"), (CComponent**)&m_pVIBufferCom, nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_IconButtonOutline"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_IconButtonHighlight"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_GoldLeaf"), reinterpret_cast(&m_pDiffuse_TextureCom2), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_Goldleaf_Large"), reinterpret_cast(&m_pDiffuse_TextureCom3), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_IconButton"), reinterpret_cast(&m_pDiffuse_TextureCom4), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_SelectedPresetBorder"), reinterpret_cast(&m_pDiffuse_TextureCom5), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIINSTANCE, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + + return S_OK; +} + +CSpell_Hover* CSpell_Hover::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CSpell_Hover* pInstance = new CSpell_Hover(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CSpell_Hover"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CSpell_Hover::Clone(void* pArg, CGameObject* pOwner) +{ + CSpell_Hover* pInstance = new CSpell_Hover(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CSpell_Hover"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CSpell_Hover::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pDiffuse_TextureCom1); + SAFE_RELEASE(m_pDiffuse_TextureCom2); + SAFE_RELEASE(m_pDiffuse_TextureCom3); + SAFE_RELEASE(m_pDiffuse_TextureCom4); + SAFE_RELEASE(m_pDiffuse_TextureCom5); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +#ifdef _DEBUG +void CSpell_Hover::Describe_Entity() +{ +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Spell_Hover_Effect.cpp b/Jusin154_Team3D/Client/Private/Spell_Hover_Effect.cpp new file mode 100644 index 000000000..5ed2de67a --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Spell_Hover_Effect.cpp @@ -0,0 +1,266 @@ +#include "pch.h" +#include "Spell_Hover_Effect.h" +#include "GameInstance.h" + +CSpell_Hover_Effect::CSpell_Hover_Effect(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CSpell_Hover_Effect::CSpell_Hover_Effect(const CSpell_Hover_Effect& rhs) + :CElementObject(rhs) +{ +} + +HRESULT CSpell_Hover_Effect::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CSpell_Hover_Effect::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 0.f; + Desc.fY = 0.f; + Desc.fSizeX = 115.f; + Desc.fSizeY = 115.f; + + m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) }; + + if (FAILED(__super::Initialize(&Desc))) + { + return E_FAIL; + } + if (FAILED(Ready_Components(pArg))) + { + return E_FAIL; + } + + m_fAlpha = 1.f; + m_fTimeMult = 1.f; + m_fAlphaTime = 1.f; + m_fOffSetX = 120.f; + m_fOffSetY = 122.f; + m_iCols = 4; + m_fSortZ = 0.02f; + m_pVIBufferCom->Set_Cloned(true); + m_pVIBufferCom->Set_Pos(-185.f, 375.f, m_fOffSetX, m_fOffSetY, m_iCols); + m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); + static_cast(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); }); + return S_OK; +} + +void CSpell_Hover_Effect::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CSpell_Hover_Effect::Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + + if (m_bFadeIn == true) + { + if (m_fAlpha <= 1.f) + m_fAlpha += fTimeDelta * m_fAlphaTime; + + if (m_fAlpha >= 1.f) + { + m_bFadeIn = false; + m_fAlpha = 1.f; + } + } + + if (m_bFadeOut == true) + { + if (m_fAlpha >= 0.f) + m_fAlpha -= fTimeDelta; + + if (m_fAlpha <= 0.f) + { + m_bFadeOut = false; + m_fAlpha = 0.f; + } + } + m_pVIBufferCom->Set_Hover_Index(m_iSpellType); + m_fTime += fTimeDelta * m_fTimeMult; + __super::Update(fTimeDelta); +} + +void CSpell_Hover_Effect::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) + { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + } + __super::Late_Update(fTimeDelta); +} + +HRESULT CSpell_Hover_Effect::Render() +{ + if (FAILED(Bind_ShaderResources())) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIINTANCE::SPELL_SLOT_EFFECT)))) + { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) + { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) + { + return E_FAIL; + } + + return S_OK; +} + +_vector CSpell_Hover_Effect::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +void CSpell_Hover_Effect::SizeUpX(_float fSizeX) +{ + m_fSizeX = fSizeX; + m_pVIBufferCom->Set_SizeX(m_fSizeX); +} + +void CSpell_Hover_Effect::SizeUpY(_float fSizeY) +{ + m_fSizeY = fSizeY; + m_pVIBufferCom->Set_SizeY(m_fSizeY); +} + +void CSpell_Hover_Effect::SizeUpdate(_float fSizeX, _float fSizeY) +{ + m_fSizeX = fSizeX; + m_fSizeY = fSizeY; + m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); +} + +HRESULT CSpell_Hover_Effect::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_MaskTexture", 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_fAngle", &m_fAngle, 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 CSpell_Hover_Effect::Ready_Components(void* pArg) +{ + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_UI_Spell_List"), (CComponent**)&m_pVIBufferCom, nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_SelectedBorderMask"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_VFX_T_WhispLine_D"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIINSTANCE, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + + return S_OK; +} + +CSpell_Hover_Effect* CSpell_Hover_Effect::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CSpell_Hover_Effect* pInstance = new CSpell_Hover_Effect(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CSpell_Hover_Effect"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CSpell_Hover_Effect::Clone(void* pArg, CGameObject* pOwner) +{ + CSpell_Hover_Effect* pInstance = new CSpell_Hover_Effect(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CSpell_Hover_Effect"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CSpell_Hover_Effect::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pDiffuse_TextureCom1); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +#ifdef _DEBUG +void CSpell_Hover_Effect::Describe_Entity() +{ +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Spell_List.cpp b/Jusin154_Team3D/Client/Private/Spell_List.cpp new file mode 100644 index 000000000..c88354197 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Spell_List.cpp @@ -0,0 +1,304 @@ +#include "pch.h" +#include "Spell_List.h" +#include "GameInstance.h" + +CSpell_List::CSpell_List(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CSpell_List::CSpell_List(const CSpell_List& rhs) + :CElementObject(rhs) +{ +} + +HRESULT CSpell_List::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CSpell_List::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 0.f; + Desc.fY = 0.f; + Desc.fSizeX = 105.f; + Desc.fSizeY = 105.f; + + m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) }; + + if (FAILED(__super::Initialize(&Desc))) + { + return E_FAIL; + } + if (FAILED(Ready_Components(pArg))) + { + return E_FAIL; + } + + m_fAlpha = 1.f; + m_fTimeMult = 3.f; + m_fAlphaTime = 1.f; + m_fOffSetX = 120.f; + m_fOffSetY = 122.f; + m_iCols = 4; + m_pVIBufferCom->Set_Cloned(true); + m_pVIBufferCom->Set_Pos(-185.f, 375.f, m_fOffSetX, m_fOffSetY, m_iCols); + m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); + m_fDelayTime = 0.5f; + m_iPerSpell_Slot = -1; + Color(); + return S_OK; +} + +void CSpell_List::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CSpell_List::Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + + if (m_bFadeIn == true) + { + if (m_fAlpha <= 1.f) + m_fAlpha += fTimeDelta * m_fAlphaTime; + + if (m_fAlpha >= 1.f) + { + m_bFadeIn = false; + m_fAlpha = 1.f; + } + } + + if (m_bFadeOut == true) + { + if (m_fAlpha >= 0.f) + m_fAlpha -= fTimeDelta; + + if (m_fAlpha <= 0.f) + { + m_bFadeOut = false; + m_fAlpha = 0.f; + } + } + m_fTime += fTimeDelta * m_fTimeMult; + Hover(fTimeDelta); + __super::Update(fTimeDelta); +} + +void CSpell_List::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) + { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + } + __super::Late_Update(fTimeDelta); +} + + +HRESULT CSpell_List::Render() +{ + if (FAILED(Bind_ShaderResources())) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIINTANCE::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 CSpell_List::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +void CSpell_List::SizeUpX(_float fSizeX) +{ + m_fSizeX = fSizeX; + m_pVIBufferCom->Set_SizeX(m_fSizeX); +} + +void CSpell_List::SizeUpY(_float fSizeY) +{ + m_fSizeY = fSizeY; + m_pVIBufferCom->Set_SizeY(m_fSizeY); +} + +void CSpell_List::SizeUpdate(_float fSizeX, _float fSizeY) +{ + m_fSizeX = fSizeX; + m_fSizeY = fSizeY; + m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); +} + +void CSpell_List::Color() +{ + m_pVIBufferCom->Set_Index_Renge_Color(0, 3, _float4(255.f / 255.f, 255.f / 255.f, 0.f / 255.f, 1.f)); + m_pVIBufferCom->Set_Index_Renge_Color(4, 7, _float4(150.f / 255.f, 120.f / 255.f, 240.f / 255.f, 1.f)); + m_pVIBufferCom->Set_Index_Renge_Color(8, 12, _float4(190.f / 255.f, 46.f / 255.f, 34.f / 255.f, 1.f)); + m_pVIBufferCom->Set_Index_Renge_Color(13, 16, _float4(24.f / 255.f, 190.f / 255.f, 255.f / 255.f, 1.f)); + m_pVIBufferCom->Set_Index_Renge_Color(17, 19, _float4(200.f / 255.f, 220.f / 255.f, 150.f / 255.f, 1.f)); + m_pVIBufferCom->Set_Index_Renge_Color(20, 22, _float4(50.f / 255.f, 150.f / 255.f, 110.f / 255.f, 1.f)); + m_pVIBufferCom->Set_Index_Renge_Color(23, 25, _float4(24.f / 255.f, 190.f / 255.f, 255.f / 255.f, 1.f)); +} + +void CSpell_List::Hover(_float 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 -= m_pOwner->Get_WorldPostion().m128_f32[0]; + fMouse.y -= m_pOwner->Get_WorldPostion().m128_f32[1]; + + m_iSpellType = m_pVIBufferCom->Set_Mouse_Hover(fMouse); + + CUIObject::HOVER_INFO Info; + Info.iSlotID = 0; + if (m_iSpellType == -1) + { + Info.iHover_Index = -1; + static_cast(m_pOwner)->Function_Callback(TEXT("Hover"), &Info); + } + + else + { + Info.iHover_Index = m_iSpellType; + static_cast(m_pOwner)->Function_Callback(TEXT("Hover"), &Info); + } + +} + +HRESULT CSpell_List::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_fAngle", &m_fAngle, 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_fTime", &m_fTime, sizeof(_float)))) + { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CSpell_List::Ready_Components(void* pArg) +{ + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_UI_Spell_List"), (CComponent**)&m_pVIBufferCom, nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_SpellType_Generic"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIINSTANCE, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + + return S_OK; +} + +CSpell_List* CSpell_List::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CSpell_List* pInstance = new CSpell_List(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CSpell_List"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CSpell_List::Clone(void* pArg, CGameObject* pOwner) +{ + CSpell_List* pInstance = new CSpell_List(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CSpell_List"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CSpell_List::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +#ifdef _DEBUG +void CSpell_List::Describe_Entity() +{ +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Spell_List_Image.cpp b/Jusin154_Team3D/Client/Private/Spell_List_Image.cpp new file mode 100644 index 000000000..2d03173e0 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Spell_List_Image.cpp @@ -0,0 +1,288 @@ +#include "pch.h" +#include "Spell_List_Image.h" +#include "GameInstance.h" + +CSpell_List_Image::CSpell_List_Image(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CSpell_List_Image::CSpell_List_Image(const CSpell_List_Image& rhs) + :CElementObject(rhs) +{ +} + +HRESULT CSpell_List_Image::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CSpell_List_Image::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 0.f; + Desc.fY = 0.f; + Desc.fSizeY = 90.f; + Desc.fSizeX = 90.f; + + m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) }; + + if (FAILED(__super::Initialize(&Desc))) + { + return E_FAIL; + } + if (FAILED(Ready_Components(pArg))) + { + return E_FAIL; + } + + m_fAlpha = 1.f; + m_fTimeMult = 3.f; + m_fAlphaTime = 1.f; + m_fOffSetX = 120.f; + m_fOffSetY = 122.f; + m_iCols = 4; + UV(); + m_pVIBufferCom->Set_Cloned(true); + m_pVIBufferCom->Set_Pos(-185.f, 375.f, m_fOffSetX, m_fOffSetY, m_iCols); + m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); + m_pVIBufferCom->Set_ImageUV(pUVDesc); + return S_OK; +} + +void CSpell_List_Image::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CSpell_List_Image::Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + + if (m_bFadeIn == true) + { + if (m_fAlpha <= 1.f) + m_fAlpha += fTimeDelta * m_fAlphaTime; + + if (m_fAlpha >= 1.f) + { + m_bFadeIn = false; + m_fAlpha = 1.f; + } + } + + if (m_bFadeOut == true) + { + if (m_fAlpha >= 0.f) + m_fAlpha -= fTimeDelta; + + if (m_fAlpha <= 0.f) + { + m_bFadeOut = false; + m_fAlpha = 0.f; + } + } + m_fTime += fTimeDelta * m_fTimeMult; + __super::Update(fTimeDelta); +} + +void CSpell_List_Image::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) + { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + } + __super::Late_Update(fTimeDelta); +} + +HRESULT CSpell_List_Image::Render() +{ + if (FAILED(Bind_ShaderResources())) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIINTANCE::EESSENTIAL_SPELL)))) + { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) + { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) + { + return E_FAIL; + } + + return S_OK; +} + +_vector CSpell_List_Image::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +void CSpell_List_Image::SizeUpX(_float fSizeX) +{ + m_fSizeX = fSizeX; + m_pVIBufferCom->Set_SizeX(m_fSizeX); +} + +void CSpell_List_Image::SizeUpY(_float fSizeY) +{ + m_fSizeY = fSizeY; + m_pVIBufferCom->Set_SizeY(m_fSizeY); +} + +void CSpell_List_Image::SizeUpdate(_float fSizeX, _float fSizeY) +{ + m_fSizeX = fSizeX; + m_fSizeY = fSizeY; + m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); +} + +void CSpell_List_Image::UV() +{ + for (_uint i = 0; i < 26; ++i) + { + pUVDesc[i].fUV = Meter_Index(i); + } +} + +_float4 CSpell_List_Image::Meter_Index(_uint Number) +{ + _float2 fImage_Size = { 1024.f, 1792.f }; + + _uint iCountX = 4; + _uint iCountY = 7; + + _float iImageX = 256.f; + _float iImageY = 256.f; + + _uint iframeX = Number % iCountX; + _uint iframeY = Number / iCountX; + + _float2 UVStart; + UVStart.x = iframeX * iImageX / fImage_Size.x; + UVStart.y = iframeY * iImageY / fImage_Size.y; + + _float2 UVEnd; + UVEnd.x = UVStart.x + (iImageX / fImage_Size.x); + UVEnd.y = UVStart.y + (iImageY / fImage_Size.y); + + _float4 UV = _float4{ UVStart.x, UVStart.y, UVEnd.x, UVEnd.y }; + return UV; +} + +HRESULT CSpell_List_Image::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_fAngle", &m_fAngle, 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 CSpell_List_Image::Ready_Components(void* pArg) +{ + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_UI_Spell_List_Image"), (CComponent**)&m_pVIBufferCom, nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_Atlas_Widget_Spell"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIINSTANCE, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + + return S_OK; +} + +CSpell_List_Image* CSpell_List_Image::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CSpell_List_Image* pInstance = new CSpell_List_Image(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CSpell_List_Image"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CSpell_List_Image::Clone(void* pArg, CGameObject* pOwner) +{ + CSpell_List_Image* pInstance = new CSpell_List_Image(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CSpell_List_Image"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CSpell_List_Image::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +#ifdef _DEBUG +void CSpell_List_Image::Describe_Entity() +{ +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Spell_Panel.cpp b/Jusin154_Team3D/Client/Private/Spell_Panel.cpp new file mode 100644 index 000000000..955948fb1 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Spell_Panel.cpp @@ -0,0 +1,349 @@ +#include "pch.h" +#include "Spell_Panel.h" +#include "GameInstance.h" +#include "Current_Spell_Slot.h" +#include "Spell_List.h" +#include "Eessential_Spell_Slot.h" +#include "Eessential_Spell.h" +#include "Spell_List_Image.h" +#include "Spell_State.h" +#include "Spell_Hover.h" +#include "Spell_Hover_Effect.h" +#include "Spell_Preview.h" +#include "Spell_Vidio_Border.h" +#include "Current_Slot_Number.h" +#include "Spell_Header.h" +#include "Spell_Header_Line.h" +//#include "Spell_Data.h" +#include "Spell_Anim.h" + +CSpell_Panel::CSpell_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CPanelObject(pDevice, pContext) +{ +} + +CSpell_Panel::CSpell_Panel(const CSpell_Panel& rhs) + :CPanelObject(rhs) +{ +} + +HRESULT CSpell_Panel::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CSpell_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.04f; + m_iSpellType = -1; + m_iPendingSpell = -1; + m_fDelayTime = 1.f; + Add_Function(TEXT("Hover"), [this](void* p) {this->Slot_Chack(p); }); + return S_OK; +} + +void CSpell_Panel::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CSpell_Panel::Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + + if (m_iSpellType != -1) + { + m_fHoverTimer += fTimeDelta; + } + else + { + m_fHoverTimer = 0.f; + Function_Callback(TEXT("FadeOut")); + } + + if (m_fHoverTimer >= m_fDelayTime && m_iPendingSpell != m_iSpellType) + { + m_iPendingSpell = m_iSpellType; + Function_Callback(TEXT("FadeIn")); + } + + __super::Update(fTimeDelta); +} + +void CSpell_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 CSpell_Panel::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ALPHABLEND)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + + return S_OK; +} + +_vector CSpell_Panel::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +const CUIObject::SPELLINFO CSpell_Panel::Get_Info(_int Index) +{ + return m_Info[Index]; +} + +void CSpell_Panel::Slot_Chack(void* pArg) +{ + CUIObject::HOVER_INFO* Info = static_cast(pArg); + + _int iSlot = Info->iSlotID; + m_iHoverSlot[iSlot] = Info->iHover_Index; + + int finalHover = -1; + for (int i = 0; i < 2; ++i) + { + if (m_iHoverSlot[i] != -1) + { + finalHover = m_iHoverSlot[i]; + break; + } + } + + m_iSpellType = finalHover; + Function_Callback(TEXT("Slot_Hover"), &m_iSpellType); +} + +HRESULT CSpell_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_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 CSpell_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_Spell_Widget"), 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; +} + +HRESULT CSpell_Panel::Ready_Element(void* pArg) +{ + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pCurrent_Spell_Slot)))) + { + return E_FAIL; + } + Add_Element(TEXT("Current_Spell_Slot"), m_pCurrent_Spell_Slot); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_List)))) + { + return E_FAIL; + } + Add_Element(TEXT("Spell_List"), m_pSpell_List); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pEessential_Spell_Slot)))) + { + return E_FAIL; + } + Add_Element(TEXT("Eessential_Spell_Slot"), m_pEessential_Spell_Slot); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pEessential_Spell)))) + { + return E_FAIL; + } + Add_Element(TEXT("Eessential_Spell"), m_pEessential_Spell); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_List_Image)))) + { + return E_FAIL; + } + Add_Element(TEXT("Spell_List_Image"), m_pSpell_List_Image); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_State)))) + { + return E_FAIL; + } + Add_Element(TEXT("Spell_State"), m_pSpell_State); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Hover)))) + { + return E_FAIL; + } + Add_Element(TEXT("Spell_Hover"), m_pSpell_Hover); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Hover_Effect)))) + { + return E_FAIL; + } + Add_Element(TEXT("Spell_Hover_Effect"), m_pSpell_Hover_Effect); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Preview)))) + { + return E_FAIL; + } + Add_Element(TEXT("Spell_Preview"), m_pSpell_Preview); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Vidio_Border)))) + { + return E_FAIL; + } + Add_Element(TEXT("Spell_Vidio_Border"), m_pSpell_Vidio_Border); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pCurrent_Slot_Number)))) + { + return E_FAIL; + } + Add_Element(TEXT("Current_Slot_Number"), m_pCurrent_Slot_Number); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Header)))) + { + return E_FAIL; + } + Add_Element(TEXT("Spell_Header"), m_pSpell_Header); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Header_Line)))) + { + return E_FAIL; + } + Add_Element(TEXT("Spell_Header_Line"), m_pSpell_Header_Line); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Anim)))) + { + return E_FAIL; + } + Add_Element(TEXT("Spell_Anim"), m_pSpell_Anim); + + //if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, m_Info, nullptr, reinterpret_cast(&m_pSpell_Data)))) + //{ + // return E_FAIL; + //} + return S_OK; +} + +CSpell_Panel* CSpell_Panel::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CSpell_Panel* pInstance = new CSpell_Panel(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CSpell_Panel"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CSpell_Panel::Clone(void* pArg, CGameObject* pOwner) +{ + CSpell_Panel* pInstance = new CSpell_Panel(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CSpell_Panel"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CSpell_Panel::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +#ifdef _DEBUG +void CSpell_Panel::Describe_Entity() +{ +} + +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Spell_Preview.cpp b/Jusin154_Team3D/Client/Private/Spell_Preview.cpp new file mode 100644 index 000000000..662d64f78 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Spell_Preview.cpp @@ -0,0 +1,288 @@ +#include "pch.h" +#include "Spell_Preview.h" +#include "GameInstance.h" + + +CSpell_Preview::CSpell_Preview(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CSpell_Preview::CSpell_Preview(const CSpell_Preview& rhs) + :CElementObject(rhs) +{ +} + +HRESULT CSpell_Preview::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CSpell_Preview::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 400.f; + Desc.fY = -365.f; + Desc.fSizeX = 128.f; + Desc.fSizeY = 128.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; + } + // y값 최소 270 최대 410 + m_fTimeMult = 3.f; + m_fAlpha = 0.f; + m_fAlphaTime = 5.f; + m_vNine_Slice = _float4(50.f, 75.f, 30.f, 96.f); + m_fTopY = m_fY - m_vScale.y * 0.5f; + SizeUpX(512.f); + SizeUpY(270.f); + m_iSpellType = ENUM_CLASS(SPELLTYPE::CONTROL); + m_fSortZ = 0.02f; + static_cast(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); }); + static_cast(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); }); + return S_OK; +} + +void CSpell_Preview::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CSpell_Preview::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 CSpell_Preview::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + __super::Late_Update(fTimeDelta); + } +} + +HRESULT CSpell_Preview::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::SPELL_PREVIEW)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + return S_OK; +} + +_vector CSpell_Preview::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +void CSpell_Preview::SizeUpX(_float fSizeX) +{ + _float fX = (fSizeX - m_vScale.x) * 0.5f; + m_fSizeX = fSizeX; + m_fX += fX; + m_fLerpX += fX; + +} + +void CSpell_Preview::SizeUpY(_float fSizeY) +{ + _float prevY = m_fY; + m_fSizeY = fSizeY; + m_fY = m_fTopY + fSizeY * 0.5f; + + _float deltaY = m_fY - prevY; + +} + +HRESULT CSpell_Preview::Bind_ShaderResources() +{ + if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom1->Bind_ShaderResource(m_pShaderCom, "g_Texture1", 0))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom2->Bind_ShaderResource(m_pShaderCom, "g_Texture2", 0))) + { + return E_FAIL; + } + if (FAILED(m_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; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageSipos1", &m_vHeaderBack, sizeof(_float4)))) + { + return E_FAIL; + } + return S_OK; +} + +HRESULT CSpell_Preview::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_SpellWidgetPanelBack"), 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, TEXT("Prototype_Texture_UI_T_TooltipBorder_4K"), reinterpret_cast(&m_pDiffuse_TextureCom2), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_LighthouseHeaderBack"), reinterpret_cast(&m_pDiffuse_TextureCom3), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + + return S_OK; +} + +CSpell_Preview* CSpell_Preview::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CSpell_Preview* pInstance = new CSpell_Preview(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CSpell_Preview"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CSpell_Preview::Clone(void* pArg, CGameObject* pOwner) +{ + CSpell_Preview* pInstance = new CSpell_Preview(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CSpell_Preview"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CSpell_Preview::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pDiffuse_TextureCom1); + SAFE_RELEASE(m_pDiffuse_TextureCom2); + SAFE_RELEASE(m_pDiffuse_TextureCom3); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +#ifdef _DEBUG +void CSpell_Preview::Describe_Entity() +{ +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Spell_Slot.cpp b/Jusin154_Team3D/Client/Private/Spell_Slot.cpp index 6fed41de8..154832ff0 100644 --- a/Jusin154_Team3D/Client/Private/Spell_Slot.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_Slot.cpp @@ -197,7 +197,7 @@ HRESULT CSpell_Slot::Bind_ShaderResources() HRESULT CSpell_Slot::Ready_Components(void* pArg) { - if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_UI_Instance"), (CComponent**)&m_pVIBufferCom, nullptr))) + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_UI_Spell_Slot"), (CComponent**)&m_pVIBufferCom, nullptr))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/Spell_State.cpp b/Jusin154_Team3D/Client/Private/Spell_State.cpp new file mode 100644 index 000000000..a183e12cf --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Spell_State.cpp @@ -0,0 +1,271 @@ +#include "pch.h" +#include "Spell_State.h" +#include "GameInstance.h" + +CSpell_State::CSpell_State(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CSpell_State::CSpell_State(const CSpell_State& rhs) + :CElementObject(rhs) +{ +} + +HRESULT CSpell_State::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CSpell_State::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 0.f; + Desc.fY = 0.f; + Desc.fSizeX = 105.f; + Desc.fSizeY = 105.f; + + m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) }; + + if (FAILED(__super::Initialize(&Desc))) + { + return E_FAIL; + } + if (FAILED(Ready_Components(pArg))) + { + return E_FAIL; + } + + m_fAlpha = 1.f; + m_fTimeMult = 3.f; + m_fAlphaTime = 1.f; + m_fOffSetX = 120.f; + m_fOffSetY = 122.f; + m_iCols = 4; + m_pVIBufferCom->Set_Cloned(true); + m_pVIBufferCom->Set_Pos(-185.f, 375.f, m_fOffSetX, m_fOffSetY, m_iCols); + m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); + return S_OK; +} + +void CSpell_State::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CSpell_State::Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + + if (m_bFadeIn == true) + { + if (m_fAlpha <= 1.f) + m_fAlpha += fTimeDelta * m_fAlphaTime; + + if (m_fAlpha >= 1.f) + { + m_bFadeIn = false; + m_fAlpha = 1.f; + } + } + + if (m_bFadeOut == true) + { + if (m_fAlpha >= 0.f) + m_fAlpha -= fTimeDelta; + + if (m_fAlpha <= 0.f) + { + m_bFadeOut = false; + m_fAlpha = 0.f; + } + } + m_fTime += fTimeDelta * m_fTimeMult; + Hover(); + __super::Update(fTimeDelta); +} + +void CSpell_State::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) + { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + } + __super::Late_Update(fTimeDelta); +} + +HRESULT CSpell_State::Render() +{ + if (FAILED(Bind_ShaderResources())) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIINTANCE::ALPHABLEND)))) + { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) + { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) + { + return E_FAIL; + } + + return S_OK; +} + +_vector CSpell_State::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +void CSpell_State::SizeUpX(_float fSizeX) +{ + m_fSizeX = fSizeX; + m_pVIBufferCom->Set_SizeX(m_fSizeX); +} + +void CSpell_State::SizeUpY(_float fSizeY) +{ + m_fSizeY = fSizeY; + m_pVIBufferCom->Set_SizeY(m_fSizeY); +} + +void CSpell_State::SizeUpdate(_float fSizeX, _float fSizeY) +{ + m_fSizeX = fSizeX; + m_fSizeY = fSizeY; + m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); +} + +void CSpell_State::Hover() +{ + 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 -= m_pOwner->Get_WorldPostion().m128_f32[0]; + fMouse.y -= m_pOwner->Get_WorldPostion().m128_f32[1]; + + m_pVIBufferCom->Set_Mouse_Hover(fMouse); + +} + +HRESULT CSpell_State::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_fAngle", &m_fAngle, 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 CSpell_State::Ready_Components(void* pArg) +{ + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_UI_Spell_List"), (CComponent**)&m_pVIBufferCom, nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_NewLock"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIINSTANCE, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + + return S_OK; +} + +CSpell_State* CSpell_State::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CSpell_State* pInstance = new CSpell_State(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CSpell_State"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CSpell_State::Clone(void* pArg, CGameObject* pOwner) +{ + CSpell_State* pInstance = new CSpell_State(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CSpell_State"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CSpell_State::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +#ifdef _DEBUG +void CSpell_State::Describe_Entity() +{ +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Spell_Vidio_Border.cpp b/Jusin154_Team3D/Client/Private/Spell_Vidio_Border.cpp new file mode 100644 index 000000000..32ce2c9e2 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Spell_Vidio_Border.cpp @@ -0,0 +1,244 @@ +#include "pch.h" +#include "Spell_Vidio_Border.h" +#include "GameInstance.h" +#include "Spell_Anim.h" + +CSpell_Vidio_Border::CSpell_Vidio_Border(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CSpell_Vidio_Border::CSpell_Vidio_Border(const CSpell_Vidio_Border& rhs) + :CElementObject(rhs) +{ +} + +HRESULT CSpell_Vidio_Border::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CSpell_Vidio_Border::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 590.f; + Desc.fY = -100.f; + Desc.fSizeX = 520.f; + Desc.fSizeY = 275.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 = 0.f; + m_fAlphaTime = 9.f; + m_fMoveSpeed = 5.f; + m_fLerpX = m_fX; + m_fLerpY = 45; + m_bStart = false; + static_cast(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); }); + static_cast(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); }); + static_cast(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); }); + return S_OK; +} + +void CSpell_Vidio_Border::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CSpell_Vidio_Border::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_bStart = false; + m_fAlpha = 0.f; + } + } + + m_fTime += fTimeDelta * m_fTimeMult; + + if (m_fAlpha >= 0.3f) + m_bStart = true; + + __super::Update(fTimeDelta); + +} + +void CSpell_Vidio_Border::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + } + __super::Late_Update(fTimeDelta); +} + +HRESULT CSpell_Vidio_Border::Render() +{ + if (m_bStart == true) + { + if (FAILED(Bind_ShaderResources())) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ALPHABLEND)))) + { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) + { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) + { + return E_FAIL; + } + + } + + return S_OK; +} + +_vector CSpell_Vidio_Border::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CSpell_Vidio_Border::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; + } + return S_OK; +} + +HRESULT CSpell_Vidio_Border::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_TalentVideoBorder"), 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; +} + +CSpell_Vidio_Border* CSpell_Vidio_Border::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CSpell_Vidio_Border* pInstance = new CSpell_Vidio_Border(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CSpell_Vidio_Border"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CSpell_Vidio_Border::Clone(void* pArg, CGameObject* pOwner) +{ + CSpell_Vidio_Border* pInstance = new CSpell_Vidio_Border(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CSpell_Vidio_Border"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CSpell_Vidio_Border::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +#ifdef _DEBUG +void CSpell_Vidio_Border::Describe_Entity() +{ +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/TrailObject.cpp b/Jusin154_Team3D/Client/Private/TrailObject.cpp index 0c743a127..f7cc1e260 100644 --- a/Jusin154_Team3D/Client/Private/TrailObject.cpp +++ b/Jusin154_Team3D/Client/Private/TrailObject.cpp @@ -254,6 +254,9 @@ HRESULT CTrailObject::Render() if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_POSTEX::TRAIL)))) return E_FAIL; + if (FAILED(m_pGameInstance->Bind_DepthStencil(m_pShaderCom, "g_DepthStencilTexture"))) + return E_FAIL; + if (FAILED(m_pTrailCom->Render())) return E_FAIL; diff --git a/Jusin154_Team3D/Client/Private/Troll.cpp b/Jusin154_Team3D/Client/Private/Troll.cpp index 0357ca052..c8d1b241a 100644 --- a/Jusin154_Team3D/Client/Private/Troll.cpp +++ b/Jusin154_Team3D/Client/Private/Troll.cpp @@ -57,7 +57,7 @@ HRESULT CTroll::Initialize(void* pArg) - m_pCharacter_Controller->Set_Position(XMVectorSet(30.f, 10.f, 30.f, 1.f)); + m_pCharacter_Controller->Set_Position(XMVectorSet(3.f, -5.f, -20.f, 1.f)); return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Wand.cpp b/Jusin154_Team3D/Client/Private/Wand.cpp index 5b8c9f71c..9e277efc1 100644 --- a/Jusin154_Team3D/Client/Private/Wand.cpp +++ b/Jusin154_Team3D/Client/Private/Wand.cpp @@ -98,8 +98,8 @@ HRESULT CWand::Render() } } #ifdef _DEBUG - m_pGripShape->Draw(m_pTransformCom->Get_XMWorldMatrix(), m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW), m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ), DirectX::Colors::Green, nullptr, true); - m_pSubShape->Draw(XMLoadFloat4x4(&m_pWandTipMatrix), m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW), m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ), DirectX::Colors::Purple, nullptr, true); + //m_pGripShape->Draw(m_pTransformCom->Get_XMWorldMatrix(), m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW), m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ), DirectX::Colors::Green, nullptr, true); + //m_pSubShape->Draw(XMLoadFloat4x4(&m_pWandTipMatrix), m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW), m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ), DirectX::Colors::Purple, nullptr, true); #endif // _DEBUG return S_OK; @@ -110,6 +110,11 @@ _vector CWand::Get_WorldPostion() return XMLoadFloat4((_float4*)&m_pWandTipMatrix.m[3][0]); } +_matrix CWand::Get_WorldMatrix() +{ + return XMLoadFloat4x4(&m_pWandTipMatrix); +} + HRESULT CWand::Ready_Components() { diff --git a/Jusin154_Team3D/Client/Public/Bombard.h b/Jusin154_Team3D/Client/Public/Bombard.h index 5d0de7348..6eb00c959 100644 --- a/Jusin154_Team3D/Client/Public/Bombard.h +++ b/Jusin154_Team3D/Client/Public/Bombard.h @@ -32,7 +32,8 @@ class CBombard final : public CEffect_Container virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override; private: _wstring m_wstrEffectName = {}; - class CPartObject* m_pLight_Projectile = {}; + class CEffectParts* m_pLight_Projectile = {}; + _vector m_vCameraLook = {}; public: static CBombard* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual void Free() override; diff --git a/Jusin154_Team3D/Client/Public/BombardSide.h b/Jusin154_Team3D/Client/Public/BombardSide.h new file mode 100644 index 000000000..7a6d1eae7 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/BombardSide.h @@ -0,0 +1,49 @@ +#pragma once + +#include "Client_Define.h" +#include "Effect_Container.h" + +NS_BEGIN(Engine) +NS_END + +NS_BEGIN(Client) + +class CBombardSide final : public CEffect_Container +{ +private: + CBombardSide(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CBombardSide(const CBombardSide& rhs); + virtual ~CBombardSide() = 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) override; + +private: + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + virtual HRESULT Ready_Components(void* pArg) override; + HRESULT Ready_Child(); + HRESULT Bind_ShaderResources() override; + virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override; +private: + _wstring m_wstrEffectName = {}; + + class CEffectParts* m_pWandLight = { nullptr }; + class CTrailObject* m_pWandTrail = { nullptr }; + class CEffectParts* m_pWandParticle = { nullptr }; + +public: + static CBombardSide* 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/CamPosition_Shoulder.h b/Jusin154_Team3D/Client/Public/CamPosition_Shoulder.h index b80981187..4ac047dcb 100644 --- a/Jusin154_Team3D/Client/Public/CamPosition_Shoulder.h +++ b/Jusin154_Team3D/Client/Public/CamPosition_Shoulder.h @@ -55,6 +55,7 @@ class CCamPosition_Shoulder final : public CCamPosition _float4 m_DestPos = { }; _bool m_bZoomIn = { false }; + _bool m_bLerp = {}; CCamPosition_Target* m_pTarget_LookPart = { nullptr }; diff --git a/Jusin154_Team3D/Client/Public/Client_Enum.h b/Jusin154_Team3D/Client/Public/Client_Enum.h index 7a7ba5d7e..53b558bbb 100644 --- a/Jusin154_Team3D/Client/Public/Client_Enum.h +++ b/Jusin154_Team3D/Client/Public/Client_Enum.h @@ -12,9 +12,9 @@ namespace Client enum class SHADER_PASS_NORTEX { DEFAULT, TERRAIN, ENV_TERRAIN_ANISO, END }; enum class SHADER_PASS_PARTICLE { EXPLOSION, END }; enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, 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, END }; + enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, BLEND, BLEND_NOWORLD, BLOOM, BLOOM_NOWORLD, BLUR_NO_EMMISVE, BLUR_NO_WORLD_NO_EMISSIVE, WEIGHTBLEND_FOR_BLEND, END }; enum class SHADER_PASS_UIEDITOR { DEFAULT, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, TYPE, HPBAR, MAGIC_METER, MAGIC_ICON, REMOVEUV, REVELIO, POTION, MAGIC_ITEM, SPELL_PREVIEW, SPELL_HEADER, SPELL_HEADER_LINE, END }; - enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, MAGIC_METER, END }; + enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, MAGIC_METER, SPELL_LIST, EESSENTIAL_SPELL_SOLT, EESSENTIAL_SPELL, COLOR, SPELL_HOVER, SPELL_SLOT_EFFECT, END }; enum class EFFECT_TYPE { EFFECT, TRAIL, END }; @@ -24,7 +24,10 @@ namespace Client BOMBARDA, INCENDIO, DISILLUSIONMENT, LUMOS, REPARO, WINGARDIUM_LEVIOSA, CONJURING_SPELL, ALTERING_SPELL, EVANESCO, AVADA_KEDAVRA, CRUCIO, IMPERIO, BEAST_PETTING_BRUSH, BEAST_FEED, NAB_SACK, JAP, REVELIO, PROTEGO, STUPEFY, - ANCIENT_MAGIC_THROW, ANCIENT_MAGIC, ALOHOMORA, PETRIFICUS_TOTALUS, END + + ANCIENT_MAGIC_THROW, ANCIENT_MAGIC, ALOHOMORA, PETRIFICUS_TOTALUS, + JAP_SIDE, BOMBARDA_SIDE , DESCENDO_SIDE , LEVIOSO_SIDE + ,END }; enum class BLOOM_TYPE { NONE, BASIC, MULTIPLY, END }; } diff --git a/Jusin154_Team3D/Client/Public/Client_Struct.h b/Jusin154_Team3D/Client/Public/Client_Struct.h index c3c76619d..498525f3d 100644 --- a/Jusin154_Team3D/Client/Public/Client_Struct.h +++ b/Jusin154_Team3D/Client/Public/Client_Struct.h @@ -21,7 +21,9 @@ namespace Client _uint iSpell_ID{}; _wstring pSpell_Name; _uint iSpell_Type{}; - _uint iSpell_CoolTime{}; + _uint iSkill_Type{}; + _float fSpell_CoolTime{}; + _float fDuration{}; _uint iAnimNum{}; _wstring pSpellInfo; _bool bSpell_Lock = false; diff --git a/Jusin154_Team3D/Client/Public/Current_Slot_Number.h b/Jusin154_Team3D/Client/Public/Current_Slot_Number.h new file mode 100644 index 000000000..5e942a481 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Current_Slot_Number.h @@ -0,0 +1,60 @@ +#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 CCurrent_Slot_Number final : public CElementObject +{ +private: + CCurrent_Slot_Number(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CCurrent_Slot_Number(const CCurrent_Slot_Number& rhs); + virtual ~CCurrent_Slot_Number() = 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; + + virtual void SizeUpX(_float fSizeX) override; + virtual void SizeUpY(_float fSizeY) override; + virtual void SizeUpdate(_float fSizeX, _float fSizeY) override; + +private: + virtual HRESULT Bind_ShaderResources() override; + virtual HRESULT Ready_Components(void* pArg) override; + void UV(); + _float4 Meter_Index(_uint Number); + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + +private: + CTexture* m_pDiffuse_TextureCom = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_UI_Instance* m_pVIBufferCom = { nullptr }; + CVIBuffer_UI_Instance::UI_ATLAS_DESC pUVDesc[4]; + + _float2 m_fIamge_Size{}; + _float m_fOffSetX{}; + _float m_fOffSetY{}; + _uint m_iCols{}; + +public: + static CCurrent_Slot_Number* 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/Current_Spell_Slot.h b/Jusin154_Team3D/Client/Public/Current_Spell_Slot.h new file mode 100644 index 000000000..91305afe5 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Current_Spell_Slot.h @@ -0,0 +1,57 @@ +#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 CCurrent_Spell_Slot final : public CElementObject +{ +private: + CCurrent_Spell_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CCurrent_Spell_Slot(const CCurrent_Spell_Slot& rhs); + virtual ~CCurrent_Spell_Slot() = 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; + + virtual void SizeUpX(_float fSizeX) override; + virtual void SizeUpY(_float fSizeY) override; + virtual void SizeUpdate(_float fSizeX, _float fSizeY) 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_UI_Instance* m_pVIBufferCom = { nullptr }; + + _float m_fOffSetX{}; + _float m_fOffSetY{}; + _uint m_iCols{}; + +public: + static CCurrent_Spell_Slot* 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/DecendoSide.h b/Jusin154_Team3D/Client/Public/DecendoSide.h new file mode 100644 index 000000000..70bd7106e --- /dev/null +++ b/Jusin154_Team3D/Client/Public/DecendoSide.h @@ -0,0 +1,48 @@ +#pragma once + +#include "Client_Define.h" +#include "Effect_Container.h" + +NS_BEGIN(Engine) +NS_END + +NS_BEGIN(Client) + +class CDecendoSide final : public CEffect_Container +{ +private: + CDecendoSide(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CDecendoSide(const CDecendoSide& rhs); + virtual ~CDecendoSide() = 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) override; + +private: + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + virtual HRESULT Ready_Components(void* pArg) override; + HRESULT Ready_Child(); + HRESULT Bind_ShaderResources() override; + virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override; +private: + _wstring m_wstrEffectName = {}; + + class CEffectParts* m_pWandLight = { nullptr }; + class CTrailObject* m_pWandTrail = { nullptr }; + +public: + static CDecendoSide* 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/Eessential_Spell.h b/Jusin154_Team3D/Client/Public/Eessential_Spell.h new file mode 100644 index 000000000..096de667d --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Eessential_Spell.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 CEessential_Spell final : public CElementObject +{ +private: + CEessential_Spell(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CEessential_Spell(const CEessential_Spell& rhs); + virtual ~CEessential_Spell() = 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; + +public: + virtual void SizeUpX(_float fSizeX) override; + virtual void SizeUpY(_float fSizeY) override; + virtual void SizeUpdate(_float fSizeX, _float fSizeY) override; + + void UV(); + _float4 Meter_Index(_uint Number); + +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_UI_Instance* m_pVIBufferCom = { nullptr }; + CVIBuffer_UI_Instance::UI_ATLAS_DESC pUVDesc[8]; + + _float m_fOffSetX{}; + _float m_fOffSetY{}; + _uint m_iCols{}; + +public: + static CEessential_Spell* 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 // _DEBUGe; +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Eessential_Spell_Slot.h b/Jusin154_Team3D/Client/Public/Eessential_Spell_Slot.h new file mode 100644 index 000000000..1cc98a0fc --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Eessential_Spell_Slot.h @@ -0,0 +1,65 @@ +#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 CEessential_Spell_Slot final : public CElementObject +{ +private: + CEessential_Spell_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CEessential_Spell_Slot(const CEessential_Spell_Slot& rhs); + virtual ~CEessential_Spell_Slot() = 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; + + virtual void SizeUpX(_float fSizeX) override; + virtual void SizeUpY(_float fSizeY) override; + virtual void SizeUpdate(_float fSizeX, _float fSizeY) override; + + +private: + void Hover(_float fTimeDelta); + +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 }; + CTexture* m_pDiffuse_TextureCom1 = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_UI_Instance* m_pVIBufferCom = { nullptr }; + + _float m_fOffSetX{}; + _float m_fOffSetY{}; + _uint m_iCols{}; + + _float m_fHoverTime{}; + _int m_iPerSpell_Slot{}; + + +public: + static CEessential_Spell_Slot* 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/EffectObject.h b/Jusin154_Team3D/Client/Public/EffectObject.h index b4c1e051d..58c07bb3d 100644 --- a/Jusin154_Team3D/Client/Public/EffectObject.h +++ b/Jusin154_Team3D/Client/Public/EffectObject.h @@ -86,8 +86,9 @@ class CEffectObject abstract : public CPartObject SHADER_PASS_INSTANCE_MODEL eShaderPass = { SHADER_PASS_INSTANCE_MODEL::NON_NOMALMAP }; - _bool isDiffuseBlur = {}; - _bool isMaskBlur = {}; + _bool isBlurNoEmissive = {}; + + _bool isTexBlur = {}; _bool isBlurDissolve = {}; _bool isBlurReverseDissolve = {}; @@ -103,7 +104,6 @@ class CEffectObject abstract : public CPartObject BLOOM_TYPE eBloomType = {}; - }EFFECT_INFO; diff --git a/Jusin154_Team3D/Client/Public/EffectParts.h b/Jusin154_Team3D/Client/Public/EffectParts.h index b9e615b1c..bd937d140 100644 --- a/Jusin154_Team3D/Client/Public/EffectParts.h +++ b/Jusin154_Team3D/Client/Public/EffectParts.h @@ -21,12 +21,16 @@ class CEffectParts final : public CEffectObject virtual void Priority_Update(_float fTimeDelta) override; virtual void Update(_float fTimeDelta) override; virtual void Late_Update(_float fTimeDelta) override; + virtual _vector Get_WorldPostion() override; + + private: virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; virtual HRESULT Ready_Components(void* pArg) override; + public: static CEffectParts* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Client/Public/Effect_Container.h b/Jusin154_Team3D/Client/Public/Effect_Container.h index a874e2532..3f57c2ac2 100644 --- a/Jusin154_Team3D/Client/Public/Effect_Container.h +++ b/Jusin154_Team3D/Client/Public/Effect_Container.h @@ -25,6 +25,8 @@ class CEffect_Container abstract : public CContainerObject virtual HRESULT Pre_Setting(CGameObject* pObject); HRESULT Load_Package(const _char* pPath); +public: + protected: virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; @@ -35,8 +37,9 @@ class CEffect_Container abstract : public CContainerObject void Update_Event(_float fTimeDelta); HRESULT Reset_EffectParts(); protected: - class CPhysXEffectHitBox* m_pPhysHitBox = {}; - + _float4 m_vStartPos = {}; + _float4 m_vEndPos = {}; + PSX::PxSweepBuffer hitBuffer = {}; protected: _wstring m_wstrEffectName = {}; diff --git a/Jusin154_Team3D/Client/Public/InfoInstance.h b/Jusin154_Team3D/Client/Public/InfoInstance.h index 2794be081..41b803282 100644 --- a/Jusin154_Team3D/Client/Public/InfoInstance.h +++ b/Jusin154_Team3D/Client/Public/InfoInstance.h @@ -42,6 +42,9 @@ class CInfoInstance final : public CBase HRESULT Load_MapObjects(const _char* pFilePath); HRESULT Load_LightElements(const _char* pFilePath); #pragma endregion +#pragma region Spell_INFO + HRESULT Load_SpellInfo(const _char* pFilePath); +#pragma endregion private: diff --git a/Jusin154_Team3D/Client/Public/Levioso.h b/Jusin154_Team3D/Client/Public/Levioso.h new file mode 100644 index 000000000..0609b72f7 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Levioso.h @@ -0,0 +1,55 @@ +#pragma once + +#include "Client_Define.h" +#include "Effect_Container.h" + +NS_BEGIN(Engine) +NS_END + +NS_BEGIN(Client) + +class CLevioso final : public CEffect_Container +{ +private: + CLevioso(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CLevioso(const CLevioso& rhs); + virtual ~CLevioso() = 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) override; + +private: + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + virtual HRESULT Ready_Components(void* pArg) override; + HRESULT Ready_Child(); + HRESULT Bind_ShaderResources() override; + virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override; +private: + _wstring m_wstrEffectName = {}; + class CPlayer* m_pPlayer = {}; + + class CEffectParts* m_pLeviosoPJ_0 = { nullptr }; + class CEffectParts* m_pLeviosoPJ_1 = { nullptr }; + class CTrailObject* m_pLeviosoTrail = { nullptr }; + class CEffectParts* m_pTrail_PT_0 = { nullptr }; + + _vector m_vOwnerLook = {}; + _float m_fAccRotateTime = {}; + _float m_fTurnSpeed = {}; + _float m_fRange = {}; +public: + static CLevioso* 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/LeviosoSide.h b/Jusin154_Team3D/Client/Public/LeviosoSide.h new file mode 100644 index 000000000..2a136a3ea --- /dev/null +++ b/Jusin154_Team3D/Client/Public/LeviosoSide.h @@ -0,0 +1,48 @@ +#pragma once + +#include "Client_Define.h" +#include "Effect_Container.h" + +NS_BEGIN(Engine) +NS_END + +NS_BEGIN(Client) + +class CLeviosoSide final : public CEffect_Container +{ +private: + CLeviosoSide(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CLeviosoSide(const CLeviosoSide& rhs); + virtual ~CLeviosoSide() = 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) override; + +private: + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + virtual HRESULT Ready_Components(void* pArg) override; + HRESULT Ready_Child(); + HRESULT Bind_ShaderResources() override; + virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override; +private: + _wstring m_wstrEffectName = {}; + + class CEffectParts* m_pWandLight = { nullptr }; + class CTrailObject* m_pWandTrail = { nullptr }; + +public: + static CLeviosoSide* 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/Lumos.h b/Jusin154_Team3D/Client/Public/Lumos.h new file mode 100644 index 000000000..0d4cd61f7 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Lumos.h @@ -0,0 +1,48 @@ +#pragma once + +#include "Client_Define.h" +#include "Effect_Container.h" + +NS_BEGIN(Engine) +NS_END + +NS_BEGIN(Client) + +class CLumos final : public CEffect_Container +{ +private: + CLumos(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CLumos(const CLumos& rhs); + virtual ~CLumos() = 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) override; + +private: + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + virtual HRESULT Ready_Components(void* pArg) override; + HRESULT Ready_Child(); + HRESULT Bind_ShaderResources() override; + virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override; +private: + _wstring m_wstrEffectName = {}; + + class CEffectParts* m_pLumos_Light = {}; + + +public: + static CLumos* 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/Magic_Item.h b/Jusin154_Team3D/Client/Public/Magic_Item.h index 88421e214..fb685bca1 100644 --- a/Jusin154_Team3D/Client/Public/Magic_Item.h +++ b/Jusin154_Team3D/Client/Public/Magic_Item.h @@ -41,6 +41,7 @@ class CMagic_Item final : public CElementObject CTexture* m_pDiffuse_TextureCom3 = { nullptr }; CTexture* m_pDiffuse_TextureCom4 = { nullptr }; CTexture* m_pDiffuse_TextureCom5 = { nullptr }; + CTexture* m_pDiffuse_TextureCom6 = { nullptr }; CShader* m_pShaderCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; diff --git a/Jusin154_Team3D/Client/Public/MapContainer.h b/Jusin154_Team3D/Client/Public/MapContainer.h index 8ce40a7ec..18467ba0e 100644 --- a/Jusin154_Team3D/Client/Public/MapContainer.h +++ b/Jusin154_Team3D/Client/Public/MapContainer.h @@ -26,6 +26,9 @@ class CMapContainer abstract : public CContainerObject virtual void Late_Update(_float fTimeDelta) override; virtual HRESULT Render() override; + void ReadyForPhysX(); + void ConvertToPhysX(); + public: template HRESULT Add_Part(const _string& strPartKey, _uint iPrototypeLevelIndex, T** ppOut, void* pArg = nullptr) { @@ -53,10 +56,14 @@ class CMapContainer abstract : public CContainerObject protected: _uint m_iMaxLodLevel = {}; - vector m_ColiisonPartObjects; + vector m_ColiisonPartObjects = {}; public: virtual void Free() override; +#ifdef _DEBUG + virtual void Describe_Entity() override; +#endif // _DEBUG + }; NS_END diff --git a/Jusin154_Team3D/Client/Public/MapInfo.h b/Jusin154_Team3D/Client/Public/MapInfo.h index 4ea323760..a72033c42 100644 --- a/Jusin154_Team3D/Client/Public/MapInfo.h +++ b/Jusin154_Team3D/Client/Public/MapInfo.h @@ -36,6 +36,10 @@ class CMapInfo final : public CBase public: static CMapInfo* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContex); virtual void Free() override; +#ifdef _DEBUG + virtual void Describe_Entity(); +#endif // _DEBUG + }; NS_END diff --git a/Jusin154_Team3D/Client/Public/MapObject_Collision.h b/Jusin154_Team3D/Client/Public/MapObject_Collision.h index d6a21d4ff..ccc7bd531 100644 --- a/Jusin154_Team3D/Client/Public/MapObject_Collision.h +++ b/Jusin154_Team3D/Client/Public/MapObject_Collision.h @@ -20,13 +20,16 @@ class CMapObject_Collision final : public CMapPartObject // 충돌용 Mesh public: virtual _wstring Get_PrototypeTag(_uint iLodIndex = 0); - + void ReadyForPhysX(); + void ConvertToPhysX(); private: CShader* m_pShaderCom = { nullptr }; vector> m_RigidBodies; vector m_pModelComs; _uint m_iLodIndex = {}; + _bool m_bReadyToCreatePhysX = { false }; + _bool m_bConverted = { false }; vector<_wstring> m_ModelPrototypeTags; vector<_uint> m_ModelPathIndices = { }; diff --git a/Jusin154_Team3D/Client/Public/NomalJap.h b/Jusin154_Team3D/Client/Public/NomalJap.h index d0a3b9283..17dc6c3a7 100644 --- a/Jusin154_Team3D/Client/Public/NomalJap.h +++ b/Jusin154_Team3D/Client/Public/NomalJap.h @@ -18,7 +18,6 @@ class CNomalJap final : public CEffect_Container public: virtual void Priority_Update(_float fTimeDelta) override; virtual void Update(_float fTimeDelta) override; - void MoveHitBox(Engine::_float fTimeDelta); virtual void Late_Update(_float fTimeDelta) override; diff --git a/Jusin154_Team3D/Client/Public/NomalJapSide.h b/Jusin154_Team3D/Client/Public/NomalJapSide.h new file mode 100644 index 000000000..a664f2be1 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/NomalJapSide.h @@ -0,0 +1,49 @@ +#pragma once + +#include "Client_Define.h" +#include "Effect_Container.h" + +NS_BEGIN(Engine) +NS_END + +NS_BEGIN(Client) + +class CNomalJapSide final : public CEffect_Container +{ +private: + CNomalJapSide(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CNomalJapSide(const CNomalJapSide& rhs); + virtual ~CNomalJapSide() = 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) override; + +private: + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + virtual HRESULT Ready_Components(void* pArg) override; + HRESULT Ready_Child(); + HRESULT Bind_ShaderResources() override; + virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override; +private: + _wstring m_wstrEffectName = {}; + + class CEffectParts* m_pWandLight = { nullptr }; + class CTrailObject* m_pWandTrail = { nullptr }; + class CEffectParts* m_pWandParticle = { nullptr }; + +public: + static CNomalJapSide* 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/Skill_Data.h b/Jusin154_Team3D/Client/Public/Skill_Data.h index 1f8db1ae1..f899398d7 100644 --- a/Jusin154_Team3D/Client/Public/Skill_Data.h +++ b/Jusin154_Team3D/Client/Public/Skill_Data.h @@ -1,5 +1,65 @@ #pragma once -class CSkill_Data + +#include "Client_Define.h" +#include "GameObject.h" + +NS_BEGIN(Engine) +class CGameInstance; +NS_END + +NS_BEGIN(Client) + +class CSkill_Data final : public CGameObject { +public: + typedef struct tagSpellInfo + { + _int iSpell_ID{}; + _string pSpell_Name; + _string pImage_Name; + _int iSpell_Type{}; + _int iSkill_Type{}; + _float fSpell_CoolTime{}; + _float fDuration{}; + _int iAnimNum{}; + _string pSpellInfo; + _bool bSpell_Lock = false; + _bool bEquip_Spell = false; + }SPELLINFO; +private: + CSkill_Data(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CSkill_Data(const CSkill_Data& rhs); + virtual ~CSkill_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 SPELLINFO& Get_Info(_uint SpellID) const; + +private: + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + CGameObject* m_pSpell_Panel = { nullptr }; + + SPELLINFO SpellInfo = {}; +public: + static CSkill_Data* 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/Spell_Anim.h b/Jusin154_Team3D/Client/Public/Spell_Anim.h new file mode 100644 index 000000000..a40ce3957 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Spell_Anim.h @@ -0,0 +1,62 @@ +#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 CSpell_Anim final : public CElementObject +{ +private: + CSpell_Anim(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CSpell_Anim(const CSpell_Anim& rhs); + virtual ~CSpell_Anim() = 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; + +public: + virtual void Set_FadeIn() override; + +private: + void Change_Image(_int SpellID); + virtual void Set_SkillType(_int eType) 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 }; + CTexture* m_pDesendo_TextureCom = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + _int m_iTotalFrames{}; // 전체 프레임 수 + _float m_fFrameTime{}; // 한 프레임당 시간(초) + _int m_iCurrentFrame{}; // 현재 보여줄 프레임 + + _int m_iPerSpell{}; + _bool m_bAnim_Start = { false }; +public: + static CSpell_Anim* 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/Spell_Canvas.h b/Jusin154_Team3D/Client/Public/Spell_Canvas.h new file mode 100644 index 000000000..f6ca5bf81 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Spell_Canvas.h @@ -0,0 +1,50 @@ +#pragma once + +#include "Client_Define.h" +#include "CanvasObject.h" + +NS_BEGIN(Engine) +class CTexture; +class CShader; +class CVIBuffer_Rect; +NS_END + +NS_BEGIN(Client) + +class CSpell_Canvas final : public CCanvasObject +{ +private: + CSpell_Canvas(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CSpell_Canvas(const CSpell_Canvas& rhs); + virtual ~CSpell_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_pSpell_Panel = { nullptr }; +public: + static CSpell_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/Spell_Header.h b/Jusin154_Team3D/Client/Public/Spell_Header.h new file mode 100644 index 000000000..cb7f1956d --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Spell_Header.h @@ -0,0 +1,49 @@ +#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 CSpell_Header final : public CElementObject +{ +private: + CSpell_Header(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CSpell_Header(const CSpell_Header& rhs); + virtual ~CSpell_Header() = 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 }; + + _int m_iSkillType{}; +public: + static CSpell_Header* 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/Spell_Header_Line.h b/Jusin154_Team3D/Client/Public/Spell_Header_Line.h new file mode 100644 index 000000000..e51a66e5d --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Spell_Header_Line.h @@ -0,0 +1,48 @@ +#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 CSpell_Header_Line final : public CElementObject +{ +private: + CSpell_Header_Line(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CSpell_Header_Line(const CSpell_Header_Line& rhs); + virtual ~CSpell_Header_Line() = 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 CSpell_Header_Line* 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/Spell_Hover.h b/Jusin154_Team3D/Client/Public/Spell_Hover.h new file mode 100644 index 000000000..bd223cb21 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Spell_Hover.h @@ -0,0 +1,63 @@ +#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 CSpell_Hover final : public CElementObject +{ +private: + CSpell_Hover(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CSpell_Hover(const CSpell_Hover& rhs); + virtual ~CSpell_Hover() = 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; + + virtual void SizeUpX(_float fSizeX) override; + virtual void SizeUpY(_float fSizeY) override; + virtual void SizeUpdate(_float fSizeX, _float fSizeY) override; + +private: + void Hover(); + +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 }; + CTexture* m_pDiffuse_TextureCom1 = { nullptr }; + CTexture* m_pDiffuse_TextureCom2 = { nullptr }; + CTexture* m_pDiffuse_TextureCom3 = { nullptr }; + CTexture* m_pDiffuse_TextureCom4 = { nullptr }; + CTexture* m_pDiffuse_TextureCom5 = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_UI_Instance* m_pVIBufferCom = { nullptr }; + + _float m_fOffSetX{}; + _float m_fOffSetY{}; + _uint m_iCols{}; +public: + static CSpell_Hover* 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/Spell_Hover_Effect.h b/Jusin154_Team3D/Client/Public/Spell_Hover_Effect.h new file mode 100644 index 000000000..c416c180a --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Spell_Hover_Effect.h @@ -0,0 +1,57 @@ +#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 CSpell_Hover_Effect final : public CElementObject +{ +private: + CSpell_Hover_Effect(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CSpell_Hover_Effect(const CSpell_Hover_Effect& rhs); + virtual ~CSpell_Hover_Effect() = 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; + + virtual void SizeUpX(_float fSizeX) override; + virtual void SizeUpY(_float fSizeY) override; + virtual void SizeUpdate(_float fSizeX, _float fSizeY) 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 }; + CTexture* m_pDiffuse_TextureCom1 = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_UI_Instance* m_pVIBufferCom = { nullptr }; + + _float m_fOffSetX{}; + _float m_fOffSetY{}; + _uint m_iCols{}; + +public: + static CSpell_Hover_Effect* 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/Spell_List.h b/Jusin154_Team3D/Client/Public/Spell_List.h new file mode 100644 index 000000000..2be2758cf --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Spell_List.h @@ -0,0 +1,63 @@ +#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 CSpell_List final : public CElementObject +{ +private: + CSpell_List(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CSpell_List(const CSpell_List& rhs); + virtual ~CSpell_List() = 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; + + virtual void SizeUpX(_float fSizeX) override; + virtual void SizeUpY(_float fSizeY) override; + virtual void SizeUpdate(_float fSizeX, _float fSizeY) override; + +private: + void Color(); + void Hover(_float fTimeDelta); + +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_UI_Instance* m_pVIBufferCom = { nullptr }; + + _float m_fOffSetX{}; + _float m_fOffSetY{}; + _uint m_iCols{}; + + _int m_iPerSpell_Slot{}; + _float m_fHoverTime{}; +public: + static CSpell_List* 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/Spell_List_Image.h b/Jusin154_Team3D/Client/Public/Spell_List_Image.h new file mode 100644 index 000000000..5fd3c3c10 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Spell_List_Image.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 CSpell_List_Image final : public CElementObject +{ +private: + CSpell_List_Image(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CSpell_List_Image(const CSpell_List_Image& rhs); + virtual ~CSpell_List_Image() = 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; + +public: + virtual void SizeUpX(_float fSizeX) override; + virtual void SizeUpY(_float fSizeY) override; + virtual void SizeUpdate(_float fSizeX, _float fSizeY) override; + + void UV(); + _float4 Meter_Index(_uint Number); + +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_UI_Instance* m_pVIBufferCom = { nullptr }; + CVIBuffer_UI_Instance::UI_ATLAS_DESC pUVDesc[26]; + + _float m_fOffSetX{}; + _float m_fOffSetY{}; + _uint m_iCols{}; + +public: + static CSpell_List_Image* 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/Spell_Panel.h b/Jusin154_Team3D/Client/Public/Spell_Panel.h new file mode 100644 index 000000000..9b98c857a --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Spell_Panel.h @@ -0,0 +1,80 @@ +#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 CSpell_Panel final : public CPanelObject +{ + +private: + CSpell_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CSpell_Panel(const CSpell_Panel& rhs); + virtual ~CSpell_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; + +public: + virtual const SPELLINFO Get_Info(_int Index) override; + +private: + void Slot_Chack(void* pArg); + + +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 }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + CGameObject* m_pCurrent_Spell_Slot = { nullptr }; + CGameObject* m_pSpell_List = { nullptr }; + CGameObject* m_pEessential_Spell_Slot = { nullptr }; + CGameObject* m_pEessential_Spell = { nullptr }; + CGameObject* m_pSpell_List_Image = { nullptr }; + CGameObject* m_pSpell_State = { nullptr }; + CGameObject* m_pSpell_Hover = { nullptr }; + CGameObject* m_pSpell_Hover_Effect = { nullptr }; + CGameObject* m_pSpell_Preview = { nullptr }; + CGameObject* m_pSpell_Vidio_Border = { nullptr }; + CGameObject* m_pCurrent_Slot_Number = { nullptr }; + CGameObject* m_pSpell_Data= { nullptr }; + CGameObject* m_pSpell_Header = { nullptr }; + CGameObject* m_pSpell_Header_Line = { nullptr }; + CGameObject* m_pSpell_Anim = { nullptr }; + + _int m_iHoverSlot[2] = { -1,-1 }; + + SPELLINFO m_Info[34] = {}; + CUIObject::HOVER_INFO m_Hover; + + _int m_iPendingSpell = -1; + _float m_fHoverTimer = 0.f; +public: + static CSpell_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/Spell_Preview.h b/Jusin154_Team3D/Client/Public/Spell_Preview.h new file mode 100644 index 000000000..5952a2c80 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Spell_Preview.h @@ -0,0 +1,58 @@ +#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 CSpell_Preview final : public CElementObject +{ +private: + CSpell_Preview(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CSpell_Preview(const CSpell_Preview& rhs); + virtual ~CSpell_Preview() = 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; + + virtual void SizeUpX(_float fSizeX) override; + virtual void SizeUpY(_float fSizeY) 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 }; + CTexture* m_pDiffuse_TextureCom1 = { nullptr }; + CTexture* m_pDiffuse_TextureCom2 = { nullptr }; + CTexture* m_pDiffuse_TextureCom3 = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + + + _float4 m_vHeaderBack{}; + +public: + static CSpell_Preview* 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/Spell_State.h b/Jusin154_Team3D/Client/Public/Spell_State.h new file mode 100644 index 000000000..9e958722e --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Spell_State.h @@ -0,0 +1,59 @@ +#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 CSpell_State final : public CElementObject +{ +private: + CSpell_State(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CSpell_State(const CSpell_State& rhs); + virtual ~CSpell_State() = 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; + + virtual void SizeUpX(_float fSizeX) override; + virtual void SizeUpY(_float fSizeY) override; + virtual void SizeUpdate(_float fSizeX, _float fSizeY) override; + +private: + void Hover(); + +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_UI_Instance* m_pVIBufferCom = { nullptr }; + + _float m_fOffSetX{}; + _float m_fOffSetY{}; + _uint m_iCols{}; + +public: + static CSpell_State* 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/Spell_Vidio_Border.h b/Jusin154_Team3D/Client/Public/Spell_Vidio_Border.h new file mode 100644 index 000000000..eb4c32fd6 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Spell_Vidio_Border.h @@ -0,0 +1,59 @@ +#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 CSpell_Vidio_Border final : public CElementObject +{ +private: + CSpell_Vidio_Border(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CSpell_Vidio_Border(const CSpell_Vidio_Border& rhs); + virtual ~CSpell_Vidio_Border() = 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; + +//public: +// virtual const SPELLINFO Get_Info(_int Index) override; +// +//public: +// virtual void Set_SkillType(_int eType); + +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 }; + CTexture* m_pDesendo_TextureCom = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + _float m_fStertTimer{}; + _int m_iPerIndex{}; + _bool m_bStart = { false }; + +public: + static CSpell_Vidio_Border* 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/Wand.h b/Jusin154_Team3D/Client/Public/Wand.h index af48b0f61..192c3b779 100644 --- a/Jusin154_Team3D/Client/Public/Wand.h +++ b/Jusin154_Team3D/Client/Public/Wand.h @@ -25,6 +25,7 @@ class CWand final : public CPartObject virtual void Late_Update(_float fTimeDelta) override; virtual HRESULT Render() override; virtual _vector Get_WorldPostion() override; + _matrix Get_WorldMatrix(); public: private: diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BombardaSide/Bombard_Trail.trail b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BombardaSide/Bombard_Trail.trail new file mode 100644 index 000000000..f412c79fe Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BombardaSide/Bombard_Trail.trail differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BombardaSide/WandParticle_B_100.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BombardaSide/WandParticle_B_100.bin new file mode 100644 index 000000000..7cfd4df30 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BombardaSide/WandParticle_B_100.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0c92133fecdb83530bc93e9a8123df806afdf47c49b57ca3a4a4cc5abcca481e +size 767 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BombardaSide/Wand_Light_B.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BombardaSide/Wand_Light_B.bin new file mode 100644 index 000000000..3ed1cb98a --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BombardaSide/Wand_Light_B.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:535995542dafe19a738a09af2556bcedcc0a851761c5af944d035c7e6f572ee3 +size 788 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_PT0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_PT0.bin index 836af987e..9ba9f6e1d 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_PT0.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_PT0.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:833d0014fe0a82a96e996d9dc0cec076235b299b49d3900abc878cd1834c0449 +oid sha256:966199250324aa27eff380440b0307b756b5c93ab2ba1a06be7cee3c08079e53 size 790 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/DecendoSide/Trail_R.trail b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/DecendoSide/Trail_R.trail new file mode 100644 index 000000000..78363b13a Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/DecendoSide/Trail_R.trail differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/DecendoSide/Wand_Light_R.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/DecendoSide/Wand_Light_R.bin new file mode 100644 index 000000000..2d4f1e4e1 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/DecendoSide/Wand_Light_R.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:311058cfe3f32ef3a757745094abb5883c28e4ba60ca1de2866eb9398a3703eb +size 788 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/Circle_Particle_Red.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/Circle_Particle_Red.bin new file mode 100644 index 000000000..a1479e44a --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/Circle_Particle_Red.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a8e1e280ef297a3d3e9c3fdf62e3483015dfa000a89fd01e2cf264e8e0459385 +size 751 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapHit1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapHit1.bin index e6891e580..d5afb80e4 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapHit1.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapHit1.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:84de7e1878d3a81741dd9a99298f0da7e821f65e30961327a41e32b9c506390b +oid sha256:642c939fa532791b45d8c241a63ce5c9059c964f5e5099b9e400b11a24f315bf size 741 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapSideEffect/Red_Trail.trail b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapSideEffect/Red_Trail.trail new file mode 100644 index 000000000..44cd89c1f Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapSideEffect/Red_Trail.trail differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapSideEffect/WandParticle1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapSideEffect/WandParticle1.bin new file mode 100644 index 000000000..38cc2b7a6 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapSideEffect/WandParticle1.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f87d81db6b5229567be83c939d53c396811bc723e7e6d4349a97c55f659fcee7 +size 767 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapSideEffect/Wand_Red_Long.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapSideEffect/Wand_Red_Long.bin new file mode 100644 index 000000000..8be93483f --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapSideEffect/Wand_Red_Long.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:84cd25c7c324d9b12eca18a3c0321666d69868f5b57829fffaba30a3cea20744 +size 757 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_Bottom_PT.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_Bottom_PT.bin new file mode 100644 index 000000000..6772eb966 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_Bottom_PT.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:56f915c19fdc913eced47f88e1fae5f34cf64b9edf79c60811d0451edd835f3e +size 753 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_Bottom_Wind.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_Bottom_Wind.bin new file mode 100644 index 000000000..78cf38c6a --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_Bottom_Wind.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aca541211c947f21f811efd786ba2ce57a81a1fe59b2e44ca0a8ef5b5d9c643f +size 792 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_Hit.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_Hit.bin new file mode 100644 index 000000000..9c33526f1 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_Hit.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3972bbe5790dc7bf17bff9d369f7a26140831c2b8891e1d804de238da44e58ed +size 839 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_Rotate0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_Rotate0.bin index 88df1c802..465749d56 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_Rotate0.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_Rotate0.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5e336892c6c5d78c91c9ae24b4aea3c987be609861d57cfa0cdaabdc830e5778 -size 789 +oid sha256:401f457b265c189f6a12fb75ed82699ea5dbc3992f4c75fb7380adc6ca2f2719 +size 738 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_Rotate1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_Rotate1.bin index 1090c6917..c8642e4b4 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_Rotate1.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_Rotate1.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d6cfa5e6c66767b4919c915c6455f7d1765cd0ee7d59b1e7905d3616748f9003 -size 789 +oid sha256:1e7596ce4bcf2a2c68f2432c1d67867ca77109998f954bbd09c3904cd164170e +size 738 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_Tornado.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_Tornado.bin new file mode 100644 index 000000000..b5df370fa --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_Tornado.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8520c72d6678fba1b934cd55bd9a8c16ac3e3d7913a787add1b5328591f65fca +size 800 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Wand_Light_P.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Wand_Light_P.bin new file mode 100644 index 000000000..f713fc1e9 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Wand_Light_P.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3f3e701682a0548a9a903c5daa8e8c7c42a34058a727aa6e9b70f9002127688d +size 788 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LeviosoSide/Trail_P.trail b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LeviosoSide/Trail_P.trail new file mode 100644 index 000000000..7a7aaf91a Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LeviosoSide/Trail_P.trail differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LeviosoSide/Wand_Light_P.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LeviosoSide/Wand_Light_P.bin new file mode 100644 index 000000000..aff84a753 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LeviosoSide/Wand_Light_P.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e86b09741d600af37eb157fbbcfef725615e8d3b9265f5ba8532535936be1650 +size 788 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lumos/Lumos.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lumos/Lumos.bin index 6e096bf10..323b62731 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lumos/Lumos.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lumos/Lumos.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:18526f9c91fafa6f5916b5fff7d18b400a345bfaa6fa76e2c1087139090343d6 +oid sha256:8f28da93aee35bcbd4bc3f8776385c98e81c5eab19febad4b7c3b6d03c10046b size 788 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/BombardaSide.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/BombardaSide.bin new file mode 100644 index 000000000..a757c447e --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/BombardaSide.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:96cc32323dfe11d7177c382487de5468198e682722e568dcaae4110d44434066 +size 214 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/DecendoSide.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/DecendoSide.bin new file mode 100644 index 000000000..4876af65f --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/DecendoSide.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:35e40c07675c79a0e8b21779d8401a335631589ebb4cc86ee04552bc2386e12b +size 133 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Jap.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Jap.bin index ffa9a9497..e314a9a76 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Jap.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Jap.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:807218446b2caf45986cc79908b50658bb86f5561653c45ed7e573579219a784 -size 334 +oid sha256:6c97eeefda813b6990a079c31238752efa748551a7cac20211bf619d822eb5da +size 399 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/JapsideEffect.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/JapsideEffect.bin new file mode 100644 index 000000000..886e6288f --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/JapsideEffect.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b6088a9dcf3bd646cacdb15ee2988034b88a5b705aeec8129cea37181eebedb5 +size 209 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Levioso.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Levioso.bin index 15d72f328..093a46379 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Levioso.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Levioso.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:df3c185b85b6beb78e13d90806d8330b3249b1613edf96ace5be5e4135ddfcca -size 250 +oid sha256:1407184bdbe9755d19cbb50a7a3d37c3e899046274e3bf5998f521147673a3b1 +size 768 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/LeviosoSide.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/LeviosoSide.bin new file mode 100644 index 000000000..e92e277a0 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/LeviosoSide.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e4d65dac7bb2309f3760a01d6669367ebecf25be6796e31017a8ba6c05dc8ef7 +size 133 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Lumos.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Lumos.bin new file mode 100644 index 000000000..433f738c8 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Lumos.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:655e4c20bfc656cd1f968340e7aabbf694c85d0aa65be9359d133f477277cb14 +size 57 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Protego/ProtegoCircle.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Protego/ProtegoCircle.bin index 72c5438f0..8f8ac4ab8 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Protego/ProtegoCircle.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Protego/ProtegoCircle.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4c99a7aecb456c8d77a45b38f94fe51ba8c8578ccbe701a82c21f7880122f01c +oid sha256:d069692bf8d31a3d42368f0024d4bbc39db4a88e91ed44ad0b550100cd1a3182 size 821 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Trail/Bombard_Trail.trail b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Trail/Bombard_Trail.trail index f093e1e8d..02c85d450 100644 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Trail/Bombard_Trail.trail and b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Trail/Bombard_Trail.trail differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Trail/Red_Trail.trail b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Trail/Red_Trail.trail new file mode 100644 index 000000000..44cd89c1f Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Trail/Red_Trail.trail differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/WandLight/Wand_Red_Long.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/WandLight/Wand_Red_Long.bin new file mode 100644 index 000000000..4840263da --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/WandLight/Wand_Red_Long.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5877c628aeddbb1016004b85dd0e262c4f00e3141888371b99dae2a14cd08e31 +size 749 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/WandParticle/Circle_Particle_Red.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/WandParticle/Circle_Particle_Red.bin new file mode 100644 index 000000000..8516d37bf --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/WandParticle/Circle_Particle_Red.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5032e3f9346f2a29f372ee4a486cc8418d51d5ff3c4b27842b89aba93b021d98 +size 751 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/WandParticle/WandParticle1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/WandParticle/WandParticle1.bin new file mode 100644 index 000000000..5286aa677 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/WandParticle/WandParticle1.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8a9ceaa16eb7d1274fd5d3d50d782b4798a6608460d9e20e699e9f79500bdcad +size 767 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/WandParticle/WandParticle_B.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/WandParticle/WandParticle_B.bin new file mode 100644 index 000000000..f8a170a84 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/WandParticle/WandParticle_B.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5dbd6c7ce1063b50d5dd5b0e0cf00b9072b54f7d618abd64c739fd5bd6536f31 +size 767 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/WandParticle/WandParticle_B_100.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/WandParticle/WandParticle_B_100.bin new file mode 100644 index 000000000..d3bcedf0b --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/WandParticle/WandParticle_B_100.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7805bf5d29be9864c8e44c8b75f41cf0ebc266068180cad102240e5f33d369b8 +size 767 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/WandParticle/WandParticle_R.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/WandParticle/WandParticle_R.bin new file mode 100644 index 000000000..38cc2b7a6 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/WandParticle/WandParticle_R.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f87d81db6b5229567be83c939d53c396811bc723e7e6d4349a97c55f659fcee7 +size 767 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/UI/Spell/SpellInfo.xml b/Jusin154_Team3D/Editor/Bin/Resources/Data/UI/Spell/SpellInfo.xml new file mode 100644 index 000000000..e95b0bb5d --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/UI/Spell/SpellInfo.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl index 37238d940..e0f824a57 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl @@ -1097,6 +1097,7 @@ PS_OUT PS_Spell_Header(PS_IN In) return Out; } + PS_OUT PS_Spell_Header_Line(PS_IN In) { PS_OUT Out; @@ -1159,6 +1160,39 @@ PS_OUT PS_Spell_Header_Line(PS_IN In) return Out; } +PS_OUT PS_Spell_Drag(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 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord); + float4 tex2 = g_Texture1.Sample(DefaultSampler, In.vTexcoord); + float4 tex2Color = g_Texture3.Sample(DefaultSampler, In.vTexcoord); + + Color = tex1; + tex2.rgb = tex2Color; + + Color = lerp(Color, tex2, tex2.a); + + float2 Imagetexpos1 = g_fImageUV.xy / g_fCurrent_Size; + float2 Imagetexsize1 = g_fImageUV.zw / g_fCurrent_Size; + float2 Imagelocal = (In.vTexcoord - Imagetexpos1) / Imagetexsize1; + bool inside1 = all(Imagelocal >= 0.0f && Imagelocal <= 1.0f); + float4 tex3 = g_Texture2.Sample(DefaultSampler, In.vTexcoord); + + if (inside1) + { + Color = lerp(Color, tex3, tex3.a); + } + + Color.a *= Alpha; + + Out.vColor = Color; + + return Out; +} + technique11 PosTexTechnique11 { pass Default @@ -1389,4 +1423,14 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Spell_Header_Line(); } + pass Spell_Drag + { + SetRasterizerState(RS_Default); + SetDepthStencilState(DSS_Default, 0); + SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_Spell_Drag(); + } + } diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UI_Instance.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UI_Instance.hlsl index 5b35a6cf9..593c4b16a 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UI_Instance.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UI_Instance.hlsl @@ -43,7 +43,7 @@ VS_OUT VS_MAIN(VS_IN In) matrix matVP = mul(g_ViewMatrix, g_ProjMatrix); float3 vLocalPos = In.vPosition; - if (In.bHover != 0) + if (In.bHover == 1) vLocalPos.xy *= In.vSize * 1.1f; else vLocalPos.xy *= In.vSize; @@ -274,7 +274,7 @@ PS_OUT PS_Spell_Effect(PS_IN In) //float angle = -g_fTime; //float s = sin(angle); //float c = cos(angle); - //float2 rotUV = float2( + //float2 maskUV = float2( //uv.x * c - uv.y * s, //uv.x * s + uv.y * c //) + center; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl index 469fb280b..0f1e5b87c 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl @@ -116,8 +116,9 @@ bool g_isNoiseAlpha; bool g_isNomalDissolve; -bool g_isDiffuseBlur; -bool g_isMaskBlur; +bool g_isBlurNoEmissive; +bool g_isTexBlur; + bool g_isBlurDissolve; bool g_isBlurReverseDissolve; @@ -272,7 +273,7 @@ float4 DrawEffect(PS_IN In) UV += SelectLerpUV((g_vDiffuseUVGainAmount / g_vUVCutting), (vDiffuseTime.x / vDiffuseTime.y), g_iDiffuseMoveLerpOption); } - if (g_isDiffuseBlur) + if (g_isTexBlur) { float4 fAccDiffuse; @@ -380,7 +381,7 @@ float4 DrawEffect(PS_IN In) vMtrlMask = g_MaskingTexture.Sample(DefaultSampler, vMaskTexcoord); - if (g_isMaskBlur) + if (g_isTexBlur) { float4 fAccMask; @@ -504,7 +505,7 @@ float4 EmissiveDraw(PS_IN In) } } - return vEmissiveMtrl * fEmissive * fEmissiveStrength; + return saturate(vEmissiveMtrl * fEmissive * fEmissiveStrength); } @@ -533,8 +534,6 @@ PS_OUT BlendedWeight(vector fDiffuse, float fLinearZ) float fWeight = clamp(pow(fLinearZ, -2.5f), 1.0f, 1000.0f); - - Out.vDiffuse = vector(vColor.rgb * fAlpha, fAlpha) * fWeight; Out.vRevealage.r = fAlpha; @@ -578,20 +577,22 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In) vMtrlDiffuse = DrawEffect(In); - //int2 iTexel = int2(In.vPosition.xy); + int2 iTexel = int2(In.vPosition.xy); - //float fDepthStencilValue = g_DepthStencilTexture.Load(int3(iTexel, 0)).r; + float fDepthStencilValue = g_DepthStencilTexture.Load(int3(iTexel, 0)).r; - //float fbias = 0.000005f; + float fbias = 0.000005f; - //if (fDepthStencilValue <= In.vProjPos.z / In.vProjPos.w + fbias) - // discard; + if (fDepthStencilValue <= In.vProjPos.z / In.vProjPos.w + fbias) + discard; + + vMtrlDiffuse.rgb += EmissiveDraw(In).rgb; Out = BlendedWeight(vMtrlDiffuse, In.vProjPos.w); //// 색깔 추가할 처리 (이미시브) - Out.vDiffuse += EmissiveDraw(In); // 이미시브 스트랭스 + //Out.vDiffuse // 이미시브 스트랭스 Out.vColorTarget = vector(0.f, 0.f, 0.f, 0.f); return Out; @@ -655,17 +656,17 @@ struct PS_BLOOM_OUT float4 vDiffuse : SV_TARGET0; }; -PS_BLUR_OUT PS_BLUR(PS_IN In) +PS_BLUR_OUT PS_BLUR_NOEMISSIVE(PS_IN In) { PS_BLUR_OUT Out; vector vMtrlDiffuse; - vMtrlDiffuse = DrawEffect(In); + vMtrlDiffuse= DrawEffect(In); //// 색깔 추가할 처리 (이미시브) - - vMtrlDiffuse += EmissiveDraw(In); + + vMtrlDiffuse.a = 1.f; if (g_isDissolve == true) { @@ -681,6 +682,34 @@ PS_BLUR_OUT PS_BLUR(PS_IN In) return Out; } +PS_BLUR_OUT PS_BLUR(PS_IN In) +{ + PS_BLUR_OUT Out; + + vector vMtrlDiffuse; + + vMtrlDiffuse = DrawEffect(In); + + //// 색깔 추가할 처리 (이미시브) + + vMtrlDiffuse.rgb += EmissiveDraw(In).rgb; + + vMtrlDiffuse.a = 1.f; + + if (g_isDissolve == true) + { + if (g_isNomalDissolve) + { + vMtrlDiffuse.a *= (0.95f - In.vLifeTime.x / In.vLifeTime.y); + } + } + + Out.vDiffuse = vector(vMtrlDiffuse.rgb * g_fBlurIntensity, vMtrlDiffuse.a); + Out.vBlurWeight = g_iBlurWeight / 128.f; + + return Out; +} + PS_BLOOM_OUT PS_BLOOM(PS_IN In) { PS_BLOOM_OUT Out; @@ -693,9 +722,9 @@ PS_BLOOM_OUT PS_BLOOM(PS_IN In) //// 색깔 추가할 처리 (이미시브) - vMtrlDiffuse += EmissiveDraw(In); + vMtrlDiffuse.rgb += EmissiveDraw(In).rgb; - float fBloomStrength = g_fBloomStrength; + float fBloomStrength = g_fBloomStrength; if (g_isBloomDissolve == true) { @@ -707,6 +736,9 @@ PS_BLOOM_OUT PS_BLOOM(PS_IN In) { fBloomStrength = g_fBloomStrength * ((In.vLifeTime.x / In.vLifeTime.y)); } + + if (vMtrlDiffuse.a <= 0.1f) + discard; Out.vDiffuse = vector(vMtrlDiffuse.rgb * fBloomStrength, (float) g_iBloomType / 255.f); @@ -722,18 +754,6 @@ PS_BLOOM_OUT PS_BLEND(PS_IN In) vMtrlDiffuse = DrawEffect(In); - - //int2 iTexel = int2(In.vPosition.xy); - - //float fDepthStencilValue = g_DepthStencilTexture.Load(int3(iTex el, 0)).r; - - //float fbias = 0.000005f; - - //if (fDepthStencilValue <= In.vProjPos.z / In.vProjPos.w + fbias) - // discard; - - //// 색깔 추가할 처리 (이미시브) - vMtrlDiffuse.rgb += EmissiveDraw(In).rgb; Out.vDiffuse = vMtrlDiffuse; @@ -741,6 +761,22 @@ PS_BLOOM_OUT PS_BLEND(PS_IN In) return Out; } +PS_BLOOM_OUT PS_WEIGHTED_FOR_BLEND(PS_IN In) +{ + PS_BLOOM_OUT Out; + + vector vMtrlDiffuse; + + vMtrlDiffuse = DrawEffect(In); + + vMtrlDiffuse.rgb += EmissiveDraw(In).rgb; + + Out.vDiffuse = BlendedWeight(vMtrlDiffuse, In.vProjPos.w).vDiffuse; + + + return Out; +} + technique11 DefaultTechnique { pass Model @@ -844,6 +880,37 @@ technique11 DefaultTechnique PixelShader = compile ps_5_0 PS_BLOOM(); } + + pass BLUR_NO_EMMISVE + { + SetRasterizerState(RS_Nocull); + SetDepthStencilState(DSS_Effect, 0); + SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_BLUR(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_BLUR_NOEMISSIVE(); + } + + pass BLUR_NO_WORLD_NO_EMISSIVE + { + SetRasterizerState(RS_Nocull); + SetDepthStencilState(DSS_Effect, 0); + SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_BLUR_NOWORLD(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_BLUR_NOEMISSIVE(); + } + + pass WEIGHTBLEND_FOR_BLEND + { + SetRasterizerState(RS_Nocull); + SetDepthStencilState(DSS_Effect, 0); + SetBlendState(BS_WB_Acc, 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_WEIGHTED_FOR_BLEND(); + } + } diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxPos.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxPos.hlsl index 73bc60fd3..c8162a6e7 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxPos.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxPos.hlsl @@ -7,6 +7,8 @@ float g_fFar; float3 g_vContainerMin; float3 g_vContainerMax; + + struct VS_IN { float3 vPosition : POSITION; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxPosTex.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxPosTex.hlsl index 4f40329a9..930109978 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxPosTex.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxPosTex.hlsl @@ -16,6 +16,7 @@ Texture2D g_DiffuseTexture; Texture2D g_MaskingTexture; Texture2D g_NoiseTexture; Texture2D g_DistortionTexture; +Texture2D g_DepthStencilTexture; /* 디퓨즈 */ bool g_isDiffuse; @@ -62,6 +63,8 @@ int g_iBloomType; float2 g_vBloomTime; + + struct VS_IN { float3 vPosition : POSITION; @@ -273,18 +276,33 @@ float4 EmissiveDraw(PS_IN In) float fCore = pow(saturate(1.0 - fDistance * 2.f), max(0.001, g_fCoreBoost)) * g_fCoreBoost; // CoreBust 중심강조 fEmissive = fSoftEdge + fCore; + + } - return vEmissiveMtrl * fEmissive * fEmissiveStrength; + if (fEmissive == 0.f) + fEmissive = 1.f; + + return saturate(vEmissiveMtrl * fEmissive * fEmissiveStrength); } PS_TRAILOUT PS_Trail(PS_IN In) { PS_TRAILOUT Out; + int2 iTexel = int2(In.vPosition.xy); + + float fDepthStencilValue = g_DepthStencilTexture.Load(int3(iTexel, 0)).r; + + float fbias = 0.000005f; + + if (fDepthStencilValue <= In.vProjPos.z / In.vProjPos.w + fbias) + discard; + vector vMtrlDiffuse; vMtrlDiffuse = Draw_Trail(In); + /* 웨이트 블랜드 */ @@ -294,8 +312,9 @@ PS_TRAILOUT PS_Trail(PS_IN In) Out.vRevealage.r = vMtrlDiffuse.a; /* 이미시브 */ + + Out.vDiffuse.rgb += EmissiveDraw(In).rgb; - Out.vDiffuse = saturate(Out.vDiffuse + EmissiveDraw(In)); // 이미시브 스트랭스 Out.vColorTarget = vector(0.f, 0.f, 0.f, 0.f); return Out; @@ -323,7 +342,7 @@ PS_BLUR_OUT PS_TRAIL_BLUR(PS_IN In) //// 색깔 추가할 처리 (이미시브) - vMtrlDiffuse += EmissiveDraw(In); + //vMtrlDiffuse += EmissiveDraw(In); Out.vDiffuse = vector(vMtrlDiffuse.rgb * g_fBlurIntensity, vMtrlDiffuse.a); Out.vBlurWeight = g_iBlurWeight / 128.f; @@ -347,7 +366,7 @@ PS_BLUR_OUT PS_TRAIL_BLOOM(PS_IN In) //// 색깔 추가할 처리 (이미시브) - vMtrlDiffuse += EmissiveDraw(In); + //vMtrlDiffuse += EmissiveDraw(In); float fBloomStrength = g_fBloomStrength; @@ -422,7 +441,7 @@ technique11 PosTexTechnique11 pass TrailBlur { SetRasterizerState(RS_Nocull); - SetDepthStencilState(DSS_None, 0); + SetDepthStencilState(DSS_Effect, 0); SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); VertexShader = compile vs_5_0 VS_MAIN(); GeometryShader = NULL; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/PMI_Leviosa_Dist_01.mat b/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/PMI_Leviosa_Dist_01.mat new file mode 100644 index 000000000..bd9c0e421 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/PMI_Leviosa_Dist_01.mat @@ -0,0 +1,5 @@ +Diffuse=VFX_T_Circle_Sphere_D +Normal=VFX_T_SmokeTiled_N +SpecPower=VFX_T_Circle_Sphere_D +Other[0]=VFX_T_GradientMask_D +Other[1]=VFX_T_RibbonOffset_N diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/PMI_Leviosa_Dist_01.props.txt b/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/PMI_Leviosa_Dist_01.props.txt new file mode 100644 index 000000000..6fbb2a19f --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/PMI_Leviosa_Dist_01.props.txt @@ -0,0 +1,96 @@ +Parent = Material3'/Game/VFX/MasterMaterials/Particles/VFX_MM_Refraction.VFX_MM_Refraction' +ScalarParameterValues[6] = +{ + ScalarParameterValues[0] = + { + ParameterInfo = { Name=IndexofRefraction } + ParameterValue = 0.95 + ParameterName = None + } + ScalarParameterValues[1] = + { + ParameterInfo = { Name=FadeDistance } + ParameterValue = 200 + ParameterName = None + } + ScalarParameterValues[2] = + { + ParameterInfo = { Name=TileX } + ParameterValue = 3 + ParameterName = None + } + ScalarParameterValues[3] = + { + ParameterInfo = { Name=TileY } + ParameterValue = 0.3 + ParameterName = None + } + ScalarParameterValues[4] = + { + ParameterInfo = { Name=PanY } + ParameterValue = 0.15 + ParameterName = None + } + ScalarParameterValues[5] = + { + ParameterInfo = { Name=RefractionDepthBias } + ParameterValue = 0 + ParameterName = None + } +} +TextureParameterValues[2] = +{ + TextureParameterValues[0] = + { + ParameterInfo = { Name=Normal Map } + ParameterValue = Texture2D'/Game/VFX/Textures/Noises/VFX_T_SmokeTiled_N.VFX_T_SmokeTiled_N' + ParameterName = None + } + TextureParameterValues[1] = + { + ParameterInfo = { Name=Mask } + ParameterValue = Texture2D'/Game/VFX/Textures/Gradients/VFX_T_GradientMask_D.VFX_T_GradientMask_D' + ParameterName = None + } +} +VectorParameterValues[0] = {} +BasePropertyOverrides = +{ + bOverride_BlendMode = false + BlendMode = BLEND_Translucent (2) + bOverride_TwoSided = false + TwoSided = true + bOverride_OpacityMaskClipValue = false + OpacityMaskClipValue = 0 +} +StaticParameters = +{ + StaticSwitchParameters[0] = {} + StaticComponentMaskParameters[0] = {} + TerrainLayerWeightParameters[0] = {} + MaterialLayersParameters[0] = {} +} +RuntimeVirtualTextureParameterValues[0] = {} +FontParameterValues[0] = {} +FlattenedTexture = None +MobileBaseTexture = None +MobileNormalTexture = None +bUseMobileSpecular = false +MobileSpecularPower = 16 +MobileSpecularMask = MSM_Constant (0) +MobileMaskTexture = None +TextureStreamingData[2] = +{ + TextureStreamingData[0] = + { + SamplingScale = 1 + UVChannelIndex = 0 + TextureName = VFX_T_GradientMask_D + } + TextureStreamingData[1] = + { + SamplingScale = 0.296875 + UVChannelIndex = 0 + TextureName = VFX_T_SmokeTiled_N + } +} diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/PMI_Leviosa_Dist_02.mat b/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/PMI_Leviosa_Dist_02.mat new file mode 100644 index 000000000..8dcb13d1a --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/PMI_Leviosa_Dist_02.mat @@ -0,0 +1,4 @@ +Diffuse=VFX_T_Circle_Sphere_D +Normal=VFX_T_RibbonOffset_N +SpecPower=VFX_T_Circle_Sphere_D +Other[0]=VFX_T_GradientMask_D diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/PMI_Leviosa_Dist_02.props.txt b/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/PMI_Leviosa_Dist_02.props.txt new file mode 100644 index 000000000..ab0915bc6 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/PMI_Leviosa_Dist_02.props.txt @@ -0,0 +1,90 @@ +Parent = Material3'/Game/VFX/MasterMaterials/Particles/VFX_MM_Refraction.VFX_MM_Refraction' +ScalarParameterValues[5] = +{ + ScalarParameterValues[0] = + { + ParameterInfo = { Name=IndexofRefraction } + ParameterValue = 0.95 + ParameterName = None + } + ScalarParameterValues[1] = + { + ParameterInfo = { Name=TileX } + ParameterValue = 1 + ParameterName = None + } + ScalarParameterValues[2] = + { + ParameterInfo = { Name=TileY } + ParameterValue = 0.3 + ParameterName = None + } + ScalarParameterValues[3] = + { + ParameterInfo = { Name=PanY } + ParameterValue = 0.1 + ParameterName = None + } + ScalarParameterValues[4] = + { + ParameterInfo = { Name=RefractionDepthBias } + ParameterValue = 0 + ParameterName = None + } +} +TextureParameterValues[2] = +{ + TextureParameterValues[0] = + { + ParameterInfo = { Name=Normal Map } + ParameterValue = Texture2D'/Game/VFX/Textures/Noises/VFX_T_RibbonOffset_N.VFX_T_RibbonOffset_N' + ParameterName = None + } + TextureParameterValues[1] = + { + ParameterInfo = { Name=Mask } + ParameterValue = Texture2D'/Game/VFX/Textures/Gradients/VFX_T_GradientMask_D.VFX_T_GradientMask_D' + ParameterName = None + } +} +VectorParameterValues[0] = {} +BasePropertyOverrides = +{ + bOverride_BlendMode = false + BlendMode = BLEND_Translucent (2) + bOverride_TwoSided = false + TwoSided = true + bOverride_OpacityMaskClipValue = false + OpacityMaskClipValue = 0 +} +StaticParameters = +{ + StaticSwitchParameters[0] = {} + StaticComponentMaskParameters[0] = {} + TerrainLayerWeightParameters[0] = {} + MaterialLayersParameters[0] = {} +} +RuntimeVirtualTextureParameterValues[0] = {} +FontParameterValues[0] = {} +FlattenedTexture = None +MobileBaseTexture = None +MobileNormalTexture = None +bUseMobileSpecular = false +MobileSpecularPower = 16 +MobileSpecularMask = MSM_Constant (0) +MobileMaskTexture = None +TextureStreamingData[2] = +{ + TextureStreamingData[0] = + { + SamplingScale = 1 + UVChannelIndex = 0 + TextureName = VFX_T_GradientMask_D + } + TextureStreamingData[1] = + { + SamplingScale = 0.296875 + UVChannelIndex = 0 + TextureName = VFX_T_RibbonOffset_N + } +} diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/PM_Leviosa_Ribbon.mat b/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/PM_Leviosa_Ribbon.mat new file mode 100644 index 000000000..3e468e911 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/PM_Leviosa_Ribbon.mat @@ -0,0 +1,2 @@ +Normal=VFX_T_Wavy_N +Other[0]=VFX_T_WispyNoise_D diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/PM_Leviosa_Ribbon.props.txt b/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/PM_Leviosa_Ribbon.props.txt new file mode 100644 index 000000000..c3259bc49 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/PM_Leviosa_Ribbon.props.txt @@ -0,0 +1,139 @@ +TwoSided = true +bDisableDepthTest = false +bIsMasked = false +ReferencedTextures[2] = +{ + ReferencedTextures[0] = Texture2D'/Game/VFX/Textures/Noises/VFX_T_WispyNoise_D.VFX_T_WispyNoise_D' + ReferencedTextures[1] = Texture2D'/Game/VFX/Textures/VFX_T_Wavy_N.VFX_T_Wavy_N' +} +Expressions[0] = {} +CachedExpressionData = +{ + Parameters = + { + Entries[5] = + { + Entries[0] = + { + ParameterInfos[16] = + { + ParameterInfos[0] = { Name=Speed V_B } + ParameterInfos[1] = { Name=Speed U_A } + ParameterInfos[2] = { Name=Multiplier_A } + ParameterInfos[3] = { Name=Fresnel Power } + ParameterInfos[4] = { Name=Tiling U_A } + ParameterInfos[5] = { Name=WorldPos_tiling } + ParameterInfos[6] = { Name=WorldPos_AppendB } + ParameterInfos[7] = { Name=Tiling V_A } + ParameterInfos[8] = { Name=Tiling V_B } + ParameterInfos[9] = { Name=Multiplier_WorldPos } + ParameterInfos[10] = { Name=Speed U_B } + ParameterInfos[11] = { Name=WorldPos_AppendA } + ParameterInfos[12] = { Name=Test Dark } + ParameterInfos[13] = { Name=Test Bright } + ParameterInfos[14] = { Name=Speed V_A } + ParameterInfos[15] = { Name=Tiling U_B } + } + } + Entries[1] = + { + ParameterInfos[2] = + { + ParameterInfos[0] = { Name=VecParam } + ParameterInfos[1] = { Name=Color } + } + } + Entries[2] = { ParameterInfos[0]={} } + Entries[3] = { ParameterInfos[0]={} } + Entries[4] = { ParameterInfos[0]={} } + } + ScalarValues[16] = + { + ScalarValues[0] = 0.05 + ScalarValues[1] = 0.07619 + ScalarValues[2] = 0.180953 + ScalarValues[3] = 1.05862 + ScalarValues[4] = 1 + ScalarValues[5] = 0.002 + ScalarValues[6] = 319.712 + ScalarValues[7] = 1 + ScalarValues[8] = 0.5 + ScalarValues[9] = 34.5704 + ScalarValues[10] = -0.1 + ScalarValues[11] = 209.712 + ScalarValues[12] = 0 + ScalarValues[13] = 1 + ScalarValues[14] = 0.152381 + ScalarValues[15] = 1 + } + VectorValues[2] = + { + VectorValues[0] = { R=-1, G=-0.752381, B=2, A=1 } + VectorValues[1] = { R=0.417759, G=0.368868, B=2, A=1 } + } + TextureValues[0] = {} + } + ReferencedTextures[2] = + { + ReferencedTextures[0] = Texture2D'/Game/VFX/Textures/Noises/VFX_T_WispyNoise_D.VFX_T_WispyNoise_D' + ReferencedTextures[1] = Texture2D'/Game/VFX/Textures/VFX_T_Wavy_N.VFX_T_Wavy_N' + } +} +BlendMode = BLEND_Translucent (2) +OpacityMaskClipValue = 0.333 +CollectedTextureParameters[0] = {} +CollectedScalarParameters[16] = +{ + CollectedScalarParameters[0] = { Value=0.05, Name=Speed V_B, Group=None } + CollectedScalarParameters[1] = { Value=0.07619, Name=Speed U_A, Group=None } + CollectedScalarParameters[2] = { Value=0.180953, Name=Multiplier_A, Group=None } + CollectedScalarParameters[3] = { Value=1.05862, Name=Fresnel Power, Group=None } + CollectedScalarParameters[4] = { Value=1, Name=Tiling U_A, Group=None } + CollectedScalarParameters[5] = { Value=0.002, Name=WorldPos_tiling, Group=None } + CollectedScalarParameters[6] = { Value=319.712, Name=WorldPos_AppendB, Group=None } + CollectedScalarParameters[7] = { Value=1, Name=Tiling V_A, Group=None } + CollectedScalarParameters[8] = { Value=0.5, Name=Tiling V_B, Group=None } + CollectedScalarParameters[9] = + { + Value = 34.5704 + Name = Multiplier_WorldPos + Group = None + } + CollectedScalarParameters[10] = { Value=-0.1, Name=Speed U_B, Group=None } + CollectedScalarParameters[11] = { Value=209.712, Name=WorldPos_AppendA, Group=None } + CollectedScalarParameters[12] = { Value=0, Name=Test Dark, Group=None } + CollectedScalarParameters[13] = { Value=1, Name=Test Bright, Group=None } + CollectedScalarParameters[14] = { Value=0.152381, Name=Speed V_A, Group=None } + CollectedScalarParameters[15] = { Value=1, Name=Tiling U_B, Group=None } +} +CollectedVectorParameters[2] = +{ + CollectedVectorParameters[0] = + { + Value = { R=-1, G=-0.752381, B=2, A=1 } + Name = VecParam + Group = None + } + CollectedVectorParameters[1] = + { + Value = { R=0.417759, G=0.368868, B=2, A=1 } + Name = Color + Group = None + } +} +FlattenedTexture = None +MobileBaseTexture = None +MobileNormalTexture = None +bUseMobileSpecular = false +MobileSpecularPower = 16 +MobileSpecularMask = MSM_Constant (0) +MobileMaskTexture = None +TextureStreamingData[1] = +{ + TextureStreamingData[0] = + { + SamplingScale = 1 + UVChannelIndex = 1 + TextureName = VFX_T_Wavy_N + } +} diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/SM_DragonSkull_Leviosa_Flow.props.txt b/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/SM_DragonSkull_Leviosa_Flow.props.txt new file mode 100644 index 000000000..ef4eb10eb --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/SM_DragonSkull_Leviosa_Flow.props.txt @@ -0,0 +1,26 @@ +Materials[1] = +{ + Materials[0] = MaterialInstanceConstant'/Game/VFX/MasterMaterials/MaterialInstance/VFX_MI_UltraFlare_Leviosa.VFX_MI_UltraFlare_Leviosa' +} +SourceModels[0] = {} +StaticMaterials[1] = +{ + StaticMaterials[0] = + { + MaterialInterface = MaterialInstanceConstant'/Game/VFX/MasterMaterials/MaterialInstance/VFX_MI_UltraFlare_Leviosa.VFX_MI_UltraFlare_Leviosa' + MaterialSlotName = MI_HW_DADA_DragonBones_A_R_Clean_A + UVChannelData = + { + bInitialized = true + bOverrideDensities = false + LocalUVDensities[4] = { 315.585, 0, 0, 0 } + } + } +} +Sockets[0] = {} +ExtendedBounds = +{ + Origin = { X=0.00315857, Y=9.40446, Z=-4.01167 } + BoxExtent = { X=97.0916, Y=110.71, Z=72.4 } + SphereRadius = 147.37 +} diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/SM_DragonSkull_Leviosa_Flow.pskx b/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/SM_DragonSkull_Leviosa_Flow.pskx new file mode 100644 index 000000000..1ffb4f68a Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/SM_DragonSkull_Leviosa_Flow.pskx differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/SM_DragonSkull_Leviosa_Flow_Lod1.pskx b/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/SM_DragonSkull_Leviosa_Flow_Lod1.pskx new file mode 100644 index 000000000..0e9bfa0cd Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/SM_DragonSkull_Leviosa_Flow_Lod1.pskx differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/SM_DragonSkull_Leviosa_Flow_Lod2.pskx b/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/SM_DragonSkull_Leviosa_Flow_Lod2.pskx new file mode 100644 index 000000000..031f39eb0 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/SM_DragonSkull_Leviosa_Flow_Lod2.pskx differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/VFX_MI_CIN_Leviosa_Mist.mat b/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/VFX_MI_CIN_Leviosa_Mist.mat new file mode 100644 index 000000000..3e468e911 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/VFX_MI_CIN_Leviosa_Mist.mat @@ -0,0 +1,2 @@ +Normal=VFX_T_Wavy_N +Other[0]=VFX_T_WispyNoise_D diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/VFX_MI_CIN_Leviosa_Mist.props.txt b/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/VFX_MI_CIN_Leviosa_Mist.props.txt new file mode 100644 index 000000000..1954fba2f --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/VFX_MI_CIN_Leviosa_Mist.props.txt @@ -0,0 +1,60 @@ +Parent = Material3'/Game/VFX/MasterMaterials/Base_Mat/PM_Leviosa_Ribbon.PM_Leviosa_Ribbon' +ScalarParameterValues[2] = +{ + ScalarParameterValues[0] = + { + ParameterInfo = { Name=Fresnel Power } + ParameterValue = 5.08052 + ParameterName = None + } + ScalarParameterValues[1] = + { + ParameterInfo = { Name=RefractionDepthBias } + ParameterValue = 0 + ParameterName = None + } +} +TextureParameterValues[0] = {} +VectorParameterValues[0] = {} +BasePropertyOverrides = +{ + bOverride_BlendMode = false + BlendMode = BLEND_Translucent (2) + bOverride_TwoSided = false + TwoSided = true + bOverride_OpacityMaskClipValue = false + OpacityMaskClipValue = 0.3333 +} +StaticParameters = +{ + StaticSwitchParameters[1] = + { + StaticSwitchParameters[0] = + { + Value = true + ParameterInfo = { Name=Invert Fresnel (B) } + bOverride = true + } + } + StaticComponentMaskParameters[0] = {} + TerrainLayerWeightParameters[0] = {} + MaterialLayersParameters[0] = {} +} +RuntimeVirtualTextureParameterValues[0] = {} +FontParameterValues[0] = {} +FlattenedTexture = None +MobileBaseTexture = None +MobileNormalTexture = None +bUseMobileSpecular = false +MobileSpecularPower = 16 +MobileSpecularMask = MSM_Constant (0) +MobileMaskTexture = None +TextureStreamingData[1] = +{ + TextureStreamingData[0] = + { + SamplingScale = 1 + UVChannelIndex = 1 + TextureName = VFX_T_Wavy_N + } +} diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/VFX_MI_CIN_Leviosa_Mist_NoWPO.mat b/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/VFX_MI_CIN_Leviosa_Mist_NoWPO.mat new file mode 100644 index 000000000..3e468e911 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/VFX_MI_CIN_Leviosa_Mist_NoWPO.mat @@ -0,0 +1,2 @@ +Normal=VFX_T_Wavy_N +Other[0]=VFX_T_WispyNoise_D diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/VFX_MI_CIN_Leviosa_Mist_NoWPO.props.txt b/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/VFX_MI_CIN_Leviosa_Mist_NoWPO.props.txt new file mode 100644 index 000000000..65c3ecfb5 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/VFX_MI_CIN_Leviosa_Mist_NoWPO.props.txt @@ -0,0 +1,92 @@ +Parent = Material3'/Game/VFX/MasterMaterials/Base_Mat/PM_Leviosa_Ribbon.PM_Leviosa_Ribbon' +ScalarParameterValues[5] = +{ + ScalarParameterValues[0] = + { + ParameterInfo = { Name=Fresnel Power } + ParameterValue = 5.08052 + ParameterName = None + } + ScalarParameterValues[1] = + { + ParameterInfo = { Name=WorldPos_AppendA } + ParameterValue = 0 + ParameterName = None + } + ScalarParameterValues[2] = + { + ParameterInfo = { Name=WorldPos_AppendB } + ParameterValue = 0 + ParameterName = None + } + ScalarParameterValues[3] = + { + ParameterInfo = { Name=WorldPos_tiling } + ParameterValue = 0 + ParameterName = None + } + ScalarParameterValues[4] = + { + ParameterInfo = { Name=RefractionDepthBias } + ParameterValue = 0 + ParameterName = None + } +} +TextureParameterValues[0] = {} +VectorParameterValues[2] = +{ + VectorParameterValues[0] = + { + ParameterInfo = { Name=Color } + ParameterValue = { R=0.20888, G=0.184434, B=1, A=1 } + ParameterName = None + } + VectorParameterValues[1] = + { + ParameterInfo = { Name=VecParam } + ParameterValue = { R=0, G=0, B=0, A=0 } + ParameterName = None + } +} +BasePropertyOverrides = +{ + bOverride_BlendMode = false + BlendMode = BLEND_Translucent (2) + bOverride_TwoSided = false + TwoSided = true + bOverride_OpacityMaskClipValue = false + OpacityMaskClipValue = 0.3333 +} +StaticParameters = +{ + StaticSwitchParameters[1] = + { + StaticSwitchParameters[0] = + { + Value = true + ParameterInfo = { Name=Invert Fresnel (B) } + bOverride = true + } + } + StaticComponentMaskParameters[0] = {} + TerrainLayerWeightParameters[0] = {} + MaterialLayersParameters[0] = {} +} +RuntimeVirtualTextureParameterValues[0] = {} +FontParameterValues[0] = {} +FlattenedTexture = None +MobileBaseTexture = None +MobileNormalTexture = None +bUseMobileSpecular = false +MobileSpecularPower = 16 +MobileSpecularMask = MSM_Constant (0) +MobileMaskTexture = None +TextureStreamingData[1] = +{ + TextureStreamingData[0] = + { + SamplingScale = 1 + UVChannelIndex = 1 + TextureName = VFX_T_Wavy_N + } +} diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/VFX_MI_UltraFlare_Leviosa.mat b/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/VFX_MI_UltraFlare_Leviosa.mat new file mode 100644 index 000000000..b63f8bbc2 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/VFX_MI_UltraFlare_Leviosa.mat @@ -0,0 +1,6 @@ +Diffuse=VFX_T_FlareWisp_D +Other[0]=VFX_T_Gradient03_D +Other[1]=VFX_T_ThinTop_Gradiant_D +Other[2]=VFX_T_NoiseGreypack01_D +Other[3]=VFX_T_SwirlNoise_05_D +Other[4]=VFX_T_Noise_Anisotropic2_height_D diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/VFX_MI_UltraFlare_Leviosa.props.txt b/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/VFX_MI_UltraFlare_Leviosa.props.txt new file mode 100644 index 000000000..118933f2a --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/VFX_MI_UltraFlare_Leviosa.props.txt @@ -0,0 +1,112 @@ +Parent = Material3'/Game/VFX/MasterMaterials/Particles/VFX_MM_UltraFlare.VFX_MM_UltraFlare' +ScalarParameterValues[5] = +{ + ScalarParameterValues[0] = + { + ParameterInfo = { Name=FadeDistanceEdge } + ParameterValue = 9.15675 + ParameterName = None + } + ScalarParameterValues[1] = + { + ParameterInfo = { Name=FadeSensitivity (optional) (S) } + ParameterValue = 4.96159 + ParameterName = None + } + ScalarParameterValues[2] = + { + ParameterInfo = { Name=Mask Bias } + ParameterValue = 0.696948 + ParameterName = None + } + ScalarParameterValues[3] = + { + ParameterInfo = { Name=CenterFillBrightness } + ParameterValue = 4.54298 + ParameterName = None + } + ScalarParameterValues[4] = + { + ParameterInfo = { Name=RefractionDepthBias } + ParameterValue = 0 + ParameterName = None + } +} +TextureParameterValues[1] = +{ + TextureParameterValues[0] = + { + ParameterInfo = { Name=Mask Texture } + ParameterValue = Texture2D'/Game/VFX/Textures/Flares/VFX_T_FlareWisp_D.VFX_T_FlareWisp_D' + ParameterName = None + } +} +VectorParameterValues[2] = +{ + VectorParameterValues[0] = + { + ParameterInfo = { Name=FlareColorEdge } + ParameterValue = { R=0.877991, G=0.302342, B=2, A=1 } + ParameterName = None + } + VectorParameterValues[1] = + { + ParameterInfo = { Name=FlareColorCenter } + ParameterValue = { R=0.570495, G=0, B=5, A=1 } + ParameterName = None + } +} +BasePropertyOverrides = +{ + bOverride_BlendMode = false + BlendMode = BLEND_Translucent (2) + bOverride_TwoSided = false + TwoSided = true + bOverride_OpacityMaskClipValue = false + OpacityMaskClipValue = 0.3333 +} +StaticParameters = +{ + StaticSwitchParameters[3] = + { + StaticSwitchParameters[0] = + { + Value = true + ParameterInfo = { Name=Use Angle Baied Fade } + bOverride = true + } + StaticSwitchParameters[1] = + { + Value = true + ParameterInfo = { Name=EmissiveAdaptationUseDaytimeBoost } + bOverride = true + } + StaticSwitchParameters[2] = + { + Value = true + ParameterInfo = { Name=Use Mask Texture } + bOverride = true + } + } + StaticComponentMaskParameters[0] = {} + TerrainLayerWeightParameters[0] = {} + MaterialLayersParameters[0] = {} +} +RuntimeVirtualTextureParameterValues[0] = {} +FontParameterValues[0] = {} +FlattenedTexture = None +MobileBaseTexture = None +MobileNormalTexture = None +bUseMobileSpecular = false +MobileSpecularPower = 16 +MobileSpecularMask = MSM_Constant (0) +MobileMaskTexture = None +TextureStreamingData[1] = +{ + TextureStreamingData[0] = + { + SamplingScale = 1 + UVChannelIndex = 0 + TextureName = VFX_T_FlareWisp_D + } +} diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/VFX_MM_Leviosa_DIST3.mat b/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/VFX_MM_Leviosa_DIST3.mat new file mode 100644 index 000000000..df6fde9ea --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/VFX_MM_Leviosa_DIST3.mat @@ -0,0 +1,3 @@ +Diffuse=DefaultDiffuse +Normal=VFX_T_Wavy_N +Other[0]=VFX_T_Noise09_D diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/VFX_MM_Leviosa_DIST3.props.txt b/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/VFX_MM_Leviosa_DIST3.props.txt new file mode 100644 index 000000000..6cfff1fa0 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/VFX/Particles/Magic/Levioso/VFX_MM_Leviosa_DIST3.props.txt @@ -0,0 +1,154 @@ +TwoSided = false +bDisableDepthTest = false +bIsMasked = false +ReferencedTextures[3] = +{ + ReferencedTextures[0] = Texture2D'/Engine/EngineMaterials/DefaultDiffuse.DefaultDiffuse' + ReferencedTextures[1] = Texture2D'/Game/VFX/Textures/Noises/VFX_T_Noise09_D.VFX_T_Noise09_D' + ReferencedTextures[2] = Texture2D'/Game/VFX/Textures/VFX_T_Wavy_N.VFX_T_Wavy_N' +} +Expressions[0] = {} +CachedExpressionData = +{ + Parameters = + { + Entries[5] = + { + Entries[0] = + { + ParameterInfos[10] = + { + ParameterInfos[0] = { Name=Boost } + ParameterInfos[1] = { Name=AngleBasedSoftness } + ParameterInfos[2] = { Name=Contrast } + ParameterInfos[3] = { Name=Refraction Strength } + ParameterInfos[4] = { Name=Distortion Speed } + ParameterInfos[5] = { Name=Softness } + ParameterInfos[6] = { Name=Diffuse Speed } + ParameterInfos[7] = { Name=Displacement Strength } + ParameterInfos[8] = { Name=Strength } + ParameterInfos[9] = { Name=Projection Blending Hardness } + } + } + Entries[1] = + { + ParameterInfos[5] = + { + ParameterInfos[0] = { Name=Direction } + ParameterInfos[1] = { Name=Diffuse Tiling Size } + ParameterInfos[2] = { Name=Glow Color } + ParameterInfos[3] = { Name=Direction (3D) } + ParameterInfos[4] = { Name=Distortion Tiling Size } + } + } + Entries[2] = { ParameterInfos[0]={} } + Entries[3] = { ParameterInfos[0]={} } + Entries[4] = { ParameterInfos[0]={} } + } + ScalarValues[10] = + { + ScalarValues[0] = 31.9585 + ScalarValues[1] = 0.360377 + ScalarValues[2] = 1.30191 + ScalarValues[3] = 0.611316 + ScalarValues[4] = -0.5 + ScalarValues[5] = 2.30736 + ScalarValues[6] = 0.541285 + ScalarValues[7] = 9.19554 + ScalarValues[8] = 13.3428 + ScalarValues[9] = 0.270856 + } + VectorValues[5] = + { + VectorValues[0] = { R=-22.4394, G=14.9484, B=-67.7465, A=1 } + VectorValues[1] = { R=200, G=200, B=400, A=1 } + VectorValues[2] = { R=0.14596, G=0.14603, B=1, A=1 } + VectorValues[3] = { R=-23.9738, G=10.8001, B=-22.6296, A=1 } + VectorValues[4] = { R=200, G=200, B=200, A=1 } + } + TextureValues[0] = {} + } + ReferencedTextures[4] = + { + ReferencedTextures[1] = Texture2D'/Engine/EngineMaterials/DefaultDiffuse.DefaultDiffuse' + ReferencedTextures[2] = Texture2D'/Game/VFX/Textures/Noises/VFX_T_Noise09_D.VFX_T_Noise09_D' + ReferencedTextures[3] = Texture2D'/Game/VFX/Textures/VFX_T_Wavy_N.VFX_T_Wavy_N' + } +} +BlendMode = BLEND_Translucent (2) +OpacityMaskClipValue = 0.333 +CollectedTextureParameters[0] = {} +CollectedScalarParameters[10] = +{ + CollectedScalarParameters[0] = { Value=31.9585, Name=Boost, Group=None } + CollectedScalarParameters[1] = + { + Value = 0.360377 + Name = AngleBasedSoftness + Group = None + } + CollectedScalarParameters[2] = { Value=1.30191, Name=Contrast, Group=None } + CollectedScalarParameters[3] = + { + Value = 0.611316 + Name = Refraction Strength + Group = None + } + CollectedScalarParameters[4] = { Value=-0.5, Name=Distortion Speed, Group=None } + CollectedScalarParameters[5] = { Value=2.30736, Name=Softness, Group=None } + CollectedScalarParameters[6] = { Value=0.541285, Name=Diffuse Speed, Group=None } + CollectedScalarParameters[7] = + { + Value = 9.19554 + Name = Displacement Strength + Group = None + } + CollectedScalarParameters[8] = { Value=13.3428, Name=Strength, Group=None } + CollectedScalarParameters[9] = + { + Value = 0.270856 + Name = Projection Blending Hardness + Group = None + } +} +CollectedVectorParameters[5] = +{ + CollectedVectorParameters[0] = + { + Value = { R=-22.4394, G=14.9484, B=-67.7465, A=1 } + Name = Direction + Group = None + } + CollectedVectorParameters[1] = + { + Value = { R=200, G=200, B=400, A=1 } + Name = Diffuse Tiling Size + Group = None + } + CollectedVectorParameters[2] = + { + Value = { R=0.14596, G=0.14603, B=1, A=1 } + Name = Glow Color + Group = None + } + CollectedVectorParameters[3] = + { + Value = { R=-23.9738, G=10.8001, B=-22.6296, A=1 } + Name = Direction (3D) + Group = None + } + CollectedVectorParameters[4] = + { + Value = { R=200, G=200, B=200, A=1 } + Name = Distortion Tiling Size + Group = None + } +} +FlattenedTexture = None +MobileBaseTexture = None +MobileNormalTexture = None +bUseMobileSpecular = false +MobileSpecularPower = 16 +MobileSpecularMask = MSM_Constant (0) +MobileMaskTexture = None +TextureStreamingData[0] = {} diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj b/Jusin154_Team3D/Editor/Default/Editor.vcxproj index 90acba622..2f838d71f 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj @@ -166,6 +166,7 @@ + @@ -260,6 +261,7 @@ + @@ -322,6 +324,7 @@ + @@ -418,6 +421,7 @@ + diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters index 0fa1be799..194fa4c92 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters @@ -82,9 +82,6 @@ {8a5ffca8-725a-42ee-a3eb-3c79df09dec9} - - {32718f84-d863-48d2-8611-90c40f2ba1c5} - {ba468252-bba3-46e4-bf61-e726a59060ad} @@ -436,12 +433,24 @@ {99652c97-4011-4d1f-84fb-7e6aa9f6ec1a} + + {32718f84-d863-48d2-8611-90c40f2ba1c5} + {4aa98871-8d80-4757-b616-e96f4e840857} {3949bd3b-1686-43e3-822c-d3eabe41653e} + + {2f8a3c68-c3d3-43cc-9649-16e0cfd168fa} + + + {dcc220a9-4649-4f95-9205-9eee9af128ec} + + + {4aa98871-8d80-4757-b616-e96f4e840857} + @@ -520,7 +529,7 @@ 02.GameObjects\Layer_Effect\Effect\00.EffectObject - 02.GameObjects\Layer_Effect\Effect\01.TestEffect + 02.GameObjects\Layer_Effect\Effect\02.EditEffect\01.TestEffect 02.GameObjects\Layer_Effect\Effect\02.EditEffect @@ -864,6 +873,12 @@ 50.UI\Spell_Data + + 50.UI\Spell_Canvas\Spell_Panel\Current_Slot_Number + + + 50.UI\Spell_Canvas\Spell_Panel\Spell_Drag + @@ -923,7 +938,7 @@ 02.GameObjects\Layer_Effect\Effect\00.EffectObject - 02.GameObjects\Layer_Effect\Effect\01.TestEffect + 02.GameObjects\Layer_Effect\Effect\02.EditEffect\01.TestEffect 02.GameObjects\Layer_Effect\Effect\02.EditEffect @@ -1285,6 +1300,12 @@ 50.UI\Spell_Data + + 50.UI\Spell_Canvas\Spell_Panel\Current_Slot_Number + + + 50.UI\Spell_Canvas\Spell_Panel\Spell_Drag + diff --git a/Jusin154_Team3D/Editor/Private/Bombard.cpp b/Jusin154_Team3D/Editor/Private/Bombard.cpp index 55e19134d..13cb79633 100644 --- a/Jusin154_Team3D/Editor/Private/Bombard.cpp +++ b/Jusin154_Team3D/Editor/Private/Bombard.cpp @@ -61,9 +61,7 @@ void CBombard::Update(_float fTimeDelta) Update_Event(fTimeDelta); - _vector vOwnerLook = m_pOwner->Get_Component()->Get_State(STATE::LOOK); - - m_pLight_Projectile->Get_Component()->Translation(vOwnerLook * 2.f); + m_pLight_Projectile->Get_Component()->Translation(m_vCameraLook * 2.f); } void CBombard::Late_Update(_float fTimeDelta) @@ -94,13 +92,14 @@ HRESULT CBombard::Pre_Setting(CGameObject* pObject) CPartObject* pShootPt = Get_PartObject("Bombard_Shoot_Pt"); - CPartObject* pCircle0 = Get_PartObject("Bombard_Circle0"); pShootPt->Get_Component()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion()); m_pLight_Projectile->Get_Component()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion()); pCircle0->Get_Component()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion()); + m_vCameraLook = XMVector3Normalize(m_pOwner->Get_Component()->Get_State(STATE::LOOK)); + pCircle0->Set_Visible(true); pShootPt->Set_Visible(true); diff --git a/Jusin154_Team3D/Editor/Private/Current_Slot_Number.cpp b/Jusin154_Team3D/Editor/Private/Current_Slot_Number.cpp new file mode 100644 index 000000000..f7bb015e0 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/Current_Slot_Number.cpp @@ -0,0 +1,278 @@ +#include "pch.h" +#include "Current_Slot_Number.h" +#include "GameInstance.h" + +CCurrent_Slot_Number::CCurrent_Slot_Number(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CCurrent_Slot_Number::CCurrent_Slot_Number(const CCurrent_Slot_Number& rhs) + :CElementObject(rhs) +{ +} + +HRESULT CCurrent_Slot_Number::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CCurrent_Slot_Number::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 0.f; + Desc.fY = 0.f; + Desc.fSizeX = 35.f; + Desc.fSizeY = 35.f; + + m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) }; + + if (FAILED(__super::Initialize(&Desc))) + { + return E_FAIL; + } + if (FAILED(Ready_Components(pArg))) + { + return E_FAIL; + } + m_fAlpha = 1.f; + m_fTimeMult = 3.f; + m_fAlphaTime = 1.f; + m_fOffSetX = 105.f; + m_fOffSetY = 101.f; + m_iCols = 4; + UV(); + m_pVIBufferCom->Set_Cloned(true); + m_pVIBufferCom->Set_Pos(-805.f, 380.f, m_fOffSetX, m_fOffSetY, m_iCols); + m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); + m_pVIBufferCom->Set_ImageUV(pUVDesc); + return S_OK; +} + +void CCurrent_Slot_Number::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CCurrent_Slot_Number::Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + + if (m_bFadeIn == true) + { + if (m_fAlpha <= 1.f) + m_fAlpha += fTimeDelta * m_fAlphaTime; + + if (m_fAlpha >= 1.f) + { + m_bFadeIn = false; + m_fAlpha = 1.f; + } + } + + if (m_bFadeOut == true) + { + if (m_fAlpha >= 0.f) + m_fAlpha -= fTimeDelta; + + if (m_fAlpha <= 0.f) + { + m_bFadeOut = false; + m_fAlpha = 0.f; + } + } + m_fTime += fTimeDelta * m_fTimeMult; + __super::Update(fTimeDelta); +} + +void CCurrent_Slot_Number::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) + { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + } + __super::Late_Update(fTimeDelta); +} + +HRESULT CCurrent_Slot_Number::Render() +{ + if (FAILED(Bind_ShaderResources())) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ALPHABLEND)))) + { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) + { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) + { + return E_FAIL; + } + + return S_OK; +} + +_vector CCurrent_Slot_Number::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +void CCurrent_Slot_Number::SizeUpX(_float fSizeX) +{ + m_fSizeX = fSizeX; + m_pVIBufferCom->Set_SizeX(m_fSizeX); +} + +void CCurrent_Slot_Number::SizeUpY(_float fSizeY) +{ + m_fSizeY = fSizeY; + m_pVIBufferCom->Set_SizeY(m_fSizeY); +} + +void CCurrent_Slot_Number::SizeUpdate(_float fSizeX, _float fSizeY) +{ + m_fSizeX = fSizeX; + m_fSizeY = fSizeY; + m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); +} + +HRESULT CCurrent_Slot_Number::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_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 CCurrent_Slot_Number::Ready_Components(void* pArg) +{ + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Slot_Number_UI_Instance"), (CComponent**)&m_pVIBufferCom, nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_Atlas_Number"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIINSTANCE, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + + return S_OK; +} + +void CCurrent_Slot_Number::UV() +{ + pUVDesc[0].fUV = Meter_Index(1); + pUVDesc[1].fUV = Meter_Index(2); + pUVDesc[2].fUV = Meter_Index(3); + pUVDesc[3].fUV = Meter_Index(4); +} + +_float4 CCurrent_Slot_Number::Meter_Index(_uint Number) +{ + m_fIamge_Size = { 320.f, 128.f }; + + _uint iXCount = 5; + _uint iYCount = 2; + + _float frameWidth = 64.f; + _float frameHeight = 64.f; + + _uint frameX = Number % iXCount; + _uint frameY = Number / iXCount; + + _float4 UV; + UV.x = frameX * frameWidth / m_fIamge_Size.x; + UV.y = frameY * frameHeight / m_fIamge_Size.y; + UV.z = UV.x + (frameWidth / m_fIamge_Size.x); + UV.w = UV.y + (frameHeight / m_fIamge_Size.y); + + return UV; +} + +CCurrent_Slot_Number* CCurrent_Slot_Number::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CCurrent_Slot_Number* pInstance = new CCurrent_Slot_Number(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CCurrent_Slot_Number"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CCurrent_Slot_Number::Clone(void* pArg, CGameObject* pOwner) +{ + CCurrent_Slot_Number* pInstance = new CCurrent_Slot_Number(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CSlot_Number"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CCurrent_Slot_Number::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +void CCurrent_Slot_Number::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Editor/Private/Decendo.cpp b/Jusin154_Team3D/Editor/Private/Decendo.cpp index 1283712f9..947b85414 100644 --- a/Jusin154_Team3D/Editor/Private/Decendo.cpp +++ b/Jusin154_Team3D/Editor/Private/Decendo.cpp @@ -44,7 +44,7 @@ HRESULT CDecendo::Initialize(void* pArg) SAFE_ADDREF(m_pProjectile_Blur); SAFE_ADDREF(m_pProjectile); - m_fDuration = 2.5f; + m_fDuration = 4.f; return S_OK; } diff --git a/Jusin154_Team3D/Editor/Private/EditEffect.cpp b/Jusin154_Team3D/Editor/Private/EditEffect.cpp index 2854db2d5..faafc8154 100644 --- a/Jusin154_Team3D/Editor/Private/EditEffect.cpp +++ b/Jusin154_Team3D/Editor/Private/EditEffect.cpp @@ -3,6 +3,9 @@ #include "GameInstance.h" #include "Effect_Editor.h" +#include "Layer.h" +#include "Player.h" +#include "Wand.h" CEditEffect::CEditEffect(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) : CEffectObject{ pDevice, pContext } @@ -81,6 +84,13 @@ void CEditEffect::Late_Update(_float fTimeDelta) } + if (m_isWandPos == true) + { + _vector vWandPos = m_pGameInstance->Get_Layer(CURRENT_LEVEL, LAYER_PLAYER)->Get_Object()->Get_PartObject()->Get_WorldPostion(); + + m_pTransformCom->Set_State(STATE::POSITION, vWandPos); + } + if (m_EffectInfo.isBloom == true) { m_pGameInstance->Add_RenderGroup(RENDER::BLOOM, this); @@ -409,7 +419,7 @@ void CEditEffect::Describe_Entity() const char* pLerp[] = { "Linear" , "EaseInQuad", "EaseOutQuad", "EaseInCubic" , "EaseOutCubic" , "EaseInOutSin" , "EaseInBack" , "Expo" , "Circle" }; const char* pRenderNames[] = { "PRIORITY" , "SHADOW", "NONBLEND", "DECAL", "BLUR" , "NONLIGHT" ,"EFFECT", "BLEND" ,"BLOOM" , "UI", "OCCLUSION"}; const char* pEffectType[] = { "EFFECT" , "TRAIL" }; - const char* pShaderPass[] = { "DEFAULT" , "NON_NOMALMAP" , "BLUR" , "WEIGHTBLEND" , "NON_WORLD" , "NON_WORLD_BLUR", "BLEND", "BLEND_NOWORLD", "BLOOM" ,"BLOOM_NOWORLD" }; + 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"}; const char* pBloomType[] = { "NONE" , "BASIC" , "MUILTY"}; _int iCurrentItem = static_cast<_int>(m_EffectInfo.eRenderOrder); @@ -436,6 +446,8 @@ void CEditEffect::Describe_Entity() GUI::Checkbox("Visible", &m_bVisible); GUI::Checkbox("GO", &m_isGoStraight); + GUI::Checkbox("WAND POS", &m_isWandPos); + m_pTransformCom->Describe_Entity(); @@ -466,6 +478,7 @@ void CEditEffect::Describe_Entity() { GUI::Checkbox("OnlyBlur", &m_EffectInfo.isOnlyBlur); + GUI::Checkbox("BlurNoEmissive", &m_EffectInfo.isBlurNoEmissive); ImGui::PushItemWidth(80); GUI::DragFloat("BlurIntensity", &m_EffectInfo.fBlurIntensity, 0.005f, 0.f, 1.f); @@ -481,8 +494,7 @@ void CEditEffect::Describe_Entity() if (GUI::TreeNode("TEX BLUR")) { - GUI::Checkbox("DiffuseBlur", &m_EffectInfo.isDiffuseBlur); - GUI::Checkbox("MaskBlur", &m_EffectInfo.isMaskBlur); + GUI::Checkbox("TexBlur", &m_EffectInfo.isTexBlur); GUI::Checkbox("BlurDissolve", &m_EffectInfo.isBlurDissolve); GUI::Checkbox("BlurReverseDissolve", &m_EffectInfo.isBlurReverseDissolve); diff --git a/Jusin154_Team3D/Editor/Private/Eessential_Spell_Slot.cpp b/Jusin154_Team3D/Editor/Private/Eessential_Spell_Slot.cpp index 7f376933b..b8fc818c2 100644 --- a/Jusin154_Team3D/Editor/Private/Eessential_Spell_Slot.cpp +++ b/Jusin154_Team3D/Editor/Private/Eessential_Spell_Slot.cpp @@ -46,6 +46,8 @@ HRESULT CEessential_Spell_Slot::Initialize(void* pArg) m_pVIBufferCom->Set_Cloned(true); m_pVIBufferCom->Set_Pos(-731.f, -300.f, m_fOffSetX, m_fOffSetY, m_iCols); m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); + m_fDelayTime = 0.5f; + m_iPerSpell_Slot = -1; return S_OK; } @@ -89,7 +91,7 @@ void CEessential_Spell_Slot::Update(_float fTimeDelta) } } - Hover(); + Hover(fTimeDelta); m_fTime += fTimeDelta * m_fTimeMult; __super::Update(fTimeDelta); @@ -154,7 +156,7 @@ void CEessential_Spell_Slot::SizeUpdate(_float fSizeX, _float fSizeY) m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); } -void CEessential_Spell_Slot::Hover() +void CEessential_Spell_Slot::Hover(_float fTimeDelta) { POINT ptMouse{}; GetCursorPos(&ptMouse); @@ -167,25 +169,23 @@ void CEessential_Spell_Slot::Hover() fMouse.x -= m_pOwner->Get_WorldPostion().m128_f32[0]; fMouse.y -= m_pOwner->Get_WorldPostion().m128_f32[1]; - m_bPrevHover = m_bHover; - m_bHover = (m_iSpellType = m_pVIBufferCom->Set_Mouse_Hover(fMouse)); - if (m_iSpellType != -1) + + m_iSpellType = m_pVIBufferCom->Set_Mouse_Hover(fMouse); + CUIObject::HOVER_INFO Info; + Info.iSlotID = 1; + if (m_iSpellType == -1) { - m_bHover = true; - if (m_bHover == true && m_bPrevHover == false) - { - m_iSpellType += ENUM_CLASS(SKILL_TYPE::JAP); - static_cast(m_pOwner)->Set_SkillType(m_iSpellType); - } + Info.iHover_Index = -1; + static_cast(m_pOwner)->Function_Callback(TEXT("Hover"), &Info); + } + else { - m_bHover = false; - if (m_bHover == false && m_bPrevHover == true) - { - static_cast(m_pOwner)->Set_SkillType(m_iSpellType); - } - } + Info.iHover_Index = m_iSpellType + ENUM_CLASS(SKILL_TYPE::JAP); + static_cast(m_pOwner)->Function_Callback(TEXT("Hover"), &Info); + + } } diff --git a/Jusin154_Team3D/Editor/Private/EffectObject.cpp b/Jusin154_Team3D/Editor/Private/EffectObject.cpp index 0b2a5f811..f1c5074f1 100644 --- a/Jusin154_Team3D/Editor/Private/EffectObject.cpp +++ b/Jusin154_Team3D/Editor/Private/EffectObject.cpp @@ -77,11 +77,27 @@ HRESULT CEffectObject::Render_Blur() if (m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::NON_WORLD || m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::BLEND_NOWORLD) { - BlurPass = SHADER_PASS_INSTANCE_MODEL::NON_WORLD_BLUR; + if (m_EffectInfo.isBlurNoEmissive == false) + { + BlurPass = SHADER_PASS_INSTANCE_MODEL::NON_WORLD_BLUR; + } + else + { + BlurPass = SHADER_PASS_INSTANCE_MODEL::BLUR_NO_WORLD_NO_EMISSIVE; + } } else { - BlurPass = SHADER_PASS_INSTANCE_MODEL::BLUR; + if (m_EffectInfo.isBlurNoEmissive == false) + { + BlurPass = SHADER_PASS_INSTANCE_MODEL::BLUR; + } + else + { + BlurPass = SHADER_PASS_INSTANCE_MODEL::BLUR_NO_EMMISVE; + } + + } for (_uint i = 0; i < m_pInstance_ModelCom->Get_NumMeshes(); i++) @@ -775,11 +791,11 @@ HRESULT CEffectObject::Bind_ShaderResources() } - if (FAILED(m_pShaderCom->Bind_RawValue("g_isDiffuseBlur", &m_EffectInfo.isDiffuseBlur, sizeof(_bool)))) { + if (FAILED(m_pShaderCom->Bind_RawValue("g_isBlurNoEmissive", &m_EffectInfo.isBlurNoEmissive, sizeof(_bool)))) { return E_FAIL; } - if (FAILED(m_pShaderCom->Bind_RawValue("g_isMaskBlur", &m_EffectInfo.isMaskBlur, sizeof(_bool)))) { + if (FAILED(m_pShaderCom->Bind_RawValue("g_isTexBlur", &m_EffectInfo.isTexBlur, sizeof(_bool)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp b/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp index b0e42dc62..44b56727a 100644 --- a/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp +++ b/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp @@ -6,7 +6,8 @@ #include "TrailObject.h" #include "EffectPool.h" #include "Layer.h" - +#include "Player.h" +#include "Wand.h" #include @@ -25,7 +26,7 @@ CEffect_Editor::CEffect_Editor(const CEffect_Editor& rhs) HRESULT CEffect_Editor::Initialize_Prototype() { - ReadMaterials("../Bin/Resources/VFX/Particles/Magic/Glacius"); + ReadMaterials("../Bin/Resources/VFX/Particles/Magic/Levioso"); for (auto iter : m_MatFiles) @@ -89,8 +90,25 @@ void CEffect_Editor::Update(_float fTimeDelta) //Update_Event(fTimeDelta); /* 트레일 업데이트 */ - if (m_pTrailObject != nullptr) - m_pTrailObject->Trail_Update(m_pTransformCom->Get_XMWorldMatrix(), fTimeDelta); + + if (m_isWandPos == true) + { + if (m_pTrailObject != nullptr) + { + _matrix vWandPos = m_pGameInstance->Get_Layer(CURRENT_LEVEL, LAYER_PLAYER)->Get_Object()->Get_PartObject()->Get_WorldMatrix(); + + m_pTrailObject->Trail_Update(vWandPos, fTimeDelta); + } + + + } + else + { + if (m_pTrailObject != nullptr) + m_pTrailObject->Trail_Update(m_pTransformCom->Get_XMWorldMatrix(), fTimeDelta); + } + + } @@ -542,6 +560,7 @@ void CEffect_Editor::Describe_Entity() if (m_pTrailObject != nullptr) { m_pTrailObject->Describe_Entity(); + GUI::Checkbox("WAND POS", &m_isWandPos); } ImGui::End(); diff --git a/Jusin154_Team3D/Editor/Private/Level_UI.cpp b/Jusin154_Team3D/Editor/Private/Level_UI.cpp index 89438401e..6eda2432e 100644 --- a/Jusin154_Team3D/Editor/Private/Level_UI.cpp +++ b/Jusin154_Team3D/Editor/Private/Level_UI.cpp @@ -1,4 +1,4 @@ -#include "pch.h" +#include "pch.h" #include "Level_UI.h" #include "GameInstance.h" #include "Level_Loading.h" @@ -6,6 +6,7 @@ #include "IMGUIUI.h" #include "GamePlay_Canvas.h" #include "Mouse_Cursor.h" +#include "Spell_Data.h" CLevel_UI::CLevel_UI(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID) : CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) } @@ -33,7 +34,7 @@ void CLevel_UI::Update(_float fTimeDelta) HRESULT CLevel_UI::Render() { - SetWindowText(g_hWnd, TEXT("UI·¹º§ÀԴϴÙ.")); + SetWindowText(g_hWnd, TEXT("UI레벨입니다.")); GUI::ShowDemoWindow(); return S_OK; } diff --git a/Jusin154_Team3D/Editor/Private/Levioso.cpp b/Jusin154_Team3D/Editor/Private/Levioso.cpp index 2ef230564..1292eb591 100644 --- a/Jusin154_Team3D/Editor/Private/Levioso.cpp +++ b/Jusin154_Team3D/Editor/Private/Levioso.cpp @@ -52,7 +52,7 @@ HRESULT CLevioso::Initialize(void* pArg) m_fTurnSpeed = 10.f; m_fRange = 1.f; - m_fDuration = 1.5f; + m_fDuration = 2.f; return S_OK; } @@ -86,7 +86,7 @@ void CLevioso::Update(_float fTimeDelta) if (nullptr != m_pPhysHitBox) { - m_pPhysHitBox->Get_Component()->AccumulateMomentum(m_vOwnerLook * 0.25f); + m_pPhysHitBox->Get_Component()->AccumulateMomentum(m_vOwnerLook * 1.f); } @@ -132,7 +132,8 @@ HRESULT CLevioso::Pre_Setting(CGameObject* pObject) m_fAccRotateTime = 0.f; - + if (FAILED(Ready_Child())) + return E_FAIL; CPlayer* pPlayer = static_cast(m_pOwner); @@ -230,6 +231,20 @@ void CLevioso::OnCollision(CGameObject* pOther, void* pDesc) ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc); + for (auto& pPair : m_PartObjects) + { + pPair.second->Set_Visible(true); + pPair.second->Get_Component()->Set_State(STATE::POSITION, CollisionDesc->vWorldPos); + } + + __super::m_fAccTime = 0.f; + m_fDuration = 3.f; //적중하면 지속시간 3초 + + //CEditEffect* pLevioso_Hit = Get_PartObject("Levioso_Hit"); + //CEditEffect* pLevioso_Bottom_Wind = Get_PartObject("Levioso_Bottom_Wind"); + //CEditEffect* pLevioso_Rotate0 = Get_PartObject("Levioso_Rotate0"); + //CEditEffect* pLevioso_Rotate1 = Get_PartObject("Levioso_Rotate1"); + //CEditEffect* pLevioso_Tornado = Get_PartObject("Levioso_Tornado"); m_pLeviosoPJ_0->Set_Visible(false); m_pLeviosoPJ_1->Set_Visible(false); diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp index 703ccb9ef..0e5d5aac8 100644 --- a/Jusin154_Team3D/Editor/Private/Loader.cpp +++ b/Jusin154_Team3D/Editor/Private/Loader.cpp @@ -36,6 +36,8 @@ #pragma region UI +#include "Spell_Data.h" + #include "GamePlay_Canvas.h" #include "Mission_Panel.h" @@ -78,6 +80,7 @@ #include "Spell_Header_Line.h" #include "Spell_Vidio_Border.h" #include "Spell_Anim.h" +#include "Current_Slot_Number.h" #include "IMGUIUI.h" @@ -813,6 +816,11 @@ HRESULT CLoader::Loading_For_UI() m_strMessage = TEXT("Prototype Loading.."); + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpell_Data::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CGamePlay_Canvas::Create(m_pDevice, m_pContext)))) { return E_FAIL; @@ -968,6 +976,10 @@ HRESULT CLoader::Loading_For_UI() { return E_FAIL; } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CCurrent_Slot_Number::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CIMGUIUI::Create(m_pDevice, m_pContext)))) { @@ -1068,6 +1080,22 @@ HRESULT CLoader::Loading_For_Effect() }); + Asset_FileLoad("../Bin/Resources/Textures/Effect/Trails", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath) { + + _string strFilePath = pFilePath; + _wstring wstrFilePath = CMyTools::ToWstring(strFilePath); + + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::EFFECT), 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/Effect/Flipbooks", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath) { _string strFilePath = pFilePath; @@ -1143,6 +1171,9 @@ HRESULT CLoader::Loading_For_Effect() CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Effect/DummyPlane/DummyPlane.fbx", XMMatrixIdentity())))) return E_FAIL; + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Wand_Model"), + CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Wand/Wand.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationX(XMConvertToRadians(-90.f)) * XMMatrixIdentity())))) + return E_FAIL; vector*>> futures = {}; @@ -1161,7 +1192,9 @@ HRESULT CLoader::Loading_For_Effect() TEXT("Prototype_Component_Wand_Model") )); + for (auto& job : futures) { + pair<_wstring, CModel*>* pResult = job.get(); if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, pResult->first, pResult->second))) { assert(false); diff --git a/Jusin154_Team3D/Editor/Private/NomalJap.cpp b/Jusin154_Team3D/Editor/Private/NomalJap.cpp index e048357af..e3ce4c834 100644 --- a/Jusin154_Team3D/Editor/Private/NomalJap.cpp +++ b/Jusin154_Team3D/Editor/Private/NomalJap.cpp @@ -231,6 +231,8 @@ void CNomalJap::OnCollision(CGameObject* pOther , void* pDesc) Get_PartObject()->Set_Visible(false); Get_PartObject()->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f, 0.f, 0.f, 1.f)); + Get_PartObject("Circle_Particle_Red")->Set_Visible(false); + if (m_pPhysHitBox != nullptr) { diff --git a/Jusin154_Team3D/Editor/Private/Player.cpp b/Jusin154_Team3D/Editor/Private/Player.cpp index bcfdcb884..b34b51839 100644 --- a/Jusin154_Team3D/Editor/Private/Player.cpp +++ b/Jusin154_Team3D/Editor/Private/Player.cpp @@ -236,22 +236,12 @@ HRESULT CPlayer::Ready_Parts() _matrix CPlayer::Get_WandPos() { - CModel* pWand = Get_PartObject()->Get_Component(); + CWand* pWand = Get_PartObject(); if (pWand == nullptr) return _matrix(); - _matrix BoneMatrix = XMLoadFloat4x4(pWand->Get_BoneMatrixPtr("root")); - - BoneMatrix = BoneMatrix * Get_PartObject()->Get_Component()->Get_XMWorldMatrix(); - - _float3 vOffset = _float3(0.f, -0.27f, -0.32f); - - BoneMatrix.r[3] += XMVector3Normalize(BoneMatrix.r[0]) * vOffset.x; - BoneMatrix.r[3] += XMVector3Normalize(BoneMatrix.r[1]) * vOffset.y; - BoneMatrix.r[3] += XMVector3Normalize(BoneMatrix.r[2]) * vOffset.z; - - return BoneMatrix; + return pWand->Get_WorldMatrix(); } HRESULT CPlayer::Bind_ShaderResources() diff --git a/Jusin154_Team3D/Editor/Private/Spell_Anim.cpp b/Jusin154_Team3D/Editor/Private/Spell_Anim.cpp index 8ffec41f8..333921bdf 100644 --- a/Jusin154_Team3D/Editor/Private/Spell_Anim.cpp +++ b/Jusin154_Team3D/Editor/Private/Spell_Anim.cpp @@ -21,8 +21,8 @@ HRESULT CSpell_Anim::Initialize(void* pArg) { CUIObject::UIOBJECT_DESC Desc{}; - Desc.fX = 0.f; - Desc.fY = 0.f; + Desc.fX = 590.f; + Desc.fY = -100.f; Desc.fSizeX = 470.f; Desc.fSizeY = 250.f; @@ -38,23 +38,34 @@ HRESULT CSpell_Anim::Initialize(void* pArg) } m_fTimeMult = 3.f; - m_fAlpha = 1.f; - m_fAlphaTime = 3.f; + m_fAlpha = 0.f; + m_fAlphaTime = 9.f; m_fSortZ = 0.01f; - m_iTotalFrames = 216; + m_iTotalFrames = 120; m_fFrameTime = 0.1f; m_iCurrentFrame = 0; m_bAnim_Start = false; + static_cast(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); }); + static_cast(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); }); + static_cast(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); }); return S_OK; } void CSpell_Anim::Priority_Update(_float fTimeDelta) { + if (!__super::Chack_Visible()) + { + return; + } __super::Priority_Update(fTimeDelta); } void CSpell_Anim::Update(_float fTimeDelta) { + if (!__super::Chack_Visible()) + { + return; + } if (m_bFadeIn == true) { if (m_fAlpha <= 1.f) @@ -69,26 +80,20 @@ void CSpell_Anim::Update(_float fTimeDelta) if (m_bFadeOut == true) { - if (m_fAlpha >= 0.f) - m_fAlpha -= fTimeDelta; - - if (m_fAlpha <= 0.f) - { - m_bFadeOut = false; - m_fAlpha = 0.f; - } + m_bFadeOut = false; + m_fAlpha = 0.f; + m_bAnim_Start = false; } - if (m_pGameInstance->Key_Down(DIK_9)) - { - m_bAnim_Start = !m_bAnim_Start; - } - if (m_bAnim_Start) + + if (m_bAnim_Start == true) { m_fTime += fTimeDelta * m_fTimeMult; } else + { m_iCurrentFrame = 0; + } if (m_fTime >= m_fFrameTime) { @@ -104,14 +109,20 @@ void CSpell_Anim::Update(_float fTimeDelta) void CSpell_Anim::Late_Update(_float fTimeDelta) { + if (!__super::Chack_Visible()) + { + return; + } if (m_bVisible) { - m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + if (m_pDiffuse_TextureCom != nullptr) + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); } __super::Late_Update(fTimeDelta); } HRESULT CSpell_Anim::Render() { + if (FAILED(Bind_ShaderResources())) { return E_FAIL; @@ -137,12 +148,37 @@ _vector CSpell_Anim::Get_WorldPostion() return m_pTransformCom->Get_State(STATE::POSITION); } -void CSpell_Anim::Anim_Start(_uint iSpell_Id) +void CSpell_Anim::Set_FadeIn() { + if (!m_bFadeIn && m_fAlpha < 1.f) + { + m_bFadeIn = true; + m_bFadeOut = false; + } + m_bAnim_Start = true; } -void CSpell_Anim::Anim_End() +void CSpell_Anim::Change_Image(_int SpellID) { + _wstring pImageName = static_cast(m_pOwner)->Get_Info(SpellID).pImage_Name; + m_iTotalFrames = static_cast(m_pOwner)->Get_Info(SpellID).iAnimNum; + 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; +} + +void CSpell_Anim::Set_SkillType(_int eType) +{ + if (eType != -1 && eType != m_iPerSpell) + { + m_iPerSpell = eType; + m_iCurrentFrame = 0; + Change_Image(eType); + } } HRESULT CSpell_Anim::Bind_ShaderResources() @@ -188,7 +224,7 @@ HRESULT CSpell_Anim::Ready_Components(void* pArg) { return E_FAIL; } - if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Crucio"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Arresto_Momentum"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) { return E_FAIL; } @@ -196,7 +232,6 @@ HRESULT CSpell_Anim::Ready_Components(void* pArg) { return E_FAIL; } - return S_OK; } diff --git a/Jusin154_Team3D/Editor/Private/Spell_Data.cpp b/Jusin154_Team3D/Editor/Private/Spell_Data.cpp index decc62317..2d61fc8c4 100644 --- a/Jusin154_Team3D/Editor/Private/Spell_Data.cpp +++ b/Jusin154_Team3D/Editor/Private/Spell_Data.cpp @@ -1,6 +1,10 @@ #include "pch.h" #include "Spell_Data.h" #include "GameObject.h" +#include "UIObject.h" +#include "tinyxml2.h" + +; CSpell_Data::CSpell_Data(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) :CGameObject(pDevice, pContext) @@ -14,14 +18,62 @@ CSpell_Data::CSpell_Data(const CSpell_Data& rhs) HRESULT CSpell_Data::Initialize_Prototype() { + return S_OK; } HRESULT CSpell_Data::Initialize(void* pArg) { + auto* pInfo = static_cast(pArg); + + tinyxml2::XMLDocument doc; + tinyxml2::XMLError Error = doc.LoadFile("../Bin/Resources/Data/UI/Spell/SpellInfo.xml"); + if (Error != tinyxml2::XML_SUCCESS) + return E_FAIL; + + tinyxml2::XMLElement* pSpellInfo = doc.FirstChildElement("SpellInfo"); + if (!pSpellInfo) + return E_FAIL; + + tinyxml2::XMLElement* pSpell = pSpellInfo->FirstChildElement("Spell"); + while (pSpell) + { + int id = 0; + pSpell->QueryIntAttribute("Spell_ID", &id); + + if (id < 0 || id > 34) + { + pSpell = pSpell->NextSiblingElement("Spell"); + continue; + } + + pInfo[id].iSpell_ID = id; + pInfo[id].pSpell_Name = CMyTools::ToWstring(pSpell->Attribute("Spell_Name")); + pInfo[id].pImage_Name = CMyTools::ToWstring(pSpell->Attribute("Image_Name")); + pSpell->QueryIntAttribute("Spell_Type", &pInfo[id].iSpell_Type); + pSpell->QueryIntAttribute("Skill_Type", &pInfo[id].iSkill_Type); + pSpell->QueryFloatAttribute("Spell_Cooltime", &pInfo[id].fSpell_CoolTime); + pSpell->QueryFloatAttribute("Duration", &pInfo[id].fDuration); + pSpell->QueryIntAttribute("AnimNum", &pInfo[id].iAnimNum); + pInfo[id].pSpellInfo = CMyTools::ToWstring(pSpell->Attribute("SpellInfo")); + int lock = 0, equip = 0; + pSpell->QueryIntAttribute("Spell_Lock", &lock); + pSpell->QueryIntAttribute("Equip_Spell", &equip); + pInfo[id].bSpell_Lock = lock != 0; + pInfo[id].bEquip_Spell = equip != 0; + + pSpell = pSpell->NextSiblingElement("Spell"); + } + + //pInfo = SpellInfo; return S_OK; } +//const CUIObject::SPELLINFO& CSpell_Data::Get_Info(_uint SpellID) const +//{ +// return SpellInfo[SpellID]; +//} + void CSpell_Data::Priority_Update(_float fTimeDelta) { } diff --git a/Jusin154_Team3D/Editor/Private/Spell_Drag.cpp b/Jusin154_Team3D/Editor/Private/Spell_Drag.cpp new file mode 100644 index 000000000..a1e01be9e --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/Spell_Drag.cpp @@ -0,0 +1,303 @@ +#include "pch.h" +#include "Spell_Drag.h" +#include "GameInstance.h" + +CSpell_Drag::CSpell_Drag(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CSpell_Drag::CSpell_Drag(const CSpell_Drag& rhs) + :CElementObject(rhs) +{ +} + +HRESULT CSpell_Drag::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CSpell_Drag::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 380.f; + Desc.fY = 30.f; + Desc.fSizeX = 105.f; + Desc.fSizeY = 105.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 = 1.f; + m_iSkillType = ENUM_CLASS(SKILL_TYPE::ARRESTO_MOMENTUM); + Compute_UI(m_iSkillType); + static_cast(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SpellType(*reinterpret_cast<_int*>(p)); }); + return S_OK; +} + +void CSpell_Drag::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CSpell_Drag::Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + + if (m_bFadeIn == true) + { + if (m_fAlpha <= 1.f) + m_fAlpha += fTimeDelta * m_fAlphaTime; + + if (m_fAlpha >= 1.f) + { + m_bFadeIn = false; + m_fAlpha = 1.f; + } + } + + if (m_bFadeOut == true) + { + if (m_fAlpha >= 0.f) + m_fAlpha -= fTimeDelta; + + if (m_fAlpha <= 0.f) + { + m_bFadeOut = false; + m_fAlpha = 0.f; + } + } + + m_fTime += fTimeDelta * m_fTimeMult; + __super::Update(fTimeDelta); + +} + +void CSpell_Drag::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + } + __super::Late_Update(fTimeDelta); +} + +HRESULT CSpell_Drag::Render() +{ + if (FAILED(Bind_ShaderResources())) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::SPELL_DRAG)))) + { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) + { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) + { + return E_FAIL; + } + + return S_OK; +} + +_vector CSpell_Drag::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CSpell_Drag::Bind_ShaderResources() +{ + if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom1->Bind_ShaderResource(m_pShaderCom, "g_Texture1", 0))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom2->Bind_ShaderResource(m_pShaderCom, "g_Texture2", 0))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom3->Bind_ShaderResource(m_pShaderCom, "g_Texture3", 0))) + { + return E_FAIL; + } + if (FAILED(m_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_fAngle", &m_fAngle, 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_fImageUV", &m_vUV, sizeof(_float4)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_vScale, sizeof(_float4)))) + { + return E_FAIL; + } + return S_OK; +} + +HRESULT CSpell_Drag::Ready_Components(void* pArg) +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_SpellType_Generic"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_SelectedPresetBorder"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_GoldLeaf"), reinterpret_cast(&m_pDiffuse_TextureCom2), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_Atlas_Spell"), reinterpret_cast(&m_pDiffuse_TextureCom3), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + + return S_OK; +} + +void CSpell_Drag::Compute_UI(_uint SpellID) +{ + _float2 fImage_Size = { 1024.f, 1536.f }; + + _uint iCountX = 4; + _uint iCountY = 6; + + _float iImageX = 256.f; + _float iImageY = 256.f; + + _uint iframeX = SpellID % iCountX; + _uint iframeY = SpellID / iCountX; + + _float2 UVStart; + UVStart.x = iframeX * iImageX / fImage_Size.x; + UVStart.y = iframeY * iImageY / fImage_Size.y; + + _float2 UVEnd; + UVEnd.x = UVStart.x + (iImageX / fImage_Size.x); + UVEnd.y = UVStart.y + (iImageY / fImage_Size.y); + + _float4 UV = _float4{ UVStart.x, UVStart.y, UVEnd.x, UVEnd.y }; + m_vUV = UV; +} + +void CSpell_Drag::Set_SpellType(_int SpellID) +{ + m_iSkillType = SpellID; + if (m_iSkillType != -1) + { + m_iSkillType = static_cast(m_pOwner)->Get_Info(SpellID).iSkill_Type; + Compute_UI(m_iSkillType); + } +} + +CSpell_Drag* CSpell_Drag::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CSpell_Drag* pInstance = new CSpell_Drag(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CSpell_Drag"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CSpell_Drag::Clone(void* pArg, CGameObject* pOwner) +{ + CSpell_Drag* pInstance = new CSpell_Drag(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CSpell_Drag"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CSpell_Drag::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pDiffuse_TextureCom1); + SAFE_RELEASE(m_pDiffuse_TextureCom2); + SAFE_RELEASE(m_pDiffuse_TextureCom3); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +void CSpell_Drag::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Editor/Private/Spell_Header.cpp b/Jusin154_Team3D/Editor/Private/Spell_Header.cpp index 284be9ad9..190672a47 100644 --- a/Jusin154_Team3D/Editor/Private/Spell_Header.cpp +++ b/Jusin154_Team3D/Editor/Private/Spell_Header.cpp @@ -21,8 +21,8 @@ HRESULT CSpell_Header::Initialize(void* pArg) { CUIObject::UIOBJECT_DESC Desc{}; - Desc.fX = 0.f; - Desc.fY = -20.f; + Desc.fX = 600.f; + Desc.fY = -385.f; Desc.fSizeX = 512.f; Desc.fSizeY = 64.f; @@ -38,21 +38,32 @@ HRESULT CSpell_Header::Initialize(void* pArg) } m_fTimeMult = 3.f; - m_fAlpha = 1.f; - m_fAlphaTime = 3.f; + m_fAlpha = 0.f; + m_fAlphaTime = 5.f; m_fMoveSpeed = 5.f; m_fLerpX = m_fX; m_fLerpY = 45; + static_cast(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); }); + static_cast(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); }); + static_cast(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); }); return S_OK; } void CSpell_Header::Priority_Update(_float fTimeDelta) { + if (!__super::Chack_Visible()) + { + return; + } __super::Priority_Update(fTimeDelta); } void CSpell_Header::Update(_float fTimeDelta) { + if (!__super::Chack_Visible()) + { + return; + } if (m_bFadeIn == true) { if (m_fAlpha <= 1.f) @@ -70,7 +81,7 @@ void CSpell_Header::Update(_float fTimeDelta) if (m_bFadeOut == true) { if (m_fAlpha >= 0.f) - m_fAlpha -= fTimeDelta; + m_fAlpha -= fTimeDelta * m_fAlphaTime;; if (m_fAlpha <= 0.f) { @@ -79,13 +90,23 @@ void CSpell_Header::Update(_float fTimeDelta) } } + if (m_iSpellType != -1) + { + m_iSkillType = static_cast(m_pOwner)->Get_Info(m_iSpellType).iSpell_Type; + } + m_fTime += fTimeDelta * m_fTimeMult; __super::Update(fTimeDelta); } void CSpell_Header::Late_Update(_float fTimeDelta) { + if (!__super::Chack_Visible()) + { + return; + } if (m_bVisible) { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); __super::Late_Update(fTimeDelta); } } @@ -113,11 +134,6 @@ _vector CSpell_Header::Get_WorldPostion() return m_pTransformCom->Get_State(STATE::POSITION); } -void CSpell_Header::MoveY(_float fY) -{ - m_fY += fY; -} - HRESULT CSpell_Header::Bind_ShaderResources() { if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) @@ -156,7 +172,7 @@ HRESULT CSpell_Header::Bind_ShaderResources() { return E_FAIL; } - if (FAILED(m_pShaderCom->Bind_RawValue("g_iSpellType", &m_iSpellType, sizeof(_int)))) + if (FAILED(m_pShaderCom->Bind_RawValue("g_iSpellType", &m_iSkillType, sizeof(_int)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Editor/Private/Spell_Header_Line.cpp b/Jusin154_Team3D/Editor/Private/Spell_Header_Line.cpp index dbd3bdaf5..6810ed202 100644 --- a/Jusin154_Team3D/Editor/Private/Spell_Header_Line.cpp +++ b/Jusin154_Team3D/Editor/Private/Spell_Header_Line.cpp @@ -21,8 +21,8 @@ HRESULT CSpell_Header_Line::Initialize(void* pArg) { CUIObject::UIOBJECT_DESC Desc{}; - Desc.fX = 0.f; - Desc.fY = 20.f; + Desc.fX = 600.f; + Desc.fY = -345.f; Desc.fSizeX = 487.f; Desc.fSizeY = 18.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) }; @@ -37,19 +37,28 @@ HRESULT CSpell_Header_Line::Initialize(void* pArg) } m_fTimeMult = 3.f; - m_fAlpha = 1.f; - m_fAlphaTime = 3.f; - m_fMoveSpeed = 5.f; + m_fAlpha = 0.f; + m_fAlphaTime = 5.f; + static_cast(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); }); + static_cast(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); }); return S_OK; } void CSpell_Header_Line::Priority_Update(_float fTimeDelta) { + if (!__super::Chack_Visible()) + { + return; + } __super::Priority_Update(fTimeDelta); } void CSpell_Header_Line::Update(_float fTimeDelta) { + if (!__super::Chack_Visible()) + { + return; + } if (m_bFadeIn == true) { if (m_fAlpha <= 1.f) @@ -67,7 +76,7 @@ void CSpell_Header_Line::Update(_float fTimeDelta) if (m_bFadeOut == true) { if (m_fAlpha >= 0.f) - m_fAlpha -= fTimeDelta; + m_fAlpha -= fTimeDelta * m_fAlphaTime;; if (m_fAlpha <= 0.f) { @@ -75,14 +84,19 @@ void CSpell_Header_Line::Update(_float fTimeDelta) m_fAlpha = 0.f; } } - + m_fTime += fTimeDelta * m_fTimeMult; __super::Update(fTimeDelta); } void CSpell_Header_Line::Late_Update(_float fTimeDelta) { + if (!__super::Chack_Visible()) + { + return; + } if (m_bVisible) { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); __super::Late_Update(fTimeDelta); } } @@ -110,11 +124,6 @@ _vector CSpell_Header_Line::Get_WorldPostion() return m_pTransformCom->Get_State(STATE::POSITION); } -void CSpell_Header_Line::MoveY(_float fY) -{ - m_fY += fY; -} - HRESULT CSpell_Header_Line::Bind_ShaderResources() { if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) diff --git a/Jusin154_Team3D/Editor/Private/Spell_Hover.cpp b/Jusin154_Team3D/Editor/Private/Spell_Hover.cpp index 86a4e1685..9604d77e7 100644 --- a/Jusin154_Team3D/Editor/Private/Spell_Hover.cpp +++ b/Jusin154_Team3D/Editor/Private/Spell_Hover.cpp @@ -46,6 +46,7 @@ HRESULT CSpell_Hover::Initialize(void* pArg) m_pVIBufferCom->Set_Cloned(true); m_pVIBufferCom->Set_Pos(-185.f, 375.f, m_fOffSetX, m_fOffSetY, m_iCols); m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); + static_cast(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); }); return S_OK; } @@ -88,7 +89,9 @@ void CSpell_Hover::Update(_float fTimeDelta) m_fAlpha = 0.f; } } - Hover(); + + m_pVIBufferCom->Set_Hover_Index(m_iSpellType); + m_fTime += fTimeDelta * m_fTimeMult; __super::Update(fTimeDelta); } @@ -152,22 +155,6 @@ void CSpell_Hover::SizeUpdate(_float fSizeX, _float fSizeY) m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); } -void CSpell_Hover::Hover() -{ - 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 -= m_pOwner->Get_WorldPostion().m128_f32[0]; - fMouse.y -= m_pOwner->Get_WorldPostion().m128_f32[1]; - - m_pVIBufferCom->Set_Mouse_Hover(fMouse); - -} - HRESULT CSpell_Hover::Bind_ShaderResources() { if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) diff --git a/Jusin154_Team3D/Editor/Private/Spell_Hover_Effect.cpp b/Jusin154_Team3D/Editor/Private/Spell_Hover_Effect.cpp index f336f09d1..d323d9f12 100644 --- a/Jusin154_Team3D/Editor/Private/Spell_Hover_Effect.cpp +++ b/Jusin154_Team3D/Editor/Private/Spell_Hover_Effect.cpp @@ -23,8 +23,8 @@ HRESULT CSpell_Hover_Effect::Initialize(void* pArg) Desc.fX = 0.f; Desc.fY = 0.f; - Desc.fSizeX = 105.f; - Desc.fSizeY = 105.f; + Desc.fSizeX = 115.f; + Desc.fSizeY = 115.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) }; @@ -47,6 +47,7 @@ HRESULT CSpell_Hover_Effect::Initialize(void* pArg) m_pVIBufferCom->Set_Cloned(true); m_pVIBufferCom->Set_Pos(-185.f, 375.f, m_fOffSetX, m_fOffSetY, m_iCols); m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); + static_cast(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); }); return S_OK; } @@ -89,7 +90,7 @@ void CSpell_Hover_Effect::Update(_float fTimeDelta) m_fAlpha = 0.f; } } - Hover(); + m_pVIBufferCom->Set_Hover_Index(m_iSpellType); m_fTime += fTimeDelta * m_fTimeMult; __super::Update(fTimeDelta); } @@ -153,22 +154,6 @@ void CSpell_Hover_Effect::SizeUpdate(_float fSizeX, _float fSizeY) m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); } -void CSpell_Hover_Effect::Hover() -{ - 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 -= m_pOwner->Get_WorldPostion().m128_f32[0]; - fMouse.y -= m_pOwner->Get_WorldPostion().m128_f32[1]; - - m_pVIBufferCom->Set_Mouse_Hover(fMouse); - -} - HRESULT CSpell_Hover_Effect::Bind_ShaderResources() { if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) diff --git a/Jusin154_Team3D/Editor/Private/Spell_List.cpp b/Jusin154_Team3D/Editor/Private/Spell_List.cpp index 57eaeca74..2285e0425 100644 --- a/Jusin154_Team3D/Editor/Private/Spell_List.cpp +++ b/Jusin154_Team3D/Editor/Private/Spell_List.cpp @@ -46,6 +46,8 @@ HRESULT CSpell_List::Initialize(void* pArg) m_pVIBufferCom->Set_Cloned(true); m_pVIBufferCom->Set_Pos(-185.f, 375.f, m_fOffSetX, m_fOffSetY, m_iCols); m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); + m_fDelayTime = 0.5f; + m_iPerSpell_Slot = -1; Color(); return S_OK; } @@ -90,7 +92,7 @@ void CSpell_List::Update(_float fTimeDelta) } } m_fTime += fTimeDelta * m_fTimeMult; - Hover(); + Hover(fTimeDelta); __super::Update(fTimeDelta); } @@ -165,7 +167,7 @@ void CSpell_List::Color() m_pVIBufferCom->Set_Index_Renge_Color(23, 25, _float4(24.f / 255.f, 190.f / 255.f, 255.f / 255.f, 1.f)); } -void CSpell_List::Hover() +void CSpell_List::Hover(_float fTimeDelta) { POINT ptMouse{}; GetCursorPos(&ptMouse); @@ -178,23 +180,20 @@ void CSpell_List::Hover() fMouse.x -= m_pOwner->Get_WorldPostion().m128_f32[0]; fMouse.y -= m_pOwner->Get_WorldPostion().m128_f32[1]; - m_bPrevHover = m_bHover; - m_bHover = (m_iSpellType = m_pVIBufferCom->Set_Mouse_Hover(fMouse)); - if (m_iSpellType != -1) + m_iSpellType = m_pVIBufferCom->Set_Mouse_Hover(fMouse); + + CUIObject::HOVER_INFO Info; + Info.iSlotID = 0; + if (m_iSpellType == -1) { - m_bHover = true; - if (m_bHover == true && m_bPrevHover == false) - { - static_cast(m_pOwner)->Set_SkillType(m_iSpellType); - } + Info.iHover_Index = -1; + static_cast(m_pOwner)->Function_Callback(TEXT("Hover"), &Info); } + else { - m_bHover = false; - if (m_bHover == false && m_bPrevHover == true) - { - static_cast(m_pOwner)->Set_SkillType(m_iSpellType); - } + Info.iHover_Index = m_iSpellType; + static_cast(m_pOwner)->Function_Callback(TEXT("Hover"), &Info); } } diff --git a/Jusin154_Team3D/Editor/Private/Spell_Overlay.cpp b/Jusin154_Team3D/Editor/Private/Spell_Overlay.cpp index 566519b20..54cece9c3 100644 --- a/Jusin154_Team3D/Editor/Private/Spell_Overlay.cpp +++ b/Jusin154_Team3D/Editor/Private/Spell_Overlay.cpp @@ -47,7 +47,7 @@ HRESULT CSpell_Overlay::Initialize(void* pArg) m_vUVScale.x = 1.f; m_vUVScale.y = 1.f; m_fCoolTime = 5.f; - m_fSortZ = 1.f; + m_fSortZ = 0.01f; m_iSpellType = ENUM_CLASS(SPELLTYPE::CONTROL); Compute_UI(5); return S_OK; diff --git a/Jusin154_Team3D/Editor/Private/Spell_Panel.cpp b/Jusin154_Team3D/Editor/Private/Spell_Panel.cpp index 5825737f7..7f60a1c46 100644 --- a/Jusin154_Team3D/Editor/Private/Spell_Panel.cpp +++ b/Jusin154_Team3D/Editor/Private/Spell_Panel.cpp @@ -11,6 +11,11 @@ #include "Spell_Hover_Effect.h" #include "Spell_Preview.h" #include "Spell_Vidio_Border.h" +#include "Current_Slot_Number.h" +#include "Spell_Header.h" +#include "Spell_Header_Line.h" +#include "Spell_Data.h" +#include "Spell_Anim.h" CSpell_Panel::CSpell_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) :CPanelObject(pDevice, pContext) @@ -50,7 +55,10 @@ HRESULT CSpell_Panel::Initialize(void* pArg) } m_fCanvasAlpha = 1.f; m_fSortZ = 0.04f; - + m_iSpellType = -1; + m_iPendingSpell = -1; + m_fDelayTime = 1.f; + Add_Function(TEXT("Hover"), [this](void* p) {this->Slot_Chack(p); }); return S_OK; } @@ -70,6 +78,22 @@ void CSpell_Panel::Update(_float fTimeDelta) return; } + if (m_iSpellType != -1) + { + m_fHoverTimer += fTimeDelta; + } + else + { + m_fHoverTimer = 0.f; + Function_Callback(TEXT("FadeOut")); + } + + if (m_fHoverTimer >= m_fDelayTime && m_iPendingSpell != m_iSpellType) + { + m_iPendingSpell = m_iSpellType; + Function_Callback(TEXT("FadeIn")); + } + __super::Update(fTimeDelta); } @@ -108,6 +132,32 @@ _vector CSpell_Panel::Get_WorldPostion() return m_pTransformCom->Get_State(STATE::POSITION); } +const CUIObject::SPELLINFO CSpell_Panel::Get_Info(_int Index) +{ + return m_Info[Index]; +} + +void CSpell_Panel::Slot_Chack(void* pArg) +{ + CUIObject::HOVER_INFO* Info = static_cast(pArg); + + _int iSlot = Info->iSlotID; + m_iHoverSlot[iSlot] = Info->iHover_Index; + + int finalHover = -1; + for (int i = 0; i < 2; ++i) + { + if (m_iHoverSlot[i] != -1) + { + finalHover = m_iHoverSlot[i]; + break; + } + } + + m_iSpellType = finalHover; + Function_Callback(TEXT("Slot_Hover"), &m_iSpellType); +} + HRESULT CSpell_Panel::Bind_ShaderResources() { if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) @@ -225,6 +275,34 @@ HRESULT CSpell_Panel::Ready_Element(void* pArg) } Add_Element(TEXT("Spell_Vidio_Border"), m_pSpell_Vidio_Border); + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pCurrent_Slot_Number)))) + { + return E_FAIL; + } + Add_Element(TEXT("Current_Slot_Number"), m_pCurrent_Slot_Number); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Header)))) + { + return E_FAIL; + } + Add_Element(TEXT("Spell_Header"), m_pSpell_Header); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Header_Line)))) + { + return E_FAIL; + } + Add_Element(TEXT("Spell_Header_Line"), m_pSpell_Header_Line); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Anim)))) + { + return E_FAIL; + } + Add_Element(TEXT("Spell_Anim"), m_pSpell_Anim); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, m_Info, nullptr, reinterpret_cast(&m_pSpell_Data)))) + { + return E_FAIL; + } return S_OK; } diff --git a/Jusin154_Team3D/Editor/Private/Spell_Preview.cpp b/Jusin154_Team3D/Editor/Private/Spell_Preview.cpp index 782652f26..f42d4fc15 100644 --- a/Jusin154_Team3D/Editor/Private/Spell_Preview.cpp +++ b/Jusin154_Team3D/Editor/Private/Spell_Preview.cpp @@ -1,8 +1,7 @@ #include "pch.h" #include "Spell_Preview.h" #include "GameInstance.h" -#include "Spell_Header.h" -#include "Spell_Header_Line.h" + CSpell_Preview::CSpell_Preview(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) :CElementObject(pDevice, pContext) @@ -40,14 +39,16 @@ HRESULT CSpell_Preview::Initialize(void* pArg) } // y값 최소 270 최대 410 m_fTimeMult = 3.f; - m_fAlpha = 1.f; - m_fAlphaTime = 3.f; + m_fAlpha = 0.f; + m_fAlphaTime = 5.f; m_vNine_Slice = _float4(50.f, 75.f, 30.f, 96.f); m_fTopY = m_fY - m_vScale.y * 0.5f; SizeUpX(512.f); SizeUpY(270.f); m_iSpellType = ENUM_CLASS(SPELLTYPE::CONTROL); m_fSortZ = 0.02f; + static_cast(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); }); + static_cast(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); }); return S_OK; } @@ -82,7 +83,7 @@ void CSpell_Preview::Update(_float fTimeDelta) if (m_bFadeOut == true) { if (m_fAlpha >= 0.f) - m_fAlpha -= fTimeDelta; + m_fAlpha -= fTimeDelta * m_fAlphaTime;; if (m_fAlpha <= 0.f) { @@ -90,7 +91,6 @@ void CSpell_Preview::Update(_float fTimeDelta) m_fAlpha = 0.f; } } - static_cast(m_pSpell_Header)->Set_SkillType(ENUM_CLASS(m_iSpellType)); m_fTime += fTimeDelta * m_fTimeMult; __super::Update(fTimeDelta); } @@ -121,8 +121,6 @@ HRESULT CSpell_Preview::Render() if (FAILED(m_pVIBufferCom->Render())) { return E_FAIL; } - m_pSpell_Header->Render(); - m_pSpell_Header_Line->Render(); return S_OK; } @@ -148,8 +146,6 @@ void CSpell_Preview::SizeUpY(_float fSizeY) _float deltaY = m_fY - prevY; - static_cast(m_pSpell_Header_Line)->MoveY(-deltaY); - static_cast(m_pSpell_Header)->MoveY(-deltaY); } HRESULT CSpell_Preview::Bind_ShaderResources() @@ -243,14 +239,7 @@ HRESULT CSpell_Preview::Ready_Components(void* pArg) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Header)))) - { - return E_FAIL; - } - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Header_Line)))) - { - return E_FAIL; - } + return S_OK; } diff --git a/Jusin154_Team3D/Editor/Private/Spell_Vidio_Border.cpp b/Jusin154_Team3D/Editor/Private/Spell_Vidio_Border.cpp index b5f0d702b..1324ee4b8 100644 --- a/Jusin154_Team3D/Editor/Private/Spell_Vidio_Border.cpp +++ b/Jusin154_Team3D/Editor/Private/Spell_Vidio_Border.cpp @@ -39,11 +39,15 @@ HRESULT CSpell_Vidio_Border::Initialize(void* pArg) } m_fTimeMult = 3.f; - m_fAlpha = 1.f; - m_fAlphaTime = 3.f; + m_fAlpha = 0.f; + m_fAlphaTime = 9.f; m_fMoveSpeed = 5.f; m_fLerpX = m_fX; m_fLerpY = 45; + m_bStart = false; + static_cast(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); }); + static_cast(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); }); + static_cast(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); }); return S_OK; } @@ -78,17 +82,21 @@ void CSpell_Vidio_Border::Update(_float fTimeDelta) if (m_bFadeOut == true) { if (m_fAlpha >= 0.f) - m_fAlpha -= fTimeDelta; + m_fAlpha -= fTimeDelta * m_fAlphaTime; if (m_fAlpha <= 0.f) { m_bFadeOut = false; + m_bStart = false; m_fAlpha = 0.f; } } m_fTime += fTimeDelta * m_fTimeMult; + if (m_fAlpha >= 0.3f) + m_bStart = true; + __super::Update(fTimeDelta); } @@ -107,21 +115,25 @@ void CSpell_Vidio_Border::Late_Update(_float fTimeDelta) HRESULT CSpell_Vidio_Border::Render() { - if (FAILED(Bind_ShaderResources())) + if (m_bStart == true) { - return E_FAIL; - } - if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ALPHABLEND)))) - { - return E_FAIL; - } - if (FAILED(m_pVIBufferCom->Bind_Resources())) - { - return E_FAIL; - } - if (FAILED(m_pVIBufferCom->Render())) - { - return E_FAIL; + if (FAILED(Bind_ShaderResources())) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ALPHABLEND)))) + { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) + { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) + { + return E_FAIL; + } + } return S_OK; @@ -187,10 +199,6 @@ HRESULT CSpell_Vidio_Border::Ready_Components(void* pArg) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Anim)))) - { - return E_FAIL; - } return S_OK; } diff --git a/Jusin154_Team3D/Editor/Private/TrailObject.cpp b/Jusin154_Team3D/Editor/Private/TrailObject.cpp index 8b6bd1053..6319599b1 100644 --- a/Jusin154_Team3D/Editor/Private/TrailObject.cpp +++ b/Jusin154_Team3D/Editor/Private/TrailObject.cpp @@ -44,6 +44,9 @@ void CTrailObject::Update(_float fTimeDelta) return; + + + /* 디졸브 타임*/ if (m_TrailInfo.vDistortionTime.y != 0) { @@ -365,6 +368,8 @@ HRESULT CTrailObject::Render() if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_POSTEX::TRAIL)))) return E_FAIL; + if (FAILED(m_pGameInstance->Bind_DepthStencil(m_pShaderCom, "g_DepthStencilTexture"))) + return E_FAIL; if (FAILED(m_pTrailCom->Render())) return E_FAIL; diff --git a/Jusin154_Team3D/Editor/Private/Wand.cpp b/Jusin154_Team3D/Editor/Private/Wand.cpp index 23bc08d7f..36ee6d691 100644 --- a/Jusin154_Team3D/Editor/Private/Wand.cpp +++ b/Jusin154_Team3D/Editor/Private/Wand.cpp @@ -2,7 +2,6 @@ #include "Wand.h" #include "GameInstance.h" -#include "EditEffect.h" #include "TrailObject.h" CWand::CWand(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) @@ -25,16 +24,19 @@ HRESULT CWand::Initialize(void* pArg) WAND_DESC* pDesc = static_cast (pArg); m_pSocketMatrices = pDesc->pSocketMatrices; - if (FAILED(__super::Initialize(pArg))) + if (FAILED(__super::Initialize(pArg))) { return E_FAIL; + } - if (FAILED(Ready_Components())) + if (FAILED(Ready_Components())) { return E_FAIL; + } - CPartObject::PARTOBJECT_DESC PartsDesc{}; - - PartsDesc.pParentTransform = m_pTransformCom; +#ifdef _DEBUG + m_pGripShape = (GeometricPrimitive::CreateSphere(m_pContext, 0.1f, 10, false, false)); + m_pSubShape = (GeometricPrimitive::CreateSphere(m_pContext, 0.1f, 10, false, false)); +#endif // _DEBUG return S_OK; } @@ -46,19 +48,26 @@ void CWand::Priority_Update(_float fTimeDelta) socketMatrix = XMLoadFloat4x4(m_pSocketMatrices); for (int i = 0; i < 3; ++i) { - socketMatrix.r[i] = XMVector3Normalize(socketMatrix.r[i]); + socketMatrix.r[i] = XMVector3Normalize(socketMatrix.r[i]); } + m_pTransformCom->Set_WorldMatrix(socketMatrix * XMLoadFloat4x4(m_pParentTransformCom->Get_WorldMatrixPtr())); + XMStoreFloat4x4(&m_pWandTipMatrix, XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("Effect")) * m_pTransformCom->Get_XMWorldMatrix()); + +#ifdef _DEBUG + Describe_Entity(); + +#endif // _DEBUG } void CWand::Update(_float fTimeDelta) { m_pModelCom->Combined_BoneMatrix(); + } void CWand::Late_Update(_float fTimeDelta) { - m_pGameInstance->Add_RenderGroup(RENDER::BLEND, this); } @@ -87,10 +96,24 @@ HRESULT CWand::Render() return E_FAIL; } } +#ifdef _DEBUG + /*m_pGripShape->Draw(m_pTransformCom->Get_XMWorldMatrix(), m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW), m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ), DirectX::Colors::Green, nullptr, true); + m_pSubShape->Draw(XMLoadFloat4x4(&m_pWandTipMatrix), m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW), m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ), DirectX::Colors::Purple, nullptr, true);*/ +#endif // _DEBUG return S_OK; } +_vector CWand::Get_WorldPostion() +{ + return XMLoadFloat4((_float4*)&m_pWandTipMatrix.m[3][0]); +} + +_matrix CWand::Get_WorldMatrix() +{ + return XMLoadFloat4x4(&m_pWandTipMatrix); +} + HRESULT CWand::Ready_Components() { @@ -163,9 +186,33 @@ void CWand::Free() SAFE_RELEASE(m_pShaderCom); SAFE_RELEASE(m_pModelCom); + } +#ifdef _DEBUG void CWand::Describe_Entity() { + _float4 vPos; + _float4 vTipWorldPos; + _float4 vTipRight; + _float4 vTipUp; + _float4 vTipLook; + _float4 vTipPos; + XMStoreFloat4(&vPos, m_pTransformCom->Get_State(STATE::POSITION)); + XMStoreFloat4(&vTipWorldPos, Get_WorldPostion()); + + XMStoreFloat4(&vTipRight, XMLoadFloat4((_float4*)&m_pWandTipMatrix.m[0][0])); + XMStoreFloat4(&vTipUp, XMLoadFloat4((_float4*)&m_pWandTipMatrix.m[1][0])); + XMStoreFloat4(&vTipLook, XMLoadFloat4((_float4*)&m_pWandTipMatrix.m[2][0])); + XMStoreFloat4(&vTipPos, XMLoadFloat4((_float4*)&m_pWandTipMatrix.m[3][0])); + + GUI::Text("vPos, %.2f, %.2f, %.2f, %.2f", vPos.x, vPos.y, vPos.z, vPos.w); + GUI::Text("vTipWorldPos, %.2f, %.2f, %.2f, %.2f", vTipWorldPos.x, vTipWorldPos.y, vTipWorldPos.z, vTipWorldPos.w); + GUI::Text("vTipRight, %.2f, %.2f, %.2f, %.2f", vTipRight.x, vTipRight.y, vTipRight.z, vTipRight.w); + GUI::Text("vTipUp, %.2f, %.2f, %.2f, %.2f", vTipUp.x, vTipUp.y, vTipUp.z, vTipUp.w); + GUI::Text("vTipLook, %.2f, %.2f, %.2f, %.2f", vTipLook.x, vTipLook.y, vTipLook.z, vTipLook.w); + GUI::Text("vTipPos, %.2f, %.2f, %.2f, %.2f", vTipPos.x, vTipPos.y, vTipPos.z, vTipPos.w); } + +#endif // _DEBUG diff --git a/Jusin154_Team3D/Editor/Public/Bombard.h b/Jusin154_Team3D/Editor/Public/Bombard.h index 7c3e7e021..7ac78a4ca 100644 --- a/Jusin154_Team3D/Editor/Public/Bombard.h +++ b/Jusin154_Team3D/Editor/Public/Bombard.h @@ -33,6 +33,7 @@ class CBombard final : public CEffect_Container private: _wstring m_wstrEffectName = {}; class CPartObject* m_pLight_Projectile = {}; + _vector m_vCameraLook = {}; public: static CBombard* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual void Free() override; diff --git a/Jusin154_Team3D/Editor/Public/Current_Slot_Number.h b/Jusin154_Team3D/Editor/Public/Current_Slot_Number.h new file mode 100644 index 000000000..ebfed02b7 --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/Current_Slot_Number.h @@ -0,0 +1,52 @@ +#pragma once + +#include "Editor_Define.h" +#include "ElementObject.h" + +NS_BEGIN(Editor) + +class CCurrent_Slot_Number final : public CElementObject +{ +private: + CCurrent_Slot_Number(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CCurrent_Slot_Number(const CCurrent_Slot_Number& rhs); + virtual ~CCurrent_Slot_Number() = 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; + + virtual void SizeUpX(_float fSizeX) override; + virtual void SizeUpY(_float fSizeY) override; + virtual void SizeUpdate(_float fSizeX, _float fSizeY) override; + +private: + virtual HRESULT Bind_ShaderResources() override; + virtual HRESULT Ready_Components(void* pArg) override; + void UV(); + _float4 Meter_Index(_uint Number); + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + +private: + CTexture* m_pDiffuse_TextureCom = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_UI_Instance* m_pVIBufferCom = { nullptr }; + CVIBuffer_UI_Instance::UI_ATLAS_DESC pUVDesc[4]; + + _float2 m_fIamge_Size{}; + _float m_fOffSetX{}; + _float m_fOffSetY{}; + _uint m_iCols{}; + +public: + static CCurrent_Slot_Number* 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/EditEffect.h b/Jusin154_Team3D/Editor/Public/EditEffect.h index 8916fb44e..229184a94 100644 --- a/Jusin154_Team3D/Editor/Public/EditEffect.h +++ b/Jusin154_Team3D/Editor/Public/EditEffect.h @@ -41,6 +41,8 @@ class CEditEffect final : public CEffectObject _float m_fAccTime = {}; _int m_iSign = { 1 }; + _bool m_isWandPos = {}; + public: static CEditEffect* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); diff --git a/Jusin154_Team3D/Editor/Public/Editor_Define.h b/Jusin154_Team3D/Editor/Public/Editor_Define.h index 43cb7b2e4..6f13cabc3 100644 --- a/Jusin154_Team3D/Editor/Public/Editor_Define.h +++ b/Jusin154_Team3D/Editor/Public/Editor_Define.h @@ -26,16 +26,15 @@ namespace Editor enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, 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, END }; - enum class SHADER_PASS_UIEDITOR { DEFAULT, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, SPELL_ANIM, NINECLICE, ROTATION, SLOT, TYPE, HPBAR, MAGIC_METER, MAGIC_ICON, REMOVEUV, REVELIO, POTION, MAGIC_ITEM, SPELL_PREVIEW, SPELL_HEADER, SPELL_HEADER_LINE, END }; + enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, BLEND, BLEND_NOWORLD, BLOOM, BLOOM_NOWORLD, BLUR_NO_EMMISVE, BLUR_NO_WORLD_NO_EMISSIVE, WEIGHTBLEND_FOR_BLEND,END }; + enum class SHADER_PASS_UIEDITOR { DEFAULT, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, TYPE, HPBAR, MAGIC_METER, MAGIC_ICON, REMOVEUV, REVELIO, POTION, MAGIC_ITEM, SPELL_PREVIEW, SPELL_HEADER, SPELL_HEADER_LINE, SPELL_DRAG, END }; enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, MAGIC_METER, SPELL_LIST, EESSENTIAL_SPELL_SOLT, EESSENTIAL_SPELL, COLOR, SPELL_HOVER, SPELL_SLOT_EFFECT, END }; enum class EFFECT_TYPE { EFFECT, TRAIL, END }; - enum class SKILL_TYPE{ ARESTO_MOMENTUM, GLACIUS, LEVIOSO, TRANSFORM, // 노란색 - ASSIO, DEPULSO, DESCENDO, FLIPENDO, // 보라색 + enum class SKILL_TYPE{ ARRESTO_MOMENTUM, GLACIUS, LEVIOSO, TRANSFORM, // 노란색 + ACCIO, DEPULSO, DESCENDO, FLIPENDO, // 보라색 CONFRINGO, DIFFINDO, EXPELLIARMUS, BOMBARDA, INCENDIO, // 빨간색 DISILLUSIONMENT, LUMOS, REPARO, WINGARDIUM_LEVIOSA, // 하늘색 CONJURING_SPELL, ALTERING_SPELL, EVANESCO, // 연녹색 diff --git a/Jusin154_Team3D/Editor/Public/Eessential_Spell_Slot.h b/Jusin154_Team3D/Editor/Public/Eessential_Spell_Slot.h index 6c0619e09..5ce4f508f 100644 --- a/Jusin154_Team3D/Editor/Public/Eessential_Spell_Slot.h +++ b/Jusin154_Team3D/Editor/Public/Eessential_Spell_Slot.h @@ -25,7 +25,7 @@ class CEessential_Spell_Slot final : public CElementObject private: - void Hover(); + void Hover(_float fTimeDelta); private: virtual HRESULT Bind_ShaderResources() override; @@ -43,8 +43,10 @@ class CEessential_Spell_Slot final : public CElementObject _float m_fOffSetY{}; _uint m_iCols{}; - _bool m_bHover = { false }; - _bool m_bPrevHover = { false }; + _float m_fHoverTime{}; + _int m_iPerSpell_Slot{}; + + public: static CEessential_Spell_Slot* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Editor/Public/EffectObject.h b/Jusin154_Team3D/Editor/Public/EffectObject.h index f2a9cf81c..81048d56d 100644 --- a/Jusin154_Team3D/Editor/Public/EffectObject.h +++ b/Jusin154_Team3D/Editor/Public/EffectObject.h @@ -86,8 +86,9 @@ class CEffectObject abstract : public CPartObject SHADER_PASS_INSTANCE_MODEL eShaderPass = { SHADER_PASS_INSTANCE_MODEL::NON_NOMALMAP }; - _bool isDiffuseBlur = {}; - _bool isMaskBlur = {}; + _bool isBlurNoEmissive = {}; + + _bool isTexBlur = {}; _bool isBlurDissolve = {}; _bool isBlurReverseDissolve = {}; diff --git a/Jusin154_Team3D/Editor/Public/Effect_Editor.h b/Jusin154_Team3D/Editor/Public/Effect_Editor.h index a0375761c..aae95e2ab 100644 --- a/Jusin154_Team3D/Editor/Public/Effect_Editor.h +++ b/Jusin154_Team3D/Editor/Public/Effect_Editor.h @@ -56,7 +56,7 @@ class CEffect_Editor final : public CEffect_Container private: class CEffectPool* m_pEffectPool = nullptr; - + _bool m_isWandPos = {}; public: static CEffect_Editor* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Editor/Public/Magic_Item.h b/Jusin154_Team3D/Editor/Public/Magic_Item.h index 18df03ef7..7679c208e 100644 --- a/Jusin154_Team3D/Editor/Public/Magic_Item.h +++ b/Jusin154_Team3D/Editor/Public/Magic_Item.h @@ -28,6 +28,7 @@ class CMagic_Item final : public CElementObject private: void Compute_UV(_uint iItemID); void Compute_Image(); + private: CTexture* m_pDiffuse_TextureCom = { nullptr }; CTexture* m_pDiffuse_TextureCom1 = { nullptr }; diff --git a/Jusin154_Team3D/Editor/Public/Spell_Anim.h b/Jusin154_Team3D/Editor/Public/Spell_Anim.h index 678f2b36a..4845e6212 100644 --- a/Jusin154_Team3D/Editor/Public/Spell_Anim.h +++ b/Jusin154_Team3D/Editor/Public/Spell_Anim.h @@ -20,8 +20,11 @@ class CSpell_Anim final : public CElementObject virtual _vector Get_WorldPostion() override; public: - void Anim_Start(_uint iSpell_Id); - void Anim_End(); + virtual void Set_FadeIn() override; + +private: + void Change_Image(_int SpellID); + virtual void Set_SkillType(_int eType) override; private: virtual HRESULT Bind_ShaderResources() override; @@ -39,7 +42,7 @@ class CSpell_Anim final : public CElementObject _float m_fFrameTime{}; // 한 프레임당 시간(초) _int m_iCurrentFrame{}; // 현재 보여줄 프레임 - _uint m_iSpell_Index{}; + _int m_iPerSpell{}; _bool m_bAnim_Start = { false }; public: static CSpell_Anim* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); diff --git a/Jusin154_Team3D/Editor/Public/Spell_Data.h b/Jusin154_Team3D/Editor/Public/Spell_Data.h index 86c6f33f6..e1101bbae 100644 --- a/Jusin154_Team3D/Editor/Public/Spell_Data.h +++ b/Jusin154_Team3D/Editor/Public/Spell_Data.h @@ -11,6 +11,22 @@ NS_BEGIN(Editor) class CSpell_Data final : public CGameObject { +public: + typedef struct tagSpellInfo + { + _int iSpell_ID{}; + _string pSpell_Name; + _string pImage_Name; + _int iSpell_Type{}; + _int iSkill_Type{}; + _float fSpell_CoolTime{}; + _float fDuration{}; + _int iAnimNum{}; + _string pSpellInfo; + _bool bSpell_Lock = false; + _bool bEquip_Spell = false; + }SPELLINFO; +private: CSpell_Data(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); CSpell_Data(const CSpell_Data& rhs); virtual ~CSpell_Data() = default; @@ -28,9 +44,14 @@ class CSpell_Data final : public CGameObject virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; +public: + //const SPELLINFO& Get_Info(_uint SpellID) const; + private: CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; CGameObject* m_pSpell_Panel = { nullptr }; + + SPELLINFO SpellInfo = {}; public: static CSpell_Data* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Editor/Public/Spell_Drag.h b/Jusin154_Team3D/Editor/Public/Spell_Drag.h new file mode 100644 index 000000000..b65a92d24 --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/Spell_Drag.h @@ -0,0 +1,50 @@ +#pragma once + +#include "Editor_Define.h" +#include "ElementObject.h" + +NS_BEGIN(Editor) + +class CSpell_Drag final : public CElementObject +{ +private: + CSpell_Drag(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CSpell_Drag(const CSpell_Drag& rhs); + virtual ~CSpell_Drag() = default; + +public: + virtual void Priority_Update(_float fTimeDelta); + virtual void Update(_float fTimeDelta); + virtual void Late_Update(_float fTimeDelta); + virtual HRESULT Render() override; + virtual _vector Get_WorldPostion() override; + + +private: + virtual HRESULT Bind_ShaderResources() override; + virtual HRESULT Ready_Components(void* pArg) override; + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + +private: + void Compute_UI(_uint SpellID); + virtual void Set_SpellType(_int SpellID) override; + +private: + CTexture* m_pDiffuse_TextureCom = { nullptr }; + CTexture* m_pDiffuse_TextureCom1 = { nullptr }; + CTexture* m_pDiffuse_TextureCom2 = { nullptr }; + CTexture* m_pDiffuse_TextureCom3 = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + _float4 m_vUV{}; + +public: + static CSpell_Drag* 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/Spell_Header.h b/Jusin154_Team3D/Editor/Public/Spell_Header.h index 41fb41913..c9690aaab 100644 --- a/Jusin154_Team3D/Editor/Public/Spell_Header.h +++ b/Jusin154_Team3D/Editor/Public/Spell_Header.h @@ -19,9 +19,6 @@ class CSpell_Header final : public CElementObject virtual HRESULT Render() override; virtual _vector Get_WorldPostion() override; -private: - virtual void MoveY(_float fY) override; - private: virtual HRESULT Bind_ShaderResources() override; virtual HRESULT Ready_Components(void* pArg) override; @@ -33,6 +30,7 @@ class CSpell_Header final : public CElementObject CShader* m_pShaderCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + _int m_iSkillType{}; public: static CSpell_Header* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Editor/Public/Spell_Header_Line.h b/Jusin154_Team3D/Editor/Public/Spell_Header_Line.h index d8062f7ec..822caa59e 100644 --- a/Jusin154_Team3D/Editor/Public/Spell_Header_Line.h +++ b/Jusin154_Team3D/Editor/Public/Spell_Header_Line.h @@ -19,9 +19,6 @@ class CSpell_Header_Line final : public CElementObject virtual HRESULT Render() override; virtual _vector Get_WorldPostion() override; -private: - virtual void MoveY(_float fY) override; - private: virtual HRESULT Bind_ShaderResources() override; virtual HRESULT Ready_Components(void* pArg) override; diff --git a/Jusin154_Team3D/Editor/Public/Spell_Hover.h b/Jusin154_Team3D/Editor/Public/Spell_Hover.h index 496588411..7aeeca08a 100644 --- a/Jusin154_Team3D/Editor/Public/Spell_Hover.h +++ b/Jusin154_Team3D/Editor/Public/Spell_Hover.h @@ -49,7 +49,6 @@ class CSpell_Hover final : public CElementObject _float m_fOffSetX{}; _float m_fOffSetY{}; _uint m_iCols{}; - public: static CSpell_Hover* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Editor/Public/Spell_Hover_Effect.h b/Jusin154_Team3D/Editor/Public/Spell_Hover_Effect.h index 433d74719..2216e07f9 100644 --- a/Jusin154_Team3D/Editor/Public/Spell_Hover_Effect.h +++ b/Jusin154_Team3D/Editor/Public/Spell_Hover_Effect.h @@ -27,9 +27,6 @@ class CSpell_Hover_Effect final : public CElementObject virtual void SizeUpY(_float fSizeY) override; virtual void SizeUpdate(_float fSizeX, _float fSizeY) override; -private: - void Hover(); - private: virtual HRESULT Bind_ShaderResources() override; virtual HRESULT Ready_Components(void* pArg) override; diff --git a/Jusin154_Team3D/Editor/Public/Spell_List.h b/Jusin154_Team3D/Editor/Public/Spell_List.h index 7e81f303a..a74245592 100644 --- a/Jusin154_Team3D/Editor/Public/Spell_List.h +++ b/Jusin154_Team3D/Editor/Public/Spell_List.h @@ -29,7 +29,7 @@ class CSpell_List final : public CElementObject private: void Color(); - void Hover(); + void Hover(_float fTimeDelta); private: virtual HRESULT Bind_ShaderResources() override; @@ -47,9 +47,8 @@ class CSpell_List final : public CElementObject _float m_fOffSetY{}; _uint m_iCols{}; - _bool m_bHover = { false }; - _bool m_bPrevHover = { false }; - + _int m_iPerSpell_Slot{}; + _float m_fHoverTime{}; public: static CSpell_List* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Editor/Public/Spell_Panel.h b/Jusin154_Team3D/Editor/Public/Spell_Panel.h index 8fa70c623..af602b37e 100644 --- a/Jusin154_Team3D/Editor/Public/Spell_Panel.h +++ b/Jusin154_Team3D/Editor/Public/Spell_Panel.h @@ -11,6 +11,7 @@ NS_BEGIN(Editor) class CSpell_Panel final : public CPanelObject { + private: CSpell_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); CSpell_Panel(const CSpell_Panel& rhs); @@ -24,9 +25,11 @@ class CSpell_Panel final : public CPanelObject virtual _vector Get_WorldPostion() override; public: - void SlotHoverOn(); - void SlotHoverOff(); - void SlotHover(); + virtual const SPELLINFO Get_Info(_int Index) override; + +private: + void Slot_Chack(void* pArg); + private: virtual HRESULT Bind_ShaderResources() override; @@ -38,7 +41,7 @@ class CSpell_Panel final : public CPanelObject private: CTexture* m_pDiffuse_TextureCom = { nullptr }; CShader* m_pShaderCom = { nullptr }; - CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; CGameObject* m_pCurrent_Spell_Slot = { nullptr }; CGameObject* m_pSpell_List = { nullptr }; @@ -50,9 +53,19 @@ class CSpell_Panel final : public CPanelObject CGameObject* m_pSpell_Hover_Effect = { nullptr }; CGameObject* m_pSpell_Preview = { nullptr }; CGameObject* m_pSpell_Vidio_Border = { nullptr }; + CGameObject* m_pCurrent_Slot_Number = { nullptr }; + CGameObject* m_pSpell_Data= { nullptr }; + CGameObject* m_pSpell_Header = { nullptr }; + CGameObject* m_pSpell_Header_Line = { nullptr }; + CGameObject* m_pSpell_Anim = { nullptr }; - _uint m_iSlotHover_Index{}; + _int m_iHoverSlot[2] = { -1,-1 }; + SPELLINFO m_Info[34] = {}; + CUIObject::HOVER_INFO m_Hover; + + _int m_iPendingSpell = -1; + _float m_fHoverTimer = 0.f; public: static CSpell_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Editor/Public/Spell_Preview.h b/Jusin154_Team3D/Editor/Public/Spell_Preview.h index 6f3dcd134..e8d47274c 100644 --- a/Jusin154_Team3D/Editor/Public/Spell_Preview.h +++ b/Jusin154_Team3D/Editor/Public/Spell_Preview.h @@ -36,8 +36,7 @@ class CSpell_Preview final : public CElementObject CShader* m_pShaderCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; - CGameObject* m_pSpell_Header = { nullptr }; - CGameObject* m_pSpell_Header_Line = { nullptr }; + _float4 m_vHeaderBack{}; diff --git a/Jusin154_Team3D/Editor/Public/Spell_Vidio_Border.h b/Jusin154_Team3D/Editor/Public/Spell_Vidio_Border.h index 3263a8c70..bb306b7bb 100644 --- a/Jusin154_Team3D/Editor/Public/Spell_Vidio_Border.h +++ b/Jusin154_Team3D/Editor/Public/Spell_Vidio_Border.h @@ -19,6 +19,12 @@ class CSpell_Vidio_Border final : public CElementObject virtual HRESULT Render() override; virtual _vector Get_WorldPostion() override; +//public: +// virtual const SPELLINFO Get_Info(_int Index) override; +// +//public: +// virtual void Set_SkillType(_int eType); + private: virtual HRESULT Bind_ShaderResources() override; virtual HRESULT Ready_Components(void* pArg) override; @@ -31,7 +37,9 @@ class CSpell_Vidio_Border final : public CElementObject CShader* m_pShaderCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; - CGameObject* m_pSpell_Anim = { nullptr }; + _float m_fStertTimer{}; + _int m_iPerIndex{}; + _bool m_bStart = { false }; public: static CSpell_Vidio_Border* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); diff --git a/Jusin154_Team3D/Editor/Public/TrailObject.h b/Jusin154_Team3D/Editor/Public/TrailObject.h index 190930957..f30b0240a 100644 --- a/Jusin154_Team3D/Editor/Public/TrailObject.h +++ b/Jusin154_Team3D/Editor/Public/TrailObject.h @@ -123,8 +123,10 @@ class CTrailObject final : public CPartObject _string m_strName = {}; TRAIL_INFO m_TrailInfo = {}; + _float4x4* m_pParantsMatrix = {}; + }; NS_END diff --git a/Jusin154_Team3D/Editor/Public/Wand.h b/Jusin154_Team3D/Editor/Public/Wand.h index 7b2859dd3..d1c866c6f 100644 --- a/Jusin154_Team3D/Editor/Public/Wand.h +++ b/Jusin154_Team3D/Editor/Public/Wand.h @@ -3,11 +3,6 @@ #include "Editor_Define.h" #include "PartObject.h" -NS_BEGIN(Engine) -class CShader; -class CModel; -NS_END - NS_BEGIN(Editor) class CWand final : public CPartObject @@ -29,16 +24,21 @@ class CWand final : public CPartObject virtual void Update(_float fTimeDelta) override; virtual void Late_Update(_float fTimeDelta) override; virtual HRESULT Render() override; + virtual _vector Get_WorldPostion() override; + _matrix Get_WorldMatrix(); +public: private: const _float4x4* m_pSocketMatrices = { }; CShader* m_pShaderCom = { nullptr }; CModel* m_pModelCom = { nullptr }; - class CTrailObject* m_pTrail = { nullptr }; - class CEditEffect* m_pEffectParts = { nullptr }; + _float4x4 m_pWandTipMatrix = {}; - _float3 m_vOffset = { 0.f , -0.3f ,0.f}; +#ifdef _DEBUG + unique_ptr m_pGripShape = { nullptr }; + unique_ptr m_pSubShape = { nullptr }; +#endif // _DEBUG private: HRESULT Ready_Components(); @@ -48,7 +48,10 @@ class CWand final : public CPartObject static CWand* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr)override; virtual void Free() override; - virtual void Describe_Entity() override; + +#ifdef _DEBUG + void Describe_Entity() override; +#endif // _DEBUG }; NS_END diff --git a/Jusin154_Team3D/Engine/Private/Camera.cpp b/Jusin154_Team3D/Engine/Private/Camera.cpp index a1591273d..2eb6eaf37 100644 --- a/Jusin154_Team3D/Engine/Private/Camera.cpp +++ b/Jusin154_Team3D/Engine/Private/Camera.cpp @@ -188,8 +188,9 @@ void CCamera::Set_Fov(_float fFovy, _float fTimeDelta,_bool& bZoomIn) m_fFovy -= (fTimeDelta * 0.6f); } - if (fFovy == m_fFovy) + if (fabsf(fFovy - m_fFovy) <= FLT_EPSILON3) { + m_fFovy = fFovy; bZoomIn = false; } } diff --git a/Jusin154_Team3D/Engine/Private/Character_Controller.cpp b/Jusin154_Team3D/Engine/Private/Character_Controller.cpp index ca42b0b3f..98914b57f 100644 --- a/Jusin154_Team3D/Engine/Private/Character_Controller.cpp +++ b/Jusin154_Team3D/Engine/Private/Character_Controller.cpp @@ -194,7 +194,7 @@ _bool CCharacter_Controller::UpdateGroundByCast(_float fTimeDelta) if (true == bHit) { // 쿼리해서 스태틱 중에 터레인 액터들이 맞으면 다시 갱신 const PSX::PxSweepHit& hit = pxBuffer.block; - + PSX::PxRigidActor* pActor = hit.actor; PSX::PxShape* pShape = hit.shape; diff --git a/Jusin154_Team3D/Engine/Private/GameInstance.cpp b/Jusin154_Team3D/Engine/Private/GameInstance.cpp index 1f8595953..3da755143 100644 --- a/Jusin154_Team3D/Engine/Private/GameInstance.cpp +++ b/Jusin154_Team3D/Engine/Private/GameInstance.cpp @@ -49,7 +49,9 @@ HRESULT CGameInstance::Initialize_Engine(const ENGINE_DESC& EngineDesc, ID3D11De } } } + m_pThreadHolder = CThreadHolder::Create( 6 ); + if (nullptr == m_pThreadHolder) { return E_FAIL; } @@ -694,6 +696,10 @@ _bool CGameInstance::SphereCast(_float fRadius, _float3 vStartPos, _float3 vDir, { return m_pPhysX_Manager->SphereCast(fRadius, vStartPos, vDir, fDistance, flagHitsData, flagQuery, hitBuffer); } +_bool CGameInstance::SphereCast(_float fRadius, _fvector vStartPos, _fvector vDir, _float fDistance, PSX::PxHitFlags flagHitsData, PSX::PxQueryFlags flagQuery, PSX::PxSweepBuffer& hitBuffer) +{ + return m_pPhysX_Manager->SphereCast(fRadius, vStartPos, vDir, fDistance, flagHitsData, flagQuery, hitBuffer); +} PSX::PxController* CGameInstance::Add_CapsuleController(PSX::PxCapsuleControllerDesc& Desc) { return m_pPhysX_Manager->Add_CapsuleController(Desc); @@ -722,11 +728,11 @@ void CGameInstance::Release_Actor(PSX::PxActor& Actor) { m_pPhysX_Manager->Detach_Actor(Actor); } -#ifdef EDITOR_PROJECT HRESULT CGameInstance::ConvertToTriMeshes(vector& Meshes, vector& pxTriMeshes, _fmatrix WorldMatrix) { return m_pPhysX_Manager->ConvertToTriMeshes(Meshes, pxTriMeshes, WorldMatrix); } +#ifdef EDITOR_PROJECT HRESULT CGameInstance::SaveTriMeshes(const _char* pPath, vector& TriMeshes) { return m_pPhysX_Manager->SaveTriMeshes(pPath, TriMeshes); diff --git a/Jusin154_Team3D/Engine/Private/Mesh.cpp b/Jusin154_Team3D/Engine/Private/Mesh.cpp index 588856d07..3b4264904 100644 --- a/Jusin154_Team3D/Engine/Private/Mesh.cpp +++ b/Jusin154_Team3D/Engine/Private/Mesh.cpp @@ -28,7 +28,7 @@ HRESULT CMesh::Bind_BoneMatrices(const vector& Bones, CShader* pSh if (0 == m_iNumBones) { return S_OK; } - + return pShader->Bind_Matrices(pConstantName, m_pBoneMatrices, m_iNumBones); } @@ -205,9 +205,12 @@ HRESULT CMesh::Initialize_Prototype(MODEL eType, const CModel* pModel, SaveMesh* D3D11_SUBRESOURCE_DATA InitialIBData{}; InitialIBData.pSysMem = _SaveMesh->Indices.data(); + m_pIndices = new _uint[m_iNumIndices]; + memcpy_s(m_pIndices, sizeof(_uint) * m_iNumIndices, _SaveMesh->Indices.data(), sizeof(_uint) * m_iNumIndices); - if (FAILED(m_pDevice->CreateBuffer(&IBDesc, &InitialIBData, &m_pIB))) + if (FAILED(m_pDevice->CreateBuffer(&IBDesc, &InitialIBData, &m_pIB))){ return E_FAIL; + } #pragma endregion @@ -386,20 +389,6 @@ HRESULT CMesh::Initialize(void* pArg) return S_OK; } -#ifdef EDITOR_PROJECT -CMesh* CMesh::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, MODEL eType, vector& Bones, const aiMesh* pAIMesh, _fmatrix& PreTransformMatrix) -{ - CMesh* pInstance = new CMesh(pDevice, pContext); - - if (FAILED(pInstance->Initialize_Prototype(eType, Bones, pAIMesh, PreTransformMatrix))) - { - MSG_BOX("Failed to Created : CMesh"); - SAFE_RELEASE(pInstance); - } - - return pInstance; -} - PSX::PxTriangleMesh* CMesh::ConvertToPxMesh(const PSX::PxCookingParams* pParam, PSX::PxPhysics* pPhysX, _matrix WorldMatrix) { PSX::PxTriangleMeshDesc tMeshDesc = {}; @@ -409,7 +398,14 @@ PSX::PxTriangleMesh* CMesh::ConvertToPxMesh(const PSX::PxCookingParams* pParam, tMeshDesc.points.count = m_iNumVertices; tMeshDesc.points.stride = sizeof(PSX::PxVec3); Vertices.resize(m_iNumVertices); - memcpy(Vertices.data(), m_pVertexPositions, sizeof(PSX::PxVec3) * m_iNumVertices); + XMVector3TransformCoordStream( + reinterpret_cast(Vertices.data()), // dest + sizeof(PSX::PxVec3), + reinterpret_cast(m_pVertexPositions), // src + sizeof(PSX::PxVec3), + m_iNumVertices, + WorldMatrix + ); tMeshDesc.points.data = Vertices.data(); } { @@ -438,6 +434,19 @@ PSX::PxTriangleMesh* CMesh::ConvertToPxMesh(const PSX::PxCookingParams* pParam, return pTriangleMesh; } +#ifdef EDITOR_PROJECT +CMesh* CMesh::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, MODEL eType, vector& Bones, const aiMesh* pAIMesh, _fmatrix& PreTransformMatrix) +{ + CMesh* pInstance = new CMesh(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype(eType, Bones, pAIMesh, PreTransformMatrix))) + { + MSG_BOX("Failed to Created : CMesh"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} HRESULT CMesh::Ready_VertexBuffer_For_NonAnim(const aiMesh* pAIMesh, _fmatrix PreTransformMatrix) { diff --git a/Jusin154_Team3D/Engine/Private/Model.cpp b/Jusin154_Team3D/Engine/Private/Model.cpp index 25525d45a..92974b5ad 100644 --- a/Jusin154_Team3D/Engine/Private/Model.cpp +++ b/Jusin154_Team3D/Engine/Private/Model.cpp @@ -174,8 +174,9 @@ _bool CModel::Play_Anim(_float fTimeDelta, CTransform* pTransform) { m_bLoopRestarted = true; } - else + else{ XMStoreFloat3(&m_vPrevRootPos, m_vector[2]); + } m_vPrevRootRot = { 0.f,0.f,0.f,0.f }; m_bInitialRootRotSaved = false; @@ -234,8 +235,9 @@ _bool CModel::Play_Dual_Anim(_float fTimeDelta, CTransform* pTransform) { m_fSecondRatio = 1.f; } - else + else{ m_fSecondBlendTime = 0.f; + } } } else @@ -256,8 +258,9 @@ _bool CModel::Play_Dual_Anim(_float fTimeDelta, CTransform* pTransform) { m_fSecondRatio = 1.f; } - else + else{ m_fSecondBlendTime = 0.f; + } } } @@ -275,8 +278,9 @@ _bool CModel::Play_Dual_Anim(_float fTimeDelta, CTransform* pTransform) { m_bLoopRestarted = true; } - else + else{ XMStoreFloat3(&m_vPrevRootPos, m_vector[2]); + } m_vPrevRootRot = { 0.f,0.f,0.f,0.f }; m_bInitialRootRotSaved = false; @@ -579,6 +583,19 @@ HRESULT CModel::Render_Indexed(_uint iMeshIndex, _uint IndexCount, _uint StartIn return S_OK; } +HRESULT CModel::Ready_PhysXMeshes(_fmatrix& PreTransformMatrix) +{ + m_iNumPhysXMeshes = m_iNumMeshes; + + m_TriMeshes.reserve(m_iNumMeshes); + + m_pGameInstance->ConvertToTriMeshes(m_Meshes, m_TriMeshes, PreTransformMatrix); + + for (_uint i = 0; i < m_iNumMeshes; ++i) { + m_pGameInstance->RegistTriMesh((m_Meshes[i]->Get_Name() + to_string(i)).c_str(), m_TriMeshes[i]); + } + return S_OK; +} #ifdef EDITOR_PROJECT HRESULT CModel::Ready_Meshes(MODEL eType, const aiScene* pAIScene, _fmatrix& PreTransformMatrix) @@ -601,25 +618,8 @@ HRESULT CModel::Ready_Meshes(MODEL eType, const aiScene* pAIScene, _fmatrix& Pre return S_OK; } -HRESULT CModel::Ready_PhysXMeshes() -{ - m_iNumPhysXMeshes = m_iNumMeshes; - - m_TriMeshes.reserve(m_iNumMeshes); - - m_pGameInstance->ConvertToTriMeshes(m_Meshes, m_TriMeshes); - - return S_OK; -} - HRESULT CModel::Save_PhysXTriMeshes(const _char* pModelFilePath) { - if (FAILED(Ready_PhysXMeshes())) { - return E_FAIL; - } - for (_uint i = 0; i < m_iNumMeshes; ++i) { - m_pGameInstance->RegistTriMesh((m_Meshes[i]->Get_Name() + to_string(i)).c_str(), m_TriMeshes[i]); - } return m_pGameInstance->SaveTriMeshes(pModelFilePath, m_TriMeshes); } @@ -1391,11 +1391,7 @@ HRESULT CModel::Initialize_Prototype(MODEL eType, const _char* pModelFilePath, _ if (FAILED(Ready_Animations(m_Bones))) { return E_FAIL; } -//#ifdef 기무리 -// if (MODEL::ENVIROMENT == eType) { -// Save_PhysXTriMeshes(pModelFilePath); -// } -//#endif // _DEBUG + return S_OK; } diff --git a/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp b/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp index 15d68b1f5..9d13b66b6 100644 --- a/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp +++ b/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp @@ -106,7 +106,11 @@ PSX::PxRigidStatic* CPhysX_Manager::Add_StaticActor(CRigidBody_Static& RigidBody // 유효성 체크 PX_ASSERT(pPxMeshGeometry->isValid()); pGeometry = pPxMeshGeometry; - m_TriangleMeshGeometry.emplace(RigidBody.Get_PxMeshKey(), pPxMeshGeometry); + _bool bEmplaceSuccess = m_TriangleMeshGeometry.emplace(RigidBody.Get_PxMeshKey(), pPxMeshGeometry).second; + if (false == bEmplaceSuccess) { + Safe_Delete(pPxMeshGeometry); + pGeometry = (*m_TriangleMeshGeometry.find(RigidBody.Get_PxMeshKey())).second; + } } break; case ACTOR::HEIGHTFIELD: @@ -118,7 +122,11 @@ PSX::PxRigidStatic* CPhysX_Manager::Add_StaticActor(CRigidBody_Static& RigidBody // 유효성 체크 PX_ASSERT(pPxHeightGeometry->isValid()); pGeometry = pPxHeightGeometry; - m_HeightFieldGeometry.emplace(RigidBody.Get_PxMeshKey(), pPxHeightGeometry); + _bool bEmplaceSuccess = m_HeightFieldGeometry.emplace(RigidBody.Get_PxMeshKey(), pPxHeightGeometry).second; + if (false == bEmplaceSuccess) { + Safe_Delete(pPxHeightGeometry); + pGeometry = (*m_HeightFieldGeometry.find(RigidBody.Get_PxMeshKey())).second; + } } break; default: @@ -163,13 +171,39 @@ _bool CPhysX_Manager::SphereCast(_float fRadius, _float3 vStartPos, _float3 vDir PSX::PxTransform startPose(startPos, startRot); PSX::PxVec3 sweepDir(vDir.x, vDir.y, vDir.z); + sweepDir.normalize(); PSX::PxQueryFilterData filterData(flagQuery); - + return m_pScene->sweep(sphereGeom, startPose, sweepDir, fDistance, hitBuffer, flagHitsData, filterData); } +_bool CPhysX_Manager::SphereCast(_float fRadius, _fvector _vStartPos, _fvector _vDir, _float fDistance, PSX::PxHitFlags flagHitsData, PSX::PxQueryFlags flagQuery, PSX::PxSweepBuffer& hitBuffer) +{ + _float3 vDir = {}; + _float3 vStartPos = {}; + + XMStoreFloat3(&vDir, _vDir); + XMStoreFloat3(&vStartPos, _vStartPos); + + PSX::PxSphereGeometry sphereGeom(fRadius); + + PSX::PxVec3 startPos(vStartPos.x, vStartPos.y, vStartPos.z); + PSX::PxQuat startRot(PSX::PxIdentity); + + PSX::PxTransform startPose(startPos, startRot); + + PSX::PxVec3 sweepDir(vDir.x, vDir.y, vDir.z); + + sweepDir.normalize(); + + PSX::PxQueryFilterData filterData(flagQuery); + _bool bHit = m_pScene->sweep(sphereGeom, startPose, sweepDir, fDistance, hitBuffer, flagHitsData, filterData); + + return bHit; +} + void CPhysX_Manager::RegistTriMesh(const _char* pName, PSX::PxTriangleMesh* pPxTriMesh) { m_TriangleMeshes.emplace(CMyTools::ToWstring(pName), pPxTriMesh); @@ -185,8 +219,6 @@ void CPhysX_Manager::RegistHeight(const _tchar* pName, PSX::PxHeightFieldDesc& D } } -#ifdef EDITOR_PROJECT - HRESULT CPhysX_Manager::ConvertToTriMeshes(vector& Meshes, vector& pxTriMeshes, _fmatrix WorldMatrix) { for (size_t i = 0; i < Meshes.size(); ++i) @@ -204,6 +236,8 @@ HRESULT CPhysX_Manager::ConvertToTriMeshes(vector& Meshes, vector< return S_OK; } +#ifdef EDITOR_PROJECT + HRESULT CPhysX_Manager::SaveTriMeshes(const _char* pPath, vector& TriMeshes) { filesystem::path pathPhysX = pPath; @@ -613,7 +647,7 @@ void CPhysX_Manager::Free() ClearScene(); for (auto& pMeshes : m_TriangleMeshes) { - pMeshes.second->release(); + pMeshes.second->release(); } m_TriangleMeshes.clear(); for (auto& pGeometry : m_TriangleMeshGeometry) { diff --git a/Jusin154_Team3D/Engine/Private/Renderer.cpp b/Jusin154_Team3D/Engine/Private/Renderer.cpp index 70e8b59e1..ff0adf041 100644 --- a/Jusin154_Team3D/Engine/Private/Renderer.cpp +++ b/Jusin154_Team3D/Engine/Private/Renderer.cpp @@ -534,12 +534,16 @@ void CRenderer::Render_Blend() void CRenderer::Render_Bloom() { +#ifdef _DEBUG + GUI::Begin("PostProcessing_Bloom"); GUI::PushItemWidth(80); GUI::DragFloat("g_fThreshold", &m_fThreshold, 0.01f, 0.02f, 100.f, "%.3f"); GUI::SliderInt("g_iEmbossingPass", &m_iBloomEmbossingPass, 0, 2, "%d"); GUI::End(); +#endif // _DEBUG + //{ // BackBuffer // ID3D11Texture2D* pBackBuffer = nullptr; // m_pGameInstance->Get_BackBufferPTR(&pBackBuffer); diff --git a/Jusin154_Team3D/Engine/Private/UIObject.cpp b/Jusin154_Team3D/Engine/Private/UIObject.cpp index c3824772e..a7f122609 100644 --- a/Jusin154_Team3D/Engine/Private/UIObject.cpp +++ b/Jusin154_Team3D/Engine/Private/UIObject.cpp @@ -207,14 +207,20 @@ _bool CUIObject::Chack_Visible() void CUIObject::Set_FadeIn() { - m_bFadeIn = true; - m_bFadeOut = false; + if (!m_bFadeIn && m_fAlpha < 1.f) + { + m_bFadeIn = true; + m_bFadeOut = false; + } } void CUIObject::Set_FadeOut() { - m_bFadeIn = false; - m_bFadeOut = true; + if (!m_bFadeOut && m_fAlpha > 0.f) + { + m_bFadeOut = true; + m_bFadeIn = false; + } } _bool CUIObject::Get_FadeIn() @@ -449,6 +455,16 @@ _int CUIObject::Get_SkillType() return m_iSpellType; } +void CUIObject::Set_SpellType(_int eType) +{ + m_iSkillType = eType; +} + +_int CUIObject::Get_SpellType() +{ + return m_iSkillType; +} + void CUIObject::Set_CoolTime(_float CoolTime) { m_fCoolTime = CoolTime; @@ -467,6 +483,16 @@ void CUIObject::Function_Callback(wstring Name, void* pArg) { } +_bool CUIObject::Get_Hover() +{ + return m_bHover; +} + +const CUIObject::SPELLINFO CUIObject::Get_Info(_int Index) +{ + return SPELLINFO(); +} + void CUIObject::Free() { __super::Free(); diff --git a/Jusin154_Team3D/Engine/Private/VIBuffer_UI_Instance.cpp b/Jusin154_Team3D/Engine/Private/VIBuffer_UI_Instance.cpp index 46981233b..57426e437 100644 --- a/Jusin154_Team3D/Engine/Private/VIBuffer_UI_Instance.cpp +++ b/Jusin154_Team3D/Engine/Private/VIBuffer_UI_Instance.cpp @@ -274,6 +274,9 @@ _int CVIBuffer_UI_Instance::Set_Mouse_Hover(_float2 fMousePos) VTX_INSTANCE_UI* pVertices = static_cast(SubResource.pData); _int hoveredIndex = -1; + for (_uint i = 0; i < m_iNumInstance; i++) + pVertices[i].bHover = 0.f; + for (_uint i = 0; i < m_iNumInstance; i++) { _float2 pos = pVertices[i].fPos; @@ -289,21 +292,42 @@ _int CVIBuffer_UI_Instance::Set_Mouse_Hover(_float2 fMousePos) pt.x = LONG(fMousePos.x); pt.y = LONG(fMousePos.y); - if (PtInRect(&rcInstance, pt)) - { - pVertices[i].bHover = 1.f; - hoveredIndex = i; + if (PtInRect(&rcInstance, pt)) + { + pVertices[i].bHover = 1.f; + hoveredIndex = i; break; - } - else - { - pVertices[i].bHover = 0.f; + } + else + { + pVertices[i].bHover = 0.f; hoveredIndex = -1; - } - } + } + } - m_pContext->Unmap(m_pVBInstance, 0); - return hoveredIndex; + m_pContext->Unmap(m_pVBInstance, 0); + return hoveredIndex; +} + +void CVIBuffer_UI_Instance::Set_Hover_Index(_uint iIndex) +{ + D3D11_MAPPED_SUBRESOURCE SubResource{}; + + m_pContext->Map(m_pVBInstance, 0, D3D11_MAP_WRITE_NO_OVERWRITE, 0, &SubResource); + + VTX_INSTANCE_UI* pVertices = static_cast(SubResource.pData); + + for (_uint i = 0; i < m_iNumInstance; ++i) + { + if (i == iIndex) + { + pVertices[i].bHover = 1.f; + } + else + pVertices[i].bHover = 0.f; + } + + m_pContext->Unmap(m_pVBInstance, 0); } CVIBuffer_UI_Instance* CVIBuffer_UI_Instance::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const INSTANCE_DESC* pInstanceDesc) diff --git a/Jusin154_Team3D/Engine/Public/Engine_Enum.h b/Jusin154_Team3D/Engine/Public/Engine_Enum.h index 49a647995..bc7fb014c 100644 --- a/Jusin154_Team3D/Engine/Public/Engine_Enum.h +++ b/Jusin154_Team3D/Engine/Public/Engine_Enum.h @@ -127,7 +127,6 @@ enum class PXOBJECT : _uint { SKILL_BOMBARD_FLAME, SKILL_INCENDIO_STRIKE, SKILL_INCENDIO_SPREAD, - #pragma endregion #pragma region NEUTRAL_HITBOX NEUTRAL_HITBOX = 300, diff --git a/Jusin154_Team3D/Engine/Public/GameInstance.h b/Jusin154_Team3D/Engine/Public/GameInstance.h index e3cc1d764..13461ae71 100644 --- a/Jusin154_Team3D/Engine/Public/GameInstance.h +++ b/Jusin154_Team3D/Engine/Public/GameInstance.h @@ -200,6 +200,7 @@ class ENGINE_DLL CGameInstance final : public CBase PSX::PxRevoluteJoint* Create_PxRevoluteJoint(PSX::PxRigidActor* pActorFrame, PSX::PxTransform& pxLocalWallFrame, PSX::PxRigidActor* pActorObject, PSX::PxTransform& pxLocalActorFrame); _bool SphereCast(_float fRadius, _float3 vStartPos, _float3 vDir, _float fDistance, PSX::PxHitFlags flagHitsData, PSX::PxQueryFlags flagQuery, PSX::PxSweepBuffer& hitBuffer); + _bool SphereCast(_float fRadius, _fvector vStartPos, _fvector vDir, _float fDistance, PSX::PxHitFlags flagHitsData, PSX::PxQueryFlags flagQuery, PSX::PxSweepBuffer& hitBuffer); PSX::PxController* Add_CapsuleController(PSX::PxCapsuleControllerDesc& Desc); PSX::PxController* Add_BoxController(PSX::PxBoxControllerDesc& Desc); @@ -208,8 +209,8 @@ class ENGINE_DLL CGameInstance final : public CBase void Attach_Actor(PSX::PxActor& Actor); void Detach_Actor(PSX::PxActor& pActor); void Release_Actor(PSX::PxActor& Actor); -#ifdef EDITOR_PROJECT HRESULT ConvertToTriMeshes(vector& Meshes, vector& pxTriMeshes, _fmatrix WorldMatrix = XMMatrixIdentity()); +#ifdef EDITOR_PROJECT HRESULT SaveTriMeshes(const _char* pPath, vector& TriMeshes); #endif // EDITOR_PROJECT HRESULT LoadTriMeshes(const _char* pPath, vector& TriMeshes); // 모델 불러왔던 경로에 그대로 있음 diff --git a/Jusin154_Team3D/Engine/Public/Mesh.h b/Jusin154_Team3D/Engine/Public/Mesh.h index 29084f904..8db9cc479 100644 --- a/Jusin154_Team3D/Engine/Public/Mesh.h +++ b/Jusin154_Team3D/Engine/Public/Mesh.h @@ -28,8 +28,8 @@ class ENGINE_DLL CMesh final : public CVIBuffer HRESULT Ready_VertexBuffer_For_Anim(vector& Bones, const aiMesh* pAIMesh); public: static CMesh* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, MODEL eType, vector& Bones, const aiMesh* pAIMesh, _fmatrix& PreTransformMatrix); - PSX::PxTriangleMesh* ConvertToPxMesh(const PSX::PxCookingParams* pParam, PSX::PxPhysics* pPhysX, _matrix WorldMatrix); #endif // EDITOR_PROJECT + PSX::PxTriangleMesh* ConvertToPxMesh(const PSX::PxCookingParams* pParam, PSX::PxPhysics* pPhysX, _matrix WorldMatrix); public: //인스턴싱 모델 전용 드로우, 바인딩 함수 diff --git a/Jusin154_Team3D/Engine/Public/Model.h b/Jusin154_Team3D/Engine/Public/Model.h index b583cd25d..999de339a 100644 --- a/Jusin154_Team3D/Engine/Public/Model.h +++ b/Jusin154_Team3D/Engine/Public/Model.h @@ -86,10 +86,10 @@ class ENGINE_DLL CModel final : public CComponent void Initialize_BoneMasks(); public: + HRESULT Ready_PhysXMeshes(_fmatrix& PreTransformMatrix); #ifdef EDITOR_PROJECT HRESULT Assimp_Model_Load(const _char* pModelFilePath, MODEL eType, _fmatrix& PreTransformMatrix, _uint iRootBoneIndex); HRESULT Ready_Meshes(MODEL eType, const aiScene* pAIScene, _fmatrix& PreTransformMatrix); - HRESULT Ready_PhysXMeshes(); HRESULT Save_PhysXTriMeshes(const _char* pModelFilePath); HRESULT Ready_Materials(const aiScene* pAIScene, const _char* pModelFilePath); HRESULT Ready_Materials_FromFile(const aiScene* pAIScene, const _char* pModelFilePath); diff --git a/Jusin154_Team3D/Engine/Public/PhysX_Manager.h b/Jusin154_Team3D/Engine/Public/PhysX_Manager.h index 6bb0c6de8..a3cecffa9 100644 --- a/Jusin154_Team3D/Engine/Public/PhysX_Manager.h +++ b/Jusin154_Team3D/Engine/Public/PhysX_Manager.h @@ -30,10 +30,13 @@ class CPhysX_Manager final : public CBase PSX::PxMaterial* Create_Material(const _float3* vMatInfo); _bool SphereCast(_float fRadius, _float3 vStartPos, _float3 vDir, _float fDistance, PSX::PxHitFlags flagHitsData, PSX::PxQueryFlags flagQuery, PSX::PxSweepBuffer& hitBuffer); + _bool SphereCast(_float fRadius, _fvector vStartPos, _fvector vDir, _float fDistance, PSX::PxHitFlags flagHitsData, PSX::PxQueryFlags flagQuery, PSX::PxSweepBuffer& hitBuffer); + + + HRESULT ConvertToTriMeshes(vector& Meshes, vector& pxTriMeshes, _fmatrix WorldMatrix); #ifdef EDITOR_PROJECT - HRESULT ConvertToTriMeshes(vector& Meshes, vector& pxTriMeshes, _fmatrix WorldMatrix); HRESULT SaveTriMeshes(const _char* pPath, vector& TriMeshes); void Add_Editor_Plane(PhsXUserData& PlaneData); #endif // EDITOR_PROJECT diff --git a/Jusin154_Team3D/Engine/Public/UIObject.h b/Jusin154_Team3D/Engine/Public/UIObject.h index 1564d510c..4c73bf661 100644 --- a/Jusin154_Team3D/Engine/Public/UIObject.h +++ b/Jusin154_Team3D/Engine/Public/UIObject.h @@ -17,6 +17,25 @@ typedef struct tagUIObjectDesc _float fSizeX, fSizeY = {}; }UIOBJECT_DESC; +typedef struct tagSpellInfo +{ + _int iSpell_ID{}; + _wstring pSpell_Name; + _wstring pImage_Name; + _int iSpell_Type{}; + _int iSkill_Type{}; + _float fSpell_CoolTime{}; + _float fDuration{}; + _int iAnimNum{}; + _wstring pSpellInfo; + _bool bSpell_Lock = false; + _bool bEquip_Spell = false; +}SPELLINFO; +typedef struct SlotHover +{ + _int iSlotID{}; + _int iHover_Index{}; +}HOVER_INFO; protected: CUIObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); CUIObject(const CUIObject& rhs); @@ -102,12 +121,18 @@ typedef struct tagUIObjectDesc virtual void Set_SkillType(_int eType); virtual _int Get_SkillType(); + virtual void Set_SpellType(_int eType); + virtual _int Get_SpellType(); virtual void Set_CoolTime(_float CoolTime); virtual _float Get_CoolTime(); virtual void Add_Function(wstring Name, function Evnet); virtual void Function_Callback(wstring Name, void* pArg = nullptr); + + virtual _bool Get_Hover(); + + virtual const SPELLINFO Get_Info(_int Index); protected: _vector m_fOrigin_Position_vector{}; _float2 m_fOrigin_Position{}; @@ -152,6 +177,7 @@ typedef struct tagUIObjectDesc RECT m_pRect{}; _int m_iSpellType{}; + _int m_iSkillType{}; _float m_fSortZ{}; _float m_fMoveSpeed{}; diff --git a/Jusin154_Team3D/Engine/Public/VIBuffer_UI_Instance.h b/Jusin154_Team3D/Engine/Public/VIBuffer_UI_Instance.h index 75278c14b..c20a19ae6 100644 --- a/Jusin154_Team3D/Engine/Public/VIBuffer_UI_Instance.h +++ b/Jusin154_Team3D/Engine/Public/VIBuffer_UI_Instance.h @@ -34,6 +34,7 @@ class ENGINE_DLL CVIBuffer_UI_Instance final : public CVIBuffer_Instance void Set_ImageUV(UI_ATLAS_DESC* AtlasUV); void Set_Index_Renge_Color(_uint StartIndex, _uint EndIndex, _float4 vColor); _int Set_Mouse_Hover(_float2 fMousePos); + void Set_Hover_Index(_uint iIndex); private: VTX_INSTANCE_UI* m_pInstanceVertices = { nullptr };