diff --git a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl index bd54db0ff..d8b056495 100644 --- a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl +++ b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl @@ -2255,6 +2255,177 @@ PS_OUT PS_Ride_HpSlot(PS_IN In) return Out; } +PS_OUT PS_BoosterGauge(PS_IN In) +{ + PS_OUT Out = (PS_OUT) 0; + float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; + float4 Color = float4(1.f, 1.f, 1.f, 1.f); + float4 Color1 = float4(1.f, 1.f, 1.f, 1.f); + float2 uv = In.vTexcoord; + float2 CurrentPixelPosition = uv * g_fCurrent_Size; + float OriginLeft = g_fNine_Slice.x; + float OriginRight = g_fNine_Slice.y; + float OriginTop = g_fNine_Slice.z; + float OriginBottom = g_fNine_Slice.w; + + float CurrentLeft = OriginLeft; + float CurrentRight = g_fCurrent_Size.x - (g_fOrigin_Size.x - OriginRight); + float CurrentTop = OriginTop; + float CurrentBottom = g_fCurrent_Size.y - (g_fOrigin_Size.y - OriginBottom); + + float2 Finaluv = In.vTexcoord; + + if (CurrentPixelPosition.x < CurrentLeft) + { + Finaluv.x = CurrentPixelPosition.x / g_fOrigin_Size.x; + } + else if (CurrentPixelPosition.x > CurrentRight) + { + float dist = CurrentPixelPosition.x - CurrentRight; + Finaluv.x = (OriginRight + dist) / g_fOrigin_Size.x; + } + else + { + float scale = (CurrentPixelPosition.x - CurrentLeft) / (CurrentRight - CurrentLeft); + Finaluv.x = (OriginLeft / g_fOrigin_Size.x) + scale * ((OriginRight - OriginLeft) / g_fOrigin_Size.x); + } + + if (CurrentPixelPosition.y < CurrentTop) + { + Finaluv.y = CurrentPixelPosition.y / g_fOrigin_Size.y; + } + else if (CurrentPixelPosition.y > CurrentBottom) + { + float dist = CurrentPixelPosition.y - CurrentBottom; + Finaluv.y = (OriginBottom + dist) / g_fOrigin_Size.y; + } + else + { + float scale = (CurrentPixelPosition.y - CurrentTop) / (CurrentBottom - CurrentTop); + Finaluv.y = (OriginTop / g_fOrigin_Size.y) + scale * ((OriginBottom - OriginTop) / g_fOrigin_Size.y); + } + + float4 tex1 = g_Texture.Sample(ClampSampler, Finaluv); + if (g_iClick == 1) + { + tex1.rgb = float3(255.f, 255.f, 0.f) / 255.f; + float blink = abs(sin(g_fBlinkTime)); + tex1.a = saturate(tex1.a * blink); + } + else if (g_iClick == 0) + { + tex1.a = 0.f; + } + Color = tex1; + + float2 BGPos = g_Pos; + float2 BGSize = g_fImageSize; + float2 BGPixel = Finaluv * g_fOrigin_Size; + float2 localUV = (BGPixel - BGPos) / BGSize; + bool inside = all(localUV >= 0.0f && localUV <= 1.0f); + + float4 tex2 = g_Texture1.Sample(ClampSampler, localUV); + + if (inside) + Color = lerp(Color, tex2, tex2.a); + + float2 reversuv = In.vTexcoord; + + reversuv.x = 1.0f - localUV.x; + + float4 tex3 = g_Texture2.Sample(ClampSampler, localUV); + + if (reversuv.x >= g_fHp) + { + tex3.rgb *= float3(0.f, 0.f, 0.f); + } + else + { + tex3.rgb *= float3(1.f, 1.f, 0.f); + } + if (all(tex2.rgb >= float3(55.f / 255.f, 0.f / 255.f, 55.f / 255.f))) + Color = lerp(Color, tex3, tex3.a); + + Color.a *= Alpha; + Out.vColor = Color; + return Out; +} + +PS_OUT PS_BoosterHpBar(PS_IN In) +{ + PS_OUT Out = (PS_OUT) 0; + float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; + float4 Color = float4(1.f, 1.f, 1.f, 1.f); + float4 Color1 = float4(1.f, 1.f, 1.f, 1.f); + float2 uv = In.vTexcoord; + float2 CurrentPixelPosition = uv * g_fCurrent_Size; + float OriginLeft = g_fNine_Slice.x; + float OriginRight = g_fNine_Slice.y; + float OriginTop = g_fNine_Slice.z; + float OriginBottom = g_fNine_Slice.w; + + float CurrentLeft = OriginLeft; + float CurrentRight = g_fCurrent_Size.x - (g_fOrigin_Size.x - OriginRight); + float CurrentTop = OriginTop; + float CurrentBottom = g_fCurrent_Size.y - (g_fOrigin_Size.y - OriginBottom); + + float2 Finaluv = In.vTexcoord; + + if (CurrentPixelPosition.x < CurrentLeft) + { + Finaluv.x = CurrentPixelPosition.x / g_fOrigin_Size.x; + } + else if (CurrentPixelPosition.x > CurrentRight) + { + float dist = CurrentPixelPosition.x - CurrentRight; + Finaluv.x = (OriginRight + dist) / g_fOrigin_Size.x; + } + else + { + float scale = (CurrentPixelPosition.x - CurrentLeft) / (CurrentRight - CurrentLeft); + Finaluv.x = (OriginLeft / g_fOrigin_Size.x) + scale * ((OriginRight - OriginLeft) / g_fOrigin_Size.x); + } + + if (CurrentPixelPosition.y < CurrentTop) + { + Finaluv.y = CurrentPixelPosition.y / g_fOrigin_Size.y; + } + else if (CurrentPixelPosition.y > CurrentBottom) + { + float dist = CurrentPixelPosition.y - CurrentBottom; + Finaluv.y = (OriginBottom + dist) / g_fOrigin_Size.y; + } + else + { + float scale = (CurrentPixelPosition.y - CurrentTop) / (CurrentBottom - CurrentTop); + Finaluv.y = (OriginTop / g_fOrigin_Size.y) + scale * ((OriginBottom - OriginTop) / g_fOrigin_Size.y); + } + + float4 tex2 = g_Texture.Sample(ClampSampler, Finaluv); + Color = tex2; + + float2 reversuv = In.vTexcoord; + + reversuv.x = 1.0f - Finaluv.x; + + float4 tex3 = g_Texture1.Sample(ClampSampler, Finaluv); + + if (reversuv.x >= g_fHp) + { + tex3.rgb *= float3(0.f, 0.f, 0.f); + } + else + { + tex3.rgb *= float3(0.f, 1.f, 0.f); + } + if (all(tex2.rgb >= float3(55.f / 255.f, 0.f / 255.f, 55.f / 255.f))) + Color = lerp(Color, tex3, tex3.a); + + Color.a *= Alpha; + Out.vColor = Color; + return Out; +} + struct VS_IN3D { float3 vPosition : POSITION; @@ -2647,7 +2818,7 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Sptire_Sheet(); } - pass Key_Hold_Rotation// 9 + pass Key_Hold_Rotation // 9 { SetRasterizerState(RS_Default); SetDepthStencilState(DSS_Default, 0); @@ -2707,7 +2878,7 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Rotation(); } - pass Slot//15 + pass Slot //15 { SetRasterizerState(RS_Default); SetDepthStencilState(DSS_Default, 0); @@ -2755,7 +2926,7 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Magic_Icon(); } - pass RemapUV//20 + pass RemapUV //20 { SetRasterizerState(RS_Default); SetDepthStencilState(DSS_Default, 0); @@ -2805,7 +2976,7 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Spell_Preview(); } - pass Spell_Header//25 + pass Spell_Header //25 { SetRasterizerState(RS_Default); SetDepthStencilState(DSS_Default, 0); @@ -2855,7 +3026,7 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Loding_Screen(); } - pass Enemy_HpBer//30 + pass Enemy_HpBer //30 { SetRasterizerState(RS_Default); SetDepthStencilState(DSS_Default, 0); @@ -2905,7 +3076,7 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Quest_Status(); } - pass Broomstick//35 + pass Broomstick //35 { SetRasterizerState(RS_Nocull); SetDepthStencilState(DSS_Default, 0); @@ -2955,7 +3126,7 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_NPCInteraction(); } - pass CanvasFade//40 + pass CanvasFade //40 { SetRasterizerState(RS_Nocull); SetDepthStencilState(DSS_Default, 0); @@ -3005,7 +3176,7 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Ride_Info(); } - pass Ride_HpSlot//45 + pass Ride_HpSlot //45 { SetRasterizerState(RS_Nocull); SetDepthStencilState(DSS_Default, 0); @@ -3015,6 +3186,26 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Ride_HpSlot(); } + pass BoosterGauge + { + SetRasterizerState(RS_Nocull); + SetDepthStencilState(DSS_Default, 0); + SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_BoosterGauge(); + } + + pass BoosterHpBar + { + SetRasterizerState(RS_Nocull); + SetDepthStencilState(DSS_Default, 0); + SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_BoosterHpBar(); + } + pass Enemy_Detection { SetRasterizerState(RS_Nocull); @@ -3045,7 +3236,7 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Interaction_Npc(); } - pass BroomGateTarget//49 + pass BroomGateTarget //51 { SetRasterizerState(RS_Nocull); SetDepthStencilState(DSS_None, 0); diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj index 2b979e2aa..6f7c2de21 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj @@ -193,6 +193,14 @@ call Update_Resources.bat + + + + + + + + @@ -456,6 +464,14 @@ call Update_Resources.bat + + + + + + + + diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters index a89ce2d10..07ab4209d 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters @@ -808,6 +808,30 @@ 04.Mechanic\State\Focus\Fear + + + 02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_Bbooster_Slot + + + 02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_BboosterBar + + + 02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_HpBar + + + 02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_HpSlot + + + 02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_Info + + + 02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_Info_Key + + + 02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_InfoBG + + + 02.GameObjects\UI\GamePlay_Canvas\Ride_Panel @@ -1682,6 +1706,30 @@ {99712e38-b76a-4c04-8ba3-16ddaac72679} + + + {5bf233fa-6f9c-40d5-85c6-adbc7fcf7d28} + + + {9c357e12-18b3-461e-b74c-76f85280796f} + + + {8b69e309-b90b-47f6-8f2d-3dd778b468fe} + + + {d3ad8db7-ff00-498d-ba50-aa4c38a56d4a} + + + {721edad8-8be2-4e4c-9730-1c1cf8655880} + + + {76eaa3a8-b4ba-4530-9369-61666e660e16} + + + {99c0bf2f-3686-4171-b23d-2c0bdf3c6d9f} + + + {7876ff7e-f456-49ce-8fd6-766116613ff4} @@ -2438,6 +2486,30 @@ 04.Mechanic\State\Focus\Fear + + + 02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_Bbooster_Slot + + + 02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_BboosterBar + + + 02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_HpBar + + + 02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_HpSlot + + + 02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_Info + + + 02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_Info_Key + + + 02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_InfoBG + + + 02.GameObjects\UI\GamePlay_Canvas\Ride_Panel diff --git a/Jusin154_Team3D/Client/Private/Broom_Record.cpp b/Jusin154_Team3D/Client/Private/Broom_Record.cpp index 631091702..3ce28abd5 100644 --- a/Jusin154_Team3D/Client/Private/Broom_Record.cpp +++ b/Jusin154_Team3D/Client/Private/Broom_Record.cpp @@ -121,13 +121,13 @@ HRESULT CBroom_Record::Render() if (m_bNewScore == false) { m_pGameInstance->Render_Text(TEXT("Font_size20"), m_fFont[0].c_str(), m_fFontPos[0]); - m_pGameInstance->Render_Text(TEXT("Font_size20"), m_fFont[1].c_str(), m_fFontPos[1], m_fFontColor[0]); + m_pGameInstance->Render_Text(TEXT("Font_size20"), m_fFont[1].c_str(), m_fFontPos[1], XMLoadFloat4(&m_fFontColor[0])); m_pGameInstance->Render_Text(TEXT("Font_size20"), m_fFont[2].c_str(), m_fFontPos[2]); m_pGameInstance->Render_Text(TEXT("Font_size20"), m_fFont[3].c_str(), m_fFontPos[3]); } else { - m_pGameInstance->Render_Text(TEXT("Font_size20"), m_fFont[4].c_str(), m_fFontPos[4], m_fFontColor[1]); + m_pGameInstance->Render_Text(TEXT("Font_size20"), m_fFont[4].c_str(), m_fFontPos[4], XMLoadFloat4(&m_fFontColor[1])); m_pGameInstance->Render_Text(TEXT("Font_size20"), m_fFont[1].c_str(), m_fFontPos[5]); } @@ -213,8 +213,8 @@ void CBroom_Record::Set_Font() m_fFontPos[4] = _float2(m_fX + 880, m_fY + 140.f); m_fFontPos[5] = _float2(m_fX + 900, m_fY + 180.f); - m_fFontColor[0] = XMVectorSet(0.f, 1.f, 0.f, 1.f); - m_fFontColor[1] = XMVectorSet((208.f / 255.f) * m_fAlpha, (177.f / 255.f) * m_fAlpha, (52.f / 255.f) * m_fAlpha, m_fAlpha); + m_fFontColor[0] = _float4(0.f, 1.f, 0.f, 1.f); + m_fFontColor[1] = _float4((208.f / 255.f) * m_fAlpha, (177.f / 255.f) * m_fAlpha, (52.f / 255.f) * m_fAlpha, m_fAlpha); } diff --git a/Jusin154_Team3D/Client/Private/Broom_Scoreboard.cpp b/Jusin154_Team3D/Client/Private/Broom_Scoreboard.cpp index 6bc74dee4..0a37f96c5 100644 --- a/Jusin154_Team3D/Client/Private/Broom_Scoreboard.cpp +++ b/Jusin154_Team3D/Client/Private/Broom_Scoreboard.cpp @@ -119,24 +119,24 @@ HRESULT CBroom_Scoreboard::Render() return E_FAIL; } - m_pGameInstance->Render_Text(TEXT("Font_size20"), Score[0].c_str(), m_fFontPosition[0], m_fColor[1]); - m_pGameInstance->Render_Text(TEXT("Font_size20"), Score[1].c_str(), m_fFontPosition[1], m_fColor[1]); - m_pGameInstance->Render_Text(TEXT("Font_size20"), Score[2].c_str(), m_fFontPosition[2], m_fColor[3]); - m_pGameInstance->Render_Text(TEXT("Font_size20"), Score[3].c_str(), m_fFontPosition[3], m_fColor[0]); - m_pGameInstance->Render_Text(TEXT("UI_size25"), Score[4].c_str(), m_fFontPosition[4], m_fColor[0]); - m_pGameInstance->Render_Text(TEXT("UI_size25"), Score[5].c_str(), m_fFontPosition[5], m_fColor[3]); - m_pGameInstance->Render_Text(TEXT("Font_size25"), Score[6].c_str(), m_fFontPosition[6], m_fColor[2]); - m_pGameInstance->Render_Text(TEXT("Font_size25"), Score[7].c_str(), m_fFontPosition[7], m_fColor[0]); + m_pGameInstance->Render_Text(TEXT("Font_size20"), Score[0].c_str(), m_fFontPosition[0], XMLoadFloat4(&m_fColor[1])); + m_pGameInstance->Render_Text(TEXT("Font_size20"), Score[1].c_str(), m_fFontPosition[1], XMLoadFloat4(&m_fColor[1])); + m_pGameInstance->Render_Text(TEXT("Font_size20"), Score[2].c_str(), m_fFontPosition[2], XMLoadFloat4(&m_fColor[3])); + m_pGameInstance->Render_Text(TEXT("Font_size20"), Score[3].c_str(), m_fFontPosition[3], XMLoadFloat4(&m_fColor[0])); + m_pGameInstance->Render_Text(TEXT("UI_size25"), Score[4].c_str(), m_fFontPosition[4], XMLoadFloat4(&m_fColor[0])); + m_pGameInstance->Render_Text(TEXT("UI_size25"), Score[5].c_str(), m_fFontPosition[5], XMLoadFloat4(&m_fColor[3])); + m_pGameInstance->Render_Text(TEXT("Font_size25"), Score[6].c_str(), m_fFontPosition[6], XMLoadFloat4(&m_fColor[2])); + m_pGameInstance->Render_Text(TEXT("Font_size25"), Score[7].c_str(), m_fFontPosition[7], XMLoadFloat4(&m_fColor[0])); return S_OK; } void CBroom_Scoreboard::Set_Setting() { - m_fColor[0] = XMVectorSet(1.f, 1.f, 1.f, 1.f); - m_fColor[1] = XMVectorSet(0.5f, 0.5f, 0.5f, 1.f); - m_fColor[2] = XMVectorSet(0.f, 1.f, 0.f, 1.f); - m_fColor[3] = XMVectorSet((208.f / 255.f) * m_fAlpha, (177.f / 255.f) * m_fAlpha, (52.f / 255.f) * m_fAlpha, m_fAlpha); + m_fColor[0] = _float4(1.f, 1.f, 1.f, 1.f); + m_fColor[1] = _float4(0.5f, 0.5f, 0.5f, 1.f); + m_fColor[2] = _float4(0.f, 1.f, 0.f, 1.f); + m_fColor[3] = _float4((208.f / 255.f) * m_fAlpha, (177.f / 255.f) * m_fAlpha, (52.f / 255.f) * m_fAlpha, m_fAlpha); Score[0] = TEXT("내 기록"); Score[1] = TEXT("최고 기록"); diff --git a/Jusin154_Team3D/Client/Private/Broom_TargetGate.cpp b/Jusin154_Team3D/Client/Private/Broom_TargetGate.cpp index 5e1aef98d..433484201 100644 --- a/Jusin154_Team3D/Client/Private/Broom_TargetGate.cpp +++ b/Jusin154_Team3D/Client/Private/Broom_TargetGate.cpp @@ -53,7 +53,7 @@ void CBroom_TargetGate::Update(_float fTimeDelta) m_vPlayerPos = m_pInfoInstance->Get_PalyerPos(); if (m_vActive == true) { - m_Distance = to_wstring(_int(floor(XMVectorGetX(XMVector3Length(XMVectorSubtract(m_vTargetPos, m_vPlayerPos)))))); + m_Distance = to_wstring(_int(floor(XMVectorGetX(XMVector3Length(XMVectorSubtract(XMLoadFloat4(&m_vTargetPos), XMLoadFloat4(&m_vPlayerPos))))))); } } @@ -79,7 +79,7 @@ HRESULT CBroom_TargetGate::Render() return E_FAIL; } - _vector Pos = XMVectorAdd(m_vTargetPos, XMVectorSet(0.f, -3.f, 0.f, 0.f)); + _vector Pos = XMVectorAdd(XMLoadFloat4(&m_vTargetPos), XMVectorSet(0.f, -3.f, 0.f, 0.f)); m_pGameInstance->Perspective_Render_Text(m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW), m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ), @@ -156,10 +156,9 @@ HRESULT CBroom_TargetGate::Ready_Components() return S_OK; } -void CBroom_TargetGate::Set_TargetPosition(_vector TargetPos) +void CBroom_TargetGate::Set_TargetPosition(_fvector TargetPos) { - m_vTargetPos = TargetPos; - m_pTransformCom->Set_State(STATE::POSITION, m_vTargetPos); + m_pTransformCom->Set_State(STATE::POSITION, TargetPos); m_vActive = true; } diff --git a/Jusin154_Team3D/Client/Private/Damage_Font.cpp b/Jusin154_Team3D/Client/Private/Damage_Font.cpp index de6fb1310..2057e53cb 100644 --- a/Jusin154_Team3D/Client/Private/Damage_Font.cpp +++ b/Jusin154_Team3D/Client/Private/Damage_Font.cpp @@ -22,7 +22,7 @@ HRESULT CDamage_Font::Initialize_Prototype() HRESULT CDamage_Font::Initialize(void* pArg) { m_pInfoInstance->Add_Event(TEXT("Monster_Hit"), [this](void* p) {this->Add_Damage(p); }); - m_vWhite_Color = XMVectorSet(1.f, 1.f, 1.f, 1.f); + m_vWhite_Color = _float4(1.f, 1.f, 1.f, 1.f); return S_OK; } @@ -70,13 +70,8 @@ HRESULT CDamage_Font::Render() m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ), TEXT("Font_size30"), iter->pDamage.c_str(), - iter->vTarget_Pos, - XMVectorSet( - iter->vColor.m128_f32[0] * iter->fAlpha, - iter->vColor.m128_f32[1] * iter->fAlpha, - iter->vColor.m128_f32[2] * iter->fAlpha, - iter->fAlpha) - ); + XMLoadFloat4(&iter->vTarget_Pos), + XMVectorSet(iter->vColor.x * iter->fAlpha,iter->vColor.y * iter->fAlpha,iter->vColor.z * iter->fAlpha,iter->fAlpha) ); } } } @@ -112,7 +107,7 @@ void CDamage_Font::Add_Damage(void* pArg) } else { - Desc.vColor = XMVectorSet((215.f / 255.f), (185.f / 255.f), (95.f / 255.f), 1.f); + Desc.vColor = _float4((215.f / 255.f), (185.f / 255.f), (95.f / 255.f), 1.f); } m_DamageInfos.push_back(Desc); diff --git a/Jusin154_Team3D/Client/Private/GamePlay_Canvas.cpp b/Jusin154_Team3D/Client/Private/GamePlay_Canvas.cpp index 048baf7c8..c3d4693ee 100644 --- a/Jusin154_Team3D/Client/Private/GamePlay_Canvas.cpp +++ b/Jusin154_Team3D/Client/Private/GamePlay_Canvas.cpp @@ -8,6 +8,7 @@ #include "Enemy_Panel.h" //#include "Mouse_Cursor.h" #include "Broom_Panel.h" +#include "Ride_Panel.h" CGamePlay_Canvas::CGamePlay_Canvas(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) :CCanvasObject(pDevice, pContext) @@ -56,6 +57,24 @@ void CGamePlay_Canvas::Priority_Update(_float fTimeDelta) void CGamePlay_Canvas::Update(_float fTimeDelta) { + if (m_pGameInstance->Key_Down(DIK_B)) + { + m_bRide = !m_bRide; + + if (m_bRide == true) + { + static_cast(m_pRide_Panel)->Visible(true); + static_cast(m_pRide_Panel)->Set_FadeIn(); + static_cast(m_pAction_Panel)->Visible(false); + } + else + { + static_cast(m_pRide_Panel)->Set_FadeOut(); + static_cast(m_pAction_Panel)->Visible(true); + static_cast(m_pAction_Panel)->Set_FadeIn(); + } + + } __super::Update(fTimeDelta); } @@ -125,6 +144,12 @@ HRESULT CGamePlay_Canvas::Ready_Panel(void* pArg) } Add_Panel(TEXT("Broom_Panel"), m_pBroom_Panel); + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pRide_Panel)))) + { + return E_FAIL; + } + Add_Panel(TEXT("Ride_Panel"), m_pRide_Panel); + return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Goblin.cpp b/Jusin154_Team3D/Client/Private/Goblin.cpp index b57459365..bec186621 100644 --- a/Jusin154_Team3D/Client/Private/Goblin.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin.cpp @@ -374,7 +374,7 @@ void CGoblin::OnCollision(CGameObject* pOther, void* pDesc) if (m_pFSM->IsEnable(FSMSTATE::BLINK | FSMSTATE::DEAD)) { return; } - m_DamageInfo.vTarget_Pos = m_pCharacter_Controller->Get_HeadPosition(); + XMStoreFloat4(&m_DamageInfo.vTarget_Pos, m_pCharacter_Controller->Get_HeadPosition()); m_pGoblinSpector->Set_Visible(false); ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc); diff --git a/Jusin154_Team3D/Client/Private/Goblin_Assassin.cpp b/Jusin154_Team3D/Client/Private/Goblin_Assassin.cpp index a72200751..2838f4cee 100644 --- a/Jusin154_Team3D/Client/Private/Goblin_Assassin.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin_Assassin.cpp @@ -360,7 +360,7 @@ void CGoblin_Assassin::OnCollision(CGameObject* pOther, void* pDesc) if (m_pFSM->IsEnable(FSMSTATE::BLINK | FSMSTATE::DEAD)) { return; } - m_DamageInfo.vTarget_Pos = m_pCharacter_Controller->Get_HeadPosition(); + XMStoreFloat4(&m_DamageInfo.vTarget_Pos, m_pCharacter_Controller->Get_HeadPosition()); m_pGoblinSpector->Set_Visible(false); ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc); diff --git a/Jusin154_Team3D/Client/Private/Goblin_Mage.cpp b/Jusin154_Team3D/Client/Private/Goblin_Mage.cpp index a3b7d00db..eab5290b1 100644 --- a/Jusin154_Team3D/Client/Private/Goblin_Mage.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin_Mage.cpp @@ -307,7 +307,7 @@ void CGoblin_Mage::OnCollision(CGameObject* pOther, void* pDesc) return; } _vector Head = (XMLoadFloat4x4(Get_HeadMatrix()) * m_pTransformCom->Get_XMWorldMatrix()).r[3]; - m_DamageInfo.vTarget_Pos = XMVectorSet(Head.m128_f32[0], Head.m128_f32[1], Head.m128_f32[2], 1.f); + XMStoreFloat4(&m_DamageInfo.vTarget_Pos, XMVectorSet(Head.m128_f32[0], Head.m128_f32[1], Head.m128_f32[2], 1.f)); ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc); Check_HitAngle(XMLoadFloat4(&CollisionDesc->vHitDir)); diff --git a/Jusin154_Team3D/Client/Private/InfoInstance.cpp b/Jusin154_Team3D/Client/Private/InfoInstance.cpp index cf8c825c4..5dc08865d 100644 --- a/Jusin154_Team3D/Client/Private/InfoInstance.cpp +++ b/Jusin154_Team3D/Client/Private/InfoInstance.cpp @@ -64,12 +64,14 @@ void CInfoInstance::Set_Damage(_float fDamage) m_pSkillInfo->Update_Damage(fDamage); } -_vector CInfoInstance::Get_PalyerPos() +_float4 CInfoInstance::Get_PalyerPos() { - return m_pPlayerPos; + _float4 Pos{}; + XMStoreFloat4(&Pos, m_pPlayerPos); + return Pos; } -void CInfoInstance::Set_PlayerPos(_vector Position) +void CInfoInstance::Set_PlayerPos(_fvector Position) { m_pPlayerPos = Position; } diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index 8b85dca02..f0c0a6227 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -144,6 +144,15 @@ #include "Broom_Exit.h" #include "Broom_Trophy.h" +#include "Ride_Panel.h" +#include "Ride_Info_Key.h" +#include "Ride_Info.h" +#include "Ride_InfoBG.h" +#include "Ride_Bbooster_Slot.h" +#include "Ride_BboosterBar.h" +#include "Ride_HpBar.h" +#include "Ride_HpSlot.h" + #include "Interaction_Key.h" #include "NPCInteraction.h" @@ -2729,6 +2738,47 @@ HRESULT CLoader::Loading_For_GamePlay() return E_FAIL; } + /* For.Prototype_GameObject_SpellLearn_Ride_Panel*/ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRide_Panel::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + /* For.Prototype_GameObject_SpellLearn_Ride_Info_Key*/ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRide_Info_Key::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + /* For.Prototype_GameObject_SpellLearn_Ride_Info*/ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRide_Info::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + /* For.Prototype_GameObject_SpellLearn_Ride_InfoBG*/ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRide_InfoBG::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + /* For.Prototype_GameObject_SpellLearn_Ride_Bbooster_Slot*/ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRide_Bbooster_Slot::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + /* For.Prototype_GameObject_SpellLearn_Ride_BboosterBar*/ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRide_BboosterBar::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + /* For.Prototype_GameObject_SpellLearn_Ride_HpSlot*/ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRide_HpSlot::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + /* For.Prototype_GameObject_SpellLearn_Ride_HpBar*/ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRide_HpBar::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + /* For.Prototype_GameObject_Interaction_Key*/ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CInteraction_Key::Create(m_pDevice, m_pContext)))) { diff --git a/Jusin154_Team3D/Client/Private/NPCInteraction.cpp b/Jusin154_Team3D/Client/Private/NPCInteraction.cpp index e441953ee..9f67f5dea 100644 --- a/Jusin154_Team3D/Client/Private/NPCInteraction.cpp +++ b/Jusin154_Team3D/Client/Private/NPCInteraction.cpp @@ -92,7 +92,7 @@ void CNPCInteraction::Priority_Update(_float fTimeDelta) _vector HeadPos = XMVectorAdd(MonsterPos, XMVectorSet(fOffsetX, fOffsetY, 0.f, 0.f)); - m_vPosition = HeadPos; + XMStoreFloat4(&m_vPosition, HeadPos); _vector ScreenPos = XMVector3Project( HeadPos, @@ -116,10 +116,10 @@ void CNPCInteraction::Priority_Update(_float fTimeDelta) XMMatrixIdentity() ); - m_vFontPosition = WorldOffsetPos; + XMStoreFloat4(&m_vFontPosition, WorldOffsetPos); m_fSize = _float3(m_fSize.x, m_fOrigin_Size.y, m_fOrigin_Size.z); m_fFontSize = 0; - m_pTransformCom->Set_State(STATE::POSITION, m_vPosition); + m_pTransformCom->Set_State(STATE::POSITION, XMLoadFloat4(&m_vPosition)); } void CNPCInteraction::Update(_float fTimeDelta) @@ -161,14 +161,14 @@ HRESULT CNPCInteraction::Render() m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ), TEXT("Font_size20"), m_NpcName.c_str(), - m_vFontPosition); + XMLoadFloat4(&m_vFontPosition)); m_pGameInstance->Perspective_Render_Text( m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW), m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ), TEXT("Font_size15"), TEXT("대화하기"), - m_vPosition); + XMLoadFloat4(&m_vPosition)); return S_OK; diff --git a/Jusin154_Team3D/Client/Private/Ride_BboosterBar.cpp b/Jusin154_Team3D/Client/Private/Ride_BboosterBar.cpp new file mode 100644 index 000000000..638a37e2a --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Ride_BboosterBar.cpp @@ -0,0 +1,339 @@ +#include "pch.h" +#include "Ride_BboosterBar.h" +#include "GameInstance.h" + +CRide_BboosterBar::CRide_BboosterBar(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CRide_BboosterBar::CRide_BboosterBar(const CRide_BboosterBar& rhs) + :CElementObject(rhs) +{ +} + +HRESULT CRide_BboosterBar::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CRide_BboosterBar::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = -20.f; + Desc.fY = -180.f; + Desc.fSizeX = 144.f; + Desc.fSizeY = 50.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 = 10.f; + m_fAlpha = 1.f; + m_fAlphaTime = 10.f; + m_vNine_Slice = _float4(27.f, 125.f, m_fSizeY * 0.5f, m_fSizeY * 0.5f); + m_fMaxGauge = 100.f; + m_fCurrentGauge = m_fMaxGauge; + m_fTargetGauge = m_fMaxGauge; + m_fMoveSpeed = 5.f; + m_fGaugeBGSize = _float2(144.f, 24.f); + m_fGaugeBGPos = _float2(0.f, 13.f); + m_fGaugeBG = _float2(0, m_fSizeX); + SizeUpX(200.f); + return S_OK; +} + +void CRide_BboosterBar::Active(_float fTimeDelta) +{ + m_fCurrentGauge = CMyTools::Lerp_f1D(m_fCurrentGauge, m_fTargetGauge, fTimeDelta * m_fMoveSpeed); +} + +void CRide_BboosterBar::NonActive(_float fTimeDelta) +{ + m_fCurrentGauge = CMyTools::Lerp_f1D(m_fTargetGauge, m_fCurrentGauge, fTimeDelta * m_fMoveSpeed); +} + +void CRide_BboosterBar::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CRide_BboosterBar::Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + + if (m_bFadeIn == true) + { + if (m_fAlpha <= 1.f) + m_fAlpha += fTimeDelta * m_fAlphaTime; + + if (m_fAlpha >= 1.f) + { + m_bFadeIn = false; + m_fAlpha = 1.f; + } + } + + if (m_bFadeOut == true) + { + if (m_fAlpha >= 0.f) + m_fAlpha -= fTimeDelta; + + if (m_fAlpha <= 0.f) + { + m_bFadeOut = false; + m_fAlpha = 0.f; + } + } + + if (m_fCurrentGauge < 0.f) + m_fCurrentGauge = 0.f; + + + if (m_iClick == 1) + Active(fTimeDelta); + else + NonActive(fTimeDelta); + + m_fGaugeBar = m_fCurrentGauge / m_fMaxGauge; + + if (m_pGameInstance->Mouse_Pressing(DIM_LBUTTON)) + { + m_fTargetGauge -= fTimeDelta * m_fTimeMult; + m_iClick = 1; + } + else + { + m_iClick = 0; + } + + if (m_fTargetGauge <= 0.f) + m_fTargetGauge = 0.f; + if (m_fTargetGauge >= m_fMaxGauge) + m_fTargetGauge = m_fMaxGauge; + + if (m_iClick == 0) + { + m_fTargetGauge += fTimeDelta * m_fTimeMult; + } + + if (m_iClick == 1) + { + m_fBlinkTime += fTimeDelta; + if (m_fTime <= 1.f) + { + m_fTime += fTimeDelta; + } + } + else + { + m_fBlinkTime = 0.f; + m_fTime = 0.f; + } + + __super::Update(fTimeDelta); +} + +void CRide_BboosterBar::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + __super::Late_Update(fTimeDelta); + } +} + +HRESULT CRide_BboosterBar::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::BOOSTERGAUGE)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + + return S_OK; +} + +_vector CRide_BboosterBar::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CRide_BboosterBar::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_fBlinkTime", &m_fBlinkTime, 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_fHp", &m_fGaugeBar, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fHpBG", &m_fGaugeBG, sizeof(_float2)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageSize", &m_fGaugeBGSize, sizeof(_float2)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_Pos", &m_fGaugeBGPos, sizeof(_float2)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_iClick", &m_iClick, sizeof(_int)))) + { + return E_FAIL; + } + return S_OK; +} + +HRESULT CRide_BboosterBar::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_GlowBar"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_HpBarBG"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_HUD_HealthMeterFill"), reinterpret_cast(&m_pDiffuse_TextureCom2), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + return S_OK; +} + +CRide_BboosterBar* CRide_BboosterBar::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CRide_BboosterBar* pInstance = new CRide_BboosterBar(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CRide_BboosterBar"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CRide_BboosterBar::Clone(void* pArg, CGameObject* pOwner) +{ + CRide_BboosterBar* pInstance = new CRide_BboosterBar(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CRide_BboosterBar"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CRide_BboosterBar::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pDiffuse_TextureCom1); + SAFE_RELEASE(m_pDiffuse_TextureCom2); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +#ifdef _DEBUG +void CRide_BboosterBar::Describe_Entity() +{ +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Ride_Bbooster_Slot.cpp b/Jusin154_Team3D/Client/Private/Ride_Bbooster_Slot.cpp new file mode 100644 index 000000000..27f2e36bb --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Ride_Bbooster_Slot.cpp @@ -0,0 +1,249 @@ +#include "pch.h" +#include "Ride_Bbooster_Slot.h" +#include "GameInstance.h" + +CRide_Bbooster_Slot::CRide_Bbooster_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CRide_Bbooster_Slot::CRide_Bbooster_Slot(const CRide_Bbooster_Slot& rhs) + :CElementObject(rhs) +{ +} + +HRESULT CRide_Bbooster_Slot::Initialize_Prototype() +{ + return S_OK; +} +HRESULT CRide_Bbooster_Slot::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 100.f; + Desc.fY = -150.f; + Desc.fSizeX = 80.f; + Desc.fSizeY = 80.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 = 3.f; + m_fAngle = XMConvertToRadians(-130.f); + m_fImagePosi = _float4(20.5f, 20.5f, 40.f, 40.f); + return S_OK; +} + +void CRide_Bbooster_Slot::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} +void CRide_Bbooster_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 CRide_Bbooster_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 CRide_Bbooster_Slot::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::RIDE_HPSLOT)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + + return S_OK; +} + +_vector CRide_Bbooster_Slot::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CRide_Bbooster_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_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_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_fAngle", &m_fAngle, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageSipos1", &m_fImagePosi, sizeof(_float4)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_vScale, sizeof(_float2)))) + { + return E_FAIL; + } + return S_OK; +} + +HRESULT CRide_Bbooster_Slot::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_ActionItemBack_4K"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_ActionItemGoldleaf_4K"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_BroomHUDIcon"), reinterpret_cast(&m_pDiffuse_TextureCom2), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + return S_OK; +} + +CRide_Bbooster_Slot* CRide_Bbooster_Slot::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CRide_Bbooster_Slot* pInstance = new CRide_Bbooster_Slot(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CRide_Bbooster_Slot"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CRide_Bbooster_Slot::Clone(void* pArg, CGameObject* pOwner) +{ + CRide_Bbooster_Slot* pInstance = new CRide_Bbooster_Slot(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CRide_Bbooster_Slot"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CRide_Bbooster_Slot::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pDiffuse_TextureCom1); + SAFE_RELEASE(m_pDiffuse_TextureCom2); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +#ifdef _DEBUG +void CRide_Bbooster_Slot::Describe_Entity() +{ +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Ride_HpBar.cpp b/Jusin154_Team3D/Client/Private/Ride_HpBar.cpp new file mode 100644 index 000000000..1fa86306e --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Ride_HpBar.cpp @@ -0,0 +1,306 @@ +#include "pch.h" +#include "Ride_HpBar.h" +#include "GameInstance.h" + +CRide_HpBar::CRide_HpBar(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CRide_HpBar::CRide_HpBar(const CRide_HpBar& rhs) + :CElementObject(rhs) +{ +} + +HRESULT CRide_HpBar::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CRide_HpBar::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 60.f; + Desc.fY = -220.f; + Desc.fSizeX = 144.f; + Desc.fSizeY = 24.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 = 5.f; + m_fAlpha = 1.f; + m_fAlphaTime = 1.f; + m_vNine_Slice = _float4(27.f, 125.f, m_fSizeY * 0.5f, m_fSizeY * 0.5f); + m_fMaxHp = 200.f; + m_fCurrentHp = m_fMaxHp; + m_fMoveSpeed = 5.f; + m_fHpBG = _float2(0, m_fSizeX); + SizeUpX(200.f); + return S_OK; +} + +void CRide_HpBar::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CRide_HpBar::Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + + if (m_bFadeIn == true) + { + if (m_fAlpha <= 1.f) + m_fAlpha += fTimeDelta * m_fAlphaTime; + + if (m_fAlpha >= 1.f) + { + m_bFadeIn = false; + m_fAlpha = 1.f; + } + } + + if (m_bFadeOut == true) + { + if (m_fAlpha >= 0.f) + m_fAlpha -= fTimeDelta; + + if (m_fAlpha <= 0.f) + { + m_bFadeOut = false; + m_fAlpha = 0.f; + } + } + + if (m_fCurrentHp < 0.f) + m_fCurrentHp = 0.f; + if (m_fDamage < 0.f) + m_fDamage = 0.f; + m_fTargetHp = m_fMaxHp - m_fDamage; + + if (m_fTargetHp > m_fCurrentHp) + Heal(fTimeDelta); + else if (m_fTargetHp < m_fCurrentHp) + Hit(fTimeDelta); + m_fHpBar = m_fCurrentHp / m_fMaxHp; + + if (m_pGameInstance->Key_Down(DIK_3)) + { + m_fDamage += 20.f; + } + + if (m_pGameInstance->Key_Down(DIK_4)) + { + m_fDamage -= 21.f; + } + if (m_fHpBar <= 0.3f) + { + m_fBlinkTime += fTimeDelta * m_fTimeMult; + if (m_fTime <= 1.f) + { + m_fTime += fTimeDelta * m_fTimeMult; + } + } + else + { + m_fBlinkTime = 0.f; + m_fTime = 0.f; + } + + __super::Update(fTimeDelta); +} + +void CRide_HpBar::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + __super::Late_Update(fTimeDelta); + } +} + +HRESULT CRide_HpBar::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::BOOSTERHPBAR)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + + return S_OK; +} + +_vector CRide_HpBar::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +void CRide_HpBar::Heal(_float fTimeDelta) +{ + m_fCurrentHp = CMyTools::Lerp_f1D(m_fTargetHp, m_fCurrentHp, fTimeDelta * m_fMoveSpeed); +} + +void CRide_HpBar::Hit(_float fTimeDelta) +{ + m_fCurrentHp = CMyTools::Lerp_f1D(m_fCurrentHp, m_fTargetHp, fTimeDelta * m_fMoveSpeed); +} + +HRESULT CRide_HpBar::Bind_ShaderResources() +{ + if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom1->Bind_ShaderResource(m_pShaderCom, "g_Texture1", 0))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fBlinkTime", &m_fBlinkTime, 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_fHp", &m_fHpBar, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fHpBG", &m_fHpBG, sizeof(_float2)))) + { + return E_FAIL; + } + return S_OK; +} + +HRESULT CRide_HpBar::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_HpBarBG"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_HUD_HealthMeterFill"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + return S_OK; +} + +CRide_HpBar* CRide_HpBar::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CRide_HpBar* pInstance = new CRide_HpBar(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CRide_HpBar"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CRide_HpBar::Clone(void* pArg, CGameObject* pOwner) +{ + CRide_HpBar* pInstance = new CRide_HpBar(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CRide_HpBar"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CRide_HpBar::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pDiffuse_TextureCom1); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + + +#ifdef _DEBUG +void CRide_HpBar::Describe_Entity() +{ +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Ride_HpSlot.cpp b/Jusin154_Team3D/Client/Private/Ride_HpSlot.cpp new file mode 100644 index 000000000..3abd0216e --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Ride_HpSlot.cpp @@ -0,0 +1,251 @@ +#include "pch.h" +#include "Ride_HpSlot.h" +#include "GameInstance.h" + +CRide_HpSlot::CRide_HpSlot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CRide_HpSlot::CRide_HpSlot(const CRide_HpSlot& rhs) + :CElementObject(rhs) +{ +} + +HRESULT CRide_HpSlot::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CRide_HpSlot::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 170.f; + Desc.fY = -180.f; + Desc.fSizeX = 80.f; + Desc.fSizeY = 80.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 = 3.f; + m_fAngle = XMConvertToRadians(-130.f); + m_fImagePosi = _float4(20.5f, 20.5f, 40.f, 40.f); + return S_OK; +} + +void CRide_HpSlot::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CRide_HpSlot::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 CRide_HpSlot::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + __super::Late_Update(fTimeDelta); + } +} + +HRESULT CRide_HpSlot::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::RIDE_HPSLOT)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + + return S_OK; +} + +_vector CRide_HpSlot::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CRide_HpSlot::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_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_fAngle", &m_fAngle, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageSipos1", &m_fImagePosi, sizeof(_float4)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_vScale, sizeof(_float2)))) + { + return E_FAIL; + } + return S_OK; +} + +HRESULT CRide_HpSlot::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_ActionItemBack_4K"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_ActionItemGoldleaf_4K"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_CreatureHappiness_Positive"), reinterpret_cast(&m_pDiffuse_TextureCom2), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + return S_OK; +} + +CRide_HpSlot* CRide_HpSlot::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CRide_HpSlot* pInstance = new CRide_HpSlot(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CRide_HpSlot"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CRide_HpSlot::Clone(void* pArg, CGameObject* pOwner) +{ + CRide_HpSlot* pInstance = new CRide_HpSlot(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CRide_HpSlot"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CRide_HpSlot::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pDiffuse_TextureCom1); + SAFE_RELEASE(m_pDiffuse_TextureCom2); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + + +#ifdef _DEBUG +void CRide_HpSlot::Describe_Entity() +{ +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Ride_Info.cpp b/Jusin154_Team3D/Client/Private/Ride_Info.cpp new file mode 100644 index 000000000..3a960bd86 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Ride_Info.cpp @@ -0,0 +1,323 @@ +#include "pch.h" +#include "Ride_Info.h" +#include "GameInstance.h" + +CRide_Info::CRide_Info(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CRide_Info::CRide_Info(const CRide_Info& rhs) + :CElementObject(rhs) +{ +} + +HRESULT CRide_Info::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CRide_Info::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 0.f; + Desc.fY = -0.f; + Desc.fSizeX = 256.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; + } + + m_fTimeMult = 1.f; + m_fAlpha = 1.f; + m_fAlphaTime = 10.f; + m_vNine_Slice = _float4(256.f, 500.f, 80.f, 150.f); + SizeUpX(500.f); + SizeUpY(400.f); + MoveX(210); + MoveY(20); + Set_Posi(); + m_bActive = false; + return S_OK; +} + +void CRide_Info::Set_Posi() +{ + m_vImagePosi1 = _float4(65.f, 70.f, 32.f, 32.f); + m_vImagePosi2 = _float4(50.f, 137.5f, 32.f, 32.f); + m_vImagePosi3 = _float4(50.f, 192.5f, 32.f, 32.f); + m_vImagePosi4 = _float4(90.f, 192.5f, 32.f, 32.f); +} + +void CRide_Info::Set_Hover(_bool bVisible) +{ + Visible(bVisible); + m_bHover = true; + m_fTime = 0.f; + m_fAlpha = 1.f; +} + +void CRide_Info::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CRide_Info::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; + Visible(false); + } + } + + if (m_bHover == true) + m_fTime += fTimeDelta * m_fTimeMult; + + if (m_fTime >= 1.f) + { + Set_FadeOut(); + } + + __super::Update(fTimeDelta); +} + +void CRide_Info::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + __super::Late_Update(fTimeDelta); + } +} + +HRESULT CRide_Info::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::RIDE_INFO)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + + m_pGameInstance->Render_Text(TEXT("Font_size15"), TEXT("빗자루 컨트롤"), _float2(1480.f + m_fX, 585.f + m_fY), XMVectorSet((208.f / 255.f) * m_fAlpha, (177.f / 255.f) * m_fAlpha, (52.f / 255.f) * m_fAlpha, m_fAlpha)); + m_pGameInstance->Render_Text(TEXT("Font_size15"), TEXT("스피드 버스트"), _float2(1500.f + m_fX, 635.f + m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha)); + m_pGameInstance->Render_Text(TEXT("Font_size15"), TEXT("(전환)비행 가속"), _float2(1490.f + m_fX, 700.f + m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha)); + m_pGameInstance->Render_Text(TEXT("Font_size15"), TEXT("하강 / 상승"), _float2(1525.f + m_fX, 755.f + m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha)); + + return S_OK; +} + +_vector CRide_Info::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + + +HRESULT CRide_Info::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_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_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_fNine_Slice", &m_vNine_Slice, sizeof(_float4)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageSipos1", &m_vImagePosi1, sizeof(_float4)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageSipos2", &m_vImagePosi2, sizeof(_float4)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageSipos3", &m_vImagePosi3, sizeof(_float4)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageSipos4", &m_vImagePosi4, sizeof(_float4)))) + { + return E_FAIL; + } + return S_OK; +} + +HRESULT CRide_Info::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_MissionBanner_BorderOrnament_Left"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_Mouse_LeftClick"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_Keyboard_Shift"), reinterpret_cast(&m_pDiffuse_TextureCom2), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_Keyboard_Control"), reinterpret_cast(&m_pDiffuse_TextureCom3), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_Keyboard_Space"), reinterpret_cast(&m_pDiffuse_TextureCom4), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + return S_OK; +} + +CRide_Info* CRide_Info::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CRide_Info* pInstance = new CRide_Info(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CRide_Info"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CRide_Info::Clone(void* pArg, CGameObject* pOwner) +{ + CRide_Info* pInstance = new CRide_Info(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CBroom_Finish"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CRide_Info::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_pVIBufferCom); + SAFE_RELEASE(m_pShaderCom); +} + +#ifdef _DEBUG +void CRide_Info::Describe_Entity() +{ +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Ride_InfoBG.cpp b/Jusin154_Team3D/Client/Private/Ride_InfoBG.cpp new file mode 100644 index 000000000..18569970b --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Ride_InfoBG.cpp @@ -0,0 +1,237 @@ +#include "pch.h" +#include "Ride_InfoBG.h" +#include "GameInstance.h" + +CRide_InfoBG::CRide_InfoBG(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CRide_InfoBG::CRide_InfoBG(const CRide_InfoBG& rhs) + :CElementObject(rhs) +{ +} + +HRESULT CRide_InfoBG::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CRide_InfoBG::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 80.f; + Desc.fY = 100.f; + Desc.fSizeX = 400.f; + Desc.fSizeY = 370.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 = 0.6f; + m_fAlpha = 1.f; + m_fAlphaTime = 10.f; + return S_OK; +} + +void CRide_InfoBG::Set_Hover(_bool bVisible) +{ + Visible(bVisible); + m_bHover = true; + m_fTime = 0.f; + m_fAlpha = 1.f; +} + +void CRide_InfoBG::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CRide_InfoBG::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; + Visible(false); + } + } + + if (m_bHover == true) + m_fTime += fTimeDelta * m_fTimeMult; + + if (m_fTime >= 1.f) + { + Set_FadeOut(); + } + + __super::Update(fTimeDelta); +} + +void CRide_InfoBG::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + __super::Late_Update(fTimeDelta); + } +} + +HRESULT CRide_InfoBG::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::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 CRide_InfoBG::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CRide_InfoBG::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 CRide_InfoBG::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_DropShadow"), 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; +} + +CRide_InfoBG* CRide_InfoBG::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CRide_InfoBG* pInstance = new CRide_InfoBG(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CRide_InfoBG"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CRide_InfoBG::Clone(void* pArg, CGameObject* pOwner) +{ + CRide_InfoBG* pInstance = new CRide_InfoBG(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CRide_InfoBG"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CRide_InfoBG::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +#ifdef _DEBUG +void CRide_InfoBG::Describe_Entity() +{ +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Ride_Info_Key.cpp b/Jusin154_Team3D/Client/Private/Ride_Info_Key.cpp new file mode 100644 index 000000000..d7444595b --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Ride_Info_Key.cpp @@ -0,0 +1,291 @@ +#include "pch.h" +#include "Ride_Info_Key.h" +#include "GameInstance.h" + +CRide_Info_Key::CRide_Info_Key(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CRide_Info_Key::CRide_Info_Key(const CRide_Info_Key& rhs) + :CElementObject(rhs) +{ +} + +HRESULT CRide_Info_Key::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CRide_Info_Key::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 130.f; + Desc.fY = -50.f; + Desc.fSizeX = 170.f; + Desc.fSizeY = 80.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 = 150.f; + m_fAlpha = 1.f; + m_fAlphaTime = 1.f; + m_vUV = Compute_UV('Q'); + return S_OK; +} + +_float4 CRide_Info_Key::Compute_UV(_tchar Alphabet) +{ + _uint Number = CMyTools::AlphabetToInt(Alphabet); + + _float2 fImage_Size = { 320.f, 384.f }; + + _uint iXCount = 5; + _uint iYCount = 6; + + _float frameWidth = 64.f; + _float frameHeight = 64.f; + + _uint iframeX = Number % iXCount; + _uint iframeY = Number / iXCount; + + _float2 UVStart; + UVStart.x = iframeX * frameWidth / fImage_Size.x; + UVStart.y = iframeY * frameHeight / fImage_Size.y; + + _float2 UVEnd; + UVEnd.x = UVStart.x + (frameWidth / fImage_Size.x); + UVEnd.y = UVStart.y + (frameHeight / fImage_Size.y); + + return _float4(UVStart.x, UVStart.y, UVEnd.x, UVEnd.y); +} + +void CRide_Info_Key::Set_Posi() +{ + m_vImagePosi1 = _float4(110.f, 20.f, 40.f, 40.f); + m_vImagePosi2 = _float4(40.f, 20.f, 40.f, 40.f); +} + +void CRide_Info_Key::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CRide_Info_Key::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; + } + } + + Set_Posi(); + + __super::Update(fTimeDelta); +} + +void CRide_Info_Key::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + __super::Late_Update(fTimeDelta); + } +} + +HRESULT CRide_Info_Key::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::RIDE_INFO_KEY)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + + return S_OK; +} + +_vector CRide_Info_Key::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CRide_Info_Key::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_fCurrent_Size", &m_vScale, sizeof(_float2)))) + { + 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_fImageSipos1", &m_vImagePosi1, sizeof(_float4)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageSipos2", &m_vImagePosi2, sizeof(_float4)))) + { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CRide_Info_Key::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_MissionBanner_DpadOrnament"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_Atlas_Keyboard"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_BroomHUDIcon"), reinterpret_cast(&m_pDiffuse_TextureCom2), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + return S_OK; +} + +CRide_Info_Key* CRide_Info_Key::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CRide_Info_Key* pInstance = new CRide_Info_Key(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CRide_Info_Key"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CRide_Info_Key::Clone(void* pArg, CGameObject* pOwner) +{ + CRide_Info_Key* pInstance = new CRide_Info_Key(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CRide_Info_Key"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CRide_Info_Key::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pDiffuse_TextureCom1); + SAFE_RELEASE(m_pDiffuse_TextureCom2); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +#ifdef _DEBUG +void CRide_Info_Key::Describe_Entity() +{ +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Ride_Panel.cpp b/Jusin154_Team3D/Client/Private/Ride_Panel.cpp new file mode 100644 index 000000000..7d5e9cb5d --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Ride_Panel.cpp @@ -0,0 +1,253 @@ +#include "pch.h" +#include "Ride_Panel.h" +#include "GameInstance.h" +#include "Ride_Info_Key.h" +#include "Ride_Info.h" +#include "Ride_InfoBG.h" +#include "Ride_Bbooster_Slot.h" +#include "Ride_BboosterBar.h" +#include "Ride_HpBar.h" +#include "Ride_HpSlot.h" + +CRide_Panel::CRide_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CPanelObject(pDevice, pContext) +{ +} + +CRide_Panel::CRide_Panel(const CRide_Panel& rhs) + :CPanelObject(rhs) +{ +} + +HRESULT CRide_Panel::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CRide_Panel::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 1650.f; + Desc.fY = -800.f; + Desc.fSizeX = 500.f; + Desc.fSizeY = 500.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; + } + if (FAILED(Ready_Element(pArg))) + { + return E_FAIL; + } + + m_fCanvasAlpha = 1.f; + m_fMoveSpeed = 100.f; + m_fAlphaTime = 3.f; + Visible(false); + ElementAllVisible(true); + m_vLerp_Position = _float4(1750.f, m_fY, 0.f, 1.f); + static_cast(m_pRide_Info)->Visible(false); + static_cast(m_pRide_InfoBG)->Visible(false); + return S_OK; +} + +void CRide_Panel::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CRide_Panel::Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + + if (m_bFadeIn == true) + { + + if (m_bHover == true) + m_bHover = false; + + 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_bHover == false) + m_bHover = true; + + if (m_fAlpha >= 0.f) + m_fAlpha -= fTimeDelta; + + if (m_fAlpha <= 0.f) + { + m_bFadeOut = false; + m_fAlpha = 0.f; + Visible(false); + } + } + + if (m_bHover == true) + { + Start_Lerp(fTimeDelta); + } + else + { + Move(1650.f, -800.f); + } + + if (m_pGameInstance->Key_Down(DIK_Q)) + { + static_cast(m_pRide_Info)->Set_Hover(true); + static_cast(m_pRide_InfoBG)->Set_Hover(true); + } + + __super::Update(fTimeDelta); +} + +void CRide_Panel::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + + if (m_bVisible) { + } + __super::Late_Update(fTimeDelta); + +} + +HRESULT CRide_Panel::Render() +{ + + return S_OK; +} + +_vector CRide_Panel::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CRide_Panel::Bind_ShaderResources() +{ + return S_OK; +} + +HRESULT CRide_Panel::Ready_Components(void* pArg) +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) + { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CRide_Panel::Ready_Element(void* pArg) +{ + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_InfoBG)))) + { + return E_FAIL; + } + Add_Element(TEXT("Ride_InfoBG"), m_pRide_InfoBG); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_Info_Key)))) + { + return E_FAIL; + } + Add_Element(TEXT("Ride_Info_Key"), m_pRide_Info_Key); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_Info)))) + { + return E_FAIL; + } + Add_Element(TEXT("Ride_Info"), m_pRide_Info); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_Bbooster_Slot)))) + { + return E_FAIL; + } + Add_Element(TEXT("Ride_Bbooster_Slot"), m_pRide_Bbooster_Slot); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_BboosterBar)))) + { + return E_FAIL; + } + Add_Element(TEXT("Ride_BboosterBar"), m_pRide_BboosterBar); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_HpBar)))) + { + return E_FAIL; + } + Add_Element(TEXT("Ride_HpBar"), m_pRide_HpBar); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pRide_HpSlot)))) + { + return E_FAIL; + } + Add_Element(TEXT("Ride_HpSlot"), m_pRide_HpSlot); + + return S_OK; +} + +CRide_Panel* CRide_Panel::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CRide_Panel* pInstance = new CRide_Panel(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CRide_Panel"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CRide_Panel::Clone(void* pArg, CGameObject* pOwner) +{ + CRide_Panel* pInstance = new CRide_Panel(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CRide_Panel"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CRide_Panel::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pVIBufferCom); +} + +#ifdef _DEBUG +void CRide_Panel::Describe_Entity() +{ +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/SpellLearn_Data.cpp b/Jusin154_Team3D/Client/Private/SpellLearn_Data.cpp index cdfd5f9e0..7d0620181 100644 --- a/Jusin154_Team3D/Client/Private/SpellLearn_Data.cpp +++ b/Jusin154_Team3D/Client/Private/SpellLearn_Data.cpp @@ -72,7 +72,7 @@ HRESULT CSpellLearn_Data::Load_SpellInfo(const _char* pFilePath) _float px{}, py{}; pPos->QueryFloatAttribute("x", &px); pPos->QueryFloatAttribute("y", &py); - Info.Booster.push_back(XMVectorSet(px, py, 0.f, 1.f)); + Info.Booster.push_back(_float4(px, py, 0.f, 1.f)); } // 다음 Position으로 이동 @@ -89,7 +89,7 @@ HRESULT CSpellLearn_Data::Load_SpellInfo(const _char* pFilePath) _float px{}, py{}; pPos->QueryFloatAttribute("x", &px); pPos->QueryFloatAttribute("y", &py); - Info.Lines.push_back(XMVectorSet(px, py, 0.f, 1.f)); + Info.Lines.push_back(_float4(px, py, 0.f, 1.f)); } // 다음 Position으로 이동 diff --git a/Jusin154_Team3D/Client/Private/SpellLearn_MovePointer.cpp b/Jusin154_Team3D/Client/Private/SpellLearn_MovePointer.cpp index da1943a73..4fcfde3c2 100644 --- a/Jusin154_Team3D/Client/Private/SpellLearn_MovePointer.cpp +++ b/Jusin154_Team3D/Client/Private/SpellLearn_MovePointer.cpp @@ -85,7 +85,7 @@ void CSpellLearn_MovePointer::Line(_float fTime, _float2 fMouse) if (m_iCurrentLine < m_iLineIndex - 1) { ++m_iCurrentLine; - m_fPerPosition = _float2(m_MoveLine[m_iCurrentLine - 1].m128_f32[0], m_MoveLine[m_iCurrentLine - 1].m128_f32[1]); + m_fPerPosition = _float2(m_MoveLine[m_iCurrentLine - 1].x, m_MoveLine[m_iCurrentLine - 1].y); } else { diff --git a/Jusin154_Team3D/Client/Private/SpellLearn_Panel.cpp b/Jusin154_Team3D/Client/Private/SpellLearn_Panel.cpp index b01e080f1..71b6b8009 100644 --- a/Jusin154_Team3D/Client/Private/SpellLearn_Panel.cpp +++ b/Jusin154_Team3D/Client/Private/SpellLearn_Panel.cpp @@ -57,8 +57,8 @@ HRESULT CSpellLearn_Panel::Initialize(void* pArg) for (size_t i = 0; i < m_pBooster.size(); ++i) { - static_cast(m_pBooster[i])->Move(m_pInfoInstance->Get_SpellLearn(Index).Booster[i].m128_f32[0], - m_pInfoInstance->Get_SpellLearn(Index).Booster[i].m128_f32[1]); + static_cast(m_pBooster[i])->Move(m_pInfoInstance->Get_SpellLearn(Index).Booster[i].x, + m_pInfoInstance->Get_SpellLearn(Index).Booster[i].y); } for (size_t i = 0; i < m_pBooster.size(); ++i) { @@ -84,8 +84,8 @@ void CSpellLearn_Panel::Set_Learn(_int Index) for (size_t i = 0; i < m_pBooster.size(); ++i) { static_cast(m_pBooster[i])->Move( - m_pInfoInstance->Get_SpellLearn(Index).Booster[i].m128_f32[0], - m_pInfoInstance->Get_SpellLearn(Index).Booster[i].m128_f32[1]); + m_pInfoInstance->Get_SpellLearn(Index).Booster[i].x, + m_pInfoInstance->Get_SpellLearn(Index).Booster[i].y); static_cast(m_pBooster[i])->Reset(); } } diff --git a/Jusin154_Team3D/Client/Private/Spell_Drag.cpp b/Jusin154_Team3D/Client/Private/Spell_Drag.cpp index ab7c6aecd..1516dd157 100644 --- a/Jusin154_Team3D/Client/Private/Spell_Drag.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_Drag.cpp @@ -105,7 +105,7 @@ void CSpell_Drag::Update(_float fTimeDelta) return; } - m_vStart_MousePos = XMVectorSet(0.f, 0.f, 0.f, 0.f); + m_vStart_MousePos = _float4(0.f, 0.f, 0.f, 0.f); POINT m_pPt{}; GetCursorPos(&m_pPt); @@ -114,7 +114,7 @@ void CSpell_Drag::Update(_float fTimeDelta) fMouse.x = m_pPt.x - (g_iWinSizeX * 0.5f); fMouse.y = -m_pPt.y + (g_iWinSizeY * 0.5f); - m_vStart_MousePos = XMVectorSet(fMouse.x, fMouse.y, 0.f, 1.f); + m_vStart_MousePos = _float4(fMouse.x, fMouse.y, 0.f, 1.f); m_bFalse = false; } @@ -129,9 +129,9 @@ void CSpell_Drag::Update(_float fTimeDelta) float moveX = pt.x - (g_iWinSizeX * 0.5f); float moveY = -pt.y + (g_iWinSizeY * 0.5f); - m_vMove_MousePos = XMVectorSet(moveX, moveY, 0.f, 1.f); + m_vMove_MousePos = _float4(moveX, moveY, 0.f, 1.f); - _vector Dir = m_vMove_MousePos - m_vStart_MousePos; + _vector Dir = XMLoadFloat4(&m_vMove_MousePos) - XMLoadFloat4(&m_vStart_MousePos); _float fLength2 = XMVectorGetX(XMVector2Dot(Dir, Dir)); if (fLength2 >= 50.f) @@ -353,7 +353,7 @@ _float2 CSpell_Drag::Get_MousePos() fMouse.x = m_pPt.x - (g_iWinSizeX * 0.5f); fMouse.y = -m_pPt.y + (g_iWinSizeY * 0.5f); - m_vMove_MousePos = XMVectorSet(fMouse.x, fMouse.y, 0.f, 1.f); + m_vMove_MousePos = _float4(fMouse.x, fMouse.y, 0.f, 1.f); return fMouse; } diff --git a/Jusin154_Team3D/Client/Private/Troll.cpp b/Jusin154_Team3D/Client/Private/Troll.cpp index d5e94e3f1..186518c16 100644 --- a/Jusin154_Team3D/Client/Private/Troll.cpp +++ b/Jusin154_Team3D/Client/Private/Troll.cpp @@ -367,7 +367,7 @@ void CTroll::OnCollision(CGameObject* pOther, void* pDesc) if (m_pModelCom->Get_AnimIndex() == m_Animation[STATEANIM::RUSH_LOOP].first) return; - m_DamageInfo.vTarget_Pos = m_pCharacter_Controller->Get_HeadPosition(); + XMStoreFloat4(&m_DamageInfo.vTarget_Pos, m_pCharacter_Controller->Get_HeadPosition()); ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc); diff --git a/Jusin154_Team3D/Client/Public/Broom.h b/Jusin154_Team3D/Client/Public/Broom.h index d9e6e0e79..2fa0115c9 100644 --- a/Jusin154_Team3D/Client/Public/Broom.h +++ b/Jusin154_Team3D/Client/Public/Broom.h @@ -40,6 +40,7 @@ class CBroom final : public CUnit void Set_Move(_bool bMove) { m_bMove = bMove; } _bool Get_Move() { return m_bMove; } HRESULT Ready_Child(); + private: CInfoInstance* m_pInfoInstance = { nullptr }; diff --git a/Jusin154_Team3D/Client/Public/Broom_Record.h b/Jusin154_Team3D/Client/Public/Broom_Record.h index bcceac67f..0d9ce192f 100644 --- a/Jusin154_Team3D/Client/Public/Broom_Record.h +++ b/Jusin154_Team3D/Client/Public/Broom_Record.h @@ -47,7 +47,7 @@ class CBroom_Record final : public CElementObject _wstring m_fFont[5]; _float2 m_fFontPos[6]; - _vector m_fFontColor[2]; + _float4 m_fFontColor[2]; _float m_fBaseTime{}; diff --git a/Jusin154_Team3D/Client/Public/Broom_Scoreboard.h b/Jusin154_Team3D/Client/Public/Broom_Scoreboard.h index c5a09781e..5f52f960b 100644 --- a/Jusin154_Team3D/Client/Public/Broom_Scoreboard.h +++ b/Jusin154_Team3D/Client/Public/Broom_Scoreboard.h @@ -44,7 +44,7 @@ class CBroom_Scoreboard final : public CElementObject CShader* m_pShaderCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; - _vector m_fColor[4]; + _float4 m_fColor[4]; _wstring Score[8]; _float2 m_fFontPosition[8]; diff --git a/Jusin154_Team3D/Client/Public/Broom_TargetGate.h b/Jusin154_Team3D/Client/Public/Broom_TargetGate.h index 612e91520..185077cc5 100644 --- a/Jusin154_Team3D/Client/Public/Broom_TargetGate.h +++ b/Jusin154_Team3D/Client/Public/Broom_TargetGate.h @@ -27,7 +27,7 @@ class CBroom_TargetGate final : public CGameObject virtual HRESULT Initialize(void* pArg) override; public: - void Set_TargetPosition(_vector TargetPos); + void Set_TargetPosition(_fvector TargetPos); private: void Visibie(); @@ -41,13 +41,13 @@ class CBroom_TargetGate final : public CGameObject _bool m_vActive = { false }; _wstring m_Distance; - _vector m_vFontPosition{}; + _float4 m_vFontPosition{}; - _vector m_vPlayerPos{}; - _vector m_vTargetPos{}; + _float4 m_vPlayerPos{}; + _float4 m_vTargetPos{}; _float m_fAlpha{}; - _vector m_vPosition{}; + _float4 m_vPosition{}; _float3 m_fSize{}; _float2 m_fViewPort{}; diff --git a/Jusin154_Team3D/Client/Public/Client_Enum.h b/Jusin154_Team3D/Client/Public/Client_Enum.h index defd41fdd..50b47ad6d 100644 --- a/Jusin154_Team3D/Client/Public/Client_Enum.h +++ b/Jusin154_Team3D/Client/Public/Client_Enum.h @@ -20,8 +20,9 @@ namespace Client SPELL_HEADER_LINE, SPELL_DRAG, CAMERA_LOCKON, LODING_SCREEN, ENEMY_HPBAR, BOSS_HPBAR, QUEST_BORDER, QUEST_INFO, QUEST_STATUS, BROOMSTICK, SPELL_LEARN, SPELLLEARNCOLOR, SPELLLEARNBOOSTER, NPCINTERACTION, CANVASFADE, - FLAGWAVE, BROOMCIRCLE, RIDE_INFO_KEY, RIDE_INFO, RIDE_HPSLOT, - ENEMY_DETECTION, INTERACTION_OBJECT, INTERACTION_NPC, BROOMTARGETGATE,END + FLAGWAVE, BROOMCIRCLE, RIDE_INFO_KEY, RIDE_INFO, RIDE_HPSLOT, BOOSTERGAUGE, + BOOSTERHPBAR, + ENEMY_DETECTION, INTERACTION_OBJECT, INTERACTION_NPC, BROOMTARGETGATE, END }; enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, UVALPHABLEND, MAGIC_METER, SPELL_LIST, EESSENTIAL_SPELL_SOLT, EESSENTIAL_SPELL, COLOR, SPELL_HOVER, SPELL_SLOT_EFFECT, SPELL_SLOT, SPELL_LOCK, QUEST_SLOT, END }; enum class SHADER_PASS_WORLDMODLE_INSTANCE {DEFAULT, LIGHT, BLOOM}; diff --git a/Jusin154_Team3D/Client/Public/Client_Struct.h b/Jusin154_Team3D/Client/Public/Client_Struct.h index 7a17c270d..13d20f4ff 100644 --- a/Jusin154_Team3D/Client/Public/Client_Struct.h +++ b/Jusin154_Team3D/Client/Public/Client_Struct.h @@ -84,7 +84,7 @@ namespace Client typedef struct tagDamageInfo { - _vector vTarget_Pos{}; + _float4 vTarget_Pos{}; _float fDamage{}; DAMAGE_TYPE eType = DAMAGE_TYPE::NOMAL; }DAMAGE_INFO; @@ -123,8 +123,8 @@ namespace Client _float fSpellSize{}; _float2 fStartPosition{}; _float2 fEndPosition{}; - vector<_vector> Booster; - vector<_vector> Lines; + vector<_float4> Booster; + vector<_float4> Lines; }SPELLLEARNINFO; typedef struct tagDialougeInfo diff --git a/Jusin154_Team3D/Client/Public/Damage_Font.h b/Jusin154_Team3D/Client/Public/Damage_Font.h index b1ac4786c..788ddf0c6 100644 --- a/Jusin154_Team3D/Client/Public/Damage_Font.h +++ b/Jusin154_Team3D/Client/Public/Damage_Font.h @@ -15,11 +15,11 @@ class CDamage_Font final : public CGameObject { typedef struct tagDamageFontInfo { - _vector vTarget_Pos{}; + _float4 vTarget_Pos{}; _wstring pDamage; _float fTime = 2.f; _float fAlpha = 1.f; - _vector vColor{}; + _float4 vColor{}; }DAMAGE_FONT_INFO; private: CDamage_Font(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); @@ -47,7 +47,7 @@ class CDamage_Font final : public CGameObject vector m_DamageInfos; - _vector m_vWhite_Color{}; + _float4 m_vWhite_Color{}; public: static CDamage_Font* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); diff --git a/Jusin154_Team3D/Client/Public/GamePlay_Canvas.h b/Jusin154_Team3D/Client/Public/GamePlay_Canvas.h index 5132b567a..beb46195c 100644 --- a/Jusin154_Team3D/Client/Public/GamePlay_Canvas.h +++ b/Jusin154_Team3D/Client/Public/GamePlay_Canvas.h @@ -41,6 +41,9 @@ class CGamePlay_Canvas final : public CCanvasObject CGameObject* m_pAction_Panel = { nullptr }; CGameObject* m_pEnemy_Panel = { nullptr }; CGameObject* m_pBroom_Panel = { nullptr }; + CGameObject* m_pRide_Panel = { nullptr }; + + _bool m_bRide = { false }; public: static CGamePlay_Canvas* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); diff --git a/Jusin154_Team3D/Client/Public/InfoInstance.h b/Jusin154_Team3D/Client/Public/InfoInstance.h index 8078105ed..db4f62a8f 100644 --- a/Jusin154_Team3D/Client/Public/InfoInstance.h +++ b/Jusin154_Team3D/Client/Public/InfoInstance.h @@ -36,8 +36,8 @@ DECLARE_SINGLETON(CInfoInstance) pair<_float3, _float3> Get_CameraCoordinateSystem(); _float Player_Damage(); void Set_Damage(_float fDamage); - void Set_PlayerPos(_vector Position); - _vector Get_PalyerPos(); + void Set_PlayerPos(_fvector Position); + _float4 Get_PalyerPos(); #pragma endregion #pragma region MONSTER_INFO HRESULT Regist_PlayerAlly(CUnit* pUnit); diff --git a/Jusin154_Team3D/Client/Public/NPCInteraction.h b/Jusin154_Team3D/Client/Public/NPCInteraction.h index 6a2955456..ab994681a 100644 --- a/Jusin154_Team3D/Client/Public/NPCInteraction.h +++ b/Jusin154_Team3D/Client/Public/NPCInteraction.h @@ -40,14 +40,14 @@ class CNPCInteraction final : public CGameObject CShader* m_pShaderCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; - _vector m_vFontPosition{}; - _vector m_vFontPosition1{}; + _float4 m_vFontPosition{}; + _float4 m_vFontPosition1{}; _float m_fAlpha{}; _wstring m_NpcName; - _vector m_vPosition{}; + _float4 m_vPosition{}; _float4 m_vUV{}; _float4 m_vNine_Slice{}; _float4 m_vImagePosi1{}; diff --git a/Jusin154_Team3D/Client/Public/Ride_BboosterBar.h b/Jusin154_Team3D/Client/Public/Ride_BboosterBar.h new file mode 100644 index 000000000..345927288 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Ride_BboosterBar.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 CRide_BboosterBar final : public CElementObject +{ +private: + CRide_BboosterBar(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CRide_BboosterBar(const CRide_BboosterBar& rhs); + virtual ~CRide_BboosterBar() = 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 Active(_float fTimeDelta); + void NonActive(_float fTimeDelta); + +private: + CTexture* m_pDiffuse_TextureCom = { nullptr }; + CTexture* m_pDiffuse_TextureCom1 = { nullptr }; + CTexture* m_pDiffuse_TextureCom2 = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + _float m_fBlinkTime{}; + _float m_fMaxGauge{}; + _float m_fCurrentGauge{}; + _float m_fGaugeBar{}; + _float m_fDamage{}; + _float m_fTargetGauge{}; + _float2 m_fGaugeBG{}; + _float2 m_fGaugeBGPos{}; + _float2 m_fGaugeBGSize{}; + + _int m_iClick{}; + +public: + static CRide_BboosterBar* 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/Ride_Bbooster_Slot.h b/Jusin154_Team3D/Client/Public/Ride_Bbooster_Slot.h new file mode 100644 index 000000000..2288ec2d2 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Ride_Bbooster_Slot.h @@ -0,0 +1,52 @@ +#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 CRide_Bbooster_Slot final : public CElementObject +{ +private: + CRide_Bbooster_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CRide_Bbooster_Slot(const CRide_Bbooster_Slot& rhs); + virtual ~CRide_Bbooster_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; + +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 }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + _float4 m_fImagePosi{}; +public: + static CRide_Bbooster_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/Ride_HpBar.h b/Jusin154_Team3D/Client/Public/Ride_HpBar.h new file mode 100644 index 000000000..e545b49f9 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Ride_HpBar.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 CRide_HpBar final : public CElementObject +{ +private: + CRide_HpBar(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CRide_HpBar(const CRide_HpBar& rhs); + virtual ~CRide_HpBar() = 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: + void Heal(_float fTimeDelta); + void Hit(_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_Rect* m_pVIBufferCom = { nullptr }; + + _float m_fBlinkTime{}; + _float m_fMaxHp{}; + _float m_fCurrentHp{}; + _float m_fHpBar{}; + _float m_fDamage{}; + _float m_fTargetHp{}; + _float2 m_fHpBG{}; + +public: + static CRide_HpBar* 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/Ride_HpSlot.h b/Jusin154_Team3D/Client/Public/Ride_HpSlot.h new file mode 100644 index 000000000..4f71cfaf5 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Ride_HpSlot.h @@ -0,0 +1,52 @@ +#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 CRide_HpSlot final : public CElementObject +{ +private: + CRide_HpSlot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CRide_HpSlot(const CRide_HpSlot& rhs); + virtual ~CRide_HpSlot() = 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 }; + CTexture* m_pDiffuse_TextureCom1 = { nullptr }; + CTexture* m_pDiffuse_TextureCom2 = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + _float4 m_fImagePosi{}; + +public: + static CRide_HpSlot* 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/Ride_Info.h b/Jusin154_Team3D/Client/Public/Ride_Info.h new file mode 100644 index 000000000..766340c9f --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Ride_Info.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 CRide_Info final : public CElementObject +{ +private: + CRide_Info(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CRide_Info(const CRide_Info& rhs); + virtual ~CRide_Info() = 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 Set_Posi(); + +public: + virtual void Set_Hover(_bool bVisible) 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 }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + _float4 m_vImagePosi1{}; + _float4 m_vImagePosi2{}; + _float4 m_vImagePosi3{}; + _float4 m_vImagePosi4{}; + +public: + static CRide_Info* 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/Ride_InfoBG.h b/Jusin154_Team3D/Client/Public/Ride_InfoBG.h new file mode 100644 index 000000000..9582328d3 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Ride_InfoBG.h @@ -0,0 +1,51 @@ +#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 CRide_InfoBG final : public CElementObject +{ +private: + CRide_InfoBG(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CRide_InfoBG(const CRide_InfoBG& rhs); + virtual ~CRide_InfoBG() = default; + +public: + virtual void Priority_Update(_float fTimeDelta); + virtual void Update(_float fTimeDelta); + virtual void Late_Update(_float fTimeDelta); + virtual HRESULT Render() override; + virtual _vector Get_WorldPostion() override; + +private: + virtual HRESULT Bind_ShaderResources() override; + virtual HRESULT Ready_Components(void* pArg) override; + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + +public: + virtual void Set_Hover(_bool bVisible) override; + +private: + CTexture* m_pDiffuse_TextureCom = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + +public: + static CRide_InfoBG* 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/Ride_Info_Key.h b/Jusin154_Team3D/Client/Public/Ride_Info_Key.h new file mode 100644 index 000000000..d142a5761 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Ride_Info_Key.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 CRide_Info_Key final : public CElementObject +{ +private: + CRide_Info_Key(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CRide_Info_Key(const CRide_Info_Key& rhs); + virtual ~CRide_Info_Key() = 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: + _float4 Compute_UV(_tchar Alphabet); + void Set_Posi(); + +private: + CTexture* m_pDiffuse_TextureCom = { nullptr }; + CTexture* m_pDiffuse_TextureCom1 = { nullptr }; + CTexture* m_pDiffuse_TextureCom2 = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + _float4 m_vUV{}; + _float4 m_vImagePosi1{}; + _float4 m_vImagePosi2{}; +public: + static CRide_Info_Key* 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/Ride_Panel.h b/Jusin154_Team3D/Client/Public/Ride_Panel.h new file mode 100644 index 000000000..523f1ac7a --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Ride_Panel.h @@ -0,0 +1,52 @@ +#pragma once + +#include "Client_Define.h" +#include "PanelObject.h" + +NS_BEGIN(Engine) +class CGameObject; +NS_END + +NS_BEGIN(Client) + +class CRide_Panel final : public CPanelObject +{ +private: + CRide_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CRide_Panel(const CRide_Panel& rhs); + virtual ~CRide_Panel() = default; + +public: + virtual void Priority_Update(_float fTimeDelta); + virtual void Update(_float fTimeDelta); + virtual void Late_Update(_float fTimeDelta); + virtual HRESULT Render() override; + virtual _vector Get_WorldPostion() override; + +private: + virtual HRESULT Bind_ShaderResources() override; + virtual HRESULT Ready_Components(void* pArg) override; + virtual HRESULT Ready_Element(void* pArg) override; + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + +private: + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + CGameObject* m_pRide_Info_Key = { nullptr }; + CGameObject* m_pRide_InfoBG = { nullptr }; + CGameObject* m_pRide_Info = { nullptr }; + CGameObject* m_pRide_Bbooster_Slot = { nullptr }; + CGameObject* m_pRide_BboosterBar = { nullptr }; + CGameObject* m_pRide_HpBar = { nullptr }; + CGameObject* m_pRide_HpSlot = { nullptr }; +public: + static CRide_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/SpellLearn.h b/Jusin154_Team3D/Client/Public/SpellLearn.h index 9f05f27b6..f45e9449e 100644 --- a/Jusin154_Team3D/Client/Public/SpellLearn.h +++ b/Jusin154_Team3D/Client/Public/SpellLearn.h @@ -63,7 +63,7 @@ class CSpellLearn final : public CElementObject _int m_iChaseiTrailIndex{}; vector<_float2> m_ChaseTrail; - vector<_vector> m_MoveLine; + vector<_float4> m_MoveLine; public: static CSpellLearn* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); diff --git a/Jusin154_Team3D/Client/Public/SpellLearn_ChaserPointer.h b/Jusin154_Team3D/Client/Public/SpellLearn_ChaserPointer.h index 985b4bb2d..d723fa635 100644 --- a/Jusin154_Team3D/Client/Public/SpellLearn_ChaserPointer.h +++ b/Jusin154_Team3D/Client/Public/SpellLearn_ChaserPointer.h @@ -50,7 +50,7 @@ class CSpellLearn_ChaserPointer final : public CElementObject _int m_iLineIndex{}; _int m_iCurrentLine{}; - vector<_vector> m_MoveLine; + vector<_float4> m_MoveLine; public: static CSpellLearn_ChaserPointer* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); diff --git a/Jusin154_Team3D/Client/Public/SpellLearn_LookPointer.h b/Jusin154_Team3D/Client/Public/SpellLearn_LookPointer.h index 34d128575..0392f37d0 100644 --- a/Jusin154_Team3D/Client/Public/SpellLearn_LookPointer.h +++ b/Jusin154_Team3D/Client/Public/SpellLearn_LookPointer.h @@ -44,7 +44,7 @@ class CSpellLearn_LookPointer final : public CElementObject _int m_iLineIndex{}; _int m_iCurrentLine{}; - vector<_vector> m_MoveLine; + vector<_float4> m_MoveLine; _float m_localX{}; _float m_localY{}; public: diff --git a/Jusin154_Team3D/Client/Public/SpellLearn_MovePointer.h b/Jusin154_Team3D/Client/Public/SpellLearn_MovePointer.h index b1ed7965d..45324a65e 100644 --- a/Jusin154_Team3D/Client/Public/SpellLearn_MovePointer.h +++ b/Jusin154_Team3D/Client/Public/SpellLearn_MovePointer.h @@ -62,8 +62,8 @@ class CSpellLearn_MovePointer final : public CElementObject _int m_iLineIndex{}; _int m_iCurrentLine{}; - vector<_vector> m_MoveLine; - vector<_vector> m_Boosters; + vector<_float4> m_MoveLine; + vector<_float4> m_Boosters; public: static CSpellLearn_MovePointer* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); diff --git a/Jusin154_Team3D/Client/Public/Spell_Drag.h b/Jusin154_Team3D/Client/Public/Spell_Drag.h index 5a7ee193f..38b188df0 100644 --- a/Jusin154_Team3D/Client/Public/Spell_Drag.h +++ b/Jusin154_Team3D/Client/Public/Spell_Drag.h @@ -48,8 +48,8 @@ class CSpell_Drag final : public CElementObject CShader* m_pShaderCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; - _vector m_vStart_MousePos{}; - _vector m_vMove_MousePos{}; + _float4 m_vStart_MousePos{}; + _float4 m_vMove_MousePos{}; _float4 m_vUV{}; _int m_iCurrent_Slot_Index{}; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl index bd54db0ff..d8b056495 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl @@ -2255,6 +2255,177 @@ PS_OUT PS_Ride_HpSlot(PS_IN In) return Out; } +PS_OUT PS_BoosterGauge(PS_IN In) +{ + PS_OUT Out = (PS_OUT) 0; + float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; + float4 Color = float4(1.f, 1.f, 1.f, 1.f); + float4 Color1 = float4(1.f, 1.f, 1.f, 1.f); + float2 uv = In.vTexcoord; + float2 CurrentPixelPosition = uv * g_fCurrent_Size; + float OriginLeft = g_fNine_Slice.x; + float OriginRight = g_fNine_Slice.y; + float OriginTop = g_fNine_Slice.z; + float OriginBottom = g_fNine_Slice.w; + + float CurrentLeft = OriginLeft; + float CurrentRight = g_fCurrent_Size.x - (g_fOrigin_Size.x - OriginRight); + float CurrentTop = OriginTop; + float CurrentBottom = g_fCurrent_Size.y - (g_fOrigin_Size.y - OriginBottom); + + float2 Finaluv = In.vTexcoord; + + if (CurrentPixelPosition.x < CurrentLeft) + { + Finaluv.x = CurrentPixelPosition.x / g_fOrigin_Size.x; + } + else if (CurrentPixelPosition.x > CurrentRight) + { + float dist = CurrentPixelPosition.x - CurrentRight; + Finaluv.x = (OriginRight + dist) / g_fOrigin_Size.x; + } + else + { + float scale = (CurrentPixelPosition.x - CurrentLeft) / (CurrentRight - CurrentLeft); + Finaluv.x = (OriginLeft / g_fOrigin_Size.x) + scale * ((OriginRight - OriginLeft) / g_fOrigin_Size.x); + } + + if (CurrentPixelPosition.y < CurrentTop) + { + Finaluv.y = CurrentPixelPosition.y / g_fOrigin_Size.y; + } + else if (CurrentPixelPosition.y > CurrentBottom) + { + float dist = CurrentPixelPosition.y - CurrentBottom; + Finaluv.y = (OriginBottom + dist) / g_fOrigin_Size.y; + } + else + { + float scale = (CurrentPixelPosition.y - CurrentTop) / (CurrentBottom - CurrentTop); + Finaluv.y = (OriginTop / g_fOrigin_Size.y) + scale * ((OriginBottom - OriginTop) / g_fOrigin_Size.y); + } + + float4 tex1 = g_Texture.Sample(ClampSampler, Finaluv); + if (g_iClick == 1) + { + tex1.rgb = float3(255.f, 255.f, 0.f) / 255.f; + float blink = abs(sin(g_fBlinkTime)); + tex1.a = saturate(tex1.a * blink); + } + else if (g_iClick == 0) + { + tex1.a = 0.f; + } + Color = tex1; + + float2 BGPos = g_Pos; + float2 BGSize = g_fImageSize; + float2 BGPixel = Finaluv * g_fOrigin_Size; + float2 localUV = (BGPixel - BGPos) / BGSize; + bool inside = all(localUV >= 0.0f && localUV <= 1.0f); + + float4 tex2 = g_Texture1.Sample(ClampSampler, localUV); + + if (inside) + Color = lerp(Color, tex2, tex2.a); + + float2 reversuv = In.vTexcoord; + + reversuv.x = 1.0f - localUV.x; + + float4 tex3 = g_Texture2.Sample(ClampSampler, localUV); + + if (reversuv.x >= g_fHp) + { + tex3.rgb *= float3(0.f, 0.f, 0.f); + } + else + { + tex3.rgb *= float3(1.f, 1.f, 0.f); + } + if (all(tex2.rgb >= float3(55.f / 255.f, 0.f / 255.f, 55.f / 255.f))) + Color = lerp(Color, tex3, tex3.a); + + Color.a *= Alpha; + Out.vColor = Color; + return Out; +} + +PS_OUT PS_BoosterHpBar(PS_IN In) +{ + PS_OUT Out = (PS_OUT) 0; + float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; + float4 Color = float4(1.f, 1.f, 1.f, 1.f); + float4 Color1 = float4(1.f, 1.f, 1.f, 1.f); + float2 uv = In.vTexcoord; + float2 CurrentPixelPosition = uv * g_fCurrent_Size; + float OriginLeft = g_fNine_Slice.x; + float OriginRight = g_fNine_Slice.y; + float OriginTop = g_fNine_Slice.z; + float OriginBottom = g_fNine_Slice.w; + + float CurrentLeft = OriginLeft; + float CurrentRight = g_fCurrent_Size.x - (g_fOrigin_Size.x - OriginRight); + float CurrentTop = OriginTop; + float CurrentBottom = g_fCurrent_Size.y - (g_fOrigin_Size.y - OriginBottom); + + float2 Finaluv = In.vTexcoord; + + if (CurrentPixelPosition.x < CurrentLeft) + { + Finaluv.x = CurrentPixelPosition.x / g_fOrigin_Size.x; + } + else if (CurrentPixelPosition.x > CurrentRight) + { + float dist = CurrentPixelPosition.x - CurrentRight; + Finaluv.x = (OriginRight + dist) / g_fOrigin_Size.x; + } + else + { + float scale = (CurrentPixelPosition.x - CurrentLeft) / (CurrentRight - CurrentLeft); + Finaluv.x = (OriginLeft / g_fOrigin_Size.x) + scale * ((OriginRight - OriginLeft) / g_fOrigin_Size.x); + } + + if (CurrentPixelPosition.y < CurrentTop) + { + Finaluv.y = CurrentPixelPosition.y / g_fOrigin_Size.y; + } + else if (CurrentPixelPosition.y > CurrentBottom) + { + float dist = CurrentPixelPosition.y - CurrentBottom; + Finaluv.y = (OriginBottom + dist) / g_fOrigin_Size.y; + } + else + { + float scale = (CurrentPixelPosition.y - CurrentTop) / (CurrentBottom - CurrentTop); + Finaluv.y = (OriginTop / g_fOrigin_Size.y) + scale * ((OriginBottom - OriginTop) / g_fOrigin_Size.y); + } + + float4 tex2 = g_Texture.Sample(ClampSampler, Finaluv); + Color = tex2; + + float2 reversuv = In.vTexcoord; + + reversuv.x = 1.0f - Finaluv.x; + + float4 tex3 = g_Texture1.Sample(ClampSampler, Finaluv); + + if (reversuv.x >= g_fHp) + { + tex3.rgb *= float3(0.f, 0.f, 0.f); + } + else + { + tex3.rgb *= float3(0.f, 1.f, 0.f); + } + if (all(tex2.rgb >= float3(55.f / 255.f, 0.f / 255.f, 55.f / 255.f))) + Color = lerp(Color, tex3, tex3.a); + + Color.a *= Alpha; + Out.vColor = Color; + return Out; +} + struct VS_IN3D { float3 vPosition : POSITION; @@ -2647,7 +2818,7 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Sptire_Sheet(); } - pass Key_Hold_Rotation// 9 + pass Key_Hold_Rotation // 9 { SetRasterizerState(RS_Default); SetDepthStencilState(DSS_Default, 0); @@ -2707,7 +2878,7 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Rotation(); } - pass Slot//15 + pass Slot //15 { SetRasterizerState(RS_Default); SetDepthStencilState(DSS_Default, 0); @@ -2755,7 +2926,7 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Magic_Icon(); } - pass RemapUV//20 + pass RemapUV //20 { SetRasterizerState(RS_Default); SetDepthStencilState(DSS_Default, 0); @@ -2805,7 +2976,7 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Spell_Preview(); } - pass Spell_Header//25 + pass Spell_Header //25 { SetRasterizerState(RS_Default); SetDepthStencilState(DSS_Default, 0); @@ -2855,7 +3026,7 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Loding_Screen(); } - pass Enemy_HpBer//30 + pass Enemy_HpBer //30 { SetRasterizerState(RS_Default); SetDepthStencilState(DSS_Default, 0); @@ -2905,7 +3076,7 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Quest_Status(); } - pass Broomstick//35 + pass Broomstick //35 { SetRasterizerState(RS_Nocull); SetDepthStencilState(DSS_Default, 0); @@ -2955,7 +3126,7 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_NPCInteraction(); } - pass CanvasFade//40 + pass CanvasFade //40 { SetRasterizerState(RS_Nocull); SetDepthStencilState(DSS_Default, 0); @@ -3005,7 +3176,7 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Ride_Info(); } - pass Ride_HpSlot//45 + pass Ride_HpSlot //45 { SetRasterizerState(RS_Nocull); SetDepthStencilState(DSS_Default, 0); @@ -3015,6 +3186,26 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Ride_HpSlot(); } + pass BoosterGauge + { + SetRasterizerState(RS_Nocull); + SetDepthStencilState(DSS_Default, 0); + SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_BoosterGauge(); + } + + pass BoosterHpBar + { + SetRasterizerState(RS_Nocull); + SetDepthStencilState(DSS_Default, 0); + SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_BoosterHpBar(); + } + pass Enemy_Detection { SetRasterizerState(RS_Nocull); @@ -3045,7 +3236,7 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Interaction_Npc(); } - pass BroomGateTarget//49 + pass BroomGateTarget //51 { SetRasterizerState(RS_Nocull); SetDepthStencilState(DSS_None, 0); diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Quest/Combine_the_stylized-removebg-preview.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Quest/Combine_the_stylized-removebg-preview.png deleted file mode 100644 index 77cb3273d..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Quest/Combine_the_stylized-removebg-preview.png and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters index e9f8aad21..31e426c8b 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters @@ -727,9 +727,6 @@ {906987cf-14ce-4676-8ca7-a68b6b2c29b6} - - {d26ffa70-5843-4e91-8a54-907abcc35a77} - {12d83369-3413-478f-920e-c3c0ddeabfe8} @@ -745,6 +742,9 @@ {c9d234fd-d9dc-4740-9e9e-32b986335ee7} + + {d26ffa70-5843-4e91-8a54-907abcc35a77} + diff --git a/Jusin154_Team3D/Editor/Private/Action_Panel.cpp b/Jusin154_Team3D/Editor/Private/Action_Panel.cpp index a1027340f..a69ba86c8 100644 --- a/Jusin154_Team3D/Editor/Private/Action_Panel.cpp +++ b/Jusin154_Team3D/Editor/Private/Action_Panel.cpp @@ -56,7 +56,7 @@ HRESULT CAction_Panel::Initialize(void* pArg) Magic_Meter_UV(); Magic_Meter_Visible(1, true); Magic_Meter_Visible(5, true); - Visible(false); + Visible(true); ElementAllVisible(true); return S_OK; } @@ -77,6 +77,31 @@ void CAction_Panel::Update(_float fTimeDelta) 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; + Visible(false); + } + } + Magic_Meter_Move(); __super::Update(fTimeDelta); diff --git a/Jusin154_Team3D/Editor/Private/GamePlay_Canvas.cpp b/Jusin154_Team3D/Editor/Private/GamePlay_Canvas.cpp index f6a3e43d5..aed21bd50 100644 --- a/Jusin154_Team3D/Editor/Private/GamePlay_Canvas.cpp +++ b/Jusin154_Team3D/Editor/Private/GamePlay_Canvas.cpp @@ -59,6 +59,24 @@ void CGamePlay_Canvas::Priority_Update(_float fTimeDelta) void CGamePlay_Canvas::Update(_float fTimeDelta) { + if (m_pGameInstance->Key_Down(DIK_B)) + { + m_bRide = !m_bRide; + + if (m_bRide == true) + { + static_cast(m_pRide_Panel)->Visible(true); + static_cast(m_pRide_Panel)->Set_FadeIn(); + static_cast(m_pAction_Panel)->Visible(false); + } + else + { + static_cast(m_pRide_Panel)->Set_FadeOut(); + static_cast(m_pAction_Panel)->Visible(true); + static_cast(m_pAction_Panel)->Set_FadeIn(); + } + + } __super::Update(fTimeDelta); } diff --git a/Jusin154_Team3D/Editor/Private/IMGUIUI.cpp b/Jusin154_Team3D/Editor/Private/IMGUIUI.cpp index c2a7be2fd..e0a41a2e9 100644 --- a/Jusin154_Team3D/Editor/Private/IMGUIUI.cpp +++ b/Jusin154_Team3D/Editor/Private/IMGUIUI.cpp @@ -143,8 +143,8 @@ void CIMGUIUI::Update(_float fTimeDelta) } if (m_pPanelObject != nullptr) { - m_fPanelPos.x = static_cast(m_pPanelObject)->Get_Current_Position().m128_f32[0]; - m_fPanelPos.y = static_cast(m_pPanelObject)->Get_Current_Position().m128_f32[1]; + m_fPanelPos.x = static_cast(m_pPanelObject)->Get_Current_Position().x; + m_fPanelPos.y = static_cast(m_pPanelObject)->Get_Current_Position().y; m_fPanelSize.x = static_cast(m_pPanelObject)->Get_Current_Size().x; m_fPanelSize.y = static_cast(m_pPanelObject)->Get_Current_Size().y; @@ -157,8 +157,8 @@ void CIMGUIUI::Update(_float fTimeDelta) if (m_pElementObject != nullptr) { - m_fPos.x = static_cast(m_pElementObject)->Get_Current_Position().m128_f32[0]; - m_fPos.y = static_cast(m_pElementObject)->Get_Current_Position().m128_f32[1]; + m_fPos.x = static_cast(m_pElementObject)->Get_Current_Position().x; + m_fPos.y = static_cast(m_pElementObject)->Get_Current_Position().y; m_fSize.x = static_cast(m_pElementObject)->Get_Current_Size().x; m_fSize.y = static_cast(m_pElementObject)->Get_Current_Size().y; @@ -180,8 +180,8 @@ void CIMGUIUI::Update(_float fTimeDelta) m_fBottom = static_cast(m_pElementObject)->Get_Nine_Slice_Bottom(); m_vLerpPosition = static_cast(m_pElementObject)->Get_Lerp_Pos(); - m_fLerpX = static_cast(m_pElementObject)->Get_Lerp_Pos().m128_f32[0]; - m_fLerpY = static_cast(m_pElementObject)->Get_Lerp_Pos().m128_f32[1]; + m_fLerpX = static_cast(m_pElementObject)->Get_Lerp_Pos().x; + m_fLerpY = static_cast(m_pElementObject)->Get_Lerp_Pos().y; m_fMoveSpeed = static_cast(m_pElementObject)->Get_Speed(); m_fAngle = static_cast(m_pElementObject)->Get_Angle(); m_iSpellType = static_cast(m_pElementObject)->Get_SkillType(); @@ -259,7 +259,7 @@ void CIMGUIUI::Update(_float fTimeDelta) static_cast(m_pPanelObject)->Set_FadeOut(); } GUI::Text("Origin Position : %.1f, %.1f", static_cast(m_pPanelObject)->Get_Origin_Position().x, static_cast(m_pPanelObject)->Get_Origin_Position().y); - GUI::Text("Current Position : %.1f, %.1f", static_cast(m_pPanelObject)->Get_Current_Position().m128_f32[0], static_cast(m_pPanelObject)->Get_Current_Position().m128_f32[1]); + GUI::Text("Current Position : %.1f, %.1f", static_cast(m_pPanelObject)->Get_Current_Position().x, static_cast(m_pPanelObject)->Get_Current_Position().y); GUI::Text("Origin Size : %.1f, %.1f", static_cast(m_pPanelObject)->Get_Origin_Size().x, static_cast(m_pPanelObject)->Get_Origin_Size().y); GUI::Text("Current Size : %.1f, %.1f", static_cast(m_pPanelObject)->Get_Current_Size().x, static_cast(m_pPanelObject)->Get_Current_Size().y); GUI::Text("PanelAlph : %.1f", m_fPanelAlpha); @@ -339,7 +339,7 @@ void CIMGUIUI::Update(_float fTimeDelta) static_cast(m_pElementObject)->Set_FadeOut(); } GUI::Text("Origin Position : %.1f, %.1f", static_cast(m_pElementObject)->Get_Origin_Position().x, static_cast(m_pElementObject)->Get_Origin_Position().y); - GUI::Text("Current Position : %.1f, %.1f", static_cast(m_pElementObject)->Get_Current_Position().m128_f32[0], static_cast(m_pElementObject)->Get_Current_Position().m128_f32[1]); + GUI::Text("Current Position : %.1f, %.1f", static_cast(m_pElementObject)->Get_Current_Position().x, static_cast(m_pElementObject)->Get_Current_Position().y); GUI::Text("Origin Size : %.1f, %.1f", static_cast(m_pElementObject)->Get_Origin_Size().x, static_cast(m_pElementObject)->Get_Origin_Size().y); GUI::Text("Current Size : %.1f, %.1f", static_cast(m_pElementObject)->Get_Current_Size().x, static_cast(m_pElementObject)->Get_Current_Size().y); GUI::Text("Alpha : %.1f", m_fAlpha); @@ -440,7 +440,7 @@ void CIMGUIUI::Update(_float fTimeDelta) } GUI::Text("Lerp"); - GUI::Text("Lerp Position : %.1f, %.1f", m_vLerpPosition.m128_f32[0], m_vLerpPosition.m128_f32[1]); + GUI::Text("Lerp Position : %.1f, %.1f", m_vLerpPosition.x, m_vLerpPosition.y); if (GUI::DragFloat("LerpX", &m_fLerpX, 0.1f, -1920.f, 1920.f)) { static_cast(m_pElementObject)->Lerp_PosX(m_fLerpX); diff --git a/Jusin154_Team3D/Editor/Private/Loding_Panel.cpp b/Jusin154_Team3D/Editor/Private/Loding_Panel.cpp index c05009ea6..02ee157ba 100644 --- a/Jusin154_Team3D/Editor/Private/Loding_Panel.cpp +++ b/Jusin154_Team3D/Editor/Private/Loding_Panel.cpp @@ -25,6 +25,7 @@ HRESULT CLoding_Panel::Initialize(void* pArg) Desc.fY = 540.f; Desc.fSizeX = g_iWinSizeX; Desc.fSizeY = g_iWinSizeY; + Desc.m_bowner = false; if (FAILED(__super::Initialize(&Desc))) { diff --git a/Jusin154_Team3D/Editor/Private/Ride_BboosterBar.cpp b/Jusin154_Team3D/Editor/Private/Ride_BboosterBar.cpp index 6805dd903..7e1c71227 100644 --- a/Jusin154_Team3D/Editor/Private/Ride_BboosterBar.cpp +++ b/Jusin154_Team3D/Editor/Private/Ride_BboosterBar.cpp @@ -3,28 +3,28 @@ #include "GameInstance.h" CRide_BboosterBar::CRide_BboosterBar(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) - :CElementObject(pDevice, pContext) + :CElementObject(pDevice, pContext) { } CRide_BboosterBar::CRide_BboosterBar(const CRide_BboosterBar& rhs) - :CElementObject(rhs) + :CElementObject(rhs) { } HRESULT CRide_BboosterBar::Initialize_Prototype() { - return S_OK; + return S_OK; } HRESULT CRide_BboosterBar::Initialize(void* pArg) { CUIObject::UIOBJECT_DESC Desc{}; - Desc.fX = 0.f; - Desc.fY = -140.f; - Desc.fSizeX = 1920.f; - Desc.fSizeY = 1080.f; + Desc.fX = -20.f; + Desc.fY = -180.f; + Desc.fSizeX = 144.f; + Desc.fSizeY = 50.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,12 +37,31 @@ HRESULT CRide_BboosterBar::Initialize(void* pArg) return E_FAIL; } - m_fTimeMult = 3.f; + m_fTimeMult = 10.f; m_fAlpha = 1.f; m_fAlphaTime = 10.f; + m_vNine_Slice = _float4(27.f, 125.f, m_fSizeY * 0.5f, m_fSizeY * 0.5f); + m_fMaxGauge = 100.f; + m_fCurrentGauge = m_fMaxGauge; + m_fTargetGauge = m_fMaxGauge; + m_fMoveSpeed = 5.f; + m_fGaugeBGSize = _float2(144.f, 24.f); + m_fGaugeBGPos = _float2(0.f, 13.f); + m_fGaugeBG = _float2(0, m_fSizeX); + SizeUpX(200.f); return S_OK; } +void CRide_BboosterBar::Active(_float fTimeDelta) +{ + m_fCurrentGauge = CMyTools::Lerp_f1D(m_fCurrentGauge, m_fTargetGauge, fTimeDelta * m_fMoveSpeed); +} + +void CRide_BboosterBar::NonActive(_float fTimeDelta) +{ + m_fCurrentGauge = CMyTools::Lerp_f1D(m_fTargetGauge, m_fCurrentGauge, fTimeDelta * m_fMoveSpeed); +} + void CRide_BboosterBar::Priority_Update(_float fTimeDelta) { if (!__super::Chack_Visible()) @@ -83,7 +102,50 @@ void CRide_BboosterBar::Update(_float fTimeDelta) } } - m_fTime += fTimeDelta * m_fTimeMult; + if (m_fCurrentGauge < 0.f) + m_fCurrentGauge = 0.f; + + + if (m_iClick == 1) + Active(fTimeDelta); + else + NonActive(fTimeDelta); + + m_fGaugeBar = m_fCurrentGauge / m_fMaxGauge; + + if (m_pGameInstance->Mouse_Pressing(DIM_LBUTTON)) + { + m_fTargetGauge -= fTimeDelta * m_fTimeMult; + m_iClick = 1; + } + else + { + m_iClick = 0; + } + + if (m_fTargetGauge <= 0.f) + m_fTargetGauge = 0.f; + if (m_fTargetGauge >= m_fMaxGauge) + m_fTargetGauge = m_fMaxGauge; + + if (m_iClick == 0) + { + m_fTargetGauge += fTimeDelta * m_fTimeMult; + } + + if (m_iClick == 1) + { + m_fBlinkTime += fTimeDelta; + if (m_fTime <= 1.f) + { + m_fTime += fTimeDelta; + } + } + else + { + m_fBlinkTime = 0.f; + m_fTime = 0.f; + } __super::Update(fTimeDelta); } @@ -105,7 +167,7 @@ HRESULT CRide_BboosterBar::Render() if (FAILED(Bind_ShaderResources())) { return E_FAIL; } - if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::DEFAULT)))) { + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::BOOSTERGAUGE)))) { return E_FAIL; } if (FAILED(m_pVIBufferCom->Bind_Resources())) { @@ -141,6 +203,14 @@ HRESULT CRide_BboosterBar::Bind_ShaderResources() { 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; @@ -149,6 +219,10 @@ HRESULT CRide_BboosterBar::Bind_ShaderResources() { return E_FAIL; } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fBlinkTime", &m_fBlinkTime, sizeof(_float)))) + { + return E_FAIL; + } if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float)))) { return E_FAIL; @@ -161,6 +235,38 @@ HRESULT CRide_BboosterBar::Bind_ShaderResources() { 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_fHp", &m_fGaugeBar, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fHpBG", &m_fGaugeBG, sizeof(_float2)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageSize", &m_fGaugeBGSize, sizeof(_float2)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_Pos", &m_fGaugeBGPos, sizeof(_float2)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_iClick", &m_iClick, sizeof(_int)))) + { + return E_FAIL; + } return S_OK; } @@ -170,7 +276,15 @@ HRESULT CRide_BboosterBar::Ready_Components(void* pArg) { return E_FAIL; } - if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_Finish"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_GlowBar"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_HpBarBG"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_HUD_HealthMeterFill"), reinterpret_cast(&m_pDiffuse_TextureCom2), nullptr))) { return E_FAIL; } @@ -212,6 +326,8 @@ void CRide_BboosterBar::Free() __super::Free(); SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pDiffuse_TextureCom1); + SAFE_RELEASE(m_pDiffuse_TextureCom2); SAFE_RELEASE(m_pShaderCom); SAFE_RELEASE(m_pVIBufferCom); } diff --git a/Jusin154_Team3D/Editor/Private/Ride_HpBar.cpp b/Jusin154_Team3D/Editor/Private/Ride_HpBar.cpp index 6f371f282..21a2c2741 100644 --- a/Jusin154_Team3D/Editor/Private/Ride_HpBar.cpp +++ b/Jusin154_Team3D/Editor/Private/Ride_HpBar.cpp @@ -21,10 +21,10 @@ HRESULT CRide_HpBar::Initialize(void* pArg) { CUIObject::UIOBJECT_DESC Desc{}; - Desc.fX = 170.f; - Desc.fY = -180.f; - Desc.fSizeX = 80.f; - Desc.fSizeY = 80.f; + Desc.fX = 60.f; + Desc.fY = -220.f; + Desc.fSizeX = 144.f; + Desc.fSizeY = 24.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,11 +37,15 @@ HRESULT CRide_HpBar::Initialize(void* pArg) return E_FAIL; } - m_fTimeMult = 3.f; + m_fTimeMult = 5.f; m_fAlpha = 1.f; - m_fAlphaTime = 3.f; - m_fAngle = XMConvertToRadians(-130.f); - m_fImagePosi = _float4(20.5f, 20.5f, 40.f, 40.f); + m_fAlphaTime = 1.f; + m_vNine_Slice = _float4(27.f, 125.f, m_fSizeY * 0.5f, m_fSizeY * 0.5f); + m_fMaxHp = 200.f; + m_fCurrentHp = m_fMaxHp; + m_fMoveSpeed = 5.f; + m_fHpBG = _float2(0, m_fSizeX); + SizeUpX(200.f); return S_OK; } @@ -85,7 +89,40 @@ void CRide_HpBar::Update(_float fTimeDelta) } } - m_fTime += fTimeDelta * m_fTimeMult; + if (m_fCurrentHp < 0.f) + m_fCurrentHp = 0.f; + if (m_fDamage < 0.f) + m_fDamage = 0.f; + m_fTargetHp = m_fMaxHp - m_fDamage; + + if (m_fTargetHp > m_fCurrentHp) + Heal(fTimeDelta); + else if (m_fTargetHp < m_fCurrentHp) + Hit(fTimeDelta); + m_fHpBar = m_fCurrentHp / m_fMaxHp; + + if (m_pGameInstance->Key_Down(DIK_3)) + { + m_fDamage += 20.f; + } + + if (m_pGameInstance->Key_Down(DIK_4)) + { + m_fDamage -= 21.f; + } + if (m_fHpBar <= 0.3f) + { + m_fBlinkTime += fTimeDelta * m_fTimeMult; + if (m_fTime <= 1.f) + { + m_fTime += fTimeDelta * m_fTimeMult; + } + } + else + { + m_fBlinkTime = 0.f; + m_fTime = 0.f; + } __super::Update(fTimeDelta); } @@ -107,7 +144,7 @@ HRESULT CRide_HpBar::Render() if (FAILED(Bind_ShaderResources())) { return E_FAIL; } - if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::RIDE_HPSLOT)))) { + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::BOOSTERHPBAR)))) { return E_FAIL; } if (FAILED(m_pVIBufferCom->Bind_Resources())) { @@ -125,6 +162,16 @@ _vector CRide_HpBar::Get_WorldPostion() return m_pTransformCom->Get_State(STATE::POSITION); } +void CRide_HpBar::Heal(_float fTimeDelta) +{ + m_fCurrentHp = CMyTools::Lerp_f1D(m_fTargetHp, m_fCurrentHp, fTimeDelta * m_fMoveSpeed); +} + +void CRide_HpBar::Hit(_float fTimeDelta) +{ + m_fCurrentHp = CMyTools::Lerp_f1D(m_fCurrentHp, m_fTargetHp, fTimeDelta * m_fMoveSpeed); +} + HRESULT CRide_HpBar::Bind_ShaderResources() { if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) @@ -147,11 +194,15 @@ HRESULT CRide_HpBar::Bind_ShaderResources() { return E_FAIL; } - if (FAILED(m_pDiffuse_TextureCom2->Bind_ShaderResource(m_pShaderCom, "g_Texture2", 0))) + if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) { return E_FAIL; } - if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) + if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fBlinkTime", &m_fBlinkTime, sizeof(_float)))) { return E_FAIL; } @@ -167,11 +218,11 @@ HRESULT CRide_HpBar::Bind_ShaderResources() { return E_FAIL; } - if (FAILED(m_pShaderCom->Bind_RawValue("g_fAngle", &m_fAngle, sizeof(_float)))) + if (FAILED(m_pShaderCom->Bind_RawValue("g_fNine_Slice", &m_vNine_Slice, sizeof(_float4)))) { return E_FAIL; } - if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageSipos1", &m_fImagePosi, sizeof(_float4)))) + if (FAILED(m_pShaderCom->Bind_RawValue("g_fOrigin_Size", &m_fOrigin_Size, sizeof(_float2)))) { return E_FAIL; } @@ -179,6 +230,14 @@ HRESULT CRide_HpBar::Bind_ShaderResources() { return E_FAIL; } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fHp", &m_fHpBar, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fHpBG", &m_fHpBG, sizeof(_float2)))) + { + return E_FAIL; + } return S_OK; } @@ -188,15 +247,11 @@ HRESULT CRide_HpBar::Ready_Components(void* pArg) { return E_FAIL; } - if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_ActionItemBack_4K"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_HpBarBG"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) { return E_FAIL; } - if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_ActionItemGoldleaf_4K"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr))) - { - return E_FAIL; - } - if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_BroomHUDIcon"), reinterpret_cast(&m_pDiffuse_TextureCom2), nullptr))) + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_HUD_HealthMeterFill"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr))) { return E_FAIL; } @@ -239,7 +294,6 @@ void CRide_HpBar::Free() SAFE_RELEASE(m_pDiffuse_TextureCom); SAFE_RELEASE(m_pDiffuse_TextureCom1); - SAFE_RELEASE(m_pDiffuse_TextureCom2); SAFE_RELEASE(m_pShaderCom); SAFE_RELEASE(m_pVIBufferCom); } diff --git a/Jusin154_Team3D/Editor/Private/Ride_Info.cpp b/Jusin154_Team3D/Editor/Private/Ride_Info.cpp index b0e20298a..2c5793d23 100644 --- a/Jusin154_Team3D/Editor/Private/Ride_Info.cpp +++ b/Jusin154_Team3D/Editor/Private/Ride_Info.cpp @@ -37,7 +37,7 @@ HRESULT CRide_Info::Initialize(void* pArg) return E_FAIL; } - m_fTimeMult = 3.f; + m_fTimeMult = 1.f; m_fAlpha = 1.f; m_fAlphaTime = 10.f; m_vNine_Slice = _float4(256.f, 500.f, 80.f, 150.f); @@ -45,6 +45,8 @@ HRESULT CRide_Info::Initialize(void* pArg) SizeUpY(400.f); MoveX(210); MoveY(20); + Set_Posi(); + m_bActive = false; return S_OK; } @@ -56,6 +58,14 @@ void CRide_Info::Set_Posi() m_vImagePosi4 = _float4(90.f, 192.5f, 32.f, 32.f); } +void CRide_Info::Set_Hover(_bool bVisible) +{ + Visible(bVisible); + m_bHover = true; + m_fTime = 0.f; + m_fAlpha = 1.f; +} + void CRide_Info::Priority_Update(_float fTimeDelta) { if (!__super::Chack_Visible()) @@ -93,11 +103,17 @@ void CRide_Info::Update(_float fTimeDelta) { m_bFadeOut = false; m_fAlpha = 0.f; + Visible(false); } } - Set_Posi(); - m_fTime += fTimeDelta * m_fTimeMult; + if (m_bHover == true) + m_fTime += fTimeDelta * m_fTimeMult; + + if (m_fTime >= 1.f) + { + Set_FadeOut(); + } __super::Update(fTimeDelta); } @@ -130,9 +146,9 @@ HRESULT CRide_Info::Render() } m_pGameInstance->Render_Text(TEXT("Font_size15"), TEXT("빗자루 컨트롤"), _float2(1480.f + m_fX, 585.f + m_fY), XMVectorSet((208.f / 255.f) * m_fAlpha, (177.f / 255.f) * m_fAlpha, (52.f / 255.f) * m_fAlpha, m_fAlpha)); - m_pGameInstance->Render_Text(TEXT("Font_size15"), TEXT("스피드 버스트"), _float2(1500.f + m_fX, 635.f + m_fY)); - m_pGameInstance->Render_Text(TEXT("Font_size15"), TEXT("(전환)비행 가속"), _float2(1490.f + m_fX, 700.f + m_fY)); - m_pGameInstance->Render_Text(TEXT("Font_size15"), TEXT("하강 / 상승"), _float2(1525.f + m_fX, 755.f + m_fY)); + m_pGameInstance->Render_Text(TEXT("Font_size15"), TEXT("스피드 버스트"), _float2(1500.f + m_fX, 635.f + m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha)); + m_pGameInstance->Render_Text(TEXT("Font_size15"), TEXT("(전환)비행 가속"), _float2(1490.f + m_fX, 700.f + m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha)); + m_pGameInstance->Render_Text(TEXT("Font_size15"), TEXT("하강 / 상승"), _float2(1525.f + m_fX, 755.f + m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha)); return S_OK; } @@ -294,6 +310,8 @@ void CRide_Info::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_pShaderCom); SAFE_RELEASE(m_pVIBufferCom); } diff --git a/Jusin154_Team3D/Editor/Private/Ride_InfoBG.cpp b/Jusin154_Team3D/Editor/Private/Ride_InfoBG.cpp index b6221fe71..75996d7bb 100644 --- a/Jusin154_Team3D/Editor/Private/Ride_InfoBG.cpp +++ b/Jusin154_Team3D/Editor/Private/Ride_InfoBG.cpp @@ -37,12 +37,20 @@ HRESULT CRide_InfoBG::Initialize(void* pArg) return E_FAIL; } - m_fTimeMult = 3.f; + m_fTimeMult = 0.6f; m_fAlpha = 1.f; m_fAlphaTime = 10.f; return S_OK; } +void CRide_InfoBG::Set_Hover(_bool bVisible) +{ + Visible(bVisible); + m_bHover = true; + m_fTime = 0.f; + m_fAlpha = 1.f; +} + void CRide_InfoBG::Priority_Update(_float fTimeDelta) { if (!__super::Chack_Visible()) @@ -80,10 +88,17 @@ void CRide_InfoBG::Update(_float fTimeDelta) { m_bFadeOut = false; m_fAlpha = 0.f; + Visible(false); } } - m_fTime += fTimeDelta * m_fTimeMult; + if (m_bHover == true) + m_fTime += fTimeDelta * m_fTimeMult; + + if (m_fTime >= 1.f) + { + Set_FadeOut(); + } __super::Update(fTimeDelta); } diff --git a/Jusin154_Team3D/Editor/Private/Ride_Panel.cpp b/Jusin154_Team3D/Editor/Private/Ride_Panel.cpp index f0244e20f..19e1d762e 100644 --- a/Jusin154_Team3D/Editor/Private/Ride_Panel.cpp +++ b/Jusin154_Team3D/Editor/Private/Ride_Panel.cpp @@ -50,8 +50,13 @@ HRESULT CRide_Panel::Initialize(void* pArg) } m_fCanvasAlpha = 1.f; - Visible(true); + m_fMoveSpeed = 100.f; + m_fAlphaTime = 3.f; + Visible(false); ElementAllVisible(true); + m_vLerp_Position = _float4(1750.f, m_fY, 0.f, 1.f); + static_cast(m_pRide_Info)->Visible(false); + static_cast(m_pRide_InfoBG)->Visible(false); return S_OK; } @@ -71,6 +76,54 @@ void CRide_Panel::Update(_float fTimeDelta) return; } + if (m_bFadeIn == true) + { + + if (m_bHover == true) + m_bHover = false; + + 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_bHover == false) + m_bHover = true; + + if (m_fAlpha >= 0.f) + m_fAlpha -= fTimeDelta; + + if (m_fAlpha <= 0.f) + { + m_bFadeOut = false; + m_fAlpha = 0.f; + Visible(false); + } + } + + if (m_bHover == true) + { + Start_Lerp(fTimeDelta); + } + else + { + Move(1650.f, -800.f); + } + + if (m_pGameInstance->Key_Down(DIK_Q)) + { + static_cast(m_pRide_Info)->Set_Hover(true); + static_cast(m_pRide_InfoBG)->Set_Hover(true); + } + __super::Update(fTimeDelta); } @@ -190,8 +243,6 @@ void CRide_Panel::Free() { __super::Free(); - SAFE_RELEASE(m_pDiffuse_TextureCom); - SAFE_RELEASE(m_pShaderCom); SAFE_RELEASE(m_pVIBufferCom); } diff --git a/Jusin154_Team3D/Editor/Private/SpellLearn_Data.cpp b/Jusin154_Team3D/Editor/Private/SpellLearn_Data.cpp index 2456abd27..6b947e721 100644 --- a/Jusin154_Team3D/Editor/Private/SpellLearn_Data.cpp +++ b/Jusin154_Team3D/Editor/Private/SpellLearn_Data.cpp @@ -63,7 +63,7 @@ HRESULT CSpellLearn_Data::Initialize(void* pArg) _float px{}, py{}; pPos->QueryFloatAttribute("x", &px); pPos->QueryFloatAttribute("y", &py); - Info.Booster.push_back(XMVectorSet(px, py, 0.f, 1.f)); + Info.Booster.push_back(_float4(px, py, 0.f, 1.f)); } // 다음 Position으로 이동 @@ -80,7 +80,7 @@ HRESULT CSpellLearn_Data::Initialize(void* pArg) _float px{}, py{}; pPos->QueryFloatAttribute("x", &px); pPos->QueryFloatAttribute("y", &py); - Info.Lines.push_back(XMVectorSet(px, py, 0.f, 1.f)); + Info.Lines.push_back(_float4(px, py, 0.f, 1.f)); } // 다음 Position으로 이동 diff --git a/Jusin154_Team3D/Editor/Private/SpellLearn_MovePointer.cpp b/Jusin154_Team3D/Editor/Private/SpellLearn_MovePointer.cpp index e87b2b30c..055480708 100644 --- a/Jusin154_Team3D/Editor/Private/SpellLearn_MovePointer.cpp +++ b/Jusin154_Team3D/Editor/Private/SpellLearn_MovePointer.cpp @@ -82,7 +82,7 @@ void CSpellLearn_MovePointer::Line(_float fTime, _float2 fMouse) if (m_iCurrentLine < m_iLineIndex - 1) { ++m_iCurrentLine; - m_fPerPosition = _float2(m_MoveLine[m_iCurrentLine - 1].m128_f32[0], m_MoveLine[m_iCurrentLine - 1].m128_f32[1]); + m_fPerPosition = _float2(m_MoveLine[m_iCurrentLine - 1].x, m_MoveLine[m_iCurrentLine - 1].y); } else { diff --git a/Jusin154_Team3D/Editor/Private/SpellLearn_Panel.cpp b/Jusin154_Team3D/Editor/Private/SpellLearn_Panel.cpp index be6ab523c..edef19630 100644 --- a/Jusin154_Team3D/Editor/Private/SpellLearn_Panel.cpp +++ b/Jusin154_Team3D/Editor/Private/SpellLearn_Panel.cpp @@ -55,8 +55,8 @@ HRESULT CSpellLearn_Panel::Initialize(void* pArg) for (size_t i = 0; i < m_pBooster.size(); ++i) { - static_cast(m_pBooster[i])->Move(Get_Learninfo(Index).Booster[i].m128_f32[0], - Get_Learninfo(Index).Booster[i].m128_f32[1]); + static_cast(m_pBooster[i])->Move(Get_Learninfo(Index).Booster[i].x, + Get_Learninfo(Index).Booster[i].y); } for (size_t i = 0; i < m_pBooster.size(); ++i) { @@ -86,8 +86,8 @@ void CSpellLearn_Panel::Set_Learn(_int Index) static_cast(m_pSpellLearn_Slot)->Set_SpellLearn(Index); for (size_t i = 0; i < m_pBooster.size(); ++i) { - static_cast(m_pBooster[i])->Move(Get_Learninfo(Index).Booster[i].m128_f32[0], - Get_Learninfo(Index).Booster[i].m128_f32[1]); + static_cast(m_pBooster[i])->Move(Get_Learninfo(Index).Booster[i].x, + Get_Learninfo(Index).Booster[i].y); static_cast(m_pBooster[i])->Reset(); } } diff --git a/Jusin154_Team3D/Editor/Public/Editor_Define.h b/Jusin154_Team3D/Editor/Public/Editor_Define.h index 78263bcfb..849b67ea0 100644 --- a/Jusin154_Team3D/Editor/Public/Editor_Define.h +++ b/Jusin154_Team3D/Editor/Public/Editor_Define.h @@ -38,7 +38,8 @@ namespace Editor SPELL_HEADER_LINE, SPELL_DRAG, CAMERA_LOCKON, LODING_SCREEN, ENEMY_HPBAR, BOSS_HPBAR, QUEST_BORDER, QUEST_INFO, QUEST_STATUS, BROOMSTICK, SPELL_LEARN, SPELLLEARNCOLOR, SPELLLEARNBOOSTER, NPCINTERACTION, CANVASFADE, - FLAGWAVE, BROOMCIRCLE, RIDE_INFO_KEY, RIDE_INFO, RIDE_HPSLOT, + FLAGWAVE, BROOMCIRCLE, RIDE_INFO_KEY, RIDE_INFO, RIDE_HPSLOT, BOOSTERGAUGE, + BOOSTERHPBAR, ENEMY_DETECTION, INTERACTION_OBJECT, INTERACTION_NPC, BROOMTARGETGATE, END }; enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, BLEND, BLEND_NOWORLD, BLOOM, BLOOM_NOWORLD, BLUR_NO_EMMISVE, BLUR_NO_WORLD_NO_EMISSIVE, WEIGHTBLEND_FOR_BLEND, DEPTH_STOP, WB_CULLING, SCREEN_FX , DISTORTION , NONPOS , NONPOS_BLUR, BLUR_MESH, BLUR_CULLING , BLUR_CULLING_NO_EMISSIVE, BLOOM_CULLING , DEFAULT_NONPOS , NONWB_NONPOS, DECAL, DECAL_WB, DECAL_BLUR, BLEND_CULLING, END}; diff --git a/Jusin154_Team3D/Editor/Public/GamePlay_Canvas.h b/Jusin154_Team3D/Editor/Public/GamePlay_Canvas.h index 038feb886..6db90f1fb 100644 --- a/Jusin154_Team3D/Editor/Public/GamePlay_Canvas.h +++ b/Jusin154_Team3D/Editor/Public/GamePlay_Canvas.h @@ -35,13 +35,15 @@ class CGamePlay_Canvas final : public CCanvasObject private: CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; - CGameObject* m_pMission_Panel = { nullptr }; - CGameObject* m_pMinimap_Panel = { nullptr }; - CGameObject* m_pLoading_Panel = { nullptr }; - CGameObject* m_pAction_Panel = { nullptr }; - CGameObject* m_pEnemy_Panel = { nullptr }; - CGameObject* m_pBroom_Panel = { nullptr }; - CGameObject* m_pRide_Panel = { nullptr }; + CGameObject* m_pMission_Panel = { nullptr }; + CGameObject* m_pMinimap_Panel = { nullptr }; + CGameObject* m_pLoading_Panel = { nullptr }; + CGameObject* m_pAction_Panel = { nullptr }; + CGameObject* m_pEnemy_Panel = { nullptr }; + CGameObject* m_pBroom_Panel = { nullptr }; + CGameObject* m_pRide_Panel = { nullptr }; + + _bool m_bRide = { false }; public: static CGamePlay_Canvas* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); diff --git a/Jusin154_Team3D/Editor/Public/HpBarBG.h b/Jusin154_Team3D/Editor/Public/HpBarBG.h index 63c7001c9..6dddefe85 100644 --- a/Jusin154_Team3D/Editor/Public/HpBarBG.h +++ b/Jusin154_Team3D/Editor/Public/HpBarBG.h @@ -24,6 +24,7 @@ class CHpBarBG final : public CElementObject void Heal(_float fTimeDelta); void Hit(_float fTimeDelta); virtual void SizeUpX(_float SizeX) override; + private: virtual HRESULT Bind_ShaderResources() override; virtual HRESULT Ready_Components(void* pArg) override; diff --git a/Jusin154_Team3D/Editor/Public/IMGUIUI.h b/Jusin154_Team3D/Editor/Public/IMGUIUI.h index d8a26a832..ed46b2ff2 100644 --- a/Jusin154_Team3D/Editor/Public/IMGUIUI.h +++ b/Jusin154_Team3D/Editor/Public/IMGUIUI.h @@ -52,7 +52,7 @@ class CIMGUIUI final : public CGameObject _int m_iSpellType{}; _int m_iSkillType{}; - _vector m_vLerpPosition{}; + _float4 m_vLerpPosition{}; _float m_fLerpX{}; _float m_fLerpY{}; _float m_fMoveSpeed{}; diff --git a/Jusin154_Team3D/Editor/Public/Ride_BboosterBar.h b/Jusin154_Team3D/Editor/Public/Ride_BboosterBar.h index 0e8e32ace..0e46616bd 100644 --- a/Jusin154_Team3D/Editor/Public/Ride_BboosterBar.h +++ b/Jusin154_Team3D/Editor/Public/Ride_BboosterBar.h @@ -25,11 +25,29 @@ class CRide_BboosterBar final : public CElementObject virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; +private: + void Active(_float fTimeDelta); + void NonActive(_float fTimeDelta); + private: CTexture* m_pDiffuse_TextureCom = { nullptr }; + CTexture* m_pDiffuse_TextureCom1 = { nullptr }; + CTexture* m_pDiffuse_TextureCom2 = { nullptr }; CShader* m_pShaderCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + _float m_fBlinkTime{}; + _float m_fMaxGauge{}; + _float m_fCurrentGauge{}; + _float m_fGaugeBar{}; + _float m_fDamage{}; + _float m_fTargetGauge{}; + _float2 m_fGaugeBG{}; + _float2 m_fGaugeBGPos{}; + _float2 m_fGaugeBGSize{}; + + _int m_iClick{}; + public: static CRide_BboosterBar* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Editor/Public/Ride_HpBar.h b/Jusin154_Team3D/Editor/Public/Ride_HpBar.h index adcc5dcef..dd46eed7f 100644 --- a/Jusin154_Team3D/Editor/Public/Ride_HpBar.h +++ b/Jusin154_Team3D/Editor/Public/Ride_HpBar.h @@ -19,6 +19,10 @@ class CRide_HpBar final : public CElementObject virtual HRESULT Render() override; virtual _vector Get_WorldPostion() override; +public: + void Heal(_float fTimeDelta); + void Hit(_float fTimeDelta); + private: virtual HRESULT Bind_ShaderResources() override; virtual HRESULT Ready_Components(void* pArg) override; @@ -28,11 +32,16 @@ class CRide_HpBar final : public CElementObject private: CTexture* m_pDiffuse_TextureCom = { nullptr }; CTexture* m_pDiffuse_TextureCom1 = { nullptr }; - CTexture* m_pDiffuse_TextureCom2 = { nullptr }; CShader* m_pShaderCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; - _float4 m_fImagePosi{}; + _float m_fBlinkTime{}; + _float m_fMaxHp{}; + _float m_fCurrentHp{}; + _float m_fHpBar{}; + _float m_fDamage{}; + _float m_fTargetHp{}; + _float2 m_fHpBG{}; public: static CRide_HpBar* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); diff --git a/Jusin154_Team3D/Editor/Public/Ride_Info.h b/Jusin154_Team3D/Editor/Public/Ride_Info.h index a1c020e74..94bc757c9 100644 --- a/Jusin154_Team3D/Editor/Public/Ride_Info.h +++ b/Jusin154_Team3D/Editor/Public/Ride_Info.h @@ -28,6 +28,9 @@ class CRide_Info final : public CElementObject private: void Set_Posi(); +public: + virtual void Set_Hover(_bool bVisible) override; + private: CTexture* m_pDiffuse_TextureCom = { nullptr }; CTexture* m_pDiffuse_TextureCom1 = { nullptr }; @@ -41,6 +44,7 @@ class CRide_Info final : public CElementObject _float4 m_vImagePosi2{}; _float4 m_vImagePosi3{}; _float4 m_vImagePosi4{}; + public: static CRide_Info* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Editor/Public/Ride_InfoBG.h b/Jusin154_Team3D/Editor/Public/Ride_InfoBG.h index 6cd7a5e98..4ee59f7aa 100644 --- a/Jusin154_Team3D/Editor/Public/Ride_InfoBG.h +++ b/Jusin154_Team3D/Editor/Public/Ride_InfoBG.h @@ -25,6 +25,9 @@ class CRide_InfoBG final : public CElementObject virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; +public: + virtual void Set_Hover(_bool bVisible) override; + private: CTexture* m_pDiffuse_TextureCom = { nullptr }; CShader* m_pShaderCom = { nullptr }; diff --git a/Jusin154_Team3D/Editor/Public/Ride_Panel.h b/Jusin154_Team3D/Editor/Public/Ride_Panel.h index 6bb34e0e5..c10b00c4f 100644 --- a/Jusin154_Team3D/Editor/Public/Ride_Panel.h +++ b/Jusin154_Team3D/Editor/Public/Ride_Panel.h @@ -27,8 +27,6 @@ class CRide_Panel final : public CPanelObject virtual HRESULT Initialize(void* pArg) override; private: - CTexture* m_pDiffuse_TextureCom = { nullptr }; - CShader* m_pShaderCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; CGameObject* m_pRide_Info_Key = { nullptr }; diff --git a/Jusin154_Team3D/Editor/Public/SpellLearn.h b/Jusin154_Team3D/Editor/Public/SpellLearn.h index 478448067..4dbc23168 100644 --- a/Jusin154_Team3D/Editor/Public/SpellLearn.h +++ b/Jusin154_Team3D/Editor/Public/SpellLearn.h @@ -55,7 +55,7 @@ class CSpellLearn final : public CElementObject _int m_iChaseiTrailIndex{}; vector<_float2> m_ChaseTrail; - vector<_vector> m_MoveLine; + vector<_float4> m_MoveLine; public: static CSpellLearn* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); diff --git a/Jusin154_Team3D/Editor/Public/SpellLearn_ChaserPointer.h b/Jusin154_Team3D/Editor/Public/SpellLearn_ChaserPointer.h index 319b5109d..b8be92d61 100644 --- a/Jusin154_Team3D/Editor/Public/SpellLearn_ChaserPointer.h +++ b/Jusin154_Team3D/Editor/Public/SpellLearn_ChaserPointer.h @@ -42,7 +42,7 @@ class CSpellLearn_ChaserPointer final : public CElementObject _int m_iLineIndex{}; _int m_iCurrentLine{}; - vector<_vector> m_MoveLine; + vector<_float4> m_MoveLine; public: static CSpellLearn_ChaserPointer* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); diff --git a/Jusin154_Team3D/Editor/Public/SpellLearn_LookPointer.h b/Jusin154_Team3D/Editor/Public/SpellLearn_LookPointer.h index ca0580012..620cb1a5a 100644 --- a/Jusin154_Team3D/Editor/Public/SpellLearn_LookPointer.h +++ b/Jusin154_Team3D/Editor/Public/SpellLearn_LookPointer.h @@ -38,7 +38,7 @@ class CSpellLearn_LookPointer final : public CElementObject _int m_iLineIndex{}; _int m_iCurrentLine{}; - vector<_vector> m_MoveLine; + vector<_float4> m_MoveLine; _float m_localX{}; _float m_localY{}; public: diff --git a/Jusin154_Team3D/Editor/Public/SpellLearn_MovePointer.h b/Jusin154_Team3D/Editor/Public/SpellLearn_MovePointer.h index 5a7c44978..05439c941 100644 --- a/Jusin154_Team3D/Editor/Public/SpellLearn_MovePointer.h +++ b/Jusin154_Team3D/Editor/Public/SpellLearn_MovePointer.h @@ -54,8 +54,8 @@ class CSpellLearn_MovePointer final : public CElementObject _int m_iLineIndex{}; _int m_iCurrentLine{}; - vector<_vector> m_MoveLine; - vector<_vector> m_Boosters; + vector<_float4> m_MoveLine; + vector<_float4> m_Boosters; public: static CSpellLearn_MovePointer* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Engine/Private/CanvasObject.cpp b/Jusin154_Team3D/Engine/Private/CanvasObject.cpp index 83167d6ee..3618a2d0d 100644 --- a/Jusin154_Team3D/Engine/Private/CanvasObject.cpp +++ b/Jusin154_Team3D/Engine/Private/CanvasObject.cpp @@ -43,7 +43,7 @@ void CCanvasObject::Update(_float fTimeDelta) m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(m_fX - m_fWinSizeX * 0.5f, -m_fY + m_fWinSizeY * 0.5f, 0.f, 1.f)); - m_fCurrent_Position = XMVectorSet(m_fX, m_fY, 0.f, 1.f); + m_fCurrent_Position = _float4(m_fX, m_fY, 0.f, 1.f); if (m_bFadeIn == true) { diff --git a/Jusin154_Team3D/Engine/Private/ElementObject.cpp b/Jusin154_Team3D/Engine/Private/ElementObject.cpp index 8fddae41e..f06ff23ee 100644 --- a/Jusin154_Team3D/Engine/Private/ElementObject.cpp +++ b/Jusin154_Team3D/Engine/Private/ElementObject.cpp @@ -56,8 +56,8 @@ void CElementObject::Update(_float fTimeDelta) long((m_fY + m_pOwner->Get_WorldPostion().m128_f32[1]) + m_fSizeY * 0.5f) }; - m_fCurrent_Position = XMVectorSet(m_fX, m_fY, 0.f, 1.f); - m_vLerp_Position = XMVectorSet(m_fLerpX, m_fLerpY, 0.f, 1.f); + m_fCurrent_Position = _float4(m_fX, m_fY, 0.f, 1.f); + m_vLerp_Position = _float4(m_fLerpX, m_fLerpY, 0.f, 1.f); } void CElementObject::Late_Update(_float fTimeDelta) @@ -71,6 +71,7 @@ HRESULT CElementObject::Render() _vector CElementObject::Get_WorldPostion() { + return m_pOwner->Get_WorldPostion(); } @@ -138,9 +139,9 @@ _float CElementObject::Get_Nine_Slice_Bottom() _bool CElementObject::Start_Lerp(_float fTimeDelta) { - _vector Pos = m_fCurrent_Position; + _vector Pos = XMLoadFloat4(&m_fCurrent_Position); - _vector Target = m_vLerp_Position; + _vector Target = XMLoadFloat4(&m_vLerp_Position); _vector Dir = XMVectorSubtract(Target, Pos); _vector LenVec = XMVector3Length(Dir); @@ -150,8 +151,8 @@ _bool CElementObject::Start_Lerp(_float fTimeDelta) if (Distance <= move) { - m_fX = m_vLerp_Position.m128_f32[0]; - m_fY = m_vLerp_Position.m128_f32[1]; + m_fX = m_vLerp_Position.x; + m_fY = m_vLerp_Position.y; return true; } @@ -167,8 +168,8 @@ _bool CElementObject::Start_Lerp(_float fTimeDelta) _bool CElementObject::Start_Lerp_Speed(_float fTimeDelta, _float2 MousePoint) { _vector Mouse = XMVectorSet(MousePoint.x, MousePoint.y, 1.f, 1.f); - _vector Pos = m_fCurrent_Position; - _vector Target = m_vLerp_Position; + _vector Pos = XMLoadFloat4(&m_fCurrent_Position); + _vector Target = XMLoadFloat4(&m_vLerp_Position); _vector Dir = XMVectorSubtract(Target, Pos); _vector MouseDir = XMVectorSubtract(Mouse, Pos); @@ -185,8 +186,8 @@ _bool CElementObject::Start_Lerp_Speed(_float fTimeDelta, _float2 MousePoint) if (Distance <= move) { - m_fX = m_vLerp_Position.m128_f32[0]; - m_fY = m_vLerp_Position.m128_f32[1]; + m_fX = m_vLerp_Position.x; + m_fY = m_vLerp_Position.y; return true; } @@ -206,7 +207,7 @@ _bool CElementObject::Set_Trgger() void CElementObject::Reset_Pos(_float fTimeDelta) { - _vector Pos = m_fCurrent_Position; + _vector Pos = XMLoadFloat4(&m_fCurrent_Position); _vector Target = XMVectorSet(m_fOrigin_Position.x, m_fOrigin_Position.y, 0.f, 0.f); @@ -239,7 +240,7 @@ void CElementObject::Reset_Size_Lerp(_float fTimeDelta) { } -_vector CElementObject::Get_Lerp_Pos() +_float4 CElementObject::Get_Lerp_Pos() { return m_vLerp_Position; } diff --git a/Jusin154_Team3D/Engine/Private/PanelObject.cpp b/Jusin154_Team3D/Engine/Private/PanelObject.cpp index df16b10e4..258e22c95 100644 --- a/Jusin154_Team3D/Engine/Private/PanelObject.cpp +++ b/Jusin154_Team3D/Engine/Private/PanelObject.cpp @@ -27,6 +27,16 @@ HRESULT CPanelObject::Initialize(void* pArg) { return E_FAIL; } + UIOBJECT_DESC* pDesc = static_cast(pArg); + if (pDesc->m_bowner == true) + { + m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet( + m_fX + m_pOwner->Get_WorldPostion().m128_f32[0], + m_fY + m_pOwner->Get_WorldPostion().m128_f32[1], + m_fSortZ, 1.f)); + + m_fCurrent_Position = _float4(m_fX, m_fY, 0.f, 1.f); + } m_fAlpha = 1.f; return S_OK; @@ -47,7 +57,7 @@ void CPanelObject::Update(_float fTimeDelta) m_fY + m_pOwner->Get_WorldPostion().m128_f32[1], m_fSortZ, 1.f)); - m_fCurrent_Position = XMVectorSet(m_fX, m_fY, 0.f, 1.f); + m_fCurrent_Position = _float4(m_fX, m_fY, 0.f, 1.f); m_fOwnerAlpha = static_cast(m_pOwner)->Get_Alpha(); @@ -152,6 +162,61 @@ void CPanelObject::Function_Callback(wstring Name, void* pArg) } } +_bool CPanelObject::Start_Lerp(_float fTimeDelta) +{ + _vector Pos = XMLoadFloat4(&m_fCurrent_Position); + + _vector Target = XMLoadFloat4(&m_vLerp_Position); + + _vector Dir = XMVectorSubtract(Target, Pos); + _vector LenVec = XMVector3Length(Dir); + _float Distance = XMVectorGetX(LenVec); + + _float move = m_fMoveSpeed * fTimeDelta; + + if (Distance <= move) + { + m_fX = m_vLerp_Position.x; + m_fY = m_vLerp_Position.y; + return true; + } + + else + { + XMVECTOR DirNorm = XMVector3Normalize(Dir); + m_fX = (Pos + DirNorm * move).m128_f32[0]; + m_fY = (Pos + DirNorm * move).m128_f32[1]; + return false; + } +} + +void CPanelObject::Reset_Pos(_float fTimeDelta) +{ + _vector Pos = XMLoadFloat4(&m_fCurrent_Position); + + _vector Target = XMVectorSet(m_fOrigin_Position.x, m_fOrigin_Position.y, 0.f, 0.f); + + _vector Dir = XMVectorSubtract(Target, Pos); + _vector LenVec = XMVector3Length(Dir); + _float Distance = XMVectorGetX(LenVec); + + _float move = m_fMoveSpeed * fTimeDelta; + + if (Distance <= move) + { + m_fX = m_fOrigin_Position.x; + m_fY = m_fOrigin_Position.y; + m_bLerpOff = false; + } + + else + { + XMVECTOR DirNorm = XMVector3Normalize(Dir); + m_fX = (Pos + DirNorm * move).m128_f32[0]; + m_fY = (Pos + DirNorm * move).m128_f32[1]; + } +} + void CPanelObject::Add_Element(wstring Name, CGameObject* pElement) { if (pElement == nullptr) diff --git a/Jusin154_Team3D/Engine/Private/UIObject.cpp b/Jusin154_Team3D/Engine/Private/UIObject.cpp index f7a2f40b1..ebb28b9da 100644 --- a/Jusin154_Team3D/Engine/Private/UIObject.cpp +++ b/Jusin154_Team3D/Engine/Private/UIObject.cpp @@ -45,8 +45,6 @@ HRESULT CUIObject::Initialize(void* pArg) m_fOrigin_Position = _float2(pDesc->fX, pDesc->fY); - m_fOrigin_Position_vector = XMVectorSet(m_fOrigin_Position.x, m_fOrigin_Position.y, 0.f, 1.f); - m_fWinSizeX = ViewportDesc.Width; m_fWinSizeY = ViewportDesc.Height; @@ -347,7 +345,7 @@ _float2 CUIObject::Get_Origin_Position() return m_fOrigin_Position; } -_vector CUIObject::Get_Current_Position() +_float4 CUIObject::Get_Current_Position() { return m_fCurrent_Position; } @@ -394,7 +392,7 @@ void CUIObject::Reset_Size_Lerp(_float fTimeDelta) { } -_vector CUIObject::Get_Lerp_Pos() +_float4 CUIObject::Get_Lerp_Pos() { return m_vLerp_Position; } diff --git a/Jusin154_Team3D/Engine/Public/ElementObject.h b/Jusin154_Team3D/Engine/Public/ElementObject.h index 363435267..3e4d70450 100644 --- a/Jusin154_Team3D/Engine/Public/ElementObject.h +++ b/Jusin154_Team3D/Engine/Public/ElementObject.h @@ -36,7 +36,7 @@ class ENGINE_DLL CElementObject abstract : public CUIObject virtual void Reset_Pos(_float fTimeDelta)override; virtual void Start_Size_Lerp(_float fTimeDelta) override; virtual void Reset_Size_Lerp(_float fTimeDelta) override; - virtual _vector Get_Lerp_Pos() override; + virtual _float4 Get_Lerp_Pos() override; protected: virtual HRESULT Initialize_Prototype(); @@ -45,7 +45,7 @@ class ENGINE_DLL CElementObject abstract : public CUIObject _float m_fBezierTime = 0; - vector<_vector> m_vector; + vector<_float4> m_vector; public: diff --git a/Jusin154_Team3D/Engine/Public/PanelObject.h b/Jusin154_Team3D/Engine/Public/PanelObject.h index 9e790d547..d1b1aefc1 100644 --- a/Jusin154_Team3D/Engine/Public/PanelObject.h +++ b/Jusin154_Team3D/Engine/Public/PanelObject.h @@ -34,6 +34,9 @@ class ENGINE_DLL CPanelObject abstract : public CUIObject virtual void Add_Function(wstring Name, function Evnet) override; virtual void Function_Callback(wstring Name, void* pArg = nullptr) override; + virtual _bool Start_Lerp(_float fTimeDelta) override; + virtual void Reset_Pos(_float fTimeDelta)override; + protected: virtual void Add_Element(wstring Name, class CGameObject* pElement); virtual _bool Chack_Visible() override; diff --git a/Jusin154_Team3D/Engine/Public/UIObject.h b/Jusin154_Team3D/Engine/Public/UIObject.h index 019f8e113..56a728363 100644 --- a/Jusin154_Team3D/Engine/Public/UIObject.h +++ b/Jusin154_Team3D/Engine/Public/UIObject.h @@ -15,6 +15,7 @@ typedef struct tagUIObjectDesc { _float fX, fY = {}; _float fSizeX, fSizeY = {}; + _bool m_bowner = true; }UIOBJECT_DESC; typedef struct tagSpellInfo @@ -83,8 +84,8 @@ typedef struct tagSpellLearnInfo _float fSpellSize{}; _float2 fStartPosition{}; _float2 fEndPosition{}; - vector<_vector> Booster; - vector<_vector> Lines; + vector<_float4> Booster; + vector<_float4> Lines; }SPELLLEARNINFO; protected: @@ -149,7 +150,7 @@ typedef struct tagSpellLearnInfo virtual _float Get_Nine_Slice_Bottom(); virtual _float2 Get_Origin_Position(); // Start Position - virtual _vector Get_Current_Position(); // Current Position + virtual _float4 Get_Current_Position(); // Current Position virtual _float3 Get_Origin_Size(); // Start Size virtual _float3 Get_Current_Size(); // Current Size @@ -160,7 +161,7 @@ typedef struct tagSpellLearnInfo virtual void Reset_Pos(_float fTimeDelta); virtual void Start_Size_Lerp(_float fTimeDelta); virtual void Reset_Size_Lerp(_float fTimeDelta); - virtual _vector Get_Lerp_Pos(); + virtual _float4 Get_Lerp_Pos(); virtual void LerpOn(); virtual void LerpOff(); virtual _bool Get_LerpOn(); @@ -195,11 +196,11 @@ typedef struct tagSpellLearnInfo virtual void Set_FontY(_float fFontY); virtual _float2 Get_Font(); virtual _float2 Get_PerPosition(); + protected: - _vector m_fOrigin_Position_vector{}; _float2 m_fOrigin_Position{}; - _vector m_fCurrent_Position{}; - _vector m_vLerp_Position{}; + _float4 m_fCurrent_Position{}; + _float4 m_vLerp_Position{}; _float m_fLerpX{}; _float m_fLerpY{}; _float3 m_fOrigin_Size{};