From da088ea0f978f592b859255219004ea22a5d9656 Mon Sep 17 00:00:00 2001 From: qordlsgur <127704460+qordlsgur@users.noreply.github.com> Date: Mon, 17 Nov 2025 12:03:24 +0900 Subject: [PATCH] =?UTF-8?q?[Add]=20=EC=8A=A4=ED=82=AC=20=EC=82=AC=EC=9A=A9?= =?UTF-8?q?=20=EC=8B=9C=20=EC=BF=A8=ED=83=80=EC=9E=84=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ShaderFiles/Shader_UIEditor.hlsl | 13 +++++++---- Jusin154_Team3D/Editor/Private/IMGUIUI.cpp | 7 ++++++ .../Editor/Private/Spell_Overlay.cpp | 23 +++++++++++++++++++ Jusin154_Team3D/Editor/Public/IMGUIUI.h | 1 + Jusin154_Team3D/Engine/Private/UIObject.cpp | 10 ++++++++ Jusin154_Team3D/Engine/Public/UIObject.h | 6 +++++ 6 files changed, 56 insertions(+), 4 deletions(-) diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl index f88d7f179..8c9469e55 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl @@ -22,6 +22,7 @@ float g_fAlpha; float g_fOwnerAlpha; float g_fCanvasAlpha; float g_fAngle; +float g_fCoolTime; float2 g_fOrigin_Size; float2 g_fCurrent_Size; @@ -398,14 +399,18 @@ PS_OUT PS_Rotation(PS_IN In) if (tex2.a >= 0.9f) color = tex2; + float CoolTime = 1.f - g_fDeltaV; + + if (In.vTexcoord.y <= CoolTime) + { + color.a = 0.f; + } + color.a *= Alpha; Out.vColor = color; } - - - - + return Out; } diff --git a/Jusin154_Team3D/Editor/Private/IMGUIUI.cpp b/Jusin154_Team3D/Editor/Private/IMGUIUI.cpp index 0999a05ad..1031a292b 100644 --- a/Jusin154_Team3D/Editor/Private/IMGUIUI.cpp +++ b/Jusin154_Team3D/Editor/Private/IMGUIUI.cpp @@ -150,6 +150,7 @@ void CIMGUIUI::Update(_float fTimeDelta) m_fMoveSpeed = static_cast(m_pElementObject)->Get_Speed(); m_fAngle = static_cast(m_pElementObject)->Get_Angle(); m_iSkillType = static_cast(m_pElementObject)->Get_SkillType(); + m_fCoolTime = static_cast(m_pElementObject)->Get_CoolTime(); } GUI::Begin("Current_PanelObject_Info"); if (m_pGamePlay_Canvas != nullptr) @@ -412,6 +413,12 @@ void CIMGUIUI::Update(_float fTimeDelta) { static_cast(m_pElementObject)->Set_SkillType(m_iSkillType); } + + GUI::Text("CoolTime %.1f", m_fCoolTime); + if (GUI::SliderFloat("CoolTime", &m_fCoolTime, 1.f, 90.f)) + { + static_cast(m_pElementObject)->Set_CoolTime(m_fCoolTime); + } } GUI::End(); } diff --git a/Jusin154_Team3D/Editor/Private/Spell_Overlay.cpp b/Jusin154_Team3D/Editor/Private/Spell_Overlay.cpp index c52c57903..05c6ae259 100644 --- a/Jusin154_Team3D/Editor/Private/Spell_Overlay.cpp +++ b/Jusin154_Team3D/Editor/Private/Spell_Overlay.cpp @@ -44,6 +44,8 @@ HRESULT CSpell_Overlay::Initialize(void* pArg) m_fAngle = XMConvertToRadians(-135.f); m_fAlpha = 1.f; m_fAlphaTime = 1.f; + m_vUVScale.y = 1.f; + m_fCoolTime = 5.f; m_iSkillType = ENUM_CLASS(SKILLTYPE::CONTROL); return S_OK; } @@ -88,6 +90,19 @@ void CSpell_Overlay::Update(_float fTimeDelta) } } + if (m_vUVScale.y >= 1.f) + { + if (m_pGameInstance->Key_Down(DIK_1)) + { + m_vUVScale.y = 0.f; + } + } + + if (m_vUVScale.y <= 1) + { + m_vUVScale.y += fTimeDelta * (1.f / m_fCoolTime); + } + m_fTime += fTimeDelta * m_fTimeMult; __super::Update(fTimeDelta); @@ -197,6 +212,14 @@ HRESULT CSpell_Overlay::Bind_ShaderResources() return E_FAIL; } if (FAILED(m_pShaderCom->Bind_RawValue("g_iImageCountY", &m_iImageFrameY, sizeof(_int)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fDeltaV", &m_vUVScale.y, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fCoolTime", &m_fCoolTime, sizeof(_float)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Editor/Public/IMGUIUI.h b/Jusin154_Team3D/Editor/Public/IMGUIUI.h index f1c567fdb..226a5b7c4 100644 --- a/Jusin154_Team3D/Editor/Public/IMGUIUI.h +++ b/Jusin154_Team3D/Editor/Public/IMGUIUI.h @@ -54,6 +54,7 @@ class CIMGUIUI final : public CGameObject _float m_fMoveSpeed{}; _float m_fAngle{}; + _float m_fCoolTime{}; _float m_fLeft{}; _float m_fRight{}; diff --git a/Jusin154_Team3D/Engine/Private/UIObject.cpp b/Jusin154_Team3D/Engine/Private/UIObject.cpp index a6533cd36..d4e51a76c 100644 --- a/Jusin154_Team3D/Engine/Private/UIObject.cpp +++ b/Jusin154_Team3D/Engine/Private/UIObject.cpp @@ -432,6 +432,16 @@ _int CUIObject::Get_SkillType() return m_iSkillType; } +void CUIObject::Set_CoolTime(_float CoolTime) +{ + m_fCoolTime = CoolTime; +} + +_float CUIObject::Get_CoolTime() +{ + return m_fCoolTime; +} + void CUIObject::Free() { __super::Free(); diff --git a/Jusin154_Team3D/Engine/Public/UIObject.h b/Jusin154_Team3D/Engine/Public/UIObject.h index cec5cf6a5..239a1374b 100644 --- a/Jusin154_Team3D/Engine/Public/UIObject.h +++ b/Jusin154_Team3D/Engine/Public/UIObject.h @@ -96,6 +96,9 @@ class ENGINE_DLL CUIObject abstract : public CGameObject virtual void Set_SkillType(_int eType); virtual _int Get_SkillType(); + + virtual void Set_CoolTime(_float CoolTime); + virtual _float Get_CoolTime(); protected: _vector m_fOrigin_Position_vector{}; _float2 m_fOrigin_Position{}; @@ -125,6 +128,9 @@ class ENGINE_DLL CUIObject abstract : public CGameObject _float m_fCanvasAlpha{}; // 캔버스의 알파를 던지기 위해 _float m_fAlphaTime{}; // UI의 알파값을 조절 할 때 알파는 0~1이라서 n을 나누거나 곱해서 시간을 늘리거나 빠르게 하기 위함 _float m_fTime{}; // 캔버스는 아니더라도 패널전체랑 Element들은 필요함 + _float m_fCoolTime{}; + + _float m_fEndTime{}; // UI의 움직임이 끝나는 시간 _float m_fDelayTime{}; // UI의 딜레이 시간 _float m_fTimeMult{1.f}; // 애니메이션 속도를 조절하기 위해서 필요