Merge branch 'Develope' into Bloom
@@ -13,6 +13,7 @@ uint g_iSpellType;
|
||||
|
||||
float g_fPI;
|
||||
float g_fFar;
|
||||
float g_fBlinkTime;
|
||||
float g_fTime;
|
||||
float g_fTimeMult;
|
||||
float g_fFrame;
|
||||
@@ -28,12 +29,20 @@ float g_fHp;
|
||||
float2 g_fOrigin_Size;
|
||||
float2 g_fCurrent_Size;
|
||||
float2 g_fHpBG;
|
||||
float2 g_Pos;
|
||||
float2 g_fImageSize;
|
||||
|
||||
float4 g_fNine_Slice;
|
||||
float4 g_fImageUV;
|
||||
float4 g_fImageUV1;
|
||||
|
||||
uint g_iArrayCount;
|
||||
float2 g_fItemPosition1;
|
||||
float2 g_fItemImageSizes1;
|
||||
float2 g_fItemPosition2;
|
||||
float2 g_fItemImageSizes2;
|
||||
float2 g_fPosition[4];
|
||||
float2 g_fImageSizes[4];
|
||||
float4 g_fImagesUV[4];
|
||||
|
||||
Texture2D g_Texture;
|
||||
@@ -41,6 +50,7 @@ Texture2D g_Texture1;
|
||||
Texture2D g_Texture2;
|
||||
Texture2D g_Texture3;
|
||||
Texture2D g_Texture4;
|
||||
Texture2D g_Texture5;
|
||||
Texture2D g_DiffuseTexture;
|
||||
Texture2D g_MaskingTexture;
|
||||
|
||||
@@ -251,6 +261,7 @@ PS_OUT PS_Sptire_Sheet(PS_IN In)
|
||||
if (Color.r <= 0.4f)
|
||||
discard;
|
||||
|
||||
|
||||
Color.a *= Alpha;
|
||||
|
||||
Out.vColor = Color;
|
||||
@@ -416,8 +427,30 @@ PS_OUT PS_SpellAnim(PS_IN In)
|
||||
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
|
||||
float4 color = float4(0.f, 0.f, 0.f, 0.f);
|
||||
|
||||
float2 center = float2(0.5f, 0.5f);
|
||||
float2 uv = In.vTexcoord - center;
|
||||
uv *= sqrt(2.0f);
|
||||
float2 Rotation = In.vTexcoord;
|
||||
Rotation.x = uv.x * cos(g_fAngle) - uv.y * sin(g_fAngle);
|
||||
Rotation.y = uv.x * sin(g_fAngle) + uv.y * cos(g_fAngle);
|
||||
Rotation += center;
|
||||
|
||||
float2 startUV = g_fImageUV.xy;
|
||||
float2 endUV = g_fImageUV.zw;
|
||||
|
||||
float2 atlasUV = startUV + In.vTexcoord * (endUV - startUV);
|
||||
|
||||
float4 tex1 = g_Texture.Sample(ClampSampler, Rotation);
|
||||
float4 tex2 = g_Texture2.Sample(DefaultSampler, atlasUV);
|
||||
|
||||
tex1.rgb *= 0.4f;
|
||||
color = tex1;
|
||||
tex2.rgb *= 0.3f;
|
||||
|
||||
if (tex2.a >= 0.9f)
|
||||
color = tex2;
|
||||
float3 BGColor = float3(1.f, 1.f, 1.f);
|
||||
|
||||
switch (g_iSpellType)
|
||||
@@ -444,39 +477,42 @@ PS_OUT PS_SpellAnim(PS_IN In)
|
||||
BGColor = float3(0.f, 0.f, 0.f);
|
||||
break;
|
||||
}
|
||||
float4 color1 = float4(1.f, 1.f, 1.f, 1.f);
|
||||
|
||||
float2 uv = In.vTexcoord;
|
||||
float2 OverrayUV = In.vTexcoord;
|
||||
float CoolTime = 1.f - g_fDeltaV;
|
||||
float CoolTime2 = 1.f - g_fDeltaV + 0.05;
|
||||
atlasUV = startUV + In.vTexcoord * (endUV - startUV);
|
||||
float4 tex3 = g_Texture1.Sample(ClampSampler, OverrayUV);
|
||||
tex3.rgb *= BGColor;
|
||||
float4 tex4 = g_Texture2.Sample(DefaultSampler, atlasUV);
|
||||
|
||||
float4 tex1 = g_Texture.Sample(ClampSampler, uv);
|
||||
tex1.rgb *= BGColor;
|
||||
float4 tex2 = g_Texture1.Sample(DefaultSampler, uv);
|
||||
if (tex4.a >= 0.9f)
|
||||
tex3 = tex4;
|
||||
|
||||
if (tex2.a >= 0.9f)
|
||||
tex1 = tex2;
|
||||
|
||||
color = tex1;
|
||||
color1 = tex3;
|
||||
|
||||
float wave1 = sin(uv.x * 10.f + g_fTime * 2.f) * 0.01f;
|
||||
float wave2 = sin(uv.x * 10.f + g_fTime * 2.f) * 0.01f;
|
||||
float wave1 = sin(OverrayUV.x * 10.f + g_fTime * 2.f) * 0.01f;
|
||||
float wave2 = sin(OverrayUV.x * 10.f + g_fTime * 2.f) * 0.01f;
|
||||
|
||||
float waveThreshold1 = CoolTime + wave1;
|
||||
float waveThreshold2 = CoolTime2 + wave2;
|
||||
|
||||
if (g_fDeltaV <= 1.f)
|
||||
{
|
||||
if (uv.y >= waveThreshold1 && uv.y <= waveThreshold2)
|
||||
if (OverrayUV.y >= waveThreshold1 && OverrayUV.y <= waveThreshold2)
|
||||
{
|
||||
color.rgb = float3(1.f, 1.f, 1.f);
|
||||
color1.rgb = float3(1.f, 1.f, 1.f);
|
||||
}
|
||||
}
|
||||
|
||||
if (uv.y <= CoolTime)
|
||||
if (OverrayUV.y <= CoolTime)
|
||||
{
|
||||
color.a = 0.f;
|
||||
color1.a = 0.f;
|
||||
}
|
||||
|
||||
color = lerp(color, color1, color1.a);
|
||||
|
||||
color.a *= Alpha;
|
||||
|
||||
Out.vColor = color;
|
||||
@@ -488,6 +524,7 @@ PS_OUT PS_HpBar(PS_IN In)
|
||||
PS_OUT Out;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
float4 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;
|
||||
@@ -533,24 +570,46 @@ PS_OUT PS_HpBar(PS_IN In)
|
||||
}
|
||||
|
||||
float4 tex1 = g_Texture.Sample(ClampSampler, Finaluv);
|
||||
tex1.rgb = float3(255.f, 0.f, 0.f) / 255.f;
|
||||
if (g_fHp <= 0.3f)
|
||||
{
|
||||
tex1.a *= (sin(g_fBlinkTime) * 0.25f + 0.75f) * 1.5f;
|
||||
}
|
||||
else
|
||||
{
|
||||
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 - Finaluv;
|
||||
reversuv.x = 1.0f - localUV.x;
|
||||
|
||||
float4 tex2 = g_Texture1.Sample(ClampSampler, Finaluv);
|
||||
float4 tex3 = g_Texture2.Sample(ClampSampler, localUV);
|
||||
|
||||
if (reversuv.x >= g_fHp)
|
||||
{
|
||||
tex2.rgb = float3(0.f, 0.f, 0.f);
|
||||
tex3.rgb = float3(0.f, 0.f, 0.f);
|
||||
}
|
||||
|
||||
float3 Green = float3(112.f, 241.f, 31.f) / 255.f;
|
||||
Green *= 1.2f;
|
||||
tex2.rgb *= Green;
|
||||
float3 Green = (float3(112.f, 241.f, 31.f) / 255.f) * 1.2f;
|
||||
float3 Red = (float3(255.f, 0.f, 0.f) / 255.f) * 1.2f;
|
||||
|
||||
if (all(Color.rgb >= float3(70.f / 255.f, 70.f / 255.f, 70.f / 255.f)))
|
||||
Color = tex2;
|
||||
tex3.rgb *= lerp(Green, Red, g_fTime);
|
||||
|
||||
if (all(Color.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;
|
||||
@@ -595,18 +654,28 @@ PS_OUT PS_Magic_Icon(PS_IN In)
|
||||
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
|
||||
float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
float2 center = float2(0.5f, 0.5f);
|
||||
float2 BGuv = In.vTexcoord - center;
|
||||
BGuv *= sqrt(2.0f);
|
||||
float2 Rotation = In.vTexcoord;
|
||||
Rotation.x = BGuv.x * cos(g_fAngle) - BGuv.y * sin(g_fAngle);
|
||||
Rotation.y = BGuv.x * sin(g_fAngle) + BGuv.y * cos(g_fAngle);
|
||||
Rotation += center;
|
||||
|
||||
float4 tex1 = g_Texture.Sample(ClampSampler, Rotation);
|
||||
float4 tex2 = g_Texture1.Sample(ClampSampler, Rotation);
|
||||
|
||||
Color = tex1;
|
||||
Color = lerp(tex1, tex2, tex2.a);
|
||||
|
||||
float2 uv = In.vTexcoord;
|
||||
float2 center = float2(0.5, 0.5);
|
||||
float scale = 1.2;
|
||||
|
||||
uv = (uv - center) * scale + center;
|
||||
float4 tex2 = g_Texture1.Sample(ClampSampler, uv);
|
||||
float4 tex3 = g_Texture2.Sample(ClampSampler, uv);
|
||||
|
||||
Color = tex1;
|
||||
|
||||
Color = tex1 * (1 - tex2.a) + tex2;
|
||||
|
||||
Color = Color * (1 - tex3.a) + tex3;
|
||||
|
||||
Color.a *= Alpha;
|
||||
Out.vColor = Color;
|
||||
@@ -645,30 +714,30 @@ PS_OUT PS_Revelio(PS_IN In)
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
float2 UV = In.vTexcoord;
|
||||
|
||||
float2 Position[4];
|
||||
float2 startUV[4];
|
||||
float2 endUV[4];
|
||||
//float2 Position[4];
|
||||
//float2 startUV[4];
|
||||
//float2 endUV[4];
|
||||
|
||||
float2 Atlases[4];
|
||||
//float2 Atlases[4];
|
||||
|
||||
for (int i = 0; i < 4; ++i)
|
||||
{
|
||||
Position[i] = g_fPosition[i];
|
||||
startUV[i] = g_fImagesUV[i].xy;
|
||||
endUV[i] = g_fImagesUV[i].zw;
|
||||
//for (int i = 0; i < 4; ++i)
|
||||
//{
|
||||
// Position[i] = g_fPosition[i];
|
||||
// startUV[i] = g_fImagesUV[i].xy;
|
||||
// endUV[i] = g_fImagesUV[i].zw;
|
||||
|
||||
Atlases[i] = startUV[i] + UV * (endUV[i] - startUV[i]);
|
||||
}
|
||||
// Atlases[i] = startUV[i] + UV * (endUV[i] - startUV[i]);
|
||||
//}
|
||||
|
||||
float4 tex1 = g_Texture.Sample(DefaultSampler, UV);
|
||||
float4 tex2 = g_Texture1.Sample(DefaultSampler, Atlases[0]);
|
||||
float4 tex3 = g_Texture1.Sample(DefaultSampler, Atlases[1]);
|
||||
float4 tex4 = g_Texture2.Sample(DefaultSampler, Atlases[2]);
|
||||
float4 tex5 = g_Texture2.Sample(DefaultSampler, Atlases[3]);
|
||||
//float4 tex1 = g_Texture.Sample(DefaultSampler, UV);
|
||||
//float4 tex2 = g_Texture1.Sample(DefaultSampler, Atlases[0]);
|
||||
//float4 tex3 = g_Texture1.Sample(DefaultSampler, Atlases[1]);
|
||||
//float4 tex4 = g_Texture2.Sample(DefaultSampler, Atlases[2]);
|
||||
//float4 tex5 = g_Texture2.Sample(DefaultSampler, Atlases[3]);
|
||||
|
||||
|
||||
|
||||
//float2 atlasUV = startUV + In.vTexcoord * (endUV - startUV);
|
||||
////float2 atlasUV = startUV + In.vTexcoord * (endUV - startUV);
|
||||
|
||||
Color.a *= Alpha;
|
||||
Out.vColor = Color;
|
||||
@@ -676,6 +745,169 @@ PS_OUT PS_Revelio(PS_IN In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_Potion(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(214.f / 255.f, 225 / 255.f, 36 / 255.f, 1.f);
|
||||
|
||||
float2 center = float2(0.5f, 0.5f);
|
||||
float2 uv = In.vTexcoord - center;
|
||||
uv *= sqrt(2.0f);
|
||||
float2 Rotation = In.vTexcoord;
|
||||
Rotation.x = uv.x * cos(g_fAngle) - uv.y * sin(g_fAngle);
|
||||
Rotation.y = uv.x * sin(g_fAngle) + uv.y * cos(g_fAngle);
|
||||
Rotation += center;
|
||||
|
||||
float4 tex1 = g_Texture.Sample(ClampSampler, Rotation);
|
||||
Color = tex1;
|
||||
|
||||
float4 tex2 = g_Texture1.Sample(DefaultSampler, In.vTexcoord);
|
||||
//Color += tex2;
|
||||
float4 tex3 = g_Texture2.Sample(ClampSampler, Rotation);
|
||||
Color = lerp(Color, tex3, tex3.a);
|
||||
|
||||
float2 Potionuv = In.vTexcoord;
|
||||
float scale = 1.2;
|
||||
|
||||
Potionuv = (Potionuv - center) * scale + center;
|
||||
float4 tex4 = g_Texture3.Sample(ClampSampler, Potionuv);
|
||||
Color = lerp(Color, tex4, tex4.a);
|
||||
|
||||
float2 tex5pos = g_Pos / g_fCurrent_Size;
|
||||
float2 tex5size = g_fOrigin_Size / g_fCurrent_Size;
|
||||
float2 tex5local = (In.vTexcoord - tex5pos) / tex5size;
|
||||
bool inside = all(tex5local >= 0.0f && tex5local <= 1.0f);
|
||||
float4 tex5 = g_Texture4.Sample(ClampSampler, tex5local);
|
||||
if (inside)
|
||||
Color = lerp(Color, tex5, tex5.a);
|
||||
|
||||
Color.a *= Alpha;
|
||||
Out.vColor = Color;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_Magic_Item(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
|
||||
float2 center = float2(0.5f, 0.5f);
|
||||
float2 uv = In.vTexcoord - center;
|
||||
uv *= sqrt(2.0f);
|
||||
float2 Rotation = In.vTexcoord;
|
||||
Rotation.x = uv.x * cos(g_fAngle) - uv.y * sin(g_fAngle);
|
||||
Rotation.y = uv.x * sin(g_fAngle) + uv.y * cos(g_fAngle);
|
||||
Rotation += center;
|
||||
|
||||
float2 startUV = g_fImageUV.xy;
|
||||
float2 endUV = g_fImageUV.zw;
|
||||
|
||||
float2 atlasUV = startUV + In.vTexcoord * (endUV - startUV);
|
||||
|
||||
float4 tex1 = g_Texture.Sample(ClampSampler, Rotation);
|
||||
float4 tex2 = g_Texture3.Sample(ClampSampler, atlasUV);
|
||||
|
||||
tex1.rgb *= 0.4f;
|
||||
color = tex1;
|
||||
tex2.rgb *= 0.3f;
|
||||
|
||||
if (tex2.a >= 0.9f)
|
||||
color = tex2;
|
||||
float3 BGColor = float3(1.f, 1.f, 1.f);
|
||||
|
||||
switch (g_iSpellType)
|
||||
{
|
||||
case 0:
|
||||
BGColor = float3(50.f, 50.f, 50.f) / 255.f;
|
||||
break;
|
||||
case 1:
|
||||
BGColor = float3(89.f, 32.f, 215.f) / 255.f;
|
||||
break;
|
||||
case 2:
|
||||
BGColor = float3(190.f, 46., 34.f) / 255.f;
|
||||
break;
|
||||
case 3:
|
||||
BGColor = float3(37.f, 129.f, 162.f) / 255.f;
|
||||
break;
|
||||
case 4:
|
||||
BGColor = float3(134.f, 171.f, 78.f) / 255.f;
|
||||
break;
|
||||
}
|
||||
|
||||
float4 color1 = float4(1.f, 1.f, 1.f, 1.f);
|
||||
|
||||
float2 OverrayUV = In.vTexcoord;
|
||||
float CoolTime = 0.f + g_fDeltaV;
|
||||
float CoolTime2 = 0.f + g_fDeltaV + 0.05;
|
||||
atlasUV = startUV + In.vTexcoord * (endUV - startUV);
|
||||
float4 tex3 = g_Texture1.Sample(ClampSampler, OverrayUV);
|
||||
tex3.rgb *= BGColor;
|
||||
float4 tex4 = g_Texture3.Sample(DefaultSampler, atlasUV);
|
||||
|
||||
if (g_fDeltaV <= 1.f)
|
||||
{
|
||||
if (tex4.a >= 0.9f)
|
||||
tex3 = tex4;
|
||||
|
||||
color1 = tex3;
|
||||
|
||||
float wave1 = sin(OverrayUV.x * 10.f + g_fTime * 2.f) * 0.01f;
|
||||
float wave2 = sin(OverrayUV.x * 10.f + g_fTime * 2.f) * 0.01f;
|
||||
|
||||
float waveThreshold1 = CoolTime + wave1;
|
||||
float waveThreshold2 = CoolTime2 + wave2;
|
||||
|
||||
if (g_fDeltaV <= 1.f)
|
||||
{
|
||||
if (OverrayUV.y >= waveThreshold1 && OverrayUV.y <= waveThreshold2)
|
||||
{
|
||||
color1.rgb = float3(1.f, 1.f, 1.f);
|
||||
}
|
||||
}
|
||||
|
||||
if (OverrayUV.y <= CoolTime)
|
||||
{
|
||||
color1.a = 0.f;
|
||||
}
|
||||
|
||||
color = lerp(color, color1, color1.a);
|
||||
}
|
||||
else if (g_fDeltaV >= 1.f)
|
||||
color = lerp(color, tex4, tex4.a);
|
||||
|
||||
float4 tex5 = g_Texture2.Sample(ClampSampler, Rotation);
|
||||
color = lerp(color, tex5, tex5.a);
|
||||
|
||||
float2 texpos1 = g_fItemPosition1 / g_fCurrent_Size;
|
||||
float2 texpos2 = g_fItemPosition2 / g_fCurrent_Size;
|
||||
float2 texsize1 = g_fItemImageSizes1 / g_fCurrent_Size;
|
||||
float2 texsize2 = g_fItemImageSizes2 / g_fCurrent_Size;
|
||||
float2 texlocal1 = (In.vTexcoord - texpos1) / texsize1;
|
||||
float2 texlocal2 = (In.vTexcoord - texpos2) / texsize2;
|
||||
|
||||
|
||||
bool inside1 = all(texlocal1 >= 0.0f && texlocal1 <= 1.0f);
|
||||
float4 tex6 = g_Texture4.Sample(DefaultSampler, texlocal1);
|
||||
|
||||
if (inside1)
|
||||
color = lerp(color, tex6, tex6.a);
|
||||
|
||||
bool inside2 = all(texlocal2 >= 0.0f && texlocal2 <= 1.0f);
|
||||
|
||||
float4 tex7 = g_Texture5.Sample(DefaultSampler, texlocal2);
|
||||
if (inside2)
|
||||
color = lerp(color, tex7, tex7.a);
|
||||
|
||||
color.a *= Alpha;
|
||||
|
||||
Out.vColor = color;
|
||||
return Out;
|
||||
}
|
||||
|
||||
technique11 PosTexTechnique11
|
||||
{
|
||||
pass Default
|
||||
@@ -856,4 +1088,24 @@ technique11 PosTexTechnique11
|
||||
PixelShader = compile ps_5_0 PS_Revelio();
|
||||
}
|
||||
|
||||
pass Potion
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_Potion();
|
||||
}
|
||||
|
||||
pass Magic_Item
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_Magic_Item();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 240 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 932 KiB |
|
Before Width: | Height: | Size: 9.3 KiB |
|
After Width: | Height: | Size: 485 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 12 KiB |
@@ -212,6 +212,7 @@
|
||||
<ClInclude Include="..\Public\Bombard.h" />
|
||||
<ClInclude Include="..\public\InstancedProp.h" />
|
||||
<ClInclude Include="..\public\Magic_Icon.h" />
|
||||
<ClInclude Include="..\public\Magic_Item.h" />
|
||||
<ClInclude Include="..\public\Magic_Meter.h" />
|
||||
<ClInclude Include="..\Public\NomalJap.h" />
|
||||
<ClInclude Include="..\Public\Effect_Container.h" />
|
||||
@@ -256,7 +257,6 @@
|
||||
<ClInclude Include="..\Public\State_Land.h" />
|
||||
<ClInclude Include="..\Public\State_Move.h" />
|
||||
<ClInclude Include="..\Public\State_Root.h" />
|
||||
<ClInclude Include="..\public\Spell_Image.h" />
|
||||
<ClInclude Include="..\public\Spell_Overlay.h" />
|
||||
<ClInclude Include="..\public\Spell_Slot.h" />
|
||||
<ClInclude Include="..\public\Terrain.h" />
|
||||
@@ -350,6 +350,7 @@
|
||||
<ClCompile Include="..\Private\Bombard.cpp" />
|
||||
<ClCompile Include="..\private\InstancedProp.cpp" />
|
||||
<ClCompile Include="..\private\Magic_Icon.cpp" />
|
||||
<ClCompile Include="..\private\Magic_Item.cpp" />
|
||||
<ClCompile Include="..\private\Magic_Meter.cpp" />
|
||||
<ClCompile Include="..\Private\NomalJap.cpp" />
|
||||
<ClCompile Include="..\Private\Effect_Container.cpp" />
|
||||
@@ -395,7 +396,6 @@
|
||||
<ClCompile Include="..\Private\State_Land.cpp" />
|
||||
<ClCompile Include="..\Private\State_Move.cpp" />
|
||||
<ClCompile Include="..\Private\State_Root.cpp" />
|
||||
<ClCompile Include="..\private\Spell_Image.cpp" />
|
||||
<ClCompile Include="..\private\Spell_Overlay.cpp" />
|
||||
<ClCompile Include="..\private\Spell_Slot.cpp" />
|
||||
<ClCompile Include="..\private\Terrain.cpp" />
|
||||
|
||||
@@ -235,9 +235,6 @@
|
||||
<Filter Include="50.UI\GamePlay_Canvas\Action_Panel\Spell_Overlay">
|
||||
<UniqueIdentifier>{93166105-4863-4435-b2a1-7c97f9f3226f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="50.UI\GamePlay_Canvas\Action_Panel\Spell_Image">
|
||||
<UniqueIdentifier>{a5069e0b-5f20-44e5-bb86-56d4febc0996}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Dummys\DummyPhysX\PhysXMonster">
|
||||
<UniqueIdentifier>{1bc9f833-8d1b-4576-9ae5-51a039f4d2ff}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@@ -385,6 +382,9 @@
|
||||
<Filter Include="50.UI\GamePlay_Canvas\MiniMap_Panel\NoMountIcon">
|
||||
<UniqueIdentifier>{93ae1d33-fb58-4793-9e7e-5b8d27e163d1}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="50.UI\GamePlay_Canvas\Action_Panel\Magic_Item">
|
||||
<UniqueIdentifier>{5b287b4f-4f71-4458-85a1-c753fd121c53}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Editor.h">
|
||||
@@ -612,9 +612,6 @@
|
||||
<ClInclude Include="..\public\Spell_Slot.h">
|
||||
<Filter>50.UI\GamePlay_Canvas\Action_Panel\Spell_Slot</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\Spell_Image.h">
|
||||
<Filter>50.UI\GamePlay_Canvas\Action_Panel\Spell_Image</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\Spell_Overlay.h">
|
||||
<Filter>50.UI\GamePlay_Canvas\Action_Panel\Spell_Overlay</Filter>
|
||||
</ClInclude>
|
||||
@@ -750,6 +747,9 @@
|
||||
<ClInclude Include="..\public\Spell_UI.h">
|
||||
<Filter>50.UI\GamePlay_Canvas\Action_Panel\Spell_UI</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\Magic_Item.h">
|
||||
<Filter>50.UI\GamePlay_Canvas\Action_Panel\Magic_Item</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Editor.ico">
|
||||
@@ -979,9 +979,6 @@
|
||||
<ClCompile Include="..\private\Spell_Slot.cpp">
|
||||
<Filter>50.UI\GamePlay_Canvas\Action_Panel\Spell_Slot</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\Spell_Image.cpp">
|
||||
<Filter>50.UI\GamePlay_Canvas\Action_Panel\Spell_Image</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\Spell_Overlay.cpp">
|
||||
<Filter>50.UI\GamePlay_Canvas\Action_Panel\Spell_Overlay</Filter>
|
||||
</ClCompile>
|
||||
@@ -1101,6 +1098,9 @@
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\InstancedProp.cpp">
|
||||
<Filter>02.GameObjects\Env\06.InstancedProp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Goblin_States.cpp">
|
||||
<Filter>02.GameObjects\Monster\Goblin</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\Magic_Icon.cpp">
|
||||
<Filter>50.UI\GamePlay_Canvas\Action_Panel\Magic_Icon</Filter>
|
||||
@@ -1113,6 +1113,9 @@
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Goblin_States.cpp">
|
||||
<Filter>02.GameObjects\Monster\Goblin</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\Magic_Item.cpp">
|
||||
<Filter>50.UI\GamePlay_Canvas\Action_Panel\Magic_Item</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
#include "Action_Panel.h"
|
||||
#include "GameInstance.h"
|
||||
#include "Spell_Slot.h"
|
||||
#include "Spell_Image.h"
|
||||
#include "Spell_Overlay.h"
|
||||
#include "Slot_Number.h"
|
||||
#include "HpBarBG.h"
|
||||
#include "Magic_Meter.h"
|
||||
#include "Magic_Icon.h"
|
||||
#include "Spell_UI.h"
|
||||
#include "Potion.h"
|
||||
#include "Magic_Item.h"
|
||||
|
||||
CAction_Panel::CAction_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CPanelObject(pDevice, pContext)
|
||||
@@ -252,13 +253,6 @@ HRESULT CAction_Panel::Ready_Element(void* pArg)
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Spell_Slot"), m_pSpell_Slot);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Image>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Image**>(&m_pSpell_Image))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Spell_Image"), m_pSpell_Image);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Overlay>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Overlay**>(&m_pSpell_Overlay))))
|
||||
{
|
||||
return E_FAIL;
|
||||
@@ -309,6 +303,16 @@ HRESULT CAction_Panel::Ready_Element(void* pArg)
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Spell_UI"), m_pSpell_UI);
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CPotion>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CPotion**>(&m_pPotion))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Potion"), m_pPotion);
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMagic_Item>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CMagic_Item**>(&m_pMagic_Item))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Magic_Item"), m_pMagic_Item);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,193 +0,0 @@
|
||||
#include "pch.h"
|
||||
#include "Action_Panel.h"
|
||||
#include "GameInstance.h"
|
||||
#include "Spell_Slot.h"
|
||||
#include "Spell_Image.h"
|
||||
#include "Spell_Overlay.h"
|
||||
#include "Slot_Number.h"
|
||||
#include "HpBarBG.h"
|
||||
#include "Magic_Meter.h
|
||||
|
||||
CAction_Panel::CAction_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CPanelObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CAction_Panel::CAction_Panel(const CAction_Panel& rhs)
|
||||
:CPanelObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CAction_Panel::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CAction_Panel::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 1515.f;
|
||||
Desc.fY = 850.f;
|
||||
Desc.fSizeX = 700.f;
|
||||
Desc.fSizeY = 400.f;
|
||||
|
||||
|
||||
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_bVisible = true;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CAction_Panel::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CAction_Panel::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CAction_Panel::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_bVisible) {
|
||||
|
||||
}
|
||||
__super::Late_Update(fTimeDelta);
|
||||
|
||||
}
|
||||
|
||||
HRESULT CAction_Panel::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 CAction_Panel::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CAction_Panel::Bind_ShaderResources()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CAction_Panel::Ready_Components(void* pArg)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CAction_Panel::Ready_Element(void* pArg)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Slot>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CSpell_Slot**>(&m_pSpell_Slot))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Spell_Slot"), m_pSpell_Slot);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Image>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Image**>(&m_pSpell_Image))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Spell_Image"), m_pSpell_Image);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Overlay>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Overlay**>(&m_pSpell_Overlay))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Spell_Overlay"), m_pSpell_Overlay);
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSlot_Number>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSlot_Number**>(&m_pSlot_Number))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Slot_Number"), m_pSlot_Number);
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CHpBarBG>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CHpBarBG**>(&m_pHpBarBG))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("HpBarBG"), m_pHpBarBG);
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMagic_Meter>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CMagic_Meter**>(&m_pMagic_Meter))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Magic_Meter"), m_pMagic_Meter);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CAction_Panel* CAction_Panel::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CAction_Panel* pInstance = new CAction_Panel(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CAction_Panel");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CAction_Panel::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CAction_Panel* pInstance = new CAction_Panel(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CAction_Panel");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CAction_Panel::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
void CAction_Panel::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -24,7 +24,7 @@ HRESULT CHpBarBG::Initialize(void* pArg)
|
||||
Desc.fX = 600.f;
|
||||
Desc.fY = 180.f;
|
||||
Desc.fSizeX = 144.f;
|
||||
Desc.fSizeY = 24.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,15 +37,17 @@ HRESULT CHpBarBG::Initialize(void* pArg)
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_fTimeMult = 3.f;
|
||||
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 = 20.f;
|
||||
m_fMaxHp = 1000.f;
|
||||
m_fCurrentHp = m_fMaxHp;
|
||||
m_fMoveSpeed = 5.f;
|
||||
m_fHpBGSize = _float2(144.f, 24.f);
|
||||
m_fHpBGPos = _float2(0.f, 13.f);
|
||||
m_fHpBG = _float2(0, m_fSizeX);
|
||||
SizeUpX(210.f);
|
||||
SizeUpX(240.f);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -87,7 +89,7 @@ void CHpBarBG::Update(_float fTimeDelta)
|
||||
m_bFadeOut = false;
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (m_fCurrentHp < 0.f)
|
||||
m_fCurrentHp = 0.f;
|
||||
@@ -97,12 +99,32 @@ void CHpBarBG::Update(_float fTimeDelta)
|
||||
|
||||
if (m_fTargetHp > m_fCurrentHp)
|
||||
Heal(fTimeDelta);
|
||||
else if(m_fTargetHp < m_fCurrentHp)
|
||||
else if (m_fTargetHp < m_fCurrentHp)
|
||||
Hit(fTimeDelta);
|
||||
m_fHpBar = m_fCurrentHp / m_fMaxHp;
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
if (m_pGameInstance->Key_Down(DIK_3))
|
||||
{
|
||||
Lerp_PosX(100.f);
|
||||
}
|
||||
|
||||
if (m_pGameInstance->Key_Down(DIK_4))
|
||||
{
|
||||
Lerp_PosX(-101.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);
|
||||
}
|
||||
|
||||
@@ -184,6 +206,10 @@ HRESULT CHpBarBG::Bind_ShaderResources()
|
||||
{
|
||||
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;
|
||||
@@ -192,6 +218,10 @@ HRESULT CHpBarBG::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;
|
||||
@@ -224,6 +254,14 @@ HRESULT CHpBarBG::Bind_ShaderResources()
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageSize", &m_fHpBGSize, sizeof(_float2))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_Pos", &m_fHpBGPos, sizeof(_float2))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -233,11 +271,15 @@ HRESULT CHpBarBG::Ready_Components(void* pArg)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_HpBarBG"), 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_UI_T_HUD_HealthMeterFill"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom1), nullptr)))
|
||||
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;
|
||||
}
|
||||
@@ -280,6 +322,7 @@ void CHpBarBG::Free()
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom1);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom2);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ void CIMGUIUI::Priority_Update(_float fTimeDelta)
|
||||
|
||||
void CIMGUIUI::Update(_float fTimeDelta)
|
||||
{
|
||||
static const char* SpellTypeNames[] = { "SHADOW", "CONTROL","POWER", "DAMAGE","UTILITY", "TRANSFORM", "CURSE", "ESSENTIAL" };
|
||||
static const char* SpellTypeNames[] = { "CONTROL","POWER", "DAMAGE","UTILITY", "TRANSFORM", "CURSE", "ESSENTIAL" };
|
||||
int itemCount = sizeof(SpellTypeNames) / sizeof(const char*);
|
||||
if (m_pGamePlay_Canvas != nullptr)
|
||||
{
|
||||
@@ -348,7 +348,7 @@ void CIMGUIUI::Update(_float fTimeDelta)
|
||||
static_cast<CElementObject*>(m_pElementObject)->Set_TimeMult(m_fDelayTime);
|
||||
}
|
||||
|
||||
if (GUI::DragFloat("TimeMult", &m_fTimeMult, 0.01f, 0.f, 10.f))
|
||||
if (GUI::DragFloat("TimeMult", &m_fTimeMult, 0.01f, 0.f, 100.f))
|
||||
{
|
||||
static_cast<CElementObject*>(m_pElementObject)->Set_TimeMult(m_fTimeMult);
|
||||
}
|
||||
|
||||
@@ -57,7 +57,6 @@
|
||||
|
||||
#include "Action_Panel.h"
|
||||
#include "Spell_Slot.h"
|
||||
#include "Spell_Image.h"
|
||||
#include "Spell_Overlay.h"
|
||||
#include "Slot_Number.h"
|
||||
#include "HpBarBG.h"
|
||||
@@ -65,6 +64,7 @@
|
||||
#include "Magic_Meter.h"
|
||||
#include "Magic_Icon.h"
|
||||
#include "Spell_UI.h"
|
||||
#include "Magic_Item.h"
|
||||
|
||||
#include "IMGUIUI.h"
|
||||
|
||||
@@ -453,6 +453,27 @@ HRESULT CLoader::Loading_For_UI()
|
||||
|
||||
});
|
||||
|
||||
Asset_FileLoad("../Bin/Resources/Textures/GadgetWheel", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath)
|
||||
{
|
||||
|
||||
_string strFilePath = pFilePath;
|
||||
_wstring wstrFilePath = CMyTools::ToWstring(strFilePath);
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), wstrFileName,
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
|
||||
});
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Item"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("../Bin/Resources/Textures/GadgetWheel/Item%d.png"), 8)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_strMessage = TEXT("Model Loading..");
|
||||
|
||||
CVIBuffer_UI_Instance::UI_INSTANCE_DESC SpellSlotUIDesc{};
|
||||
@@ -582,10 +603,6 @@ HRESULT CLoader::Loading_For_UI()
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CSpell_Image>(g_iStaticLevel, CSpell_Image::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CSpell_Overlay>(g_iStaticLevel, CSpell_Overlay::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
@@ -614,6 +631,10 @@ HRESULT CLoader::Loading_For_UI()
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CMagic_Item>(g_iStaticLevel, CMagic_Item::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CIMGUIUI>(g_iStaticLevel, CIMGUIUI::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
|
||||
@@ -141,6 +141,10 @@ HRESULT CMagic_Icon::Bind_ShaderResources()
|
||||
{
|
||||
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;
|
||||
@@ -166,11 +170,15 @@ HRESULT CMagic_Icon::Ready_Components(void* pArg)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_HealthMeter_LevelBox"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_ActionItemBack_4K"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_AncientMagicFinisher"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom1), nullptr)))
|
||||
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_AncientMagicFinisher"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom2), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -214,6 +222,7 @@ void CMagic_Icon::Free()
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom1);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom2);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,369 @@
|
||||
#include "pch.h"
|
||||
#include "Magic_Item.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CMagic_Item::CMagic_Item(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CMagic_Item::CMagic_Item(const CMagic_Item& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CMagic_Item::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMagic_Item::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = -800.f;
|
||||
Desc.fY = 100.f;
|
||||
Desc.fSizeX = 100.f;
|
||||
Desc.fSizeY = 100.f;
|
||||
|
||||
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
|
||||
|
||||
if (FAILED(__super::Initialize(&Desc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_fAlpha = 1.f;
|
||||
m_fTimeMult = 0.5f;
|
||||
m_fAngle = XMConvertToRadians(-135.f);
|
||||
m_fAlphaTime = 1.f;
|
||||
m_fSortZ = 0.2f;
|
||||
m_fCoolTime = 5.f;
|
||||
m_vUVScale.y = 1.f;
|
||||
m_iArratCount = 2;
|
||||
Compute_UV(0);
|
||||
Compute_Image();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CMagic_Item::Compute_UV(_uint iItemID)
|
||||
{
|
||||
_float2 fImage_Size = { 1024.f, 512.f };
|
||||
|
||||
_uint iCountX = 4;
|
||||
_uint iCountY = 2;
|
||||
|
||||
_float iImageX = 256.f;
|
||||
_float iImageY = 256.f;
|
||||
|
||||
_uint iframeX = iItemID % iCountX;
|
||||
_uint iframeY = iItemID / iCountX;
|
||||
|
||||
_float2 UVStart{};
|
||||
UVStart.x = iframeX * iImageX / fImage_Size.x;
|
||||
UVStart.y = iframeY * iImageY / fImage_Size.y;
|
||||
|
||||
_float2 UVEnd{};
|
||||
UVEnd.x = UVStart.x + (iImageX / fImage_Size.x);
|
||||
UVEnd.y = UVStart.y + (iImageY / fImage_Size.y);
|
||||
|
||||
_float4 UV = _float4{ UVStart.x, UVStart.y, UVEnd.x, UVEnd.y };
|
||||
m_vUV = UV;
|
||||
}
|
||||
|
||||
void CMagic_Item::Compute_Image()
|
||||
{
|
||||
m_vImagePos1 = _float2(72.f, 0.f);
|
||||
m_vImageSize1 = _float2(30.f, 30.f);
|
||||
m_vImagePos2 = _float2(65.f, 65.f);
|
||||
m_vImageSize2 = _float2(30.f, 30.f);
|
||||
}
|
||||
|
||||
void CMagic_Item::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
|
||||
void CMagic_Item::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_vUVScale.y >= 1.f)
|
||||
{
|
||||
if (m_pGameInstance->Key_Down(DIK_TAB))
|
||||
{
|
||||
m_vUVScale.y = 0.f;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_vUVScale.y <= 1)
|
||||
{
|
||||
m_vUVScale.y += fTimeDelta * (1.f / m_fCoolTime);
|
||||
}
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CMagic_Item::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible)
|
||||
{
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
}
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
HRESULT CMagic_Item::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::MAGIC_ITEM))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CMagic_Item::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CMagic_Item::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom1->Bind_ShaderResource(m_pShaderCom, "g_Texture1", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom2->Bind_ShaderResource(m_pShaderCom, "g_Texture2", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom3->Bind_ShaderResource(m_pShaderCom, "g_Texture3", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom4->Bind_ShaderResource(m_pShaderCom, "g_Texture4", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom5->Bind_ShaderResource(m_pShaderCom, "g_Texture5", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAngle", &m_fAngle, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageUV", &m_vUV, sizeof(_float4))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCoolTime", &m_fCoolTime, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fDeltaV", &m_vUVScale.y, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageUV", &m_vUV, sizeof(_float4))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iArrayCount", &m_iArratCount, sizeof(_uint))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fItemPosition1", &m_vImagePos1, sizeof(_float2))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fItemImageSizes1", &m_vImageSize1, sizeof(_float2))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fItemPosition2", &m_vImagePos2, sizeof(_float2))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fItemImageSizes2", &m_vImageSize2, sizeof(_float2))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_vScale, sizeof(_float2))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMagic_Item::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
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)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_spellmeter_Generic"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom1), 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_TextureCom2), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_Atlas_Item"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom3), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_Keyboard_Tab"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom4), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_AmountFrame"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom5), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CMagic_Item* CMagic_Item::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CMagic_Item* pInstance = new CMagic_Item(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CMagic_Item");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CMagic_Item::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CMagic_Item* pInstance = new CMagic_Item(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CMagic_Item");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CMagic_Item::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom1);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom2);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom3);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom4);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom5);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
void CMagic_Item::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -126,7 +126,7 @@ _float4 CMission_Key::AlphabetUV(_tchar Alphabet)
|
||||
{
|
||||
_uint Number = CMyTools::AlphabetToInt(Alphabet);
|
||||
|
||||
_float2 fIamge_Size = { 320.f, 384.f };
|
||||
_float2 fImage_Size = { 320.f, 384.f };
|
||||
|
||||
_uint iXCount = 5;
|
||||
_uint iYCount = 6;
|
||||
@@ -134,16 +134,16 @@ _float4 CMission_Key::AlphabetUV(_tchar Alphabet)
|
||||
_float frameWidth = 64.f;
|
||||
_float frameHeight = 64.f;
|
||||
|
||||
_uint frameX = Number % iXCount;
|
||||
_uint frameY = Number / iXCount;
|
||||
_uint iframeX = Number % iXCount;
|
||||
_uint iframeY = Number / iXCount;
|
||||
|
||||
_float2 UVStart;
|
||||
UVStart.x = frameX * frameWidth / fIamge_Size.x;
|
||||
UVStart.y = frameY * frameHeight / fIamge_Size.y;
|
||||
UVStart.x = iframeX * frameWidth / fImage_Size.x;
|
||||
UVStart.y = iframeY * frameHeight / fImage_Size.y;
|
||||
|
||||
_float2 UVEnd;
|
||||
UVEnd.x = UVStart.x + (frameWidth / fIamge_Size.x);
|
||||
UVEnd.y = UVStart.y + (frameHeight / fIamge_Size.y);
|
||||
UVEnd.x = UVStart.x + (frameWidth / fImage_Size.x);
|
||||
UVEnd.y = UVStart.y + (frameHeight / fImage_Size.y);
|
||||
|
||||
return m_vUV = _float4(UVStart.x, UVStart.y, UVEnd.x, UVEnd.y);
|
||||
}
|
||||
|
||||
@@ -21,10 +21,10 @@ HRESULT CPotion::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 220.f;
|
||||
Desc.fY = 180.f;
|
||||
Desc.fSizeX = 144.f;
|
||||
Desc.fSizeY = 24.f;
|
||||
Desc.fX = 700.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) };
|
||||
|
||||
@@ -40,6 +40,8 @@ HRESULT CPotion::Initialize(void* pArg)
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAlpha = 1.f;
|
||||
m_fAlphaTime = 1.f;
|
||||
m_vImageSlotPos = _float2(45.f,45.f);
|
||||
m_vImageSize = _float2(32.f,32.f);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -84,6 +86,12 @@ void CPotion::Update(_float fTimeDelta)
|
||||
}
|
||||
}
|
||||
|
||||
if (m_pGameInstance->Key_Down(DIK_G))
|
||||
{
|
||||
m_fTime = -1.f;
|
||||
}
|
||||
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
@@ -106,7 +114,7 @@ HRESULT CPotion::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::POTION)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
|
||||
@@ -142,6 +150,22 @@ HRESULT CPotion::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_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;
|
||||
@@ -162,6 +186,18 @@ HRESULT CPotion::Bind_ShaderResources()
|
||||
{
|
||||
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_Pos", &m_vImageSlotPos, sizeof(_float2))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOrigin_Size", &m_vImageSize, sizeof(_float2))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -171,7 +207,23 @@ HRESULT CPotion::Ready_Components(void* pArg)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_WoundCleaning"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_ActionItemBack_4K"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_FG_IndexIconBorder"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom1), 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_TextureCom2), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_WoundCleaning"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom3), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_AmountFrame"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom4), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -213,6 +265,10 @@ void CPotion::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_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
@@ -1,235 +0,0 @@
|
||||
#include "pch.h"
|
||||
#include "Spell_Image.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CSpell_Image::CSpell_Image(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CSpell_Image::CSpell_Image(const CSpell_Image& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CSpell_Image::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpell_Image::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 380.f;
|
||||
Desc.fY = 0.f;
|
||||
Desc.fSizeX = 100.f;
|
||||
Desc.fSizeY = 100.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_fAngle = XMConvertToRadians(-135.f);
|
||||
m_fAlpha = 1.f;
|
||||
m_fAlphaTime = 1.f;
|
||||
m_fSortZ = 1.f;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpell_Image::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpell_Image::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_bFadeIn == true)
|
||||
{
|
||||
if (m_fAlpha <= 1.f)
|
||||
m_fAlpha += fTimeDelta * m_fAlphaTime;
|
||||
|
||||
if (m_fAlpha >= 1.f)
|
||||
{
|
||||
m_bFadeIn = false;
|
||||
m_fAlpha = 1.f;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bFadeOut == true)
|
||||
{
|
||||
if (m_fAlpha >= 0.f)
|
||||
m_fAlpha -= fTimeDelta;
|
||||
|
||||
if (m_fAlpha <= 0.f)
|
||||
{
|
||||
m_bFadeOut = false;
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpell_Image::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CSpell_Image::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ROTATION)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CSpell_Image::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CSpell_Image::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_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_fAngle", &m_fAngle, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpell_Image::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
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)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_spellmeter_Accio_Overlay"), 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;
|
||||
}
|
||||
|
||||
CSpell_Image* CSpell_Image::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CSpell_Image* pInstance = new CSpell_Image(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CSpell_Image");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CSpell_Image::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CSpell_Image* pInstance = new CSpell_Image(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CSpell_Image");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CSpell_Image::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom1);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
void CSpell_Image::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -48,9 +48,35 @@ HRESULT CSpell_Overlay::Initialize(void* pArg)
|
||||
m_fCoolTime = 5.f;
|
||||
m_fSortZ = 1.f;
|
||||
m_iSkillType = ENUM_CLASS(SKILLTYPE::CONTROL);
|
||||
Compute_UI(5);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpell_Overlay::Compute_UI(_uint SpellID)
|
||||
{
|
||||
_float2 fImage_Size = { 1024.f, 1536.f };
|
||||
|
||||
_uint iCountX = 4;
|
||||
_uint iCountY = 6;
|
||||
|
||||
_float iImageX = 256.f;
|
||||
_float iImageY = 256.f;
|
||||
|
||||
_uint iframeX = SpellID % iCountX;
|
||||
_uint iframeY = SpellID / iCountX;
|
||||
|
||||
_float2 UVStart;
|
||||
UVStart.x = iframeX * iImageX / fImage_Size.x;
|
||||
UVStart.y = iframeY * iImageY / fImage_Size.y;
|
||||
|
||||
_float2 UVEnd;
|
||||
UVEnd.x = UVStart.x + (iImageX / fImage_Size.x);
|
||||
UVEnd.y = UVStart.y + (iImageY / fImage_Size.y);
|
||||
|
||||
_float4 UV = _float4{UVStart.x, UVStart.y, UVEnd.x, UVEnd.y};
|
||||
m_vUV = UV;
|
||||
}
|
||||
|
||||
void CSpell_Overlay::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
@@ -222,6 +248,10 @@ HRESULT CSpell_Overlay::Bind_ShaderResources()
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageUV", &m_vUV, sizeof(_float4))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -231,15 +261,15 @@ HRESULT CSpell_Overlay::Ready_Components(void* pArg)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_spellmeter_Generic"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_ActionItemBack_4K"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_spellmeter_Accio_Overlay"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom1), nullptr)))
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_spellmeter_Generic"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom1), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_MagicEffect1"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom2), nullptr)))
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_Atlas_Spell"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom2), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -38,18 +38,20 @@ class CAction_Panel final : public CPanelObject
|
||||
_float2 m_vMagic_MeterUV[5] = {};
|
||||
_uint m_iMagic_Meter_Count{};
|
||||
|
||||
CGameObject* m_pSpell_Slot = { nullptr };
|
||||
CGameObject* m_pSpell_Image = { nullptr };
|
||||
CGameObject* m_pSpell_Overlay = { nullptr };
|
||||
CGameObject* m_pSlot_Number = { nullptr };
|
||||
CGameObject* m_pHpBarBG= { nullptr };
|
||||
CGameObject* m_pMagic_Meter1 = { nullptr };
|
||||
CGameObject* m_pMagic_Meter2 = { nullptr };
|
||||
CGameObject* m_pMagic_Meter3 = { nullptr };
|
||||
CGameObject* m_pMagic_Meter4 = { nullptr };
|
||||
CGameObject* m_pMagic_Meter5 = { nullptr };
|
||||
CGameObject* m_pMagic_Icon = { nullptr };
|
||||
CGameObject* m_pSpell_UI = { nullptr };
|
||||
CGameObject* m_pSpell_Slot = { nullptr };
|
||||
CGameObject* m_pSpell_Overlay = { nullptr };
|
||||
CGameObject* m_pSlot_Number = { nullptr };
|
||||
CGameObject* m_pHpBarBG = { nullptr };
|
||||
CGameObject* m_pMagic_Meter1 = { nullptr };
|
||||
CGameObject* m_pMagic_Meter2 = { nullptr };
|
||||
CGameObject* m_pMagic_Meter3 = { nullptr };
|
||||
CGameObject* m_pMagic_Meter4 = { nullptr };
|
||||
CGameObject* m_pMagic_Meter5 = { nullptr };
|
||||
CGameObject* m_pMagic_Icon = { nullptr };
|
||||
CGameObject* m_pSpell_UI = { nullptr };
|
||||
CGameObject* m_pPotion = { nullptr };
|
||||
CGameObject* m_pMagic_Item = { nullptr };
|
||||
|
||||
public:
|
||||
static CAction_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
|
||||
@@ -24,8 +24,8 @@ namespace Editor
|
||||
enum class SHADER_PASS_NORTEX { DEFAULT, TERRAIN, END };
|
||||
enum class SHADER_PASS_PARTICLE { EXPLOSION, END };
|
||||
enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, TRAIL_BLUR ,END };
|
||||
enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND ,NON_WORLD , BLUR_NO_WORLD , ALPHA_BLEND, END };
|
||||
enum class SHADER_PASS_UIEDITOR { DEFAULT, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, SPELLTYPE, HPBAR, MAGIC_METER, MAGIC_ICON, REMOVEUV,END };
|
||||
enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, END };
|
||||
enum class SHADER_PASS_UIEDITOR { DEFAULT, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, SPELLTYPE, HPBAR, MAGIC_METER, MAGIC_ICON, REMOVEUV, REVELIO, POTION, MAGIC_ITEM, END };
|
||||
enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, MAGIC_METER, END };
|
||||
|
||||
enum class EFFECT_TYPE { EFFECT, TRAIL, END };
|
||||
|
||||
@@ -33,15 +33,19 @@ class CHpBarBG 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 };
|
||||
|
||||
_float m_fBlinkTime{};
|
||||
_float m_fMaxHp{};
|
||||
_float m_fCurrentHp{};
|
||||
_float m_fHpBar{};
|
||||
_float m_fDamage{};
|
||||
_float m_fTargetHp{};
|
||||
_float2 m_fHpBG{};
|
||||
_float2 m_fHpBGPos{};
|
||||
_float2 m_fHpBGSize{};
|
||||
public:
|
||||
static CHpBarBG* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
|
||||
@@ -29,6 +29,7 @@ class CMagic_Icon 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 };
|
||||
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CSpell_Image final : public CElementObject
|
||||
class CMagic_Item final : public CElementObject
|
||||
{
|
||||
private:
|
||||
CSpell_Image(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CSpell_Image(const CSpell_Image& rhs);
|
||||
virtual ~CSpell_Image() = default;
|
||||
CMagic_Item(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CMagic_Item(const CMagic_Item& rhs);
|
||||
virtual ~CMagic_Item() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
@@ -19,21 +19,33 @@ class CSpell_Image final : public CElementObject
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
private:
|
||||
void Compute_UV(_uint iItemID);
|
||||
void Compute_Image();
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom1 = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom2 = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom3 = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom4 = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom5 = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
_float4 m_vUV{};
|
||||
_uint m_iArratCount{};
|
||||
_float2 m_vImageSize1 = {};
|
||||
_float2 m_vImagePos1 = {};
|
||||
_float2 m_vImageSize2 = {};
|
||||
_float2 m_vImagePos2 = {};
|
||||
public:
|
||||
static CSpell_Image* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
static CMagic_Item* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
void Describe_Entity() override;
|
||||
@@ -27,9 +27,15 @@ class CPotion final : public CElementObject
|
||||
|
||||
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 };
|
||||
|
||||
_float2 m_vImageSlotPos{};
|
||||
_float2 m_vImageSize{};
|
||||
public:
|
||||
static CPotion* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
|
||||
@@ -26,6 +26,9 @@ class CSpell_Overlay final : public CElementObject
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
private:
|
||||
void Compute_UI(_uint SpellID);
|
||||
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom1 = { nullptr };
|
||||
@@ -36,6 +39,7 @@ class CSpell_Overlay final : public CElementObject
|
||||
_int m_iImageFrameX{};
|
||||
_int m_iImageFrameY{};
|
||||
_float m_fFrame{};
|
||||
_float4 m_vUV{};
|
||||
|
||||
public:
|
||||
static CSpell_Overlay* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||