[Modify] _vector _float4로 수정
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -193,6 +193,14 @@ call Update_Resources.bat
|
||||
<ClInclude Include="..\Public\Player_ENUM.h" />
|
||||
<ClInclude Include="..\Public\Ranrok_Pulse.h" />
|
||||
<ClInclude Include="..\Public\ReparoObject.h" />
|
||||
<ClInclude Include="..\Public\Ride_BboosterBar.h" />
|
||||
<ClInclude Include="..\Public\Ride_Bbooster_Slot.h" />
|
||||
<ClInclude Include="..\Public\Ride_HpBar.h" />
|
||||
<ClInclude Include="..\Public\Ride_HpSlot.h" />
|
||||
<ClInclude Include="..\Public\Ride_Info.h" />
|
||||
<ClInclude Include="..\Public\Ride_InfoBG.h" />
|
||||
<ClInclude Include="..\Public\Ride_Info_Key.h" />
|
||||
<ClInclude Include="..\Public\Ride_Panel.h" />
|
||||
<ClInclude Include="..\Public\State_Dash.h" />
|
||||
<ClInclude Include="..\Public\State_Fall.h" />
|
||||
<ClInclude Include="..\Public\State_FireBall.h" />
|
||||
@@ -455,6 +463,14 @@ call Update_Resources.bat
|
||||
<ClCompile Include="..\Private\PlayerRobe.cpp" />
|
||||
<ClCompile Include="..\Private\Ranrok_Pulse.cpp" />
|
||||
<ClCompile Include="..\Private\ReparoObject.cpp" />
|
||||
<ClCompile Include="..\Private\Ride_BboosterBar.cpp" />
|
||||
<ClCompile Include="..\Private\Ride_Bbooster_Slot.cpp" />
|
||||
<ClCompile Include="..\Private\Ride_HpBar.cpp" />
|
||||
<ClCompile Include="..\Private\Ride_HpSlot.cpp" />
|
||||
<ClCompile Include="..\Private\Ride_Info.cpp" />
|
||||
<ClCompile Include="..\Private\Ride_InfoBG.cpp" />
|
||||
<ClCompile Include="..\Private\Ride_Info_Key.cpp" />
|
||||
<ClCompile Include="..\Private\Ride_Panel.cpp" />
|
||||
<ClCompile Include="..\Private\State_Dash.cpp" />
|
||||
<ClCompile Include="..\Private\State_Fall.cpp" />
|
||||
<ClCompile Include="..\Private\State_Slash.cpp" />
|
||||
|
||||
@@ -806,6 +806,30 @@
|
||||
<ClInclude Include="..\Public\Ranrok_Charge.h">
|
||||
<Filter>02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Charge</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Ride_Bbooster_Slot.h">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_Bbooster_Slot</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Ride_BboosterBar.h">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_BboosterBar</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Ride_HpBar.h">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_HpBar</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Ride_HpSlot.h">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_HpSlot</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Ride_Info.h">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_Info</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Ride_Info_Key.h">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_Info_Key</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Ride_InfoBG.h">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_InfoBG</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Ride_Panel.h">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Ride_Panel</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Client.ico">
|
||||
@@ -1677,6 +1701,30 @@
|
||||
<Filter Include="02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Charge">
|
||||
<UniqueIdentifier>{fd036f05-4c10-4322-b0c2-aac65e7011a1}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\GamePlay_Canvas\Ride_Panel">
|
||||
<UniqueIdentifier>{5bf233fa-6f9c-40d5-85c6-adbc7fcf7d28}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_Bbooster_Slot">
|
||||
<UniqueIdentifier>{9c357e12-18b3-461e-b74c-76f85280796f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_BboosterBar">
|
||||
<UniqueIdentifier>{8b69e309-b90b-47f6-8f2d-3dd778b468fe}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_HpBar">
|
||||
<UniqueIdentifier>{d3ad8db7-ff00-498d-ba50-aa4c38a56d4a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_HpSlot">
|
||||
<UniqueIdentifier>{721edad8-8be2-4e4c-9730-1c1cf8655880}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_Info_Key">
|
||||
<UniqueIdentifier>{76eaa3a8-b4ba-4530-9369-61666e660e16}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_InfoBG">
|
||||
<UniqueIdentifier>{99c0bf2f-3686-4171-b23d-2c0bdf3c6d9f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_Info">
|
||||
<UniqueIdentifier>{7876ff7e-f456-49ce-8fd6-766116613ff4}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Client.cpp">
|
||||
@@ -2430,6 +2478,30 @@
|
||||
<ClCompile Include="..\Private\Ranrok_Charge.cpp">
|
||||
<Filter>02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Charge</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Ride_Bbooster_Slot.cpp">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_Bbooster_Slot</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Ride_BboosterBar.cpp">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_BboosterBar</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Ride_HpBar.cpp">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_HpBar</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Ride_HpSlot.cpp">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_HpSlot</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Ride_Info.cpp">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_Info</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Ride_Info_Key.cpp">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_Info_Key</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Ride_InfoBG.cpp">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Ride_Panel\Ride_InfoBG</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Ride_Panel.cpp">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Ride_Panel</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\Private\Goblin_States.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);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -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("최고 기록");
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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<CUIObject*>(m_pRide_Panel)->Visible(true);
|
||||
static_cast<CUIObject*>(m_pRide_Panel)->Set_FadeIn();
|
||||
static_cast<CUIObject*>(m_pAction_Panel)->Visible(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
static_cast<CUIObject*>(m_pRide_Panel)->Set_FadeOut();
|
||||
static_cast<CUIObject*>(m_pAction_Panel)->Visible(true);
|
||||
static_cast<CUIObject*>(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<CRide_Panel>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CRide_Panel**>(&m_pRide_Panel))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Panel(TEXT("Ride_Panel"), m_pRide_Panel);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -299,7 +299,7 @@ void CGoblin::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
if (m_pFSM->IsEnable(FSMSTATE::BLINK)) {
|
||||
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<ON_COLLISION_INFO*>(pDesc);
|
||||
|
||||
@@ -355,7 +355,7 @@ void CGoblin_Assassin::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
if (m_pFSM->IsEnable(FSMSTATE::BLINK)) {
|
||||
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<ON_COLLISION_INFO*>(pDesc);
|
||||
|
||||
@@ -290,7 +290,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<ON_COLLISION_INFO*>(pDesc);
|
||||
|
||||
Check_HitAngle(XMLoadFloat4(&CollisionDesc->vHitDir));
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
@@ -707,10 +716,10 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
));
|
||||
}
|
||||
{ /* SUB_HogsHead */
|
||||
/*jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/SUB_HogsHead/SUB_HogsHead_EXTLOD/ProxyAssets",
|
||||
".bin", false
|
||||
));*/
|
||||
));
|
||||
/* SUB_PippensPotions */
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/SUB_PippensPotions/SUB_Pippens_EXTLOD/ProxyAssets",
|
||||
@@ -2713,6 +2722,47 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* For.Prototype_GameObject_SpellLearn_Ride_Panel*/
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CRide_Panel>(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<CRide_Info_Key>(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<CRide_Info>(g_iStaticLevel, CRide_Info::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
/* For.Prototype_GameObject_SpellLearn_Ride_InfoBG*/
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CRide_InfoBG>(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<CRide_Bbooster_Slot>(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<CRide_BboosterBar>(g_iStaticLevel, CRide_BboosterBar::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
/* For.Prototype_GameObject_SpellLearn_Ride_HpSlot*/
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CRide_HpSlot>(g_iStaticLevel, CRide_HpSlot::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
/* For.Prototype_GameObject_SpellLearn_Ride_HpBar*/
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CRide_HpBar>(g_iStaticLevel, CRide_HpBar::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* For.Prototype_GameObject_Interaction_Key*/
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CInteraction_Key>(g_iStaticLevel, CInteraction_Key::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_GlowBar"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_HpBarBG"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom1), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_HUD_HealthMeterFill"), reinterpret_cast<CComponent**>(&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
|
||||
@@ -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<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_ActionItemBack_4K"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_ActionItemGoldleaf_4K"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom1), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_BroomHUDIcon"), reinterpret_cast<CComponent**>(&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
|
||||
@@ -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<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_HpBarBG"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_HUD_HealthMeterFill"), reinterpret_cast<CComponent**>(&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
|
||||
@@ -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<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_ActionItemBack_4K"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_ActionItemGoldleaf_4K"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom1), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_CreatureHappiness_Positive"), reinterpret_cast<CComponent**>(&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
|
||||
@@ -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<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_MissionBanner_BorderOrnament_Left"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_Mouse_LeftClick"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom1), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_Keyboard_Shift"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom2), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_Keyboard_Control"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom3), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_Keyboard_Space"), reinterpret_cast<CComponent**>(&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
|
||||
@@ -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<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_DropShadow"), reinterpret_cast<CComponent**>(&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
|
||||
@@ -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<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_MissionBanner_DpadOrnament"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_Atlas_Keyboard"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom1), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_BroomHUDIcon"), reinterpret_cast<CComponent**>(&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
|
||||
@@ -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<CUIObject*>(m_pRide_Info)->Visible(false);
|
||||
static_cast<CUIObject*>(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<CUIObject*>(m_pRide_Info)->Set_Hover(true);
|
||||
static_cast<CUIObject*>(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<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CRide_Panel::Ready_Element(void* pArg)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRide_InfoBG>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CRide_InfoBG**>(&m_pRide_InfoBG))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Ride_InfoBG"), m_pRide_InfoBG);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRide_Info_Key>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CRide_Info_Key**>(&m_pRide_Info_Key))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Ride_Info_Key"), m_pRide_Info_Key);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRide_Info>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CRide_Info**>(&m_pRide_Info))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Ride_Info"), m_pRide_Info);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRide_Bbooster_Slot>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CRide_Bbooster_Slot**>(&m_pRide_Bbooster_Slot))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Ride_Bbooster_Slot"), m_pRide_Bbooster_Slot);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRide_BboosterBar>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CRide_BboosterBar**>(&m_pRide_BboosterBar))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Ride_BboosterBar"), m_pRide_BboosterBar);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRide_HpBar>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CRide_HpBar**>(&m_pRide_HpBar))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Ride_HpBar"), m_pRide_HpBar);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRide_HpSlot>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CRide_HpSlot**>(&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
|
||||
@@ -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으로 이동
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -57,8 +57,8 @@ HRESULT CSpellLearn_Panel::Initialize(void* pArg)
|
||||
|
||||
for (size_t i = 0; i < m_pBooster.size(); ++i)
|
||||
{
|
||||
static_cast<CSpellLearn_Booster*>(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<CSpellLearn_Booster*>(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<CSpellLearn_Booster*>(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<CSpellLearn_Booster*>(m_pBooster[i])->Reset();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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<ON_COLLISION_INFO*>(pDesc);
|
||||
|
||||
|
||||
@@ -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 };
|
||||
|
||||
|
||||
@@ -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{};
|
||||
|
||||
|
||||
@@ -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];
|
||||
|
||||
|
||||
@@ -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{};
|
||||
|
||||
@@ -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};
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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<DAMAGE_FONT_INFO> m_DamageInfos;
|
||||
|
||||
_vector m_vWhite_Color{};
|
||||
_float4 m_vWhite_Color{};
|
||||
|
||||
public:
|
||||
static CDamage_Font* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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{};
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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{};
|
||||
|
||||
@@ -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);
|
||||
|
||||
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 523 KiB |
@@ -727,9 +727,6 @@
|
||||
<Filter Include="50.UI\GamePlay_Canvas\Ride_Panel\Ride_Bbooster_Slot">
|
||||
<UniqueIdentifier>{906987cf-14ce-4676-8ca7-a68b6b2c29b6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="50.UI\GamePlay_Canvas\Ride_Panel\Ride_HpBar">
|
||||
<UniqueIdentifier>{d26ffa70-5843-4e91-8a54-907abcc35a77}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="50.UI\GamePlay_Canvas\Ride_Panel\Ride_BboosterBar">
|
||||
<UniqueIdentifier>{12d83369-3413-478f-920e-c3c0ddeabfe8}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@@ -745,6 +742,9 @@
|
||||
<Filter Include="02.GameObjects\Layer_Effect\Effect\Monster_Effect\Ranrok\Charge">
|
||||
<UniqueIdentifier>{c9d234fd-d9dc-4740-9e9e-32b986335ee7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="50.UI\GamePlay_Canvas\Ride_Panel\Ride_HpBar">
|
||||
<UniqueIdentifier>{d26ffa70-5843-4e91-8a54-907abcc35a77}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Editor.h">
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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<CUIObject*>(m_pRide_Panel)->Visible(true);
|
||||
static_cast<CUIObject*>(m_pRide_Panel)->Set_FadeIn();
|
||||
static_cast<CUIObject*>(m_pAction_Panel)->Visible(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
static_cast<CUIObject*>(m_pRide_Panel)->Set_FadeOut();
|
||||
static_cast<CUIObject*>(m_pAction_Panel)->Visible(true);
|
||||
static_cast<CUIObject*>(m_pAction_Panel)->Set_FadeIn();
|
||||
}
|
||||
|
||||
}
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
|
||||
@@ -143,8 +143,8 @@ void CIMGUIUI::Update(_float fTimeDelta)
|
||||
}
|
||||
if (m_pPanelObject != nullptr)
|
||||
{
|
||||
m_fPanelPos.x = static_cast<CPanelObject*>(m_pPanelObject)->Get_Current_Position().m128_f32[0];
|
||||
m_fPanelPos.y = static_cast<CPanelObject*>(m_pPanelObject)->Get_Current_Position().m128_f32[1];
|
||||
m_fPanelPos.x = static_cast<CPanelObject*>(m_pPanelObject)->Get_Current_Position().x;
|
||||
m_fPanelPos.y = static_cast<CPanelObject*>(m_pPanelObject)->Get_Current_Position().y;
|
||||
|
||||
m_fPanelSize.x = static_cast<CPanelObject*>(m_pPanelObject)->Get_Current_Size().x;
|
||||
m_fPanelSize.y = static_cast<CPanelObject*>(m_pPanelObject)->Get_Current_Size().y;
|
||||
@@ -157,8 +157,8 @@ void CIMGUIUI::Update(_float fTimeDelta)
|
||||
|
||||
if (m_pElementObject != nullptr)
|
||||
{
|
||||
m_fPos.x = static_cast<CElementObject*>(m_pElementObject)->Get_Current_Position().m128_f32[0];
|
||||
m_fPos.y = static_cast<CElementObject*>(m_pElementObject)->Get_Current_Position().m128_f32[1];
|
||||
m_fPos.x = static_cast<CElementObject*>(m_pElementObject)->Get_Current_Position().x;
|
||||
m_fPos.y = static_cast<CElementObject*>(m_pElementObject)->Get_Current_Position().y;
|
||||
|
||||
m_fSize.x = static_cast<CElementObject*>(m_pElementObject)->Get_Current_Size().x;
|
||||
m_fSize.y = static_cast<CElementObject*>(m_pElementObject)->Get_Current_Size().y;
|
||||
@@ -180,8 +180,8 @@ void CIMGUIUI::Update(_float fTimeDelta)
|
||||
m_fBottom = static_cast<CElementObject*>(m_pElementObject)->Get_Nine_Slice_Bottom();
|
||||
|
||||
m_vLerpPosition = static_cast<CElementObject*>(m_pElementObject)->Get_Lerp_Pos();
|
||||
m_fLerpX = static_cast<CElementObject*>(m_pElementObject)->Get_Lerp_Pos().m128_f32[0];
|
||||
m_fLerpY = static_cast<CElementObject*>(m_pElementObject)->Get_Lerp_Pos().m128_f32[1];
|
||||
m_fLerpX = static_cast<CElementObject*>(m_pElementObject)->Get_Lerp_Pos().x;
|
||||
m_fLerpY = static_cast<CElementObject*>(m_pElementObject)->Get_Lerp_Pos().y;
|
||||
m_fMoveSpeed = static_cast<CElementObject*>(m_pElementObject)->Get_Speed();
|
||||
m_fAngle = static_cast<CElementObject*>(m_pElementObject)->Get_Angle();
|
||||
m_iSpellType = static_cast<CElementObject*>(m_pElementObject)->Get_SkillType();
|
||||
@@ -259,7 +259,7 @@ void CIMGUIUI::Update(_float fTimeDelta)
|
||||
static_cast<CPanelObject*>(m_pPanelObject)->Set_FadeOut();
|
||||
}
|
||||
GUI::Text("Origin Position : %.1f, %.1f", static_cast<CPanelObject*>(m_pPanelObject)->Get_Origin_Position().x, static_cast<CUIObject*>(m_pPanelObject)->Get_Origin_Position().y);
|
||||
GUI::Text("Current Position : %.1f, %.1f", static_cast<CPanelObject*>(m_pPanelObject)->Get_Current_Position().m128_f32[0], static_cast<CUIObject*>(m_pPanelObject)->Get_Current_Position().m128_f32[1]);
|
||||
GUI::Text("Current Position : %.1f, %.1f", static_cast<CPanelObject*>(m_pPanelObject)->Get_Current_Position().x, static_cast<CUIObject*>(m_pPanelObject)->Get_Current_Position().y);
|
||||
GUI::Text("Origin Size : %.1f, %.1f", static_cast<CPanelObject*>(m_pPanelObject)->Get_Origin_Size().x, static_cast<CUIObject*>(m_pPanelObject)->Get_Origin_Size().y);
|
||||
GUI::Text("Current Size : %.1f, %.1f", static_cast<CPanelObject*>(m_pPanelObject)->Get_Current_Size().x, static_cast<CUIObject*>(m_pPanelObject)->Get_Current_Size().y);
|
||||
GUI::Text("PanelAlph : %.1f", m_fPanelAlpha);
|
||||
@@ -339,7 +339,7 @@ void CIMGUIUI::Update(_float fTimeDelta)
|
||||
static_cast<CElementObject*>(m_pElementObject)->Set_FadeOut();
|
||||
}
|
||||
GUI::Text("Origin Position : %.1f, %.1f", static_cast<CElementObject*>(m_pElementObject)->Get_Origin_Position().x, static_cast<CUIObject*>(m_pElementObject)->Get_Origin_Position().y);
|
||||
GUI::Text("Current Position : %.1f, %.1f", static_cast<CElementObject*>(m_pElementObject)->Get_Current_Position().m128_f32[0], static_cast<CUIObject*>(m_pElementObject)->Get_Current_Position().m128_f32[1]);
|
||||
GUI::Text("Current Position : %.1f, %.1f", static_cast<CElementObject*>(m_pElementObject)->Get_Current_Position().x, static_cast<CUIObject*>(m_pElementObject)->Get_Current_Position().y);
|
||||
GUI::Text("Origin Size : %.1f, %.1f", static_cast<CElementObject*>(m_pElementObject)->Get_Origin_Size().x, static_cast<CUIObject*>(m_pElementObject)->Get_Origin_Size().y);
|
||||
GUI::Text("Current Size : %.1f, %.1f", static_cast<CElementObject*>(m_pElementObject)->Get_Current_Size().x, static_cast<CUIObject*>(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<CElementObject*>(m_pElementObject)->Lerp_PosX(m_fLerpX);
|
||||
|
||||
@@ -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)))
|
||||
{
|
||||
|
||||
@@ -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<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_GlowBar"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_HpBarBG"), reinterpret_cast<CComponent**>(&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<CComponent**>(&m_pDiffuse_TextureCom2), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -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<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_HpBarBG"), reinterpret_cast<CComponent**>(&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<CComponent**>(&m_pDiffuse_TextureCom1), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_BroomHUDIcon"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom2), nullptr)))
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_HUD_HealthMeterFill"), reinterpret_cast<CComponent**>(&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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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 = XMVectorSet(1750.f, m_fY, 0.f, 1.f);
|
||||
static_cast<CUIObject*>(m_pRide_Info)->Visible(false);
|
||||
static_cast<CUIObject*>(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<CUIObject*>(m_pRide_Info)->Set_Hover(true);
|
||||
static_cast<CUIObject*>(m_pRide_InfoBG)->Set_Hover(true);
|
||||
}
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
|
||||
@@ -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};
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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{};
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 };
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -27,6 +27,16 @@ HRESULT CPanelObject::Initialize(void* pArg)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
UIOBJECT_DESC* pDesc = static_cast<UIOBJECT_DESC*>(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<CUIObject*>(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)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -34,6 +34,9 @@ class ENGINE_DLL CPanelObject abstract : public CUIObject
|
||||
virtual void Add_Function(wstring Name, function<void(void*)> 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;
|
||||
|
||||
@@ -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{};
|
||||
|
||||
Reference in New Issue
Block a user