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/Broom_States.cpp b/Jusin154_Team3D/Client/Default/Broom_States.cpp index 623eb8295..315aad225 100644 --- a/Jusin154_Team3D/Client/Default/Broom_States.cpp +++ b/Jusin154_Team3D/Client/Default/Broom_States.cpp @@ -85,8 +85,7 @@ void CBroom::Behavior_IdleEnter() { pair<_uint, _bool> pairAnimInfo; pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE_B]; - - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); } HRESULT CBroom::Behavior_IdleExitCheck(_float fTimeDelta) @@ -96,7 +95,7 @@ HRESULT CBroom::Behavior_IdleExitCheck(_float fTimeDelta) if (SUCCEEDED(InputAction())) { if (m_pGameInstance->Key_Down(DIK_B)) { pairAnimInfo = m_Animation[STATEANIM::BROOM_MOUNT_B]; - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); m_pFSM->Enable_State(FSMSTATE::MOUNT_B); } } @@ -115,7 +114,7 @@ HRESULT CBroom::Behavior_IdleExitCheck(_float fTimeDelta) if (m_pModelCom->IsFinishedAnim()) { pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE_B]; - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); } } @@ -164,7 +163,7 @@ void CBroom::Behavior_MoveEnter() pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B]; } - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 0.5f, true); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); } } } @@ -189,7 +188,6 @@ HRESULT CBroom::Behavior_MoveExitCheck(_float fTimeDelta) if (m_bHoverToggle) { - m_pModelCom->Set_BlendDuration(0.3f); if (bFwd) { pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE_B]; @@ -222,14 +220,13 @@ HRESULT CBroom::Behavior_MoveExitCheck(_float fTimeDelta) } else { pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_STOP_B]; - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); } - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, true); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); } else { - m_pModelCom->Set_BlendDuration(0.6f); if (bFwd) { m_fTargetSpeed = m_fFlyMaxSpeed; @@ -274,7 +271,8 @@ HRESULT CBroom::Behavior_MoveExitCheck(_float fTimeDelta) } m_pTransformCom->Go_LerpStraight(m_fSpeed, fTimeDelta); - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, true); + + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); } if (m_bHoverToggle && !SUCCEEDED(InputMove()) && !SUCCEEDED(InputAction())) @@ -286,11 +284,10 @@ HRESULT CBroom::Behavior_MoveExitCheck(_float fTimeDelta) m_pTransformCom->Go_LerpStraight(m_fSpeed, fTimeDelta); pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_STOP_B]; - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); if (m_pModelCom->IsFinishedAnim() && iCurrentAnimIndex == m_Animation[STATEANIM::BROOM_HOVER_STOP_B].first) { m_pFSM->Change_State(FSMSTATE::IDLE); - m_pModelCom->Set_BlendDuration(0.3f); return E_FAIL; } return S_OK; diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj index 2160d16e0..a78960a14 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj @@ -110,7 +110,7 @@ Level3 true - _DEBUG;_WINDOWS;%(PreprocessorDefinitions);%(PreprocessorDefinitions) + $(USERNAME);_DEBUG;_WINDOWS;%(PreprocessorDefinitions);%(PreprocessorDefinitions) true stdcpp17 ../Public/;../../EngineSDK/Inc/;../../EngineSDK/Inc/DirectXTK/;../../EngineSDK/Inc/fMod/;../../EngineSDK/Inc/IMGUI/;../../EngineSDK/Inc/FX11/;%(AdditionalIncludeDirectories) @@ -137,7 +137,7 @@ call Update_Resources.bat true true true - NDEBUG;_WINDOWS;%(PreprocessorDefinitions);%(PreprocessorDefinitions) + $(USERNAME);NDEBUG;_WINDOWS;%(PreprocessorDefinitions);%(PreprocessorDefinitions) true stdcpp17 ../Public/;../../EngineSDK/Inc/;../../EngineSDK/Inc/DirectXTK/;../../EngineSDK/Inc/fMod/;../../EngineSDK/Inc/IMGUI/;../../EngineSDK/Inc/FX11/;%(AdditionalIncludeDirectories) @@ -160,13 +160,23 @@ call Update_Resources.bat + + + + + + + + + + @@ -229,22 +239,39 @@ call Update_Resources.bat + + + + + + + + + + + + + + + + + @@ -253,13 +280,23 @@ call Update_Resources.bat + + + + + + + + + + @@ -324,23 +361,40 @@ call Update_Resources.bat + + + + + + + + + + + + + + + + + diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters index 71c636150..ce38873e2 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,11 +274,65 @@ 02.GameObjects\Item\Troll_Weapon - - 02.GameObjects\Environment\03.MapElement + + 02.GameObjects\Effect\Effects\Levioso\LeviosoSide - - 02.GameObjects\Environment\03.MapElement\Light + + 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 @@ -280,6 +340,21 @@ 02.GameObjects\Environment\03.MapElement\Light + + 02.GameObjects\UI\UI_Manager + + + 04.Mechanic\State\Hit + + + 04.Mechanic\State\Troll_Combat + + + 04.Mechanic\State\State_Combat\State_Throw + + + 02.GameObjects\Item\Troll_Rock + @@ -581,9 +656,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} @@ -596,18 +677,90 @@ {71f6a568-488d-4ec1-be79-8fcce6677e27} - - {f3f219aa-034f-4aa2-9f2e-d75d15bd1f4a} - - - {71f6a568-488d-4ec1-be79-8fcce6677e27} - {a1b1f17d-ed4f-4b20-aa8e-c52e693683d4} {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} + + + {9cc8fea6-837e-4f68-b116-134c9dc68a26} + + + {5a7e32b1-6fa9-44e2-8d6e-b117c3454d5b} + + + {46e41554-f9a0-41c5-992c-f736ef1a333f} + + + {039f471d-9623-4026-9493-5bb52c6a8cd3} + + + {837ff377-2bcd-4a54-baf2-18b1be9d90a0} + @@ -787,9 +940,6 @@ 02.GameObjects\UI\GamePlay_Canvas\Loding_Panel\LoadingWidget - - 02.GameObjects\UI - 02.GameObjects\UI\GamePlay_Canvas\Action_Panel @@ -857,7 +1007,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 @@ -868,12 +1027,6 @@ 02.GameObjects\Environment\03.MapElement\Light - - 02.GameObjects\Environment\03.MapElement - - - 02.GameObjects\Environment\03.MapElement\Light - 02.GameObjects\Monster\Troll @@ -883,6 +1036,81 @@ 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\UI\UI_Manager + + + 04.Mechanic\State\Hit + + + 04.Mechanic\State\Troll_Combat + + + 04.Mechanic\State\State_Combat\State_Throw + + + 02.GameObjects\Item\Troll_Rock + 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/Broom.cpp b/Jusin154_Team3D/Client/Private/Broom.cpp index 9e2ae2bdd..9a228ff4e 100644 --- a/Jusin154_Team3D/Client/Private/Broom.cpp +++ b/Jusin154_Team3D/Client/Private/Broom.cpp @@ -43,7 +43,6 @@ HRESULT CBroom::Initialize(void* pArg) m_pFSM->Change_State(FSMSTATE::IDLE); } - m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(0.f, 10.f, 0.f, 1.f)); return S_OK; @@ -205,6 +204,9 @@ void CBroom::Describe_Entity() string AnimList = m_pModelCom->Get_AnimList(m_pModelCom->Get_AnimIndex()); GUI::Text(AnimList.c_str()); + GUI::Text("AnimTrack %.2f", m_pModelCom->Get_CurrentTrackPosition()); + GUI::Text("AnimRatio %.2f", m_pModelCom->Get_CurrentTrackProgressRatio()); + } #endif // _DEBUG 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..e084a8135 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Current_Slot_Number.cpp @@ -0,0 +1,281 @@ +#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); + m_bActive = true; + 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..ed1b5f8a7 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Current_Spell_Slot.cpp @@ -0,0 +1,255 @@ +#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); + m_bActive = true; + 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..c07574d2f --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Eessential_Spell.cpp @@ -0,0 +1,287 @@ + +#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); + m_bActive = true; + 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..97ed2abec --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Eessential_Spell_Slot.cpp @@ -0,0 +1,301 @@ +#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; + m_bActive = true; + 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/InfoInstance.cpp b/Jusin154_Team3D/Client/Private/InfoInstance.cpp index b56166cc9..59911012c 100644 --- a/Jusin154_Team3D/Client/Private/InfoInstance.cpp +++ b/Jusin154_Team3D/Client/Private/InfoInstance.cpp @@ -4,6 +4,7 @@ #include "MapInfo.h" #include "MonsterInfo.h" #include "PlayerInfo.h" +#include "Skill_Data.h" IMPLEMENT_SINGLETON(CInfoInstance) @@ -17,6 +18,7 @@ void CInfoInstance::Update(_float fTimeDelta) m_pPlayerInfo->Update(fTimeDelta); m_pMonsterInfo->Update(fTimeDelta); m_pMapInfo->Update(fTimeDelta); + m_pSkillInfo->Update(fTimeDelta); } void CInfoInstance::Change_Level() @@ -24,6 +26,7 @@ void CInfoInstance::Change_Level() m_pPlayerInfo->Change_Level(); m_pMonsterInfo->Change_Level(); m_pMapInfo->Change_Level(); + m_pSkillInfo->Change_Level(); } void CInfoInstance::Update_CameraCoordinateSystem(_float3& vLook, _float3& vRight) @@ -86,6 +89,21 @@ HRESULT CInfoInstance::Load_LightElements(const _char* pFilePath) return m_pMapInfo->Load_LightElements(pFilePath); } #pragma endregion + +#pragma region SPELL_INFO +HRESULT CInfoInstance::Load_SpellInfo(const _char* pFilePath) +{ + return m_pSkillInfo->Load_SpellInfo(pFilePath); +} +SPELL_INFO CInfoInstance::Get_Spell_Info(_int Spell_Info) +{ + return m_pSkillInfo->Get_Info(Spell_Info); +} +void CInfoInstance::Change_Canvas() +{ + +} +#pragma endregion LEVEL CInfoInstance::Get_RestartLevel() { return LEVEL::GAMEPLAY; @@ -112,6 +130,10 @@ HRESULT CInfoInstance::Initialize_Information(ID3D11Device* pDevice, ID3D11Devic if (nullptr == m_pMonsterInfo) { return E_FAIL; } + m_pSkillInfo = CSkill_Data::Create(pDevice, pContext); + if (nullptr == m_pSkillInfo) { + return E_FAIL; + } return S_OK; @@ -125,6 +147,7 @@ void CInfoInstance::Release_Information() SAFE_RELEASE(m_pMapInfo); SAFE_RELEASE(m_pPlayerInfo); SAFE_RELEASE(m_pMonsterInfo); + SAFE_RELEASE(m_pSkillInfo); SAFE_RELEASE(m_pDevice); SAFE_RELEASE(m_pContext); SAFE_RELEASE(m_pGameInstance); diff --git a/Jusin154_Team3D/Client/Private/Level_Field.cpp b/Jusin154_Team3D/Client/Private/Level_Field.cpp index 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..2d901e6b1 100644 --- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp +++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp @@ -5,7 +5,7 @@ #include "Light_Main.h" #include "Camera_Debug.h" #include "InfoInstance.h" -#include "GamePlay_Canvas.h" +#include "UI_Manager.h" #include "Layer.h" #include "SkyBox.h" #include "Broom.h" @@ -51,10 +51,11 @@ HRESULT CLevel_GamePlay::Initialize(void* pArg) if (FAILED(Ready_Layer_Item(LAYER_ITEM))) { return E_FAIL; } - if (FAILED(Ready_Layer_Player(LAYER_PLAYER))) { + + if (FAILED(Ready_Layer_SkyBox(TEXT("Layer_SkyBox")))) { return E_FAIL; } - if (FAILED(Ready_Layer_SkyBox(TEXT("Layer_SkyBox")))) { + if (FAILED(Ready_Layer_Player(LAYER_PLAYER))) { return E_FAIL; } if (FAILED(Ready_Layer_Monster())) { @@ -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"); @@ -149,7 +190,7 @@ HRESULT CLevel_GamePlay::Ready_Background() HRESULT CLevel_GamePlay::Ready_Layer_UI(const _wstring& strLayerTag) { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI))) { + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI))) { return E_FAIL; } @@ -236,15 +277,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_Loading.cpp b/Jusin154_Team3D/Client/Private/Level_Loading.cpp index f68a13049..8c55a61aa 100644 --- a/Jusin154_Team3D/Client/Private/Level_Loading.cpp +++ b/Jusin154_Team3D/Client/Private/Level_Loading.cpp @@ -20,6 +20,9 @@ HRESULT CLevel_Loading::Initialize(LEVEL eNextLevelID) m_eNextLevelID = eNextLevelID; m_pLoader = CLoader::Create(m_pDevice, m_pContext, eNextLevelID); + m_ShadowDesc.vAt = _float4(-10.f, -10.f, 10.f, 1.f); + m_ShadowDesc.fWidth = 300.f; + m_ShadowDesc.fHeight = 300.f; if (nullptr == m_pLoader) { return E_FAIL; } @@ -37,7 +40,6 @@ void CLevel_Loading::Update(_float fTimeDelta) ) { pair> pairLevel = { nullptr, nullptr }; - SHADOW_LIGHT_DESC ShadowDesc{}; switch (m_eNextLevelID) { @@ -47,6 +49,9 @@ void CLevel_Loading::Update(_float fTimeDelta) } break; case LEVEL::GAMEPLAY: { + m_ShadowDesc.vAt = _float4(-194, 18.5f, -153.f, 1.f); + m_ShadowDesc.fHeight = 1000.f; + m_ShadowDesc.fWidth = 1000.f; pairLevel = CLevel_GamePlay::Create(m_pDevice, m_pContext, m_eNextLevelID, nullptr); } break; case LEVEL::FIELD: @@ -62,7 +67,7 @@ void CLevel_Loading::Update(_float fTimeDelta) assert(false); // E_IMPL break; } - + Capture_TerrainPreShadow(m_ShadowDesc); if (SUCCEEDED(m_pGameInstance->Change_Level(pairLevel.first))) { if (nullptr != pairLevel.second) { @@ -83,6 +88,34 @@ HRESULT CLevel_Loading::Render() return S_OK; } +void CLevel_Loading::Capture_TerrainPreShadow(SHADOW_LIGHT_DESC& ShadowDesc) +{ + CLayer* pLayer = m_pGameInstance->Get_Layer(NEXT_LEVEL, LAYER_BACKGROUND); + if (nullptr != pLayer) { + ShadowDesc.fFar = 1000.f; + ShadowDesc.fNear = 0.1f; + _float3 vRollPichYaw = { 35.2643897f, 45.f, 0.f }; // (1, -1, 1) 방향 look + + _matrix matRotation = XMMatrixRotationRollPitchYaw( + XMConvertToRadians(vRollPichYaw.x), XMConvertToRadians(vRollPichYaw.y), XMConvertToRadians(vRollPichYaw.z)); + + XMStoreFloat4(&ShadowDesc.vEye, XMLoadFloat4(&ShadowDesc.vAt) - matRotation.r[2] * (ShadowDesc.fFar * 0.25f)); + + if (FAILED(m_pGameInstance->Ready_Shadow_Light(ShadowDesc))) { + assert(false); + } + + const list* pObjects = pLayer->Get_Objects(); + _float4 vPos = {}; + for (auto& pObject : *pObjects) { + if (FAILED(m_pGameInstance->Add_RenderGroup(RENDER::PRESHADOW, pObject))) { + assert(false); + } + } + m_pGameInstance->Render_PreShadow(); + } +} + HRESULT CLevel_Loading::Ready_Layer_BackGround(const _wstring& strLayerTag) { 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..f6c6aebff --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Levioso.cpp @@ -0,0 +1,256 @@ +#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() +{ +} + +#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/Light_Main.cpp b/Jusin154_Team3D/Client/Private/Light_Main.cpp index 6e702e463..0eef743b6 100644 --- a/Jusin154_Team3D/Client/Private/Light_Main.cpp +++ b/Jusin154_Team3D/Client/Private/Light_Main.cpp @@ -38,7 +38,9 @@ void CLight_Main::Priority_Update(_float fTimeDelta) void CLight_Main::Update(_float fTimeDelta) { - + GUI::Begin("Main_Light"); + m_pLightCom->Describe_Entity(); + GUI::End(); } void CLight_Main::Late_Update(_float fTimeDelta) @@ -57,9 +59,9 @@ HRESULT CLight_Main::Ready_Components() LIGHT_DESC LightDesc{}; LightDesc.eType = LIGHT::DIRECTIONAL; - /*LightDesc.vDiffuse = _float4(0.8f, 0.8f, 0.8f, 0.f); - LightDesc.vAmbient = _float4(0.6f, 0.6f, 0.6f, 0.f); - LightDesc.vSpecular = _float4(0.f, 0.f, 0.f, 0.f);*/ + //LightDesc.vDiffuse = _float4(0.8f, 0.8f, 0.8f, 0.f); + //LightDesc.vAmbient = _float4(0.6f, 0.6f, 0.6f, 0.f); + //LightDesc.vSpecular = _float4(0.f, 0.f, 0.f, 0.f); LightDesc.vDiffuse = _float4(0.3f, 0.3f, 0.1f, 0.f); LightDesc.vAmbient = _float4(0.3f, 0.3f, 0.5f, 0.f); LightDesc.vSpecular = _float4(0.f, 0.f, 0.f, 0.f); diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index f86ccbcca..6209a12ee 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -1,21 +1,22 @@ #include "pch.h" -#include "Loader.h" -#include "GameInstance.h" -#include "MainApp.h" -#include "Light_Main.h" #include "Camera_Debug.h" #include "Client_Struct.h" +#include "GameInstance.h" +#include "Light_Main.h" +#include "Loader.h" +#include "MainApp.h" #include "Model.h" +#include "Broom.h" #include "Camera_Gaze.h" +#include "CamPosition_Arm.h" +#include "CamPosition_Shoulder.h" #include "CamPosition_Socket.h" #include "CamPosition_Target.h" -#include "CamPosition_Shoulder.h" -#include "CamPosition_Arm.h" -#include "Wand.h" #include "SkyBox.h" -#include "Broom.h" #include "Troll_Weapon.h" +#include "Troll_Rock.h" +#include "Wand.h" #pragma region ACTOR @@ -28,6 +29,8 @@ #pragma region UI +#include "UI_Manager.h" + #include "GamePlay_Canvas.h" #include "Loading_Panel.h" #include "LoadingWidget.h" @@ -50,6 +53,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 +88,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 +519,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 +657,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 +927,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 +1006,8 @@ HRESULT CLoader::Loading_For_GamePlay() }); +#pragma endregion + m_strMessage = TEXT("셰이더를(을) 로딩 중 입니다."); if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_UIEDITOR, @@ -787,11 +1069,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 +1128,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{}; @@ -862,6 +1207,11 @@ HRESULT CLoader::Loading_For_GamePlay() CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Troll_Weapon/Troll_Weapon.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) return E_FAIL; + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Troll_Rock_Big_Model"), + CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Object/Troll_Rock/Troll_Rock_Big.bin", XMMatrixScaling(0.00004f, 0.00004f, 0.00004f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) + return E_FAIL; + + /* For.Prototype_Component_SkyboxModel */ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_SkyboxModel"), @@ -902,6 +1252,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,9 +1313,334 @@ 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("객체원형를(을) 로딩 중 입니다."); + /* For.Prototype_GameObject_UI_Manager*/ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CUI_Manager::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } + /* For.Prototype_GameObject_GamePlay_Canvas*/ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CGamePlay_Canvas::Create(m_pDevice, m_pContext)))) { return E_FAIL; @@ -1028,6 +1727,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; @@ -1161,6 +1925,10 @@ HRESULT CLoader::Loading_For_GamePlay() if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CTroll_Weapon::Create(m_pDevice, m_pContext)))) return E_FAIL; + /* For.Prototype_GameObject_Troll_Rock */ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CTroll_Rock::Create(m_pDevice, m_pContext)))) + return E_FAIL; + /* For.Prototype_GameObject_Broom */ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CBroom::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..470c89dbb 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 @@ -351,8 +387,9 @@ HRESULT CMapInfo::Load_LightElements(const _char* pFileName) if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Element_Light"), &Desc))) return E_FAIL; } - +#ifndef 기무리 MSG_BOX("Successed to Load File"); +#endif return S_OK; @@ -397,3 +434,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/MapObject_Render.cpp b/Jusin154_Team3D/Client/Private/MapObject_Render.cpp index 3fc764603..7155be0e6 100644 --- a/Jusin154_Team3D/Client/Private/MapObject_Render.cpp +++ b/Jusin154_Team3D/Client/Private/MapObject_Render.cpp @@ -75,6 +75,7 @@ void CMapObject_Render::Update(_float fTimeDelta) void CMapObject_Render::Late_Update(_float fTimeDelta) { + m_pGameInstance->Add_RenderGroup(RENDER::SHADOW, this); if (m_pGameInstance->isIn_WorldFrustum(XMLoadFloat4(&m_vExtentPosition), m_fRadius)) { m_fCamDepth = XMVectorGetX(XMVector3LengthSq(XMLoadFloat4(m_pGameInstance->Get_CamPosition()) - XMLoadFloat4(&m_vExtentPosition))); @@ -126,6 +127,39 @@ HRESULT CMapObject_Render::Render() return S_OK; } +HRESULT CMapObject_Render::Render_Shadow() +{ + if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", &m_CombinedWorldMatrix))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Bind_Shadow_Resource(m_pShaderCom, "g_ViewMatrix", D3DTS::VIEW))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Bind_Shadow_Resource(m_pShaderCom, "g_ProjMatrix", D3DTS::PROJ))) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", &m_pGameInstance->Get_ShadowDesc()->fFar, sizeof(_float)))) { + return E_FAIL; + } + + for (_uint i = 0; i < m_iNumMeshe; i++) + { + if (FAILED(m_pModelComs[0]->Bind_Material(i, m_pShaderCom))) { + return E_FAIL; + } + + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::SHADOW)))) { + return E_FAIL; + } + + if (FAILED(m_pModelComs[m_iLodIndex]->Render(i))) { + return E_FAIL; + } + } + + return S_OK; +} + _wstring CMapObject_Render::Get_PrototypeTag(_uint iLodIndex) { if (m_iMaxLodLevel < iLodIndex) diff --git a/Jusin154_Team3D/Client/Private/NomalJap.cpp b/Jusin154_Team3D/Client/Private/NomalJap.cpp index 7b60c48a9..6a421358d 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,59 @@ 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; + } + if (nullptr != m_pTargetUnit && false == m_pTargetUnit->isDead()) { + _vector vStartPos = m_pProjectile->Get_WorldPostion(); + + _vector vEndPos = m_pTargetUnit->Get_WorldPostion(); + + _vector vDir = { vEndPos - vStartPos }; + + _float fDistance = XMVectorGetX(XMVector3Length(vEndPos - vStartPos)); + + PSX::PxSweepBuffer pxBuffer = {}; + + _bool bHit = m_pGameInstance->SphereCast(0.1f, vStartPos, vDir, fDistance, PSX::PxHitFlag::ePOSITION | PSX::PxHitFlag::eNORMAL, PSX::PxQueryFlag::eDYNAMIC, pxBuffer); + + if (bHit) { + const PSX::PxSweepHit& hit = pxBuffer.block; + PSX::PxRigidActor* pActor = hit.actor; + PSX::PxShape* pShape = hit.shape; + + if (nullptr != pActor && nullptr != pActor->userData) + { + PhsXUserData* pUserData = static_cast(pActor->userData); + + switch (pUserData->eKind) + { + case PHYSX_KIND::CCTActor: + { + switch (PXOBJECT(pUserData->iSubKind)) + { + case PXOBJECT::MONSTER: + case PXOBJECT::GOBLIN_WARRIOR: + break; + case PXOBJECT::TROLL: + { + ON_COLLISION_INFO Desc; + pUserData->pOwner->OnCollision(); + } + break; + } + } + } + } + } + + } + Get_PartObject()->Trail_Update(m_pProjectile->Get_Component()->Get_XMWorldMatrix(), fTimeDelta); @@ -182,6 +221,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 +265,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 +313,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/PhysXEffectHitBox.cpp b/Jusin154_Team3D/Client/Private/PhysXEffectHitBox.cpp index 3f369f7a2..cc5fe0254 100644 --- a/Jusin154_Team3D/Client/Private/PhysXEffectHitBox.cpp +++ b/Jusin154_Team3D/Client/Private/PhysXEffectHitBox.cpp @@ -117,7 +117,7 @@ HRESULT CPhysXEffectHitBox::Ready_Components(void* pArg) return E_FAIL; } - m_pCharacter_Controller->SetGravity(pDesc->bGravity); + m_pCharacter_Controller->SetGravity(false); } m_pCharacter_Controller->Set_Position(m_pTransformCom->Get_State(STATE::POSITION)); /* Com_Shader */ diff --git a/Jusin154_Team3D/Client/Private/Player.cpp b/Jusin154_Team3D/Client/Private/Player.cpp index 68f69638e..1168bc7c3 100644 --- a/Jusin154_Team3D/Client/Private/Player.cpp +++ b/Jusin154_Team3D/Client/Private/Player.cpp @@ -21,6 +21,7 @@ #include "State_Land.h" #include "State_Move.h" #include "State_Combat.h" +#include "State_Hit.h" #include "State_Broom_Ride.h" #pragma endregion @@ -392,50 +393,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; -} - -void CPlayer::Play_Event() -{ - for (auto iter = m_PendingEvents.begin(); iter != m_PendingEvents.end(); ) - { - _float ratio = m_pModelCom->Get_CurrentTrackProgressRatio(); - _uint curAnim = m_pModelCom->Get_AnimIndex(); - - if (curAnim == iter->AnimIndex && ratio >= iter->fRatio) - { - iter->Callback(); - iter = m_PendingEvents.erase(iter); - } - else - { - ++iter; - } - } -} - -void CPlayer::Add_Event(_uint AnimIndex, function Callback, _float fRatio) -{ - PendingEvent Desc; - Desc.AnimIndex = AnimIndex; - Desc.fRatio = fRatio; - Desc.Callback = Callback; - m_PendingEvents.push_back(Desc); + return pWand->Get_WorldMatrix(); } CPlayer* CPlayer::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) @@ -536,6 +499,8 @@ void CPlayer::Describe_Entity() GUI::Text("%d", m_iStateMask); m_pLightCom->Describe_Entity(); + + GUI::Text("HI Check %d",HI); GUI::End(); } diff --git a/Jusin154_Team3D/Client/Private/Player_States.cpp b/Jusin154_Team3D/Client/Private/Player_States.cpp index 2b9aa349e..9984c6a3b 100644 --- a/Jusin154_Team3D/Client/Private/Player_States.cpp +++ b/Jusin154_Team3D/Client/Private/Player_States.cpp @@ -1,6 +1,8 @@ #include "pch.h" #include "Player.h" +#include "InfoInstance.h" + #include "GameInstance.h" #include "CamPosition_Socket.h" #include "Camera_Gaze.h" @@ -19,6 +21,7 @@ #include "State_Land.h" #include "State_Move.h" #include "State_Combat.h" +#include "State_Hit.h" #include "State_Broom_Ride.h" #pragma endregion @@ -56,6 +59,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()); } } @@ -74,6 +79,7 @@ HRESULT CPlayer::InputAction() || m_pGameInstance->Key_Down(DIK_Z) || m_pGameInstance->Key_Down(DIK_G) || m_pGameInstance->Key_Down(DIK_B) + || m_pGameInstance->Key_Down(DIK_T) ) { return S_OK; @@ -188,6 +194,9 @@ HRESULT CPlayer::Behavior_IdleExitCheck(_float fTimeDelta) else if (m_pGameInstance->Key_Down(DIK_B)) { m_pFSM->Change_State(FSMSTATE::BROOM_RIDE); } + else if (m_pGameInstance->Key_Down(DIK_T)) { + m_pInfoInstance->Change_Canvas(); + } return E_FAIL; } @@ -453,8 +462,8 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta) _float angle = CMyTools::Get_Direction2D(vCurLook, fCamLook); _float degree = XMConvertToDegrees(angle); - _bool bSkipAngleCheck = { false }; + if (m_pFSM->IsEnable(FSMSTATE::JOG | FSMSTATE::WALK)) { if (iCurrentAnimIndex != m_Animation[STATEANIM::JOG_FWD].first && iCurrentAnimIndex != m_Animation[STATEANIM::WALK_FWD].first) { @@ -718,7 +727,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 +738,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 +834,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 +965,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 +982,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; } @@ -976,14 +1041,19 @@ void CPlayer::Behavior_HitEnter() { m_pFSM->Enable_State(FSMSTATE::HIT); pair<_uint, _bool> pairAnimInfo; - std::random_device rd; - std::mt19937 mt(rd()); - std::uniform_int_distribution Index(0, 1); - auto RandIndex = Index(mt); - if (RandIndex == 0) + _int RandIndex = m_pGameInstance->Real_Random_Int(0, 1); + switch (RandIndex) + { + case 0: pairAnimInfo = m_Animation[STATEANIM::HIT_R]; - else + break; + case 1: pairAnimInfo = m_Animation[STATEANIM::HIT_L]; + break; + default: + break; + } + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); } @@ -1133,8 +1203,6 @@ void CPlayer::Player_InterpTurn(_float fTimeDelta) _float degree = XMConvertToDegrees(angle); - GUI::Text("Degree: %.3f", degree); - _vector xmvInput = XMVectorZero(); if (m_pGameInstance->Key_Pressing(DIK_W)) @@ -1268,6 +1336,20 @@ void CPlayer::Add_FSM() #pragma endregion +#pragma region Behavior_Hit + { + CState_Hit::STATE_HIT_DESC Desc{}; + Desc.pOwner = this; + Desc.funcEnterEvent = [this]() { Behavior_HitEnter(); }; + Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_HitExitCheck(); }; + Desc.funcExitEvent = [this]() { Behavior_HitExit(); }; + Desc.funcPriorityUpdate = nullptr; + Desc.funcLateUpdate = nullptr; + m_States.emplace(FSMSTATE::HIT, CState_Hit::Create(&Desc)); + } + +#pragma endregion + #pragma region Behavior_Broom_Ride { @@ -1295,7 +1377,7 @@ void CPlayer::Add_FSM() _matrix BoneNoScale = XMMatrixRotationQuaternion(Rot) * XMMatrixTranslationFromVector(Trans); - m_OffsetPos = { 0.f, 1.09f, 0.f }; + m_OffsetPos = { 0.f, 1.22f, 0.f }; GUI::DragFloat3("BroomOffset", (_float*)&m_OffsetPos, 0.01f); _matrix Offset = XMMatrixTranslation(m_OffsetPos.x, @@ -1312,14 +1394,13 @@ void CPlayer::Add_FSM() XMMatrixDecompose(&SourS, &SourR, &SourT, FinalWorld); XMMatrixDecompose(&DestS, &DestR, &DestT, m_pTransformCom->Get_XMWorldMatrix()); - _vector finalS = XMVectorLerp(SourS, DestS,fTimeDelta*0.7f); - _vector finalR = XMQuaternionSlerp(SourR,DestR, fTimeDelta * 0.7f); - _vector finalT = XMVectorLerp(SourT,DestT, fTimeDelta * 0.7f); + _vector finalR = XMQuaternionSlerp(SourR,DestR, fTimeDelta * 10.f); + _vector finalT = XMVectorLerp(SourT,DestT, fTimeDelta * 10.f); - _matrix finalMat = XMMatrixAffineTransformation(finalS, XMVectorZero(), finalR, finalT); + _matrix finalMat = XMMatrixAffineTransformation(DestS, XMVectorZero(), finalR, finalT); m_pTransformCom->Set_WorldMatrix(finalMat); - m_pCharacter_Controller->Set_Position(FinalWorld.r[3]); + m_pCharacter_Controller->Set_Position(finalMat.r[3]); }; Desc.funcLateUpdate = nullptr; 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..885b8b7bf 100644 --- a/Jusin154_Team3D/Client/Private/Skill_Data.cpp +++ b/Jusin154_Team3D/Client/Private/Skill_Data.cpp @@ -1 +1,94 @@ #include "pch.h" +#include "Skill_Data.h" +#include "GameObject.h" +#include "UIObject.h" +#include "tinyxml2.h" + +; + +CSkill_Data::CSkill_Data() +{ +} + +HRESULT CSkill_Data::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex) +{ + + + return S_OK; +} + +const SPELL_INFO& CSkill_Data::Get_Info(_uint SpellID) const +{ + return SpellInfo[SpellID]; +} + +void CSkill_Data::Update(_float fTimeDelta) +{ +} + +void CSkill_Data::Change_Level() +{ +} + +HRESULT CSkill_Data::Load_SpellInfo(const _char* pFilePath) +{ + tinyxml2::XMLDocument doc; + tinyxml2::XMLError Error = doc.LoadFile(pFilePath); + 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; + } + + SpellInfo[id].iSpell_ID = id; + SpellInfo[id].pSpell_Name = CMyTools::ToWstring(pSpell->Attribute("Spell_Name")); + SpellInfo[id].pImage_Name = CMyTools::ToWstring(pSpell->Attribute("Image_Name")); + pSpell->QueryIntAttribute("Spell_Type", &SpellInfo[id].iSpell_Type); + pSpell->QueryIntAttribute("Skill_Type", &SpellInfo[id].iSkill_Type); + pSpell->QueryFloatAttribute("Spell_Cooltime", &SpellInfo[id].fSpell_CoolTime); + pSpell->QueryFloatAttribute("Duration", &SpellInfo[id].fDuration); + pSpell->QueryIntAttribute("AnimNum", &SpellInfo[id].iAnimNum); + SpellInfo[id].pSpellInfo = CMyTools::ToWstring(pSpell->Attribute("SpellInfo")); + int lock = 0, equip = 0; + pSpell->QueryIntAttribute("Spell_Lock", &lock); + pSpell->QueryIntAttribute("Equip_Spell", &equip); + SpellInfo[id].bSpell_Lock = lock != 0; + SpellInfo[id].bEquip_Spell = equip != 0; + + pSpell = pSpell->NextSiblingElement("Spell"); + } + + return S_OK; +} + +CSkill_Data* CSkill_Data::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CSkill_Data* pInstance = new CSkill_Data(); + + if (FAILED(pInstance->Initialize(pDevice, pContext))) + { + MSG_BOX("Failed to Created : CSkill_Data"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CSkill_Data::Free() +{ + __super::Free(); +} + diff --git a/Jusin154_Team3D/Client/Private/Spell_Anim.cpp b/Jusin154_Team3D/Client/Private/Spell_Anim.cpp new file mode 100644 index 000000000..ae831bcc0 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Spell_Anim.cpp @@ -0,0 +1,282 @@ +#include "pch.h" +#include "Spell_Anim.h" +#include "GameInstance.h" +#include "InfoInstance.h" + +CSpell_Anim::CSpell_Anim(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CSpell_Anim::CSpell_Anim(const CSpell_Anim& rhs) + :CElementObject(rhs), + m_pInfoInstance(CInfoInstance::GetInstance()) + +{ +} + +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(); }); + m_bActive = true; + 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 = m_pInfoInstance->Get_Spell_Info(SpellID).pImage_Name; + m_iTotalFrames = m_pInfoInstance->Get_Spell_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..5625e7645 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Spell_Header.cpp @@ -0,0 +1,240 @@ +#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(); }); + m_bActive = true; + 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..fc5d96073 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Spell_Header_Line.cpp @@ -0,0 +1,226 @@ +#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(); }); + m_bActive = true; + 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..3e018dd98 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Spell_Hover.cpp @@ -0,0 +1,303 @@ +#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)); }); + m_bActive = true; + 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..ab130ff64 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Spell_Hover_Effect.cpp @@ -0,0 +1,267 @@ +#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)); }); + m_bActive = true; + 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..7353cba51 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Spell_List.cpp @@ -0,0 +1,305 @@ +#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(); + m_bActive = true; + 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..26d8fa5a0 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Spell_List_Image.cpp @@ -0,0 +1,289 @@ +#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); + m_bActive = true; + 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..242fe64c9 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Spell_Panel.cpp @@ -0,0 +1,354 @@ +#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_Anim.h" +#include "InfoInstance.h" + +CSpell_Panel::CSpell_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CPanelObject(pDevice, pContext) +{ +} + +CSpell_Panel::CSpell_Panel(const CSpell_Panel& rhs) + :CPanelObject(rhs), + m_pInfoInstance(CInfoInstance::GetInstance()) +{ +} + +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; + m_bActive = true; + + 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 Client::SPELL_INFO CSpell_Panel::Get_SpellInfo(_int SkillID) +{ + return m_pInfoInstance->Get_Spell_Info(SkillID); +} + + +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..4ab5944e2 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Spell_Preview.cpp @@ -0,0 +1,289 @@ +#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(); }); + m_bActive = true; + 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..60391a3ed --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Spell_State.cpp @@ -0,0 +1,273 @@ +#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); + m_bActive = true; + + 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..0f2cd9760 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Spell_Vidio_Border.cpp @@ -0,0 +1,246 @@ +#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(); }); + m_bActive = true; + + 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/State_Hit.cpp b/Jusin154_Team3D/Client/Private/State_Hit.cpp new file mode 100644 index 000000000..fd450b69b --- /dev/null +++ b/Jusin154_Team3D/Client/Private/State_Hit.cpp @@ -0,0 +1,64 @@ +#include "pch.h" +#include "State_Hit.h" +#include "Unit.h" + + +CState_Hit::CState_Hit() + :CState_Root() +{ +} + +void CState_Hit::Enter() +{ + __super::Enter(); +} + +HRESULT CState_Hit::Update(_float fTimeDelta) +{ + if (nullptr != m_funcPriorityUpdate) { + m_funcPriorityUpdate(fTimeDelta); + } + if (FAILED(__super::Update(fTimeDelta))) { + return E_FAIL; + } + if (nullptr != m_funcLateUpdate) { + m_funcLateUpdate(fTimeDelta); + } + return S_OK; +} + +void CState_Hit::Exit() +{ + __super::Exit(); +} + +HRESULT CState_Hit::Initialize(STATE_HIT_DESC* pDesc) +{ + if (FAILED(__super::Initialize(pDesc))) { + return E_FAIL; + } + m_funcPriorityUpdate = pDesc->funcPriorityUpdate; + m_funcLateUpdate = pDesc->funcLateUpdate; + m_pModel = m_pOwner->Get_Component(); + m_pFSM = m_pOwner->Get_Component(); + + return S_OK; +} + +CState_Hit* CState_Hit::Create(STATE_HIT_DESC* pDesc) +{ + CState_Hit* pInstance = new CState_Hit; + if (FAILED(pInstance->Initialize(pDesc))) { + SAFE_RELEASE(pInstance); + } + return pInstance; +} + +void CState_Hit::Free() +{ + __super::Free(); +} + +void CState_Hit::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Client/Private/State_Throw.cpp b/Jusin154_Team3D/Client/Private/State_Throw.cpp new file mode 100644 index 000000000..91ea8a3cf --- /dev/null +++ b/Jusin154_Team3D/Client/Private/State_Throw.cpp @@ -0,0 +1,64 @@ +#include "pch.h" +#include "State_Throw.h" +#include "Unit.h" + + +CState_Throw::CState_Throw() + :CState_Root() +{ +} + +void CState_Throw::Enter() +{ + __super::Enter(); +} + +HRESULT CState_Throw::Update(_float fTimeDelta) +{ + if (nullptr != m_funcPriorityUpdate) { + m_funcPriorityUpdate(fTimeDelta); + } + if (E_FAIL == (__super::Update(fTimeDelta))) { + return E_FAIL; + } + if (nullptr != m_funcLateUpdate) { + m_funcLateUpdate(fTimeDelta); + } + return S_OK; +} + +void CState_Throw::Exit() +{ + __super::Exit(); +} + +HRESULT CState_Throw::Initialize(STATE_THROW_DESC* pDesc) +{ + if (FAILED(__super::Initialize(pDesc))) { + return E_FAIL; + } + m_funcPriorityUpdate = pDesc->funcPriorityUpdate; + m_funcLateUpdate = pDesc->funcLateUpdate; + m_pModel = m_pOwner->Get_Component(); + m_pFSM = m_pOwner->Get_Component(); + + return S_OK; +} + +CState_Throw* CState_Throw::Create(STATE_THROW_DESC* pDesc) +{ + CState_Throw* pInstance = new CState_Throw; + if (FAILED(pInstance->Initialize(pDesc))) { + SAFE_RELEASE(pInstance); + } + return pInstance; +} + +void CState_Throw::Free() +{ + __super::Free(); +} + +void CState_Throw::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Client/Private/Terrain.cpp b/Jusin154_Team3D/Client/Private/Terrain.cpp index 0f835bd18..dbeda66f9 100644 --- a/Jusin154_Team3D/Client/Private/Terrain.cpp +++ b/Jusin154_Team3D/Client/Private/Terrain.cpp @@ -24,24 +24,28 @@ HRESULT CTerrain::Initialize(void* pArg) { TERRAIN_DESC* pDesc = static_cast(pArg); - if (FAILED(__super::Initialize(pArg))) + if (FAILED(__super::Initialize(pArg))){ return E_FAIL; + } - if (FAILED(Ready_Components(pArg))) + if (FAILED(Ready_Components(pArg))){ return E_FAIL; + } m_fUsingSurfaceParams = 15.f / 27.f; //m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(-194, 18.5f, -153.f, 1.f)); m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&pDesc->vPosition), 1.f)); - CRigidBody_Static::RIGIDBODY_STATIC_DESC Desc{}; - Desc.pMeshName = TEXT("Hogsmeade_HeightMap"); - Desc.iSubKind = ENUM_CLASS(PXOBJECT::TERRAIN); - /* Com_RigidBody */ - if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_RigidBody_Static_Terrain_Hogsmeade"), - reinterpret_cast(&m_pRigidBody), &Desc))) { - return E_FAIL; + { + CRigidBody_Static::RIGIDBODY_STATIC_DESC Desc{}; + Desc.pMeshName = TEXT("Hogsmeade_HeightMap"); + Desc.iSubKind = ENUM_CLASS(PXOBJECT::TERRAIN); + /* Com_RigidBody */ + if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_RigidBody_Static_Terrain_Hogsmeade"), + reinterpret_cast(&m_pRigidBody), &Desc))) { + return E_FAIL; + } } return S_OK; @@ -53,19 +57,14 @@ void CTerrain::Priority_Update(_float fTimeDelta) void CTerrain::Update(_float fTimeDelta) { - -#ifdef _DEBUG - if (m_pGameInstance->Key_Down(DIK_LSHIFT) ) - { - m_bWasWireFrame = !m_bWasWireFrame; - } -#endif // _DEBUG + Describe_Entity(); } void CTerrain::Late_Update(_float fTimeDelta) { //if (m_pGameInstance->isIn_WorldFrustum(Get_WorldPostion(), m_pTransformCom->Get_Radius())) { m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this); + m_pGameInstance->Add_RenderGroup(RENDER::SHADOW, this); //} } @@ -74,18 +73,6 @@ HRESULT CTerrain::Render() if (FAILED(Bind_ShaderResources())) { return E_FAIL; } -#ifdef _DEBUG - static _int iValue1 = 16; - static _int iValue2 = 16; - static _int iValue3 = 16; - GUI::SliderInt("DSN1", (_int*)&iValue1, 1, 1024); - GUI::SliderInt("DSN2", (_int*)&iValue2, 1, 1024); - GUI::SliderInt("DSN3", (_int*)&iValue3, 1, 1024); - m_vDRN.x = 1.f / (_float)iValue1; - m_vDRN.y = 1.f / (_float)iValue2; - m_vDRN.z = 1.f / (_float)iValue3; -#endif // _DEBUG - if (FAILED(m_pShaderCom->Bind_RawValue("g_fDiffuseMultiplier", &m_vDRN.x, sizeof(_float)))) { return E_FAIL; } @@ -95,31 +82,39 @@ HRESULT CTerrain::Render() if (FAILED(m_pShaderCom->Bind_RawValue("g_fNormalMultiplier", &m_vDRN.z, sizeof(_float)))) { return E_FAIL; } -#ifdef _DEBUG - if (m_bWasWireFrame) - { - if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_NORTEX::ENV_TERRAIN_ANISO)))) { - return E_FAIL; - } - } - else - { - if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_NORTEX::DEFAULT)))) { - return E_FAIL; - } - } -#endif // _DEBUG -#ifndef _DEBUG if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_NORTEX::ENV_TERRAIN_ANISO)))) { return E_FAIL; } -#endif // !_DEBUG - - if (FAILED(m_pVIBufferCom->Bind_Resources())) { return E_FAIL; } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + return S_OK; +} + +HRESULT CTerrain::Render_Shadow() +{ + if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Bind_Shadow_Resource(m_pShaderCom, "g_ViewMatrix", D3DTS::VIEW))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Bind_Shadow_Resource(m_pShaderCom, "g_ProjMatrix", D3DTS::PROJ))) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", &m_pGameInstance->Get_ShadowDesc()->fFar, sizeof(_float)))) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_NORTEX::SHADOW)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } if (FAILED(m_pVIBufferCom->Render())) { return E_FAIL; } @@ -245,6 +240,19 @@ void CTerrain::Free() #ifdef _DEBUG void CTerrain::Describe_Entity() { - + GUI::Begin("Renderer"); + GUI::PushItemWidth(80); + if (GUI::CollapsingHeader("Terr")) + { + static _int iTuningValue = 16; + GUI::DragInt("DSN1", (_int*)&iTuningValue, 1, 1024); + GUI::DragInt("DSN2", (_int*)&iTuningValue, 1, 1024); + GUI::DragInt("DSN3", (_int*)&iTuningValue, 1, 1024); + m_vDRN.x = 1.f / (_float)iTuningValue; + m_vDRN.y = 1.f / (_float)iTuningValue; + m_vDRN.z = 1.f / (_float)iTuningValue; + GUI::PopItemWidth(); + } + GUI::End(); } #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..305e74a43 100644 --- a/Jusin154_Team3D/Client/Private/Troll.cpp +++ b/Jusin154_Team3D/Client/Private/Troll.cpp @@ -2,15 +2,16 @@ #include "Troll.h" #include "Troll_Weapon.h" +#include "Troll_Rock.h" #include "GameInstance.h" #pragma region STATE #include "State_Idle.h" -#include "State_Dodge.h" -#include "State_Jump.h" -#include "State_Land.h" #include "State_Move.h" #include "State_Combat.h" +#include "State_Hit.h" +#include "Troll_State_Rush.h" +#include "State_Throw.h" #pragma endregion CTroll::CTroll(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) @@ -57,7 +58,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; } @@ -75,6 +76,8 @@ void CTroll::Update(_float fTimeDelta) m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom); + Play_Event(); + if (true == m_pCharacter_Controller->IsActive()) { m_pCharacter_Controller->Move(fTimeDelta); m_vStunTimer.x = 0.f; @@ -97,6 +100,11 @@ void CTroll::Update(_float fTimeDelta) Describe_Entity(); #endif // _DEBUG + + for (_uint i = 0; i < ENUM_CLASS(TROLL_SKILL::END); i++) + m_fSkillCoolTime[i] = max(0.f, m_fSkillCoolTime[i] - fTimeDelta); + + } void CTroll::Late_Update(_float fTimeDelta) @@ -109,7 +117,10 @@ void CTroll::Late_Update(_float fTimeDelta) m_pTransformCom->Set_WorldMatrix(m_pRigidBody->Get_Actor()->getGlobalPose()); } - m_pTransformCom->LookAt_Horizontal(XMLoadFloat4(&m_vTargetPos)); + if (m_bLookAt) { + m_pTransformCom->LookAt_Lerp(XMLoadFloat4(&m_vTargetPos),fTimeDelta, 5.f); + } + m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this); } @@ -172,9 +183,9 @@ void CTroll::OnCollision(CGameObject* pOther, void* pDesc) _vector vHitDir = {}; // 시도한 move 방향 _float fLength = {}; // 작용된 힘 - m_pCharacter_Controller->ConvertToDO(*m_pRigidBody); - m_pRigidBody->Add_Force(vHitDir * fLength * 100.f, PSX::PxForceMode::eIMPULSE); - + //m_pCharacter_Controller->ConvertToDO(*m_pRigidBody); + //m_pRigidBody->Add_Force(vHitDir * fLength * 100.f, PSX::PxForceMode::eIMPULSE); + m_pFSM->Change_State(FSMSTATE::HIT); } void CTroll::OnHit(CGameObject* pOther, CGameObject* pCaller) @@ -243,6 +254,18 @@ HRESULT CTroll::Ready_Parts() return E_FAIL; } + CTroll_Rock::TROLLROCK_DESC Troll_RockDesc{}; + + Troll_RockDesc.pParentTransform = m_pTransformCom; + Troll_RockDesc.pSocketMatrices = m_pModelCom->Get_BoneMatrixPtr("SKT_LeftHand"); + + if (FAILED(Add_PartObject("Troll_Rock", g_iStaticLevel, nullptr, &Troll_RockDesc))) + { + return E_FAIL; + } + + Get_PartObject()->Set_Visible(false); + return S_OK; } @@ -313,10 +336,22 @@ void CTroll::Describe_Entity() string AnimList = m_pModelCom->Get_AnimList(m_pModelCom->Get_AnimIndex()); GUI::Text(AnimList.c_str()); + GUI::Text("AnimTrack %.2f", m_pModelCom->Get_CurrentTrackPosition()); + GUI::Text("AnimRatio %.2f", m_pModelCom->Get_CurrentTrackProgressRatio()); + _float4 vMomentum = {}; XMStoreFloat4(&vMomentum, m_pTransformCom->Get_CurrentMomentum()); GUI::Text("%.2f %.2f %.2f %.2f ", vMomentum.x, vMomentum.y, vMomentum.z, vMomentum.w); + _float3 Pos; + XMStoreFloat3(&Pos, Get_WorldPostion()); + + if (GUI::DragFloat3("Pos",(_float*)&Pos)) + { + m_pCharacter_Controller->Set_Position(XMLoadFloat3(&Pos)); + } + + GUI::End(); } diff --git a/Jusin154_Team3D/Client/Private/Troll_Rock.cpp b/Jusin154_Team3D/Client/Private/Troll_Rock.cpp new file mode 100644 index 000000000..cdd9d1d42 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Troll_Rock.cpp @@ -0,0 +1,212 @@ +#include "pch.h" +#include "Troll_Rock.h" + +#include "GameInstance.h" +#include "TrailObject.h" +#include "EffectParts.h" + +CTroll_Rock::CTroll_Rock(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CPartObject(pDevice, pContext) +{ +} + +CTroll_Rock::CTroll_Rock(const CTroll_Rock& Prototype) + : CPartObject(Prototype) +{ +} + +HRESULT CTroll_Rock::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CTroll_Rock::Initialize(void* pArg) +{ + TROLLROCK_DESC* pDesc = static_cast (pArg); + m_pSocketMatrices = pDesc->pSocketMatrices; + + if (FAILED(__super::Initialize(pArg))) { + return E_FAIL; + } + + + if (FAILED(Ready_Components())) { + return E_FAIL; + } + + return S_OK; +} + +void CTroll_Rock::Priority_Update(_float fTimeDelta) +{ + m_pModelCom->Combined_BoneMatrix(); + + if (m_bAttach) + { + _matrix socketMatrix = {}; + + socketMatrix = XMLoadFloat4x4(m_pSocketMatrices); + + for (int i = 0; i < 3; ++i) { + socketMatrix.r[i] = XMVector3Normalize(socketMatrix.r[i]); + } + + m_pTransformCom->Set_WorldMatrix(socketMatrix * XMLoadFloat4x4(m_pParentTransformCom->Get_WorldMatrixPtr())); + } + else + { + _matrix world = XMLoadFloat4x4(m_pTransformCom->Get_WorldMatrixPtr()); + m_pTransformCom->Set_WorldMatrix(world); + m_pTransformCom->Go_Straight(fTimeDelta); + } + + +#ifdef _DEBUG + Describe_Entity(); + +#endif // _DEBUG +} + +void CTroll_Rock::Update(_float fTimeDelta) +{ + if (m_pGameInstance->Key_Up(DIK_U)) + { + m_bAttach = false; + } + +} + +void CTroll_Rock::Late_Update(_float fTimeDelta) +{ + m_pGameInstance->Add_RenderGroup(RENDER::BLEND, this); +} + +HRESULT CTroll_Rock::Render() +{ + if (!m_pModelCom) + return S_OK; + + if (!m_bVisible) + return S_OK; + + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + + _uint iNumMeshes = m_pModelCom->Get_NumMeshes(); + + for (_uint i = 0; i < iNumMeshes; i++) + { + if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) { + return E_FAIL; + } + + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_ANIM::DEFAULT)))) { + return E_FAIL; + } + + if (FAILED(m_pModelCom->Render(i))) { + return E_FAIL; + } + } + + return S_OK; +} + +HRESULT CTroll_Rock::Ready_Components() +{ + + CTransform::TRANSFORM_DESC Desc = {}; + + Desc.fSpeedPerSec = 10.f; + Desc.fRotationPerSec = XMConvertToRadians(180.0f); + Desc.fRadius = 10.f; + + __super::Ready_Components(&Desc); + + + /* Com_Model */ + if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_Troll_Rock_Big_Model"), + reinterpret_cast(&m_pModelCom)))) + return E_FAIL; + + /* Com_Shader */ + if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH, + reinterpret_cast(&m_pShaderCom)))) + return E_FAIL; + + return S_OK; +} + +HRESULT CTroll_Rock::Bind_ShaderResources() +{ + if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) { + return E_FAIL; + } + + if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) { + return E_FAIL; + } + + if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) { + return E_FAIL; + } + + return S_OK; +} + + +CTroll_Rock* CTroll_Rock::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CTroll_Rock* pInstance = new CTroll_Rock(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CTroll_Rock"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CTroll_Rock::Clone(void* pArg, CGameObject* pOwner) +{ + CTroll_Rock* pInstance = new CTroll_Rock(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CTroll_Rock"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CTroll_Rock::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pModelCom); + +} +#ifdef _DEBUG + +void CTroll_Rock::Describe_Entity() +{ + GUI::Begin("Rock"); + GUI::Text("X %.2f,Y%.2f,Z%.2f", m_pTransformCom->Get_Scale().x, m_pTransformCom->Get_Scale().y, m_pTransformCom->Get_Scale().z); + + static _float Scale = 1.f; + if (GUI::DragFloat("Scale", &Scale,0.01f)) + { + _float3 vScale = { Scale,Scale ,Scale }; + m_pTransformCom->Set_Scale(vScale); + } + GUI::End(); +} + +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Troll_State_Rush.cpp b/Jusin154_Team3D/Client/Private/Troll_State_Rush.cpp new file mode 100644 index 000000000..afa12b44b --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Troll_State_Rush.cpp @@ -0,0 +1,64 @@ +#include "pch.h" +#include "Troll_State_Rush.h" +#include "GameInstance.h" +#include "Unit.h" + +CTroll_State_Rush::CTroll_State_Rush() + :CState_Root() +{ +} + +void CTroll_State_Rush::Enter() +{ + __super::Enter(); +} + +HRESULT CTroll_State_Rush::Update(_float fTimeDelta) +{ + if (nullptr != m_funcPriorityUpdate) { + m_funcPriorityUpdate(fTimeDelta); + } + if (E_FAIL == (__super::Update(fTimeDelta))) { + return E_FAIL; + } + if (nullptr != m_funcLateUpdate) { + m_funcLateUpdate(fTimeDelta); + } + return S_OK; +} + +void CTroll_State_Rush::Exit() +{ + __super::Exit(); +} + +HRESULT CTroll_State_Rush::Initialize(TROLL_STATE_RUSH_DESC* pDesc) +{ + if (FAILED(__super::Initialize(pDesc))) { + return E_FAIL; + } + m_funcPriorityUpdate = pDesc->funcPriorityUpdate; + m_funcLateUpdate = pDesc->funcLateUpdate; + m_pModel = m_pOwner->Get_Component(); + m_pFSM = m_pOwner->Get_Component(); + + return S_OK; +} + +CTroll_State_Rush* CTroll_State_Rush::Create(TROLL_STATE_RUSH_DESC* pDesc) +{ + CTroll_State_Rush* pInstance = new CTroll_State_Rush; + if (FAILED(pInstance->Initialize(pDesc))) { + SAFE_RELEASE(pInstance); + } + return pInstance; +} + +void CTroll_State_Rush::Free() +{ + __super::Free(); +} + +void CTroll_State_Rush::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Client/Private/Troll_States.cpp b/Jusin154_Team3D/Client/Private/Troll_States.cpp index 3b02c619b..62f2460f1 100644 --- a/Jusin154_Team3D/Client/Private/Troll_States.cpp +++ b/Jusin154_Team3D/Client/Private/Troll_States.cpp @@ -3,14 +3,15 @@ #include "GameInstance.h" #include "Player.h" +#include "Troll_Rock.h" #pragma region STATE #include "State_Idle.h" -#include "State_Dodge.h" -#include "State_Jump.h" -#include "State_Land.h" #include "State_Move.h" #include "State_Combat.h" +#include "State_Hit.h" +#include "Troll_State_Rush.h" +#include "State_Throw.h" #pragma endregion @@ -24,7 +25,7 @@ void CTroll::Behavior_IdleEnter() HRESULT CTroll::Behavior_IdleExitCheck() { - if (m_fTargetDistance <= 15.f) + if (m_fTargetDistance <= 20.f) m_pFSM->Change_State(FSMSTATE::MOVE); return E_FAIL; @@ -38,18 +39,32 @@ void CTroll::Behavior_IdleExit() void CTroll::Behavior_MoveEnter() { pair<_uint, _bool> pairAnimInfo = {}; - m_pFSM->Enable_State(FSMSTATE::MOVE); - m_pFSM->Enable_State(FSMSTATE::JOG); - pairAnimInfo = m_Animation[STATEANIM::JOG_FWD]; + if (m_pFSM->IsEnable_Previous(FSMSTATE::IDLE)) + { + m_pFSM->Enable_State(FSMSTATE::JOG); + pairAnimInfo = m_Animation[STATEANIM::JOG_START]; + } + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); } HRESULT CTroll::Behavior_MoveExitCheck() { - if (m_fTargetDistance <= 7.f &&m_fTargetDistance !=0.f) + pair<_uint, _bool> pairAnimInfo = {}; + _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex(); + if (iCurrAnimIndex == m_Animation[STATEANIM::JOG_START].first) + { + if (m_pModelCom->IsFinishedAnim()) + { + pairAnimInfo = m_Animation[STATEANIM::JOG_FWD]; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); + } + } + + if (m_fTargetDistance <= 18.f && m_fTargetDistance !=0.f) m_pFSM->Change_State(FSMSTATE::COMBAT); return E_FAIL; @@ -63,28 +78,267 @@ void CTroll::Behavior_MoveExit() void CTroll::Behavior_CombatEnter() { pair<_uint, _bool> pairAnimInfo = {}; - m_pFSM->Enable_State(FSMSTATE::COMBAT); - m_pFSM->Enable_State(FSMSTATE::SKILL2); + m_bLookAt = true; + if (m_fTargetDistance <= 12.f && m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SLAM)] <= 0.f) + { + m_pFSM->Enable_State(FSMSTATE::SKILL); + pairAnimInfo = m_Animation[STATEANIM::SKILL]; + m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SLAM)] = m_fMaxSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SLAM)]; + } + else if (m_fTargetDistance <= 12.f && m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::BACKHAND_SWING)] <= 0.f) + { + m_pFSM->Enable_State(FSMSTATE::BACKHAND_SWING); + pairAnimInfo = m_Animation[STATEANIM::BACKHAND_SWING_JOG]; + m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::BACKHAND_SWING)] = m_fMaxSkillCoolTime[ENUM_CLASS(TROLL_SKILL::BACKHAND_SWING)]; + } + else if (m_fTargetDistance <= 12.f && m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SWING)] <= 0.f) + { + m_pFSM->Enable_State(FSMSTATE::SWING); + pairAnimInfo = m_Animation[STATEANIM::SWING_FWD]; + m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SWING)] = m_fMaxSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SWING)]; + } + else if (m_fTargetDistance <= 15.f && m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::THROWROCK)] <= 0.f) + { + m_pFSM->Change_State(FSMSTATE::THROW_ROCK); + return; + } + else if (m_fTargetDistance <= 18.f && m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::RUSH)] <= 0.f) + { + m_pFSM->Change_State(FSMSTATE::RUSH); + return; + } + else + { + _int RandIndex = m_pGameInstance->Real_Random_Int(0,3); + switch (RandIndex) + { + case 0: + pairAnimInfo = m_Animation[STATEANIM::IDLE_BREAK1]; + break; + case 1: + pairAnimInfo = m_Animation[STATEANIM::IDLE_BREAK2]; + break; + case 2: + pairAnimInfo = m_Animation[STATEANIM::IDLE_BREAK3]; + break; + case 3: + pairAnimInfo = m_Animation[STATEANIM::IDLE_BREAK4]; + break; + } + } - pairAnimInfo = m_Animation[STATEANIM::SKILL2]; - - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second,1.f,true); } -HRESULT CTroll::Behavior_CombatExitCheck() +HRESULT CTroll::Behavior_CombatExitCheck(_float fTimeDelta) { + pair<_uint, _bool> pairAnimInfo = {}; + _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex(); + + if (m_pFSM->IsEnable(FSMSTATE::SKILL)) + { + m_bLookAt = false; + m_pFSM->Disable_State(FSMSTATE::SKILL); + pairAnimInfo = m_Animation[STATEANIM::SKILL]; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); + m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SLAM)] = m_fMaxSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SLAM)]; + return S_OK; + } + + if (m_pFSM->IsEnable(FSMSTATE::SWING)) + { + m_bLookAt = false; + m_pFSM->Disable_State(FSMSTATE::SWING); + pairAnimInfo = m_Animation[STATEANIM::SWING_FWD]; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); + m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SWING)] = m_fMaxSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SWING)]; + return S_OK; + } + + if (m_pFSM->IsEnable(FSMSTATE::BACKHAND_SWING)) + { + m_bLookAt = false; + m_pFSM->Disable_State(FSMSTATE::BACKHAND_SWING); + pairAnimInfo = m_Animation[STATEANIM::BACKHAND_SWING_JOG]; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); + m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::BACKHAND_SWING)] = m_fMaxSkillCoolTime[ENUM_CLASS(TROLL_SKILL::BACKHAND_SWING)]; + return S_OK; + } + + if (m_pModelCom->IsFinishedAnim()) { + m_bLookAt = true; m_pFSM->Change_State(FSMSTATE::IDLE); } + return E_FAIL; } void CTroll::Behavior_CombatExit() { - m_pFSM->Disable_State(FSMSTATE::COMBAT | FSMSTATE::SKILL | FSMSTATE::SKILL2); + m_pFSM->Disable_State(FSMSTATE::COMBAT | FSMSTATE::SKILL | FSMSTATE::SKILL2 |FSMSTATE::SWING |FSMSTATE::BACKHAND_SWING); +} + +void CTroll::Behavior_RushEnter() +{ + pair<_uint, _bool> pairAnimInfo = {}; + m_pFSM->Enable_State(FSMSTATE::RUSH); + pairAnimInfo = m_Animation[STATEANIM::RUSH_START]; + + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); +} + +HRESULT CTroll::Behavior_RushExitCheck(_float fTimeDelta) +{ + pair<_uint, _bool> pairAnimInfo = {}; + _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex(); + if (m_pFSM->IsEnable(FSMSTATE::RUSH)) + { + if (iCurrAnimIndex == m_Animation[STATEANIM::RUSH_START].first) + { + if (m_pModelCom->IsFinishedAnim()) + { + m_bLookAt = false; + pairAnimInfo = m_Animation[STATEANIM::RUSH_LOOP]; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + } + } + else { + m_fRushTime += fTimeDelta; + + if (m_fRushTime >= 1.5f) + { + m_fRushTime = 0.f; + m_pFSM->Disable_State(FSMSTATE::RUSH); + pairAnimInfo = m_Animation[STATEANIM::RUSH_END]; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); + m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::RUSH)] = m_fMaxSkillCoolTime[ENUM_CLASS(TROLL_SKILL::RUSH)]; + } + } + return S_OK; + } + if (iCurrAnimIndex == m_Animation[STATEANIM::RUSH_END].first) + { + m_bLookAt = true; + pairAnimInfo = m_Animation[STATEANIM::IDLE_COMBAT_TURN_BWD]; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); + } + + if (m_pModelCom->IsFinishedAnim()) + { + m_bLookAt = true; + m_pFSM->Change_State(FSMSTATE::IDLE); + } + return E_FAIL; +} + +void CTroll::Behavior_RushExit() +{ + m_pFSM->Disable_State(FSMSTATE::RUSH); +} + +void CTroll::Behavior_ThrowEnter() +{ + pair<_uint, _bool> pairAnimInfo = {}; + m_pFSM->Enable_State(FSMSTATE::THROW_ROCK); + pairAnimInfo = m_Animation[STATEANIM::THROW_ROCK_START]; + + Add_Event(pairAnimInfo.first, + [this](){Get_PartObject()->Set_Visible(true);}, + 0.9f); + + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); +} + +HRESULT CTroll::Behavior_ThrowExitCheck(_float fTimeDelta) +{ + pair<_uint, _bool> pairAnimInfo = {}; + _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex(); + if (m_pFSM->IsEnable(FSMSTATE::THROW_ROCK)) + { + if (iCurrAnimIndex == m_Animation[STATEANIM::THROW_ROCK_START].first) + { + if (m_pModelCom->IsFinishedAnim()) + { + m_pFSM->Disable_State(FSMSTATE::THROW_ROCK); + pairAnimInfo = m_Animation[STATEANIM::THROW_ROCK]; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); + m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::THROWROCK)] = m_fMaxSkillCoolTime[ENUM_CLASS(TROLL_SKILL::THROWROCK)]; + Add_Event(pairAnimInfo.first, + [this]() {Get_PartObject()->Set_Attach(false); }, + 0.25f); + } + } + return S_OK; + } + if (m_pModelCom->IsFinishedAnim()) + { + m_bLookAt = true; + m_pFSM->Change_State(FSMSTATE::IDLE); + } + return E_FAIL; +} + +void CTroll::Behavior_ThrowExit() +{ + m_pFSM->Disable_State(FSMSTATE::THROW_ROCK); +} + +void CTroll::Behavior_HitEnter() +{ + m_pFSM->Enable_State(FSMSTATE::HIT); + _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex(); + pair<_uint, _bool> pairAnimInfo; + + if (iCurrAnimIndex == m_Animation[STATEANIM::SKILL].first) + { + pairAnimInfo = m_Animation[STATEANIM::HIT_FACE]; + } + else { + _int RandIndex = m_pGameInstance->Real_Random_Int(0, 2); + switch (RandIndex) + { + case 0: + pairAnimInfo = m_Animation[STATEANIM::HIT_BWD]; + break; + case 1: + pairAnimInfo = m_Animation[STATEANIM::HIT_BWD2]; + break; + case 2: + pairAnimInfo = m_Animation[STATEANIM::HIT_BWD3]; + break; + } + } + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); +} + +HRESULT CTroll::Behavior_HitExitCheck() +{ + _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex(); + pair<_uint, _bool> pairAnimInfo; + + if (iCurrAnimIndex == m_Animation[STATEANIM::HIT_FACE].first) + { + if (m_pModelCom->IsFinishedAnim()) { + pairAnimInfo = m_Animation[STATEANIM::HIT_FACE_END]; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + return S_OK; + } + } + + if (m_pModelCom->IsFinishedAnim()) { + m_pFSM->Change_State(FSMSTATE::IDLE); + return E_FAIL; + } + return E_FAIL; +} + +void CTroll::Behavior_HitExit() +{ + m_pFSM->Disable_State(FSMSTATE::HIT); } @@ -120,14 +374,47 @@ void CTroll::Add_FSM() CState_Combat::STATE_COMBAT_DESC Desc{}; Desc.pOwner = this; Desc.funcEnterEvent = [this]() { Behavior_CombatEnter(); }; - Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_CombatExitCheck(); }; + Desc.funcExitCheck = [this](_float fTimeDelta) { return Behavior_CombatExitCheck(fTimeDelta); }; Desc.funcExitEvent = [this]() { Behavior_CombatExit(); }; Desc.funcPriorityUpdate = nullptr; Desc.funcLateUpdate = nullptr; m_States.emplace(FSMSTATE::COMBAT, CState_Combat::Create(&Desc)); } + + { + CTroll_State_Rush::TROLL_STATE_RUSH_DESC Desc{}; + Desc.pOwner = this; + Desc.funcEnterEvent = [this]() { Behavior_RushEnter(); }; + Desc.funcExitCheck = [this](_float fTimeDelta) { return Behavior_RushExitCheck(fTimeDelta); }; + Desc.funcExitEvent = [this]() { Behavior_RushExit(); }; + Desc.funcPriorityUpdate = nullptr; + Desc.funcLateUpdate = nullptr; + m_States.emplace(FSMSTATE::RUSH, CTroll_State_Rush::Create(&Desc)); + } + + { + CState_Throw::STATE_THROW_DESC Desc{}; + Desc.pOwner = this; + Desc.funcEnterEvent = [this]() { Behavior_ThrowEnter(); }; + Desc.funcExitCheck = [this](_float fTimeDelta) { return Behavior_ThrowExitCheck(fTimeDelta); }; + Desc.funcExitEvent = [this]() { Behavior_ThrowExit(); }; + Desc.funcPriorityUpdate = nullptr; + Desc.funcLateUpdate = nullptr; + m_States.emplace(FSMSTATE::THROW_ROCK, CState_Throw::Create(&Desc)); + } #pragma endregion -#pragma region Behavior_Combat_Focus + +#pragma region Behavior_Hit + { + CState_Hit::STATE_HIT_DESC Desc{}; + Desc.pOwner = this; + Desc.funcEnterEvent = [this]() { Behavior_HitEnter(); }; + Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_HitExitCheck(); }; + Desc.funcExitEvent = [this]() { Behavior_HitExit(); }; + Desc.funcPriorityUpdate = nullptr; + Desc.funcLateUpdate = nullptr; + m_States.emplace(FSMSTATE::HIT, CState_Hit::Create(&Desc)); + } #pragma endregion @@ -136,55 +423,46 @@ void CTroll::Add_FSM() void CTroll::Set_Anim() { m_Animation[STATEANIM::IDLE] = { 16,true }; + m_Animation[STATEANIM::IDLE_COMBAT_TURN_BWD] = { 8,false }; + m_Animation[STATEANIM::IDLE_BREAK1] = { 11,false }; + m_Animation[STATEANIM::IDLE_BREAK2] = { 141,false }; + m_Animation[STATEANIM::IDLE_BREAK3] = { 14,false }; + m_Animation[STATEANIM::IDLE_BREAK4] = { 143,false }; m_Animation[STATEANIM::WALK_FWD] = { 22,true }; + m_Animation[STATEANIM::JOG_START] = { 104,false }; m_Animation[STATEANIM::JOG_FWD] = { 103,true }; m_Animation[STATEANIM::DODGE_LEFT] = { 125, false }; m_Animation[STATEANIM::DODGE_RIGHT] = { 126, false }; m_Animation[STATEANIM::SPRINT] = { 90, true }; - m_Animation[STATEANIM::SKILL] = { 70,false }; - m_Animation[STATEANIM::SKILL2] = { 66,false }; // 도끼 찍기 + m_Animation[STATEANIM::SKILL] = { 66,false }; // 도끼 찍기 + m_Animation[STATEANIM::SKILL2] = { 70,false }; + + m_Animation[STATEANIM::THROW_ROCK_START] = { 77,false }; + m_Animation[STATEANIM::THROW_ROCK] = { 74,false }; + + m_Animation[STATEANIM::RUSH_START] = { 55,false }; + m_Animation[STATEANIM::RUSH_LOOP] = { 54,true }; + m_Animation[STATEANIM::RUSH_END] = { 56,false }; + + m_Animation[STATEANIM::BACKHAND_SWING_JOG] = { 89,false }; + + m_Animation[STATEANIM::SWING_FWD] = { 87,false }; - m_Animation[STATEANIM::HIT_FWD] = { 353, false }; m_Animation[STATEANIM::HIT_BWD] = { 167, false }; // m_Animation[STATEANIM::HIT_BWD2] = { 168, false }; // m_Animation[STATEANIM::HIT_BWD3] = { 169, false }; // - m_Animation[STATEANIM::HIT_BWD4] = { 351, false }; - m_Animation[STATEANIM::HIT_L] = { 354, false }; - m_Animation[STATEANIM::HIT_R] = { 355, false }; + + m_Animation[STATEANIM::HIT_FACE] = { 156, false }; // + m_Animation[STATEANIM::HIT_FACE_END] = { 157, false }; // + + m_Animation[STATEANIM::STUN] = { 60, false }; // + m_Animation[STATEANIM::KNOCKDOWN_BWD] = { 165, false }; // - m_Animation[STATEANIM::KNOCKDOWN_BWD_SPLT] = { 375, false }; - m_Animation[STATEANIM::KNOCKDOWN_BWD_SPLT_HOLD] = { 370, false }; - m_Animation[STATEANIM::KNOCKDOWN_FWD] = { 371, false }; - m_Animation[STATEANIM::KNOCKDOWN_FWD_SPLT] = { 372, false }; - m_Animation[STATEANIM::KNOCKDOWN_FWD_SPLT_HOLD] = { 373, false }; - m_Animation[STATEANIM::GETUP_BWD] = { 330, false }; - m_Animation[STATEANIM::GETUP_FWD] = { 332, false }; - m_Animation[STATEANIM::GETUP_L] = { 334, false }; - m_Animation[STATEANIM::GETUP_L_FD] = { 336, false }; - m_Animation[STATEANIM::GETUP_L_FU] = { 338, false }; - m_Animation[STATEANIM::GETUP_R] = { 340, false }; - m_Animation[STATEANIM::GETUP_R_FD] = { 342, false }; - m_Animation[STATEANIM::GETUP_R_FU] = { 344, false }; - m_Animation[STATEANIM::GETUP_SLOUCH] = { 346, false }; - m_Animation[STATEANIM::KNOCKBACK] = { 377, true }; - m_Animation[STATEANIM::KNOCKBACK2] = { 378, true }; - m_Animation[STATEANIM::TUMBLE] = { 379, true }; - m_Animation[STATEANIM::TUMBLE2] = { 380, true }; - m_Animation[STATEANIM::PETRIFICUSED_START] = { 383, false }; - - m_Animation[STATEANIM::DEAD_BWD] = { 317, false }; - m_Animation[STATEANIM::DEAD_BWD2] = { 318, false }; - m_Animation[STATEANIM::DEAD_FWD] = { 319, false }; - m_Animation[STATEANIM::DEAD_FWD2] = { 320, false }; - m_Animation[STATEANIM::DEAD_L] = { 321, false }; - m_Animation[STATEANIM::DEAD_L2] = { 322, false }; - m_Animation[STATEANIM::DEAD_R] = { 323, false }; - m_Animation[STATEANIM::DEAD_R2] = { 324, false }; } diff --git a/Jusin154_Team3D/Client/Private/Troll_Weapon.cpp b/Jusin154_Team3D/Client/Private/Troll_Weapon.cpp index 336e3f30f..c23f31333 100644 --- a/Jusin154_Team3D/Client/Private/Troll_Weapon.cpp +++ b/Jusin154_Team3D/Client/Private/Troll_Weapon.cpp @@ -63,7 +63,7 @@ void CTroll_Weapon::Update(_float fTimeDelta) void CTroll_Weapon::Late_Update(_float fTimeDelta) { - m_pGameInstance->Add_RenderGroup(RENDER::BLEND, this); + m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this); } HRESULT CTroll_Weapon::Render() diff --git a/Jusin154_Team3D/Client/Private/UI_Manager.cpp b/Jusin154_Team3D/Client/Private/UI_Manager.cpp new file mode 100644 index 000000000..59a35ba05 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/UI_Manager.cpp @@ -0,0 +1,132 @@ +#include "pch.h" +#include "UI_Manager.h" +#include "GameInstance.h" +#include "GamePlay_Canvas.h" +#include "Spell_Canvas.h" + +CUI_Manager::CUI_Manager(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CUIObject(pDevice, pContext) +{ +} + +CUI_Manager::CUI_Manager(const CUI_Manager& rhs) + :CUIObject(rhs) +{ +} + +HRESULT CUI_Manager::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CUI_Manager::Initialize(void* pArg) +{ + if (FAILED(Ready_Components(pArg))) + { + return E_FAIL; + } + m_bCanvas_Change = false; + return S_OK; +} + +void CUI_Manager::Priority_Update(_float fTimeDelta) +{ +} + +void CUI_Manager::Update(_float fTimeDelta) +{ + if (m_pGameInstance->Key_Down(DIK_T)) + { + m_bCanvas_Change = !m_bCanvas_Change; + } + + if (m_bCanvas_Change == false) + { + static_cast(m_pGamePlay_Canves)->Visible(true); + static_cast(m_pSpell_Panel)->Visible(false); + } + else + { + static_cast(m_pSpell_Panel)->Visible(true); + static_cast(m_pGamePlay_Canves)->Visible(false); + } +} + +void CUI_Manager::Late_Update(_float fTimeDelta) +{ +} + +HRESULT CUI_Manager::Render() +{ + return S_OK; +} + +_vector CUI_Manager::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CUI_Manager::Bind_ShaderResources() +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CUI_Manager::Ready_Components(void* pArg) +{ + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pGamePlay_Canves)))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Panel)))) { + return E_FAIL; + } + + return S_OK; +} + +void CUI_Manager::Clear_Penel() +{ +} + +CUI_Manager* CUI_Manager::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CUI_Manager* pInstance = new CUI_Manager(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CUI_Manager"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CUI_Manager::Clone(void* pArg, CGameObject* pOwner) +{ + CUI_Manager* pInstance = new CUI_Manager(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CUI_Manager"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CUI_Manager::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pVIBufferCom); +} +#ifdef _DEBUG + +void CUI_Manager::Describe_Entity() +{ +} + +#endif // _DEBUG 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..9db55771a 100644 --- a/Jusin154_Team3D/Client/Public/Client_Enum.h +++ b/Jusin154_Team3D/Client/Public/Client_Enum.h @@ -7,14 +7,13 @@ namespace Client enum class MAPOBJECT_RENDER_TYPE { NORMAL, DECAL, GLASS }; enum class SHADER_PASS_ANIM { DEFAULT, SHADOW, CAPTURE, BLUR, HAIR, EYELASH, OUTLINE_WRITE, OUTLINE_READ, END }; - enum class SHADER_PASS_CUBE { DEFAULT, SHADOW, BLUR, END }; enum class SHADER_PASS_MESH { DEFAULT, SHADOW, SKYBOX, ALPHABLEND, EFFECT_ALPHABLEND, EFFECT_BLEND, EFFECT_ALPHABLEND_CULL, EFFECT_BLEND_CULL, CAPTURE, BLUR, EFFECT_ALPHABLEND_UVMOVE, MAPTOOL, GLASS, OUTLINE_WRITE, OUTLINE_READ, BLOOM, END }; - enum class SHADER_PASS_NORTEX { DEFAULT, TERRAIN, ENV_TERRAIN_ANISO, END }; + enum class SHADER_PASS_NORTEX { DEFAULT, TERRAIN, ENV_TERRAIN_ANISO, SHADOW, END }; enum class SHADER_PASS_PARTICLE { EXPLOSION, END }; enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, TRAIL_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 +23,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..f865b6be1 100644 --- a/Jusin154_Team3D/Client/Public/Client_Struct.h +++ b/Jusin154_Team3D/Client/Public/Client_Struct.h @@ -18,13 +18,16 @@ namespace Client typedef struct tagSpellInfo { - _uint iSpell_ID{}; - _wstring pSpell_Name; - _uint iSpell_Type{}; - _uint iSpell_CoolTime{}; - _uint iAnimNum{}; - _wstring pSpellInfo; - _bool bSpell_Lock = false; - _bool bEquip_Spell = false; - }SPELLINFO; + _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; + }SPELL_INFO; }; 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..989107d77 100644 --- a/Jusin154_Team3D/Client/Public/InfoInstance.h +++ b/Jusin154_Team3D/Client/Public/InfoInstance.h @@ -42,8 +42,11 @@ 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); + SPELL_INFO Get_Spell_Info(_int Spell_Info); + void Change_Canvas(); +#pragma endregion private: CGameInstance* m_pGameInstance = { nullptr }; ID3D11Device* m_pDevice = { nullptr }; @@ -52,6 +55,8 @@ class CInfoInstance final : public CBase class CPlayerInfo* m_pPlayerInfo = { nullptr }; class CMonsterInfo* m_pMonsterInfo = { nullptr }; class CMapInfo* m_pMapInfo = { nullptr }; + class CSkill_Data* m_pSkillInfo= { nullptr }; + #ifdef _DEBUG _string m_strLog = {}; diff --git a/Jusin154_Team3D/Client/Public/Level_Loading.h b/Jusin154_Team3D/Client/Public/Level_Loading.h index ec93a0e04..af2e537fe 100644 --- a/Jusin154_Team3D/Client/Public/Level_Loading.h +++ b/Jusin154_Team3D/Client/Public/Level_Loading.h @@ -1,4 +1,4 @@ -#pragma once +#pragma once #include "Client_Define.h" #include "Level.h" @@ -15,10 +15,12 @@ class CLevel_Loading final : public CLevel virtual void Update(_float fTimeDelta) override; virtual HRESULT Render() override; virtual _uint Get_NextLevelID() override { return ENUM_CLASS(m_eNextLevelID); }; + virtual void Capture_TerrainPreShadow(SHADOW_LIGHT_DESC& ShadowDesc); private: - LEVEL m_eNextLevelID = { LEVEL::END }; - class CLoader* m_pLoader = { nullptr }; + SHADOW_LIGHT_DESC m_ShadowDesc = {}; + LEVEL m_eNextLevelID = { LEVEL::END }; + class CLoader* m_pLoader = { nullptr }; private: virtual HRESULT Initialize(LEVEL eNextLevelID); HRESULT Initialize() override; @@ -30,4 +32,4 @@ class CLevel_Loading final : public CLevel }; -NS_END \ No newline at end of file +NS_END diff --git a/Jusin154_Team3D/Client/Public/Levioso.h b/Jusin154_Team3D/Client/Public/Levioso.h new file mode 100644 index 000000000..e2f1daddd --- /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/MapObject_Render.h b/Jusin154_Team3D/Client/Public/MapObject_Render.h index d57082d19..2db8dae73 100644 --- a/Jusin154_Team3D/Client/Public/MapObject_Render.h +++ b/Jusin154_Team3D/Client/Public/MapObject_Render.h @@ -23,6 +23,7 @@ class CMapObject_Render final : public CMapPartObject // Render PartObject virtual void Update(_float fTimeDelta) override; virtual void Late_Update(_float fTimeDelta) override; virtual HRESULT Render() override; + virtual HRESULT Render_Shadow() override; public: virtual _wstring Get_PrototypeTag(_uint iLodIndex = 0); 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/Player.h b/Jusin154_Team3D/Client/Public/Player.h index 586263104..d93a5940f 100644 --- a/Jusin154_Team3D/Client/Public/Player.h +++ b/Jusin154_Team3D/Client/Public/Player.h @@ -7,14 +7,6 @@ NS_BEGIN(Client) class CPlayer final : public CUnit { -public: - struct PendingEvent - { - _float fRatio = 0.f; - _uint AnimIndex = 0; - function Callback; - }; - private: CPlayer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); CPlayer(const CPlayer& Prototype); @@ -94,12 +86,7 @@ class CPlayer final : public CUnit virtual void Add_FSM(); virtual void Set_Anim(); - void Play_Event(); - void Add_Event(_uint AnimIndex, function Callback, _float fRatio = 0.f); - - vector m_PendingEvents; - - + _uint HI = 0; _float3 m_OffsetPos = {}; _float m_fAmount = { 1.f }; _float m_fInputTime = {}; diff --git a/Jusin154_Team3D/Client/Public/Skill_Data.h b/Jusin154_Team3D/Client/Public/Skill_Data.h index 1f8db1ae1..00b539a71 100644 --- a/Jusin154_Team3D/Client/Public/Skill_Data.h +++ b/Jusin154_Team3D/Client/Public/Skill_Data.h @@ -1,5 +1,44 @@ #pragma once -class CSkill_Data + +#include "Client_Define.h" +#include "Base.h" + +NS_BEGIN(Engine) +class CGameInstance; +class CUIObject; +NS_END + +NS_BEGIN(Client) + +class CSkill_Data final : public CBase { +public: + +private: + CSkill_Data(); + ~CSkill_Data() = default; + +public: + void Update(_float fTimeDelta); + void Change_Level(); + + +public: + HRESULT Load_SpellInfo(const _char* pFilePath); + +public: + const SPELL_INFO& Get_Info(_uint SpellID) const; + +private: + SPELL_INFO SpellInfo[34] = {}; + +private: + HRESULT Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex); + + +public: + static CSkill_Data* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual void Free() override; }; +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..65efe6eb7 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Spell_Anim.h @@ -0,0 +1,66 @@ +#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: + CInfoInstance* m_pInfoInstance = { nullptr }; + + 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..daab8a2ca --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Spell_Panel.h @@ -0,0 +1,81 @@ +#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: + const SPELL_INFO Get_SpellInfo(_int SkillID); + +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: + CInfoInstance* m_pInfoInstance = { nullptr }; + + 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 }; + + 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/State_Hit.h b/Jusin154_Team3D/Client/Public/State_Hit.h new file mode 100644 index 000000000..ff75153d9 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/State_Hit.h @@ -0,0 +1,36 @@ +#pragma once +#include "Client_Define.h" +#include "State_Root.h" + +NS_BEGIN(Client) + +class CState_Hit final : public CState_Root +{ +public: + typedef struct tagHit : public CState_Root::STATE_ROOT_DESC { + function funcPriorityUpdate = { nullptr }; + function funcLateUpdate = { nullptr }; + }STATE_HIT_DESC; +public: + CState_Hit(); + virtual ~CState_Hit() = default; + +public: + virtual void Enter(); + virtual HRESULT Update(_float fTimeDelta); + virtual void Exit(); + +private: + function m_funcPriorityUpdate = { nullptr }; + function m_funcLateUpdate = { nullptr }; + +private: + HRESULT Initialize(STATE_HIT_DESC* pDesc); + +public: + static CState_Hit* Create(STATE_HIT_DESC* pDesc); + virtual void Free() override; + virtual void Describe_Entity(); +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/State_Throw.h b/Jusin154_Team3D/Client/Public/State_Throw.h new file mode 100644 index 000000000..c02b2d0ee --- /dev/null +++ b/Jusin154_Team3D/Client/Public/State_Throw.h @@ -0,0 +1,36 @@ +#pragma once +#include "Client_Define.h" +#include "State_Root.h" + +NS_BEGIN(Client) + +class CState_Throw final : public CState_Root +{ +public: + typedef struct tagThrow : public CState_Root::STATE_ROOT_DESC { + function funcPriorityUpdate = { nullptr }; + function funcLateUpdate = { nullptr }; + }STATE_THROW_DESC; +private: + CState_Throw(); + virtual ~CState_Throw() = default; + +public: + virtual void Enter(); + virtual HRESULT Update(_float fTimeDelta); + virtual void Exit(); + +private: + function m_funcPriorityUpdate = { nullptr }; + function m_funcLateUpdate = { nullptr }; + +private: + HRESULT Initialize(STATE_THROW_DESC* pDesc); + +public: + static CState_Throw* Create(STATE_THROW_DESC* pDesc); + virtual void Free() override; + virtual void Describe_Entity(); +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Terrain.h b/Jusin154_Team3D/Client/Public/Terrain.h index 9374c0217..53e5a9b78 100644 --- a/Jusin154_Team3D/Client/Public/Terrain.h +++ b/Jusin154_Team3D/Client/Public/Terrain.h @@ -34,6 +34,7 @@ class CTerrain final : public CGameObject virtual void Update(_float fTimeDelta) override; virtual void Late_Update(_float fTimeDelta) override; virtual HRESULT Render() override; + virtual HRESULT Render_Shadow() override; private: CShader* m_pShaderCom = { nullptr }; diff --git a/Jusin154_Team3D/Client/Public/Troll.h b/Jusin154_Team3D/Client/Public/Troll.h index 15f4e212d..2314ae19b 100644 --- a/Jusin154_Team3D/Client/Public/Troll.h +++ b/Jusin154_Team3D/Client/Public/Troll.h @@ -9,6 +9,16 @@ NS_BEGIN(Client) class CTroll final : public CMonster { + enum class TROLL_SKILL + { + RUSH, + THROWROCK, + SLAM, + SWING, + BACKHAND_SWING, + END + }; + private: CTroll(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); CTroll(const CTroll& Prototype); @@ -32,6 +42,8 @@ class CTroll final : public CMonster _float2 m_vStunTimer = { 0.f, 4.f }; _uint iIndex; + _bool m_bLookAt = { true }; + private: virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; @@ -52,6 +64,12 @@ class CTroll final : public CMonster virtual void Add_FSM(); virtual void Set_Anim(); + _float m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::END)] = {}; + _float m_fMaxSkillCoolTime[ENUM_CLASS(TROLL_SKILL::END)] = { 20.f,15.f, 10.f, 5.f ,10.f}; + + + _float m_fRushTime = {}; + void Behavior_IdleEnter(); HRESULT Behavior_IdleExitCheck(); @@ -62,9 +80,21 @@ class CTroll final : public CMonster void Behavior_MoveExit(); void Behavior_CombatEnter(); - HRESULT Behavior_CombatExitCheck(); + HRESULT Behavior_CombatExitCheck(_float fTimeDelta); void Behavior_CombatExit(); + void Behavior_RushEnter(); + HRESULT Behavior_RushExitCheck(_float fTimeDelta); + void Behavior_RushExit(); + + void Behavior_ThrowEnter(); + HRESULT Behavior_ThrowExitCheck(_float fTimeDelta); + void Behavior_ThrowExit(); + + void Behavior_HitEnter(); + HRESULT Behavior_HitExitCheck(); + void Behavior_HitExit(); + }; NS_END diff --git a/Jusin154_Team3D/Client/Public/Troll_Rock.h b/Jusin154_Team3D/Client/Public/Troll_Rock.h new file mode 100644 index 000000000..3a91ef840 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Troll_Rock.h @@ -0,0 +1,50 @@ +#pragma once + +#include "Client_Define.h" +#include "PartObject.h" + +NS_BEGIN(Client) + +class CTroll_Rock final : public CPartObject +{ +public: + typedef struct tagTrollRock : public CPartObject::PARTOBJECT_DESC + { + const _float4x4* pSocketMatrices = { }; + }TROLLROCK_DESC; +private: + CTroll_Rock(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CTroll_Rock(const CTroll_Rock& Prototype); + virtual ~CTroll_Rock() = default; + +public: + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + virtual void Priority_Update(_float fTimeDelta) override; + virtual void Update(_float fTimeDelta) override; + virtual void Late_Update(_float fTimeDelta) override; + virtual HRESULT Render() override; + void Set_Attach(_bool Attach) { m_bAttach = Attach; } +public: + +private: + const _float4x4* m_pSocketMatrices = { }; + CShader* m_pShaderCom = { nullptr }; + CModel* m_pModelCom = { nullptr }; + _bool m_bAttach = { true }; + +private: + HRESULT Ready_Components(); + HRESULT Bind_ShaderResources(); + +public: + static CTroll_Rock* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr)override; + virtual void Free() override; + +#ifdef _DEBUG + void Describe_Entity() override; +#endif // _DEBUG +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Troll_State_Rush.h b/Jusin154_Team3D/Client/Public/Troll_State_Rush.h new file mode 100644 index 000000000..535fccf86 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Troll_State_Rush.h @@ -0,0 +1,36 @@ +#pragma once +#include "Client_Define.h" +#include "State_Root.h" + +NS_BEGIN(Client) + +class CTroll_State_Rush final : public CState_Root +{ +public: + typedef struct tagTrollRush : public CState_Root::STATE_ROOT_DESC { + function funcPriorityUpdate = { nullptr }; + function funcLateUpdate = { nullptr }; + }TROLL_STATE_RUSH_DESC; +public: + CTroll_State_Rush(); + virtual ~CTroll_State_Rush() = default; + +public: + virtual void Enter(); + virtual HRESULT Update(_float fTimeDelta); + virtual void Exit(); + +private: + function m_funcPriorityUpdate = { nullptr }; + function m_funcLateUpdate = { nullptr }; + +private: + HRESULT Initialize(TROLL_STATE_RUSH_DESC* pDesc); + +public: + static CTroll_State_Rush* Create(TROLL_STATE_RUSH_DESC* pDesc); + virtual void Free() override; + virtual void Describe_Entity(); +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/UI_Manager.h b/Jusin154_Team3D/Client/Public/UI_Manager.h new file mode 100644 index 000000000..f2771c59e --- /dev/null +++ b/Jusin154_Team3D/Client/Public/UI_Manager.h @@ -0,0 +1,55 @@ +#pragma once + +#include "Client_Define.h" +#include "UIObject.h" + +NS_BEGIN(Engine) +class CTexture; +class CShader; +class CVIBuffer_Rect; +NS_END + +NS_BEGIN(Client) + +class CUI_Manager final : public CUIObject +{ +private: + CUI_Manager(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CUI_Manager(const CUI_Manager& rhs); + virtual ~CUI_Manager() = 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_pGamePlay_Canves= { nullptr }; + CGameObject* m_pSpell_Panel = { nullptr }; + _bool m_bCanvas_Change = { false }; + +public: + static CUI_Manager* 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/Accio/Accio_Circle_S.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Accio/Accio_Circle_S.bin index afc7d3890..648c4805f 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Accio/Accio_Circle_S.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Accio/Accio_Circle_S.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d83deba0f1fd507154e78b1dbc0676d213ed603bf7ce482c11f946f5343cfd95 -size 839 +oid sha256:a3bed2b06ef49b09f7b4dbf0c5927add5194e3551da21899a6bd0ecc1fadb7d2 +size 939 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Circle0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Circle0.bin index 02a9868e4..740a20691 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Circle0.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Circle0.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6fcf86c040fd0122b778a7f85938f94f5ea57ed3daa3c729c5b44a9d2e4148df -size 835 +oid sha256:e50b40043abc993e440ef8023618377a6850af78b37f409dd87f13286d3530a0 +size 935 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Circle1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Circle1.bin index 245479070..09f29a8ad 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Circle1.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Circle1.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6d20b4f1e88798301e3cf0c99b841d1d29b6aa6001aa90196e5204470e7aff46 -size 792 +oid sha256:5f525cee6af33b6081124ecf3014272e741a025511068e743ab9cff201f98659 +size 892 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Explosion.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Explosion.bin index 1c3227471..41a5c9e1e 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Explosion.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Explosion.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ee7c4ef2c5231611a3ab3e7be5f8f02b1c414d333af2818d9db61d4fc42d1c60 -size 786 +oid sha256:481f42aebab4fb54c0398fb417b9d4f9d8059c1e931ce3294f59e06c1624adff +size 886 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_0.bin index 795379321..9f948d145 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_0.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_0.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b634351811718a4303a72b3467f33d655ef11852655a68d9254b9bd10a16a33d -size 794 +oid sha256:dfac4143e63b105b4722ada6b51c755031c7a5d1a6a1b1f6702500e2e0db8249 +size 894 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_1.bin index c26a138e7..defdcdbcf 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_1.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_1.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6efb883040983da9842d0d63d33d0beb1ac52c723a3341d2339e433eea0cf1a1 -size 794 +oid sha256:8581fe5c72a96f33e6cc1e9372e60e8a98b02dae52ed6c89df4194e60a2ee2a1 +size 894 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_2.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_2.bin index 1c8ad4c1a..d0e2df80b 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_2.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_2.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:955eef7ca633e7f2fdbc15fd7c9fa790597514261ee6251e9b223188db2a088c -size 786 +oid sha256:c0bd99b45ab1d462096243d144568eef6997b0dacd704b80b8223ade183f645d +size 886 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_3.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_3.bin index 428236f32..0197e4f1b 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_3.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_3.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:60262a4c7b411a60a94f8d8ecb462c823392843a76b05cc45e60c2635f58dd1a -size 786 +oid sha256:f465a38beb024d0f0669aab7273f5065faaf214a27936c5f403fa5e9d67db23f +size 886 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Projectile.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Projectile.bin index a9de34c41..54ffa3062 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Projectile.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Projectile.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b3c2c13577cd1bbd2102bb6dcbb26d3f49c1a89a7b7182e15535c929cf82e83d -size 891 +oid sha256:42850d82db4cf833592a3e51c8e7d4f2989023750fc5b63e1635be54639e3ec9 +size 991 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Shoot_Pt.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Shoot_Pt.bin index 264033c71..4be710324 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Shoot_Pt.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Shoot_Pt.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ee49a8543516ee8b355cd57a6e4113e1a14d0b5285e67bea1fa719b7fcffb875 -size 782 +oid sha256:a889cb0ca5943c3b78fdd4ab3d708f7260d7334a04b71dae2d478f92b3afb74e +size 882 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Smoke.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Smoke.bin index befd7ad57..0c244cde5 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Smoke.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Smoke.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eb72212ab3646a4c810c7e09a336ca47a6602bab438a008bcd06da9378b886cd -size 752 +oid sha256:a54751bd8a94c49eacb3f9b5afc138c5a8071181b858391503836cbef919c5be +size 852 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_1000.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BombardaSide/WandParticle_B_1000.bin new file mode 100644 index 000000000..cc9e25210 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BombardaSide/WandParticle_B_1000.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aa5377d551bf700d292b614acc1458be91daf1717076655859d7ccad7909c2b4 +size 867 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..a29e4ac2d --- /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:11160e4b0edc9cca952b9f68eaf231c076425a1e7dd1b86195915f8a838180de +size 888 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Circle_S.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Circle_S.bin index e0b45b15e..6b5e2b63d 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Circle_S.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Circle_S.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c13d37ddbf9695132ac9380ae229dbe83143cfee1b4038b635670ccc2f160b95 -size 797 +oid sha256:5629e044e8390265d86ac9cd8dfae59673e08208390180e59d45da9fc6e10c27 +size 897 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Down.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Down.bin index a89bfa266..f5e5742b5 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Down.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Down.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:07b393fdc9d29056444cdf05a9792ceb85faf159aed36e99c08f54ef55bf804d -size 804 +oid sha256:9ee22fe9593eff4015723d0d8526f33c7e90834ac3ddf4ad7d33dc8a327ddac7 +size 904 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..2cb05e324 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 -size 790 +oid sha256:8e2a236bcf8cae35368ed01fcccb6873a2210f75aa5e8c6e54b5756ef7fa09fa +size 890 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Proj.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Proj.bin index 7600168f5..424b432ed 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Proj.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Proj.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1bb55f887af262b00524d91abe848cb7d037ca69ac433a940a0fb4c25699dbcd -size 793 +oid sha256:2761dfc3b5917af0df5c1b434e75491913c66cad7588414eb6184da79699773e +size 893 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Proj_Blur.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Proj_Blur.bin index 03c68cf83..76520ec14 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Proj_Blur.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Proj_Blur.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:decf8c02d54d6896e53c1c1fc87620599628e794778684c7c1d534be19f23f49 -size 735 +oid sha256:827635b88486f686140dcc3cd9806ec133572665a415ddc6aa1b3353025f8210 +size 835 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Ring.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Ring.bin index c234d300a..6e73608eb 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Ring.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Ring.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:917ef367eba618aa8acdf1975419ed1b3ed090e4e6db26f69865324a27a6a77b -size 744 +oid sha256:47f2de238af5adc3832891ac4b3dc3ee5b3d92ee4bc383dca6f76fa0d8a2ad48 +size 844 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Smoke.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Smoke.bin index a69543fd8..928478520 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Smoke.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Smoke.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d3b8c8e33e690b492532fb02dab25682a7f88460c5667404fb3c59925498e529 -size 750 +oid sha256:bf55e46332043b2da88f0f74e016f7620bd3c7c7f72a8f9051f548fbbeafeb9a +size 850 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..a62c4f494 --- /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:a5494fa641c84396110a9a1e80b06c33b5e292f233f34d4964cd7f46f1c02b06 +size 888 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..2c19dc8c1 --- /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:e4cec5cefcfa83e8b4193509ba6de1a7816524dbfb0bd4f26999d03228410d5a +size 851 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapHit0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapHit0.bin index b05a16bee..3253918fe 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapHit0.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapHit0.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0b7b17589b7c377735516406c84b60454d07fb3cd4edbeaeee8c7005c1e7bafe -size 797 +oid sha256:655bd714a42eadc95b4d41ffe74c8c968206dab01e04595ee9203418c1ea3feb +size 897 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..d4d44d98b 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 -size 741 +oid sha256:ed3eef29187a74f09b19beb651b8024cae9e17a301cb224451f5359df7585ee1 +size 841 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapPT0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapPT0.bin index bd668f84f..44075743a 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapPT0.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapPT0.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5a10c067013027c37e167061cb20fc6695c280fb058fa12f200acf8c9013c059 -size 751 +oid sha256:b34960da0db6d6e6488a9a737b77a84d2f1da15d55be175809d5aeae80768a3e +size 851 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapProjCircle.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapProjCircle.bin index 05524e46e..ff3ed805e 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapProjCircle.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapProjCircle.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:40eca3e48af7becb4272a3f0ea9d7ce7a03a0ada3f0f3355e858502e5a0c913a -size 836 +oid sha256:866c3598f3dcf69c06b6eb415a294b54da59340f23885f1f713879af9f851ad6 +size 936 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapProjSide.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapProjSide.bin index 8a064b70b..b6feb04a2 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapProjSide.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapProjSide.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:13ac2760f5d00612ad6fbc7a6ad24ffd82dfb1de88a7d39f19d079efe46caba8 -size 754 +oid sha256:7154110fc59c28f63127691a101b416bc7b6a66b2c45df3f8beee3a11c8e015e +size 854 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..efb21335b --- /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:99d0c452ff523938f930d9bdeb401be7246f0e0bf68e33e57af40da86fd9d6ae +size 867 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..4ccade52d --- /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:b8a428576119c1b069415537544963fd87baac6bb9ea3542b40a661bebe456cf +size 857 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..4f7710b4b --- /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:44c44b0ddadba96b228607ddf33bcab3602c7b3d825470d19dc7d7e52a537537 +size 853 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..5d34d3aa1 --- /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:75e11e8734c60e7a033b6109e030c22ac5f4bbdf8bef218c155f0168cc7599d7 +size 892 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..b27cf4dc3 --- /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:4bddeb46fdc0aa29e830f2e55caf979ab1260d4c87d3b87eb7f4ba1b912ca6b3 +size 939 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_PJ0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_PJ0.bin index 09c99416b..a02ff11d6 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_PJ0.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_PJ0.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b34c04715c99f1a0f19d85f2a7d13a17f4070c7ab3c472f5e5fe1fc89dd8a422 -size 753 +oid sha256:6f412a3c9cc61b9897be339e0becfc73918320796402105c41da53f96ec5dacc +size 853 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_PJ1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_PJ1.bin index 49f37bc02..0673db8a7 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_PJ1.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_PJ1.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7210948fd6db0bb88816e6a8b12d65d80f652df9a08c3ad0619491498a2833b7 -size 753 +oid sha256:319fe742ef89578672a46967e72a57bb1bd2da819f62c179018e9af0dc59f1d3 +size 853 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..82c53ebab 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:b7899e3ebc6b3157e506d62b31fe3888bf526bbfe383bf4be07cd3be6ff0f227 +size 838 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..224d04817 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:7297f113d785577593be60e434bde09ac60b054809b3d95c39575f1cc147fb5e +size 846 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..5b22c5cea --- /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:df22e4d123a08a04508db872fa27b2900a31f48d9cacc4c1274fa939098ca49d +size 900 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_Wand0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_Wand0.bin index c801ec930..44b316c81 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_Wand0.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_Wand0.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:82a42de5c4b3cb91698a6d430d7912b2c53820a21e4db6dccd6dd10bfa15ed5b -size 792 +oid sha256:24566c9354ec546adfc670b692990028a44ee6fc2cf8bc0fe1422eb3d140afb7 +size 892 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_Wand1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_Wand1.bin index 1b0d933ef..34ed9599f 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_Wand1.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_Wand1.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:150e241cbe575d683f005d868389c7cdca26d1d3fd76dc4fe7a5688fec2c7230 -size 795 +oid sha256:7c95be2f94699ed455661bc05c2c6e7ccb298aad4b6fc6a9ccbff9070b48a103 +size 895 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Trail_PT0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Trail_PT0.bin index cb42d5a41..c8cd8af1b 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Trail_PT0.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Trail_PT0.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bd33f0220332dd3e3d1757bd84f9431c1b765231cd712ebf52a62fabf88b92ca -size 767 +oid sha256:20d45a87e080237af7768c9efa2bfcd008264fd1c982dce56de64ac4ab267806 +size 867 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..689279aa8 --- /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:4e666bd02c8c1f6941aa07c6497ca554b1edaa1806f3da899141c2f8746e3575 +size 888 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..b411df6b0 --- /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:a8cd98241e6ed7710e6c94be4288380f5b3582a68cafa46fb4140d36225c16ab +size 888 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..047c88312 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 -size 788 +oid sha256:ef304de9bd29c370c8913990795ce36b52015f60383bc1dc67fe956c3aa04669 +size 888 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/.bin new file mode 100644 index 000000000..d3f56394f --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:274f316e589af69601de1ec5c3a5e06f2d3a78942b26474031c2a5879a9df64c +size 215 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..68fda040c --- /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:4a65a5763ee680040b777409809e582bb55d305675c220b210a39b1ad3e04cba +size 215 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/ProtegoBottom.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Protego/ProtegoBottom.bin index 529383ee2..ec43553c4 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Protego/ProtegoBottom.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Protego/ProtegoBottom.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2ef4f0f69c76ece5052d20bc5e3c973946bf7fb05389328588e847d03340e36a -size 773 +oid sha256:ef55aaa0fdc935451e45f7da63e2151fde3a7101d15272a70d0d321bc6bc3bd0 +size 881 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..b223f7dab 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 -size 821 +oid sha256:afcdad5afe65cae81f622006e26fe9d3f4d6efba14cda100c946d2dd9117f185 +size 929 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Protego/ProtegoHitPT0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Protego/ProtegoHitPT0.bin index 17f0b143a..a859c20dc 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Protego/ProtegoHitPT0.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Protego/ProtegoHitPT0.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:68c1f30b04e34de8d64962abc440519e863016810ff007445f7727ccca858403 -size 786 +oid sha256:8781d89f88cc91b41a69943b1fb356f108979b6b5cecd21bf9e33c72fba50b49 +size 886 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Protego/ProtegoHit_Lay.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Protego/ProtegoHit_Lay.bin index 17f0f4c6a..ca2c359cf 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Protego/ProtegoHit_Lay.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Protego/ProtegoHit_Lay.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e612c8122588bf5a59b81ddd6a0b265a01db1b832297c3377b22de589c67bfa2 -size 776 +oid sha256:d7151cc27d6c1e91208bfb2ad06c59b454473ba8b95e998df16154755a3f93d2 +size 876 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Protego/ProtegoHit_Spread.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Protego/ProtegoHit_Spread.bin index 0334dbe75..d6baa7e2a 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Protego/ProtegoHit_Spread.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Protego/ProtegoHit_Spread.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:380fd7a2f3ec29a3fcd15494e16225a2ee945410c9c2474c2daa9cff432774ad -size 739 +oid sha256:7f7f214d6baccfa885eae74371c77ff387788b25303dcab97f3e066cd8297292 +size 839 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Protego/ProtegoSphere.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Protego/ProtegoSphere.bin index 6f7b5a899..3eee1a32d 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Protego/ProtegoSphere.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Protego/ProtegoSphere.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d683e9c7b724752b5a173204c14ea6adb7499ab21fe89fb71957e5f5ca9563d4 -size 796 +oid sha256:a9d98ee731a134a8e63dbf0fbf71c51d3b4e953c56f0bb29cee99f404212e71c +size 904 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Revelio/Revelio_Ring.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Revelio/Revelio_Ring.bin index 517f86b0c..6594176a7 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Revelio/Revelio_Ring.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Revelio/Revelio_Ring.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cabd9577d7053ac437a4132bdffdb7b6d89606aa6f6ab38eebf04ecc94f27e44 -size 821 +oid sha256:2ae29120bf3fa3ff0a8b046d9780469eed58072fdc5e9ef6414efa29c78ef9e6 +size 921 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Revelio/WandPT_B.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Revelio/WandPT_B.bin index 30c3774c1..07fe64d72 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Revelio/WandPT_B.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Revelio/WandPT_B.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e7a71800b39699fa672419fa5c43899cca1661fe54968afbab03e10df6bf5d71 -size 767 +oid sha256:f559dae3ec7dd4b09a6dc6bb36679675f9a85de3717a3e838c07882042e5d7ed +size 867 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Revelio/WandPT_R.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Revelio/WandPT_R.bin index acf55c7c4..60f736a68 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Revelio/WandPT_R.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Revelio/WandPT_R.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cbd63053318fdc5dfbc052728618c89bb398b8b0c6a8e83b6139e2f653f2f769 -size 767 +oid sha256:9c9ded88d15c8f30df4ec6902f6e7e6958f854abfb75a11fa96c9811d6fe9030 +size 867 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Revelio/WandPT_Y.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Revelio/WandPT_Y.bin index 8f9738e55..bb6fe87ce 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Revelio/WandPT_Y.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Revelio/WandPT_Y.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6b9594eb0d4d3f79df97e87c611a682c3f5c7be2fee0c0474a2e44a36e71f702 -size 767 +oid sha256:2c8e1dabde157cd3c66883b33abdce1d8ad56a78c05d48ebca521a8d75e41e06 +size 867 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..7a4caa62e --- /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:d2450d2e39e80e4c256a360e3e3bc7de99f8c3d7caa537384f34f6abd825d4f2 +size 849 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..96ae5b7f2 --- /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:f2ab30832be2d0139ac2b9d4dc44d79d49b3d58e07fe2b50cf7fe475eb4c7e7a +size 851 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/WandParticle/WandParticle0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/WandParticle/WandParticle0.bin index 5d3b112ef..8fab88bf8 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/WandParticle/WandParticle0.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/WandParticle/WandParticle0.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:52537383fa5aab23dd74558b179937edfeecfb326a72894d7959b926f50f4edb -size 794 +oid sha256:039300ca6048836a37b4f76497599d2d36ab74e40c50e660d72cdeddf5ace1e4 +size 894 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..3161917de --- /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:ecd4eb0156ff2ba3c535e10f0765c150d5a6391552d3b0995d4a5c55208448ce +size 867 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..035aaa208 --- /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:ea59c900924414e9335eea8c0bab76568457414b1b93d197b1c5f8fbba8efa6c +size 867 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..731622d77 --- /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:e4d55c6250744fea5b4d553ece9ebf7a11557b976e3dd3f9461b44259a680645 +size 867 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..18e7de0dc --- /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:35d020e1b4c81b2895d56b9a7a934fbe585bf9695f1869fde0c1d5e443139c05 +size 867 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Accio/Accio_Circle_S.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Accio/Accio_Circle_S.bin index d115073ec..afc7d3890 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Accio/Accio_Circle_S.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Accio/Accio_Circle_S.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c2bf5cc23fc8552da37e6741cd24a65f0b996130e1f9a89c4219e50ac294351f -size 831 +oid sha256:d83deba0f1fd507154e78b1dbc0676d213ed603bf7ce482c11f946f5343cfd95 +size 839 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_Circle0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_Circle0.bin index 3220ea2ce..02a9868e4 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_Circle0.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_Circle0.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5cd2cac8ab276d9d4fd31f2533a7f707d6424b4e11ca8ef0f3572e00b03a008c -size 827 +oid sha256:6fcf86c040fd0122b778a7f85938f94f5ea57ed3daa3c729c5b44a9d2e4148df +size 835 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_Circle1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_Circle1.bin index 8e3a1e3d8..245479070 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_Circle1.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_Circle1.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3e2c2978c591495ec06a38b4d193270647aeb3b64f3cc07d8db9f0f9ea9ef925 -size 784 +oid sha256:6d20b4f1e88798301e3cf0c99b841d1d29b6aa6001aa90196e5204470e7aff46 +size 792 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_Explosion.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_Explosion.bin index ff7fbba6a..1c3227471 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_Explosion.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_Explosion.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e54c67374a8923f7a5bfa88ac7c8e53fc68f5fea4e10df28860c96d7b7930da7 -size 778 +oid sha256:ee7c4ef2c5231611a3ab3e7be5f8f02b1c414d333af2818d9db61d4fc42d1c60 +size 786 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_PT_0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_PT_0.bin index 3d536a2b7..795379321 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_PT_0.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_PT_0.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:78711c1544f2eadcbeb97bde9b045464206702607f2b4b100be1798ffa332b2a -size 786 +oid sha256:b634351811718a4303a72b3467f33d655ef11852655a68d9254b9bd10a16a33d +size 794 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_PT_1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_PT_1.bin index 7a603cc21..c26a138e7 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_PT_1.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_PT_1.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a0a099812def747e4eddca7b066f347954d17616d7db7f33f00175685a36dac5 -size 786 +oid sha256:6efb883040983da9842d0d63d33d0beb1ac52c723a3341d2339e433eea0cf1a1 +size 794 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_PT_2.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_PT_2.bin index c4a99ddbd..1c8ad4c1a 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_PT_2.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_PT_2.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f9c42ced504f7a03db0c2a423c4296f3088232a5529d789dc49c3f0ee357dcd3 -size 778 +oid sha256:955eef7ca633e7f2fdbc15fd7c9fa790597514261ee6251e9b223188db2a088c +size 786 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_PT_3.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_PT_3.bin index d34b03ddd..428236f32 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_PT_3.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_PT_3.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d72b0c6d5377dfb985788c02eccabfc784ada0aa6ca6ebb24325b309ed9b687f -size 778 +oid sha256:60262a4c7b411a60a94f8d8ecb462c823392843a76b05cc45e60c2635f58dd1a +size 786 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_Projectile.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_Projectile.bin index 671de07dd..a9de34c41 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_Projectile.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_Projectile.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7de9e39539c6aaed7ad15e65dbaad3bb59b512b40696f204f32f31b0a69c02e0 -size 883 +oid sha256:b3c2c13577cd1bbd2102bb6dcbb26d3f49c1a89a7b7182e15535c929cf82e83d +size 891 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_Shoot_Pt.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_Shoot_Pt.bin index dea3305fd..264033c71 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_Shoot_Pt.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_Shoot_Pt.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6e7bf7c421f1abb427d79d7087fd3bfa3319c298aeadcd0dfb18f6468417e40e -size 774 +oid sha256:ee49a8543516ee8b355cd57a6e4113e1a14d0b5285e67bea1fa719b7fcffb875 +size 782 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_Smoke.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_Smoke.bin index ef0ee50bb..befd7ad57 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_Smoke.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard/Bombard_Smoke.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e69b8f0c3d92647677ea0f8620e4fa09efe4929af532fcbe7f64942286c9144a -size 733 +oid sha256:eb72212ab3646a4c810c7e09a336ca47a6602bab438a008bcd06da9378b886cd +size 752 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_1000.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/BombardaSide/WandParticle_B_1000.bin new file mode 100644 index 000000000..05aab4029 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/BombardaSide/WandParticle_B_1000.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b98874b8c2c024e8dc4b82642e1184aee0b4281ae1686a2ef384c4bccdd65c7d +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_Circle_S.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Decendo/Decendo_Circle_S.bin index 12e74d397..e0b45b15e 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Decendo/Decendo_Circle_S.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Decendo/Decendo_Circle_S.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a0a1160cd6174e5e4f5a1a147f7604be06e5936f7cd14a517cf652bb71027fc3 -size 789 +oid sha256:c13d37ddbf9695132ac9380ae229dbe83143cfee1b4038b635670ccc2f160b95 +size 797 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Decendo/Decendo_Down.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Decendo/Decendo_Down.bin index 7f666b151..a89bfa266 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Decendo/Decendo_Down.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Decendo/Decendo_Down.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ee26976d55889743fbc9c3a1a6c9f3784329be7fca0be20b402151a7c0c31ecd -size 796 +oid sha256:07b393fdc9d29056444cdf05a9792ceb85faf159aed36e99c08f54ef55bf804d +size 804 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 ed63dc03d..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:8fca99578f52464d9210dddcf095ca7445e6e3990569ce63d0135dab9ce1569c -size 782 +oid sha256:966199250324aa27eff380440b0307b756b5c93ab2ba1a06be7cee3c08079e53 +size 790 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Decendo/Decendo_Proj.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Decendo/Decendo_Proj.bin index f9d6173d4..7600168f5 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Decendo/Decendo_Proj.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Decendo/Decendo_Proj.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2acf190d3c5e4cc435dc9d4c779a16bd3e038a9e9d3ff525aede0eb4429810f9 -size 785 +oid sha256:1bb55f887af262b00524d91abe848cb7d037ca69ac433a940a0fb4c25699dbcd +size 793 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Decendo/Decendo_Proj_Blur.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Decendo/Decendo_Proj_Blur.bin index 77946c4e1..03c68cf83 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Decendo/Decendo_Proj_Blur.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Decendo/Decendo_Proj_Blur.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:53bea717bfb06b0cc35cc7d5dd8fe5fedca496b2024ad36a1a4f339b1e0ca721 -size 727 +oid sha256:decf8c02d54d6896e53c1c1fc87620599628e794778684c7c1d534be19f23f49 +size 735 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Decendo/Decendo_Ring.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Decendo/Decendo_Ring.bin index 1616d8b63..c234d300a 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Decendo/Decendo_Ring.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Decendo/Decendo_Ring.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b4d3d7efac71a15692c2fedf7972738d53d1256ab8903186df3b97fc2dee5584 -size 736 +oid sha256:917ef367eba618aa8acdf1975419ed1b3ed090e4e6db26f69865324a27a6a77b +size 744 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Decendo/Decendo_Smoke.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Decendo/Decendo_Smoke.bin index 1041d2545..a69543fd8 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Decendo/Decendo_Smoke.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Decendo/Decendo_Smoke.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:327430f164c39a71db837f67390c0d499bcdd1b5092b466a6e25be278514f24e -size 735 +oid sha256:d3b8c8e33e690b492532fb02dab25682a7f88460c5667404fb3c59925498e529 +size 750 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Decendo/Proj_Trail.trail b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Decendo/Proj_Trail.trail index 794673e24..7351c6b10 100644 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Decendo/Proj_Trail.trail and b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Decendo/Proj_Trail.trail differ 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/JapHit0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Jap/JapHit0.bin index 0e7f9710b..b05a16bee 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Jap/JapHit0.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Jap/JapHit0.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ab1a346e5f1b62d152251891bb5102fb1420207a6ce74a30d32e0c54eccbef99 -size 789 +oid sha256:0b7b17589b7c377735516406c84b60454d07fb3cd4edbeaeee8c7005c1e7bafe +size 797 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 433acbffa..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:f7ec55a9b1000126f568a9c764716222eebd343a20815609e266dfd1d43a536f -size 733 +oid sha256:642c939fa532791b45d8c241a63ce5c9059c964f5e5099b9e400b11a24f315bf +size 741 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Jap/JapPT0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Jap/JapPT0.bin index e96509260..bd668f84f 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Jap/JapPT0.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Jap/JapPT0.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4fc7b219cd30345b621339926808bc140397cf1064e2f3dcf6d13772dbb56aea -size 743 +oid sha256:5a10c067013027c37e167061cb20fc6695c280fb058fa12f200acf8c9013c059 +size 751 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Jap/JapProjCircle.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Jap/JapProjCircle.bin index 9169ff50d..05524e46e 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Jap/JapProjCircle.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Jap/JapProjCircle.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5c7dca44cd93b2f92665ebbddf455836af2dd6bc77b0552a41ae98bfb26cc130 -size 828 +oid sha256:40eca3e48af7becb4272a3f0ea9d7ce7a03a0ada3f0f3355e858502e5a0c913a +size 836 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Jap/JapProjSide.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Jap/JapProjSide.bin index 18e2fd193..8a064b70b 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Jap/JapProjSide.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Jap/JapProjSide.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a99edf82ca4e85ef52103f1526662df974fed740d4cde00b23ef90cebbb54ac0 -size 746 +oid sha256:13ac2760f5d00612ad6fbc7a6ad24ffd82dfb1de88a7d39f19d079efe46caba8 +size 754 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Jap/JapTrail.trail b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Jap/JapTrail.trail index 89f6075fc..8b7c1bde9 100644 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Jap/JapTrail.trail and b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Jap/JapTrail.trail differ 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..41779e16a --- /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:6c561e5a3e2dd88e10eee975f9efb8bf7d7b220b2cd9a5c4f999c202b101ea4e +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_PJ0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Levioso/Levioso_PJ0.bin new file mode 100644 index 000000000..09c99416b --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Levioso/Levioso_PJ0.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b34c04715c99f1a0f19d85f2a7d13a17f4070c7ab3c472f5e5fe1fc89dd8a422 +size 753 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Levioso/Levioso_PJ1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Levioso/Levioso_PJ1.bin new file mode 100644 index 000000000..49f37bc02 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Levioso/Levioso_PJ1.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7210948fd6db0bb88816e6a8b12d65d80f652df9a08c3ad0619491498a2833b7 +size 753 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 new file mode 100644 index 000000000..472cb7866 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Levioso/Levioso_Rotate0.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:07f6c8db380460080c25c6ba8d2a75ec35b238f06912f87381cb00d475222947 +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 new file mode 100644 index 000000000..3d055f3d9 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Levioso/Levioso_Rotate1.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9343ace5d666ee5ea23fdc16f110689e440cc2b785d4f1018ca4bbeedc446617 +size 746 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/Levioso_Trail.trail b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Levioso/Levioso_Trail.trail new file mode 100644 index 000000000..ac9950a87 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Levioso/Levioso_Trail.trail differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Levioso/Levioso_Wand0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Levioso/Levioso_Wand0.bin new file mode 100644 index 000000000..c801ec930 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Levioso/Levioso_Wand0.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:82a42de5c4b3cb91698a6d430d7912b2c53820a21e4db6dccd6dd10bfa15ed5b +size 792 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Levioso/Levioso_Wand1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Levioso/Levioso_Wand1.bin new file mode 100644 index 000000000..1b0d933ef --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Levioso/Levioso_Wand1.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:150e241cbe575d683f005d868389c7cdca26d1d3fd76dc4fe7a5688fec2c7230 +size 795 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Levioso/Trail_PT0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Levioso/Trail_PT0.bin new file mode 100644 index 000000000..cb42d5a41 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Levioso/Trail_PT0.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bd33f0220332dd3e3d1757bd84f9431c1b765231cd712ebf52a62fabf88b92ca +size 767 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 6ecb3df7a..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:b690e81dd42790f6d1b03fdbf823e83784d1cb89a9b139f94ed80d2c7f5380bf -size 780 +oid sha256:8f28da93aee35bcbd4bc3f8776385c98e81c5eab19febad4b7c3b6d03c10046b +size 788 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Package/.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Package/.bin new file mode 100644 index 000000000..d3f56394f --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Package/.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:274f316e589af69601de1ec5c3a5e06f2d3a78942b26474031c2a5879a9df64c +size 215 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..68fda040c --- /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:4a65a5763ee680040b777409809e582bb55d305675c220b210a39b1ad3e04cba +size 215 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 new file mode 100644 index 000000000..093a46379 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Package/Levioso.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +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/임시공간/Package/Revelio.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Package/Revelio.bin new file mode 100644 index 000000000..4c8852970 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Package/Revelio.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:361c1b52fd37940363fcd6713e1d77401a655af5c27d3b9f4f47ea116cb5379d +size 240 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Protego/ProtegoBottom.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Protego/ProtegoBottom.bin index 2f7d8434e..529383ee2 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Protego/ProtegoBottom.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Protego/ProtegoBottom.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:77c368ed0bc69d1a6b60a57f095f26a404bf24935ccc0a6bb6a0978c9d4bf4a5 -size 765 +oid sha256:2ef4f0f69c76ece5052d20bc5e3c973946bf7fb05389328588e847d03340e36a +size 773 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 eabcd41cf..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:bc72435b4a6f4e6967ae102984550a71b939814b62a0eb75aac83b04b4434b17 -size 813 +oid sha256:d069692bf8d31a3d42368f0024d4bbc39db4a88e91ed44ad0b550100cd1a3182 +size 821 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Protego/ProtegoHitPT0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Protego/ProtegoHitPT0.bin index 17f12c747..17f0b143a 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Protego/ProtegoHitPT0.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Protego/ProtegoHitPT0.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4cd384656c079050a6fa86826b67c60af75b965fcae7bcb88731e4520f236b20 -size 778 +oid sha256:68c1f30b04e34de8d64962abc440519e863016810ff007445f7727ccca858403 +size 786 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Protego/ProtegoHit_Lay.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Protego/ProtegoHit_Lay.bin index 9801486e7..17f0f4c6a 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Protego/ProtegoHit_Lay.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Protego/ProtegoHit_Lay.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d22778a865b08222d8c7ab5fffdf7328695da0c7c3884dfe0189d921aa804e06 -size 768 +oid sha256:e612c8122588bf5a59b81ddd6a0b265a01db1b832297c3377b22de589c67bfa2 +size 776 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Protego/ProtegoHit_Spread.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Protego/ProtegoHit_Spread.bin index 7c3165252..0334dbe75 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Protego/ProtegoHit_Spread.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Protego/ProtegoHit_Spread.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b85a944d7dc1dc71a57692ec241a1fc02abb6b01103fbfc9db61aa94ca696e8f -size 731 +oid sha256:380fd7a2f3ec29a3fcd15494e16225a2ee945410c9c2474c2daa9cff432774ad +size 739 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Protego/ProtegoSphere.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Protego/ProtegoSphere.bin index 45b78801f..6f7b5a899 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Protego/ProtegoSphere.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Protego/ProtegoSphere.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d2e4951899658e80e4f5bc6d4915e28dd752fc79b424bd513165585bd1785277 -size 788 +oid sha256:d683e9c7b724752b5a173204c14ea6adb7499ab21fe89fb71957e5f5ca9563d4 +size 796 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Revelio/Revelio_Ring.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Revelio/Revelio_Ring.bin new file mode 100644 index 000000000..517f86b0c --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Revelio/Revelio_Ring.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cabd9577d7053ac437a4132bdffdb7b6d89606aa6f6ab38eebf04ecc94f27e44 +size 821 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Revelio/WandPT_B.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Revelio/WandPT_B.bin new file mode 100644 index 000000000..30c3774c1 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Revelio/WandPT_B.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e7a71800b39699fa672419fa5c43899cca1661fe54968afbab03e10df6bf5d71 +size 767 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Revelio/WandPT_R.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Revelio/WandPT_R.bin new file mode 100644 index 000000000..acf55c7c4 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Revelio/WandPT_R.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cbd63053318fdc5dfbc052728618c89bb398b8b0c6a8e83b6139e2f653f2f769 +size 767 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Revelio/WandPT_Y.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Revelio/WandPT_Y.bin new file mode 100644 index 000000000..8f9738e55 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Revelio/WandPT_Y.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b9594eb0d4d3f79df97e87c611a682c3f5c7be2fee0c0474a2e44a36e71f702 +size 767 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 ab9269e93..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/WandParticle0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/WandParticle/WandParticle0.bin index d175da4f2..5d3b112ef 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/WandParticle/WandParticle0.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/WandParticle/WandParticle0.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:66baf1f85c4a6e25adb180fa2abd0d7566e92aaab034dbbec8923aeb38ec70db -size 786 +oid sha256:52537383fa5aab23dd74558b179937edfeecfb326a72894d7959b926f50f4edb +size 794 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/Models/Object/Troll_Rock/T_PuzzleDoor_wall_Diff.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Troll_Rock/T_PuzzleDoor_wall_Diff.png new file mode 100644 index 000000000..5bb64474d Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Troll_Rock/T_PuzzleDoor_wall_Diff.png differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Troll_Rock/T_PuzzleDoor_wall_Norm.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Troll_Rock/T_PuzzleDoor_wall_Norm.png new file mode 100644 index 000000000..dad383f85 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Troll_Rock/T_PuzzleDoor_wall_Norm.png differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Troll_Rock/Troll_Rock_Big.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Troll_Rock/Troll_Rock_Big.bin new file mode 100644 index 000000000..4fbfe563e --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Troll_Rock/Troll_Rock_Big.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7b81c42d2417a92fc56ba61080a48e2ba6323f7da4cf2891e5f819feba0c7db9 +size 18676 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Troll_Rock/Troll_Rock_Big.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Troll_Rock/Troll_Rock_Big.fbx new file mode 100644 index 000000000..84619ad82 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Troll_Rock/Troll_Rock_Big.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a67aceecf3a9b0ceb2b10ac0e941501428d7c2856e52a43e86a285a647b74107 +size 25420 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli index 9a1e75e37..c07dd7727 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli @@ -30,10 +30,14 @@ float ShadowVisibility_hwPCF(Texture2D ShadowMap, float4 vLightClip, float2 vSha for (int u = -1; u <= 1; ++u) { float2 vOffset = float2(u, v) * vTexel; - float fDepth = ShadowMap.Sample(DefaultSampler, uv + vOffset).x; + float fDepth = ShadowMap.Sample(BorderOneSampler, uv + vOffset); fVisibility += (fDepthCenter - bias > fDepth) ? 0.f : 1.f; } } + if (abs(fVisibility - 9.f) < FLT_EPSILON3) + { + fVisibility = 9.f; + } return fVisibility / 9.f; } @@ -158,9 +162,9 @@ PBR_LIGHT_OUT PBR_Lighting( float NdotV = saturate(dot(vNormal, vToView)); if (NdotL <= 0 || NdotV <= 0) { - return Out; Out.vShade = 0; Out.vSpecular = 0; + return Out; } float fAlpha = max(fRoughness * fRoughness, 0.04f); @@ -283,7 +287,7 @@ float4x4 RotateAxis(float4 _vAxis , float fAngle) ); } - float3 vAxis = normalize(_vAxis); + float3 vAxis = normalize(_vAxis).xyz; float fCos = cos(radians(fAngle)); float fSin = sin(radians(fAngle)); @@ -343,7 +347,30 @@ float2 SelectLerpUV(float2 fAmount, float _fRatio, int iSelectOption) } return fAmount * fRatio; - } +float3 ReinHard_ToneMapper(float3 vColor) +{ + float k = 1.f; + vColor = (vColor / (vColor + k)); + return pow(vColor, 1.f / 2.2f); +} + +float3 Filmic_ToneMapper(float3 vColor) +{ + const float fA = 2.51f; + const float fB = 0.03f; + const float fC = 2.43f; + const float fD = 0.59f; + const float fE = 0.14f; + + vColor = saturate( + vColor * (fA * vColor + fB) + / (vColor * (fC * vColor + fD) + fE) + ); + + return pow(vColor, 1.f / 2.2f); +} + + #endif // ENGINE_SHADER_FUNCTIONS_HLSLI diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Samplers.hlsli b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Samplers.hlsli index fc1fa297c..2e950e2c6 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Samplers.hlsli +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Samplers.hlsli @@ -39,7 +39,15 @@ sampler BorderZeroSampler = sampler_state Filter = MIN_MAG_MIP_POINT; AddressU = Border; AddressV = Border; - BorderColor = float4(0, 0, 0, 0); + BorderColor = float4(0.f, 0.f, 0.f, 0.f); +}; + +sampler BorderOneSampler = sampler_state +{ + Filter = MIN_MAG_MIP_POINT; + AddressU = Border; + AddressV = Border; + BorderColor = float4(1.f, 1.f, 1.f, 1.f); }; sampler PointSampler = sampler_state diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl index ba4bb829d..b59cd1543 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl @@ -12,7 +12,7 @@ uint g_iMaxShadowHeight; float2 g_vResolution; uint g_iBloomEmbossingPass; -float g_fThreshold; +float g_fBloomThreshold; float g_fDepthThreshold; float g_fFocusDistance; float g_fFarBlurStart; @@ -25,6 +25,8 @@ float g_fLightRange; float g_fSpotInnerAngle; float g_fSpotOuterAngle; +float g_fToneMappingExposure; +uint g_iToneMappingType; bool g_bUsePowerLightAttenuation; float g_fLightAttenuationPower; @@ -40,7 +42,7 @@ Texture2D g_DiffuseTexture; Texture2D g_ShadeTexture; Texture2D g_DepthTexture; Texture2D g_SpecularTexture; -Texture2D g_ShadowTexture; +Texture2D g_ShadowNearTexture; Texture2D g_PreShadowTexture; Texture2D g_BlurTexture; Texture2D g_BlurXTexture; @@ -127,6 +129,8 @@ struct PS_OUT_LIGHT PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In) { PS_OUT_LIGHT Out; + Out.vShade = 0.f; + Out.vSpecular = 0.f; float2 uv = In.vTexcoord; @@ -184,7 +188,6 @@ PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In) return Out; } - //float fDiffuseAOStrength = lerp(0.3f, 3.f, fOcclusion); { // 수치조정 // 디렉셔널 float fMinRoughness = 0.05f; fRoughness = max(fRoughness, fMinRoughness); // 러프니스 최소값 보장 @@ -199,7 +202,7 @@ PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In) float3 vAmbient = g_vLightAmbient.rgb * fOcclusion * fAttenuation; float3 vFinalDiffuse = PBR_Out.vShade + vAmbient; float3 vFinalSpecular = PBR_Out.vSpecular * g_vLightSpecular.rgb; - + Out.vShade = float4(vFinalDiffuse, 1.f); Out.vSpecular = float4(vFinalSpecular, 1.f); @@ -209,6 +212,8 @@ PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In) PS_OUT_LIGHT PS_MAIN_POINT(PS_IN In) { PS_OUT_LIGHT Out; + Out.vShade = 0.f; + Out.vSpecular = 0.f; float2 uv = In.vTexcoord; @@ -285,7 +290,6 @@ PS_OUT_LIGHT PS_MAIN_POINT(PS_IN In) return Out; } - //float fDiffuseAOStrength = lerp(0.3f, 3.f, fOcclusion); { // 수치조정 // 점광원 float fMinRoughness = 0.05f; fRoughness = max(fRoughness, fMinRoughness); // 러프니스 최소값 보장 @@ -310,6 +314,8 @@ PS_OUT_LIGHT PS_MAIN_POINT(PS_IN In) PS_OUT_LIGHT PS_MAIN_SPOT(PS_IN In) { PS_OUT_LIGHT Out; + Out.vShade = 0.f; + Out.vSpecular = 0.f; float2 uv = In.vTexcoord; @@ -415,7 +421,7 @@ PS_OUT_LIGHT PS_MAIN_SPOT(PS_IN In) float3 vAmbient = g_vLightAmbient.rgb * fOcclusion * fAttenuation; float3 vFinalDiffuse = PBR_Out.vShade + vAmbient; float3 vFinalSpecular = PBR_Out.vSpecular * g_vLightSpecular.rgb; - + Out.vShade = float4(vFinalDiffuse, 1.f); Out.vSpecular = float4(vFinalSpecular, 1.f); @@ -503,10 +509,11 @@ PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In) vPreShadowTexcoord.y = (vPreShadowPosition.y / vPreShadowPosition.w) * -0.5f + 0.5f; /* 광원의 NDC에서 샘플링 */ - float fVisibility_Dynamic = ShadowVisibility_hwPCF(g_ShadowTexture, vPosition, float2(g_iMaxShadowWidth, g_iMaxShadowHeight), 0.0005f); + float fVisibility_Dynamic_Near = ShadowVisibility_hwPCF(g_ShadowNearTexture, vPosition, float2(g_iMaxShadowWidth, g_iMaxShadowHeight), 0.0005f); float fVisibility_Static = ShadowVisibility_hwPCF(g_PreShadowTexture, vPreShadowPosition, float2(g_iMaxShadowWidth, g_iMaxShadowHeight), 0.0005f); - Out.vBackBuffer.rgb *= lerp(0.5f, 1.f, min(fVisibility_Dynamic, fVisibility_Static)); + Out.vBackBuffer.rgb *= lerp(0.25f, 1.f, lerp(fVisibility_Dynamic_Near, fVisibility_Static, vDepthDesc.y)); + float4 vColor = 0.f; @@ -515,7 +522,7 @@ PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In) vTexcoord.x = In.vTexcoord.x; vTexcoord.y = In.vTexcoord.y + (float) i / g_vResolution.y; - vColor += g_fWeights_128[i + 63] * g_BlurXTexture.Sample(ClampSampler, vTexcoord); + vColor += g_fWeights_128[i + 63] * g_BlurXTexture.Sample(BorderZeroSampler, vTexcoord); } Out.vBackBuffer += vColor; @@ -535,7 +542,7 @@ PS_OUT_FLT4_SINGLE PS_MAIN_REFIT(PS_IN In) { PS_OUT_FLT4_SINGLE Out; - Out.vSingleTarget = g_DiffuseTexture.Sample(PointSampler, In.vTexcoord); + Out.vSingleTarget = g_DiffuseTexture.Sample(BorderZeroSampler, In.vTexcoord); return Out; } @@ -544,8 +551,8 @@ PS_OUT_FLT4_SINGLE PS_MAIN_EMBOSS(PS_IN In) { PS_OUT_FLT4_SINGLE Out; - vector vInput = g_DiffuseTexture.Sample(PointSampler, In.vTexcoord); - //float fMask = g_BloomMaskTexture.Sample(PointSampler, In.vTexcoord).a; + vector vInput = g_DiffuseTexture.Sample(BorderZeroSampler, In.vTexcoord); + //float fMask = g_BloomMaskTexture.Sample(BorderZeroSampler, In.vTexcoord).a; float3 vColor = vInput.rgb; uint iMask = (uint) round(vInput.a * 255.f); // int a = 1 -> // vBloom.a = (enum / 255); @@ -574,7 +581,7 @@ PS_OUT_FLT4_SINGLE PS_MAIN_EMBOSS(PS_IN In) return Out; } - float fBloomIntensity = GetBloomCurve(fIntensity, g_fThreshold, g_iBloomEmbossingPass); + float fBloomIntensity = GetBloomCurve(fIntensity, g_fBloomThreshold, g_iBloomEmbossingPass); float3 bloomColor = (vColor * fBloomIntensity) / fIntensity; Out.vSingleTarget = float4(bloomColor, 1.f); @@ -593,7 +600,7 @@ PS_OUT_FLT4_SINGLE PS_MAIN_BLOOM_ACCUM(PS_IN In) PS_OUT_FLT4_SINGLE Out; float3 vColorSrcA = g_DiffuseTexture.Sample(PointSampler, In.vTexcoord).xyz; - float3 vColorSrcB = g_BlurTexture.Sample(PointSampler, In.vTexcoord).xyz; + float3 vColorSrcB = g_BlurTexture.Sample(BorderZeroSampler, In.vTexcoord).xyz; Out.vSingleTarget = float4(saturate(vColorSrcA + vColorSrcB), 1.f); @@ -605,7 +612,7 @@ PS_OUT_FLT4_SINGLE PS_MAIN_BLOOM_FINISH(PS_IN In) PS_OUT_FLT4_SINGLE Out; vector vColor = g_DiffuseTexture.Sample(PointSampler, In.vTexcoord); - float3 vBloom = g_BlurTexture.Sample(PointSampler, In.vTexcoord).xyz; + float3 vBloom = g_BlurTexture.Sample(BorderZeroSampler, In.vTexcoord).xyz; Out.vSingleTarget = vColor; Out.vSingleTarget += float4(vBloom, 1.f); @@ -624,7 +631,7 @@ PS_OUT_BLUR_X PS_MAIN_BLUR_X(PS_IN In) vTexcoord.x = In.vTexcoord.x + (float) i / g_vResolution.x; vTexcoord.y = In.vTexcoord.y; - vColor += g_fWeights_128[i + 63] * g_BlurTexture.Sample(ClampSampler, vTexcoord); + vColor += g_fWeights_128[i + 63] * g_BlurTexture.Sample(BorderZeroSampler, vTexcoord); } Out.vBlurX = vColor; @@ -644,7 +651,7 @@ PS_OUT_BLUR_X PS_MAIN_BLUR_X_ENV(PS_IN In) float fBlurAmount = 0.0f; float4 vCenter = g_DepthTexture.Sample(DefaultSampler, In.vTexcoord); - float4 vOriginal = g_BlurTexture.Sample(ClampSampler, In.vTexcoord); + float4 vOriginal = g_BlurTexture.Sample(BorderZeroSampler, In.vTexcoord); float fCenterViewZ = vCenter.y * g_fFar; float fTerrain = (1.f / 255.f); @@ -688,7 +695,7 @@ PS_OUT_BLUR_X PS_MAIN_BLUR_X_ENV(PS_IN In) continue; } - vColor += g_fWeights_32[i + 16] * g_BlurTexture.Sample(ClampSampler, vTexcoord); + vColor += g_fWeights_32[i + 16] * g_BlurTexture.Sample(BorderZeroSampler, vTexcoord); fAcc += g_fWeights_32[i + 16]; } @@ -765,7 +772,7 @@ PS_OUT_BACKBUFFER PS_MAIN_POSTCOMBINED(PS_IN In) continue; } - vColor += g_fWeights_32[i + 16] * g_BlurTexture.Sample(ClampSampler, vTexcoord); + vColor += g_fWeights_32[i + 16] * g_BlurTexture.Sample(BorderZeroSampler, vTexcoord); fAcc += g_fWeights_32[i + 16]; } if (fAcc <= FLT_EPSILON3) @@ -793,7 +800,7 @@ PS_OUT_BACKBUFFER PS_MAIN_POSTCOMBINED(PS_IN In) float fBlendAmount = saturate(fBlurAmount * g_fDOFBlurMultiplier); float3 finalColor = lerp(vOriginal.rgb, vBlurMatched, fBlendAmount); - Out.vBackBuffer = float4(vColor.xyz, vOriginal.a); + Out.vBackBuffer = float4(finalColor.xyz, vOriginal.a); Out.vEnvironment = 0.f; return Out; @@ -811,7 +818,7 @@ PS_OUT_BLUR_X PS_MAIN_BLUR_Y(PS_IN In) vTexcoord.x = In.vTexcoord.x; vTexcoord.y = In.vTexcoord.y + (float) i / g_vResolution.y; - vColor += g_fWeights_128[i + 63] * g_BlurTexture.Sample(ClampSampler, vTexcoord); + vColor += g_fWeights_128[i + 63] * g_BlurTexture.Sample(BorderZeroSampler, vTexcoord); } Out.vBlurX = vColor; @@ -837,14 +844,52 @@ PS_OUT_FLT4_SINGLE PS_MAIN_FOG(PS_IN In) vFinalColor = lerp(g_vFogColor, vColor, max(fRatio, 0.2f)); vFinalColor.a = 1.f; - if (1.f == vDepthDesc.y) + if (1.f == vDepthDesc.y) { vFinalColor = float4(g_vFogColor); - + } Out.vSingleTarget = vFinalColor; return Out; } +VS_OUT VS_TONE_MAPPING(VS_IN In) +{ + VS_OUT Out; + + matrix matWV, matWVP; + + matWV = mul(g_WorldMatrix, g_ViewMatrix); + matWVP = mul(matWV, g_ProjMatrix); + + Out.vPosition = mul(vector(In.vPosition, 1.f), matWVP); + Out.vTexcoord = In.vTexcoord; + + return Out; +} + +PS_OUT_BACKBUFFER PS_TONE_MAPPING(PS_IN In) +{ + PS_OUT_BACKBUFFER Out; + vector vColor = g_OriginalTexture.Sample(DefaultSampler, In.vTexcoord); + vColor *= g_fToneMappingExposure; + vColor = pow(vColor, 2.2f); + switch (g_iToneMappingType) { + case 0: + break; + case 1: + vColor = float4(ReinHard_ToneMapper(vColor.xyz), 1.f); + break; + case 2: + vColor = float4(Filmic_ToneMapper(vColor.xyz), 1.f); + break; + default: + break; + } + + Out.vBackBuffer = vColor; + Out.vEnvironment = float4(0.f, 0.f, 0.f, 1.f); + return Out; +} technique11 DefaultTechnique { @@ -995,4 +1040,14 @@ technique11 DefaultTechnique GeometryShader = NULL; PixelShader = compile ps_5_0 PS_MAIN_FOG(); } + + pass Tone_Mapping_Pass // 15 + { + SetRasterizerState(RS_Default); + SetDepthStencilState(DSS_None, 0); + SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_CAPTURE(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_TONE_MAPPING(); + } } diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl index b669d3285..952369d09 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl @@ -25,6 +25,7 @@ struct ParticleValue float2 vDistortionUVMoveTime; float2 vNoiseUVMoveTime; float2 vAniTime; + float2 vDissolveUVMoveTime; float2 vAniIndex; float fGravity; @@ -321,8 +322,14 @@ void CS_MAIN( { particleValue.vDistortionUVMoveTime.x = 0.f; } - + particleValue.vDissolveUVMoveTime.x += fTimeDelta; + + if (particleValue.vDissolveUVMoveTime.x >= particleValue.vDissolveUVMoveTime.y) + { + particleValue.vDissolveUVMoveTime.x = 0.f; + } + //아웃풋 대입 g_VBInstanceOutput[iIndex] = particle; 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_VtxAnimMesh.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxAnimMesh.hlsl index 8bd5438ef..e80f2f915 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxAnimMesh.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxAnimMesh.hlsl @@ -287,14 +287,14 @@ struct PS_IN_SHADOW struct PS_OUT_SHADOW { - float4 vShadowLightDepth : SV_TARGET0; + float fShadowLightDepth : SV_TARGET0; }; PS_OUT_SHADOW PS_MAIN_SHADOW(PS_IN_SHADOW In) { PS_OUT_SHADOW Out = (PS_OUT_SHADOW) 0; - Out.vShadowLightDepth.x = In.vProjPos.z; + Out.fShadowLightDepth = In.vProjPos.z; return Out; } diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxMesh.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxMesh.hlsl index 14fc33257..1be6fa4d8 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxMesh.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxMesh.hlsl @@ -67,7 +67,7 @@ struct VS_OUT_BLUR struct VS_OUT_SHADOW { float4 vPosition : SV_POSITION; - float4 vProjPos : TEXCOORD0; + float fProjPos : TEXCOORD0; }; @@ -96,7 +96,7 @@ VS_OUT_SHADOW VS_MAIN_SHADOW(VS_IN In) matWVP = mul(matWV, g_ProjMatrix); Out.vPosition = mul(vector(In.vPosition, 1.f), matWVP); - Out.vProjPos = Out.vPosition; + Out.fProjPos = Out.vPosition.z; return Out; } @@ -288,12 +288,12 @@ PS_OUT PS_GLASS(PS_IN In) struct PS_IN_SHADOW { float4 vPosition : SV_POSITION; - float4 vProjPos : TEXCOORD0; + float fProjPos : TEXCOORD0; }; struct PS_OUT_SHADOW { - float4 vShadowLightDepth : SV_TARGET0; + float fShadowLightDepth : SV_TARGET0; }; struct PS_IN_BLUR @@ -322,7 +322,7 @@ PS_OUT_SHADOW PS_MAIN_SHADOW(PS_IN_SHADOW In) { PS_OUT_SHADOW Out = (PS_OUT_SHADOW) 0; - Out.vShadowLightDepth.x = In.vProjPos.z; + Out.fShadowLightDepth = In.fProjPos; return Out; } diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl index 469fb280b..fa7367f6e 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl @@ -16,6 +16,7 @@ struct ParticleValue float2 vDistortionUVMoveTime; float2 vNoiseUVMoveTime; float2 vAniTime; + float2 vDissolveUVMoveTime; float2 vAniIndex; float fGravity; @@ -116,8 +117,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; @@ -131,7 +133,10 @@ int g_iBloomType; float g_fFar; - +float g_fDissolveDelay; +float g_fReverseDissolveDelay; +float2 g_vDissolveUVGainAmount; +bool g_isDissolveMove; struct VS_IN { @@ -253,6 +258,7 @@ float4 DrawEffect(PS_IN In) float2 vMaskingTime = g_ParticleValue[In.iGPUIndex].vMaskingUVMoveTime; float2 vNoiseUVMoveTime = g_ParticleValue[In.iGPUIndex].vNoiseUVMoveTime; float2 vDistortionUVMoveTime = g_ParticleValue[In.iGPUIndex].vDistortionUVMoveTime; + float2 vDissolveUVMoveTime = g_ParticleValue[In.iGPUIndex].vDissolveUVMoveTime; float2 vDelay = g_ParticleValue[In.iGPUIndex].vDelay; @@ -272,7 +278,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 +386,7 @@ float4 DrawEffect(PS_IN In) vMtrlMask = g_MaskingTexture.Sample(DefaultSampler, vMaskTexcoord); - if (g_isMaskBlur) + if (g_isTexBlur) { float4 fAccMask; @@ -437,14 +443,49 @@ float4 DrawEffect(PS_IN In) if (g_isDissolve == true) - { + { + float fTimeX = (In.vLifeTime.x - g_fDissolveDelay); + float fTimeY = (In.vLifeTime.y - g_fDissolveDelay); + float fTimeRatio = 0; + + if (g_fDissolveDelay <= FLT_EPSILON5) + { + fTimeRatio = In.vLifeTime.x / In.vLifeTime.y; + } + + if (fTimeX > 0 && fTimeY != 0) + { + fTimeRatio = saturate(fTimeX / fTimeY); + } + + if (g_isNomalDissolve) { - vMtrlDiffuse.a *= (0.95f - In.vLifeTime.x / In.vLifeTime.y); + if (g_isReverseDissolve == false) + { + vMtrlDiffuse.a *= (0.95f - fTimeRatio); + } + else + { + vMtrlDiffuse.a *= In.vLifeTime.x / In.vLifeTime.y; + + } + + + if (vMtrlDiffuse.a <= FLT_EPSILON5) + discard; } else { - vMtrlDissolve = g_DissolveTexture.Sample(DefaultSampler, In.vTexcoord); + + float2 vDissolveUV = In.vTexcoord + SelectLerpUV(g_vDissolveUVGainAmount, (vDissolveUVMoveTime.x / vDissolveUVMoveTime.y), 0); + + if (g_isDissolveMove) + vMtrlDissolve = g_DissolveTexture.Sample(DefaultSampler, vDissolveUV); + else + vMtrlDissolve = g_DissolveTexture.Sample(DefaultSampler, In.vTexcoord); + + if (g_isReverseDissolve == true) { @@ -453,7 +494,7 @@ float4 DrawEffect(PS_IN In) } else { - if (vMtrlDissolve.r < (In.vLifeTime.x / In.vLifeTime.y)) + if (vMtrlDissolve.r < fTimeRatio) discard; } } @@ -504,7 +545,7 @@ float4 EmissiveDraw(PS_IN In) } } - return vEmissiveMtrl * fEmissive * fEmissiveStrength; + return saturate(vEmissiveMtrl * fEmissive * fEmissiveStrength); } @@ -533,8 +574,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 +617,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 +696,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 +722,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 +762,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 +776,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 +794,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 +801,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 +920,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_VtxNorTex.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxNorTex.hlsl index 3f6083a9e..646d8b12a 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxNorTex.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxNorTex.hlsl @@ -184,6 +184,42 @@ PS_OUT PS_MAIN_TERRAIN_ANISO(PS_IN In) return Out; } +struct VS_OUT_SHADOW +{ + float4 vPosition : SV_POSITION; + float fProjPos : TEXCOORD0; +}; +VS_OUT_SHADOW VS_MAIN_SHADOW(VS_IN In) +{ + VS_OUT_SHADOW Out; + + matrix matWV, matWVP; + matWV = mul(g_WorldMatrix, g_ViewMatrix); + matWVP = mul(matWV, g_ProjMatrix); + + Out.vPosition = mul(vector(In.vPosition, 1.f), matWVP); + Out.fProjPos = Out.vPosition.z; + + return Out; +} +struct PS_IN_SHADOW +{ + float4 vPosition : SV_POSITION; + float fProjPos : TEXCOORD0; +}; +struct PS_OUT_SHADOW +{ + float fShadowLightDepth : SV_TARGET0; +}; + +PS_OUT_SHADOW PS_MAIN_SHADOW(PS_IN_SHADOW In) +{ + PS_OUT_SHADOW Out = (PS_OUT_SHADOW) 0; + + Out.fShadowLightDepth = In.fProjPos; + + return Out; +} technique11 NorTexTechnique11 { pass NorTexPass // 0 @@ -213,4 +249,13 @@ technique11 NorTexTechnique11 GeometryShader = NULL; PixelShader = compile ps_5_0 PS_MAIN_TERRAIN_ANISO(); } + pass ShadowPass // 3 + { + SetRasterizerState(RS_Default); + SetDepthStencilState(DSS_Default, 0); + SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN_SHADOW(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_MAIN_SHADOW(); + } } 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..4604806a0 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj @@ -166,6 +166,8 @@ + + @@ -181,6 +183,7 @@ + @@ -213,13 +216,17 @@ + + + + @@ -250,8 +257,10 @@ false false + + @@ -260,6 +269,7 @@ + @@ -322,6 +332,8 @@ + + @@ -337,6 +349,7 @@ + @@ -370,13 +383,17 @@ + + + + @@ -407,8 +424,10 @@ false false + + @@ -418,6 +437,7 @@ + diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters index 0fa1be799..11bd374af 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,48 @@ {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} + + + {3fb9a340-293c-413e-ae32-e5986222f711} + + + {51b32cc0-bf57-444f-9a21-0ff756a94291} + + + {09f9fe15-1685-4aac-b3a1-ee98c3e76e3b} + + + {c70a2ce4-8664-45e0-b594-4f416829dab8} + + + {c30da651-49ea-4d68-b65b-c363eaf820f2} + + + {c66672a6-3ecb-4301-94a4-da003ef9a567} + + + {0e7cf683-2a5e-4aa9-882d-a0d97ba96a8b} + + + {6b288e75-d33a-4a9d-9cb0-139d3671ad13} + @@ -520,7 +553,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 +897,36 @@ 50.UI\Spell_Data + + 50.UI\Spell_Canvas\Spell_Panel\Current_Slot_Number + + + 50.UI\Spell_Canvas\Spell_Panel\Spell_Drag + + + 02.GameObjects\Layer_Effect\Effect\05.NomalJap\NomalJapSide + + + 02.GameObjects\Layer_Effect\Effect\06.Bombard\BombardSide + + + 02.GameObjects\Layer_Effect\Effect\07.Decendo\DecendoSide + + + 02.GameObjects\Layer_Effect\Effect\10.Levioso\LeviosoSide + + + 04.InfoInstance + + + 04.InfoInstance\00.PlayerInfo + + + 04.InfoInstance\01.MonsterInfo + + + 04.InfoInstance\02.MapInfo + @@ -923,7 +986,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 +1348,36 @@ 50.UI\Spell_Data + + 50.UI\Spell_Canvas\Spell_Panel\Current_Slot_Number + + + 50.UI\Spell_Canvas\Spell_Panel\Spell_Drag + + + 02.GameObjects\Layer_Effect\Effect\05.NomalJap\NomalJapSide + + + 02.GameObjects\Layer_Effect\Effect\06.Bombard\BombardSide + + + 02.GameObjects\Layer_Effect\Effect\07.Decendo\DecendoSide + + + 02.GameObjects\Layer_Effect\Effect\10.Levioso\LeviosoSide + + + 04.InfoInstance + + + 04.InfoInstance\00.PlayerInfo + + + 04.InfoInstance\01.MonsterInfo + + + 04.InfoInstance\02.MapInfo + diff --git a/Jusin154_Team3D/Editor/Private/Bombard.cpp b/Jusin154_Team3D/Editor/Private/Bombard.cpp index 55e19134d..cf2e24189 100644 --- a/Jusin154_Team3D/Editor/Private/Bombard.cpp +++ b/Jusin154_Team3D/Editor/Private/Bombard.cpp @@ -3,8 +3,8 @@ #include "GameInstance.h" #include "EditEffect.h" -#include "Dummy_PhysXEffectHitBox.h" - +#include "Wand.h" +#include "Player.h" CBombard::CBombard(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) : CEffect_Container{ pDevice, pContext } @@ -50,6 +50,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 +62,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) @@ -73,6 +83,8 @@ void CBombard::Late_Update(_float fTimeDelta) __super::Late_Update(fTimeDelta); + XMStoreFloat4(&m_vEndPos, m_pLight_Projectile->Get_WorldPostion()); + } HRESULT CBombard::Pre_Setting(CGameObject* pObject) @@ -85,21 +97,26 @@ HRESULT CBombard::Pre_Setting(CGameObject* pObject) if (FAILED(Ready_Child())) return E_FAIL; - Reset_EffectParts(); + Reset_EditEffect(); m_fAccTime = 0.f; __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 +141,6 @@ HRESULT CBombard::Ready_Components(void* pArg) HRESULT CBombard::Ready_Child() { - CDummy_PhysXEffectHitBox::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; } @@ -180,46 +171,42 @@ CGameObject* CBombard::Clone(void* pArg, CGameObject* pOwner) return pInstance; } -void CBombard::OnCollision(CGameObject* pOther , void* pDesc) +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); + Get_PartObject("Bombard_Shoot_Pt")->Set_Visible(false); _vector vOwnerLook = m_pOwner->Get_Component()->Get_State(STATE::LOOK); Get_PartObject("Bombard_Smoke")->Get_Component()->Translation(vOwnerLook); 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); } - +#ifdef _DEBUG void CBombard::Describe_Entity() { } +#endif HRESULT CBombard::Bind_ShaderResources() { diff --git a/Jusin154_Team3D/Editor/Private/BombardSide.cpp b/Jusin154_Team3D/Editor/Private/BombardSide.cpp new file mode 100644 index 000000000..2fb72f647 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/BombardSide.cpp @@ -0,0 +1,223 @@ +#include "pch.h" +#include "BombardSide.h" + +#include "GameInstance.h" +#include "EditEffect.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_1000"); + 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 = 2.f; + + m_Events.emplace(0.6f, [&](){ + m_isParticleEnd = true; + m_pWandParticle->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f, -500.f, 0.f , 1.f)); + + CWand* pWand = static_cast(m_pOwner); + + if (pWand == nullptr) + return; + + m_isTrailEnd = true; + + XMStoreFloat4x4(&m_TrailStopMat, pWand->Get_WorldMatrix()); + }); + + 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()); + + // 파티클생성이 막히면 실행되지 않음 + if(m_isParticleEnd == false) + m_pWandParticle->Get_Component()->Set_WorldMatrix(pWand->Get_WorldMatrix()); + + // 트레일이 종료되면 위치를 고정함 + _matrix TrailMat = m_isTrailEnd ? XMLoadFloat4x4(&m_TrailStopMat) : pWand->Get_WorldMatrix(); + m_pWandTrail->Trail_Update(TrailMat, fTimeDelta); + +} + +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_EditEffect(); + + 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_isParticleEnd = false; // 파티클이 일정시간이 되면 나오지 않게 하려고 + + m_pWandLight->Set_Visible(true); + + /*트레일 초기화 */ + m_pWandTrail->Set_Visible(true); + m_isTrailEnd = false; + 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/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..b7dd4051b 100644 --- a/Jusin154_Team3D/Editor/Private/Decendo.cpp +++ b/Jusin154_Team3D/Editor/Private/Decendo.cpp @@ -3,9 +3,11 @@ #include "GameInstance.h" #include "EditEffect.h" -#include "Dummy_PhysXEffectHitBox.h" #include "TrailObject.h" +#include "Wand.h" +#include "Player.h" + CDecendo::CDecendo(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) : CEffect_Container{ pDevice, pContext } @@ -53,11 +55,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 +71,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 +79,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 +96,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); } @@ -114,24 +114,30 @@ HRESULT CDecendo::Pre_Setting(CGameObject* pObject) return E_FAIL; /* 초기 셋팅 초기화 */ - Reset_EffectParts(); + Reset_EditEffect(); m_fAccTime = 0.f; __super::m_fAccTime = 0.f; 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); m_pProjectile->Set_Visible(true); m_pProjectile_Blur->Set_Visible(true); - + /*트레일 초기화 */ Get_PartObject()->Set_Visible(true); Get_PartObject()->Get_Component()->Reset_Trail(); @@ -163,24 +169,6 @@ HRESULT CDecendo::Ready_Components(void* pArg) HRESULT CDecendo::Ready_Child() { - CDummy_PhysXEffectHitBox::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; } @@ -211,16 +199,16 @@ CGameObject* CDecendo::Clone(void* pArg, CGameObject* pOwner) return pInstance; } -void CDecendo::OnCollision(CGameObject* pOther , void* pDesc) +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); } @@ -235,41 +223,27 @@ void CDecendo::OnCollision(CGameObject* pOther , void* pDesc) Get_PartObject("Decendo_Down")->Get_Component()->LookAt(vPlayerPos); Get_PartObject("Decendo_Smoke")->Get_Component()->LookAt(vPlayerPos); - Get_PartObject()->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)); 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); } - +#ifdef _DEBUG void CDecendo::Describe_Entity() { - GUI::Begin("VALUE"); - _float4 vValue = {}; - - if (GUI::InputFloat("TurnValue", (_float*)&m_fTurnValue)) - { - } - - GUI::End(); } - +#endif HRESULT CDecendo::Bind_ShaderResources() { return S_OK; diff --git a/Jusin154_Team3D/Editor/Private/DecendoSide.cpp b/Jusin154_Team3D/Editor/Private/DecendoSide.cpp new file mode 100644 index 000000000..fea17f711 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/DecendoSide.cpp @@ -0,0 +1,206 @@ +#include "pch.h" +#include "DecendoSide.h" + +#include "GameInstance.h" +#include "EditEffect.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 = 2.f; + + m_Events.emplace(0.6f, [&]() { + CWand* pWand = static_cast(m_pOwner); + + if (pWand == nullptr) + return; + + m_isTrailEnd = true; + + XMStoreFloat4x4(&m_TrailStopMat, pWand->Get_WorldMatrix()); + }); + + 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()); + + _matrix TrailMat = m_isTrailEnd ? XMLoadFloat4x4(&m_TrailStopMat) : pWand->Get_WorldMatrix(); + m_pWandTrail->Trail_Update(TrailMat, fTimeDelta); + +} + +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_EditEffect(); + + 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/Editor/Private/EditEffect.cpp b/Jusin154_Team3D/Editor/Private/EditEffect.cpp index 2854db2d5..f5b9ab48a 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); @@ -713,6 +725,13 @@ void CEditEffect::Describe_Entity() GUI::Checkbox("Nomal Dissolve", &m_EffectInfo.isNomalDissolve); GUI::Checkbox("Reverse Dissolve", &m_EffectInfo.isReverseDissolve); + GUI::Spacing(); + GUI::Checkbox("DissolveMove", &m_EffectInfo.isDissolveMove); + GUI::DragFloat2("DissolveUVGainAmount", (_float*)&m_EffectInfo.vDissolveUVGainAmount, 0.01f); + GUI::DragFloat("DissolveDelay", &m_EffectInfo.fDissolveDelay, 0.005f); + GUI::DragFloat("ReverseDissolveDelay", &m_EffectInfo.fReverseDissolveDelay, 0.005f); + + _string strName = m_pGameInstance->Asset_Description(ENUM_CLASS(LEVEL::EFFECT), "DISSOLVE_TEXTURE", (CComponent**)&m_pDissolve_TextureCom, nullptr, this); if (strName != "") { 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..9c885d82f 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++) @@ -490,10 +506,7 @@ HRESULT CEffectObject::LoadPre(const _char* pFilePath, LEVEL eLevel) } memcpy(&m_EffectInfo, &PreEffectInfo, sizeof(PRE_EFFECT_INFO)); - - - - + m_EffectInfo.LightDesc.pPosition = m_pTransformCom->Get_StatePtr(STATE::POSITION); m_EffectInfo.LightDesc.iLevel = ENUM_CLASS(eLevel); @@ -775,11 +788,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; } @@ -889,6 +902,26 @@ HRESULT CEffectObject::Bind_ShaderResources() return E_FAIL; } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fDissolveDelay", &m_EffectInfo.fDissolveDelay, sizeof(_float)))) { + return E_FAIL; + } + + if (FAILED(m_pShaderCom->Bind_RawValue("g_fReverseDissolveDelay", &m_EffectInfo.fReverseDissolveDelay, sizeof(_float)))) { + return E_FAIL; + } + + if (FAILED(m_pShaderCom->Bind_RawValue("g_vDissolveUVGainAmount", &m_EffectInfo.vDissolveUVGainAmount, sizeof(_float2)))) { + return E_FAIL; + } + + if (FAILED(m_pShaderCom->Bind_RawValue("g_isDissolveMove", &m_EffectInfo.isDissolveMove, sizeof(_bool)))) { + return E_FAIL; + } + + + + + if (m_pDiffuse_TextureCom != nullptr) diff --git a/Jusin154_Team3D/Editor/Private/EffectPool.cpp b/Jusin154_Team3D/Editor/Private/EffectPool.cpp index 787968562..dd03e1dae 100644 --- a/Jusin154_Team3D/Editor/Private/EffectPool.cpp +++ b/Jusin154_Team3D/Editor/Private/EffectPool.cpp @@ -11,6 +11,10 @@ #include "Revelio.h" #include "Levioso.h" +#include "BombardSide.h" +#include "LeviosoSide.h" +#include "DecendoSide.h" +#include "NomalJapSide.h" CEffectPool::CEffectPool(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) : CGameObject(pDevice, pContext) @@ -58,8 +62,6 @@ void CEffectPool::Priority_Update(_float fTimeDelta) } } - (*m_EffectList[ENUM_CLASS(SKILL_TYPE::LEVIOSO)].begin())->Describe_Entity(); - } void CEffectPool::Update(_float fTimeDelta) @@ -116,13 +118,12 @@ HRESULT CEffectPool::Bind_ShaderResources() HRESULT CEffectPool::Ready_Effect() { - if(FAILED(Create_Effect(SKILL_TYPE::JAP, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { - + if (FAILED(Create_Effect(SKILL_TYPE::JAP, 10, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { CNomalJap* pEffect = nullptr; pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr); - return pEffect;} + return pEffect; } ))) return E_FAIL; @@ -132,7 +133,7 @@ HRESULT CEffectPool::Ready_Effect() pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr); - return pEffect;} + return pEffect; } ))) return E_FAIL; if (FAILED(Create_Effect(SKILL_TYPE::DESCENDO, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* { @@ -141,10 +142,9 @@ HRESULT CEffectPool::Ready_Effect() pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr); - return pEffect;} + return pEffect; } ))) return E_FAIL; - if (FAILED(Create_Effect(SKILL_TYPE::PROTEGO, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* { CProtego* pEffect = nullptr; @@ -154,7 +154,6 @@ HRESULT CEffectPool::Ready_Effect() return pEffect; } ))) return E_FAIL; - if (FAILED(Create_Effect(SKILL_TYPE::REVELIO, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* { CRevelio* pEffect = nullptr; @@ -165,7 +164,16 @@ HRESULT CEffectPool::Ready_Effect() ))) return E_FAIL; - if (FAILED(Create_Effect(SKILL_TYPE::LEVIOSO, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* { + 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; @@ -175,22 +183,34 @@ HRESULT CEffectPool::Ready_Effect() ))) return E_FAIL; + if (FAILED(Create_Effect(SKILL_TYPE::BOMBARDA_SIDE, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { - return S_OK; -} + CBombardSide* pEffect = nullptr; -HRESULT CEffectPool::Create_Effect(SKILL_TYPE eType, _uint iNumEffect, _uint iPrototypeLevel, _uint iCloneLevel, function AddPrototypeEvent) -{ - for (_uint i = 0; i < iNumEffect; i++) - { - CEffect_Container* pEffect_Container = AddPrototypeEvent(iPrototypeLevel, iCloneLevel); + pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr); - if (pEffect_Container == nullptr) - return E_FAIL; + return pEffect; } + ))) return E_FAIL; - m_EffectList[ENUM_CLASS(eType)].push_back(pEffect_Container); + 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; } @@ -216,6 +236,24 @@ HRESULT CEffectPool::Use_Skill(SKILL_TYPE eType, CGameObject* pOwner) return S_OK; } + +HRESULT CEffectPool::Create_Effect(SKILL_TYPE eType, _uint iNumEffect, _uint iPrototypeLevel, _uint iCloneLevel, function AddPrototypeEvent) +{ + for (_uint i = 0; i < iNumEffect; i++) + { + CEffect_Container* pEffect_Container = AddPrototypeEvent(iPrototypeLevel, iCloneLevel); + + if (pEffect_Container == nullptr) { + return E_FAIL; + } + + m_EffectList[ENUM_CLASS(eType)].push_back(pEffect_Container); + + } + + return S_OK; + +} HRESULT CEffectPool::Reset_Pool() { for (size_t i = 0; i < ENUM_CLASS(SKILL_TYPE::END); i++) diff --git a/Jusin154_Team3D/Editor/Private/Effect_Container.cpp b/Jusin154_Team3D/Editor/Private/Effect_Container.cpp index 7eee50866..55d58ca0a 100644 --- a/Jusin154_Team3D/Editor/Private/Effect_Container.cpp +++ b/Jusin154_Team3D/Editor/Private/Effect_Container.cpp @@ -343,7 +343,7 @@ HRESULT CEffect_Container::Bind_ShaderResources() return S_OK; } -HRESULT CEffect_Container::Reset_EffectParts() +HRESULT CEffect_Container::Reset_EditEffect() { for (auto& iter : m_PartObjects) { @@ -390,12 +390,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/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/InfoInstance.cpp b/Jusin154_Team3D/Editor/Private/InfoInstance.cpp new file mode 100644 index 000000000..34ba525ca --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/InfoInstance.cpp @@ -0,0 +1,136 @@ +#include "pch.h" +#include "InfoInstance.h" +#include "GameInstance.h" +#include "MapInfo.h" +#include "MonsterInfo.h" +#include "PlayerInfo.h" + +IMPLEMENT_SINGLETON(CInfoInstance) + +CInfoInstance::CInfoInstance() +{ +} + + +void CInfoInstance::Update(_float fTimeDelta) +{ + m_pPlayerInfo->Update(fTimeDelta); + m_pMonsterInfo->Update(fTimeDelta); + //m_pMapInfo->Update(fTimeDelta); +} + +void CInfoInstance::Change_Level() +{ + m_pPlayerInfo->Change_Level(); + m_pMonsterInfo->Change_Level(); + //m_pMapInfo->Change_Level(); +} + +void CInfoInstance::Update_CameraCoordinateSystem(_float3& vLook, _float3& vRight) +{ + m_pPlayerInfo->Update_CameraCoordinateSystem(vLook, vRight); +} + +pair<_float3, _float3> CInfoInstance::Get_CameraCoordinateSystem() +{ + return m_pPlayerInfo->Get_CameraCoordinateSystem(); +} + +#pragma region MONSTER_INFO +HRESULT CInfoInstance::Regist_PlayerAlly(CUnit* pUnit) +{ + return m_pMonsterInfo->Regist_PlayerAlly(pUnit); +} + +HRESULT CInfoInstance::Deregist_PlayerAlly(CUnit* pUnit) +{ + if (nullptr == m_pMonsterInfo) { + return S_OK; // 게임 종료 된 상태 + } + return m_pMonsterInfo->Deregist_PlayerAlly(pUnit); +} + +HRESULT CInfoInstance::Regist_ActiveMonster(CMonster* pUnit) +{ + return m_pMonsterInfo->Regist_ActiveMonster(pUnit); +} + +HRESULT CInfoInstance::Deregist_ActiveMonster(CMonster* pUnit) +{ + if (nullptr == m_pMonsterInfo) { + return S_OK; // 게임 종료 된 상태 + } + return m_pMonsterInfo->Deregist_ActiveMonster(pUnit); +} + +CUnit* CInfoInstance::Get_LockOnUnit() +{ + CUnit* pUnit = { nullptr }; + pUnit = m_pMonsterInfo->Get_LockOnUnit(); + // pUnit = m_pInfo->Get_LockOnUnit(); + return pUnit; +} + +pair CInfoInstance::Get_NearestPlayerAlly(_fvector vPos) +{ + return m_pMonsterInfo->Get_NearestPlayerAlly(vPos); +} +#pragma endregion +#pragma region MAP_INFO +//HRESULT CInfoInstance::Load_MapObjects(const _char* pFilePath) +//{ +// return m_pMapInfo->Load_MapObjects(pFilePath); +//} +//HRESULT CInfoInstance::Load_LightElements(const _char* pFilePath) +//{ +// return m_pMapInfo->Load_LightElements(pFilePath); +//} +#pragma endregion +LEVEL CInfoInstance::Get_RestartLevel() +{ + return LEVEL::GAMEPLAY; +} + +HRESULT CInfoInstance::Initialize_Information(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + m_pGameInstance = CGameInstance::GetInstance(); + m_pDevice = pDevice; + m_pContext = pContext; + SAFE_ADDREF(m_pGameInstance); + SAFE_ADDREF(m_pDevice); + SAFE_ADDREF(m_pContext); + + //m_pMapInfo = CMapInfo::Create(pDevice, pContext); + //if (nullptr == m_pMapInfo) { + // return E_FAIL; + //} + + m_pPlayerInfo = CPlayerInfo::Create(pDevice, pContext); + if (nullptr == m_pPlayerInfo) { + return E_FAIL; + } + m_pMonsterInfo = CMonsterInfo::Create(pDevice, pContext); + if (nullptr == m_pMonsterInfo) { + return E_FAIL; + } + + + return S_OK; +} + +void CInfoInstance::Release_Information() +{ + DestroyInstance(); + + SAFE_RELEASE(m_pPlayerInfo); + SAFE_RELEASE(m_pMonsterInfo); + SAFE_RELEASE(m_pDevice); + SAFE_RELEASE(m_pContext); + SAFE_RELEASE(m_pGameInstance); +} + +void CInfoInstance::Free() +{ + __super::Free(); + +} diff --git a/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp b/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp index c1f4337fa..deb2afb09 100644 --- a/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp +++ b/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp @@ -15,11 +15,12 @@ #include "Dummy_PhysXWall.h" #include "Player.h" #include "EffectPool.h" +#include "InfoInstance.h" CLevel_EffectViewer::CLevel_EffectViewer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID) : CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) } { - + m_pInfoInstance = CInfoInstance::GetInstance(); } HRESULT CLevel_EffectViewer::Initialize() @@ -71,7 +72,7 @@ HRESULT CLevel_EffectViewer::Initialize() void CLevel_EffectViewer::Update(_float fTimeDelta) { - + m_pInfoInstance->Update(fTimeDelta); } HRESULT CLevel_EffectViewer::Render() @@ -188,5 +189,5 @@ void CLevel_EffectViewer::Free() { __super::Free(); - + SAFE_RELEASE(m_pInfoInstance); } 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..310eb7be3 100644 --- a/Jusin154_Team3D/Editor/Private/Levioso.cpp +++ b/Jusin154_Team3D/Editor/Private/Levioso.cpp @@ -5,7 +5,6 @@ #include "EditEffect.h" #include "Player.h" #include "TrailObject.h" -#include "Dummy_PhysXEffectHitBox.h" CLevioso::CLevioso(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) @@ -52,7 +51,9 @@ HRESULT CLevioso::Initialize(void* pArg) m_fTurnSpeed = 10.f; m_fRange = 1.f; - m_fDuration = 1.5f; + m_fDuration = 2.f; + + return S_OK; } @@ -61,9 +62,8 @@ void CLevioso::Priority_Update(_float fTimeDelta) { __super::Priority_Update(fTimeDelta); - if (nullptr != m_pPhysHitBox) { - m_pPhysHitBox->Get_Component()->RewindMomentum(); - } + XMStoreFloat4(&m_vStartPos, m_pLeviosoPJ_0->Get_WorldPostion()); + } void CLevioso::Update(_float fTimeDelta) @@ -74,8 +74,6 @@ void CLevioso::Update(_float fTimeDelta) __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); @@ -83,13 +81,12 @@ void CLevioso::Update(_float fTimeDelta) m_pTrail_PT_0->Get_Component()->Translation(m_vOwnerLook * 0.25f); - - - if (nullptr != m_pPhysHitBox) { - m_pPhysHitBox->Get_Component()->AccumulateMomentum(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); @@ -110,7 +107,7 @@ void CLevioso::Late_Update(_float fTimeDelta) //m_pLeviosoTrail->Get_Component()->Fixed_Trail(WandWorld); - + XMStoreFloat4(&m_vEndPos, m_pLeviosoPJ_0->Get_WorldPostion()); __super::Late_Update(fTimeDelta); @@ -125,14 +122,15 @@ HRESULT CLevioso::Pre_Setting(CGameObject* pObject) m_pOwner = pObject; - Reset_EffectParts(); + Reset_EditEffect(); - __super::m_fAccTime = 0.f; + 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); @@ -144,13 +142,13 @@ HRESULT CLevioso::Pre_Setting(CGameObject* pObject) 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_0->Set_Visible(true); m_pLeviosoPJ_1->Set_Visible(true); m_pTrail_PT_0->Set_Visible(true); @@ -175,24 +173,6 @@ HRESULT CLevioso::Ready_Components(void* pArg) HRESULT CLevioso::Ready_Child() { - CDummy_PhysXEffectHitBox::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.5f }; - - 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; } @@ -226,27 +206,34 @@ CGameObject* CLevioso::Clone(void* pArg, CGameObject* pOwner) void CLevioso::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, vPos); + } + + 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); - - m_pPhysHitBox->Set_Dead(); - SAFE_RELEASE(m_pPhysHitBox); - } void CLevioso::Free() { __super::Free(); - if(m_pPhysHitBox != nullptr) - SAFE_RELEASE(m_pPhysHitBox); SAFE_RELEASE(m_pLeviosoPJ_0); SAFE_RELEASE(m_pLeviosoPJ_1); diff --git a/Jusin154_Team3D/Editor/Private/LeviosoSide.cpp b/Jusin154_Team3D/Editor/Private/LeviosoSide.cpp new file mode 100644 index 000000000..099178bd2 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/LeviosoSide.cpp @@ -0,0 +1,196 @@ +#include "pch.h" +#include "LeviosoSide.h" + +#include "GameInstance.h" +#include "EditEffect.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_EditEffect(); + + 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/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp index 703ccb9ef..f66d1388d 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" @@ -117,6 +120,12 @@ #include "EffectPool.h" #include "Revelio.h" #include "Levioso.h" + +#include "BombardSide.h" +#include "LeviosoSide.h" +#include "DecendoSide.h" +#include "NomalJapSide.h" + #pragma endregion #pragma region PHYSX_HEADER @@ -813,6 +822,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 +982,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 +1086,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 +1177,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 +1198,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); @@ -1246,6 +1285,19 @@ HRESULT CLoader::Loading_For_Effect() if (FAILED(m_pGameInstance->Add_Prototype(ENUM_CLASS(LEVEL::EFFECT), CLevioso::Create(m_pDevice, m_pContext)))) 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, 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; + } + /* For.Prototype_GameObject_Wand */ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CWand::Create(m_pDevice, m_pContext)))) @@ -1918,6 +1970,16 @@ HRESULT CLoader::Loading_For_ObjectViewer() TEXT("Prototype_Component_Troll_Weapon_Model") )); + futures.emplace_back(Deferred_ModelLoad( + MODEL::NONANIM, "../Bin/Resources/Models/Object/Troll_Rock/Troll_Rock.bin",XMMatrixIdentity(), + TEXT("Prototype_Component_Troll_Rock_Model") + )); + + futures.emplace_back(Deferred_ModelLoad( + MODEL::NONANIM, "../Bin/Resources/Models/Object/Troll_Rock/Troll_Rock_Big.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f)* XMMatrixIdentity(), + TEXT("Prototype_Component_Troll_Rock_Model") + )); + futures.emplace_back(Deferred_ModelLoad( MODEL::ANIM, "../Bin/Resources/Models/Human/Npc/Npc.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), TEXT("Prototype_Component_Npc_Model") diff --git a/Jusin154_Team3D/Editor/Private/MainApp.cpp b/Jusin154_Team3D/Editor/Private/MainApp.cpp index 8d4cf9c25..8fdb12508 100644 --- a/Jusin154_Team3D/Editor/Private/MainApp.cpp +++ b/Jusin154_Team3D/Editor/Private/MainApp.cpp @@ -4,6 +4,7 @@ #include "GameInstance.h" #include "Level_Loading.h" +#include "InfoInstance.h" _float g_fTimeMult = 1.f; CMainApp::CMainApp() @@ -86,6 +87,17 @@ HRESULT CMainApp::Start_Level(LEVEL eLevelID) if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, eLevelID)))) return E_FAIL; + m_pInfoInstance = CInfoInstance::GetInstance(); + if (nullptr == m_pInfoInstance) { + return E_FAIL; + } + + SAFE_ADDREF(m_pInfoInstance); + + if (FAILED(m_pInfoInstance->Initialize_Information(m_pDevice, m_pContext))) { + return E_FAIL; + } + return S_OK; } @@ -157,7 +169,9 @@ void CMainApp::Free() SAFE_RELEASE(m_pDevice); SAFE_RELEASE(m_pContext); + m_pInfoInstance->Release_Information(); m_pGameInstance->Release_Engine(); + SAFE_RELEASE(m_pGameInstance); } diff --git a/Jusin154_Team3D/Editor/Private/MapContainer.cpp b/Jusin154_Team3D/Editor/Private/MapContainer.cpp index 4b9410f32..7d1323826 100644 --- a/Jusin154_Team3D/Editor/Private/MapContainer.cpp +++ b/Jusin154_Team3D/Editor/Private/MapContainer.cpp @@ -57,6 +57,24 @@ 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(); + //} +} + HRESULT CMapContainer::Save_PartObjects(tinyxml2::XMLDocument& Doc, tinyxml2::XMLElement* Container) { for (auto& piar : m_PartObjects) diff --git a/Jusin154_Team3D/Editor/Private/MapInfo.cpp b/Jusin154_Team3D/Editor/Private/MapInfo.cpp new file mode 100644 index 000000000..990c13879 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/MapInfo.cpp @@ -0,0 +1,140 @@ +#include "pch.h" +#include "MapInfo.h" +#include "GameInstance.h" +#include "InfoInstance.h" +#include "BuildingContainer.h" +#include "MapObject_Collision.h" +#include "MapElement_Light.h" +#include "Layer.h" + +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() +{ +} + + +HRESULT CMapInfo::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex) +{ + m_pGameInstance = CGameInstance::GetInstance(); + m_pInfoInstance = CInfoInstance::GetInstance(); + m_pDevice = pDevice; + m_pContext = pContex; + + SAFE_ADDREF(m_pGameInstance); + SAFE_ADDREF(m_pInfoInstance); + SAFE_ADDREF(m_pDevice); + SAFE_ADDREF(m_pContext); + + + return S_OK; +} + +CMapInfo* CMapInfo::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContex) +{ + CMapInfo* pInstance = new CMapInfo(); + + if (FAILED(pInstance->Initialize(pDevice, pContex))) { + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CMapInfo::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pGameInstance); + SAFE_RELEASE(m_pInfoInstance); + SAFE_RELEASE(m_pDevice); + 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/Editor/Private/MapObject_Manager.cpp b/Jusin154_Team3D/Editor/Private/MapObject_Manager.cpp index 1230e7b80..55431bee6 100644 --- a/Jusin154_Team3D/Editor/Private/MapObject_Manager.cpp +++ b/Jusin154_Team3D/Editor/Private/MapObject_Manager.cpp @@ -453,7 +453,9 @@ HRESULT CMapObject_Manager::Save_MapData(const _char* pFileName) } else { +#ifndef 기무리 MSG_BOX("Succeed to Save File"); +#endif // !기무리 } return S_OK; @@ -648,7 +650,9 @@ HRESULT CMapObject_Manager::Save_ContainerData(const _char* pFileName, const _ch } else { +#ifndef 기무리 MSG_BOX("Succeed to Save File"); +#endif // !기무리 } return S_OK; @@ -1204,7 +1208,9 @@ HRESULT CMapObject_Manager::Save_LightObject(const _char* pFileName) } else { +#ifndef 기무리 MSG_BOX("Succeed to Save File"); +#endif // !기무리 } return S_OK; @@ -1290,9 +1296,9 @@ HRESULT CMapObject_Manager::Load_LightObject(const _char* pFileName) if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Element_Light"), &Desc))) return E_FAIL; } - +#ifndef 기무리 MSG_BOX("Successed to Load File"); - +#endif return S_OK; } diff --git a/Jusin154_Team3D/Editor/Private/MonsterInfo.cpp b/Jusin154_Team3D/Editor/Private/MonsterInfo.cpp new file mode 100644 index 000000000..9b674760d --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/MonsterInfo.cpp @@ -0,0 +1,207 @@ +#include "pch.h" +#include "MonsterInfo.h" +#include "GameInstance.h" +#include "InfoInstance.h" +#include "Monster.h" + +CMonsterInfo::CMonsterInfo() +{ +} + +void CMonsterInfo::Update(_float fTimeDelta) +{ + Refresh_PlayerAllies(); + Refresh_LockOnMonsters(); +} + +void CMonsterInfo::Change_Level() +{ + SAFE_RELEASE(m_pLockOnMonster); + for (CMonster* pMonster : m_ActiveMonsters) { + SAFE_RELEASE(pMonster); + } m_ActiveMonsters.clear(); + for (CUnit* pPlayerAlly : m_PlayerAllies) { + SAFE_RELEASE(pPlayerAlly); + } m_PlayerAllies.clear(); +} + +HRESULT CMonsterInfo::Regist_PlayerAlly(CUnit* pUnit) +{ + for (CUnit* pAlly : m_PlayerAllies) { + if (pAlly == pUnit) { + return E_ACCESSDENIED; + } + } m_PlayerAllies.push_back(pUnit); + SAFE_ADDREF(pUnit); + return S_OK; +} + +HRESULT CMonsterInfo::Deregist_PlayerAlly(CUnit* pUnit) +{ + for (list::iterator iter = m_PlayerAllies.begin(); iter != m_PlayerAllies.end();) { + if (*iter == pUnit) { + SAFE_RELEASE(*iter); + iter = m_PlayerAllies.erase(iter); + break; + } + else { + ++iter; + } + } + return E_FAIL; +} + +HRESULT CMonsterInfo::Regist_ActiveMonster(CMonster* pUnit) +{ + for (CMonster* pMonster : m_ActiveMonsters) { + if (pMonster == pUnit) { + return E_ACCESSDENIED; + } + } m_ActiveMonsters.push_back(pUnit); + SAFE_ADDREF(pUnit); + return S_OK; +} + +HRESULT CMonsterInfo::Deregist_ActiveMonster(CMonster* pUnit) +{ + for (list::iterator iter = m_ActiveMonsters.begin(); iter != m_ActiveMonsters.end();) { + if (*iter == pUnit) { + SAFE_RELEASE(*iter); + iter = m_ActiveMonsters.erase(iter); + break; + } + else { + ++iter; + } + } + return E_FAIL; +} + +CUnit* CMonsterInfo::Get_LockOnUnit() +{ + return m_pLockOnMonster; +} + +pair CMonsterInfo::Get_NearestPlayerAlly(_fvector vPos) +{ + _float fLengthMAX = FLT_MAX; + CTransform* pNearestPlayerAllyTransform = { nullptr }; + CUnit* pNearestPlayerAlly = { nullptr }; + + for (list::iterator iter = m_PlayerAllies.begin(); iter != m_PlayerAllies.end(); ++iter) { + + CTransform* pTransform = (*iter)->Get_Component(); + _float fNewLength = XMVectorGetX(XMVector3LengthSq(pTransform->Get_State(STATE::POSITION) - vPos)); + + if (nullptr == pNearestPlayerAlly) { + pNearestPlayerAlly = (*iter); + fLengthMAX = fNewLength; + pNearestPlayerAllyTransform = pTransform; + continue; + } + + if (fNewLength < fLengthMAX) { + pNearestPlayerAlly = (*iter); + pNearestPlayerAllyTransform = pTransform; + fLengthMAX = fNewLength; + } + } + return { pNearestPlayerAlly, pNearestPlayerAllyTransform }; +} + +HRESULT CMonsterInfo::Refresh_LockOnMonsters() +{ + SAFE_RELEASE(m_pLockOnMonster); + _vector vCameraLook = m_pGameInstance->Get_CameraLook(); + _vector vCameraPos = m_pGameInstance->Get_CamXMPosition(); + _float fMaxDot = { 0.f }; + + _vector vMonsterPos; + _vector vToMonsterDir; + + { // 뷰프러스텀 순회해서 가장 중앙에 근접한 몬스터 찾기 + for (list::iterator iter = m_ActiveMonsters.begin(); iter != m_ActiveMonsters.end(); ++iter) { + + // (카메라의 룩)과 (카메라 -> 몬스터 방향 벡터)를 내적해서 가장 큰 크기가 나온 몬스타가 락온 대상 + vMonsterPos = (*iter)->Get_WorldPostion(); + vToMonsterDir = vMonsterPos - vCameraPos; + _float fDotResult = CMyTools::DirectionCompare(vCameraLook, vToMonsterDir); + if (fDotResult <= 0.f) { + continue; + } + + if (nullptr == m_pLockOnMonster) { + m_pLockOnMonster = (*iter); + fMaxDot = fDotResult; + continue; + } + + if (fMaxDot < fDotResult) { + m_pLockOnMonster = (*iter); + fMaxDot = fDotResult; + } + } + } + if (nullptr != m_pLockOnMonster) { + SAFE_ADDREF(m_pLockOnMonster); + } + return S_OK; +} + +HRESULT CMonsterInfo::Refresh_PlayerAllies() +{ + for (list::iterator iter = m_PlayerAllies.begin(); iter != m_PlayerAllies.end();) { + if (true == (*iter)->isDead()) { + SAFE_RELEASE(*iter); + iter = m_PlayerAllies.erase(iter); + } + else { + iter++; + } + } + return S_OK; +} + +HRESULT CMonsterInfo::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex) +{ + m_pGameInstance = CGameInstance::GetInstance(); + m_pInfoInstance = CInfoInstance::GetInstance(); + m_pDevice = pDevice; + m_pContext = pContex; + + SAFE_ADDREF(m_pGameInstance); + SAFE_ADDREF(m_pInfoInstance); + SAFE_ADDREF(m_pDevice); + SAFE_ADDREF(m_pContext); + + return S_OK; +} + +CMonsterInfo* CMonsterInfo::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContex) +{ + CMonsterInfo* pInstance = new CMonsterInfo(); + + if (FAILED(pInstance->Initialize(pDevice, pContex))) { + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CMonsterInfo::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pLockOnMonster); + for (CMonster* pMonster : m_ActiveMonsters) { + SAFE_RELEASE(pMonster); + } m_ActiveMonsters.clear(); + for (CUnit* pAlly : m_PlayerAllies) { + SAFE_RELEASE(pAlly); + } m_PlayerAllies.clear(); + + SAFE_RELEASE(m_pGameInstance); + SAFE_RELEASE(m_pInfoInstance); + SAFE_RELEASE(m_pDevice); + SAFE_RELEASE(m_pContext); +} diff --git a/Jusin154_Team3D/Editor/Private/NomalJap.cpp b/Jusin154_Team3D/Editor/Private/NomalJap.cpp index e048357af..890ad5dc7 100644 --- a/Jusin154_Team3D/Editor/Private/NomalJap.cpp +++ b/Jusin154_Team3D/Editor/Private/NomalJap.cpp @@ -1,9 +1,10 @@ #include "pch.h" #include "NomalJap.h" +#include "Unit.h" +#include "InfoInstance.h" #include "GameInstance.h" #include "EditEffect.h" -#include "Dummy_PhysXEffectHitBox.h" #include "TrailObject.h" @@ -13,7 +14,8 @@ CNomalJap::CNomalJap(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) } CNomalJap::CNomalJap(const CNomalJap& rhs) - : CEffect_Container(rhs) + : CEffect_Container(rhs), + m_pInfoInstance(CInfoInstance::GetInstance()) { } @@ -36,8 +38,9 @@ HRESULT CNomalJap::Initialize(void* pArg) m_wstrEffectName = L"Nomal_Jap"; - if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Jap"))) + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Jap"))) { return E_FAIL; + } m_pProjectile_Side = Get_PartObject("JapProjSide"); @@ -46,8 +49,8 @@ HRESULT CNomalJap::Initialize(void* pArg) SAFE_ADDREF(m_pProjectile); SAFE_ADDREF(m_pProjectile_Side); - m_fDuration = 5.f; - + m_fDuration = 1.7f; + assert(m_fDuration > 0.f); return S_OK; } @@ -55,10 +58,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) @@ -66,39 +65,69 @@ void CNomalJap::Update(_float fTimeDelta) if (m_bVisible == false) return; - + __super::Update(fTimeDelta); Update_Event(fTimeDelta); - - m_pProjectile_Side->Get_Component()->Translation(m_vCameraLook * 1.2f); - m_pProjectile->Get_Component()->Translation(m_vCameraLook * 1.2f); - - - if (nullptr != m_pPhysHitBox) { - m_pPhysHitBox->Get_Component()->AccumulateMomentum(m_vCameraLook * 1.2f); + if (m_fAccTime > m_fDuration) { + SAFE_RELEASE(m_pTargetUnit); } + _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 (false == m_bTrailPulseEnded && m_fAccTime > m_fDuration * 0.3f) { + m_bTrailPulseEnded = true; + + if (nullptr != m_pTargetUnit && false == m_pTargetUnit->isDead()) { + _vector vCurrentPos = m_pProjectile->Get_WorldPostion(); + _vector vTargetPos = m_pTargetUnit->Get_WorldPostion(); + XMStoreFloat4(&m_vTargetPos, vTargetPos); + XMStoreFloat3(&m_vDirection, XMVector4Normalize(vTargetPos - vCurrentPos)); + + _float fDistance = XMVectorGetX(XMVector3Length(vTargetPos - vCurrentPos)); + m_fLinearSpeed = fDistance / (m_fDuration - m_fAccTime) * 10 / 3; + SAFE_RELEASE(m_pTargetUnit); + } - if (m_fAccTime > XM_2PI) return; - - m_fAccTime += fTimeDelta * 15.f; - - m_pProjectile_Side->Get_Component()->Translation(m_vRotateUp * 0.6f * sinf(m_fAccTime)); - m_pProjectile->Get_Component()->Translation(m_vRotateUp * 0.6f * sinf(m_fAccTime)); - - - if (nullptr != m_pPhysHitBox) { - m_pPhysHitBox->Get_Component()->AccumulateMomentum(m_vRotateUp * 0.6f * sinf(m_fAccTime)); } + if (true == m_bTrailPulseEnded) { + return; + } + _vector vRotateUp = XMLoadFloat3(&m_vRotateUp); + m_fAccTime += 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)); } + 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); @@ -114,19 +143,23 @@ HRESULT CNomalJap::Pre_Setting(CGameObject* pObject) m_pOwner = pObject; /* 피직스 생성*/ - if (FAILED(Ready_Child())) + if (FAILED(Ready_Child())) { return E_FAIL; + } /* 초기 셋팅 초기화 */ - Reset_EffectParts(); + Reset_EditEffect(); m_fAccTime = 0.f; __super::m_fAccTime = 0.f; m_fPreAccTime = 0.f; - + m_bTrailPulseEnded = false; + /* 초기 객체 위치 초기화 */ - m_pProjectile->Get_Component()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion()); - m_pProjectile_Side->Get_Component()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion()); + _vector vStartPos = m_pOwner->Get_WorldPostion(); + XMStoreFloat4(&m_vStartPos, vStartPos); + m_pProjectile->Get_Component()->Set_State(STATE::POSITION, vStartPos); + m_pProjectile_Side->Get_Component()->Set_State(STATE::POSITION, vStartPos); /* 초기 객체 비지블 */ m_pProjectile->Set_Visible(true); @@ -134,20 +167,41 @@ HRESULT CNomalJap::Pre_Setting(CGameObject* pObject) /*트레일 초기화 */ Get_PartObject()->Set_Visible(true); - Get_PartObject()->Get_Component()->Reset_Trail(); - //나아가는 벡터와 한점을 가져와 수직인 평면상에 하나의 점으로 DIR 을 만듬 - m_vCameraLook = XMVector3Normalize(m_pOwner->Get_Component()->Get_State(STATE::LOOK)); + pair<_float3, _float3> pairCameraLook = m_pInfoInstance->Get_CameraCoordinateSystem(); + _vector vDirection = XMVector3Normalize(XMLoadFloat3(&pairCameraLook.first)); _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(m_vCameraLook, m_pGameInstance->Random_Float(0.f, XM_PIDIV2)); + _vector vQuaternion = XMQuaternionRotationAxis(vDirection, m_pGameInstance->Random_Float(0.f, XM_PIDIV2)); - m_vRotateUp = XMVector3Rotate(vUp, vQuaternion); + { /* 대상 위치 지정 */ + SAFE_RELEASE(m_pTargetUnit); + m_pTargetUnit = m_pInfoInstance->Get_LockOnUnit(); + if (nullptr != m_pTargetUnit) { + SAFE_ADDREF(m_pTargetUnit); // 타겟이 있다면 타겟 위치로 지정 + XMStoreFloat4(&m_vTargetPos, m_pTargetUnit->Get_WorldPostion()); + } + else { + // 타겟이 없다면 현재위치 -> 카메라 룩벡터 * duration간 예상 이동거리 를 대상으로 지정 + XMStoreFloat4(&m_vTargetPos, vStartPos + vDirection * m_pTransformCom->Get_Speed() * m_fDuration); + } + } + { /* 대상 거리 계산 */ + _float fDistance = XMVectorGetX(XMVector3Length(XMLoadFloat4(&m_vTargetPos) - XMLoadFloat4(&m_vStartPos))); + m_fLinearSpeed = fDistance / m_fDuration; - m_vRotateUp = XMVector3Normalize(m_vRotateUp); + // 전체 duration 의 0.3 지점에서 2π 회전하도록 각속도 설정 + _float fTargetRatio = 0.3f; + m_fAngularSpeed = m_pGameInstance->Random_Float(2.f, 2.8f) * XM_2PI / (m_fDuration * fTargetRatio); + } + + XMStoreFloat3(&m_vRotateUp, XMVector3Normalize(XMVector3Rotate(vUp, vQuaternion))); m_bVisible = true; @@ -165,23 +219,7 @@ HRESULT CNomalJap::Ready_Components(void* pArg) HRESULT CNomalJap::Ready_Child() { - CDummy_PhysXEffectHitBox::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; } @@ -212,10 +250,10 @@ CGameObject* CNomalJap::Clone(void* pArg, CGameObject* pOwner) return pInstance; } -void CNomalJap::OnCollision(CGameObject* pOther , void* pDesc) +void CNomalJap::OnCollision(CGameObject* pOther, void* pDesc) { //CTransform* pOtherTransform = p - ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc); + ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc); for (auto& pPair : m_PartObjects) { @@ -226,37 +264,34 @@ void CNomalJap::OnCollision(CGameObject* pOther , void* pDesc) Get_PartObject("JapPT0")->Get_Component()->LookAt(m_pOwner->Get_WorldPostion()); + 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 (m_pPhysHitBox != nullptr) - { - 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); } +#ifdef _DEBUG void CNomalJap::Describe_Entity() { } +#endif // _DEBUG + HRESULT CNomalJap::Bind_ShaderResources() { return S_OK; diff --git a/Jusin154_Team3D/Editor/Private/NomalJapSide.cpp b/Jusin154_Team3D/Editor/Private/NomalJapSide.cpp new file mode 100644 index 000000000..dc4abe179 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/NomalJapSide.cpp @@ -0,0 +1,227 @@ +#include "pch.h" +#include "NomalJapSide.h" + +#include "GameInstance.h" +#include "EditEffect.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_Events.emplace(0.6f, [&]() { + + // 파티클 제어 + m_isParticleEnd = true; + m_pWandParticle->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f, -500.f, 0.f, 1.f)); + + + // 트레일 제어 + CWand* pWand = static_cast(m_pOwner); + + if (pWand == nullptr) + return; + + m_isTrailEnd = true; + + XMStoreFloat4x4(&m_TrailStopMat, pWand->Get_WorldMatrix()); + + }); + + m_fDuration = 2.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()); + + // 파티클생성이 막히면 실행되지 않음 + if (m_isParticleEnd == false) + m_pWandParticle->Get_Component()->Set_WorldMatrix(pWand->Get_WorldMatrix()); + + // 트레일이 종료되면 위치를 고정함 + _matrix TrailMat = m_isTrailEnd ? XMLoadFloat4x4(&m_TrailStopMat) : pWand->Get_WorldMatrix(); + m_pWandTrail->Trail_Update(TrailMat, fTimeDelta); + +} + +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_EditEffect(); + + 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_isParticleEnd = false; // 파티클이 일정시간이 되면 나오지 않게 하려고 + + m_pWandLight->Set_Visible(true); + + /*트레일 초기화 */ + m_pWandTrail->Set_Visible(true); + m_isTrailEnd = false; + 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/Editor/Private/Player.cpp b/Jusin154_Team3D/Editor/Private/Player.cpp index bcfdcb884..48dbcbb67 100644 --- a/Jusin154_Team3D/Editor/Private/Player.cpp +++ b/Jusin154_Team3D/Editor/Private/Player.cpp @@ -18,6 +18,7 @@ #include "State_Land.h" #include "State_Move.h" #include "State_Combat.h" + #pragma endregion #include "Bombard.h" @@ -92,6 +93,8 @@ void CPlayer::Update(_float fTimeDelta) m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom); + Play_Event(); + __super::Update(fTimeDelta); Describe_Entity(); @@ -234,24 +237,44 @@ HRESULT CPlayer::Ready_Parts() return S_OK; } + +void CPlayer::Play_Event() +{ + for (auto iter = m_PendingEvents.begin(); iter != m_PendingEvents.end(); ) + { + _float ratio = m_pModelCom->Get_CurrentTrackProgressRatio(); + _uint curAnim = m_pModelCom->Get_AnimIndex(); + + if (curAnim == iter->AnimIndex && ratio >= iter->fRatio) + { + iter->Callback(); + iter = m_PendingEvents.erase(iter); + } + else + { + ++iter; + } + } +} + +void CPlayer::Add_Event(_uint AnimIndex, function Callback, _float fRatio) +{ + PendingEvent Desc; + Desc.AnimIndex = AnimIndex; + Desc.fRatio = fRatio; + Desc.Callback = Callback; + m_PendingEvents.push_back(Desc); +} + + _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/PlayerInfo.cpp b/Jusin154_Team3D/Editor/Private/PlayerInfo.cpp new file mode 100644 index 000000000..57d8fe77a --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/PlayerInfo.cpp @@ -0,0 +1,65 @@ +#include "pch.h" +#include "PlayerInfo.h" +#include "GameInstance.h" +#include "InfoInstance.h" + +CPlayerInfo::CPlayerInfo() +{ +} + +void CPlayerInfo::Update(_float fTimeDelta) +{ +} + +void CPlayerInfo::Update_CameraCoordinateSystem(_float3& vLook, _float3& vRight) +{ + m_vCameraLookDir = vLook; + m_vCameraRightDir = vRight; +} + +pair<_float3, _float3> CPlayerInfo::Get_CameraCoordinateSystem() +{ + return { m_vCameraLookDir, m_vCameraRightDir }; +} + +void CPlayerInfo::Change_Level() +{ +} + +HRESULT CPlayerInfo::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex) +{ + m_pGameInstance = CGameInstance::GetInstance(); + m_pInfoInstance = CInfoInstance::GetInstance(); + m_pDevice = pDevice; + m_pContext = pContex; + + SAFE_ADDREF(m_pGameInstance); + SAFE_ADDREF(m_pInfoInstance); + SAFE_ADDREF(m_pDevice); + SAFE_ADDREF(m_pContext); + + + return S_OK; +} + +CPlayerInfo* CPlayerInfo::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContex) +{ + CPlayerInfo* pInstance = new CPlayerInfo(); + + if (FAILED(pInstance->Initialize(pDevice, pContex))) { + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CPlayerInfo::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pGameInstance); + SAFE_RELEASE(m_pInfoInstance); + SAFE_RELEASE(m_pDevice); + SAFE_RELEASE(m_pContext); + +} diff --git a/Jusin154_Team3D/Editor/Private/Player_States.cpp b/Jusin154_Team3D/Editor/Private/Player_States.cpp index e314d77f8..620a53606 100644 --- a/Jusin154_Team3D/Editor/Private/Player_States.cpp +++ b/Jusin154_Team3D/Editor/Private/Player_States.cpp @@ -10,6 +10,7 @@ #include "CallBack_Playable_Behavior.h" #include "CamPosition_Shoulder.h" #include "CallBack_Playable_HitReport.h" +#include "Broom.h" #pragma region STATE #include "State_Idle.h" @@ -22,7 +23,9 @@ #include "EffectPool.h" + #pragma region States + void CPlayer::TestKeyInput(_float fTimeDelta) { if (m_pGameInstance->Key_Down(DIK_F1)) @@ -49,7 +52,12 @@ void CPlayer::TestKeyInput(_float fTimeDelta) { m_eSpell = STATEANIM::DISILLUSION_EXIT; } + if (m_pGameInstance->Key_Down(DIK_F7)) + { + m_eSpell = STATEANIM::LUMOS; + m_pEffectPool->Use_Skill(SKILL_TYPE::LUMOS, Get_PartObject()); + } } HRESULT CPlayer::InputAction() @@ -64,6 +72,9 @@ HRESULT CPlayer::InputAction() || m_pGameInstance->Key_Down(DIK_LSHIFT) || m_pGameInstance->Key_Down(DIK_C) || m_pGameInstance->Key_Down(DIK_V) + || m_pGameInstance->Key_Down(DIK_Z) + || m_pGameInstance->Key_Down(DIK_G) + || m_pGameInstance->Key_Down(DIK_B) ) { return S_OK; @@ -83,6 +94,18 @@ HRESULT CPlayer::InputMove() return E_FAIL; } +HRESULT CPlayer::InputKeyUpMove() +{ + if (m_pGameInstance->Key_Up(DIK_W) + || m_pGameInstance->Key_Up(DIK_A) + || m_pGameInstance->Key_Up(DIK_S) + || m_pGameInstance->Key_Up(DIK_D)) + { + return S_OK; + } + return E_FAIL; +} + HRESULT CPlayer::InputSpell() { if ( @@ -97,9 +120,11 @@ HRESULT CPlayer::InputSpell() return E_FAIL; } -HRESULT CPlayer::InputAimMove() + +HRESULT CPlayer::InputAim() { - if (m_pGameInstance->Mouse_Pressing(DIM_RBUTTON)) + if (m_pGameInstance->Mouse_Pressing(DIM_RBUTTON) || + m_pGameInstance->Mouse_Pressing(DIM_LBUTTON)) { return S_OK; } @@ -108,31 +133,34 @@ HRESULT CPlayer::InputAimMove() void CPlayer::Behavior_IdleEnter() { m_pFSM->Enable_State(FSMSTATE::IDLE); - pair<_uint, _bool> pairAnimInfo = m_Animation[STATEANIM::IDLE]; + pair<_uint, _bool> pairAnimInfo; - if (m_pFSM->IsEnable_Previous(FSMSTATE::JOG | FSMSTATE::WALK | FSMSTATE::SPRINT)) { - - if (m_pFSM->IsEnable_Previous(FSMSTATE::WALK)) { - pairAnimInfo = m_Animation[STATEANIM::WALK_STOP]; - } - else if (m_pFSM->IsEnable_Previous(FSMSTATE::SPRINT)) { - pairAnimInfo = m_Animation[STATEANIM::JOG_STOP]; - } - - else if (m_pFSM->IsEnable_Previous(FSMSTATE::JOG)) { - pairAnimInfo = m_Animation[STATEANIM::JOG_STOP]; + if (SUCCEEDED(InputAim())) + { + if (m_pGameInstance->Mouse_Pressing(DIM_LBUTTON)) { + pairAnimInfo = m_Animation[STATEANIM::IDLE_AIM]; } + else + pairAnimInfo = m_Animation[STATEANIM::IDLE]; } + else + { + pairAnimInfo = m_Animation[STATEANIM::IDLE]; + } + m_bSprintToggle = false; m_bWalkToggle = false; m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); } -HRESULT CPlayer::Behavior_IdleExitCheck() +// S_OK -> 현 상태 유지 +// E_FAIL -> 현 상태 탈출 +HRESULT CPlayer::Behavior_IdleExitCheck(_float fTimeDelta) { pair<_uint, _bool> pairAnimInfo; - // S_OK -> 현 상태 유지 - // E_FAIL -> 현 상태 탈출 + _vector xmvLook = XMVector4Normalize(XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f)); + _vector xmvRight = XMVector4Normalize(XMVectorSetY(m_pTransformCom->Get_State(STATE::RIGHT), 0.f)); + _uint iCurrentAnimIndex = m_pModelCom->Get_AnimIndex(); if (SUCCEEDED(InputAction()) || SUCCEEDED(InputSpell())) { if (m_pGameInstance->Key_Down(DIK_SPACE)) { m_pFSM->Change_State(FSMSTATE::JUMP); @@ -151,31 +179,106 @@ HRESULT CPlayer::Behavior_IdleExitCheck() } else if (m_pGameInstance->Mouse_Up(DIM_LBUTTON)) { m_pFSM->Change_State(FSMSTATE::COMBAT); - } else if (m_pGameInstance->Key_Down(DIK_V)) { m_pFSM->Change_State(FSMSTATE::COMBAT); } + else if (m_pGameInstance->Key_Down(DIK_G)) { + m_pFSM->Change_State(FSMSTATE::COMBAT); + } + else if (m_pGameInstance->Key_Down(DIK_B)) { + m_pFSM->Change_State(FSMSTATE::BROOM_RIDE); + } return E_FAIL; } - if (SUCCEEDED(InputMove())) { - - m_pFSM->Change_State(FSMSTATE::MOVE); - return E_FAIL; - } - - if (m_pModelCom->IsFinishedAnim()) + if (SUCCEEDED(InputMove())) { - pairAnimInfo = m_Animation[STATEANIM::IDLE]; - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + m_fInputTime += fTimeDelta; + if (m_fInputTime > 0.2f) + { + m_fInputTime = 0.f; + m_pFSM->Change_State(FSMSTATE::MOVE); + return E_FAIL; + } } + + if (SUCCEEDED(InputKeyUpMove())) + { + _vector xmvInputDir = XMVectorZero(); + + _vector xmvCamLook = XMVector4Normalize(XMVectorSet(m_vCameraLookDir.x, 0.f, m_vCameraLookDir.z, 0.f)); + _vector xmvCamRight = XMVector4Normalize(XMVectorSet(m_vCameraRightDir.x, 0.f, m_vCameraRightDir.z, 0.f)); + + if (m_pGameInstance->Key_Up(DIK_W)) + xmvInputDir += xmvCamLook; + if (m_pGameInstance->Key_Up(DIK_S)) + xmvInputDir -= xmvCamLook; + if (m_pGameInstance->Key_Up(DIK_A)) + xmvInputDir -= xmvCamRight; + if (m_pGameInstance->Key_Up(DIK_D)) + xmvInputDir += xmvCamRight; + + if (XMVector3Equal(xmvInputDir, XMVectorZero())) + return E_FAIL; + + xmvInputDir = XMVector3Normalize(xmvInputDir); + + _float2 vInputDir = { XMVectorGetX(xmvInputDir),XMVectorGetZ(xmvInputDir) }; + + _vector xmvCurLook = XMVector4Normalize( + XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f)); + _float2 vCurLook = { XMVectorGetX(xmvCurLook),XMVectorGetZ(xmvCurLook) }; + + _float vDir = CMyTools::Get_Direction2D(vCurLook, vInputDir); + _float absDir = fabsf(vDir); + + _float cross = vCurLook.x * vInputDir.y - vCurLook.y * vInputDir.x; + + if (m_pFSM->IsEnable(FSMSTATE::IDLE)) + { + if (absDir < XMConvertToRadians(45.f)) + { + m_pFSM->Change_State(FSMSTATE::MOVE); + return E_FAIL; + } + else if (absDir < XMConvertToRadians(135.f)) + { + if (cross > 0.f) { + pairAnimInfo = m_Animation[STATEANIM::IDLE_TURN_L]; + } + else { + pairAnimInfo = m_Animation[STATEANIM::IDLE_TURN_R]; + } + } + else + { + pairAnimInfo = m_Animation[STATEANIM::IDLE_TURN_BWD]; + } + + m_pFSM->Enable_State(FSMSTATE::IDLE_TURN); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, m_fAmount); + } + + return E_FAIL; + } + + if (!SUCCEEDED(InputAim())) + { + if (m_pModelCom->IsFinishedAnim()) + { + pairAnimInfo = m_Animation[STATEANIM::IDLE]; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + } + } + + return S_OK; } void CPlayer::Behavior_IdleExit() { - m_pFSM->Disable_State(FSMSTATE::IDLE); + m_pFSM->Disable_State(FSMSTATE::IDLE | FSMSTATE::IDLE_TURN); } void CPlayer::Behavior_MoveEnter() @@ -200,25 +303,14 @@ void CPlayer::Behavior_MoveEnter() if (true == bFoward) { pairAnimInfo = m_Animation[STATEANIM::WALK_FWD]; } - else if (true == bBackward) { - pairAnimInfo = m_Animation[STATEANIM::WALK_BWD]; - } } else { m_pFSM->Enable_State(FSMSTATE::JOG); m_bSprintToggle = false; m_bWalkToggle = false; - if (bFoward) - { - pairAnimInfo = m_Animation[STATEANIM::JOG_FWD]; - } - else if (bBackward) - { - pairAnimInfo = m_Animation[STATEANIM::JOG_BWD]; - m_fAmount = 0.2f; - } - + pairAnimInfo = m_Animation[STATEANIM::JOG_FWD]; + m_bRatio = true; } } else { // While Moving @@ -234,28 +326,26 @@ void CPlayer::Behavior_MoveEnter() if (true == bFoward) { pairAnimInfo = m_Animation[STATEANIM::WALK_FWD]; } - else if (true == bBackward) { - pairAnimInfo = m_Animation[STATEANIM::WALK_BWD]; - } } else { m_pFSM->Enable_State(FSMSTATE::JOG); m_bSprintToggle = false; m_bWalkToggle = false; - if (bFoward) - { - pairAnimInfo = m_Animation[STATEANIM::JOG_FWD]; - } + pairAnimInfo = m_Animation[STATEANIM::JOG_FWD]; + m_bRatio = true; } } - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second,m_fAmount); - m_fAmount = 1.f; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, m_fAmount, m_bRatio); } -HRESULT CPlayer::Behavior_MoveExitCheck() +HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta) { pair<_uint, _bool> pairAnimInfo; + _vector xmvLook = XMVector4Normalize(XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f)); + _vector xmvRight = XMVector4Normalize(XMVectorSetY(m_pTransformCom->Get_State(STATE::RIGHT), 0.f)); + _uint iCurrentAnimIndex = m_pModelCom->Get_AnimIndex(); + if (SUCCEEDED(InputAction()) || SUCCEEDED(InputSpell())) { if (m_pGameInstance->Key_Down(DIK_SPACE)) { m_pFSM->Change_State(FSMSTATE::JUMP); @@ -278,6 +368,15 @@ HRESULT CPlayer::Behavior_MoveExitCheck() else if (m_pGameInstance->Key_Down(DIK_V)) { m_pFSM->Change_State(FSMSTATE::COMBAT); } + else if (m_pGameInstance->Key_Down(DIK_Z)) { + m_pFSM->Change_State(FSMSTATE::COMBAT); + } + else if (m_pGameInstance->Key_Down(DIK_G)) { + m_pFSM->Change_State(FSMSTATE::COMBAT); + } + else if (m_pGameInstance->Key_Down(DIK_B)) { + m_pFSM->Change_State(FSMSTATE::BROOM_RIDE); + } else if (m_pGameInstance->Key_Down(DIK_LSHIFT)) { m_bSprintToggle = !m_bSprintToggle; m_bWalkToggle = false; @@ -312,18 +411,187 @@ HRESULT CPlayer::Behavior_MoveExitCheck() } m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); } - return E_FAIL; - } - if (SUCCEEDED(InputMove())) { - if (m_pModelCom->IsFinishedAnim() && m_pFSM->IsEnable(FSMSTATE::JOG)) - { - pairAnimInfo = m_Animation[STATEANIM::JOG_FWD]; - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); - } return S_OK; } - m_pFSM->Change_State(FSMSTATE::IDLE); + if (SUCCEEDED(InputMove())) { + _vector xmvInputDir = XMVectorZero(); + + _vector xmvCamLook = XMVector4Normalize(XMVectorSet(m_vCameraLookDir.x, 0.f, m_vCameraLookDir.z, 0.f)); + _vector xmvCamRight = XMVector4Normalize(XMVectorSet(m_vCameraRightDir.x, 0.f, m_vCameraRightDir.z, 0.f)); + + if (m_pGameInstance->Key_Pressing(DIK_W)) + xmvInputDir += xmvCamLook; + if (m_pGameInstance->Key_Pressing(DIK_S)) + xmvInputDir -= xmvCamLook; + if (m_pGameInstance->Key_Pressing(DIK_A)) + xmvInputDir -= xmvCamRight; + if (m_pGameInstance->Key_Pressing(DIK_D)) + xmvInputDir += xmvCamRight; + + if (XMVector3Equal(xmvInputDir, XMVectorZero())) + return E_FAIL; + + xmvInputDir = XMVector3Normalize(xmvInputDir); + + _float2 vInputDir = { XMVectorGetX(xmvInputDir),XMVectorGetZ(xmvInputDir) }; + _vector xmvCurLook = XMVector4Normalize( + XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f)); + _float2 vCurLook = { XMVectorGetX(xmvCurLook),XMVectorGetZ(xmvCurLook) }; + + _float vDir = CMyTools::Get_Direction2D(vCurLook, vInputDir); + _float absDir = fabsf(vDir); + _float cross = vCurLook.x * vInputDir.y - vCurLook.y * vInputDir.x; + + _vector vCameraLook = XMVectorSet(m_vCameraLookDir.x, 0.f, m_vCameraLookDir.z, 0.f); + + _vector vCameraRight = XMVectorSet(m_vCameraRightDir.x, 0.f, m_vCameraRightDir.z, 0.f); + + _float2 fCamLook = { XMVectorGetX(vCameraLook), XMVectorGetZ(vCameraLook) }; + + vCameraRight = XMVector3Normalize(vCameraRight); + + _float angle = CMyTools::Get_Direction2D(vCurLook, fCamLook); + + _float degree = XMConvertToDegrees(angle); + + _bool bSkipAngleCheck = { false }; + if (m_pFSM->IsEnable(FSMSTATE::JOG | FSMSTATE::WALK)) { + if (iCurrentAnimIndex != m_Animation[STATEANIM::JOG_FWD].first && + iCurrentAnimIndex != m_Animation[STATEANIM::WALK_FWD].first) { + bSkipAngleCheck = true; + if (m_pModelCom->IsFinishedAnim() || m_pFSM->IsEnable(FSMSTATE::STOP) || SUCCEEDED(InputAim())) { + m_pFSM->Disable_State(FSMSTATE::STOP); + bSkipAngleCheck = false; + } + } + if (!bSkipAngleCheck) { + _float absDir = fabsf(vDir); + if (absDir < XMConvertToRadians(80.f)) { + if (m_pFSM->IsEnable(FSMSTATE::JOG)) + { + pairAnimInfo = m_Animation[STATEANIM::JOG_FWD]; + } + if (m_pFSM->IsEnable(FSMSTATE::WALK)) + { + pairAnimInfo = m_Animation[STATEANIM::WALK_FWD]; + } + } + else if (absDir < XMConvertToRadians(160.f)) { + if (cross > 0) + { + if (SUCCEEDED(InputAim())) + { + pairAnimInfo = m_Animation[STATEANIM::JOG_AIM_LEFT]; + } + else if (m_pFSM->IsEnable(FSMSTATE::JOG)) + { + if (degree > 35.f && degree < 55.f) + { + pairAnimInfo = m_Animation[STATEANIM::JOG_FWD]; + } + else if (degree < -125.f && degree > -145.f) + { + pairAnimInfo = m_Animation[STATEANIM::JOG_FWD]; + } + else + pairAnimInfo = m_Animation[STATEANIM::JOG_LEFT]; + } + + m_fAmount = 0.5f; + m_bRatio = true; + } + else { + if (SUCCEEDED(InputAim())) + { + pairAnimInfo = m_Animation[STATEANIM::JOG_AIM_RIGHT]; + } + else if (m_pFSM->IsEnable(FSMSTATE::JOG)) + { + if (degree < -35.f && degree > -55.f) + { + pairAnimInfo = m_Animation[STATEANIM::JOG_FWD]; + } + else if (degree > 125.f && degree < 145.f) + { + pairAnimInfo = m_Animation[STATEANIM::JOG_FWD]; + } + else + pairAnimInfo = m_Animation[STATEANIM::JOG_RIGHT]; + } + + m_fAmount = 0.5f; + m_bRatio = true; + } + } + else { + if (SUCCEEDED(InputAim())) + { + pairAnimInfo = m_Animation[STATEANIM::JOG_AIM_BWD]; + } + else if (m_pFSM->IsEnable(FSMSTATE::JOG)) + { + pairAnimInfo = m_Animation[STATEANIM::JOG_BWD]; + } + else if (m_pFSM->IsEnable(FSMSTATE::WALK)) + { + pairAnimInfo = m_Animation[STATEANIM::WALK_BWD]; + } + m_fAmount = 0.5f; + m_bRatio = true; + } + + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, m_fAmount, m_bRatio); + m_fAmount = 1.f; + } + } + + Player_InterpTurn(fTimeDelta); + + return S_OK; + } + + if (m_pFSM->IsEnable(FSMSTATE::JOG | FSMSTATE::WALK | FSMSTATE::SPRINT) || + !SUCCEEDED(InputMove())) { + if (!m_pFSM->IsEnable(FSMSTATE::STOP)) + { + m_pFSM->Enable_State(FSMSTATE::STOP); + if (m_pFSM->IsEnable(FSMSTATE::WALK)) { + pairAnimInfo = m_Animation[STATEANIM::WALK_STOP]; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + } + else if (m_pFSM->IsEnable(FSMSTATE::SPRINT)) { + pairAnimInfo = m_Animation[STATEANIM::JOG_STOP]; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + } + else if (m_pFSM->IsEnable(FSMSTATE::JOG)) { + if (iCurrentAnimIndex == m_Animation[STATEANIM::JOG_AIM_LEFT].first) + { + pairAnimInfo = m_Animation[STATEANIM::JOG_AIM_STOP_L]; + } + else if (iCurrentAnimIndex == m_Animation[STATEANIM::JOG_AIM_RIGHT].first) + { + pairAnimInfo = m_Animation[STATEANIM::JOG_AIM_STOP_R]; + } + else if (iCurrentAnimIndex == m_Animation[STATEANIM::JOG_AIM_BWD].first) + { + pairAnimInfo = m_Animation[STATEANIM::JOG_AIM_STOP_BWD]; + } + else { + pairAnimInfo = m_Animation[STATEANIM::JOG_STOP]; + } + + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + } + } + else if (IsCurrentKeyFrame("TurnStop")) + { + m_pFSM->Change_State(FSMSTATE::IDLE); + m_pFSM->Disable_State(FSMSTATE::STOP); + } + + return S_OK; + } return E_FAIL; } @@ -339,16 +607,16 @@ void CPlayer::Behavior_JumpEnter() m_pFSM->Enable_State(FSMSTATE::JUMP); if (m_pFSM->IsEnable_Previous(FSMSTATE::IDLE | FSMSTATE::WALK | FSMSTATE::JOG | FSMSTATE::SPRINT)) { if (m_pFSM->IsEnable_Previous(FSMSTATE::IDLE)) { - pairAnimInfo = Get_AnimInfo(STATEANIM::JUMP); + pairAnimInfo = m_Animation[STATEANIM::JUMP]; } else if (m_pFSM->IsEnable_Previous(FSMSTATE::SPRINT)) { pairAnimInfo = m_Animation[STATEANIM::JUMP_SPRINT]; } else if (m_pFSM->IsEnable_Previous(FSMSTATE::WALK)) { - pairAnimInfo = Get_AnimInfo(STATEANIM::JUMP); + pairAnimInfo = m_Animation[STATEANIM::JUMP]; } else if (m_pFSM->IsEnable_Previous(FSMSTATE::JOG)) { - pairAnimInfo = Get_AnimInfo(STATEANIM::JUMP_JOG); + pairAnimInfo = m_Animation[STATEANIM::JUMP_JOG]; } } else { @@ -374,7 +642,7 @@ void CPlayer::Behavior_JumpExit() void CPlayer::Behavior_LandEnter() { m_pFSM->Enable_State(FSMSTATE::LAND); - pair<_uint, _bool> pairAnimInfo = Get_AnimInfo(STATEANIM::LAND); + pair<_uint, _bool> pairAnimInfo = m_Animation[STATEANIM::LAND]; m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); } @@ -401,7 +669,7 @@ void CPlayer::Behavior_DodgeEnter() { // 혹시 @@ to Dodge 있으면 여기에 m_pFSM->Enable_State(FSMSTATE::DODGE); - pair<_uint, _bool> pairAnimInfo = Get_AnimInfo(STATEANIM::DODGE); + pair<_uint, _bool> pairAnimInfo = m_Animation[STATEANIM::DODGE]; m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); } @@ -412,7 +680,7 @@ HRESULT CPlayer::Behavior_DodgeExitCheck() return E_FAIL; } - if (SUCCEEDED(InputMove())&&IsCurrentKeyFrame("Dodge")) { + if (SUCCEEDED(InputMove()) && IsCurrentKeyFrame("Throw")) { m_pFSM->Change_State(FSMSTATE::MOVE); return E_FAIL; } @@ -429,25 +697,32 @@ void CPlayer::Behavior_CombatEnter() pair<_uint, _bool> pairAnimInfo = {}; m_pFSM->Enable_State(FSMSTATE::COMBAT); + if (m_pModelCom->Get_SecondAnimIndex() == m_Animation[STATEANIM::LUMOS].first) + { + m_pModelCom->Set_Second_AnimationIndex(-1, ENUM_CLASS(BLEND_BONE::SHOULDER_R)); + m_eSpell = STATEANIM::END; + } if (m_pGameInstance->Key_Down(DIK_R)) { m_pFSM->Enable_State(FSMSTATE::SKILL); pairAnimInfo = m_Animation[STATEANIM::SKILL]; m_pEffectPool->Use_Skill(SKILL_TYPE::REVELIO, this); + } else if (m_pGameInstance->Key_Down(DIK_Q)) { m_pFSM->Enable_State(FSMSTATE::SKILL2); pairAnimInfo = m_Animation[STATEANIM::SKILL2]; - - m_pEffectPool->Use_Skill(SKILL_TYPE::PROTEGO, this); - + Add_Event(pairAnimInfo.first, + [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::PROTEGO, this); }, + 0.4f); } else if (m_pGameInstance->Mouse_Up(DIM_LBUTTON)) { m_pFSM->Enable_State(FSMSTATE::LIGHT_ATTACK); pairAnimInfo = m_Animation[STATEANIM::LIGHT_ATTACK]; - m_pEffectPool->Use_Skill(SKILL_TYPE::JAP, this); + 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); @@ -455,16 +730,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; - - m_pEffectPool->Use_Skill(SKILL_TYPE::LEVIOSO, this); - break; case STATEANIM::DIFFINDO: pairAnimInfo = m_Animation[STATEANIM::DIFFINDO]; + + + m_eSpell = STATEANIM::END; break; case STATEANIM::DISILLUSION_ENTER: @@ -475,18 +779,89 @@ void CPlayer::Behavior_CombatEnter() pairAnimInfo = m_Animation[STATEANIM::DISILLUSION_EXIT]; m_eSpell = STATEANIM::END; break; + case STATEANIM::LUMOS: + if (m_pModelCom->Get_SecondAnimIndex() != m_Animation[STATEANIM::LUMOS].first) + { + if (SUCCEEDED(InputMove())) + { + if (m_bSprintToggle) { + pairAnimInfo = m_Animation[STATEANIM::SPRINT]; + } + else if (m_bWalkToggle) { + pairAnimInfo = m_Animation[STATEANIM::WALK_FWD]; + } + else { + pairAnimInfo = m_Animation[STATEANIM::JOG_FWD]; + } + } + else { + pairAnimInfo = m_Animation[STATEANIM::IDLE]; + } + m_pModelCom->Set_Second_AnimationIndex(m_Animation[STATEANIM::LUMOS].first, ENUM_CLASS(BLEND_BONE::SHOULDER_R), true); + } + else + { + if (SUCCEEDED(InputMove())) + { + if (m_bSprintToggle) { + pairAnimInfo = m_Animation[STATEANIM::SPRINT]; + } + else if (m_bWalkToggle) { + pairAnimInfo = m_Animation[STATEANIM::WALK_FWD]; + } + else { + pairAnimInfo = m_Animation[STATEANIM::JOG_FWD]; + } + } + else { + pairAnimInfo = m_Animation[STATEANIM::IDLE]; + } + m_pModelCom->Set_Second_AnimationIndex(m_Animation[STATEANIM::LUMOS_STOP].first, ENUM_CLASS(BLEND_BONE::SHOULDER_R)); + m_eSpell = STATEANIM::END; + } + break; default: pairAnimInfo = m_Animation[STATEANIM::SPELL]; break; } } else + { + + + pairAnimInfo = m_Animation[STATEANIM::SPELL]; + } } else if (m_pGameInstance->Key_Down(DIK_V)) { m_pFSM->Enable_State(FSMSTATE::MAPHELP); pairAnimInfo = m_Animation[STATEANIM::MAPHELP]; + } + else if (m_pGameInstance->Key_Down(DIK_Z)) { + m_pFSM->Enable_State(FSMSTATE::ANCIENT_THROW); + pairAnimInfo = m_Animation[STATEANIM::ANCIENT_THROW]; + } + else if (m_pGameInstance->Key_Down(DIK_G)) { + m_pFSM->Enable_State(FSMSTATE::POTION); + if (SUCCEEDED(InputMove())) + { + if (m_bSprintToggle) + { + pairAnimInfo = m_Animation[STATEANIM::SPRINT]; + } + else if (m_bWalkToggle) + { + pairAnimInfo = m_Animation[STATEANIM::WALK_FWD]; + } + else { + pairAnimInfo = m_Animation[STATEANIM::JOG_FWD]; + } + } + else { + pairAnimInfo = m_Animation[STATEANIM::IDLE]; + } + m_pModelCom->Set_Second_AnimationIndex(m_Animation[STATEANIM::POTION].first, ENUM_CLASS(BLEND_BONE::SHOULDER_NECK_L)); } m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); @@ -495,6 +870,7 @@ void CPlayer::Behavior_CombatEnter() HRESULT CPlayer::Behavior_CombatExitCheck() { pair<_uint, _bool> pairAnimInfo; + if (SUCCEEDED(InputAction()) || SUCCEEDED(InputSpell())) { if (m_pGameInstance->Key_Down(DIK_R)) { @@ -516,6 +892,9 @@ HRESULT CPlayer::Behavior_CombatExitCheck() pairAnimInfo = m_Animation[STATEANIM::LIGHT_ATTACK]; pairAnimInfo.first = iIndex + 1; m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + Add_Event(pairAnimInfo.first, + [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::JAP, this); }, + 0.1f); } } } @@ -538,6 +917,34 @@ HRESULT CPlayer::Behavior_CombatExitCheck() pairAnimInfo = m_Animation[STATEANIM::MAPHELP]; m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); } + else if (m_pGameInstance->Key_Down(DIK_Z)) { + m_pFSM->Enable_State(FSMSTATE::ANCIENT_THROW); + pairAnimInfo = m_Animation[STATEANIM::ANCIENT_THROW]; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + } + else if (m_pGameInstance->Key_Down(DIK_G)) { + m_pFSM->Enable_State(FSMSTATE::POTION); + if (SUCCEEDED(InputMove())) + { + if (m_bSprintToggle) + { + pairAnimInfo = m_Animation[STATEANIM::SPRINT]; + } + else if (m_bWalkToggle) + { + pairAnimInfo = m_Animation[STATEANIM::WALK_FWD]; + } + else { + pairAnimInfo = m_Animation[STATEANIM::JOG_FWD]; + } + + } + else { + pairAnimInfo = m_Animation[STATEANIM::IDLE]; + } + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + m_pModelCom->Set_Second_AnimationIndex(m_Animation[STATEANIM::POTION].first, ENUM_CLASS(BLEND_BONE::SHOULDER_NECK_L)); + } } if (m_pFSM->IsEnable(FSMSTATE::SPELL) && IsCurrentKeyFrame("Combat")) @@ -547,34 +954,68 @@ HRESULT CPlayer::Behavior_CombatExitCheck() switch (m_eSpell) { case STATEANIM::ACCIO: + { pairAnimInfo = m_Animation[STATEANIM::ACCIO]; + Add_Event(pairAnimInfo.first, - m_pEffectPool->Use_Skill(SKILL_TYPE::BOMBARDA, this); + [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::BOMBARDA, this); }, + 0.15f); - - break; + + + m_eSpell = STATEANIM::END; + + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + } + break; case STATEANIM::DESCENDO: { pairAnimInfo = m_Animation[STATEANIM::DESCENDO]; + Add_Event(pairAnimInfo.first, + [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::DESCENDO, this); }, + 0.1f); - m_pEffectPool->Use_Skill(SKILL_TYPE::DESCENDO, this); + m_eSpell = STATEANIM::END; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); } - break; + break; + + case STATEANIM::DEPULSO: + { + pairAnimInfo = m_Animation[STATEANIM::DEPULSO]; + + + m_eSpell = STATEANIM::END; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + } + break; default: break; } - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); - m_eSpell = STATEANIM::END; + } + } + + if (m_pFSM->IsEnable(FSMSTATE::ANCIENT_THROW)) + { + if (SUCCEEDED(InputMove()) && IsCurrentKeyFrame("Throw")) { + m_pFSM->Change_State(FSMSTATE::MOVE); + return E_FAIL; + } + } + else + { + if (SUCCEEDED(InputMove()) && IsCurrentKeyFrame("Combat")) { + m_pFSM->Change_State(FSMSTATE::MOVE); return E_FAIL; } } - if (SUCCEEDED(InputMove()) && IsCurrentKeyFrame("Combat")) { - m_pFSM->Change_State(FSMSTATE::MOVE); - return E_FAIL; - } - if (m_pModelCom->IsFinishedAnim()) { + if (SUCCEEDED(InputMove())) + { + m_pFSM->Change_State(FSMSTATE::MOVE); + return E_FAIL; + } m_pFSM->Change_State(FSMSTATE::IDLE); return E_FAIL; } @@ -584,7 +1025,210 @@ HRESULT CPlayer::Behavior_CombatExitCheck() void CPlayer::Behavior_CombatExit() { - m_pFSM->Disable_State(FSMSTATE::COMBAT | FSMSTATE::LIGHT_ATTACK | FSMSTATE::SPELL | FSMSTATE::SKILL | FSMSTATE::SKILL2 | FSMSTATE::MAPHELP); + m_pFSM->Disable_State(FSMSTATE::COMBAT | FSMSTATE::LIGHT_ATTACK | FSMSTATE::SPELL | FSMSTATE::SKILL | + FSMSTATE::SKILL2 | FSMSTATE::MAPHELP | FSMSTATE::ANCIENT_THROW | FSMSTATE::POTION); +} + +void CPlayer::Behavior_HitEnter() +{ + m_pFSM->Enable_State(FSMSTATE::HIT); + pair<_uint, _bool> pairAnimInfo; + std::random_device rd; + std::mt19937 mt(rd()); + std::uniform_int_distribution Index(0, 1); + auto RandIndex = Index(mt); + if (RandIndex == 0) + pairAnimInfo = m_Animation[STATEANIM::HIT_R]; + else + pairAnimInfo = m_Animation[STATEANIM::HIT_L]; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); +} + +HRESULT CPlayer::Behavior_HitExitCheck() +{ + if (m_pModelCom->IsFinishedAnim()) { + m_pFSM->Change_State(FSMSTATE::IDLE); + return E_FAIL; + } + return E_FAIL; +} + +void CPlayer::Behavior_HitExit() +{ + m_pFSM->Disable_State(FSMSTATE::HIT); +} + +void CPlayer::Behavior_Broom_RideEnter() +{ + m_pFSM->Enable_State(FSMSTATE::BROOM_RIDE); + pair<_uint, _bool> pairAnimInfo; + pairAnimInfo = m_Animation[STATEANIM::BROOM_MOUNT]; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); +} + +HRESULT CPlayer::Behavior_Broom_RideExitCheck() +{ + _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex(); + pair<_uint, _bool> pairAnimInfo; + if (iCurrAnimIndex == m_Animation[STATEANIM::BROOM_MOUNT].first) + { + if (m_pModelCom->IsFinishedAnim()) { + pairAnimInfo = m_Animation[STATEANIM::BROOM_MOUNT_END]; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, true); + } + return E_FAIL; + } + + if (m_pGameInstance->Key_Down(DIK_LSHIFT)) + { + m_bHoverToggle = !m_bHoverToggle; + } + if (!m_pFSM->IsEnable(FSMSTATE::DISMOUNT)) + { + if (m_bHoverToggle) + { + if (m_pGameInstance->Key_Pressing(DIK_W)) + { + pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_HOVER_FWD); + } + else if (m_pGameInstance->Key_Pressing(DIK_A)) + { + pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_HOVER_LEFT); + } + else if (m_pGameInstance->Key_Pressing(DIK_D)) + { + pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_HOVER_RIGHT); + } + else + { + pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_HOVER_IDLE); + } + } + else + { + if (m_pGameInstance->Key_Pressing(DIK_W)) + { + pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_FWD); + } + else if (m_pGameInstance->Key_Pressing(DIK_A)) + { + pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_LEFT); + } + else if (m_pGameInstance->Key_Pressing(DIK_D)) + { + pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_RIGHT); + } + else if (m_pGameInstance->Key_Pressing(DIK_LCONTROL)) + { + pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_DOWN); + } + else if (m_pGameInstance->Key_Pressing(DIK_SPACE)) + { + pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_UP); + } + else + { + pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_FWD); + } + } + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + } + + + + if (m_pGameInstance->Key_Down(DIK_N)) { + pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_DISMOUNT); + m_pFSM->Enable_State(FSMSTATE::DISMOUNT); + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + } + + if (iCurrAnimIndex == m_Animation[STATEANIM::BROOM_DISMOUNT].first) + { + if (m_pModelCom->IsFinishedAnim()) { + m_pFSM->Change_State(FSMSTATE::IDLE); + return E_FAIL; + } + if (SUCCEEDED(InputMove())) + { + m_pFSM->Change_State(FSMSTATE::MOVE); + return E_FAIL; + } + + } + + return E_FAIL; +} + +void CPlayer::Behavior_Broom_RideExit() +{ + m_pFSM->Disable_State(FSMSTATE::BROOM_RIDE | FSMSTATE::DISMOUNT); +} + +void CPlayer::Player_InterpTurn(_float fTimeDelta) +{ + /*_uint iCurrIndex = m_pModelCom->Get_AnimIndex(); + if (iCurrIndex != m_Animation[STATEANIM::JOG_FWD].first && + iCurrIndex != m_Animation[STATEANIM::WALK_FWD].first && + iCurrIndex != m_Animation[STATEANIM::SPRINT].first) + return; + + _vector xmvCurLook = XMVector4Normalize( + XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f)); + _float2 vCurLook = { XMVectorGetX(xmvCurLook),XMVectorGetZ(xmvCurLook) }; + + _vector vCameraLook = XMVectorSet(m_vCameraLookDir.x, 0.f, m_vCameraLookDir.z, 0.f); + + _vector vCameraRight = XMVectorSet(m_vCameraRightDir.x, 0.f, m_vCameraRightDir.z, 0.f); + + _float2 fCamLook = { XMVectorGetX(vCameraLook), XMVectorGetZ(vCameraLook) }; + + vCameraRight = XMVector3Normalize(vCameraRight); + + _float angle = CMyTools::Get_Direction2D(vCurLook, fCamLook); + + _float degree = XMConvertToDegrees(angle); + + GUI::Text("Degree: %.3f", degree); + + _vector xmvInput = XMVectorZero(); + + if (m_pGameInstance->Key_Pressing(DIK_W)) + xmvInput += vCameraLook; + + if (m_pGameInstance->Key_Pressing(DIK_S)) + xmvInput -= vCameraLook; + + if (m_pGameInstance->Key_Pressing(DIK_D)) + xmvInput -= vCameraRight; + + if (m_pGameInstance->Key_Pressing(DIK_A)) + xmvInput += vCameraRight; + + xmvInput = XMVector3Normalize(xmvInput); + + _float2 fInput2D = { XMVectorGetX(xmvInput), XMVectorGetZ(xmvInput) }; + + _float targetAngle = XMConvertToDegrees(CMyTools::Get_Direction2D(fCamLook, fInput2D)); + + _float angleDiff = degree - targetAngle; + + if (angleDiff > 180.f) { + angleDiff -= 360.f; + } + if (angleDiff < -180.f) { + angleDiff += 360.f; + } + + _float Offset = 2.f; + + if (angleDiff > Offset) + { + m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta); + } + else if (angleDiff < -Offset) + { + m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta); + }*/ } void CPlayer::Add_FSM() @@ -594,9 +1238,21 @@ void CPlayer::Add_FSM() CState_Idle::STATE_IDLE_DESC Desc{}; Desc.pOwner = this; Desc.funcEnterEvent = [this]() { Behavior_IdleEnter(); }; - Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_IdleExitCheck(); }; + Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_IdleExitCheck(fTimedelta); }; Desc.funcExitEvent = [this]() { Behavior_IdleExit(); }; - Desc.funcPriorityUpdate = nullptr; + Desc.funcPriorityUpdate = [this](_float fTimeDelta) { + { + if (SUCCEEDED(InputAim())) + { + if (m_pGameInstance->Mouse_Pressing(DIM_RBUTTON)) + { + _float3 fMove = m_pGameInstance->Get_MouseMove(); + m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta * fMove.x * 0.03f); + } + + } + } + }; Desc.funcLateUpdate = nullptr; m_States.emplace(FSMSTATE::IDLE, CState_Idle::Create(&Desc)); } @@ -604,12 +1260,18 @@ void CPlayer::Add_FSM() CState_Move::STATE_MOVE_DESC Desc{}; Desc.pOwner = this; Desc.funcEnterEvent = [this]() { Behavior_MoveEnter(); }; - Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_MoveExitCheck(); }; + Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_MoveExitCheck(fTimedelta); }; Desc.funcExitEvent = [this]() { Behavior_MoveExit(); }; Desc.funcPriorityUpdate = [this](_float fTimeDelta) { - if (m_pGameInstance->Key_Pressing(DIK_A)) { m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta); } - if (m_pGameInstance->Key_Pressing(DIK_D)) { m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta); }; + { + if (!m_pFSM->IsEnable(FSMSTATE::STOP)) + { + _float3 fMove = m_pGameInstance->Get_MouseMove(); + m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta * fMove.x * 0.05f); + } + } }; + Desc.funcLateUpdate = nullptr; m_States.emplace(FSMSTATE::MOVE, CState_Move::Create(&Desc)); } @@ -709,7 +1371,7 @@ void CPlayer::Set_Anim() m_Animation[STATEANIM::DESCENDO] = { 857,false }; m_Animation[STATEANIM::DEPULSO] = { 858,false }; m_Animation[STATEANIM::DIFFINDO] = { 862,false }; - m_Animation[STATEANIM::LUMOS] = { 909,true }; + m_Animation[STATEANIM::LUMOS] = { 910,true }; m_Animation[STATEANIM::LUMOS_STOP] = { 912,false }; m_Animation[STATEANIM::DISILLUSION_ENTER] = { 585,false }; m_Animation[STATEANIM::DISILLUSION_EXIT] = { 586,false }; @@ -719,18 +1381,46 @@ void CPlayer::Set_Anim() m_Animation[STATEANIM::HIT_L] = { 1124,false }; m_Animation[STATEANIM::HIT_R] = { 1125,false }; - m_Animation[STATEANIM::BROOM_IDLE] = { 679,true }; - m_Animation[STATEANIM::BROOM_FWD] = { 680,true }; + m_Animation[STATEANIM::BROOM_IDLE] = { 710,true }; + m_Animation[STATEANIM::BROOM_FWD] = { 711,true }; + m_Animation[STATEANIM::BROOM_LEFT] = { 713,true }; + m_Animation[STATEANIM::BROOM_RIGHT] = { 714,true }; + m_Animation[STATEANIM::BROOM_DOWN] = { 712,true }; + m_Animation[STATEANIM::BROOM_UP] = { 715,true }; m_Animation[STATEANIM::BROOM_MOUNT] = { 734,false }; m_Animation[STATEANIM::BROOM_MOUNT_END] = { 737,false }; m_Animation[STATEANIM::BROOM_HOVER_START] = { 699,false }; + m_Animation[STATEANIM::BROOM_DISMOUNT] = { 738,false }; + + m_Animation[STATEANIM::BROOM_HOVER_IDLE] = { 703,true }; + m_Animation[STATEANIM::BROOM_HOVER_FWD] = { 700,true }; + m_Animation[STATEANIM::BROOM_HOVER_LEFT] = { 701,true }; + m_Animation[STATEANIM::BROOM_HOVER_RIGHT] = { 702,true }; m_Animation[STATEANIM::JOG_AIM_STOP_L] = { 295,false }; m_Animation[STATEANIM::JOG_AIM_STOP_R] = { 456,false }; m_Animation[STATEANIM::JOG_AIM_STOP_BWD] = { 444,false }; + + //루모스 스탑 912 + + //713 왼쪽 슬로우 + //714 오른쪽 + //712 아래 + //715 위 + + + + // 호버 앞 700 + // 호버 좌 701 + // 호버 우 702 + + //738 착지 + } + + #pragma endregion State diff --git a/Jusin154_Team3D/Editor/Private/Protego.cpp b/Jusin154_Team3D/Editor/Private/Protego.cpp index 4a534e93d..df51edf14 100644 --- a/Jusin154_Team3D/Editor/Private/Protego.cpp +++ b/Jusin154_Team3D/Editor/Private/Protego.cpp @@ -45,19 +45,10 @@ HRESULT CProtego::Initialize(void* pArg) m_wstrEffectName = L"Protego"; - m_Events.emplace(1.3f, [&]() { - - m_pSphere->Set_Dissolve(true); - m_pBottom->Set_Dissolve(true); - m_pCircle->Set_Dissolve(true); - - }); - - m_fAmountSize = 0.1f; m_fSpeed = 5.f; - m_fDuration = 2.5f; + m_fDuration = 3.f; return S_OK; } @@ -113,7 +104,7 @@ HRESULT CProtego::Pre_Setting(CGameObject* pObject) m_pOwner = pObject; - Reset_EffectParts(); + Reset_EditEffect(); m_fAccTime = 0.f; __super::m_fAccTime = 0.f; @@ -135,10 +126,6 @@ HRESULT CProtego::Pre_Setting(CGameObject* pObject) m_fSizeAccTime = 0.f; - m_pSphere->Set_Dissolve(false); - m_pBottom->Set_Dissolve(false); - m_pCircle->Set_Dissolve(false); - m_bVisible = true; return S_OK; diff --git a/Jusin154_Team3D/Editor/Private/Revelio.cpp b/Jusin154_Team3D/Editor/Private/Revelio.cpp index b58b010f7..a2d45c08e 100644 --- a/Jusin154_Team3D/Editor/Private/Revelio.cpp +++ b/Jusin154_Team3D/Editor/Private/Revelio.cpp @@ -100,7 +100,7 @@ HRESULT CRevelio::Pre_Setting(CGameObject* pObject) m_pOwner = pObject; - Reset_EffectParts(); + Reset_EditEffect(); m_fAccTime = 0.f; __super::m_fAccTime = 0.f; 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/BombardSide.h b/Jusin154_Team3D/Editor/Public/BombardSide.h new file mode 100644 index 000000000..a324fc9df --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/BombardSide.h @@ -0,0 +1,52 @@ +#pragma once + +#include "Editor_Define.h" +#include "Effect_Container.h" + +NS_BEGIN(Engine) +NS_END + +NS_BEGIN(Editor) + +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 = {}; + _bool m_isParticleEnd = {}; + _bool m_isTrailEnd = {}; + _float4x4 m_TrailStopMat = {}; + + class CEditEffect* m_pWandLight = { nullptr }; + class CTrailObject* m_pWandTrail = { nullptr }; + class CEditEffect* 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/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/Decendo.h b/Jusin154_Team3D/Editor/Public/Decendo.h index 40b02a92e..ca1f684a5 100644 --- a/Jusin154_Team3D/Editor/Public/Decendo.h +++ b/Jusin154_Team3D/Editor/Public/Decendo.h @@ -41,6 +41,8 @@ class CDecendo final : public CEffect_Container _float m_fLerpAmount = {}; _float m_fTurnValue = {}; _vector m_vCameraLook = {}; + + public: static CDecendo* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual void Free() override; diff --git a/Jusin154_Team3D/Editor/Public/DecendoSide.h b/Jusin154_Team3D/Editor/Public/DecendoSide.h new file mode 100644 index 000000000..1e36f255f --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/DecendoSide.h @@ -0,0 +1,51 @@ +#pragma once + +#include "Editor_Define.h" +#include "Effect_Container.h" + +NS_BEGIN(Engine) +NS_END + +NS_BEGIN(Editor) + +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 = {}; + + _bool m_isTrailEnd = {}; + _float4x4 m_TrailStopMat = {}; + + class CEditEffect* 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/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..341743d6f 100644 --- a/Jusin154_Team3D/Editor/Public/Editor_Define.h +++ b/Jusin154_Team3D/Editor/Public/Editor_Define.h @@ -19,30 +19,34 @@ namespace Editor enum class MAPOBJECT_RENDER_TYPE { NORMAL, DECAL, GLASS }; enum class SHADER_PASS_ANIM { DEFAULT, SHADOW, CAPTURE, BLUR, HAIR, EYELASH, OUTLINE_WRITE, OUTLINE_READ, END }; - enum class SHADER_PASS_CUBE { DEFAULT, SHADOW, BLUR, END }; enum class SHADER_PASS_MESH { DEFAULT, SHADOW, SKYBOX, ALPHABLEND, EFFECT_ALPHABLEND, EFFECT_BLEND, EFFECT_ALPHABLEND_CULL, EFFECT_BLEND_CULL, CAPTURE, BLUR, EFFECT_ALPHABLEND_UVMOVE, MAPTOOL, GLASS, OUTLINE_WRITE, OUTLINE_READ, BLOOM, END }; - enum class SHADER_PASS_NORTEX { DEFAULT, TERRAIN, ENV_TERRAIN_ANISO, END }; + enum class SHADER_PASS_NORTEX { DEFAULT, TERRAIN, ENV_TERRAIN_ANISO, SHADOW, END }; enum class SHADER_PASS_PARTICLE { EXPLOSION, END }; enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, TRAIL_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, // 연녹색 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/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..87bd9035a 100644 --- a/Jusin154_Team3D/Editor/Public/EffectObject.h +++ b/Jusin154_Team3D/Editor/Public/EffectObject.h @@ -52,7 +52,6 @@ class CEffectObject abstract : public CPartObject _bool isBlur = {}; _bool isBillboard = {}; - _float4 vEmissive = { 0.f ,0.f ,0.f ,0.f }; _float fDiffuseAlpha = { 1.f }; _float fBlurIntensity = {}; @@ -86,24 +85,34 @@ class CEffectObject abstract : public CPartObject SHADER_PASS_INSTANCE_MODEL eShaderPass = { SHADER_PASS_INSTANCE_MODEL::NON_NOMALMAP }; - _bool isDiffuseBlur = {}; - _bool isMaskBlur = {}; - _bool isBlurDissolve = {}; - _bool isBlurReverseDissolve = {}; + _bool isBlurNoEmissive = {}; + _bool isTexBlur = {}; + _bool isBlurDissolve = {}; + _bool isBlurReverseDissolve = {}; - _float fBluringStrength = {0.01f}; + _float fBluringStrength = {0.01f}; + + _bool isBloom = {}; + _bool isBloomDissolve = {}; + _bool isBloomReverseDissolve = {}; + _float fBloomStrength = {}; + BLOOM_TYPE eBloomType = {}; - _bool isBloom = {}; + _float fDissolveDelay = {}; + _float fReverseDissolveDelay = {}; + _float2 vDissolveUVGainAmount = {}; + _bool isDissolveMove = {}; - _bool isBloomDissolve = {}; - _bool isBloomReverseDissolve = {}; - _float fBloomStrength = {}; - - BLOOM_TYPE eBloomType = {}; + _float3 vPadding0 = {}; + _float3 vPadding1 = {}; - + _float fPadding0 = {}; + _float fPadding1 = {}; + + _bool isPadding0 = {}; + _bool isPadding1 = {}; }EFFECT_INFO; diff --git a/Jusin154_Team3D/Editor/Public/Effect_Container.h b/Jusin154_Team3D/Editor/Public/Effect_Container.h index 75a396583..f3885a689 100644 --- a/Jusin154_Team3D/Editor/Public/Effect_Container.h +++ b/Jusin154_Team3D/Editor/Public/Effect_Container.h @@ -30,12 +30,14 @@ class CEffect_Container abstract : public CContainerObject virtual HRESULT Ready_Components(void* pArg) override; HRESULT Ready_Child(); HRESULT Bind_ShaderResources() override; - HRESULT Reset_EffectParts(); + HRESULT Reset_EditEffect(); void Update_Event(_float fTimeDelta); protected: - class CDummy_PhysXEffectHitBox* m_pPhysHitBox = {}; + _float4 m_vStartPos = {}; + _float4 m_vEndPos = {}; + PSX::PxSweepBuffer hitBuffer = {}; protected: _wstring m_wstrEffectName = {}; 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/InfoInstance.h b/Jusin154_Team3D/Editor/Public/InfoInstance.h new file mode 100644 index 000000000..3c24a8b6a --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/InfoInstance.h @@ -0,0 +1,67 @@ +#pragma once + +#include "Editor_Define.h" +#include "Base.h" + +NS_BEGIN(Engine) +class CGameInstance; +class CTransform; +class CUnit; +NS_END + +NS_BEGIN(Editor) + +class CInfoInstance final : public CBase +{ + DECLARE_SINGLETON(CInfoInstance) +private: + CInfoInstance(); + virtual ~CInfoInstance() = default; +public: + HRESULT Initialize_Information(ID3D11Device* pDevice, ID3D11DeviceContext* pContex); + void Release_Information(); + LEVEL Get_RestartLevel(); +public: + void Update(_float fTimeDelta); + void Change_Level(); + +#pragma region PLAYER_INFO + void Update_CameraCoordinateSystem(_float3& vLook, _float3& vRight); + pair<_float3, _float3> Get_CameraCoordinateSystem(); +#pragma endregion +#pragma region MONSTER_INFO + HRESULT Regist_PlayerAlly(CUnit* pUnit); + HRESULT Deregist_PlayerAlly(CUnit* pUnit); + HRESULT Regist_ActiveMonster(class CMonster* pUnit); + HRESULT Deregist_ActiveMonster(class CMonster* pUnit); + + class CUnit* Get_LockOnUnit(); + pair Get_NearestPlayerAlly(_fvector vPos); +#pragma endregion +#pragma region MAP_INFO + //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: + CGameInstance* m_pGameInstance = { nullptr }; + ID3D11Device* m_pDevice = { nullptr }; + ID3D11DeviceContext* m_pContext = { nullptr }; + + class CPlayerInfo* m_pPlayerInfo = { nullptr }; + class CMonsterInfo* m_pMonsterInfo = { nullptr }; + class CMapInfo* m_pMapInfo = { nullptr }; + +#ifdef _DEBUG + _string m_strLog = {}; +#endif // _DEBUG + +public: + virtual void Free() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Editor/Public/Level_EffectViewer.h b/Jusin154_Team3D/Editor/Public/Level_EffectViewer.h index b5be038ef..8ac9b2339 100644 --- a/Jusin154_Team3D/Editor/Public/Level_EffectViewer.h +++ b/Jusin154_Team3D/Editor/Public/Level_EffectViewer.h @@ -24,8 +24,8 @@ class CLevel_EffectViewer final : public CLevel HRESULT Ready_Layer_Effect(const _wstring& strLayerTag); HRESULT Ready_Layer_PhysX(const _wstring& strLayerTag); - PhsXUserData m_PlaneData = {}; - + PhsXUserData m_PlaneData = {}; + class CInfoInstance* m_pInfoInstance = { nullptr }; public: static CLevel_EffectViewer* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID); virtual void Free() override; diff --git a/Jusin154_Team3D/Editor/Public/LeviosoSide.h b/Jusin154_Team3D/Editor/Public/LeviosoSide.h new file mode 100644 index 000000000..c630042b3 --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/LeviosoSide.h @@ -0,0 +1,51 @@ +#pragma once + +#include "Editor_Define.h" +#include "Effect_Container.h" + +NS_BEGIN(Engine) +NS_END + +NS_BEGIN(Editor) + +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 = {}; + + _bool m_isTrailEnd = {}; + _float4x4 m_TrailStopMat = {}; + + class CEditEffect* 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/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/MainApp.h b/Jusin154_Team3D/Editor/Public/MainApp.h index 05d750b8a..1d8bc315b 100644 --- a/Jusin154_Team3D/Editor/Public/MainApp.h +++ b/Jusin154_Team3D/Editor/Public/MainApp.h @@ -1,4 +1,4 @@ -#pragma once +#pragma once #include "Editor_Define.h" #include "Base.h" @@ -24,6 +24,7 @@ class CMainApp final : public CBase private: CGameInstance* m_pGameInstance = { nullptr }; + class CInfoInstance* m_pInfoInstance = { nullptr }; ID3D11Device* m_pDevice = { nullptr }; ID3D11DeviceContext* m_pContext = { nullptr }; diff --git a/Jusin154_Team3D/Editor/Public/MapContainer.h b/Jusin154_Team3D/Editor/Public/MapContainer.h index 02db3d762..1236dd7bc 100644 --- a/Jusin154_Team3D/Editor/Public/MapContainer.h +++ b/Jusin154_Team3D/Editor/Public/MapContainer.h @@ -29,6 +29,9 @@ class CMapContainer abstract : public CContainerObject virtual _string& Get_Name() { return m_strName; } virtual HRESULT Save_PartObjects(tinyxml2::XMLDocument& Doc, tinyxml2::XMLElement* Container); + void ReadyForPhysX(); + void ConvertToPhysX(); + protected: virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; diff --git a/Jusin154_Team3D/Editor/Public/MapInfo.h b/Jusin154_Team3D/Editor/Public/MapInfo.h new file mode 100644 index 000000000..a3ccc7246 --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/MapInfo.h @@ -0,0 +1,45 @@ +#pragma once + +#include "Editor_Define.h" +#include "Base.h" + +NS_BEGIN(Engine) +class CGameInstance; +NS_END + +NS_BEGIN(Editor) + +class CMapInfo final : public CBase +{ +private: + CMapInfo(); + ~CMapInfo() = default; +public: + void Update(_float fTimeDelta); + void Change_Level(); + HRESULT Load_MapObjects(const _char* pFilePath); + HRESULT Load_BuildingContainer(tinyxml2::XMLElement* Container, class CMapContainer** ppContainerObject); + HRESULT Load_StreetContainer(tinyxml2::XMLElement* Container, class CMapContainer** ppContainerObject); + HRESULT Load_MapRenderObjects(tinyxml2::XMLElement* Container, class CMapContainer* pContainerObject); + HRESULT Load_MapCollisionObjects(tinyxml2::XMLElement* Container, class CMapContainer* pContainerObject); + HRESULT Load_LightElements(const _char* pFileName); + +private: + CGameInstance* m_pGameInstance = { nullptr }; + class CInfoInstance* m_pInfoInstance = { nullptr }; + ID3D11Device* m_pDevice = { nullptr }; + ID3D11DeviceContext* m_pContext = { nullptr }; + +private: + HRESULT Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex); + +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/Editor/Public/MonsterInfo.h b/Jusin154_Team3D/Editor/Public/MonsterInfo.h new file mode 100644 index 000000000..4d6c23f2c --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/MonsterInfo.h @@ -0,0 +1,52 @@ +#pragma once + +#include "Editor_Define.h" +#include "Base.h" + +NS_BEGIN(Engine) +class CGameInstance; +class CUnit; +class CTransform; +NS_END + +NS_BEGIN(Editor) + +class CMonsterInfo final : public CBase +{ +private: + CMonsterInfo(); + ~CMonsterInfo() = default; +public: + void Update(_float fTimeDelta); + void Change_Level(); + + HRESULT Regist_PlayerAlly(CUnit* pUnit); + HRESULT Deregist_PlayerAlly(CUnit* pUnit); + HRESULT Regist_ActiveMonster(class CMonster* pUnit); + HRESULT Deregist_ActiveMonster(class CMonster* pUnit); + + CUnit* Get_LockOnUnit(); + pair Get_NearestPlayerAlly(_fvector vPos); + +private: + CGameInstance* m_pGameInstance = { nullptr }; + class CInfoInstance* m_pInfoInstance = { nullptr }; + ID3D11Device* m_pDevice = { nullptr }; + ID3D11DeviceContext* m_pContext = { nullptr }; + + class CMonster* m_pLockOnMonster = { nullptr }; + list m_ActiveMonsters = {}; + list m_PlayerAllies = {}; + +private: + HRESULT Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex); + HRESULT Refresh_LockOnMonsters(); + HRESULT Refresh_PlayerAllies(); + + +public: + static CMonsterInfo* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContex); + virtual void Free() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Editor/Public/NomalJap.h b/Jusin154_Team3D/Editor/Public/NomalJap.h index 70f9aa159..0870d8f4c 100644 --- a/Jusin154_Team3D/Editor/Public/NomalJap.h +++ b/Jusin154_Team3D/Editor/Public/NomalJap.h @@ -19,6 +19,8 @@ class CNomalJap final : public CEffect_Container 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; @@ -30,21 +32,33 @@ class CNomalJap final : public CEffect_Container HRESULT Bind_ShaderResources() override; virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override; private: + class CInfoInstance* m_pInfoInstance = { nullptr }; _wstring m_wstrEffectName = {}; - class CPartObject* m_pProjectile = {}; - class CPartObject* m_pProjectile_Side = {}; + class CPartObject* m_pProjectile = {}; + class CPartObject* m_pProjectile_Side = {}; - _vector m_vRotateUp = {}; + _float3 m_vRotateUp = {}; _float m_fAccTime = {}; _float m_fLerpAmount = {}; _float m_fTurnValue = {}; - _vector m_vCameraLook = {}; + + CUnit* m_pTargetUnit = { nullptr }; // 발사될 당시 대상 + _float3 m_vDirection = { 0.f, 0.f, 1.f }; + _float4 m_vStartPos = { 0.f, 0.f, 0.f, 1.f }; // 현재 발사 된 위치 + _float4 m_vTargetPos = { 0.f, 0.f, 10.f, 1.f }; // 현재 타게팅 된 위치 + _float m_fAngularSpeed = XM_2PI / 0.3f; + _float m_fLinearSpeed = 1.f; + _bool m_bTrailPulseEnded = false; public: static CNomalJap* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual void Free() override; CGameObject* Clone(void* pArg, CGameObject* pOwner) override; +#ifdef _DEBUG void Describe_Entity() override; + +#endif // _DEBUG + }; NS_END diff --git a/Jusin154_Team3D/Editor/Public/NomalJapSide.h b/Jusin154_Team3D/Editor/Public/NomalJapSide.h new file mode 100644 index 000000000..3a4022984 --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/NomalJapSide.h @@ -0,0 +1,53 @@ +#pragma once + +#include "Editor_Define.h" +#include "Effect_Container.h" + +NS_BEGIN(Engine) +NS_END + +NS_BEGIN(Editor) + +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 = {}; + _bool m_isParticleEnd = {}; + _bool m_isTrailEnd = {}; + _float4x4 m_TrailStopMat = {}; + + + class CEditEffect* m_pWandLight = { nullptr }; + class CTrailObject* m_pWandTrail = { nullptr }; + class CEditEffect* 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/Editor/Public/Player.h b/Jusin154_Team3D/Editor/Public/Player.h index 5c4c27ed7..10e59553f 100644 --- a/Jusin154_Team3D/Editor/Public/Player.h +++ b/Jusin154_Team3D/Editor/Public/Player.h @@ -7,6 +7,14 @@ NS_BEGIN(Editor) class CPlayer final : public CUnit { +public: + struct PendingEvent + { + _float fRatio = 0.f; + _uint AnimIndex = 0; + function Callback; + }; + private: CPlayer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); CPlayer(const CPlayer& Prototype); @@ -17,14 +25,21 @@ class CPlayer final : public CUnit virtual void Update(_float fTimeDelta) override; virtual void Late_Update(_float fTimeDelta) override; virtual HRESULT Render() override; +#ifdef _DEBUG + void Render_CameraCoordinateSystem(); +#endif // _DEBUG _bool Set_Sprint(_bool bSprint) { m_bSprintToggle = bSprint; } _matrix Get_WandPos(); private: + CUnit* m_pLockOnMonster = { nullptr }; _float m_fDirectionRadian = 0.f; _bool m_bSprintToggle = { false }; _bool m_bWalkToggle = { false }; + _bool m_bHoverToggle = { true }; + _float3 m_vCameraLookDir = { 0.f, 0.f, 1.f, }; + _float3 m_vCameraRightDir = { 1.f, 0.f, 0.f }; class CCamPosition_Socket* m_pCamPosition_TopDown_LookPart = { nullptr }; class CCamPosition_Arm* m_pCamPosition_TopDown_FollowPart = { nullptr }; @@ -34,43 +49,72 @@ class CPlayer final : public CUnit CRigidBody_Dynamic* m_pRigidBody = { nullptr }; class CCallBack_Playable_Behavior* m_pCallBack_Behavior = { nullptr }; class CCallBack_Playable_HitReport* m_pCallBack_HitReport = { nullptr }; + CLight* m_pLightCom = { nullptr }; + LIGHT_DESC LightDesc = {}; + + class CModel* m_pBroomModel = { nullptr }; + class CTransform* m_pBroomTransform = { nullptr }; + class CBroom* m_pBroom = { nullptr }; private: virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; HRESULT Ready_Components(); HRESULT Ready_Parts(); HRESULT Bind_ShaderResources(); + void ReLockOnTarget(); + void SetGravity(); + + void Update_CameraCoordinateSystem(); +#ifdef _DEBUG + unique_ptr m_BasicEffect; + unique_ptr> m_Batch; +#endif // _DEBUG + public: static CPlayer* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr) override; virtual void Free() override; +#ifdef _DEBUG virtual void Describe_Entity() override; +#endif // _DEBUG + #pragma region STATE public: virtual void Reset_Sprint() { m_bSprintToggle = false; } virtual void Reset_Walk() { m_bWalkToggle = false; } + + private: void TestKeyInput(_float fTimeDelta); virtual void Add_FSM(); virtual void Set_Anim(); + void Play_Event(); + void Add_Event(_uint AnimIndex, function Callback, _float fRatio = 0.f); + + vector m_PendingEvents; + + _float3 m_OffsetPos = {}; + _float m_fAmount = { 1.f }; + _float m_fInputTime = {}; + _bool m_bRatio = { false }; + HRESULT InputAction(); HRESULT InputMove(); + HRESULT InputKeyUpMove(); HRESULT InputSpell(); - HRESULT InputAimMove(); - - _float m_fAmount = { 1.f }; + HRESULT InputAim(); void Behavior_IdleEnter(); - HRESULT Behavior_IdleExitCheck(); + HRESULT Behavior_IdleExitCheck(_float fTimeDelta); void Behavior_IdleExit(); void Behavior_MoveEnter(); - HRESULT Behavior_MoveExitCheck(); + HRESULT Behavior_MoveExitCheck(_float fTimeDelta); void Behavior_MoveExit(); void Behavior_JumpEnter(); @@ -88,9 +132,22 @@ class CPlayer final : public CUnit void Behavior_CombatEnter(); HRESULT Behavior_CombatExitCheck(); void Behavior_CombatExit(); + + void Behavior_HitEnter(); + HRESULT Behavior_HitExitCheck(); + void Behavior_HitExit(); + + void Behavior_Broom_RideEnter(); + HRESULT Behavior_Broom_RideExitCheck(); + void Behavior_Broom_RideExit(); + + + void Player_InterpTurn(_float fTimeDelta); + +#pragma endregion + private: class CEffectPool* m_pEffectPool = nullptr; -#pragma endregion }; NS_END diff --git a/Jusin154_Team3D/Editor/Public/PlayerInfo.h b/Jusin154_Team3D/Editor/Public/PlayerInfo.h new file mode 100644 index 000000000..5718d602c --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/PlayerInfo.h @@ -0,0 +1,44 @@ +#pragma once + +#include "Editor_Define.h" +#include "Base.h" + +NS_BEGIN(Engine) +class CGameInstance; +class CTransform; +NS_END + +NS_BEGIN(Editor) + +class CPlayerInfo final : public CBase +{ +private: + CPlayerInfo(); + ~CPlayerInfo() = default; +public: + void Update(_float fTimeDelta); + void Change_Level(); + + void Update_CameraCoordinateSystem(_float3& vLook, _float3& vRight); + pair<_float3, _float3> Get_CameraCoordinateSystem(); +private: + CGameInstance* m_pGameInstance = { nullptr }; + class CInfoInstance* m_pInfoInstance = { nullptr }; + ID3D11Device* m_pDevice = { nullptr }; + ID3D11DeviceContext* m_pContext = { nullptr }; + +private: + CTransform* m_pTransform = { nullptr }; + _float3 m_vCameraLookDir = { 0.f, 0.f, 1.f, }; + _float3 m_vCameraRightDir = { 1.f, 0.f, 0.f }; + + +private: + HRESULT Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex); + +public: + static CPlayerInfo* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContex); + virtual void Free() override; +}; + +NS_END 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/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli index 9a1e75e37..c07dd7727 100644 --- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli +++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli @@ -30,10 +30,14 @@ float ShadowVisibility_hwPCF(Texture2D ShadowMap, float4 vLightClip, float2 vSha for (int u = -1; u <= 1; ++u) { float2 vOffset = float2(u, v) * vTexel; - float fDepth = ShadowMap.Sample(DefaultSampler, uv + vOffset).x; + float fDepth = ShadowMap.Sample(BorderOneSampler, uv + vOffset); fVisibility += (fDepthCenter - bias > fDepth) ? 0.f : 1.f; } } + if (abs(fVisibility - 9.f) < FLT_EPSILON3) + { + fVisibility = 9.f; + } return fVisibility / 9.f; } @@ -158,9 +162,9 @@ PBR_LIGHT_OUT PBR_Lighting( float NdotV = saturate(dot(vNormal, vToView)); if (NdotL <= 0 || NdotV <= 0) { - return Out; Out.vShade = 0; Out.vSpecular = 0; + return Out; } float fAlpha = max(fRoughness * fRoughness, 0.04f); @@ -283,7 +287,7 @@ float4x4 RotateAxis(float4 _vAxis , float fAngle) ); } - float3 vAxis = normalize(_vAxis); + float3 vAxis = normalize(_vAxis).xyz; float fCos = cos(radians(fAngle)); float fSin = sin(radians(fAngle)); @@ -343,7 +347,30 @@ float2 SelectLerpUV(float2 fAmount, float _fRatio, int iSelectOption) } return fAmount * fRatio; - } +float3 ReinHard_ToneMapper(float3 vColor) +{ + float k = 1.f; + vColor = (vColor / (vColor + k)); + return pow(vColor, 1.f / 2.2f); +} + +float3 Filmic_ToneMapper(float3 vColor) +{ + const float fA = 2.51f; + const float fB = 0.03f; + const float fC = 2.43f; + const float fD = 0.59f; + const float fE = 0.14f; + + vColor = saturate( + vColor * (fA * vColor + fB) + / (vColor * (fC * vColor + fD) + fE) + ); + + return pow(vColor, 1.f / 2.2f); +} + + #endif // ENGINE_SHADER_FUNCTIONS_HLSLI diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_Samplers.hlsli b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_Samplers.hlsli index fc1fa297c..2e950e2c6 100644 --- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_Samplers.hlsli +++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_Samplers.hlsli @@ -39,7 +39,15 @@ sampler BorderZeroSampler = sampler_state Filter = MIN_MAG_MIP_POINT; AddressU = Border; AddressV = Border; - BorderColor = float4(0, 0, 0, 0); + BorderColor = float4(0.f, 0.f, 0.f, 0.f); +}; + +sampler BorderOneSampler = sampler_state +{ + Filter = MIN_MAG_MIP_POINT; + AddressU = Border; + AddressV = Border; + BorderColor = float4(1.f, 1.f, 1.f, 1.f); }; sampler PointSampler = sampler_state diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl index ba4bb829d..b59cd1543 100644 --- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl +++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl @@ -12,7 +12,7 @@ uint g_iMaxShadowHeight; float2 g_vResolution; uint g_iBloomEmbossingPass; -float g_fThreshold; +float g_fBloomThreshold; float g_fDepthThreshold; float g_fFocusDistance; float g_fFarBlurStart; @@ -25,6 +25,8 @@ float g_fLightRange; float g_fSpotInnerAngle; float g_fSpotOuterAngle; +float g_fToneMappingExposure; +uint g_iToneMappingType; bool g_bUsePowerLightAttenuation; float g_fLightAttenuationPower; @@ -40,7 +42,7 @@ Texture2D g_DiffuseTexture; Texture2D g_ShadeTexture; Texture2D g_DepthTexture; Texture2D g_SpecularTexture; -Texture2D g_ShadowTexture; +Texture2D g_ShadowNearTexture; Texture2D g_PreShadowTexture; Texture2D g_BlurTexture; Texture2D g_BlurXTexture; @@ -127,6 +129,8 @@ struct PS_OUT_LIGHT PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In) { PS_OUT_LIGHT Out; + Out.vShade = 0.f; + Out.vSpecular = 0.f; float2 uv = In.vTexcoord; @@ -184,7 +188,6 @@ PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In) return Out; } - //float fDiffuseAOStrength = lerp(0.3f, 3.f, fOcclusion); { // 수치조정 // 디렉셔널 float fMinRoughness = 0.05f; fRoughness = max(fRoughness, fMinRoughness); // 러프니스 최소값 보장 @@ -199,7 +202,7 @@ PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In) float3 vAmbient = g_vLightAmbient.rgb * fOcclusion * fAttenuation; float3 vFinalDiffuse = PBR_Out.vShade + vAmbient; float3 vFinalSpecular = PBR_Out.vSpecular * g_vLightSpecular.rgb; - + Out.vShade = float4(vFinalDiffuse, 1.f); Out.vSpecular = float4(vFinalSpecular, 1.f); @@ -209,6 +212,8 @@ PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In) PS_OUT_LIGHT PS_MAIN_POINT(PS_IN In) { PS_OUT_LIGHT Out; + Out.vShade = 0.f; + Out.vSpecular = 0.f; float2 uv = In.vTexcoord; @@ -285,7 +290,6 @@ PS_OUT_LIGHT PS_MAIN_POINT(PS_IN In) return Out; } - //float fDiffuseAOStrength = lerp(0.3f, 3.f, fOcclusion); { // 수치조정 // 점광원 float fMinRoughness = 0.05f; fRoughness = max(fRoughness, fMinRoughness); // 러프니스 최소값 보장 @@ -310,6 +314,8 @@ PS_OUT_LIGHT PS_MAIN_POINT(PS_IN In) PS_OUT_LIGHT PS_MAIN_SPOT(PS_IN In) { PS_OUT_LIGHT Out; + Out.vShade = 0.f; + Out.vSpecular = 0.f; float2 uv = In.vTexcoord; @@ -415,7 +421,7 @@ PS_OUT_LIGHT PS_MAIN_SPOT(PS_IN In) float3 vAmbient = g_vLightAmbient.rgb * fOcclusion * fAttenuation; float3 vFinalDiffuse = PBR_Out.vShade + vAmbient; float3 vFinalSpecular = PBR_Out.vSpecular * g_vLightSpecular.rgb; - + Out.vShade = float4(vFinalDiffuse, 1.f); Out.vSpecular = float4(vFinalSpecular, 1.f); @@ -503,10 +509,11 @@ PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In) vPreShadowTexcoord.y = (vPreShadowPosition.y / vPreShadowPosition.w) * -0.5f + 0.5f; /* 광원의 NDC에서 샘플링 */ - float fVisibility_Dynamic = ShadowVisibility_hwPCF(g_ShadowTexture, vPosition, float2(g_iMaxShadowWidth, g_iMaxShadowHeight), 0.0005f); + float fVisibility_Dynamic_Near = ShadowVisibility_hwPCF(g_ShadowNearTexture, vPosition, float2(g_iMaxShadowWidth, g_iMaxShadowHeight), 0.0005f); float fVisibility_Static = ShadowVisibility_hwPCF(g_PreShadowTexture, vPreShadowPosition, float2(g_iMaxShadowWidth, g_iMaxShadowHeight), 0.0005f); - Out.vBackBuffer.rgb *= lerp(0.5f, 1.f, min(fVisibility_Dynamic, fVisibility_Static)); + Out.vBackBuffer.rgb *= lerp(0.25f, 1.f, lerp(fVisibility_Dynamic_Near, fVisibility_Static, vDepthDesc.y)); + float4 vColor = 0.f; @@ -515,7 +522,7 @@ PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In) vTexcoord.x = In.vTexcoord.x; vTexcoord.y = In.vTexcoord.y + (float) i / g_vResolution.y; - vColor += g_fWeights_128[i + 63] * g_BlurXTexture.Sample(ClampSampler, vTexcoord); + vColor += g_fWeights_128[i + 63] * g_BlurXTexture.Sample(BorderZeroSampler, vTexcoord); } Out.vBackBuffer += vColor; @@ -535,7 +542,7 @@ PS_OUT_FLT4_SINGLE PS_MAIN_REFIT(PS_IN In) { PS_OUT_FLT4_SINGLE Out; - Out.vSingleTarget = g_DiffuseTexture.Sample(PointSampler, In.vTexcoord); + Out.vSingleTarget = g_DiffuseTexture.Sample(BorderZeroSampler, In.vTexcoord); return Out; } @@ -544,8 +551,8 @@ PS_OUT_FLT4_SINGLE PS_MAIN_EMBOSS(PS_IN In) { PS_OUT_FLT4_SINGLE Out; - vector vInput = g_DiffuseTexture.Sample(PointSampler, In.vTexcoord); - //float fMask = g_BloomMaskTexture.Sample(PointSampler, In.vTexcoord).a; + vector vInput = g_DiffuseTexture.Sample(BorderZeroSampler, In.vTexcoord); + //float fMask = g_BloomMaskTexture.Sample(BorderZeroSampler, In.vTexcoord).a; float3 vColor = vInput.rgb; uint iMask = (uint) round(vInput.a * 255.f); // int a = 1 -> // vBloom.a = (enum / 255); @@ -574,7 +581,7 @@ PS_OUT_FLT4_SINGLE PS_MAIN_EMBOSS(PS_IN In) return Out; } - float fBloomIntensity = GetBloomCurve(fIntensity, g_fThreshold, g_iBloomEmbossingPass); + float fBloomIntensity = GetBloomCurve(fIntensity, g_fBloomThreshold, g_iBloomEmbossingPass); float3 bloomColor = (vColor * fBloomIntensity) / fIntensity; Out.vSingleTarget = float4(bloomColor, 1.f); @@ -593,7 +600,7 @@ PS_OUT_FLT4_SINGLE PS_MAIN_BLOOM_ACCUM(PS_IN In) PS_OUT_FLT4_SINGLE Out; float3 vColorSrcA = g_DiffuseTexture.Sample(PointSampler, In.vTexcoord).xyz; - float3 vColorSrcB = g_BlurTexture.Sample(PointSampler, In.vTexcoord).xyz; + float3 vColorSrcB = g_BlurTexture.Sample(BorderZeroSampler, In.vTexcoord).xyz; Out.vSingleTarget = float4(saturate(vColorSrcA + vColorSrcB), 1.f); @@ -605,7 +612,7 @@ PS_OUT_FLT4_SINGLE PS_MAIN_BLOOM_FINISH(PS_IN In) PS_OUT_FLT4_SINGLE Out; vector vColor = g_DiffuseTexture.Sample(PointSampler, In.vTexcoord); - float3 vBloom = g_BlurTexture.Sample(PointSampler, In.vTexcoord).xyz; + float3 vBloom = g_BlurTexture.Sample(BorderZeroSampler, In.vTexcoord).xyz; Out.vSingleTarget = vColor; Out.vSingleTarget += float4(vBloom, 1.f); @@ -624,7 +631,7 @@ PS_OUT_BLUR_X PS_MAIN_BLUR_X(PS_IN In) vTexcoord.x = In.vTexcoord.x + (float) i / g_vResolution.x; vTexcoord.y = In.vTexcoord.y; - vColor += g_fWeights_128[i + 63] * g_BlurTexture.Sample(ClampSampler, vTexcoord); + vColor += g_fWeights_128[i + 63] * g_BlurTexture.Sample(BorderZeroSampler, vTexcoord); } Out.vBlurX = vColor; @@ -644,7 +651,7 @@ PS_OUT_BLUR_X PS_MAIN_BLUR_X_ENV(PS_IN In) float fBlurAmount = 0.0f; float4 vCenter = g_DepthTexture.Sample(DefaultSampler, In.vTexcoord); - float4 vOriginal = g_BlurTexture.Sample(ClampSampler, In.vTexcoord); + float4 vOriginal = g_BlurTexture.Sample(BorderZeroSampler, In.vTexcoord); float fCenterViewZ = vCenter.y * g_fFar; float fTerrain = (1.f / 255.f); @@ -688,7 +695,7 @@ PS_OUT_BLUR_X PS_MAIN_BLUR_X_ENV(PS_IN In) continue; } - vColor += g_fWeights_32[i + 16] * g_BlurTexture.Sample(ClampSampler, vTexcoord); + vColor += g_fWeights_32[i + 16] * g_BlurTexture.Sample(BorderZeroSampler, vTexcoord); fAcc += g_fWeights_32[i + 16]; } @@ -765,7 +772,7 @@ PS_OUT_BACKBUFFER PS_MAIN_POSTCOMBINED(PS_IN In) continue; } - vColor += g_fWeights_32[i + 16] * g_BlurTexture.Sample(ClampSampler, vTexcoord); + vColor += g_fWeights_32[i + 16] * g_BlurTexture.Sample(BorderZeroSampler, vTexcoord); fAcc += g_fWeights_32[i + 16]; } if (fAcc <= FLT_EPSILON3) @@ -793,7 +800,7 @@ PS_OUT_BACKBUFFER PS_MAIN_POSTCOMBINED(PS_IN In) float fBlendAmount = saturate(fBlurAmount * g_fDOFBlurMultiplier); float3 finalColor = lerp(vOriginal.rgb, vBlurMatched, fBlendAmount); - Out.vBackBuffer = float4(vColor.xyz, vOriginal.a); + Out.vBackBuffer = float4(finalColor.xyz, vOriginal.a); Out.vEnvironment = 0.f; return Out; @@ -811,7 +818,7 @@ PS_OUT_BLUR_X PS_MAIN_BLUR_Y(PS_IN In) vTexcoord.x = In.vTexcoord.x; vTexcoord.y = In.vTexcoord.y + (float) i / g_vResolution.y; - vColor += g_fWeights_128[i + 63] * g_BlurTexture.Sample(ClampSampler, vTexcoord); + vColor += g_fWeights_128[i + 63] * g_BlurTexture.Sample(BorderZeroSampler, vTexcoord); } Out.vBlurX = vColor; @@ -837,14 +844,52 @@ PS_OUT_FLT4_SINGLE PS_MAIN_FOG(PS_IN In) vFinalColor = lerp(g_vFogColor, vColor, max(fRatio, 0.2f)); vFinalColor.a = 1.f; - if (1.f == vDepthDesc.y) + if (1.f == vDepthDesc.y) { vFinalColor = float4(g_vFogColor); - + } Out.vSingleTarget = vFinalColor; return Out; } +VS_OUT VS_TONE_MAPPING(VS_IN In) +{ + VS_OUT Out; + + matrix matWV, matWVP; + + matWV = mul(g_WorldMatrix, g_ViewMatrix); + matWVP = mul(matWV, g_ProjMatrix); + + Out.vPosition = mul(vector(In.vPosition, 1.f), matWVP); + Out.vTexcoord = In.vTexcoord; + + return Out; +} + +PS_OUT_BACKBUFFER PS_TONE_MAPPING(PS_IN In) +{ + PS_OUT_BACKBUFFER Out; + vector vColor = g_OriginalTexture.Sample(DefaultSampler, In.vTexcoord); + vColor *= g_fToneMappingExposure; + vColor = pow(vColor, 2.2f); + switch (g_iToneMappingType) { + case 0: + break; + case 1: + vColor = float4(ReinHard_ToneMapper(vColor.xyz), 1.f); + break; + case 2: + vColor = float4(Filmic_ToneMapper(vColor.xyz), 1.f); + break; + default: + break; + } + + Out.vBackBuffer = vColor; + Out.vEnvironment = float4(0.f, 0.f, 0.f, 1.f); + return Out; +} technique11 DefaultTechnique { @@ -995,4 +1040,14 @@ technique11 DefaultTechnique GeometryShader = NULL; PixelShader = compile ps_5_0 PS_MAIN_FOG(); } + + pass Tone_Mapping_Pass // 15 + { + SetRasterizerState(RS_Default); + SetDepthStencilState(DSS_None, 0); + SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_CAPTURE(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_TONE_MAPPING(); + } } diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl index b669d3285..952369d09 100644 --- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl +++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl @@ -25,6 +25,7 @@ struct ParticleValue float2 vDistortionUVMoveTime; float2 vNoiseUVMoveTime; float2 vAniTime; + float2 vDissolveUVMoveTime; float2 vAniIndex; float fGravity; @@ -321,8 +322,14 @@ void CS_MAIN( { particleValue.vDistortionUVMoveTime.x = 0.f; } - + particleValue.vDissolveUVMoveTime.x += fTimeDelta; + + if (particleValue.vDissolveUVMoveTime.x >= particleValue.vDissolveUVMoveTime.y) + { + particleValue.vDissolveUVMoveTime.x = 0.f; + } + //아웃풋 대입 g_VBInstanceOutput[iIndex] = particle; diff --git a/Jusin154_Team3D/Engine/Default/Engine.vcxproj b/Jusin154_Team3D/Engine/Default/Engine.vcxproj index 06b502ff1..24acea968 100644 --- a/Jusin154_Team3D/Engine/Default/Engine.vcxproj +++ b/Jusin154_Team3D/Engine/Default/Engine.vcxproj @@ -210,6 +210,7 @@ call Update_Lib.bat + true true diff --git a/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters b/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters index 5928bf252..832872375 100644 --- a/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters +++ b/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters @@ -292,7 +292,7 @@ {432b36d5-fdf6-456a-bc71-8bf793a42314} - + {d566d9e6-6183-48dc-a196-25fd47a10c48} @@ -556,7 +556,10 @@ 02.Element\02.Component\02.VIBuffer\Box - 01.Utility\07. Fog + 01.Utility\07.Fog + + + 01.Utility\01.Renderer @@ -998,9 +1001,6 @@ 01.Utility\02.PipeLine - - 01.Utility\01.Renderer - 02.Element\02.Component\01.Shader @@ -1188,7 +1188,10 @@ 02.Element\02.Component\02.VIBuffer\Box - 01.Utility\07. Fog + 01.Utility\07.Fog + + + 01.Utility\01.Renderer @@ -1239,41 +1242,41 @@ + + 99.Define\01.SHADER + + + 99.Define\01.SHADER + 99.Define\01.SHADER 99.Define\01.SHADER - - 99.Define\01.SHADER - 99.Define\01.SHADER - + 99.Define\01.SHADER - - 99.Define\01.SHADER\Inc - 99.Define\01.SHADER\Inc - - 99.Define\01.SHADER\Inc - - - 99.Define\01.SHADER\Inc - - + 99.Define\01.SHADER\Inc 99.Define\01.SHADER\Inc - - 99.Define\01.SHADER + + 99.Define\01.SHADER\Inc + + + 99.Define\01.SHADER\Inc + + + 99.Define\01.SHADER\Inc \ No newline at end of file diff --git a/Jusin154_Team3D/Engine/Private/Animation.cpp b/Jusin154_Team3D/Engine/Private/Animation.cpp index 448f27838..493d20660 100644 --- a/Jusin154_Team3D/Engine/Private/Animation.cpp +++ b/Jusin154_Team3D/Engine/Private/Animation.cpp @@ -42,7 +42,7 @@ _bool CAnimation::Update_TransformationMatrices(const vector& Bone if (m_fCurrentTrackPosition >= m_fDuration) { if (false == bIsLoop) { - m_fCurrentTrackPosition = 0.f; // 루프 + m_fCurrentTrackPosition = 0.f; m_fTempTrack = 0.f; return true; } diff --git a/Jusin154_Team3D/Engine/Private/Camera.cpp b/Jusin154_Team3D/Engine/Private/Camera.cpp index a1591273d..e18b56af4 100644 --- a/Jusin154_Team3D/Engine/Private/Camera.cpp +++ b/Jusin154_Team3D/Engine/Private/Camera.cpp @@ -46,8 +46,6 @@ HRESULT CCamera::Initialize(void* pArg) m_bEnable_LookLerp = pDesc->bEnableLookLerp; m_vFollowLerpTime = pDesc->vFollowLerpTime; - - return S_OK; } @@ -56,7 +54,7 @@ HRESULT CCamera::Bind_Matrices() if (true == m_bActive) { m_pGameInstance->Set_Transform(D3DTS::VIEW, XMMatrixInverse(nullptr, XMLoadFloat4x4(m_pTransformCom->Get_WorldMatrixPtr()))); m_pGameInstance->Set_Transform(D3DTS::PROJ, XMMatrixPerspectiveFovLH(m_fFovy, m_fAspect, m_fNear, m_fFar)); - //Ready_Shadow(); + Ready_Shadow(); } return S_OK; } @@ -154,14 +152,25 @@ HRESULT CCamera::Ready_Shadow() ShadowDesc.fFar = 200.f; ShadowDesc.fNear = 0.1f; - ShadowDesc.fWidth = 30.f; - ShadowDesc.fHeight = 30.f; + ShadowDesc.fWidth = 192.f; + ShadowDesc.fHeight = 168.f; XMStoreFloat4(&ShadowDesc.vAt, m_pLookTarget->Get_WorldPostion()); - - _matrix matRotation = XMMatrixRotationRollPitchYaw(XMConvertToRadians(vRollPichYaw.x), XMConvertToRadians(vRollPichYaw.y), XMConvertToRadians(vRollPichYaw.z)); + _matrix matRotation = XMMatrixRotationRollPitchYaw(XMConvertToRadians(m_vRollPichYaw.x), XMConvertToRadians(m_vRollPichYaw.y), XMConvertToRadians(m_vRollPichYaw.z)); XMStoreFloat4(&ShadowDesc.vEye, XMLoadFloat4(&ShadowDesc.vAt) - matRotation.r[2] * (ShadowDesc.fFar * 0.25f)); +#ifdef _DEBUG + GUI::Begin("Renderer"); + if (GUI::CollapsingHeader("Near_Camera_ShadowDesc")) { + //GUI::SliderFloat3("RPY", (_float*)&m_vRollPichYaw, -360.f, 360.f); + GUI::DragFloat("Far", &ShadowDesc.fFar, 1.f, 20, 300.f); + GUI::DragFloat("width", &ShadowDesc.fWidth, 1.f, 20.f, 100.f, "%.1f"); + GUI::DragFloat("height", &ShadowDesc.fHeight, 1.f, 20.f, 100.f, "%.1f"); + GUI::Text("%f %f %f %f", ShadowDesc.vAt.x, ShadowDesc.vAt.y, ShadowDesc.vAt.z, ShadowDesc.vAt.w); + } + GUI::End(); +#endif // _DEBUG + if (FAILED(m_pGameInstance->Ready_Shadow_Light(ShadowDesc))) { return E_FAIL; } @@ -182,14 +191,21 @@ void CCamera::Set_Fov(_float fFovy, _float fTimeDelta,_bool& bZoomIn) if (fFovy > m_fFovy) { m_fFovy += (fTimeDelta * 0.6f); + if (fFovy < m_fFovy) { + m_fFovy = fFovy; + } } else if(fFovy < m_fFovy) { m_fFovy -= (fTimeDelta * 0.6f); + if (fFovy > m_fFovy) { + m_fFovy = fFovy; + } } - if (fFovy == m_fFovy) + if (fabsf(fFovy - m_fFovy) <= FLT_EPSILON3) { + m_fFovy = fFovy; bZoomIn = false; } } diff --git a/Jusin154_Team3D/Engine/Private/Channel.cpp b/Jusin154_Team3D/Engine/Private/Channel.cpp index bd03bf7e4..9619fed79 100644 --- a/Jusin154_Team3D/Engine/Private/Channel.cpp +++ b/Jusin154_Team3D/Engine/Private/Channel.cpp @@ -120,24 +120,67 @@ void CChannel::Update_TransformationMatirx( vector<_uint> BoneMask, _vector vector[3]) { + + if (0.f == fCurrentTrackPosition) + *pCurrentKeyFrameIndex = 0; + + KEYFRAME LastKeyFrame = m_KeyFrames.back(); + + _vector vScale{}; + _vector vRotation{}; + _vector vTranslation{}; + + if (fCurrentTrackPosition >= LastKeyFrame.fTrackPosition) + { + vScale = XMLoadFloat3(&LastKeyFrame.vScale); + vRotation = XMLoadFloat4(&LastKeyFrame.vRotation); + vTranslation = XMVectorSetW(XMLoadFloat3(&LastKeyFrame.vTranslation), 1.f); + } + + else + { + while (fCurrentTrackPosition >= m_KeyFrames[*pCurrentKeyFrameIndex + 1].fTrackPosition) + ++*pCurrentKeyFrameIndex; + + _float3 vSourScale{}, vDestScale{}; + _float4 vSourRotation{}, vDestRotation{}; + _float3 vSourTranslation{}, vDestTranslation{}; + + vSourScale = m_KeyFrames[*pCurrentKeyFrameIndex].vScale; + vDestScale = m_KeyFrames[*pCurrentKeyFrameIndex + 1].vScale; + + vSourRotation = m_KeyFrames[*pCurrentKeyFrameIndex].vRotation; + vDestRotation = m_KeyFrames[*pCurrentKeyFrameIndex + 1].vRotation; + + vSourTranslation = m_KeyFrames[*pCurrentKeyFrameIndex].vTranslation; + vDestTranslation = m_KeyFrames[*pCurrentKeyFrameIndex + 1].vTranslation; + + _float fRatio = (fCurrentTrackPosition - m_KeyFrames[*pCurrentKeyFrameIndex].fTrackPosition) / + (m_KeyFrames[*pCurrentKeyFrameIndex + 1].fTrackPosition - m_KeyFrames[*pCurrentKeyFrameIndex].fTrackPosition); + + vScale = XMVectorLerp(XMLoadFloat3(&vSourScale), XMLoadFloat3(&vDestScale), fRatio); + vRotation = XMQuaternionSlerp(XMLoadFloat4(&vSourRotation), XMLoadFloat4(&vDestRotation), fRatio); + vTranslation = XMVectorSetW(XMVectorLerp(XMLoadFloat3(&vSourTranslation), XMLoadFloat3(&vDestTranslation), fRatio), 1.f); + + } if (!bIsSpine) { m_IsUpper = BoneMask[m_iBoneIndex]; m_ilayerIndex = m_IsUpper ? 1 : 0; - LocalPos = pLocalPosArray[m_ilayerIndex][m_iBoneIndex]; + //LocalPos = pLocalPosArray[m_ilayerIndex][m_iBoneIndex]; } else { - LocalPos = pLocalPosArray[0][m_iBoneIndex]; + //LocalPos = pLocalPosArray[0][m_iBoneIndex]; } - _vector vScale = XMLoadFloat3(&LocalPos.Scale); + /*_vector vScale = XMLoadFloat3(&LocalPos.Scale); _vector vRotation = XMLoadFloat4(&LocalPos.Rotation); _vector vTranslation = XMVectorSet( LocalPos.Translation.x, LocalPos.Translation.y, LocalPos.Translation.z, - 1.f); + 1.f);*/ if (Bones[m_iBoneIndex]->Compare_Name("Reference")|| Bones[m_iBoneIndex]->Compare_Name("root")) { diff --git a/Jusin154_Team3D/Engine/Private/GameInstance.cpp b/Jusin154_Team3D/Engine/Private/GameInstance.cpp index 1f8595953..5bcfa06f7 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; } @@ -172,6 +174,18 @@ _int CGameInstance::Random_Int(_int iMin, _int iMax) return iMin + (_int)(Random_Normal() * (iMax - iMin)); } +_int CGameInstance::Real_Random_Int(_int iMin, _int iMax) +{ + uniform_int_distribution<_int> rand(iMin, iMax); + return rand(m_Rng); +} + +_float CGameInstance::Real_Random_Float (_float iMin, _float iMax) +{ + uniform_real_distribution<_float> rand(iMin, iMax); + return rand(m_Rng); +} + void CGameInstance::BillBoard(CTransform* pTransform) { _matrix ScaleMatrix = {}; @@ -295,35 +309,38 @@ void CGameInstance::Present_TimeCost() const GUI::PushItemWidth(80); GUI::Begin("Previous_Frame_Timer"); + if (GUI::CollapsingHeader("Detail")) { - GUI::ProgressBar(m_fTimer_PriorityUpdate / fTotal, ImVec2(200.f, 0.f)); - GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x); - GUI::Text("Priority_Update %d", int(m_fTimer_PriorityUpdate / fTotal * 100.f)); - } - { - GUI::ProgressBar(m_fTimer_Update / fTotal, ImVec2(200.f, 0.f)); - GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x); - GUI::Text("Update %d", int(m_fTimer_Update / fTotal * 100.f)); - } - { - GUI::ProgressBar(m_fTimer_LateUpdate / fTotal, ImVec2(200.f, 0.f)); - GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x); - GUI::Text("Late_Update %d", int(m_fTimer_LateUpdate / fTotal * 100.f)); - } - { - GUI::ProgressBar(m_fTimer_DrawCall / fTotal, ImVec2(200.f, 0.f)); - GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x); - GUI::Text("DrawCall %d", int(m_fTimer_DrawCall / fTotal * 100.f)); - } - { - GUI::ProgressBar(m_fTimer_Present / fTotal, ImVec2(200.f, 0.f)); - GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x); - GUI::Text("Present %d", int(m_fTimer_Present / fTotal * 100.f)); - } - { - GUI::ProgressBar(fTotal / m_fTimer_FrameCount, ImVec2(200.f, 0.f)); - GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x); - GUI::Text("Timer_Occupancy %d", int(m_fTimer_Present / fTotal * 100.f)); + { + GUI::ProgressBar(m_fTimer_PriorityUpdate / fTotal, ImVec2(200.f, 0.f)); + GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x); + GUI::Text("Priority_Update %d", int(m_fTimer_PriorityUpdate / fTotal * 100.f)); + } + { + GUI::ProgressBar(m_fTimer_Update / fTotal, ImVec2(200.f, 0.f)); + GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x); + GUI::Text("Update %d", int(m_fTimer_Update / fTotal * 100.f)); + } + { + GUI::ProgressBar(m_fTimer_LateUpdate / fTotal, ImVec2(200.f, 0.f)); + GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x); + GUI::Text("Late_Update %d", int(m_fTimer_LateUpdate / fTotal * 100.f)); + } + { + GUI::ProgressBar(m_fTimer_DrawCall / fTotal, ImVec2(200.f, 0.f)); + GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x); + GUI::Text("DrawCall %d", int(m_fTimer_DrawCall / fTotal * 100.f)); + } + { + GUI::ProgressBar(m_fTimer_Present / fTotal, ImVec2(200.f, 0.f)); + GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x); + GUI::Text("Present %d", int(m_fTimer_Present / fTotal * 100.f)); + } + { + GUI::ProgressBar(fTotal / m_fTimer_FrameCount, ImVec2(200.f, 0.f)); + GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x); + GUI::Text("Timer_Occupancy %d", int(m_fTimer_Present / fTotal * 100.f)); + } } GUI::Text("GameInstance RefCNT : %d", m_iRefCnt.load()); static float values[60] = {}; @@ -432,6 +449,11 @@ HRESULT CGameInstance::Add_RenderGroup(RENDER eRenderGroup, CGameObject* pRender return m_pRenderer->Add_RenderGroup(eRenderGroup, pRenderObject); } +void CGameInstance::Render_PreShadow() +{ + return m_pRenderer->Render_PreShadow(); +} + void CGameInstance::Set_Transform(D3DTS eState, _fmatrix TransformStateMatrix) { m_pPipeLine->Set_Transform(eState, TransformStateMatrix); @@ -694,6 +716,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 +748,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/Graphic_Device.cpp b/Jusin154_Team3D/Engine/Private/Graphic_Device.cpp index a8aed2001..588f1ec01 100644 --- a/Jusin154_Team3D/Engine/Private/Graphic_Device.cpp +++ b/Jusin154_Team3D/Engine/Private/Graphic_Device.cpp @@ -109,32 +109,22 @@ HRESULT CGraphic_Device::Ready_SwapChain(HWND hWnd, _uint iWinCX, _uint iWinCY) IDXGIFactory* pFactory = nullptr; pAdapter->GetParent(__uuidof(IDXGIFactory), (void**)&pFactory); - /* 스왑체인을 생성한다. = 텍스쳐를 생성하는 행위 + 스왑하는 형태 */ DXGI_SWAP_CHAIN_DESC SwapChain; ZeroMemory(&SwapChain, sizeof(DXGI_SWAP_CHAIN_DESC)); - /* 백버퍼 == 텍스쳐 */ - /*텍스처(백버퍼 == ID3D11Texture2D)를 생성하는 행위*/ - SwapChain.BufferDesc.Width = iWinCX; /* 가로 픽셀 수 */ - SwapChain.BufferDesc.Height = iWinCY; /* 세로 픽셀 수 */ + SwapChain.BufferDesc.Width = iWinCX; + SwapChain.BufferDesc.Height = iWinCY; - /* float4(1.f, 1.f, 1.f, 1.f) */ - /* float4(1.f, 0.f, 0.f, 1.f) */ - SwapChain.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; /* 만든 픽셀하나의 데이터 정보 : 32BIT픽셀생성하되 부호가 없는 정규화된 수를 저장할께 */ + SwapChain.BufferDesc.Format = DXGI_FORMAT_R16G16B16A16_FLOAT; SwapChain.BufferDesc.ScanlineOrdering = DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED; SwapChain.BufferDesc.Scaling = DXGI_MODE_SCALING_UNSPECIFIED; - /* 스케치북에 사과를 그릴꺼야. */ - /* RENDER_TARGET : 그림을 당하는 대상. 스케치북 */ SwapChain.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; SwapChain.BufferCount = 1; - /*스왑하는 형태 : 모니터 주사율에 따라 조절해도 됨. */ SwapChain.BufferDesc.RefreshRate.Numerator = 60; SwapChain.BufferDesc.RefreshRate.Denominator = 1; - /* 멀티샘플링 : 안티얼라이징 (계단현상방지) */ - /* 나중에 후처리 렌더링 : 멀티샘플링 지원(x) */ SwapChain.SampleDesc.Quality = 0; SwapChain.SampleDesc.Count = 1; @@ -142,7 +132,6 @@ HRESULT CGraphic_Device::Ready_SwapChain(HWND hWnd, _uint iWinCX, _uint iWinCY) SwapChain.Windowed = static_cast(true); SwapChain.SwapEffect = DXGI_SWAP_EFFECT_DISCARD; - /* 백버퍼라는 텍스처(ID3D11Texture2D)를 생성했다. */ if (FAILED(pFactory->CreateSwapChain(m_pDevice, &SwapChain, &m_pSwapChain))) return E_FAIL; diff --git a/Jusin154_Team3D/Engine/Private/Instance_Model.cpp b/Jusin154_Team3D/Engine/Private/Instance_Model.cpp index f55b6737b..5a27d50ce 100644 --- a/Jusin154_Team3D/Engine/Private/Instance_Model.cpp +++ b/Jusin154_Team3D/Engine/Private/Instance_Model.cpp @@ -710,6 +710,7 @@ void CInstance_Model::Instane_Buffer_ReStruct() pParticleValues[i].vDiffuseUVMoveTime = _float2(0.0f, m_pGameInstance->Random_Float(m_InstanceDesc.vDiffuseUVMoveTime.x, m_InstanceDesc.vDiffuseUVMoveTime.y)); pParticleValues[i].vDistortionUVMoveTime = _float2(0.0f, m_pGameInstance->Random_Float(m_InstanceDesc.vDistortionUVMoveTime.x, m_InstanceDesc.vDistortionUVMoveTime.y)); pParticleValues[i].vNoiseUVMoveTime = _float2(0.0f, m_pGameInstance->Random_Float(m_InstanceDesc.vNoiseUVMoveTime.x, m_InstanceDesc.vNoiseUVMoveTime.y)); + pParticleValues[i].vDissolveUVMoveTime = _float2(0.0f, m_pGameInstance->Random_Float(m_InstanceDesc.vNoiseUVMoveTime.x, m_InstanceDesc.vNoiseUVMoveTime.y)); pParticleValues[i].fSpeed = m_pGameInstance->Random_Float(m_InstanceDesc.vSpeed.x, m_InstanceDesc.vSpeed.y); pParticleValues[i].fRotaionSpeed = m_pGameInstance->Random_Float(m_InstanceDesc.vRotationSpeed.x, m_InstanceDesc.vRotationSpeed.y); pParticleValues[i].vAniIndex = _float2(0.f, m_InstanceDesc.vAniIndex.y); diff --git a/Jusin154_Team3D/Engine/Private/Light.cpp b/Jusin154_Team3D/Engine/Private/Light.cpp index 52d5cd939..5479df217 100644 --- a/Jusin154_Team3D/Engine/Private/Light.cpp +++ b/Jusin154_Team3D/Engine/Private/Light.cpp @@ -175,15 +175,15 @@ void CLight::Free() void CLight::Describe_Entity() { - if (ImGui::TreeNode("LIGHT_INFO")) + if (GUI::TreeNode("LIGHT_INFO")) { - ImGui::Separator(); ImGui::Spacing(); + GUI::Separator(); GUI::Spacing(); const char* pLightTypeNames[] = { "DIRECTIONAL", "POINT", "SPOT" }; int iCurrentItem = static_cast(m_LightDesc.eType); - if (ImGui::Combo("LightType", &iCurrentItem, pLightTypeNames, ENUM_CLASS(LIGHT::END))) + if (GUI::Combo("LightType", &iCurrentItem, pLightTypeNames, ENUM_CLASS(LIGHT::END))) { m_LightDesc.eType = static_cast(iCurrentItem); } 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..0f7a62b23 100644 --- a/Jusin154_Team3D/Engine/Private/Model.cpp +++ b/Jusin154_Team3D/Engine/Private/Model.cpp @@ -123,13 +123,13 @@ _bool CModel::Play_Animation(_float fTimeDelta, CTransform* pTransform) _bool CModel::Play_Anim(_float fTimeDelta, CTransform* pTransform) { - if (m_bLoopRestarted) + /*if (m_bLoopRestarted) { m_vPrevRootPos = { 0,0,0 }; m_bLoopRestarted = false; - } + }*/ - ComputeAnimation(m_iCurrentAnimIndex); + //ComputeAnimation(m_iCurrentAnimIndex); if (m_iPreAnimIndex >= 0 && m_iPreAnimIndex != m_iCurrentAnimIndex) { @@ -160,6 +160,19 @@ _bool CModel::Play_Anim(_float fTimeDelta, CTransform* pTransform) m_iPreAnimIndex = m_iCurrentAnimIndex; } + + if (m_bIsFinishedAnim) + { + if (m_bIsLoop) + { + m_bLoopRestarted = true; + m_vPrevRootPos = { 0,0,0 }; + } + else{ + XMStoreFloat3(&m_vPrevRootPos, m_vector[2]); + } + } + if (m_bRatio) { Update_RootBone(m_fAmount * m_fRatio); } @@ -170,18 +183,10 @@ _bool CModel::Play_Anim(_float fTimeDelta, CTransform* pTransform) if (m_bIsFinishedAnim) { - if (m_bIsLoop) - { - m_bLoopRestarted = true; - } - else - XMStoreFloat3(&m_vPrevRootPos, m_vector[2]); - m_vPrevRootRot = { 0.f,0.f,0.f,0.f }; m_bInitialRootRotSaved = false; } - for (auto& pBone : m_Bones) { pBone->Update_CombinedTransformationMatrix(m_Bones, XMLoadFloat4x4(&m_PreTransformMatrix)); @@ -198,8 +203,8 @@ _bool CModel::Play_Dual_Anim(_float fTimeDelta, CTransform* pTransform) m_bLoopRestarted = false; } - ComputeAnimation(m_iCurrentAnimIndex); - ComputeAnimation_Second(m_iCurrSecondAnimIndex); + //ComputeAnimation(m_iCurrentAnimIndex); + //ComputeAnimation_Second(m_iCurrSecondAnimIndex); if (m_iPreAnimIndex >= 0 && m_iPreAnimIndex != m_iCurrentAnimIndex) { @@ -234,8 +239,9 @@ _bool CModel::Play_Dual_Anim(_float fTimeDelta, CTransform* pTransform) { m_fSecondRatio = 1.f; } - else + else{ m_fSecondBlendTime = 0.f; + } } } else @@ -256,8 +262,9 @@ _bool CModel::Play_Dual_Anim(_float fTimeDelta, CTransform* pTransform) { m_fSecondRatio = 1.f; } - else + else{ m_fSecondBlendTime = 0.f; + } } } @@ -275,8 +282,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; @@ -315,8 +323,8 @@ void CModel::Set_AnimationIndex(_uint iIndex, _bool isLoop, _float fAmount, _boo m_bIsLoop = isLoop; m_fAmount = fAmount; m_bRatio = bRatio; - - + m_Animations[m_iCurrentAnimIndex]->Depart_Animation(); + m_Animations[m_iCurrentAnimIndex]->ResetRootMotion(); } else { m_iCurrentAnimIndex = -1; @@ -579,6 +587,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 +622,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 +1395,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; } @@ -1720,7 +1720,7 @@ HRESULT CModel::Initialize(void* pArg) InItialize_BoneIndex(); Initialize_BoneMasks(); - Create_Temp(); + /*Create_Temp(); m_Parent.resize(m_Bones.size()); for (size_t i = 0; i < (_uint)m_Bones.size(); i++) { @@ -1732,7 +1732,7 @@ HRESULT CModel::Initialize(void* pArg) Create_Con(); Create_LocalPosVB(); - Create_ParentVB(); + Create_ParentVB();*/ } 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..a106608fc 100644 --- a/Jusin154_Team3D/Engine/Private/Renderer.cpp +++ b/Jusin154_Team3D/Engine/Private/Renderer.cpp @@ -1,52 +1,9 @@ #include "pch.h" -#include "Renderer.h" #include "GameInstance.h" #include "GameObject.h" +#include "Renderer.h" #include "Transform.h" - -CRenderer::CRenderer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) - : m_pDevice{ pDevice } - , m_pContext{ pContext } - , m_pGameInstance{ CGameInstance::GetInstance() } -{ - SAFE_ADDREF(m_pDevice); - SAFE_ADDREF(m_pContext); - SAFE_ADDREF(m_pGameInstance); -} - -HRESULT CRenderer::Add_RenderGroup(RENDER eRenderGroup, CGameObject* pRenderObject) -{ - if (nullptr == pRenderObject || pRenderObject->isDead()) { - return E_FAIL; - } - - _bool bPossible = { false }; - // 프러스텀컬링 예외 추가 - if (RENDER::UI == eRenderGroup || RENDER::PRIORITY == eRenderGroup /* || RENDER::SHADOW == eRenderGroup*/ || RENDER::BLUR == eRenderGroup) { - bPossible = true; - } - - bPossible = true; - if (true == bPossible) { - m_RenderObjects[ENUM_CLASS(eRenderGroup)].push_back(pRenderObject); - SAFE_ADDREF(pRenderObject); - return S_OK; - } - return E_FAIL; -} - -#ifdef _DEBUG -HRESULT CRenderer::Add_DebugComponent(CComponent* pDebugCom) -{ - m_DebugComponents.push_back(pDebugCom); - - SAFE_ADDREF(pDebugCom); - - return S_OK; -} -#endif - void CRenderer::Render() { _uint iNumViewPort = { 1 }; @@ -72,6 +29,7 @@ void CRenderer::Render() Render_WeightBlend(); Render_Bloom(); Render_LastColor(); + Render_Tone_Mapping(); Render_UI(); #ifdef _DEBUG @@ -84,6 +42,53 @@ void CRenderer::Render() #endif } +void CRenderer::Render_PreShadow() +{ + if (FAILED(m_pGameInstance->Begin_MRT(TEXT("MRT_PreShadow"), m_pPreShadowDSV))) { + return; + } + + const _float4x4* pMatrices = m_pGameInstance->Get_ShadowMatricesPtr(); + m_PreShadowDesc = *m_pGameInstance->Get_ShadowDesc(); + for (int i = 0; i < ENUM_CLASS(D3DTS::END); ++i) { + m_PreShadowMatrices[i] = pMatrices[i]; + } + + D3D11_VIEWPORT ViewPortOldDesc; + D3D11_VIEWPORT ViewPortDesc; + _uint iNumViewOldPort = { 1 }; + ZeroMemory(&ViewPortOldDesc, sizeof(D3D11_VIEWPORT)); + ZeroMemory(&ViewPortDesc, sizeof(D3D11_VIEWPORT)); + { + ViewPortDesc.TopLeftX = 0; + ViewPortDesc.TopLeftY = 0; + ViewPortDesc.Width = (_float)g_iMaxShadowWidth; + ViewPortDesc.Height = (_float)g_iMaxShadowHeight; + ViewPortDesc.MinDepth = 0.f; + ViewPortDesc.MaxDepth = 1.f; + } + m_pContext->RSGetViewports(&iNumViewOldPort, &ViewPortOldDesc); + m_pContext->RSSetViewports(1, &ViewPortDesc); + + for (auto& pRenderObject : m_RenderObjects[ENUM_CLASS(RENDER::PRESHADOW)]) + { + if (nullptr != pRenderObject) { + if (FAILED(pRenderObject->Render_Shadow())) { + assert(false); + } + } + SAFE_RELEASE(pRenderObject); + } + + m_RenderObjects[ENUM_CLASS(RENDER::PRESHADOW)].clear(); + + if (FAILED(m_pGameInstance->End_MRT())) { + return; + } + + m_pContext->RSSetViewports(iNumViewOldPort, &ViewPortOldDesc); +} + void CRenderer::Render_Occlusion() { m_RenderObjects[ENUM_CLASS(RENDER::OCCLUSION)].sort([](CGameObject* pSour, CGameObject* pDest)->_bool { @@ -241,7 +246,6 @@ void CRenderer::Render_Combined() m_pShader->Bind_Matrix("g_invMatView", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW_INV)); m_pShader->Bind_Matrix("g_invmatProj", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ_INV)); - if (FAILED(m_pShader->Bind_RawValue("g_iMaxShadowWidth", &g_iMaxShadowWidth, sizeof(_uint)))) { return; } @@ -251,13 +255,12 @@ void CRenderer::Render_Combined() if (FAILED(m_pShader->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) { return; } - - //if (FAILED(m_pGameInstance->Bind_Shadow_Resource(m_pShader, "g_LightViewMatrix", D3DTS::VIEW))) { - // return; - //} - //if (FAILED(m_pGameInstance->Bind_Shadow_Resource(m_pShader, "g_LightProjMatrix", D3DTS::PROJ))) { - // return; - //} + if (FAILED(m_pGameInstance->Bind_Shadow_Resource(m_pShader, "g_LightViewMatrix", D3DTS::VIEW))) { + return; + } + if (FAILED(m_pGameInstance->Bind_Shadow_Resource(m_pShader, "g_LightProjMatrix", D3DTS::PROJ))) { + return; + } if (FAILED(m_pShader->Bind_RawValue("g_fPreShadowFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) { return; } @@ -284,7 +287,7 @@ void CRenderer::Render_Combined() if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Depth"), m_pShader, "g_DepthTexture"))) { return; } - if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Shadow"), m_pShader, "g_ShadowTexture"))) { + if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Shadow_Near"), m_pShader, "g_ShadowNearTexture"))) { return; } if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_PreShadow"), m_pShader, "g_PreShadowTexture"))) { @@ -310,27 +313,21 @@ void CRenderer::Render_Combined() void CRenderer::Render_EnvironmentPostProcess() { - if (m_pGameInstance->Key_Up(DIK_END)) { - m_bDOF_ENV = !m_bDOF_ENV; - } - if (false == m_bDOF_ENV) { - return; - } if (FAILED(m_pGameInstance->Begin_MRT(TEXT("MRT_Blur_X")))) { return; } - m_pShader->Bind_Matrix("g_WorldMatrix", &m_WorldMatrix); - m_pShader->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix); - m_pShader->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix); - m_pShader->Bind_Matrix("g_invMatView", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW_INV)); - m_pShader->Bind_Matrix("g_invmatProj", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ_INV)); - m_pShader->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)); - m_pShader->Bind_RawValue("g_fDepthThreshold", &m_fDOF_ENV_CutThreshold, sizeof(_float)); - m_pShader->Bind_RawValue("g_fFocusDistance", &m_fDOF_ENV_FocusDistance, sizeof(_float)); - m_pShader->Bind_RawValue("g_fFarBlurStart", &m_fDOF_ENV_StartDistance, sizeof(_float)); - m_pShader->Bind_RawValue("g_fFarBlurEnd", &m_fDOF_ENV_MaxEnd, sizeof(_float)); - m_pShader->Bind_RawValue("g_fDOFBlurMultiplier", &m_fDOF_ENV_AmountRadius, sizeof(_float)); + m_pShader->Bind_Matrix("g_WorldMatrix", &m_WorldMatrix); + m_pShader->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix); + m_pShader->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix); + m_pShader->Bind_Matrix("g_invMatView", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW_INV)); + m_pShader->Bind_Matrix("g_invmatProj", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ_INV)); + m_pShader->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)); + m_pShader->Bind_RawValue("g_fDepthThreshold", &m_fDOF_ENV_CutThreshold, sizeof(_float)); + m_pShader->Bind_RawValue("g_fFocusDistance", &m_fDOF_ENV_FocusDistance, sizeof(_float)); + m_pShader->Bind_RawValue("g_fFarBlurStart", &m_fDOF_ENV_StartDistance, sizeof(_float)); + m_pShader->Bind_RawValue("g_fFarBlurEnd", &m_fDOF_ENV_MaxEnd, sizeof(_float)); + m_pShader->Bind_RawValue("g_fDOFBlurMultiplier", &m_fDOF_ENV_AmountRadius, sizeof(_float)); if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Depth"), m_pShader, "g_DepthTexture"))) { return; @@ -461,7 +458,6 @@ void CRenderer::Render_NonLight() m_RenderObjects[ENUM_CLASS(RENDER::NONLIGHT)].clear(); } - void CRenderer::Render_Blur() { if (FAILED(m_pGameInstance->Begin_MRT(TEXT("MRT_Blur")))) { @@ -511,6 +507,15 @@ void CRenderer::Render_Blur() return; } +} +void CRenderer::Render_SSAO() +{ +} +void CRenderer::Render_SSAO_BLUR() +{ +} +void CRenderer::Render_SSAO_Lighting() +{ } void CRenderer::Render_Blend() { @@ -534,28 +539,14 @@ void CRenderer::Render_Blend() void CRenderer::Render_Bloom() { - 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(); - - //{ // BackBuffer - // ID3D11Texture2D* pBackBuffer = nullptr; - // m_pGameInstance->Get_BackBufferPTR(&pBackBuffer); - // //m_pGameInstance->Copy_RenderTarget(TEXT("Target_Diffuse"), pBackBuffer); - // m_pGameInstance->Paste_RenderTarget(TEXT("Target_Bloom_Input"), pBackBuffer); - // SAFE_RELEASE(pBackBuffer); - //} - // "Target_Bloom_Input" // "Target_Bloom" + // "Target_Bloom_2x2" // "Target_Bloom_4x4" // "Target_Bloom_8x8" - // "Target_Bloom_16x16" - // "Target_Bloom_16x16_X" - // "Target_Bloom_8x8_2" + // "Target_Bloom_8x8_X" // "Target_Bloom_4x4_2" + // "Target_Bloom_2x2_2" if (FAILED(m_pGameInstance->Begin_MRT(TEXT("MRT_Bloom")))) { return; @@ -567,18 +558,6 @@ void CRenderer::Render_Bloom() if (FAILED(pRenderObject->Render_Bloom())) { assert(false); } - - //if (true == m_bPostProcessing_BLOOM) { - // { // BackBuffer - // ID3D11Texture2D* pBackBuffer = nullptr; - // m_pGameInstance->Get_BackBufferPTR(&pBackBuffer); - // //m_pGameInstance->Copy_RenderTarget(TEXT("Target_Diffuse"), pBackBuffer); - // m_pGameInstance->Paste_RenderTarget(TEXT("Target_Bloom_Input"), pBackBuffer); - // SAFE_RELEASE(pBackBuffer); - // - //} - - SAFE_RELEASE(pRenderObject); } @@ -588,34 +567,33 @@ void CRenderer::Render_Bloom() return; } - m_pShader->Bind_RawValue("g_fThreshold", &m_fThreshold, sizeof(_float)); + m_pShader->Bind_RawValue("m_fBloomThresholdy", &m_fBloomThreshold, sizeof(_float)); m_pShader->Bind_RawValue("g_iBloomEmbossingPass", &m_iBloomEmbossingPass, sizeof(_int)); - m_pGameInstance->Refit_RenderTarget(m_pVIBuffer, m_pShader, TEXT("Target_Bloom_Input"), TEXT("Target_Bloom_4x4"), SHADER_PASS_DEFERRED::EMBOSSING); // 2 - m_pGameInstance->Refit_RenderTarget(m_pVIBuffer, m_pShader, TEXT("Target_Bloom_4x4"), TEXT("Target_Bloom_8x8"), SHADER_PASS_DEFERRED::REFIT); // 3 - m_pGameInstance->Refit_RenderTarget(m_pVIBuffer, m_pShader, TEXT("Target_Bloom_8x8"), TEXT("Target_Bloom_16x16"), SHADER_PASS_DEFERRED::REFIT); // 4 + m_pGameInstance->Refit_RenderTarget(m_pVIBuffer, m_pShader, TEXT("Target_Bloom_Input"), TEXT("Target_Bloom_2x2"), SHADER_PASS_DEFERRED::EMBOSSING); // 2 + m_pGameInstance->Refit_RenderTarget(m_pVIBuffer, m_pShader, TEXT("Target_Bloom_2x2"), TEXT("Target_Bloom_4x4"), SHADER_PASS_DEFERRED::REFIT); // 3 + m_pGameInstance->Refit_RenderTarget(m_pVIBuffer, m_pShader, TEXT("Target_Bloom_4x4"), TEXT("Target_Bloom_8x8"), SHADER_PASS_DEFERRED::REFIT); // 4 - m_pGameInstance->Refit_RenderTarget(m_pVIBuffer, m_pShader, TEXT("Target_Bloom_16x16"), TEXT("Target_Bloom_16x16_X"), SHADER_PASS_DEFERRED::BLOOM_BLURX); - m_pGameInstance->Refit_RenderTarget(m_pVIBuffer, m_pShader, TEXT("Target_Bloom_16x16_X"), TEXT("Target_Bloom_16x16"), SHADER_PASS_DEFERRED::BLOOM_BLURY); // 5 - m_pGameInstance->Refit_RenderTarget(m_pVIBuffer, m_pShader, TEXT("Target_Bloom_16x16"), TEXT("Target_Bloom_8x8"), SHADER_PASS_DEFERRED::REFIT); // 6 + m_pGameInstance->Refit_RenderTarget(m_pVIBuffer, m_pShader, TEXT("Target_Bloom_8x8"), TEXT("Target_Bloom_8x8_X"), SHADER_PASS_DEFERRED::BLOOM_BLURX); + m_pGameInstance->Refit_RenderTarget(m_pVIBuffer, m_pShader, TEXT("Target_Bloom_8x8_X"), TEXT("Target_Bloom_8x8"), SHADER_PASS_DEFERRED::BLOOM_BLURY); // 5 + m_pGameInstance->Refit_RenderTarget(m_pVIBuffer, m_pShader, TEXT("Target_Bloom_8x8"), TEXT("Target_Bloom_4x4"), SHADER_PASS_DEFERRED::REFIT); // 6 - m_pGameInstance->Accumulate_RenderTarget(m_pVIBuffer, m_pShader, TEXT("Target_Bloom_8x8"), TEXT("Target_Bloom_16x16"), TEXT("Target_Bloom_8x8_2"), SHADER_PASS_DEFERRED::BLOOM_ACCUM); - m_pGameInstance->Refit_RenderTarget(m_pVIBuffer, m_pShader, TEXT("Target_Bloom_8x8_2"), TEXT("Target_Bloom_8x8"), SHADER_PASS_DEFERRED::BLOOM_BLURX); - m_pGameInstance->Refit_RenderTarget(m_pVIBuffer, m_pShader, TEXT("Target_Bloom_8x8"), TEXT("Target_Bloom_8x8_2"), SHADER_PASS_DEFERRED::BLOOM_BLURY); // 7 - - m_pGameInstance->Refit_RenderTarget(m_pVIBuffer, m_pShader, TEXT("Target_Bloom_8x8_2"), TEXT("Target_Bloom_4x4"), SHADER_PASS_DEFERRED::REFIT); - m_pGameInstance->Accumulate_RenderTarget(m_pVIBuffer, m_pShader, TEXT("Target_Bloom_4x4"), TEXT("Target_Bloom_8x8_2"), TEXT("Target_Bloom_4x4_2"), SHADER_PASS_DEFERRED::BLOOM_ACCUM); + m_pGameInstance->Accumulate_RenderTarget(m_pVIBuffer, m_pShader, TEXT("Target_Bloom_4x4"), TEXT("Target_Bloom_8x8"), TEXT("Target_Bloom_4x4_2"), SHADER_PASS_DEFERRED::BLOOM_ACCUM); m_pGameInstance->Refit_RenderTarget(m_pVIBuffer, m_pShader, TEXT("Target_Bloom_4x4_2"), TEXT("Target_Bloom_4x4"), SHADER_PASS_DEFERRED::BLOOM_BLURX); - m_pGameInstance->Refit_RenderTarget(m_pVIBuffer, m_pShader, TEXT("Target_Bloom_4x4"), TEXT("Target_Bloom_4x4_2"), SHADER_PASS_DEFERRED::BLOOM_BLURY); // 8 + m_pGameInstance->Refit_RenderTarget(m_pVIBuffer, m_pShader, TEXT("Target_Bloom_4x4"), TEXT("Target_Bloom_4x4_2"), SHADER_PASS_DEFERRED::BLOOM_BLURY); // 7 - m_pGameInstance->Refit_RenderTarget(m_pVIBuffer, m_pShader, TEXT("Target_Bloom_4x4_2"), TEXT("Target_Bloom"), SHADER_PASS_DEFERRED::REFIT); + m_pGameInstance->Refit_RenderTarget(m_pVIBuffer, m_pShader, TEXT("Target_Bloom_4x4_2"), TEXT("Target_Bloom_2x2"), SHADER_PASS_DEFERRED::REFIT); + m_pGameInstance->Accumulate_RenderTarget(m_pVIBuffer, m_pShader, TEXT("Target_Bloom_2x2"), TEXT("Target_Bloom_4x4_2"), TEXT("Target_Bloom_2x2_2"), SHADER_PASS_DEFERRED::BLOOM_ACCUM); + m_pGameInstance->Refit_RenderTarget(m_pVIBuffer, m_pShader, TEXT("Target_Bloom_2x2_2"), TEXT("Target_Bloom_2x2"), SHADER_PASS_DEFERRED::BLOOM_BLURX); + m_pGameInstance->Refit_RenderTarget(m_pVIBuffer, m_pShader, TEXT("Target_Bloom_2x2"), TEXT("Target_Bloom_2x2_2"), SHADER_PASS_DEFERRED::BLOOM_BLURY); // 8 + + m_pGameInstance->Refit_RenderTarget(m_pVIBuffer, m_pShader, TEXT("Target_Bloom_2x2_2"), TEXT("Target_Bloom"), SHADER_PASS_DEFERRED::REFIT); m_pGameInstance->Finish_RenderTarget(m_pVIBuffer, m_pShader, TEXT("Target_Bloom_Input"), TEXT("Target_Bloom"), SHADER_PASS_DEFERRED::BLOOM_FINISH); // 9 } void CRenderer::Render_UI() { - m_RenderObjects[ENUM_CLASS(RENDER::UI)].sort([](CGameObject* pDest, CGameObject* pSrc)->_bool { _float3 vDstPos = {}; _float3 vSrcPos = {}; @@ -656,42 +634,39 @@ void CRenderer::Render_LastColor() m_pVIBuffer->Bind_Resources(); m_pVIBuffer->Render(); - } -HRESULT CRenderer::Ready_ShadowDepthStencilView(_uint iSizeX, _uint iSizeY) +void CRenderer::Render_Tone_Mapping() { - ID3D11Texture2D* pShadowDepthStencilTexture = nullptr; + { // BackBuffer + ID3D11Texture2D* pBackBuffer = nullptr; + m_pGameInstance->Get_BackBufferPTR(&pBackBuffer); + m_pGameInstance->Paste_RenderTarget(TEXT("Target_ToneMapping"), pBackBuffer); + SAFE_RELEASE(pBackBuffer); + } - D3D11_TEXTURE2D_DESC TextureDesc; - ZeroMemory(&TextureDesc, sizeof(D3D11_TEXTURE2D_DESC)); - - TextureDesc.Width = iSizeX; - TextureDesc.Height = iSizeY; - TextureDesc.MipLevels = 1; - TextureDesc.ArraySize = 1; - TextureDesc.Format = DXGI_FORMAT_D24_UNORM_S8_UINT; - - TextureDesc.SampleDesc.Quality = 0; - TextureDesc.SampleDesc.Count = 1; - - TextureDesc.Usage = D3D11_USAGE_DEFAULT; - TextureDesc.BindFlags = D3D11_BIND_DEPTH_STENCIL; - TextureDesc.CPUAccessFlags = 0; - TextureDesc.MiscFlags = 0; - - if (FAILED(m_pDevice->CreateTexture2D(&TextureDesc, nullptr, &pShadowDepthStencilTexture))) { - return E_FAIL; + m_pLastColorShader->Bind_Matrix("g_WorldMatrix", &m_WorldMatrix); + m_pLastColorShader->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix); + m_pLastColorShader->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix); + + if (FAILED(m_pShader->Bind_RawValue("g_iToneMappingType", &m_iToneMappingType, sizeof(_uint)))) { + assert(false); + return; + } + + if (FAILED(m_pShader->Bind_RawValue("g_fToneMappingExposure", &m_fExposure, sizeof(_float)))) { + assert(false); + return; + } + if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_ToneMapping"), m_pShader, "g_OriginalTexture"))) { + assert(false); + return; } - if (FAILED(m_pDevice->CreateDepthStencilView(pShadowDepthStencilTexture, nullptr, &m_pShadowDSV))) { - return E_FAIL; - } - - SAFE_RELEASE(pShadowDepthStencilTexture); - - return S_OK; + m_pShader->Begin(ENUM_CLASS(SHADER_PASS_DEFERRED::TONE_MAPPING)); + m_pVIBuffer->Bind_Resources(); + m_pVIBuffer->Render(); } #ifdef _DEBUG @@ -727,366 +702,3 @@ void CRenderer::Render_Debug() } #endif - -HRESULT CRenderer::Initialize() -{ - _uint iNumViewports = { 1 }; - - D3D11_VIEWPORT Viewport{}; - m_pContext->RSGetViewports(&iNumViewports, &Viewport); - { - /* Target_Diffuse */ - if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Diffuse"), (_uint)Viewport.Width, (_uint)Viewport.Height, - DXGI_FORMAT_R8G8B8A8_UNORM, _float4(0.0f, 0.f, 0.f, 0.f)))) { - return E_FAIL; - } - - /* Target_Normal */ - if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Normal"), (_uint)Viewport.Width, (_uint)Viewport.Height, - DXGI_FORMAT_R16G16B16A16_UNORM, _float4(0.0f, 0.f, 0.f, 1.f)))) { - return E_FAIL; - } - - /* Target_Depth */ - if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Depth"), (_uint)Viewport.Width, (_uint)Viewport.Height, - DXGI_FORMAT_R32G32B32A32_FLOAT, _float4(0.0f, 1.f, 0.f, 0.f)))) { - return E_FAIL; - } - - /* Target_Depth */ - if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Terrain_Depth"), (_uint)Viewport.Width, (_uint)Viewport.Height, - DXGI_FORMAT_R32G32B32A32_FLOAT, _float4(0.0f, 1.f, 0.f, 0.f)))) { - return E_FAIL; - } - - /* Target_Surface */ - if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Surface"), (_uint)Viewport.Width, (_uint)Viewport.Height, - DXGI_FORMAT_R32G32B32A32_FLOAT, _float4(0.0f, 0.f, 0.f, 0.f)))) { - return E_FAIL; - } - - /* Target_Shade */ - if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Shade"), (_uint)Viewport.Width, (_uint)Viewport.Height, - DXGI_FORMAT_R16G16B16A16_UNORM, _float4(0.0f, 0.f, 0.f, 1.f)))) { - return E_FAIL; - } - - /* Target_Specular */ - if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Specular"), (_uint)Viewport.Width, (_uint)Viewport.Height, - DXGI_FORMAT_R16G16B16A16_UNORM, _float4(0.0f, 0.f, 0.f, 0.f)))) { - return E_FAIL; - } - /* Target_Shadow */ - if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Shadow"), (_uint)g_iMaxShadowWidth, (_uint)g_iMaxShadowHeight, - DXGI_FORMAT_R32G32B32A32_FLOAT, _float4(1.f, 1.f, 1.f, 1.f)))) { - return E_FAIL; - } - - /* Target_Shadow */ - if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_PreShadow"), (_uint)g_iMaxShadowWidth, (_uint)g_iMaxShadowHeight, - DXGI_FORMAT_R32G32B32A32_FLOAT, _float4(1.f, 1.f, 1.f, 1.f)))) { - return E_FAIL; - } - - /* Target_Blur */ - if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Blur"), (_uint)Viewport.Width, (_uint)Viewport.Height, - DXGI_FORMAT_R8G8B8A8_UNORM, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Blur_Weight"), (_uint)Viewport.Width, (_uint)Viewport.Height, - DXGI_FORMAT_R16_FLOAT, _float4(0.0f, 0.0f, 0.0f, 1.0f)))) { - return E_FAIL; - } - - - /* Target_Blur_X */ - if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Blur_X"), (_uint)Viewport.Width, (_uint)Viewport.Height, - DXGI_FORMAT_R8G8B8A8_UNORM, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Blur_X_Weight"), (_uint)Viewport.Width, (_uint)Viewport.Height, - DXGI_FORMAT_R16_FLOAT, _float4(0.0f, 0.0f, 0.0f, 1.0f)))) { - return E_FAIL; - } - - /* Target_Bloom */ - if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Bloom_Input"), (_uint)(Viewport.Width), (_uint)(Viewport.Height), - DXGI_FORMAT_R8G8B8A8_UNORM, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) { - return E_FAIL; - } - if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Bloom"), (_uint)(Viewport.Width), (_uint)(Viewport.Height), - DXGI_FORMAT_R8G8B8A8_UNORM, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) { - return E_FAIL; - } - if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Bloom_4x4"), (_uint)(Viewport.Width * 0.25f), (_uint)(Viewport.Height * 0.25f), - DXGI_FORMAT_R8G8B8A8_UNORM, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) { - return E_FAIL; - } - if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Bloom_8x8"), (_uint)(Viewport.Width * 0.125f), (_uint)(Viewport.Height * 0.125f), - DXGI_FORMAT_R8G8B8A8_UNORM, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) { - return E_FAIL; - } - if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Bloom_16x16"), (_uint)(Viewport.Width * 0.0625f), (_uint)(Viewport.Height * 0.0625f), - DXGI_FORMAT_R8G8B8A8_UNORM, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) { - return E_FAIL; - } - if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Bloom_16x16_X"), (_uint)(Viewport.Width * 0.0625f), (_uint)(Viewport.Height * 0.0625f), - DXGI_FORMAT_R8G8B8A8_UNORM, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) { - return E_FAIL; - } - if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Bloom_8x8_2"), (_uint)(Viewport.Width * 0.125f), (_uint)(Viewport.Height * 0.125f), - DXGI_FORMAT_R8G8B8A8_UNORM, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) { - return E_FAIL; - } - if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Bloom_4x4_2"), (_uint)(Viewport.Width * 0.25f), (_uint)(Viewport.Height * 0.25f), - DXGI_FORMAT_R8G8B8A8_UNORM, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) { - return E_FAIL; - } - - /* Target_AfterCombined */ - if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_AfterCombined"), (_uint)Viewport.Width, (_uint)Viewport.Height, - DXGI_FORMAT_R8G8B8A8_UNORM, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) { - return E_FAIL; - } - - - /* Target_Color*/ - if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Color"), (_uint)Viewport.Width, (_uint)Viewport.Height, - DXGI_FORMAT_R32G32B32A32_FLOAT, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) { - return E_FAIL; - } - - - /*WB_COLOR*/ - if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_WB_Color"), (_uint)Viewport.Width, (_uint)Viewport.Height, - DXGI_FORMAT_R16G16B16A16_FLOAT, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) { - return E_FAIL; - } - - - /* WB_A*/ - if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_WB_Revealage"), (_uint)Viewport.Width, (_uint)Viewport.Height, - DXGI_FORMAT_R16_FLOAT, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) { - return E_FAIL; - } - - /* Target_Diffuse */ - if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Fog"), (_uint)Viewport.Width, (_uint)Viewport.Height, - DXGI_FORMAT_R8G8B8A8_UNORM, _float4(0.0f, 0.f, 0.f, 0.f)))) { - return E_FAIL; - } - - - if (FAILED(Ready_ShadowDepthStencilView(g_iMaxShadowWidth, g_iMaxShadowHeight))) { - return E_FAIL; - } - - } - { - /* MRT_GameObjects */ - if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_GameObjects"), TEXT("Target_Diffuse")))) { - return E_FAIL; - } - if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_GameObjects"), TEXT("Target_Normal")))) { - return E_FAIL; - } - if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_GameObjects"), TEXT("Target_Depth")))) { - return E_FAIL; - } - if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_GameObjects"), TEXT("Target_Color")))) { - return E_FAIL; - } - if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_GameObjects"), TEXT("Target_Surface")))) { - return E_FAIL; - } - - /* MRT_Combined */ - if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Combined"), TEXT("Target_Fog")))) { - return E_FAIL; - } - if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Combined"), TEXT("Target_AfterCombined")))) { - return E_FAIL; - } - - /* MRT_LightAcc */ - if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_LightAcc"), TEXT("Target_Shade")))) { - return E_FAIL; - } - if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_LightAcc"), TEXT("Target_Specular")))) { - return E_FAIL; - } - - /* MRT_Shadow */ - if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Shadow"), TEXT("Target_Shadow")))) { - return E_FAIL; - } - /* MRT_PreShadow */ - if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_PreShadow"), TEXT("Target_PreShadow")))) { - return E_FAIL; - } - - /* MRT_Blur */ - if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Blur"), TEXT("Target_Blur")))) { - return E_FAIL; - } - if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Blur"), TEXT("Target_Blur_Weight")))) { - return E_FAIL; - } - - /* MRT_Blur */ - if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Bloom"), TEXT("Target_Bloom_Input")))) { - return E_FAIL; - } - - /* MRT_Blur_X */ - if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Blur_X"), TEXT("Target_Blur_X")))) { - return E_FAIL; - } - if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Blur_X"), TEXT("Target_Blur_X_Weight")))) { - return E_FAIL; - } - - /* MRT_Color */ - if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Color"), TEXT("Target_Color")))) { - return E_FAIL; - } - - /* MRT_WB */ - if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_WB"), TEXT("Target_WB_Color")))) { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_WB"), TEXT("Target_WB_Revealage")))) { - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_WB"), TEXT("Target_Color")))) { - return E_FAIL; - } - - /* MRT_Fog */ - if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Fog"), TEXT("Target_Fog")))) { - return E_FAIL; - } - } - - m_pShader = (CShader*)m_pGameInstance->Clone_Asset_Prototype(g_iStaticLevel, FX_DEFERRED, nullptr, nullptr); - if (nullptr == m_pShader) { - return E_FAIL; - } - - - m_pLastColorShader = (CShader*)m_pGameInstance->Clone_Asset_Prototype(g_iStaticLevel, FX_LASTCOLOR, nullptr, nullptr); - - if (nullptr == m_pLastColorShader) { - return E_FAIL; - } - - m_pWeightBlendShader = (CShader*)m_pGameInstance->Clone_Asset_Prototype(g_iStaticLevel, FX_WEIGHTBELND, nullptr, nullptr); - - if (nullptr == m_pWeightBlendShader) { - return E_FAIL; - } - - m_pVIBuffer = CVIBuffer_Rect::Create(m_pDevice, m_pContext); - if (nullptr == m_pVIBuffer) { - return E_FAIL; - } - - XMStoreFloat4x4(&m_WorldMatrix, XMMatrixScaling(Viewport.Width, Viewport.Height, 1.f)); - XMStoreFloat4x4(&m_ViewMatrix, XMMatrixIdentity()); - XMStoreFloat4x4(&m_ProjMatrix, XMMatrixOrthographicLH(Viewport.Width, Viewport.Height, 0.f, 1.f)); - - - return S_OK; -} -CRenderer* CRenderer::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) -{ - CRenderer* pInstance = new CRenderer(pDevice, pContext); - - if (FAILED(pInstance->Initialize())) - { - MSG_BOX("Failed to Created : CRenderer"); - SAFE_RELEASE(pInstance); - } - - return pInstance; -} - -void CRenderer::Free() -{ - __super::Free(); - - -#ifdef _DEBUG - for (auto& pDebugCom : m_DebugComponents) { - SAFE_RELEASE(pDebugCom); - } m_DebugComponents.clear(); -#endif - - - for (auto& RenderObjects : m_RenderObjects) - { - for (auto& pRenderObject : RenderObjects) { - SAFE_RELEASE(pRenderObject); - } - RenderObjects.clear(); - } - - SAFE_RELEASE(m_pShadowDSV); - SAFE_RELEASE(m_pShader); - SAFE_RELEASE(m_pLastColorShader); - SAFE_RELEASE(m_pWeightBlendShader); - SAFE_RELEASE(m_pVIBuffer); - SAFE_RELEASE(m_pDevice); - SAFE_RELEASE(m_pContext); - SAFE_RELEASE(m_pGameInstance); -} -#ifdef _DEBUG -void CRenderer::Describe_Entitiy() -{ - GUI::Begin("Renderer"); - GUI::PushItemWidth(80); - if (GUI::CollapsingHeader("PostProcessing_Bloom")) - { - GUI::BeginChild("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::PopItemWidth(); - GUI::EndChild(); - } - if (GUI::CollapsingHeader("Environment DOF")) - { - GUI::BeginChild("DOF_ENV", ImVec2(0, 0), true); - GUI::PushItemWidth(80.0f); - - GUI::Text("Far DOF (Environment)"); - GUI::Separator(); - - GUI::DragFloat("Depth Cut", &m_fDOF_ENV_CutThreshold, 0.001f, 0.0f, 20.0f, "%.4f"); - - GUI::DragFloat("Focus Dist", &m_fDOF_ENV_FocusDistance, 1.0f, 0.1f, 125.f, "%.1f"); - - GUI::DragFloat("Blur Start", &m_fDOF_ENV_StartDistance, 1.0f, 0.1f, 250.f, "%.1f"); - - GUI::DragFloat("Blur End", &m_fDOF_ENV_MaxEnd, 1.0f, 1.0f, 500.f, "%.1f"); - - GUI::DragFloat("Max Radius", &m_fDOF_ENV_AmountRadius, 0.1f, 0.0f, 10.0f, "%.2f"); - - if (m_fDOF_ENV_StartDistance < m_fDOF_ENV_FocusDistance) { - m_fDOF_ENV_StartDistance = m_fDOF_ENV_FocusDistance; - } - - if (m_fDOF_ENV_MaxEnd < m_fDOF_ENV_StartDistance + 1.0f) { - m_fDOF_ENV_MaxEnd = m_fDOF_ENV_StartDistance + 1.0f; - } - - GUI::PopItemWidth(); - GUI::EndChild(); - } - GUI::End(); -} -#endif diff --git a/Jusin154_Team3D/Engine/Private/Renderer_Declare.cpp b/Jusin154_Team3D/Engine/Private/Renderer_Declare.cpp new file mode 100644 index 000000000..e69ded6d0 --- /dev/null +++ b/Jusin154_Team3D/Engine/Private/Renderer_Declare.cpp @@ -0,0 +1,465 @@ +#include "pch.h" +#include "Renderer.h" +#include "GameInstance.h" +#include "GameObject.h" +#include "Transform.h" + + +CRenderer::CRenderer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : m_pDevice{ pDevice } + , m_pContext{ pContext } + , m_pGameInstance{ CGameInstance::GetInstance() } +{ + SAFE_ADDREF(m_pDevice); + SAFE_ADDREF(m_pContext); + SAFE_ADDREF(m_pGameInstance); +} + +HRESULT CRenderer::Add_RenderGroup(RENDER eRenderGroup, CGameObject* pRenderObject) +{ + if (nullptr == pRenderObject || pRenderObject->isDead()) { + return E_FAIL; + } + + m_RenderObjects[ENUM_CLASS(eRenderGroup)].push_back(pRenderObject); + SAFE_ADDREF(pRenderObject); + return S_OK; +} + +#ifdef _DEBUG +HRESULT CRenderer::Add_DebugComponent(CComponent* pDebugCom) +{ + m_DebugComponents.push_back(pDebugCom); + + SAFE_ADDREF(pDebugCom); + + return S_OK; +} +#endif + +HRESULT CRenderer::Ready_ShadowDepthStencilView(_uint iSizeX, _uint iSizeY) +{ + ID3D11Texture2D* pShadowDepthStencilTexture = nullptr; + + D3D11_TEXTURE2D_DESC TextureDesc; + ZeroMemory(&TextureDesc, sizeof(D3D11_TEXTURE2D_DESC)); + + TextureDesc.Width = iSizeX; + TextureDesc.Height = iSizeY; + TextureDesc.MipLevels = 1; + TextureDesc.ArraySize = 1; + TextureDesc.Format = DXGI_FORMAT_D24_UNORM_S8_UINT; + + TextureDesc.SampleDesc.Quality = 0; + TextureDesc.SampleDesc.Count = 1; + + TextureDesc.Usage = D3D11_USAGE_DEFAULT; + TextureDesc.BindFlags = D3D11_BIND_DEPTH_STENCIL; + TextureDesc.CPUAccessFlags = 0; + TextureDesc.MiscFlags = 0; + + if (FAILED(m_pDevice->CreateTexture2D(&TextureDesc, nullptr, &pShadowDepthStencilTexture))) { + return E_FAIL; + } + + if (FAILED(m_pDevice->CreateDepthStencilView(pShadowDepthStencilTexture, nullptr, &m_pShadowDSV))) { + return E_FAIL; + } + if (FAILED(m_pDevice->CreateDepthStencilView(pShadowDepthStencilTexture, nullptr, &m_pPreShadowDSV))) { + return E_FAIL; + } + + SAFE_RELEASE(pShadowDepthStencilTexture); + + return S_OK; +} + +HRESULT CRenderer::Initialize() +{ + _uint iNumViewports = { 1 }; + + D3D11_VIEWPORT Viewport{}; + m_pContext->RSGetViewports(&iNumViewports, &Viewport); + { + /* Target_ToneMapping */ + if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_ToneMapping"), (_uint)Viewport.Width, (_uint)Viewport.Height, + DXGI_FORMAT_R16G16B16A16_FLOAT, _float4(0.0f, 0.f, 1.f, 1.f)))) { + return E_FAIL; + } + /* Target_Diffuse */ + if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Diffuse"), (_uint)Viewport.Width, (_uint)Viewport.Height, + DXGI_FORMAT_R16G16B16A16_FLOAT, _float4(0.0f, 0.f, 0.f, 0.f)))) { + return E_FAIL; + } + + /* Target_Normal */ + if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Normal"), (_uint)Viewport.Width, (_uint)Viewport.Height, + DXGI_FORMAT_R16G16B16A16_UNORM, _float4(0.0f, 0.f, 0.f, 1.f)))) { + return E_FAIL; + } + + /* Target_Depth */ + if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Depth"), (_uint)Viewport.Width, (_uint)Viewport.Height, + DXGI_FORMAT_R32G32B32A32_FLOAT, _float4(0.0f, 1.f, 0.f, 0.f)))) { + return E_FAIL; + } + + /* Target_Surface */ + if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Surface"), (_uint)Viewport.Width, (_uint)Viewport.Height, + DXGI_FORMAT_R32G32B32A32_FLOAT, _float4(0.0f, 0.f, 0.f, 0.f)))) { + return E_FAIL; + } + + /* Target_Shade */ + if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Shade"), (_uint)Viewport.Width, (_uint)Viewport.Height, + DXGI_FORMAT_R16G16B16A16_FLOAT, _float4(0.0f, 0.f, 0.f, 1.f)))) { + return E_FAIL; + } + + /* Target_Specular */ + if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Specular"), (_uint)Viewport.Width, (_uint)Viewport.Height, + DXGI_FORMAT_R16G16B16A16_FLOAT, _float4(0.0f, 0.f, 0.f, 0.f)))) { + return E_FAIL; + } + /* Target_Shadow_Near */ + if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Shadow_Near"), (_uint)g_iMaxShadowWidth, (_uint)g_iMaxShadowHeight, + DXGI_FORMAT_R32_FLOAT, _float4(1.f, 1.f, 1.f, 1.f)))) { + return E_FAIL; + } + /* Target_PreShadow */ + if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_PreShadow"), (_uint)g_iMaxShadowWidth, (_uint)g_iMaxShadowHeight, + DXGI_FORMAT_R32_FLOAT, _float4(1.f, 1.f, 1.f, 1.f)))) { + return E_FAIL; + } + + /* Target_Blur */ + if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Blur"), (_uint)Viewport.Width, (_uint)Viewport.Height, + DXGI_FORMAT_R16G16B16A16_FLOAT, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Blur_Weight"), (_uint)Viewport.Width, (_uint)Viewport.Height, + DXGI_FORMAT_R16_FLOAT, _float4(0.0f, 0.0f, 0.0f, 1.0f)))) { + return E_FAIL; + } + + /* Target_Blur_X */ + if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Blur_X"), (_uint)Viewport.Width, (_uint)Viewport.Height, + DXGI_FORMAT_R16G16B16A16_FLOAT, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Blur_X_Weight"), (_uint)Viewport.Width, (_uint)Viewport.Height, + DXGI_FORMAT_R16_FLOAT, _float4(0.0f, 0.0f, 0.0f, 1.0f)))) { + return E_FAIL; + } + + /* Target_SSAO */ + if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_SSAO"), (_uint)Viewport.Width, (_uint)Viewport.Height, + DXGI_FORMAT_R16G16B16A16_FLOAT, _float4(0.0f, 0.f, 0.0f, 0.0f)))) { + return E_FAIL; + } + /* Target_SSAO_BLUR_X */ + if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_SSAO_BLUR_X"), (_uint)Viewport.Width, (_uint)Viewport.Height, + DXGI_FORMAT_R16G16B16A16_FLOAT, _float4(0.0f, 0.f, 0.0f, 0.0f)))) { + return E_FAIL; + } + /* Target_SSAO_LIGHTING */ + if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_SSAO_LIGHTING"), (_uint)Viewport.Width, (_uint)Viewport.Height, + DXGI_FORMAT_R16G16B16A16_FLOAT, _float4(0.0f, 0.f, 0.0f, 0.0f)))) { + return E_FAIL; + } + + /* Target_AfterCombined */ + if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_AfterCombined"), (_uint)Viewport.Width, (_uint)Viewport.Height, + DXGI_FORMAT_R16G16B16A16_FLOAT, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) { + return E_FAIL; + } + + /* Target_Color*/ + if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Color"), (_uint)Viewport.Width, (_uint)Viewport.Height, + DXGI_FORMAT_R32G32B32A32_FLOAT, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) { + return E_FAIL; + } + + /*WB_COLOR*/ + if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_WB_Color"), (_uint)Viewport.Width, (_uint)Viewport.Height, + DXGI_FORMAT_R16G16B16A16_FLOAT, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) { + return E_FAIL; + } + + /* WB_A*/ + if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_WB_Revealage"), (_uint)Viewport.Width, (_uint)Viewport.Height, + DXGI_FORMAT_R16_FLOAT, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) { + return E_FAIL; + } + + /* Target_Fog */ + if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Fog"), (_uint)Viewport.Width, (_uint)Viewport.Height, + DXGI_FORMAT_R16G16B16A16_FLOAT, _float4(0.0f, 0.f, 0.f, 0.f)))) { + return E_FAIL; + } + + /* Target_Bloom */ + if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Bloom_Input"), (_uint)(Viewport.Width), (_uint)(Viewport.Height), + DXGI_FORMAT_R16G16B16A16_FLOAT, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Bloom"), (_uint)(Viewport.Width), (_uint)(Viewport.Height), + DXGI_FORMAT_R16G16B16A16_FLOAT, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Bloom_2x2"), (_uint)(Viewport.Width * 0.5f), (_uint)(Viewport.Height * 0.5f), + DXGI_FORMAT_R16G16B16A16_FLOAT, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Bloom_4x4"), (_uint)(Viewport.Width * 0.25f), (_uint)(Viewport.Height * 0.25f), + DXGI_FORMAT_R16G16B16A16_FLOAT, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Bloom_8x8"), (_uint)(Viewport.Width * 0.125f), (_uint)(Viewport.Height * 0.125f), + DXGI_FORMAT_R16G16B16A16_FLOAT, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Bloom_8x8_X"), (_uint)(Viewport.Width * 0.125f), (_uint)(Viewport.Height * 0.125f), + DXGI_FORMAT_R16G16B16A16_FLOAT, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Bloom_4x4_2"), (_uint)(Viewport.Width * 0.25f), (_uint)(Viewport.Height * 0.25f), + DXGI_FORMAT_R16G16B16A16_FLOAT, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Bloom_2x2_2"), (_uint)(Viewport.Width * 0.5f), (_uint)(Viewport.Height * 0.5f), + DXGI_FORMAT_R16G16B16A16_FLOAT, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) { + return E_FAIL; + } + + + if (FAILED(Ready_ShadowDepthStencilView(g_iMaxShadowWidth, g_iMaxShadowHeight))) { + return E_FAIL; + } + + } + { + /* MRT_GameObjects */ + if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_GameObjects"), TEXT("Target_Diffuse")))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_GameObjects"), TEXT("Target_Normal")))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_GameObjects"), TEXT("Target_Depth")))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_GameObjects"), TEXT("Target_Color")))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_GameObjects"), TEXT("Target_Surface")))) { + return E_FAIL; + } + /* MRT_SSAO */ + if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_SSAO"), TEXT("Target_SSAO")))) { + return E_FAIL; + } + /* MRT_SSAO_BLUR */ + if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_SSAO_BLUR"), TEXT("Target_SSAO_BLUR_X")))) { + return E_FAIL; + } + /* MRT_SSAO_LIGHTING */ + if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_SSAO_LIGHTING"), TEXT("Target_SSAO_LIGHTING")))) { + return E_FAIL; + } + + /* MRT_Combined */ + if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Combined"), TEXT("Target_Fog")))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Combined"), TEXT("Target_AfterCombined")))) { + return E_FAIL; + } + + /* MRT_LightAcc */ + if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_LightAcc"), TEXT("Target_Shade")))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_LightAcc"), TEXT("Target_Specular")))) { + return E_FAIL; + } + + /* MRT_Shadow */ + if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Shadow"), TEXT("Target_Shadow_Near")))) { + return E_FAIL; + } + /* MRT_PreShadow */ + if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_PreShadow"), TEXT("Target_PreShadow")))) { + return E_FAIL; + } + + /* MRT_Blur */ + if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Blur"), TEXT("Target_Blur")))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Blur"), TEXT("Target_Blur_Weight")))) { + return E_FAIL; + } + + /* MRT_Blur */ + if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Bloom"), TEXT("Target_Bloom_Input")))) { + return E_FAIL; + } + + /* MRT_Blur_X */ + if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Blur_X"), TEXT("Target_Blur_X")))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Blur_X"), TEXT("Target_Blur_X_Weight")))) { + return E_FAIL; + } + + /* MRT_Color */ + if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Color"), TEXT("Target_Color")))) { + return E_FAIL; + } + + /* MRT_WB */ + if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_WB"), TEXT("Target_WB_Color")))) { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_WB"), TEXT("Target_WB_Revealage")))) { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_WB"), TEXT("Target_Color")))) { + return E_FAIL; + } + + /* MRT_Fog */ + if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Fog"), TEXT("Target_Fog")))) { + return E_FAIL; + } + + } + + m_pShader = (CShader*)m_pGameInstance->Clone_Asset_Prototype(g_iStaticLevel, FX_DEFERRED, nullptr, nullptr); + if (nullptr == m_pShader) { + return E_FAIL; + } + + + m_pLastColorShader = (CShader*)m_pGameInstance->Clone_Asset_Prototype(g_iStaticLevel, FX_LASTCOLOR, nullptr, nullptr); + + if (nullptr == m_pLastColorShader) { + return E_FAIL; + } + + m_pWeightBlendShader = (CShader*)m_pGameInstance->Clone_Asset_Prototype(g_iStaticLevel, FX_WEIGHTBELND, nullptr, nullptr); + + if (nullptr == m_pWeightBlendShader) { + return E_FAIL; + } + + m_pVIBuffer = CVIBuffer_Rect::Create(m_pDevice, m_pContext); + if (nullptr == m_pVIBuffer) { + return E_FAIL; + } + + XMStoreFloat4x4(&m_WorldMatrix, XMMatrixScaling(Viewport.Width, Viewport.Height, 1.f)); + XMStoreFloat4x4(&m_ViewMatrix, XMMatrixIdentity()); + XMStoreFloat4x4(&m_ProjMatrix, XMMatrixOrthographicLH(Viewport.Width, Viewport.Height, 0.f, 1.f)); + + return S_OK; +} +CRenderer* CRenderer::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CRenderer* pInstance = new CRenderer(pDevice, pContext); + + if (FAILED(pInstance->Initialize())) + { + MSG_BOX("Failed to Created : CRenderer"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CRenderer::Free() +{ + __super::Free(); + + +#ifdef _DEBUG + for (auto& pDebugCom : m_DebugComponents) { + SAFE_RELEASE(pDebugCom); + } m_DebugComponents.clear(); +#endif + + + for (auto& RenderObjects : m_RenderObjects) + { + for (auto& pRenderObject : RenderObjects) { + SAFE_RELEASE(pRenderObject); + } + RenderObjects.clear(); + } + + SAFE_RELEASE(m_pPreShadowDSV); + SAFE_RELEASE(m_pShadowDSV); + SAFE_RELEASE(m_pShader); + SAFE_RELEASE(m_pLastColorShader); + SAFE_RELEASE(m_pWeightBlendShader); + SAFE_RELEASE(m_pVIBuffer); + SAFE_RELEASE(m_pDevice); + SAFE_RELEASE(m_pContext); + SAFE_RELEASE(m_pGameInstance); +} +#ifdef _DEBUG +void CRenderer::Describe_Entitiy() +{ + GUI::Begin("Renderer"); + GUI::PushItemWidth(80); + if (GUI::CollapsingHeader("PostProcessing_Bloom")) + { + GUI::BeginChild("PostProcessing_Bloom"); + GUI::PushItemWidth(80); + GUI::DragFloat("m_fBloomThreshold", &m_fBloomThreshold, 0.01f, 0.02f, 100.f, "%.3f"); + GUI::SliderInt("g_iEmbossingPass", &m_iBloomEmbossingPass, 0, 2, "%d"); + GUI::PopItemWidth(); + GUI::EndChild(); + } + if (GUI::CollapsingHeader("Environment DOF")) + { + GUI::BeginChild("DOF_ENV", ImVec2(0, 0), true); + GUI::PushItemWidth(80.0f); + + GUI::Text("Far DOF (Environment)"); + GUI::Separator(); + + GUI::DragFloat("Depth Cut", &m_fDOF_ENV_CutThreshold, 0.001f, 0.0f, 20.0f, "%.4f"); + + GUI::DragFloat("Focus Dist", &m_fDOF_ENV_FocusDistance, 1.0f, 0.1f, 125.f, "%.1f"); + + GUI::DragFloat("Blur Start", &m_fDOF_ENV_StartDistance, 1.0f, 0.1f, 250.f, "%.1f"); + + GUI::DragFloat("Blur End", &m_fDOF_ENV_MaxEnd, 1.0f, 1.0f, 500.f, "%.1f"); + + GUI::DragFloat("Max Radius", &m_fDOF_ENV_AmountRadius, 0.1f, 0.0f, 10.0f, "%.2f"); + + if (m_fDOF_ENV_StartDistance < m_fDOF_ENV_FocusDistance) { + m_fDOF_ENV_StartDistance = m_fDOF_ENV_FocusDistance; + } + + if (m_fDOF_ENV_MaxEnd < m_fDOF_ENV_StartDistance + 1.0f) { + m_fDOF_ENV_MaxEnd = m_fDOF_ENV_StartDistance + 1.0f; + } + + GUI::PopItemWidth(); + GUI::EndChild(); + } + if (GUI::CollapsingHeader("ToneMapping")) { + GUI::BeginChild("TONE_MAP", ImVec2(0, 0), true); + GUI::SliderInt("m_iToneMappingType", &m_iToneMappingType, 0, 2, "%d"); + GUI::SliderFloat("m_fExposure", &m_fExposure, 0.5f, 2.f, "%.3f"); + GUI::EndChild(); + } + GUI::End(); +} +#endif diff --git a/Jusin154_Team3D/Engine/Private/Shadow.cpp b/Jusin154_Team3D/Engine/Private/Shadow.cpp index 9dd2855bb..c985888c1 100644 --- a/Jusin154_Team3D/Engine/Private/Shadow.cpp +++ b/Jusin154_Team3D/Engine/Private/Shadow.cpp @@ -1,4 +1,4 @@ -#include "pch.h" +#include "pch.h" #include "Shadow.h" #include "Shader.h" @@ -15,6 +15,13 @@ HRESULT CShadow::Ready_Shadow_Light(const SHADOW_LIGHT_DESC& Desc) XMStoreFloat4x4(&m_TransformationMatrices[ENUM_CLASS(D3DTS::PROJ)], XMMatrixOrthographicLH(m_Desc.fWidth, m_Desc.fHeight, m_Desc.fNear, m_Desc.fFar)); + + XMStoreFloat4x4(&m_TransformationMatrices[ENUM_CLASS(D3DTS::VIEW_INV)], + XMMatrixInverse(nullptr, XMLoadFloat4x4(&m_TransformationMatrices[ENUM_CLASS(D3DTS::VIEW)]))); + + XMStoreFloat4x4(&m_TransformationMatrices[ENUM_CLASS(D3DTS::PROJ_INV)], + XMMatrixInverse(nullptr, XMLoadFloat4x4(&m_TransformationMatrices[ENUM_CLASS(D3DTS::PROJ)]))); + return S_OK; } diff --git a/Jusin154_Team3D/Engine/Private/Trail.cpp b/Jusin154_Team3D/Engine/Private/Trail.cpp index 3a837fd0b..bd2276f63 100644 --- a/Jusin154_Team3D/Engine/Private/Trail.cpp +++ b/Jusin154_Team3D/Engine/Private/Trail.cpp @@ -178,8 +178,6 @@ void CTrail::Trail_Update(_float fDeltaTime, _fmatrix WorldMatrix) XMStoreFloat3(&m_pVertices[0].vPosition, vFixedLow); XMStoreFloat3(&m_pVertices[1].vPosition, vFixedHigh); - - } #ifdef _DEBUG Describe_Entity(); diff --git a/Jusin154_Team3D/Engine/Private/Transform.cpp b/Jusin154_Team3D/Engine/Private/Transform.cpp index a073a6d68..7938548ce 100644 --- a/Jusin154_Team3D/Engine/Private/Transform.cpp +++ b/Jusin154_Team3D/Engine/Private/Transform.cpp @@ -360,6 +360,35 @@ void CTransform::LookAt(_fvector vAt) Set_State(STATE::LOOK, XMVector3Normalize(vLook) * vScale.z); } +void CTransform::LookAt_Lerp(_fvector vAt, _float fTimeDelta, _float fSpeed) +{ + _vector vPos = Get_State(STATE::POSITION); + + _float3 vMyPos, vTarget; + XMStoreFloat3(&vMyPos, vPos); + XMStoreFloat3(&vTarget, vAt); + + _float3 vDir = { + vTarget.x - vMyPos.x, + 0.f, + vTarget.z - vMyPos.z + }; + + _vector vTargetLook = XMVector3Normalize(XMLoadFloat3(&vDir)); + _vector vCurrentLook = Get_State(STATE::LOOK); + + _vector vNewLook = XMVector3Normalize( + XMVectorLerp(vCurrentLook, vTargetLook, fTimeDelta * fSpeed) + ); + + _vector vRight = XMVector3Normalize(XMVector3Cross(XMVectorSet(0.f, 1.f, 0.f, 0.f), vNewLook)); + _vector vUp = XMVector3Normalize(XMVector3Cross(vNewLook, vRight)); + + Set_State(STATE::LOOK, vNewLook); + Set_State(STATE::RIGHT, vRight); + Set_State(STATE::UP, vUp); +} + void CTransform::LookAt_Horizontal(_fvector vAt) { _float3 vScale = Get_Scale(); 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/Unit.cpp b/Jusin154_Team3D/Engine/Private/Unit.cpp index c4515e4c6..2a456ad04 100644 --- a/Jusin154_Team3D/Engine/Private/Unit.cpp +++ b/Jusin154_Team3D/Engine/Private/Unit.cpp @@ -122,6 +122,34 @@ HRESULT CUnit::Ready_Components(void *pArg) return S_OK; } +void CUnit::Play_Event() +{ + for (auto iter = m_PendingEvents.begin(); iter != m_PendingEvents.end(); ) + { + _float ratio = m_pModelCom->Get_CurrentTrackProgressRatio(); + _uint curAnim = m_pModelCom->Get_AnimIndex(); + + if (curAnim == iter->AnimIndex && ratio >= iter->fRatio) + { + iter->Callback(); + iter = m_PendingEvents.erase(iter); + } + else + { + ++iter; + } + } +} + +void CUnit::Add_Event(_uint AnimIndex, function Callback, _float fRatio) +{ + PendingEvent Desc; + Desc.AnimIndex = AnimIndex; + Desc.fRatio = fRatio; + Desc.Callback = Callback; + m_PendingEvents.push_back(Desc); +} + void CUnit::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/Camera.h b/Jusin154_Team3D/Engine/Public/Camera.h index 5ea043f8c..32325c5d7 100644 --- a/Jusin154_Team3D/Engine/Public/Camera.h +++ b/Jusin154_Team3D/Engine/Public/Camera.h @@ -76,7 +76,7 @@ class ENGINE_DLL CCamera abstract : public CGameObject CGameObject* m_pLookTarget = { nullptr }; SHADOW_LIGHT_DESC ShadowDesc{}; - _float3 vRollPichYaw = { 45.f, 45.f, 0.f }; + _float3 m_vRollPichYaw = { 35.2643897f, 45.f, 0.f }; protected: virtual HRESULT Initialize_Prototype() override; diff --git a/Jusin154_Team3D/Engine/Public/Engine_Enum.h b/Jusin154_Team3D/Engine/Public/Engine_Enum.h index 49a647995..002f888cc 100644 --- a/Jusin154_Team3D/Engine/Public/Engine_Enum.h +++ b/Jusin154_Team3D/Engine/Public/Engine_Enum.h @@ -5,7 +5,7 @@ NS_BEGIN(Engine) enum class STATE { RIGHT, UP, LOOK, POSITION, END }; enum class LIGHT { DIRECTIONAL, POINT, SPOT, END }; enum class COLLIDER { AABB, OBB, SPHERE, END }; -enum class RENDER {PRIORITY, SHADOW, NONBLEND, DECAL, BLUR, NONLIGHT, EFFECT ,BLEND, BLOOM, UI, OCCLUSION, END }; +enum class RENDER {PRIORITY, SHADOW, NONBLEND, DECAL, BLUR, NONLIGHT, EFFECT ,BLEND, BLOOM, UI, OCCLUSION, PRESHADOW, END }; enum class RAY { LOCAL, WORLD, END }; enum class ACTOR { BOX, CAPSULE, SPHERE, PLANE, TRIANGLEMESH, HEIGHTFIELD, END }; enum class BLEND_BONE{SPINE,SHOULDER_L,SHOULDER_R,NECK,SHOULDER_NECK_L, SHOULDER_NECK_R,END}; @@ -35,7 +35,10 @@ enum class NAVI_POINT { A, B, C, END }; enum class NAVI_LINE { AB, BC, CA, END }; enum class SHADER_PASS_CELL { DEBUG, END }; -enum class SHADER_PASS_DEFERRED { DEBUG, DIRECTIONAL, POINT, COMBINED, BLUR, SPOT, REFIT, EMBOSSING, BLOOM_BLURX, BLOOM_BLURY, BLOOM_ACCUM, BLOOM_FINISH, BLURX_ENVIRONMENT, POSTCOMBINED, FOG, END }; +enum class SHADER_PASS_DEFERRED { DEBUG, DIRECTIONAL, POINT, COMBINED, BLUR, SPOT, + REFIT, EMBOSSING, BLOOM_BLURX, BLOOM_BLURY, BLOOM_ACCUM, BLOOM_FINISH, BLURX_ENVIRONMENT, + POSTCOMBINED, FOG, TONE_MAPPING, + END }; enum class QUESTYPE {MAIN, SUB, END}; enum class TEXTURE_MOUNT_SLOT0 { NOT_DEFINED, METALLIC, SPECULAR, HEIGHT, END }; @@ -94,10 +97,10 @@ enum class PXOBJECT : _uint { NOT_DEFINE = 000, #pragma endregion #pragma region PLAYER - PLAYER = 010, + PLAYER = 10, #pragma endregion #pragma region MONSTER - MONSTER = 030, + MONSTER = 30, GOBLIN_WARRIOR, // 031 GOBLIN_MAGICIAN, GOBLIN_THEIF, @@ -112,6 +115,13 @@ enum class PXOBJECT : _uint { GOBLIN_SHIELD_BREAK_MELEE, GOBLIN_SHIELD_BREAK_MAGIC, GOBLIN_NORMAL_MAGIC, + TROLL_GROUND_STRIKE, + + /* + * _int iKind; + * if (iKind > 100 && iKind < 200){ + * dammage + */ #pragma endregion #pragma region ALLY_HITBOX @@ -127,7 +137,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/Engine_Macro.h b/Jusin154_Team3D/Engine/Public/Engine_Macro.h index 4096e43a0..630a9baf6 100644 --- a/Jusin154_Team3D/Engine/Public/Engine_Macro.h +++ b/Jusin154_Team3D/Engine/Public/Engine_Macro.h @@ -88,8 +88,8 @@ // GRAVITY 음수 박으면 피직스 로드 실패함 #define GRAVITY 9.81f -constexpr unsigned int g_iMaxShadowWidth = 16384; -constexpr unsigned int g_iMaxShadowHeight = 9216; +constexpr unsigned int g_iMaxShadowWidth = 16384; +constexpr unsigned int g_iMaxShadowHeight = 9216; #ifndef AI_TEXTURE_TYPE_MAX #define AI_TEXTURE_TYPE_MAX 27 diff --git a/Jusin154_Team3D/Engine/Public/FSM.h b/Jusin154_Team3D/Engine/Public/FSM.h index 8a779e959..65826020e 100644 --- a/Jusin154_Team3D/Engine/Public/FSM.h +++ b/Jusin154_Team3D/Engine/Public/FSM.h @@ -26,6 +26,10 @@ enum ESTATE : _u64Flag BROOM_RIDE = 1ULL << 19, MOUNT_B = 1ULL << 20, DISMOUNT = 1ULL << 21, + RUSH = 1ULL << 22, + THROW_ROCK = 1ULL << 23, + BACKHAND_SWING = 1ULL << 24, + SWING = 1ULL << 25, END }; NS_END diff --git a/Jusin154_Team3D/Engine/Public/GameInstance.h b/Jusin154_Team3D/Engine/Public/GameInstance.h index e3cc1d764..4712e22fd 100644 --- a/Jusin154_Team3D/Engine/Public/GameInstance.h +++ b/Jusin154_Team3D/Engine/Public/GameInstance.h @@ -22,6 +22,8 @@ class ENGINE_DLL CGameInstance final : public CBase _float Random_Normal(); _float Random_Float(_float fMin, _float fMax); _int Random_Int(_int iMin, _int iMax); + _int Real_Random_Int(_int iMin, _int iMax); + _float Real_Random_Float(_float fMin, _float fMax); void BillBoard(CTransform* pTransform); #pragma region GRAPHIC_DEVICE @@ -97,6 +99,7 @@ class ENGINE_DLL CGameInstance final : public CBase #pragma region RENDERER HRESULT Add_RenderGroup(RENDER eRenderGroup, class CGameObject* pRenderObject); + void Render_PreShadow(); #pragma endregion #pragma region ASSET_MANAGER @@ -200,6 +203,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 +212,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); // 모델 불러왔던 경로에 그대로 있음 @@ -272,6 +276,7 @@ class ENGINE_DLL CGameInstance final : public CBase #ifdef _DEBUG private: + mt19937 m_Rng{ random_device{}() }; _float m_fTimer_PriorityUpdate = { 0.f }; _float m_fTimer_Update = { 0.f }; _float m_fTimer_LateUpdate = { 0.f }; diff --git a/Jusin154_Team3D/Engine/Public/Instance_Model.h b/Jusin154_Team3D/Engine/Public/Instance_Model.h index ee154f124..d504920f3 100644 --- a/Jusin154_Team3D/Engine/Public/Instance_Model.h +++ b/Jusin154_Team3D/Engine/Public/Instance_Model.h @@ -55,8 +55,18 @@ class ENGINE_DLL CInstance_Model final : public CComponent _float2 vSizeDrag = {}; _float2 vDelay = {}; - _bool isNoWorld = {}; + + _float2 vDissolveUVMoveTime = { 1.f , 1.f }; + + _float3 vPadding0 = {}; + _float3 vPadding1 = {}; + + _float fPadding0 = {}; + _float fPadding1 = {}; + + _bool isPadding0 = {}; + _bool isPadding1 = {}; }INSTANCE_DESC; typedef struct tagPreInstanceDesc @@ -108,6 +118,7 @@ class ENGINE_DLL CInstance_Model final : public CComponent _float2 vSizeDrag = {}; _float2 vDelay = {}; + _bool isNoWorld = {}; }PRE_INSTANCE_DESC; @@ -153,6 +164,7 @@ class ENGINE_DLL CInstance_Model final : public CComponent _float2 vDiffuseUVMoveTime = {}; _float2 vDistortionUVMoveTime = {}; _float2 vNoiseUVMoveTime = {}; + _float2 vDissolveUVMoveTime = {}; _float2 vAniTime = {}; _float2 vAniIndex = {}; 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/Renderer.h b/Jusin154_Team3D/Engine/Public/Renderer.h index 72fc175ce..014b3e2f9 100644 --- a/Jusin154_Team3D/Engine/Public/Renderer.h +++ b/Jusin154_Team3D/Engine/Public/Renderer.h @@ -13,6 +13,7 @@ class CRenderer final : public CBase public: void Render(); HRESULT Add_RenderGroup(RENDER eRenderGroup, class CGameObject* pRenderObject); + void Render_PreShadow(); #ifdef _DEBUG private: @@ -40,19 +41,24 @@ class CRenderer final : public CBase _float4x4 m_ProjMatrix = {}; ID3D11DepthStencilView* m_pShadowDSV = { nullptr }; + ID3D11DepthStencilView* m_pPreShadowDSV = { nullptr }; SHADOW_LIGHT_DESC m_PreShadowDesc = {}; _float4x4 m_PreShadowMatrices[ENUM_CLASS(D3DTS::END)] = {}; - _bool m_bPostProcessing_BLOOM = { true }; - _bool m_bDOF_ENV = { true }; - _int m_iBloomEmbossingPass = { 0 }; - _float m_fThreshold = { 1.26f }; - _float m_fDOF_ENV_CutThreshold = { 0.1350f }; - _float m_fDOF_ENV_FocusDistance = { 31.1f }; - _float m_fDOF_ENV_StartDistance = { 53.1f }; - _float m_fDOF_ENV_MaxEnd = { 360.f }; - _float m_fDOF_ENV_AmountRadius = { 1.f }; + + /* TunningParam */ + _int m_iToneMappingType = { 2 }; + _float m_fExposure = { 0.7f }; + + _int m_iBloomEmbossingPass = { 0 }; + _float m_fBloomThreshold = { 1.26f }; + + _float m_fDOF_ENV_CutThreshold = { 0.1350f }; + _float m_fDOF_ENV_FocusDistance = { 31.1f }; + _float m_fDOF_ENV_StartDistance = { 53.1f }; + _float m_fDOF_ENV_MaxEnd = { 360.f }; + _float m_fDOF_ENV_AmountRadius = { 1.f }; private: void Render_Occlusion(); @@ -61,6 +67,9 @@ class CRenderer final : public CBase void Render_NonBlend(); void Render_LightAcc(); void Render_Blur(); + void Render_SSAO(); + void Render_SSAO_BLUR(); + void Render_SSAO_Lighting(); void Render_Combined(); void Render_EnvironmentPostProcess(); void Render_Fog(); @@ -70,6 +79,7 @@ class CRenderer final : public CBase void Render_Blend(); void Render_Bloom(); void Render_LastColor(); + void Render_Tone_Mapping(); void Render_UI(); diff --git a/Jusin154_Team3D/Engine/Public/Shadow.h b/Jusin154_Team3D/Engine/Public/Shadow.h index 177653af0..86cdb9e45 100644 --- a/Jusin154_Team3D/Engine/Public/Shadow.h +++ b/Jusin154_Team3D/Engine/Public/Shadow.h @@ -1,4 +1,4 @@ -#pragma once +#pragma once #include "Base.h" @@ -16,7 +16,7 @@ class CShadow final : public CBase const _float4x4* Get_ShadowMatricesPtr() { return m_TransformationMatrices; } const SHADOW_LIGHT_DESC* Get_ShadowDesc() { return &m_Desc; } private: - _float4x4 m_TransformationMatrices[ENUM_CLASS(D3DTS::END)] = {}; + _float4x4 m_TransformationMatrices[ENUM_CLASS(D3DTS::END)] = {}; SHADOW_LIGHT_DESC m_Desc = {}; public: @@ -24,4 +24,4 @@ class CShadow final : public CBase virtual void Free() override; }; -NS_END \ No newline at end of file +NS_END diff --git a/Jusin154_Team3D/Engine/Public/State.h b/Jusin154_Team3D/Engine/Public/State.h index 595ad2591..4148c7342 100644 --- a/Jusin154_Team3D/Engine/Public/State.h +++ b/Jusin154_Team3D/Engine/Public/State.h @@ -4,10 +4,10 @@ NS_BEGIN(STATEANIM) enum ESTATE { - IDLE,IDLE_AIM, IDLE_TURN_L, IDLE_TURN_R, IDLE_TURN_BWD, + IDLE,IDLE_AIM, IDLE_TURN_L, IDLE_TURN_R, IDLE_TURN_BWD, IDLE_COMBAT_TURN_BWD,IDLE_BREAK1,IDLE_BREAK2,IDLE_BREAK3,IDLE_BREAK4, MOVE, WALK, WALK_FWD,WALK_RIGHT,WALK_LEFT, WALK_BWD,WALK_STOP, - JOG, JOG_FWD, JOG_RIGHT, JOG_LEFT, JOG_BWD, JOG_STOP, JOG_AIM_LEFT, JOG_AIM_RIGHT, JOG_AIM_BWD, JOG_AIM_STOP_L, JOG_AIM_STOP_R, JOG_AIM_STOP_BWD, + JOG,JOG_START, JOG_FWD, JOG_RIGHT, JOG_LEFT, JOG_BWD, JOG_STOP, JOG_AIM_LEFT, JOG_AIM_RIGHT, JOG_AIM_BWD, JOG_AIM_STOP_L, JOG_AIM_STOP_R, JOG_AIM_STOP_BWD, SPRINT, JUMP,JUMP_JOG,JUMP_SPRINT, LAND, @@ -16,13 +16,17 @@ enum ESTATE MAPHELP,POTION, ACCIO,DESCENDO,DIFFINDO,DEPULSO,LUMOS,LUMOS_STOP,DISILLUSION_ENTER,DISILLUSION_EXIT, ANCIENT_THROW, BROOM_IDLE,BROOM_FWD,BROOM_LEFT,BROOM_RIGHT,BROOM_DOWN,BROOM_UP, BROOM_HOVER_IDLE, BROOM_HOVER_FWD, BROOM_HOVER_LEFT, BROOM_HOVER_RIGHT, BROOM_HOVER_START,BROOM_MOUNT, BROOM_MOUNT_END,BROOM_DISMOUNT, - HIT, HIT_FWD, HIT_BWD, HIT_BWD2, HIT_BWD3, HIT_BWD4, HIT_L, HIT_R, + RUSH_START,RUSH_LOOP,RUSH_END, + THROW_ROCK_START,THROW_ROCK, + BACKHAND_SWING_JOG,SWING_FWD, + HIT, HIT_FWD, HIT_BWD, HIT_BWD2, HIT_BWD3, HIT_BWD4, HIT_L, HIT_R,HIT_FACE,HIT_FACE_END, KNOCKDOWN, KNOCKDOWN_FWD, KNOCKDOWN_FWD_SPLT, KNOCKDOWN_FWD_SPLT_HOLD, KNOCKDOWN_BWD, KNOCKDOWN_BWD_SPLT, KNOCKDOWN_BWD_SPLT_HOLD, GETUP, GETUP_BWD, GETUP_FWD, GETUP_L, GETUP_L_FD, GETUP_L_FU, GETUP_R, GETUP_R_FD, GETUP_R_FU, GETUP_SLOUCH, DEAD, DEAD_FWD, DEAD_FWD2, DEAD_BWD, DEAD_BWD2, DEAD_L, DEAD_L2, DEAD_R, DEAD_R2, KNOCKBACK, KNOCKBACK2, TUMBLE, TUMBLE2, PETRIFICUSED_START, + STUN, ////////////////////////// 빗자루 BROOM_MOUNT_B, BROOM_HOVER_IDLE_B, BROOM_HOVER_STOP_B,BROOM_HOVER_DOWN_B,BROOM_HOVER_UP_B,BROOM_HOVER_LEFT_B,BROOM_HOVER_RIGHT_B,BROOM_FLY_DOWN_B, BROOM_FLY_LEFT_B, BROOM_FLY_RIGHT_B, BROOM_FLY_UP_B,BROOM_FLY_B, /// //////////////////////////// diff --git a/Jusin154_Team3D/Engine/Public/Transform.h b/Jusin154_Team3D/Engine/Public/Transform.h index e66124571..34da3c3c2 100644 --- a/Jusin154_Team3D/Engine/Public/Transform.h +++ b/Jusin154_Team3D/Engine/Public/Transform.h @@ -72,6 +72,7 @@ class ENGINE_DLL CTransform final : // Up, Down 벡터를 바라보게 하면 터짐 void LookAt(_fvector vAt); + void LookAt_Lerp(_fvector vAt, _float fTimeDelta, _float fSpeed); void LookAt_Horizontal(_fvector vAt); _float TargetDis(_fvector vTarget); 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/Unit.h b/Jusin154_Team3D/Engine/Public/Unit.h index e12116978..f08ce1987 100644 --- a/Jusin154_Team3D/Engine/Public/Unit.h +++ b/Jusin154_Team3D/Engine/Public/Unit.h @@ -12,6 +12,13 @@ class ENGINE_DLL CUnit abstract : public CContainerObject { const _tchar* pModelPrototypeTag; }PARTS_OBJECT_DESC; + + struct PendingEvent + { + _float fRatio = 0.f; + _uint AnimIndex = 0; + function Callback; + }; protected: CUnit(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); CUnit(const CUnit& Prototype); @@ -64,14 +71,19 @@ class ENGINE_DLL CUnit abstract : public CContainerObject STATEANIM::ESTATE m_eSpell = { STATEANIM::END }; + vector m_PendingEvents; + private: virtual void Add_FSM() {}; virtual void Set_FSM() {}; virtual void Set_Anim() {}; + + protected: HRESULT Ready_Components(void*pArg); - + void Play_Event(); + void Add_Event(_uint AnimIndex, function Callback, _float fRatio = 0.f); public: virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr)PURE; virtual void Free() override; 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 };