diff --git a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl
deleted file mode 100644
index 60c0ef454..000000000
--- a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl
+++ /dev/null
@@ -1,3352 +0,0 @@
-
-#include "Engine_Shader_Defines.hlsli"
-
-matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix;
-Texture2D g_DepthTexture;
-
-float3 g_CamaraPosition;
-
-int g_iImageCountX;
-int g_iImageCountY;
-
-uint g_iIndexU;
-uint g_iIndexV;
-uint g_iQuestType;
-int g_iSpellType;
-
-float g_fPI;
-float g_fFar;
-float g_fBlinkTime;
-float g_fTime;
-float g_fColorTime;
-float g_fFrame;
-float g_fDeltaU;
-float g_fDeltaV;
-float g_fAlpha;
-float g_fOwnerAlpha;
-float g_fCanvasAlpha;
-float g_fAngle;
-float g_fMapAngle;
-float g_fCoolTime;
-float g_fHp;
-
-float2 g_fViewport;
-float2 g_fOrigin_Size;
-float2 g_fCurrent_Size;
-float2 g_fPosition;
-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_fImageSizes[4];
-float4 g_fImagesUV[4];
-
-float4 g_fImageSipos1;
-float4 g_fImageSipos2;
-float4 g_fImageSipos3;
-float4 g_fImageSipos4;
-
-Texture2D g_Texture;
-Texture2D g_Texture1;
-Texture2D g_Texture2;
-Texture2D g_Texture3;
-Texture2D g_Texture4;
-Texture2D g_Texture5;
-Texture2D g_Texture6;
-Texture2D g_DiffuseTexture;
-Texture2D g_MaskingTexture;
-
-int g_iHover;
-int g_iBoosterOn;
-int g_iBoosterOff;
-int g_iFinish;
-int g_iClick;
-int g_iColor;
-int g_Count;
-int g_ChaseCount;
-
-int g_iStep1 = 0;
-int g_iStep2 = 0;
-int g_iStep3 = 0;
-
-float2 g_Trail[200];
-float2 g_ChaseTrail[200];
-
-
-struct VS_IN
-{
- float3 vPosition : POSITION;
- float2 vTexcoord : TEXCOORD0;
-};
-
-struct VS_OUT
-{
- float4 vPosition : SV_Position;
- float2 vTexcoord : TEXCOORD0;
-};
-
-VS_OUT VS_MAIN(VS_IN In)
-{
- VS_OUT Out = (VS_OUT) 0;
-
-
- matrix matWV, matWVP;
- matWV = mul(g_WorldMatrix, g_ViewMatrix);
- matWVP = mul(matWV, g_ProjMatrix);
-
- Out.vPosition = mul(vector(In.vPosition, 1.f), matWVP);
- Out.vTexcoord = In.vTexcoord;
-
- return Out;
-}
-
-struct PS_IN
-{
- float4 vPosition : SV_Position;
- float2 vTexcoord : TEXCOORD0;
-};
-
-struct PS_OUT
-{
- float4 vColor : SV_Target0;
-};
-
-PS_OUT PS_MAIN(PS_IN In)
-{
- PS_OUT Out = (PS_OUT) 0;
- float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
- float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord);
-
- Color.a *= Alpha;
- Out.vColor = Color;
- return Out;
-}
-
-PS_OUT PS_Texture_Color(PS_IN In)
-{
- PS_OUT Out = (PS_OUT) 0;
- float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
- float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
- float4 Color = g_Texture1.Sample(DefaultSampler, In.vTexcoord);
-
- tex1.rgb *= Color.rgb;
-
- tex1.a *= Alpha;
- Out.vColor = tex1;
- return Out;
-}
-
-PS_OUT PS_Logo(PS_IN In)
-{
- PS_OUT Out = (PS_OUT) 0;
- float Alpha = g_fAlpha;
- float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord);
-
- float4 Dissolve = g_MaskingTexture.Sample(DefaultSampler, In.vTexcoord);
-
- if (g_fTime >= Dissolve.r)
- discard;
-
- if (g_fTime != 0.f)
- {
- Color.a *= Dissolve.a;
- }
-
- Color.a *= Alpha;
- Out.vColor = Color;
- return Out;
-}
-
-PS_OUT PS_Logo_Text(PS_IN In)
-{
- PS_OUT Out = (PS_OUT) 0;
- float Alpha = g_fAlpha;
- float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord);
-
- Color.rgb = (Color.rgb - 0.5f) * 1.2f + 0.5f;
-
- Color.rgb = pow(clamp(Color.rgb, 0.f, 1.f), 1.25f);
-
- float luminance = dot(Color.rgb, float3(0.299f, 0.587f, 0.114f));
- float light = smoothstep(0.7f, 0.92f, luminance);
- Color.rgb *= (1.0f - light * 0.1f);
-
- Color.rgb = lerp(Color.rgb, Color.rgb * Color.rgb, 0.12f);
-
- Color.rgb *= 0.7f;
-
- Color.rgb = saturate(Color.rgb);
-
-
- Color.a *= Alpha;
- Out.vColor = Color;
- return Out;
-}
-
-PS_OUT PS_Logo_Glow(PS_IN In)
-{
- PS_OUT Out = (PS_OUT) 0;
- float Alpha = g_fAlpha;
- float4 Color = float4(1.f, 1.f, 1.f, 1.f);
-
- float tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord).r;
- float4 tex2 = g_Texture1.Sample(DefaultSampler, In.vTexcoord);
- float3 Blue = float3(14.f, 180.f, 252.f) / 255.f;
-
- Color.a *= tex1;
- tex2.rgb *= Color.a * 5.f * Alpha;
- Color.rgb *= Blue;
-
- Color = lerp(Color, tex2, tex2.a);
-
- Color.a *= Alpha;
- Out.vColor = Color;
- return Out;
-}
-
-PS_OUT PS_AlphaBlend(PS_IN In)
-{
- PS_OUT Out = (PS_OUT) 0;
- float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
-
- float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord);
-
- Color.rgb *= 1.5f;
-
- Color.a *= Alpha;
- Out.vColor = Color;
-
- return Out;
-}
-
-PS_OUT PS_Clamp(PS_IN In)
-{
- PS_OUT Out = (PS_OUT) 0;
- float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
-
- float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord);
-
- Color.rgb = saturate(Color.rgb * g_fTime);
-
- Color.a *= Alpha;
- Out.vColor = Color;
-
- return Out;
-}
-
-PS_OUT PS_Cursor(PS_IN In)
-{
- PS_OUT Out = (PS_OUT) 0;
- float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
-
- float4 Color = float4(0.f, 0.f, 0.f, 0.f);
- float4 White = float4(1.f, 1.f, 1.f, 1.f);
-
- float2 UV = In.vTexcoord;
- float2 Center = float2(0.5f, 0.5f);
-
- float CW = -g_fTime;
- float CCW = g_fTime;
-
- float2 RedCircle = UV;
- float2 RedUV = UV - Center;
-
- RedCircle.x = RedUV.x * cos(CCW) - RedUV.y * sin(CCW);
- RedCircle.y = RedUV.x * sin(CCW) + RedUV.y * cos(CCW);
- RedCircle = RedCircle + Center;
-
- float2 BlueCircle = UV;
- float2 BlueUV = UV - Center;
-
- BlueCircle.x = BlueUV.x * cos(CW) - BlueUV.y * sin(CW);
- BlueCircle.y = BlueUV.x * sin(CW) + BlueUV.y * cos(CW);
- BlueCircle = BlueCircle + Center;
-
-
- float4 Texture1 = g_Texture.Sample(ClampSampler, RedCircle);
- float4 Texture2 = g_Texture2.Sample(ClampSampler, BlueCircle);
-
- if (Texture1.r >= 0.7f)
- Color = Texture1;
-
- if (Texture2.b >= 0.7f)
- Color = Texture2;
-
- if (all(Color.rgb <= 0.5f))
- discard;
-
- Color = White;
-
- Color.a *= Alpha;
-
- Out.vColor = Color;
-
- return Out;
-}
-
-PS_OUT PS_Key_Hold_Rotation(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 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
- Color = tex1;
-
- float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size;
- float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size;
- float2 Imagelocal = (In.vTexcoord - Imagetexpos1) / Imagetexsize1;
- bool inside1 = all(Imagelocal >= 0.0f && Imagelocal <= 1.0f);
- float4 tex2 = g_Texture1.Sample(ClampSampler, Imagelocal);
- if (inside1)
- {
- float2 center = float2(0.5f, 0.5f);
- float2 dir = Imagelocal - center;
-
- float angle = atan2(dir.x, -dir.y);
- if (angle < 0)
- angle += g_fPI;
-
- float rotation = saturate(g_fTime) * g_fPI;
-
- tex2.rgb = (angle <= rotation) ? 1.0 : tex2.rgb;
-
-
- Color = lerp(Color, tex2, tex2.a);
- }
-
-
-
- float2 Imagetexpos2 = g_fImageSipos2.xy / g_fCurrent_Size;
- float2 Imagetexsize2 = g_fImageSipos2.zw / g_fCurrent_Size;
- float2 Imagelocal2 = (In.vTexcoord - Imagetexpos2) / Imagetexsize2;
- bool inside2 = all(Imagelocal2 >= 0.0f && Imagelocal2 <= 1.0f);
- if (inside2)
- {
- float2 atlasUV = g_fImageUV.xy + Imagelocal2 * (g_fImageUV.zw - g_fImageUV.xy);
- float2 safeUV = saturate(atlasUV);
- float4 tex3 = g_Texture2.Sample(ClampSampler, safeUV);
- Color = lerp(Color, tex3, tex3.a);
- }
-
- float2 Imagetexpos3 = g_fImageSipos3.xy / g_fCurrent_Size;
- float2 Imagetexsize3 = g_fImageSipos3.zw / g_fCurrent_Size;
- float2 Imagelocal3 = (In.vTexcoord - Imagetexpos3) / Imagetexsize3;
- bool inside3 = all(Imagelocal3 >= 0.0f && Imagelocal3 <= 1.0f);
- if (inside3)
- {
- float3 QuestColor = float3(253.f, 207.f, 11.f) / 255.f;
-
- float4 tex4 = g_Texture3.Sample(ClampSampler, Imagelocal3);
-
- if (g_iQuestType == 0)
- {
-
- tex4.rgb *= QuestColor;
-
- }
-
- Color = lerp(Color, tex4, tex4.a);
- }
-
- Color.a *= Alpha;
-
- Out.vColor = Color;
-
- return Out;
-}
-
-PS_OUT PS_Mission(PS_IN In)
-{
- PS_OUT Out = (PS_OUT) 0;
- float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
-
- float4 Color = float4(0.f, 0.f, 0.f, 0.f);
-
- float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
- float4 tex2 = g_Texture1.Sample(DefaultSampler, In.vTexcoord);
-
- tex1.a *= 0.5f;
-
- if (tex1.a >= 0.f)
- Color = tex1;
-
- Color = lerp(Color, tex2, tex2.a);
-
- Color.a *= Alpha;
- Out.vColor = Color;
- return Out;
-}
-
-PS_OUT PS_Sptire_Sheet(PS_IN In)
-{
- PS_OUT Out = (PS_OUT) 0;
- float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
- float4 Color = float4(0.f, 0.f, 0.f, 0.f);
- float2 UV = In.vTexcoord;
-
- int iTotalFrame = g_iImageCountX * g_iImageCountY;
-
- uint iCurrentFrame = uint(floor(g_fTime / g_fFrame)) % iTotalFrame;
-
- int iFrameX = iCurrentFrame % g_iImageCountX;
- int iFrameY = iCurrentFrame / g_iImageCountX;
-
- float fFreamWidth = 1.0 / g_iImageCountX;
- float fFreamHeight = 1.0 / g_iImageCountY;
-
- UV.x = UV.x * fFreamWidth + iFrameX * fFreamWidth;
- UV.y = UV.y * fFreamHeight + iFrameY * fFreamHeight;
-
- float4 Texture = g_Texture.Sample(DefaultSampler, UV);
-
- Color = Texture;
-
- if (Color.r <= 0.4f)
- discard;
-
-
- Color.a *= Alpha;
-
- Out.vColor = Color;
-
- return Out;
-}
-
-PS_OUT PS_QuestType(PS_IN In)
-{
- PS_OUT Out = (PS_OUT) 0;
- float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
- float3 Color = float3(253.f, 207.f, 11.f) / 255.f;
- float4 Texture1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
-
- if (g_iQuestType == 0)
- {
- if (Texture1.r >= 0.3f)
- {
- Texture1.rgb = Color;
- }
- }
-
- Texture1.a *= Alpha;
- Out.vColor = Texture1;
-
- return Out;
-}
-
-PS_OUT PS_Spell_Anim(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 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
-
- Color = tex1;
-
- float2 texpos = g_fImageSipos1.xy / g_fCurrent_Size;
- float2 texsize = g_fImageSipos1.zw / g_fCurrent_Size;
- float2 texlocal = (In.vTexcoord - texpos) / texsize;
- bool inside = all(texlocal >= 0.0f && texlocal <= 1.0f);
- if (inside)
- {
- float4 tex2 = g_Texture1.Sample(DefaultSampler, texlocal);
- Color = lerp(Color, tex2, tex2.a);
- }
-
- Color.a *= Alpha;
- Out.vColor = Color;
-
- return Out;
-}
-
-PS_OUT PS_NineSlice(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);
- 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);
- float4 tex2 = g_Texture1.Sample(ClampSampler, Finaluv);
-
- tex1.a *= 0.5f;
-
- if (tex1.a >= 0.f)
- Color = tex1;
-
- Color = lerp(Color, tex2, tex2.a);
-
- Color.a *= Alpha;
- Out.vColor = Color;
- return Out;
-}
-
-PS_OUT PS_Rotation(PS_IN In)
-{
- PS_OUT Out = (PS_OUT) 0;
- float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
-
- float4 color = float4(0.f, 0.f, 0.f, 0.f);
-
- float2 center = float2(0.5f, 0.5f);
- float2 uv = In.vTexcoord - center;
- float2 Rotation;
- Rotation.x = uv.x * cos(g_fMapAngle) - uv.y * sin(g_fMapAngle);
- Rotation.y = uv.x * sin(g_fMapAngle) + uv.y * cos(g_fMapAngle);
- Rotation += center;
-
- float4 tex1 = g_Texture.Sample(BorderZeroLinearSampler, Rotation);
-
- if (tex1.a <= 0.f)
- discard;
-
- color = tex1;
-
- color.a *= Alpha;
-
- Out.vColor = color;
- return Out;
-
-}
-
-PS_OUT PS_Slot(PS_IN In)
-{
- PS_OUT Out = (PS_OUT) 0;
- float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
-
- 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 color = g_Texture.Sample(ClampSampler, Rotation);
-
- color.a *= Alpha;
-
- Out.vColor = color;
-
- return Out;
-}
-
-PS_OUT PS_SpellAnim(PS_IN In)
-{
- PS_OUT Out = (PS_OUT) 0;
-
- float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
-
- 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)
- {
- case 0:
- BGColor = float3(220.f, 165.f, 70.f) / 255.f;
- break;
- case 1:
- BGColor = float3(150.f, 120.f, 240.f) / 255.f;
- break;
- case 2:
- BGColor = float3(190.f, 46., 34.f) / 255.f;
- break;
- case 3:
- BGColor = float3(24.f, 190.f, 255.f) / 255.f;
- break;
- case 4:
- BGColor = float3(200.f, 220.f, 150.f) / 255.f;
- break;
- case 5:
- BGColor = float3(50.f, 150.f, 110.f) / 255.f;
- break;
- case 6:
- BGColor = float3(0.f, 0.f, 0.f);
- break;
- }
- float4 color1 = float4(1.f, 1.f, 1.f, 1.f);
-
- float2 OverrayUV = In.vTexcoord;
- float CoolTime = 1.f - g_fDeltaV;
- float CoolTime2 = 1.f - g_fDeltaV + 0.1f;
- atlasUV = startUV + In.vTexcoord * (endUV - startUV);
- float4 tex3 = g_Texture1.Sample(ClampSampler, OverrayUV);
- tex3.rgb *= BGColor;
- float4 tex4 = g_Texture2.Sample(DefaultSampler, atlasUV);
-
- if (tex4.a >= 0.9f)
- tex3 = tex4;
-
- color1 = tex3;
-
- float wave1 = sin(OverrayUV.x * 10.f + g_fTime) * 0.01f;
- float wave2 = sin(OverrayUV.x * 10.f + g_fTime) * 0.01f;
- float waveThreshold1 = CoolTime + wave1;
- float waveThreshold2 = CoolTime2 + wave2;
- float2 waveUV = float2(waveUV.x = OverrayUV.x * 2.f + g_fTime * 0.3f, waveUV.y = (OverrayUV.y - waveThreshold1) / (waveThreshold2 - waveThreshold1));
- waveUV = saturate(waveUV);
- float tex5 = g_Texture3.Sample(DefaultSampler, waveUV).r;
-
- if (g_fDeltaV <= 1.f)
- {
- if (OverrayUV.y >= waveThreshold1 && OverrayUV.y <= waveThreshold2)
- {
- color1.rgb += float3(1.f, 1.f, 1.f) * tex5 * g_fDeltaU;
- }
- }
-
- float waveThreshold = CoolTime + wave1;
-
- if (OverrayUV.y <= waveThreshold)
- {
- color1.a = 0.f;
- }
-
- color = lerp(color, color1, color1.a);
-
- color.a *= Alpha;
-
- Out.vColor = color;
- return Out;
-}
-
-PS_OUT PS_HpBar(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);
- 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 - localUV.x;
-
- float4 tex3 = g_Texture2.Sample(ClampSampler, localUV);
-
- if (reversuv.x >= g_fHp)
- {
- tex3.rgb = float3(0.f, 0.f, 0.f);
- }
-
- 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;
-
- 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;
- return Out;
-}
-
-PS_OUT PS_Magic_Meter(PS_IN In)
-{
- PS_OUT Out = (PS_OUT) 0;
- float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
- float3 Blue = float3(41.f, 165.f, 255.f) / 255.f;
-
- float4 color = float4(1.f, 1.f, 1.f, 1.f);
- float4 tex1 = g_Texture.Sample(ClampSampler, In.vTexcoord);
- float4 tex2 = g_Texture1.Sample(ClampSampler, In.vTexcoord);
-
- float2 reverseuv = 1.f - In.vTexcoord;
-
- color = tex1;
- tex2.rgb *= Blue * 1.5f;
-
- if (reverseuv.x >= g_fHp)
- {
- tex2.rgb = float3(0.f, 0.f, 0.f);
- }
-
- if (all(color.rgb >= float3(65.f / 255.f, 65.f / 255.f, 65.f / 255.f)))
- color = tex2;
-
- color.a *= Alpha;
-
- Out.vColor = color;
-
- return Out;
-}
-
-
-PS_OUT PS_Magic_Icon(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);
-
- 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;
- float scale = 1.2;
-
- uv = (uv - center) * scale + center;
- float4 tex3 = g_Texture2.Sample(ClampSampler, uv);
-
-
- Color = Color * (1 - tex3.a) + tex3;
-
- Color.a *= Alpha;
- Out.vColor = Color;
-
- return Out;
-}
-
-PS_OUT PS_RemapUV(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);
-
-
- float2 startUV = g_fImageUV.xy;
- float2 endUV = g_fImageUV.zw;
-
- float2 atlasUV = startUV + In.vTexcoord * (endUV - startUV);
-
- float4 tex1 = g_Texture.Sample(DefaultSampler, atlasUV);
-
- Color = tex1;
-
- Color.a *= Alpha;
- Out.vColor = Color;
-
- return Out;
-}
-
-PS_OUT PS_Revelio(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);
- float2 UV = In.vTexcoord;
-
- //float2 Position[4];
- //float2 startUV[4];
- //float2 endUV[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;
-
- // 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]);
-
-
-
- ////float2 atlasUV = startUV + In.vTexcoord * (endUV - startUV);
-
- Color.a *= Alpha;
- Out.vColor = Color;
-
- return Out;
-}
-
-PS_OUT PS_Potion(PS_IN In)
-{
- PS_OUT Out = (PS_OUT) 0;
- 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 = (PS_OUT) 0;
- 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.1f;
- 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;
- float2 waveUV = float2(waveUV.x = OverrayUV.x * 2.f + g_fTime * 0.3f, waveUV.y = (OverrayUV.y - waveThreshold1) / (waveThreshold2 - waveThreshold1));
- waveUV = saturate(waveUV);
- float Mask = g_MaskingTexture.Sample(DefaultSampler, waveUV).r;
- if (g_fDeltaV <= 1.f)
- {
- if (OverrayUV.y >= waveThreshold1 && OverrayUV.y <= waveThreshold2)
- {
- color1.rgb += float3(1.f, 1.f, 1.f) * Mask * 1.f;
- }
- }
-
- float waveThreshold = CoolTime + wave1;
-
- if (OverrayUV.y <= waveThreshold)
- {
- 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;
-}
-
-PS_OUT PS_Spell_Preview(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);
- 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(DefaultSampler, Finaluv);
- float4 tex2 = g_Texture1.Sample(DefaultSampler, In.vTexcoord);
- float4 tex3 = g_Texture2.Sample(DefaultSampler, Finaluv);
- Color = tex1;
-
- tex3.rgb = tex2.rgb;
-
- Color = lerp(Color, tex3, tex3.a);
-
- float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size;
- float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size;
- float2 Imagelocal = (In.vTexcoord - Imagetexpos1) / Imagetexsize1;
- bool inside1 = all(Imagelocal >= 0.0f && Imagelocal <= 1.0f);
- float4 tex4 = g_Texture3.Sample(DefaultSampler, Finaluv);
- if (inside1)
- {
- Color = lerp(Color, tex4, tex4.a);
- }
-
- Color.a *= Alpha;
-
- Out.vColor = Color;
-
- return Out;
-}
-
-PS_OUT PS_Spell_Header(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);
-
- float3 BGColor = float3(1.f, 1.f, 1.f);
-
- switch (g_iSpellType)
- {
- case 0:
- BGColor = float3(220.f, 165.f, 70.f) / 255.f;
- break;
- case 1:
- BGColor = float3(150.f, 120.f, 240.f) / 255.f;
- break;
- case 2:
- BGColor = float3(190.f, 46., 34.f) / 255.f;
- break;
- case 3:
- BGColor = float3(24.f, 190.f, 255.f) / 255.f;
- break;
- case 4:
- BGColor = float3(200.f, 220.f, 150.f) / 255.f;
- break;
- case 5:
- BGColor = float3(50.f, 150.f, 110.f) / 255.f;
- break;
- case 6:
- BGColor = float3(0.f, 0.f, 0.f);
- break;
- }
-
- float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
- Color.rgb = tex1.rgb * 0.8f;
- Color.a = tex1.a;
-
- Color.rgb *= BGColor;
-
- Color.a *= Alpha * 0.5f;
-
- Out.vColor = Color;
-
- return Out;
-}
-
-PS_OUT PS_Spell_Header_Line(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);
- 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(DefaultSampler, Finaluv);
- float4 tex2 = g_Texture1.Sample(DefaultSampler, In.vTexcoord);
- Color = tex1;
-
- //Color.rgb = tex2.rgb;
-
- Color.a *= Alpha;
-
- Out.vColor = Color;
-
- return Out;
-}
-
-PS_OUT PS_Spell_Drag(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 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
- float tex2 = g_Texture1.Sample(DefaultSampler, In.vTexcoord).r;
- float4 tex2Color = g_Texture2.Sample(DefaultSampler, In.vTexcoord);
-
- tex2Color.a = tex2;
- Color = lerp(tex1, tex2Color, tex2Color.a);
-
- float2 atlasUV = g_fImageUV.xy + In.vTexcoord * (g_fImageUV.zw - g_fImageUV.xy);
- //float2 center = (g_fImageUV.xy + g_fImageUV.zw) * 0.5f;
- //float2 uv = atlasUV - center;
- //uv *= 0.7f;
- //uv += center;
- float4 tex3 = g_Texture3.Sample(ClampSampler, atlasUV);
-
- Color = lerp(Color, tex3, tex3.a);
-
- Color.a *= Alpha;
-
- Out.vColor = Color;
-
- return Out;
-}
-
-PS_OUT PS_Camera_LockOn(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);
-
- float2 center = float2(0.5, 0.5);
- float2 uv = In.vTexcoord - center;
- float angle = -g_fTime;
- float s = sin(angle);
- float c = cos(angle);
- float2 maskuv = float2(uv.x * c - uv.y * s, uv.x * s + uv.y * c) + center;
-
- float tex1 = g_Texture.Sample(ClampSampler, maskuv).r;
-
- Color.a = tex1 * 0.3f;
-
- if (g_iHover == 0)
- {
- float4 tex2 = g_Texture1.Sample(ClampSampler, maskuv);
-
- Color.rgb += (tex2.rgb * tex2.a) * 2.f;
- }
-
- float2 UpUV = In.vTexcoord;
- UpUV.y += g_fTime;
-
- float4 tex3 = g_Texture2.Sample(DefaultSampler, UpUV);
- float tex4 = g_Texture1.Sample(ClampSampler, In.vTexcoord).r;
-
- tex3.a *= tex4;
-
- Color = lerp(Color, tex3, tex3.a);
-
- Color.a *= Alpha;
-
- Out.vColor = Color;
-
- return Out;
-}
-
-PS_OUT PS_Loding_Screen(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 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
- float4 tex2 = g_Texture1.Sample(DefaultSampler, In.vTexcoord);
- Color = tex1;
- Color = lerp(Color, tex2, tex2.a);
-
- //float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size;
- //float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size;
- //float2 Imagelocal = (In.vTexcoord - Imagetexpos1) / Imagetexsize1;
- //bool inside1 = all(Imagelocal >= 0.0f && Imagelocal <= 1.0f);
- //if (inside1)
- //{
- // float2 uv = saturate(Imagelocal);
- // float4 tex2 = g_Texture1.Sample(DefaultSampler, uv);
-
- // Color = lerp(Color, tex2, tex2.a);
- //}
-
- Color.a *= Alpha;
-
- Out.vColor = Color;
-
- return Out;
-}
-
-PS_OUT PS_Enemy_HpBer(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(DefaultSampler, Finaluv);
- float4 tex2 = g_Texture1.Sample(DefaultSampler, Finaluv);
-
- Color = tex1;
-
- tex2.rgb *= float3(1.f, 0.f, 0.f);
-
- if (In.vTexcoord.x >= g_fHp)
- {
- tex2.rgb = float3(0.f, 0.f, 0.f);
- }
-
- Color = lerp(Color, tex2, tex2.a);
-
- if (Color.a <= 0.f)
- discard;
-
- if (g_iHover != 0)
- {
- float4 tex3 = g_Texture2.Sample(DefaultSampler, In.vTexcoord);
-
- tex3.rgb *= float3(1.f, 0.f, 0.f);
-
- if (g_fTime >= tex3.r)
- {
- Color.a *= tex3.r;
- Color.rgb = float3(1.f, 0.f, 0.f);
- }
- }
-
- Color.a *= Alpha;
- Out.vColor = Color;
- return Out;
-}
-
-PS_OUT PS_Boss_HpBer(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(DefaultSampler, Finaluv);
- float4 tex2 = g_Texture1.Sample(DefaultSampler, Finaluv);
-
- Color = tex1;
-
- tex2.rgb *= float3(1.f, 0.f, 0.f);
-
- if (In.vTexcoord.x >= g_fHp)
- {
- tex2.rgb = float3(0.f, 0.f, 0.f);
- }
-
- if (all(Color.rgb >= (float3(55.f, 55.f, 55.f) / 255.f)))
- Color = tex2;
-
-
- Color.a *= Alpha;
- Out.vColor = Color;
- return Out;
-}
-
-PS_OUT PS_Quest_Border(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(DefaultSampler, Finaluv);
- Color = tex1;
-
- if (g_iColor == 1)
- Color.rgb *= float3(100.f, 0.f, 100.f) / 255.f;
-
- if (g_iColor == 2)
- {
- Color.rgb *= 0.3f;
- }
-
- Color.a *= Alpha;
- Out.vColor = Color;
- return Out;
-}
-
-PS_OUT PS_Quest_Info(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(DefaultSampler, Finaluv);
- float4 tex2 = g_Texture1.Sample(DefaultSampler, Finaluv);
-
- Color = tex1;
-
- Color = lerp(Color, tex2, tex2.a);
-
- Color.a *= Alpha;
- Out.vColor = Color;
- return Out;
-}
-
-PS_OUT PS_Quest_Status(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);
-
- if (g_iClick == 0)
- {
- if (g_iHover == 0)
- {
- float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
- tex1.rgb *= float3(60.f, 80.f, 150.f) / 255.f;
- Color = tex1;
- float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size;
- float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size;
- float2 Imagelocal1 = (In.vTexcoord - Imagetexpos1) / Imagetexsize1;
- bool inside1 = all(Imagelocal1 >= 0.0f && Imagelocal1 <= 1.0f);
- if (inside1)
- {
- float2 atlasUV = g_fImageUV.xy + Imagelocal1 * (g_fImageUV.zw - g_fImageUV.xy);
- float2 safeUV = saturate(atlasUV);
- float4 tex2 = g_Texture1.Sample(DefaultSampler, safeUV);
- Color = lerp(Color, tex2, tex2.a);
- }
- }
- else
- {
- float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
- Color = tex1;
- float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size;
- float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size;
- float2 Imagelocal1 = (In.vTexcoord - Imagetexpos1) / Imagetexsize1;
- bool inside1 = all(Imagelocal1 >= 0.0f && Imagelocal1 <= 1.0f);
- if (inside1)
- {
- float2 atlasUV = g_fImageUV.xy + Imagelocal1 * (g_fImageUV.zw - g_fImageUV.xy);
- float2 safeUV = saturate(atlasUV);
- float4 tex2 = g_Texture1.Sample(DefaultSampler, safeUV);
- Color = lerp(Color, tex2, tex2.a);
- }
- }
- }
- else
- {
- float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
- Color = tex1;
- float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size;
- float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size;
- float2 Imagelocal1 = (In.vTexcoord - Imagetexpos1) / Imagetexsize1;
- bool inside1 = all(Imagelocal1 >= 0.0f && Imagelocal1 <= 1.0f);
- if (inside1)
- {
- float2 atlasUV = g_fImageUV.xy + Imagelocal1 * (g_fImageUV.zw - g_fImageUV.xy);
- float2 safeUV = saturate(atlasUV);
- float4 tex2 = g_Texture1.Sample(DefaultSampler, safeUV);
- Color = lerp(Color, tex2, tex2.a);
- }
- float mask = g_Texture2.Sample(DefaultSampler, In.vTexcoord).r;
- float3 glowColor = float3(1.0f, 1.0f, 1.0f);
- Color.rgb += glowColor * mask * 0.5f;
- Color.rgb *= float3(140.f, 140.f, 20.f) / 255.f;
- }
-
-
-
- Color.a *= Alpha;
- Out.vColor = Color;
- return Out;
-}
-
-PS_OUT PS_Broomstick(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);
-
- 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);
- float4 tex2 = g_Texture1.Sample(ClampSampler, Rotation);
- tex1.rgb *= 0.4f;
- color = tex1;
- tex2.rgb *= 0.3f;
-
- color = lerp(color, tex2, tex2.a);
-
- float2 texpos1 = g_fImageSipos1.xy / g_fCurrent_Size * 0.5f;
- float2 texsize1 = g_fImageSipos1.zw / g_fCurrent_Size * 0.5;
- float2 texlocal1 = (In.vTexcoord - texpos1) / texsize1;
- bool inside1 = all(texlocal1 >= 0.0f && texlocal1 <= 1.0f);
- if (inside1)
- {
- float4 tex3 = g_Texture2.Sample(ClampSampler, texlocal1);
- color = lerp(color, tex3, tex3.a);
- }
-
- float2 texpos2 = g_fImageSipos2.xy / g_fCurrent_Size;
- float2 texsize2 = g_fImageSipos2.zw / g_fCurrent_Size;
- float2 texlocal2 = (In.vTexcoord - texpos2) / texsize2;
- bool inside2 = all(texlocal2 >= 0.0f && texlocal2 <= 1.0f);
- if (inside2)
- {
- float2 startUV = g_fImageUV.xy;
- float2 endUV = g_fImageUV.zw;
- float2 atlasUV = atlasUV = startUV + texlocal2 * (endUV - startUV);
- float4 tex4 = g_Texture3.Sample(DefaultSampler, atlasUV);
- color = lerp(color, tex4, tex4.a);
- }
-
- color.a *= Alpha;
-
- Out.vColor = color;
- return Out;
-}
-
-
-PS_OUT PS_SpellLearn(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 tex = g_Texture.Sample(DefaultSampler, In.vTexcoord);
- float tex1 = g_Texture1.Sample(DefaultSampler, In.vTexcoord).r;
- Color = tex;
-
- tex1 *= 0.95f;
-
- Color.a = tex1;
-
- Color.a *= Alpha;
-
- Out.vColor = Color;
- return Out;
-}
-
-PS_OUT PS_SpellLearnColor(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 tex = g_Texture.Sample(DefaultSampler, In.vTexcoord);
- float4 tex1 = g_Texture1.Sample(DefaultSampler, In.vTexcoord);
- Color = tex;
-
- Color.rgb *= tex1.rgb;
-
- float2 rectPos = g_fPosition - float2(256.f, 259.f);
- float2 rectSize = g_fCurrent_Size;
-
- float2 itemPos = g_fItemPosition1;
- float2 itemSize = g_fItemImageSizes1;
-
- float2 pixelPos;
- pixelPos.x = rectPos.x + In.vTexcoord.x * rectSize.x;
- pixelPos.y = rectPos.y + (1.0f - In.vTexcoord.y) * rectSize.y;
-
- if (pixelPos.x >= itemPos.x &&
- pixelPos.x <= itemPos.x + itemSize.x &&
- pixelPos.y >= itemPos.y &&
- pixelPos.y <= itemPos.y + itemSize.y)
- {
- Color.rgb = float3(0.f, 0.f, 1.f);
- }
-
- for (int i = 0; i < g_Count; ++i)
- {
- float2 trailTopLeft = g_Trail[i];
- float2 trailCenter = trailTopLeft + itemSize / 2.0f;
-
- float halfWidth = itemSize.x / 2.0f + 12.f;
- float halfHeight = itemSize.y / 2.0f + 12.f;
-
- if (pixelPos.x >= trailCenter.x - halfWidth &&
- pixelPos.x <= trailCenter.x + halfWidth &&
- pixelPos.y >= trailCenter.y - halfHeight &&
- pixelPos.y <= trailCenter.y + halfHeight)
- {
- Color.rgb = float3(20.f, 100.f, 180.f) / 255.f;
- break;
- }
- }
-
- for (int j = 0; j < g_ChaseCount; ++j)
- {
- float2 ChaseTopLeft = g_ChaseTrail[j];
- float2 ChaseCenter = ChaseTopLeft + itemSize / 2.0f;
-
- float halfWidth = itemSize.x * 0.7f;
- float halfHeight = itemSize.y * 0.7f;
-
- if (pixelPos.x >= ChaseCenter.x - halfWidth &&
- pixelPos.x <= ChaseCenter.x + halfWidth &&
- pixelPos.y >= ChaseCenter.y - halfHeight &&
- pixelPos.y <= ChaseCenter.y + halfHeight)
- {
- Color.rgb = float3(110.f, 5.f, 5.f) / 255.f;
- break;
- }
- }
-
- Color.a *= Alpha;
- Out.vColor = Color;
- return Out;
-}
-
-PS_OUT PS_SpellLearnBooster(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 tex = g_Texture.Sample(DefaultSampler, In.vTexcoord);
-
- Color = tex;
-
- float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size;
- float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size;
- float2 Imagelocal = (In.vTexcoord - Imagetexpos1) / Imagetexsize1;
- bool inside1 = all(Imagelocal >= 0.0f && Imagelocal <= 1.0f);
-
- if (g_iBoosterOn == 0 && g_iBoosterOff == 0)
- {
- if (inside1)
- {
- float4 tex1 = g_Texture1.Sample(DefaultSampler, Imagelocal);
- Color = lerp(Color, tex1, tex1.a);
- }
- }
- else if (g_iBoosterOn != 0 && g_iBoosterOff == 0)
- {
-
- float4 tex3 = g_Texture3.Sample(DefaultSampler, In.vTexcoord);
- Color = lerp(Color, tex3, tex3.a);
- }
- else if (g_iBoosterOn == 0 && g_iBoosterOff != 0)
- {
- float4 tex2 = g_Texture2.Sample(DefaultSampler, In.vTexcoord);
-
- tex2.rgb *= float3(1.f, 0.f, 0.f);
- Color = tex;
-
- Color = lerp(Color, tex2, tex2.a);
- }
-
- Color.a *= Alpha;
- Out.vColor = Color;
- return Out;
-}
-
-PS_OUT PS_NPCInteraction(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);
- 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);
-
- Color = tex1;
-
- float2 texpos1 = g_fImageSipos1.xy / g_fCurrent_Size * 0.5f;
- float2 texsize1 = g_fImageSipos1.zw / g_fCurrent_Size * 0.5;
- float2 texlocal1 = (In.vTexcoord - texpos1) / texsize1;
- bool inside1 = all(texlocal1 >= 0.0f && texlocal1 <= 1.0f);
- if (inside1)
- {
- float2 startUV = g_fImageUV.xy;
- float2 endUV = g_fImageUV.zw;
- float2 atlasUV = atlasUV = startUV + texlocal1 * (endUV - startUV);
- float4 tex2 = g_Texture1.Sample(DefaultSampler, atlasUV);
- Color = lerp(Color, tex2, tex2.a);
-
- }
-
- Color.a *= Alpha;
-
- Out.vColor = Color;
- return Out;
-}
-
-PS_OUT PS_CanvasFade(PS_IN In)
-{
- PS_OUT Out = (PS_OUT) 0;
- float Alpha = g_fAlpha;
- float4 Color = float4(0.f, 0.f, 0.f, 1.f);
-
- float4 tex = g_Texture.Sample(DefaultSampler, In.vTexcoord);
-
- Color = tex;
-
- Color.a = Alpha;
-
- Out.vColor = Color;
- return Out;
-}
-
-PS_OUT PS_FlagWave(PS_IN In)
-{
- PS_OUT Out;
- float Alpha = g_fAlpha;
- float4 Color = float4(0.f, 0.f, 0.f, 1.f);
-
- float2 uv = In.vTexcoord;
-
- float phase = uv.y * 1.5f;
-
- float waveX =
- sin(uv.y * 20.f + g_fTime * 1.0f + phase) * 0.007f;
-
- float waveY =
- sin(uv.x * 12.f + g_fTime * 0.8f) * 0.002f;
-
- uv.x += waveX;
- uv.y += waveY;
-
- float4 tex = g_Texture.Sample(ClampSampler, uv);
-
- Color = tex;
-
- if (Color.r <= 0.f)
- discard;
-
- Color.a = Alpha;
-
- Out.vColor = Color;
- return Out;
-}
-
-PS_OUT PS_BroomCircle(PS_IN In)
-{
- PS_OUT Out;
- float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
-
- float4 color = float4(0.f, 0.f, 0.f, 0.f);
-
- float2 center = float2(0.5f, 0.5f);
- float2 uv = In.vTexcoord - center;
- float2 Rotation;
- 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 tex = g_Texture.Sample(BorderZeroLinearSampler, Rotation);
- color = tex;
-
- float Diffuse = g_Texture1.Sample(DefaultSampler, In.vTexcoord).r;
-
- if (g_iHover != 0)
- {
- if (g_fTime >= Diffuse)
- {
- discard;
- }
- }
-
- if (g_iFinish == 0)
- {
- float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size;
- float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size;
- float2 Imagelocal1 = (In.vTexcoord - Imagetexpos1) / Imagetexsize1;
- bool inside1 = all(Imagelocal1 >= 0.0f && Imagelocal1 <= 1.0f);
- if (inside1)
- {
- float4 tex1 = g_Texture2.Sample(DefaultSampler, Imagelocal1);
- color = lerp(color, tex1, tex1.a);
- }
- }
-
- color.a *= Alpha;
-
- Out.vColor = color;
- return Out;
-}
-
-PS_OUT PS_Ride_info_Key(PS_IN In)
-{
- PS_OUT Out;
-
- float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
-
- float4 Color = float4(1.f, 1.f, 1.f, 1.f);
-
- float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
- Color = tex1;
-
- float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size;
- float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size;
- float2 Imagelocal1 = (In.vTexcoord - Imagetexpos1) / Imagetexsize1;
- bool inside1 = all(Imagelocal1 >= 0.0f && Imagelocal1 <= 1.0f);
- if (inside1)
- {
- float2 atlasUV = g_fImageUV.xy + Imagelocal1 * (g_fImageUV.zw - g_fImageUV.xy);
- float2 safeUV = saturate(atlasUV);
- float4 tex2 = g_Texture1.Sample(ClampSampler, safeUV);
- Color = lerp(Color, tex2, tex2.a);
- }
-
- float2 Imagetexpos2 = g_fImageSipos2.xy / g_fCurrent_Size;
- float2 Imagetexsize2 = g_fImageSipos2.zw / g_fCurrent_Size;
- float2 Imagelocal2 = (In.vTexcoord - Imagetexpos2) / Imagetexsize2;
- bool inside2 = all(Imagelocal2 >= 0.0f && Imagelocal2 <= 1.0f);
- if (inside2)
- {
- float4 tex3 = g_Texture2.Sample(ClampSampler, Imagelocal2);
- Color = lerp(Color, tex3, tex3.a);
- }
-
- Color.a *= Alpha;
-
- Out.vColor = Color;
-
- return Out;
-}
-
-PS_OUT PS_Ride_Info(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 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 tex = g_Texture.Sample(ClampSampler, Finaluv);
-
- Color = tex;
-
- float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size;
- float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size;
- float2 Imagelocal1 = (In.vTexcoord - Imagetexpos1) / Imagetexsize1;
- bool inside1 = all(Imagelocal1 >= 0.0f && Imagelocal1 <= 1.0f);
- if (inside1)
- {
- float4 tex1 = g_Texture1.Sample(ClampSampler, Imagelocal1);
- Color = lerp(Color, tex1, tex1.a);
- }
-
- float2 Imagetexpos2 = g_fImageSipos2.xy / g_fCurrent_Size;
- float2 Imagetexsize2 = g_fImageSipos2.zw / g_fCurrent_Size;
- float2 Imagelocal2 = (In.vTexcoord - Imagetexpos2) / Imagetexsize2;
- bool inside2 = all(Imagelocal2 >= 0.0f && Imagelocal2 <= 1.0f);
- if (inside2)
- {
- float4 tex2 = g_Texture2.Sample(ClampSampler, Imagelocal2);
- Color = lerp(Color, tex2, tex2.a);
- }
-
- float2 Imagetexpos3 = g_fImageSipos3.xy / g_fCurrent_Size;
- float2 Imagetexsize3 = g_fImageSipos3.zw / g_fCurrent_Size;
- float2 Imagelocal3 = (In.vTexcoord - Imagetexpos3) / Imagetexsize3;
- bool inside3 = all(Imagelocal3 >= 0.0f && Imagelocal3 <= 1.0f);
- if (inside3)
- {
- float4 tex3 = g_Texture3.Sample(ClampSampler, Imagelocal3);
- Color = lerp(Color, tex3, tex3.a);
- }
-
- float2 Imagetexpos4 = g_fImageSipos4.xy / g_fCurrent_Size;
- float2 Imagetexsize4 = g_fImageSipos4.zw / g_fCurrent_Size;
- float2 Imagelocal4 = (In.vTexcoord - Imagetexpos4) / Imagetexsize4;
- bool inside4 = all(Imagelocal4 >= 0.0f && Imagelocal4 <= 1.0f);
- if (inside4)
- {
- float4 tex4 = g_Texture4.Sample(ClampSampler, Imagelocal4);
- Color = lerp(Color, tex4, tex4.a);
- }
-
- Color.a *= Alpha;
-
- Out.vColor = Color;
- return Out;
-}
-
-PS_OUT PS_Ride_HpSlot(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 BGuv = In.vTexcoord - center;
- float2 Rotation = In.vTexcoord;
- BGuv *= sqrt(2.0f);
- 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 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size;
- float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size;
- float2 Imagelocal1 = (In.vTexcoord - Imagetexpos1) / Imagetexsize1;
- bool inside1 = all(Imagelocal1 >= 0.0f && Imagelocal1 <= 1.0f);
- if (inside1)
- {
- float4 tex3 = g_Texture2.Sample(ClampSampler, Imagelocal1);
- Color = lerp(Color, tex3, tex3.a);
- }
-
- Color.a *= Alpha;
- Out.vColor = Color;
- 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;
-}
-
-PS_OUT PS_DialogueChoice(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, 0.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);
- }
-
-
- if (g_iHover != 0)
- {
- float4 tex = g_Texture.Sample(ClampSampler, Finaluv);
- Color = tex;
-
- float2 ImgaePos1 = g_fImageSipos1.xy;
- float2 ImgaeSize1 = g_fImageSipos1.zw;
- float2 ImgaePixel = Finaluv * g_fOrigin_Size;
- float2 localUV = (ImgaePixel - ImgaePos1) / ImgaeSize1;
- bool inside = all(localUV >= 0.0f && localUV <= 1.0f);
- if (inside)
- {
- float4 tex2 = g_Texture1.Sample(ClampSampler, localUV);
- Color = lerp(Color, tex2, tex2.a);
- }
-
- float2 ImgaePos2 = g_fImageSipos2.xy;
- float2 ImgaeSize2 = g_fImageSipos2.zw;
- float2 ImgaePixe2 = Finaluv * g_fOrigin_Size;
- float2 ReverseUV = (ImgaePixe2 - ImgaePos2) / ImgaeSize2;
- bool inside2 = all(ReverseUV >= 0.0f && ReverseUV <= 1.0f);
- if (inside2)
- {
- ReverseUV.y = 1.f - ReverseUV.y;
- float4 tex2 = g_Texture1.Sample(ClampSampler, ReverseUV);
- Color = lerp(Color, tex2, tex2.a);
- }
- }
-
- float2 ImgaePos3 = g_fImageSipos3.xy / g_fCurrent_Size;
- float2 ImgaeSize3 = g_fImageSipos3.zw / g_fCurrent_Size;
- float2 localUV2 = (In.vTexcoord - ImgaePos3) / ImgaeSize3;
- bool inside3 = all(localUV2 >= 0.0f && localUV2 <= 1.0f);
- if (inside3)
- {
- float4 tex2 = g_Texture2.Sample(ClampSampler, localUV2);
- Color = lerp(Color, tex2, tex2.a);
- }
-
- Color.a *= Alpha;
- Out.vColor = Color;
- return Out;
-}
-
-struct VS_IN3D
-{
- float3 vPosition : POSITION;
- float2 vTexcoord : TEXCOORD0;
-};
-
-struct VS_OUT3D
-{
- float4 vPosition : SV_Position;
- float2 vTexcoord : TEXCOORD0;
-};
-
-VS_OUT3D VS_MAIN3D(VS_IN3D In)
-{
- VS_OUT3D Out;
-
- matrix matViewProj = mul(g_ViewMatrix, g_ProjMatrix);
-
- float2 Offset = In.vTexcoord - 0.5f;
- float3 worldCenter = float3(g_WorldMatrix._41, g_WorldMatrix._42, g_WorldMatrix._43);
-
-
- float3 vLook = normalize(g_CamaraPosition - worldCenter);
-
- vLook.y = 0.f;
- vLook = normalize(vLook);
-
- float3 upDir = float3(0.f, 1.f, 0.f);
-
- float3 rightDir = normalize(cross(vLook, upDir));
-
- float3 dirRight = rightDir * g_fCurrent_Size.x * Offset.x;
- float3 dirUp = upDir * g_fCurrent_Size.y * Offset.y;
-
- float3 vertexPos = worldCenter + dirRight + dirUp;
-
- float2 TexCoord = In.vTexcoord;
- TexCoord.y = 1.f - TexCoord.y;
-
- Out.vPosition = mul(float4(vertexPos, 1.f), matViewProj);
- Out.vTexcoord = TexCoord;
- return Out;
-}
-
-PS_OUT PS_Enemy_Detection(PS_IN In)
-{
- PS_OUT Out = (PS_OUT) 0;
-
- float4 Color = float4(1.f, 1.f, 1.f, 0.f * g_fAlpha);
-
- if (g_iStep1 != 0)
- {
- float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size;
- float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size;
- float2 Imagelocal = (In.vTexcoord - Imagetexpos1) / Imagetexsize1;
- bool inside1 = all(Imagelocal >= 0.0f && Imagelocal <= 1.0f);
- if (inside1)
- {
- float4 tex3 = g_Texture1.Sample(ClampSampler, Imagelocal);
-
- float2 Imagetexpos2 = g_fImageSipos1.xy / g_fCurrent_Size;
- float2 Imagetexsize2 = g_fImageSipos1.zw / g_fCurrent_Size;
- float2 Imagelocal2 = (In.vTexcoord - Imagetexpos2) / Imagetexsize2;
-
- Color = lerp(Color, tex3, tex3.a);
-
- float4 tex4 = g_Texture2.Sample(ClampSampler, Imagelocal2);
- float4 tex5 = g_Texture3.Sample(ClampSampler, Imagelocal2);
-
- float4 Color1 = tex4;
-
- Color1 = lerp(tex4, tex5, tex5.a);
-
- Imagelocal2.y = 1.f - Imagelocal2.y;
-
- if (Imagelocal2.y >= g_fTime)
- {
- Color1.a = 0.f;
- }
-
- Color = lerp(Color, Color1, Color1.a);
-
- Color.a *= g_fAlpha;
- Out.vColor = Color;
-
- return Out;
- }
- }
- if (g_iStep2 != 0)
- {
- float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size;
- float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size;
- float2 Imagelocal = (In.vTexcoord - Imagetexpos1) / Imagetexsize1;
- bool inside1 = all(Imagelocal >= 0.0f && Imagelocal <= 1.0f);
- if (inside1)
- {
- float4 tex3 = g_Texture1.Sample(ClampSampler, Imagelocal);
-
- float2 Imagetexpos2 = g_fImageSipos1.xy / g_fCurrent_Size;
- float2 Imagetexsize2 = g_fImageSipos1.zw / g_fCurrent_Size;
- float2 Imagelocal2 = (In.vTexcoord - Imagetexpos2) / Imagetexsize2;
-
- float4 tex4 = g_Texture2.Sample(ClampSampler, Imagelocal2);
- float4 tex6 = g_Texture4.Sample(ClampSampler, Imagelocal2);
- Color = lerp(Color, tex3, tex3.a);
- float4 Color1 = tex4;
- Color1 = lerp(tex4, tex6, tex6);
- Color1.rgb *= float3(1.f, 1.f, 0.f);
- Imagelocal2.y = 1.f - Imagelocal2.y;
- if (Imagelocal2.y >= g_fTime)
- {
- Color1.a = 0.f;
- }
- Color = lerp(Color, Color1, Color1.a);
-
- Color.a *= g_fAlpha;
-
- Out.vColor = Color;
-
- return Out;
- }
- }
- if (g_iStep3 != 0)
- {
- float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
- Color = tex1;
- Color.rgb *= float3(1.f, 0.f, 0.f);
-
- float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size;
- float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size;
- float2 Imagelocal = (In.vTexcoord - Imagetexpos1) / Imagetexsize1;
- bool inside1 = all(Imagelocal >= 0.0f && Imagelocal <= 1.0f);
- if (inside1)
- {
- float4 tex7 = g_Texture5.Sample(ClampSampler, Imagelocal);
-
- Color = lerp(Color, tex7, tex7.a);
-
- Color.a *= g_fAlpha;
- Out.vColor = Color;
-
- return Out;
- }
-
- }
-
- Color.a *= g_fAlpha;
- Out.vColor = Color;
-
- return Out;
-}
-
-VS_OUT3D VS_NONESIZE3D(VS_IN3D In)
-{
- VS_OUT3D Out;
-
- float3 worldCenter = float3(
- g_WorldMatrix._41,
- g_WorldMatrix._42,
- g_WorldMatrix._43
- );
-
- float4 clipPos = mul(
- float4(worldCenter, 1.f),
- mul(g_ViewMatrix, g_ProjMatrix)
- );
-
- float w = clipPos.w;
-
- clipPos.xy /= w;
-
- float2 offset = In.vTexcoord - 0.5f;
- float2 pixelOffset = offset * g_fCurrent_Size.xy;
-
- float2 ndcOffset;
- ndcOffset.x = pixelOffset.x / g_fViewport.x * 2.f;
- ndcOffset.y = pixelOffset.y / g_fViewport.y * 2.f;
-
- clipPos.xy += ndcOffset;
-
- clipPos.xy *= w;
- clipPos.w = w;
-
- Out.vPosition = clipPos;
-
- float2 TexCoord = In.vTexcoord;
- TexCoord.y = 1.f - TexCoord.y;
- Out.vTexcoord = TexCoord;
-
- return Out;
-}
-
-PS_OUT PS_Interaction_Object(PS_IN In)
-{
- PS_OUT Out = (PS_OUT) 0;
-
- float4 Color = float4(1.f, 1.f, 1.f, 0.f * g_fAlpha);
-
- float2 atlasUV = g_fImageUV.xy + In.vTexcoord * (g_fImageUV.zw - g_fImageUV.xy);
- float2 safeUV = saturate(atlasUV);
- float4 tex1 = g_Texture.Sample(DefaultSampler, safeUV);
-
- Color = tex1;
-
- Color.a *= g_fAlpha;
- Out.vColor = Color;
-
- return Out;
-}
-
-PS_OUT PS_Interaction_Npc(PS_IN In)
-{
- PS_OUT Out = (PS_OUT) 0;
- float Alpha = g_fAlpha;
- float4 Color = 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);
-
- Color = tex1;
-
- float2 texpos1 = g_fImageSipos1.xy / g_fCurrent_Size;
- float2 texsize1 = g_fImageSipos1.zw / g_fCurrent_Size;
- float2 texlocal1 = (In.vTexcoord - texpos1) / texsize1;
- bool inside1 = all(texlocal1 >= 0.0f && texlocal1 <= 1.0f);
- if (inside1)
- {
- float2 startUV = g_fImageUV.xy;
- float2 endUV = g_fImageUV.zw;
- float2 atlasUV = atlasUV = startUV + texlocal1 * (endUV - startUV);
- float4 tex2 = g_Texture1.Sample(DefaultSampler, atlasUV);
- Color = lerp(Color, tex2, tex2.a);
-
- }
-
-
- Color.a *= Alpha;
-
- Out.vColor = Color;
- return Out;
-}
-
-PS_OUT PS_BroomGateTarget(PS_IN In)
-{
- PS_OUT Out;
-
- float4 Color = float4(1.f, 1.f, 1.f, 0.f * g_fAlpha);
-
- float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
-
- Color = tex1;
-
- Color.a *= g_fAlpha;
- Out.vColor = Color;
-
- return Out;
-}
-
-technique11 PosTexTechnique11
-{
- pass Default //0
- {
- 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();
-
- PixelShader = compile ps_5_0 PS_MAIN();
- }
-
- pass Texture_Color
- {
- 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();
-
- PixelShader = compile ps_5_0 PS_Texture_Color();
- }
-
- pass Logo
- {
- SetRasterizerState(RS_Default);
- SetDepthStencilState(DSS_Default, 0);
- SetBlendState(BS_UIBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
- VertexShader = compile vs_5_0 VS_MAIN();
-
- PixelShader = compile ps_5_0 PS_Logo();
- }
-
- pass Logo_Text
- {
- SetRasterizerState(RS_Default);
- SetDepthStencilState(DSS_Default, 0);
- SetBlendState(BS_UIBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
- VertexShader = compile vs_5_0 VS_MAIN();
-
- PixelShader = compile ps_5_0 PS_Logo_Text();
- }
-
- pass Logo_Glow
- {
- 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();
-
- PixelShader = compile ps_5_0 PS_Logo_Glow();
- }
-
- pass AlphaBlend
- {
- 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();
-
- PixelShader = compile ps_5_0 PS_AlphaBlend();
- }
-
- pass TextureClamp
- {
- 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();
-
- PixelShader = compile ps_5_0 PS_Clamp();
- }
-
- pass Mouse_Cursor
- {
- SetRasterizerState(RS_Default);
- SetDepthStencilState(DSS_Default, 0);
- SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
- VertexShader = compile vs_5_0 VS_MAIN();
-
- PixelShader = compile ps_5_0 PS_Cursor();
- }
-
- pass Sptire_Sheet
- {
- SetRasterizerState(RS_Default);
- SetDepthStencilState(DSS_Default, 0);
- SetBlendState(BS_UIBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
- VertexShader = compile vs_5_0 VS_MAIN();
-
- PixelShader = compile ps_5_0 PS_Sptire_Sheet();
- }
-
- pass Key_Hold_Rotation // 9
- {
- 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();
-
- PixelShader = compile ps_5_0 PS_Key_Hold_Rotation();
- }
-
- pass Mission
- {
- 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();
-
- PixelShader = compile ps_5_0 PS_Mission();
- }
-
- pass QuestType
- {
- 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();
-
- PixelShader = compile ps_5_0 PS_QuestType();
- }
-
- pass Spell_Anim
- {
- 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();
-
- PixelShader = compile ps_5_0 PS_Spell_Anim();
- }
-
- pass NineSlice
- {
- 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();
-
- PixelShader = compile ps_5_0 PS_NineSlice();
- }
-
- pass Rotation
- {
- 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();
-
- PixelShader = compile ps_5_0 PS_Rotation();
- }
-
- pass Slot //15
- {
- 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();
-
- PixelShader = compile ps_5_0 PS_Slot();
- }
-
- pass SpellAnim
- {
- 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();
-
- PixelShader = compile ps_5_0 PS_SpellAnim();
- }
- pass HpBar
- {
- 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();
-
- PixelShader = compile ps_5_0 PS_HpBar();
- }
- pass Magic_Meter
- {
- 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();
-
- PixelShader = compile ps_5_0 PS_Magic_Meter();
- }
-
- pass Magic_Icon
- {
- 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();
-
- PixelShader = compile ps_5_0 PS_Magic_Icon();
- }
-
- pass RemapUV //20
- {
- 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();
-
- PixelShader = compile ps_5_0 PS_RemapUV();
- }
-
- pass Revelio
- {
- 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();
-
- 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();
-
- 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();
-
- PixelShader = compile ps_5_0 PS_Magic_Item();
- }
-
- pass Spell_Preview
- {
- 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();
-
- PixelShader = compile ps_5_0 PS_Spell_Preview();
- }
-
- pass Spell_Header //25
- {
- 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();
-
- PixelShader = compile ps_5_0 PS_Spell_Header();
- }
-
- pass Spell_Header_Line
- {
- 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();
-
- PixelShader = compile ps_5_0 PS_Spell_Header_Line();
- }
-
- pass Spell_Drag
- {
- SetRasterizerState(RS_Default);
- SetDepthStencilState(DSS_Default, 0);
- SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
- VertexShader = compile vs_5_0 VS_MAIN();
-
- PixelShader = compile ps_5_0 PS_Spell_Drag();
- }
-
- pass Camera_LockOn
- {
- 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();
-
- PixelShader = compile ps_5_0 PS_Camera_LockOn();
- }
-
- pass Loding_Screen
- {
- 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();
-
- PixelShader = compile ps_5_0 PS_Loding_Screen();
- }
-
- pass Enemy_HpBer //30
- {
- 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();
-
- PixelShader = compile ps_5_0 PS_Enemy_HpBer();
- }
-
- pass Boss_HpBer
- {
- 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();
-
- PixelShader = compile ps_5_0 PS_Boss_HpBer();
- }
-
- pass Quest_Border
- {
- 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();
-
- PixelShader = compile ps_5_0 PS_Quest_Border();
- }
-
- pass Quest_Info
- {
- 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();
-
- PixelShader = compile ps_5_0 PS_Quest_Info();
- }
-
- pass Quest_Status
- {
- 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();
-
- PixelShader = compile ps_5_0 PS_Quest_Status();
- }
-
- pass Broomstick //35
- {
- 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();
-
- PixelShader = compile ps_5_0 PS_Broomstick();
- }
-
- pass SpellLearn
- {
- 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();
-
- PixelShader = compile ps_5_0 PS_SpellLearn();
- }
-
- pass SpellLearnColor
- {
- 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();
-
- PixelShader = compile ps_5_0 PS_SpellLearnColor();
- }
-
- pass SpellLearnBooster
- {
- 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();
-
- PixelShader = compile ps_5_0 PS_SpellLearnBooster();
- }
-
- pass NPCInteraction
- {
- 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();
-
- PixelShader = compile ps_5_0 PS_NPCInteraction();
- }
-
- pass CanvasFade //40
- {
- 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();
-
- PixelShader = compile ps_5_0 PS_CanvasFade();
- }
-
- pass FlagWave
- {
- 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();
-
- PixelShader = compile ps_5_0 PS_FlagWave();
- }
-
- pass BroomCircle
- {
- 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();
-
- PixelShader = compile ps_5_0 PS_BroomCircle();
- }
-
- pass Ride_info_Key
- {
- 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();
-
- PixelShader = compile ps_5_0 PS_Ride_info_Key();
- }
-
- pass Ride_Info
- {
- 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();
-
- PixelShader = compile ps_5_0 PS_Ride_Info();
- }
-
- pass Ride_HpSlot //45
- {
- 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();
-
- 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();
-
- 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();
-
- PixelShader = compile ps_5_0 PS_BoosterHpBar();
- }
-
- pass DialogueChoice
- {
- 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();
-
- PixelShader = compile ps_5_0 PS_DialogueChoice();
- }
-
- pass Enemy_Detection
- {
- 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_MAIN3D();
-
- PixelShader = compile ps_5_0 PS_Enemy_Detection();
- }
-
- pass Interaction_Object
- {
- SetRasterizerState(RS_Nocull);
- SetDepthStencilState(DSS_None, 0);
- SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
- VertexShader = compile vs_5_0 VS_NONESIZE3D();
-
- PixelShader = compile ps_5_0 PS_Interaction_Object();
- }
-
- pass Interaction_Npc
- {
- SetRasterizerState(RS_Nocull);
- SetDepthStencilState(DSS_None, 0);
- SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
- VertexShader = compile vs_5_0 VS_NONESIZE3D();
-
- PixelShader = compile ps_5_0 PS_Interaction_Npc();
- }
-
- pass BroomGateTarget //51
- {
- SetRasterizerState(RS_Nocull);
- SetDepthStencilState(DSS_None, 0);
- SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
- VertexShader = compile vs_5_0 VS_NONESIZE3D();
-
- PixelShader = compile ps_5_0 PS_BroomGateTarget();
- }
-}
diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj
index ed5efbdc5..b22b67c15 100644
--- a/Jusin154_Team3D/Client/Default/Client.vcxproj
+++ b/Jusin154_Team3D/Client/Default/Client.vcxproj
@@ -163,6 +163,8 @@ call Update_Resources.bat
+
+
@@ -216,8 +218,6 @@ call Update_Resources.bat
-
-
@@ -240,6 +240,7 @@ call Update_Resources.bat
+
@@ -334,6 +335,9 @@ call Update_Resources.bat
+
+
+
@@ -469,6 +473,8 @@ call Update_Resources.bat
+
+
@@ -503,7 +509,6 @@ call Update_Resources.bat
-
@@ -524,7 +529,6 @@ call Update_Resources.bat
-
@@ -546,6 +550,7 @@ call Update_Resources.bat
+
@@ -646,6 +651,9 @@ call Update_Resources.bat
+
+
+
diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
index 38641358d..37e8d62e8 100644
--- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
+++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
@@ -400,7 +400,6 @@
02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Mage
-
02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Spector
@@ -440,9 +439,6 @@
02.GameObjects\Environment\03.MapElement\Lake
-
- 02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Warrior
-
02.GameObjects\Effect\MonsterEffect\Goblin_Protego
@@ -743,12 +739,6 @@
02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Point
-
- 02.GameObjects\Player
-
-
- 02.GameObjects\Player\Robe
-
02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Assassin
@@ -911,9 +901,6 @@
02.GameObjects\Effect\MonsterEffect\Goblin_Protego\Goblin_ProtegoHit
-
- 02.GameObjects\Effect\MonsterEffect\Duelist_Protego\Duelist_ProtegoHit
-
02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Prop
@@ -932,6 +919,9 @@
04.Mechanic\State\State_Combat\State_Parry
+
+ 02.GameObjects\Effect\Effects\Accio\AccioSide
+
02.GameObjects\Environment\Prop\SkyBox\TriggerBox
@@ -939,6 +929,27 @@
02.GameObjects\UI\GamePlay_Canvas\Broom_Panel\Broom_TargetGate2D
+
+ 02.GameObjects\Effect\MonsterEffect\Troll_Shout
+
+
+ 02.GameObjects\Effect\MonsterEffect\Troll_Rush
+
+
+ 02.GameObjects\Effect\MonsterEffect\Troll_Self_Hit
+
+
+ 02.GameObjects\Effect\MonsterEffect\Duelist_Protego\Duelist_ProtegoHit
+
+
+ 02.GameObjects\UI\GamePlay_Canvas\Broom_Panel\Broom_TargetGate2D
+
+
+ 02.GameObjects\NPC\Ally\Elf
+
+
+ 02.GameObjects\Environment\03.MapElement\Cave
+
02.GameObjects\UI\GamePlay_Canvas\Enemy_Penel\Enemy_SkillUI
@@ -1378,9 +1389,6 @@
{e666a8b4-c92e-48ee-b63b-40d852b27b06}
-
- {14ad0431-680b-4c8b-93d7-601aee5ce435}
-
{1d1dc743-5cf2-4b8f-a80e-16b16437c7aa}
@@ -1588,9 +1596,6 @@
{a94e24d2-0f61-4263-b834-bfdf9f6c06ae}
-
- {f3c7cf8d-2b83-49d3-85da-fe135e376a11}
-
{af9f5cf6-151a-49bc-9af4-28ba0bde1d37}
@@ -1939,6 +1944,27 @@
{4a11eb4b-127e-41f2-8456-cae963c94a4c}
+
+ {0e6d6920-c33c-4202-a2a5-3c883e1d4597}
+
+
+ {a4b6f0be-8841-4748-8947-e497d755c2d9}
+
+
+ {34b736fb-456e-46e3-8038-49cff23b2f95}
+
+
+ {c276c050-7000-441e-bb53-30ec3c20c6f5}
+
+
+ {9263815e-9651-4ba2-813f-c2a7f207522d}
+
+
+ {44a8eee1-6b7f-4c9a-bf92-21f6b90e84c3}
+
+
+ {5599bbbd-12f7-4b40-8e3d-24f869cce464}
+
{b28b8285-3d1a-49cf-bde2-c7ebc18e6389}
@@ -2647,9 +2673,6 @@
04.Mechanic\State\Movement\Dash
-
- 02.GameObjects\Player\Robe
-
02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Spector\Goblin_Warrior_Spector
@@ -2740,9 +2763,6 @@
02.GameObjects\NPC\Hostile\Human_Duelist
-
- 02.GameObjects\Player\Robe
-
02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Rush
@@ -2815,6 +2835,17 @@
02.GameObjects\Effect\Effects\Stupefy\StupefySide
+
+ 02.GameObjects\Environment\03.MapElement\Cave
+
+
+
+
+ 04.Mechanic\State\State_Combat\State_Parry
+
+
+ 02.GameObjects\Effect\Effects\Accio\AccioSide
+
02.GameObjects\Environment\03.MapElement\Balloon
@@ -2828,6 +2859,21 @@
02.GameObjects\UI\GamePlay_Canvas\Broom_Panel\Broom_TargetGate2D
+
+ 02.GameObjects\Effect\MonsterEffect\Troll_Rush
+
+
+ 02.GameObjects\Effect\MonsterEffect\Troll_Shout
+
+
+ 02.GameObjects\Effect\MonsterEffect\Troll_Self_Hit
+
+
+ 02.GameObjects\UI\GamePlay_Canvas\Broom_Panel\Broom_TargetGate2D
+
+
+ 02.GameObjects\NPC\Ally\Elf
+
02.GameObjects\UI\GamePlay_Canvas\Enemy_Penel\Enemy_SkillUI
diff --git a/Jusin154_Team3D/Client/Private/Accio.cpp b/Jusin154_Team3D/Client/Private/Accio.cpp
index d3cca9579..834213de4 100644
--- a/Jusin154_Team3D/Client/Private/Accio.cpp
+++ b/Jusin154_Team3D/Client/Private/Accio.cpp
@@ -66,7 +66,18 @@ HRESULT CAccio::Initialize(void* pArg)
XMStoreFloat4x4(&m_TrailWorld, XMMatrixIdentity());
- m_fDuration = 6.f;
+ m_fDuration = 4.f;
+
+ m_Events.emplace(2.f, [&]() {
+
+ m_pRope_Trail->Get_Component()->Rope_Fix(true);
+
+ if (m_isDissolve)
+ m_pRope_Trail->SetDissolve(true);
+
+ m_pRope_Trail->Get_TrailInfo()->fMass = 0.1f;
+
+ });
return S_OK;
}
@@ -151,9 +162,16 @@ void CAccio::Late_Update(_float fTimeDelta)
if (false == m_bHit) {
_vector vStartPos = XMLoadFloat4(&m_vStartPos);
_vector vEndPos = XMLoadFloat4(&m_vEndPos);
- ON_COLLISION_INFO CollisionInfo = SweepTarget(vStartPos, vEndPos, 0.002f);
- OnCollision(this , &CollisionInfo);
+ if (false == m_bHit) {
+ _vector vStartPos = XMLoadFloat4(&m_vStartPos);
+ _vector vEndPos = XMLoadFloat4(&m_vEndPos);
+ if (false == XMVector3NearEqual(vEndPos, XMVectorZero(), XMVectorReplicate(FLT_EPSILON5)))
+ {
+ ON_COLLISION_INFO CollisionInfo = SweepTarget(vStartPos, vEndPos, 0.02f);
+ OnCollision(this, &CollisionInfo);
+ }
+ }
}
@@ -180,8 +198,6 @@ HRESULT CAccio::Pre_Setting(CGameObject* pObject, void* pArg)
pCircle->Set_Visible(true);
m_pWandLight->Set_Visible(true);
- m_pWandLight->Get_Effect_Info()->isDissolve = false;
- m_pWandLight->Get_Effect_Info()->isLightDissolve = false;
pSpread_Circle->Set_Visible(true);
@@ -304,8 +320,6 @@ void CAccio::OnCollision(CGameObject* pOther, void* pDesc)
pCircle->Set_Visible(false);
pSpread_Circle->Set_Visible(false);
- m_pWandLight->Get_Effect_Info()->isDissolve = true;
- m_pWandLight->Get_Effect_Info()->isLightDissolve = true;
m_pRotate0->Set_Visible(true);
m_pRotate1->Set_Visible(true);
diff --git a/Jusin154_Team3D/Client/Private/AccioSide.cpp b/Jusin154_Team3D/Client/Private/AccioSide.cpp
new file mode 100644
index 000000000..41beb13af
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/AccioSide.cpp
@@ -0,0 +1,206 @@
+#include "pch.h"
+#include "AccioSide.h"
+
+#include "GameInstance.h"
+#include "EffectParts.h"
+#include "Player.h"
+#include "Wand.h"
+#include "TrailObject.h"
+
+
+CAccioSide::CAccioSide(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CEffect_Container{ pDevice, pContext }
+{
+}
+
+CAccioSide::CAccioSide(const CAccioSide& rhs)
+ : CEffect_Container(rhs)
+{
+}
+
+HRESULT CAccioSide::Initialize_Prototype()
+{
+
+ if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/AccioSide")))
+ return E_FAIL;
+
+ return S_OK;
+
+}
+
+HRESULT CAccioSide::Initialize(void* pArg)
+{
+ if (FAILED(__super::Initialize(pArg)))
+ return E_FAIL;
+
+ if (FAILED(Ready_Components(pArg)))
+ return E_FAIL;
+
+ if (FAILED(Create_Effect()))
+ return E_FAIL;
+
+ m_wstrEffectName = L"AccioSide";
+
+
+ //m_pWandParticle = Get_PartObject("Wand_PT");
+
+ m_pWandLight = Get_PartObject("Wand_Light_B");
+ m_pWandTrail = Get_PartObject();
+
+ SAFE_ADDREF(m_pWandLight);
+ SAFE_ADDREF(m_pWandTrail);
+ //SAFE_ADDREF(m_pWandParticle);
+
+ m_fDuration = 2.f;
+
+ m_Events.emplace(0.8f, [&]() {
+ m_isParticleEnd = true;
+ m_pWandTrail->SetDissolve(true);
+ });
+
+ return S_OK;
+}
+
+void CAccioSide::Priority_Update(_float fTimeDelta)
+{
+ __super::Priority_Update(fTimeDelta);
+
+}
+
+void CAccioSide::Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Update(fTimeDelta);
+
+ Update_Event(fTimeDelta);
+
+
+ CWand* pWand = static_cast(m_pOwner);
+
+ if (pWand == nullptr)
+ return;
+
+
+ m_pWandLight->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
+
+ // 파티클생성이 막히면 실행되지 않음
+ //if (m_isParticleEnd == false)
+ // m_pWandParticle->Get_Component()->Set_WorldMatrix(pWand->Get_WorldMatrix());
+
+ // 트레일이 종료되면 위치를 고정함
+ _matrix TrailMat = m_isTrailEnd ? XMLoadFloat4x4(&m_TrailStopMat) : pWand->Get_WorldMatrix();
+ m_pWandTrail->Oneside_Rope_Trail_Update(TrailMat, fTimeDelta);
+
+}
+
+void CAccioSide::Late_Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Late_Update(fTimeDelta);
+
+
+}
+
+HRESULT CAccioSide::Pre_Setting(CGameObject* pObject, void* pArg)
+{
+ if (FAILED(__super::Pre_Setting(pObject, nullptr)))
+ return E_FAIL;
+
+
+ CWand* pWand = static_cast(m_pOwner);
+
+ if (pWand == nullptr)
+ return E_FAIL;
+
+ //m_pWandParticle->Set_Visible(true);
+ m_isParticleEnd = false; // 파티클이 일정시간이 되면 나오지 않게 하려고
+
+ m_pWandLight->Set_Visible(true);
+
+ /*트레일 초기화 */
+ m_pWandTrail->Set_Visible(true);
+ m_isTrailEnd = false;
+ m_pWandTrail->Get_Component()->Reset_Trail();
+
+ /*_vector pPos = pPlayer->Get_WandPos().r[3];*/
+
+ m_pWandLight->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
+
+ return S_OK;
+}
+
+HRESULT CAccioSide::Ready_Components(void* pArg)
+{
+ if (FAILED(__super::Ready_Components(pArg))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CAccioSide::Ready_Child()
+{
+ return S_OK;
+}
+
+CAccioSide* CAccioSide::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CAccioSide* pInstance = new CAccioSide(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CAccioSide");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+
+CGameObject* CAccioSide::Clone(void* pArg, CGameObject* pOwner)
+{
+ CAccioSide* pInstance = new CAccioSide(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CAccioSide");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CAccioSide::OnCollision(CGameObject* pOther, void* pDesc)
+{
+ ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc);
+
+}
+
+void CAccioSide::Free()
+{
+ __super::Free();
+
+
+ Safe_Release(m_pWandLight);
+ Safe_Release(m_pWandTrail);
+ //Safe_Release(m_pWandParticle);
+}
+#ifdef _DEBUG
+
+void CAccioSide::Describe_Entity()
+{
+
+}
+
+#endif // _DEBUG
+
+HRESULT CAccioSide::Bind_ShaderResources()
+{
+ return S_OK;
+}
+
+
diff --git a/Jusin154_Team3D/Client/Private/Avadakedavra.cpp b/Jusin154_Team3D/Client/Private/Avadakedavra.cpp
index 80c05ab5d..8450f9a04 100644
--- a/Jusin154_Team3D/Client/Private/Avadakedavra.cpp
+++ b/Jusin154_Team3D/Client/Private/Avadakedavra.cpp
@@ -79,13 +79,15 @@ void CAvadakedavra::Late_Update(_float fTimeDelta)
_vector vDir = XMLoadFloat4(&m_vEndPos) - XMLoadFloat4(&m_vStartPos);
-
+
if (false == m_bHit) {
_vector vStartPos = XMLoadFloat4(&m_vStartPos);
_vector vEndPos = XMLoadFloat4(&m_vEndPos);
- ON_COLLISION_INFO CollisionInfo = SweepTarget(vStartPos, vEndPos, 0.02f);
-
- OnCollision(this, &CollisionInfo);
+ if (false == XMVector3NearEqual(vEndPos, XMVectorZero(), XMVectorReplicate(FLT_EPSILON5)))
+ {
+ ON_COLLISION_INFO CollisionInfo = SweepTarget(vStartPos, vEndPos, 0.02f);
+ OnCollision(this, &CollisionInfo);
+ }
}
}
diff --git a/Jusin154_Team3D/Client/Private/Bombard.cpp b/Jusin154_Team3D/Client/Private/Bombard.cpp
index 49c57d782..251347135 100644
--- a/Jusin154_Team3D/Client/Private/Bombard.cpp
+++ b/Jusin154_Team3D/Client/Private/Bombard.cpp
@@ -99,9 +99,16 @@ void CBombard::Late_Update(_float fTimeDelta)
if (false == m_bHit) {
_vector vStartPos = XMLoadFloat4(&m_vStartPos);
_vector vEndPos = XMLoadFloat4(&m_vEndPos);
- ON_COLLISION_INFO CollisionInfo = SweepTarget(vStartPos, vEndPos, 0.002f , true);
- OnCollision(this, &CollisionInfo);
+ if (false == m_bHit) {
+ _vector vStartPos = XMLoadFloat4(&m_vStartPos);
+ _vector vEndPos = XMLoadFloat4(&m_vEndPos);
+ if (false == XMVector3NearEqual(vEndPos, XMVectorZero(), XMVectorReplicate(FLT_EPSILON5)))
+ {
+ ON_COLLISION_INFO CollisionInfo = SweepTarget(vStartPos, vEndPos, 0.02f, true);
+ OnCollision(this, &CollisionInfo);
+ }
+ }
}
}
diff --git a/Jusin154_Team3D/Client/Private/BroomRaceManager.cpp b/Jusin154_Team3D/Client/Private/BroomRaceManager.cpp
index b398b360b..c35330de7 100644
--- a/Jusin154_Team3D/Client/Private/BroomRaceManager.cpp
+++ b/Jusin154_Team3D/Client/Private/BroomRaceManager.cpp
@@ -524,6 +524,70 @@ HRESULT CBroomRaceManager::Load_RaceRing()
HRESULT CBroomRaceManager::Load_Balloons()
{
+ //tinyxml2::XMLDocument xmlDoc;
+
+ //string strPath = "../Bin/Resources/Data/Map/Balloon/Ballon_Data.xml";
+
+ //if ((tinyxml2::XML_SUCCESS != xmlDoc.LoadFile(strPath.c_str())))
+ // return E_FAIL;
+
+ // Desc.pBroomRaceManager = this;
+
+ // /* Transform */
+ // auto* Rotation = Object->FirstChildElement("Scale");
+ // Rotation->QueryFloatAttribute("x", &Desc.vScale.x);
+ // Rotation->QueryFloatAttribute("y", &Desc.vScale.y);
+ // Rotation->QueryFloatAttribute("z", &Desc.vScale.z);
+
+ // auto* Scale = Object->FirstChildElement("Rotation");
+ // Scale->QueryFloatAttribute("x", &Desc.vRotation.x);
+ // Scale->QueryFloatAttribute("y", &Desc.vRotation.y);
+ // Scale->QueryFloatAttribute("z", &Desc.vRotation.z);
+
+ // auto* Position = Object->FirstChildElement("Position");
+ // Position->QueryFloatAttribute("x", &Desc.vPosition.x);
+ // Position->QueryFloatAttribute("y", &Desc.vPosition.y);
+ // Position->QueryFloatAttribute("z", &Desc.vPosition.z);
+
+ // if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_RING, &Desc)))
+ // return E_FAIL;
+ //}
+
+ //tinyxml2::XMLElement* root = xmlDoc.FirstChildElement("Balloon");
+
+ //if (nullptr == root)
+ //{
+ // MSG_BOX("Failed to Find root");
+ // return S_OK;
+ //}
+
+ //for (auto* Object = root->FirstChildElement("Object"); Object; Object = Object->NextSiblingElement("Object"))
+ //{
+ // CMapElement_Balloon::BALLOON_DESC Desc = {};
+
+ // auto* Value = Object->FirstChildElement("Value");
+ // Value->QueryBoolAttribute("isFloating", &Desc.isFloating);
+ // Value->QueryUnsignedAttribute("DiffuseIndex", &Desc.iDiffuseIndex);
+
+ // /* Transform */
+ // auto* Rotation = Object->FirstChildElement("Scale");
+ // Rotation->QueryFloatAttribute("x", &Desc.vScale.x);
+ // Rotation->QueryFloatAttribute("y", &Desc.vScale.y);
+ // Rotation->QueryFloatAttribute("z", &Desc.vScale.z);
+
+ // auto* Scale = Object->FirstChildElement("Rotation");
+ // Scale->QueryFloatAttribute("x", &Desc.vRotation.x);
+ // Scale->QueryFloatAttribute("y", &Desc.vRotation.y);
+ // Scale->QueryFloatAttribute("z", &Desc.vRotation.z);
+
+ // auto* Position = Object->FirstChildElement("Position");
+ // Position->QueryFloatAttribute("x", &Desc.vPosition.x);
+ // Position->QueryFloatAttribute("y", &Desc.vPosition.y);
+ // Position->QueryFloatAttribute("z", &Desc.vPosition.z);
+
+ // if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
+ // return E_FAIL;
+ //}
tinyxml2::XMLDocument xmlDoc;
string strPath = "../Bin/Resources/Data/Map/Balloon/Ballon_Data.xml";
diff --git a/Jusin154_Team3D/Client/Private/CallBack_Troll_HitReport.cpp b/Jusin154_Team3D/Client/Private/CallBack_Troll_HitReport.cpp
index b973b2653..846adfb5c 100644
--- a/Jusin154_Team3D/Client/Private/CallBack_Troll_HitReport.cpp
+++ b/Jusin154_Team3D/Client/Private/CallBack_Troll_HitReport.cpp
@@ -57,6 +57,8 @@ void CCallBack_Troll_HitReport::onShapeHit(const PSX::PxControllerShapeHit& hit)
if (pOwner->Get_AnimInfo(STATEANIM::RUSH_LOOP).first == iAnimIndex) {
CFSM* pFSM = pOwner->Get_Component();
pFSM->Change_State(FSMSTATE::STUN);
+
+ /**/
}
}
if (vWorldNormal.y > 0) {
diff --git a/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp b/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp
index d50693a07..a16c9ed45 100644
--- a/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp
+++ b/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp
@@ -455,7 +455,7 @@ CCamPosition_Shoulder* CCamPosition_Shoulder::Create(ID3D11Device* pDevice, ID3D
}
CCamPosition_Shoulder* CCamPosition_Shoulder::Clone(void* pArg, class CGameObject* pOWner)
{
- CCamPosition_Shoulder* pInstance = new CCamPosition_Shoulder(*this);
+ CCamPosition_Shoulder* pInstance = new CCamPosition_Shoulder(*this);
pInstance->m_pOwner = pOWner;
if (FAILED(pInstance->Initialize(pArg)))
{
diff --git a/Jusin154_Team3D/Client/Private/CamPosition_Target.cpp b/Jusin154_Team3D/Client/Private/CamPosition_Target.cpp
index dd8799a7d..d7289191b 100644
--- a/Jusin154_Team3D/Client/Private/CamPosition_Target.cpp
+++ b/Jusin154_Team3D/Client/Private/CamPosition_Target.cpp
@@ -44,7 +44,7 @@ void CCamPosition_Target::Set_WorldPostion(_vector vPos)
_bool CCamPosition_Target::IsStalking()
{
- return nullptr == m_pStalkingTarget;
+ return nullptr != m_pStalkingTarget;
}
void CCamPosition_Target::Stalking_Target(CUnit* pStalkingTarget, const _float4x4* pTargetSocketMatrix)
@@ -58,6 +58,12 @@ void CCamPosition_Target::Stalking_Target(CUnit* pStalkingTarget, const _float4x
void CCamPosition_Target::Stop_Stalking()
{
SAFE_RELEASE(m_pStalkingTarget);
+ m_pTargetSocketMatrix = nullptr;
+}
+
+_matrix CCamPosition_Target::Get_XMWorldMatrix()
+{
+ return m_pTransformCom->Get_XMWorldMatrix();
}
HRESULT CCamPosition_Target::Initialize_Prototype()
diff --git a/Jusin154_Team3D/Client/Private/Camera_Cinematic.cpp b/Jusin154_Team3D/Client/Private/Camera_Cinematic.cpp
index 22cbcd485..57ced80fd 100644
--- a/Jusin154_Team3D/Client/Private/Camera_Cinematic.cpp
+++ b/Jusin154_Team3D/Client/Private/Camera_Cinematic.cpp
@@ -12,17 +12,6 @@ CCamera_Cinematic::CCamera_Cinematic(const CCamera_Cinematic& rhs) : CCamera(rhs
void CCamera_Cinematic::Priority_Update(_float fTimeDelta)
{
-#ifdef _DEBUG
- if (m_pGameInstance->Key_Pressing(DIK_HOME)) {
- if (m_pGameInstance->Key_Up(DIK_END)) {
- _string strCutSceneName = "RanrokIntro";
- m_pInfoInstance->Active_Event(strCutSceneName);
- }
- }
-#endif // _DEBUG
- if (false == m_bActive) {
- return;
- }
if (false == m_bIsCurrentTransition) {
m_pLookTargetPart->Priority_Update(fTimeDelta);
m_pFollowTargetPart->Priority_Update(fTimeDelta);
@@ -32,8 +21,11 @@ void CCamera_Cinematic::Priority_Update(_float fTimeDelta)
else {
Transition(fTimeDelta);
}
- m_bActive = true;
Update_LerpTimer(fTimeDelta);
+ if (false == m_bActive) {
+ return;
+ }
+
__super::Bind_Matrices();
}
@@ -49,10 +41,62 @@ void CCamera_Cinematic::Update(_float fTimeDelta)
void CCamera_Cinematic::Late_Update(_float fTimeDelta)
{
if (false == m_bActive) {
+#ifdef _DEBUG
+ m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
+ m_pGameInstance->Add_RenderGroup(RENDER::NONLIGHT, this);
+#endif // _DEBUG
return;
}
+ else {
+ }
}
-HRESULT CCamera_Cinematic::Render() { return S_OK; }
+HRESULT CCamera_Cinematic::Render() {
+#ifdef _DEBUG
+ if (FAILED(Bind_ShaderResources())) {
+ return E_FAIL;
+ }
+
+ RENDER eType = m_pGameInstance->Get_CurrentRenderPass();
+ if (RENDER::NONBLEND == eType) {
+ _uint iNumMeshes = m_pModelCom->Get_NumMeshes();
+
+ for (_uint i = 0; i < iNumMeshes; i++)
+ {
+ if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::WIREFRAME)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pModelCom->Render(i))) {
+ return E_FAIL;
+ }
+ }
+ }
+ else if (RENDER::NONLIGHT == eType) {
+
+ m_Batch->Begin();
+
+ _matrix ViewMatrix = m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW);
+ _matrix ProjMatrix = m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ);
+
+ _vector vColor = CMyTools::ColorRGB_A_HEXtoVECTOR(0x0000ff, 1.f);
+ m_pSubShape->Draw(m_pLookTargetPart->Get_XMWorldMatrix(), ViewMatrix, ProjMatrix, vColor, nullptr, true);
+ vColor = CMyTools::ColorRGB_A_HEXtoVECTOR(0x00ff00, 1.f);
+ m_pSubShape->Draw(m_pFollowTargetPart->Get_XMWorldMatrix(), ViewMatrix, ProjMatrix, vColor, nullptr, true);
+
+ m_Batch->End();
+
+
+
+ }
+#endif // _DEBUG
+ return S_OK;
+}
+
+
void CCamera_Cinematic::Active_Camera(pair<_float4, _float3>& pairTransitionInfo)
{
if (true == m_bEnable_TransitionLerp) {
@@ -70,12 +114,12 @@ void CCamera_Cinematic::Active_Camera(pair<_float4, _float3>& pairTransitionInfo
void CCamera_Cinematic::Update_LerpTimer(_float fTimeDelta)
{
- if (false == m_bActive) {
- return;
- }
Lerp_Translation(fTimeDelta);
Lerp_Rotation(fTimeDelta);
Lerp_FovY(fTimeDelta);
+ if (false == m_bActive) {
+ return;
+ }
}
void CCamera_Cinematic::Set_Priority(_uint iPriority)
@@ -101,6 +145,13 @@ void CCamera_Cinematic::Trigger(CTimeSocket& Socket)
case TIMESOCKET_FUNC::BIND_CAMERA:
m_pGameInstance->Bind_Camera(NEXT_LEVEL, pContents->wstrKeyName, true);
break;
+ case TIMESOCKET_FUNC::TELEPORTATION:
+ {
+ m_pTransformCom->Set_WorldMatrix(pContents->pxTransform);
+ m_pFollowTargetPart->Set_WorldPostion(m_pTransformCom->Get_State(STATE::POSITION));
+ m_pLookTargetPart->Set_WorldPostion(m_pTransformCom->Get_State(STATE::POSITION) + m_pTransformCom->Get_State(STATE::LOOK));
+ Clear_Lerp_Translation();
+ } break;
case TIMESOCKET_FUNC::TRANSLATION:
{
m_pFollowTargetPart->Set_WorldPostion(XMVectorSetW(XMLoadFloat3((_float3*)&pContents->pxTransform.p), 1.f));
@@ -123,13 +174,22 @@ void CCamera_Cinematic::Trigger(CTimeSocket& Socket)
case TIMESOCKET_FUNC::LOOK_AT:
{
CUnit* pUnit = (CUnit*)pContents->pOtherTarget;
- Set_LookTarget(pUnit, pUnit->Get_SocketMatrixPtr(pContents->vParam_12.c_str()));
- //Set_LookTarget(pUnit, nullptr);
+ Set_LookTarget(pUnit, pUnit->Get_SocketMatrixPtr(pContents->vParam_12.c_str()));
}break;
case TIMESOCKET_FUNC::DONT_LOOK_AT:
+ {
+ m_pLookTargetPart->Stop_Stalking();
+ }break;
+ case TIMESOCKET_FUNC::FOLLOW:
{
CUnit* pUnit = (CUnit*)pContents->pOtherTarget;
- Set_FollowTarget(pUnit, pUnit->Get_SocketMatrixPtr(pContents->vParam_12.c_str()));
+ const _char* pName = pContents->vParam_12.c_str();
+ const _float4x4* pSocketMatrix = pUnit->Get_SocketMatrixPtr(pName);
+ Set_FollowTarget(pUnit, pSocketMatrix);
+ }break;
+ case TIMESOCKET_FUNC::DONT_FOLLOW:
+ {
+ m_pFollowTargetPart->Stop_Stalking();
}break;
case TIMESOCKET_FUNC::ZOOM_IN:
{
@@ -172,6 +232,12 @@ HRESULT CCamera_Cinematic::Initialize(void* pArg)
return E_FAIL;
}
+
+#ifdef _DEBUG
+ m_pSubShape = (GeometricPrimitive::CreateSphere(m_pContext, 0.25f, 12, false, false));
+
+ m_Batch = make_unique>(m_pContext);
+#endif // _DEBUG
return S_OK;
}
HRESULT CCamera_Cinematic::Ready_Components(void* pArg)
@@ -179,7 +245,18 @@ HRESULT CCamera_Cinematic::Ready_Components(void* pArg)
if (FAILED(__super::Ready_Components(pArg))) {
return E_FAIL;
}
+#ifdef _DEBUG
+ if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_Camera_Model"),
+ reinterpret_cast(&m_pModelCom)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH,
+ reinterpret_cast(&m_pShaderCom)))) {
+ return E_FAIL;
+ }
+#endif // _DEBUG
return S_OK;
}
@@ -198,7 +275,22 @@ HRESULT CCamera_Cinematic::Ready_SubPart()
HRESULT CCamera_Cinematic::Bind_ShaderResources()
{
+#ifdef _DEBUG
+ if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
+ return E_FAIL;
+ }
+#endif // _DEBUG
return S_OK;
+
}
void CCamera_Cinematic::Lerp_Translation(_float fTimeDelta)
{
@@ -351,7 +443,10 @@ CGameObject* CCamera_Cinematic::Clone(void* pArg, CGameObject* pOwner)
void CCamera_Cinematic::Free()
{
__super::Free();
-
+#ifdef _DEBUG
+ SAFE_RELEASE(m_pModelCom);
+ SAFE_RELEASE(m_pShaderCom);
+#endif // _DEBUG
SAFE_RELEASE(m_pLookTargetPart);
SAFE_RELEASE(m_pFollowTargetPart);
}
@@ -361,11 +456,21 @@ void CCamera_Cinematic::Free()
void CCamera_Cinematic::Describe_Entity()
{
GUI::Begin("CAMERA", 0, IMGUI_GLOBAL_BEGIN_FLAG);
+ _int iPriority = m_iPriority;
+ size_t iAddress = (size_t)this;
+ _string strHeader = "CINEMATIC_CAMERA_Priority##" + to_string(iAddress);
+ if (GUI::SliderInt(strHeader.c_str(), &iPriority, 45, 60)) {
+ m_iPriority = iPriority;
+ }
if (GUI::CollapsingHeader("Camera_Cinematic_Describe")) {
if (GUI::SmallButton("Trigger_RanrokIntro")) {
_string strCutSceneName = "RanrokIntro";
m_pInfoInstance->Active_Event(strCutSceneName);
}
+ if (GUI::SmallButton("Trigger_CarriageIntro")) {
+ _string strCutSceneName = "CarriageIntro";
+ m_pInfoInstance->Active_Event(strCutSceneName);
+ }
m_pTransformCom->Describe_Entity();
GUI::Text("LOOK_SRC %.2f, %.2f, %.2f", m_vLookPos_Src.x, m_vLookPos_Src.y, m_vLookPos_Src.z);
GUI::Text("LOOK_DST %.2f, %.2f, %.2f", m_vLookPos_Dest.x, m_vLookPos_Dest.y, m_vLookPos_Dest.z);
diff --git a/Jusin154_Team3D/Client/Private/Camera_Debug.cpp b/Jusin154_Team3D/Client/Private/Camera_Debug.cpp
index 78e8930ea..17ab6c973 100644
--- a/Jusin154_Team3D/Client/Private/Camera_Debug.cpp
+++ b/Jusin154_Team3D/Client/Private/Camera_Debug.cpp
@@ -197,6 +197,12 @@ void CCamera_Debug::Describe_Entity()
}
GUI::End();
GUI::Begin("CAMERA");
+ _int iPriority = m_iPriority;
+ size_t iAddress = (size_t)this;
+ _string strHeader = "DEBUG_CAMERA_Priority##" + to_string(iAddress);
+ if (GUI::SliderInt(strHeader.c_str(), &iPriority, 45, 60)) {
+ m_iPriority = iPriority;
+ }
if (GUI::CollapsingHeader("DebugCamera")){
m_pTransformCom->Describe_Entity();
}
diff --git a/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp b/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp
index a36b464d9..184c98758 100644
--- a/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp
+++ b/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp
@@ -247,6 +247,12 @@ void CCamera_Gaze::Free()
void CCamera_Gaze::Describe_Entity()
{
GUI::Begin("CAMERA", 0, IMGUI_GLOBAL_BEGIN_FLAG);
+ _int iPriority = m_iPriority;
+ size_t iAddress = (size_t)this;
+ _string strHeader = "GAZE_CAMERA_Priority##" + to_string(iAddress);
+ if (GUI::SliderInt(strHeader.c_str(), &iPriority, 45, 60)) {
+ m_iPriority = iPriority;
+ }
if (GUI::CollapsingHeader("Camera_Gaze_Describe")) {
m_pTransformCom->Describe_Entity();
GUI::Text("LOOK_SRC %.2f, %.2f, %.2f", m_vLookPos_Src.x, m_vLookPos_Src.y, m_vLookPos_Src.z);
diff --git a/Jusin154_Team3D/Client/Private/Camera_Model.cpp b/Jusin154_Team3D/Client/Private/Camera_Model.cpp
index 8399307da..5c7a52e09 100644
--- a/Jusin154_Team3D/Client/Private/Camera_Model.cpp
+++ b/Jusin154_Team3D/Client/Private/Camera_Model.cpp
@@ -94,26 +94,9 @@ HRESULT CCamera_Model::Render()
#ifdef _DEBUG
m_Batch->Begin();
- _vector vRight = m_pTransformCom->Get_State(STATE::RIGHT);
- _vector vUp = m_pTransformCom->Get_State(STATE::UP);
- _vector vLook = m_pTransformCom->Get_State(STATE::LOOK);
- _vector vPosition = m_pTransformCom->Get_State(STATE::POSITION);
_matrix ViewMatrix = m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW);
_matrix ProjMatrix = m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ);
- static _float fLength = 1.f;
- GUI::DragFloat("Length", &fLength, 0.1f, 0.1f, 10.f, "%.1f");
- m_Batch->DrawLine(
- VertexPositionColor(vPosition, DirectX::Colors::GhostWhite),
- VertexPositionColor(vPosition + vRight * fLength, DirectX::Colors::Green)
- );
- m_Batch->DrawLine(
- VertexPositionColor(vPosition, DirectX::Colors::GhostWhite),
- VertexPositionColor(vPosition + vUp * fLength, DirectX::Colors::Red)
- );
- m_Batch->DrawLine(
- VertexPositionColor(vPosition, DirectX::Colors::GhostWhite),
- VertexPositionColor(vPosition + vLook * fLength, DirectX::Colors::Blue)
- );
+
_vector vColor = CMyTools::ColorRGB_A_HEXtoVECTOR(0xff0000, 1.f);
_matrix WorldMatrix;
WorldMatrix = XMLoadFloat4x4(m_CtrlCam);
diff --git a/Jusin154_Team3D/Client/Private/CutSceneInfo.cpp b/Jusin154_Team3D/Client/Private/CutSceneInfo.cpp
index 57383a131..0870fa0bb 100644
--- a/Jusin154_Team3D/Client/Private/CutSceneInfo.cpp
+++ b/Jusin154_Team3D/Client/Private/CutSceneInfo.cpp
@@ -9,6 +9,7 @@
#include "TimeSocket.h"
#include "Camera_Cinematic.h"
#include "Ranrok.h"
+#include "ThestralCarriage.h"
CCutSceneInfo::CCutSceneInfo()
{
@@ -22,7 +23,7 @@ void CCutSceneInfo::Update(_float fTimeDelta)
Update_ActiveEvents(fTimeDelta);
}
-void CCutSceneInfo::Change_Level()
+void CCutSceneInfo::Load_CutScenes()
{
LEVEL eLevel = (LEVEL)m_pGameInstance->Get_NextLevelID();
switch (eLevel)
@@ -33,7 +34,7 @@ void CCutSceneInfo::Change_Level()
break;
case LEVEL::FIELD:
Clear_AllEvents();
- Ready_GameplayCutScenes();
+ Ready_FieldCutScenes();
break;
default:
Clear_ActiveEvents();
@@ -169,6 +170,9 @@ HRESULT CCutSceneInfo::Clear_AllEvents()
}
HRESULT CCutSceneInfo::Ready_GameplayCutScenes()
{
+ {
+ Load_CutSceneXML("../Bin/Resources/Data/CutScene/CarriageIntro.xml");
+ }
return S_OK;
}
HRESULT CCutSceneInfo::Ready_FieldCutScenes()
@@ -353,7 +357,7 @@ void CCutSceneInfo::Load_CutSceneXML(const string& path)
}
TimeLine* pTimeLine = new TimeLine();
- tinyxml2::XMLElement* pContentsNode = doc.FirstChildElement("RanrokIntro");
+ tinyxml2::XMLElement* pContentsNode = doc.FirstChildElement();
if (!pContentsNode) {
return;
}
@@ -368,11 +372,13 @@ void CCutSceneInfo::Load_CutSceneXML(const string& path)
{
SOCKETCONTENTS SocketContents = {};
+ _float fStartPosition = 0.f;
SocketContents.fRatio = 0.f;
- _float fStartPosition = 0;
pSocketNode->QueryFloatAttribute("fStartPosition", &fStartPosition);
SocketContents.fRatio = CMyTools::Saturate(fStartPosition / pTimeLine->m_vTimer.y);
+
// Info
+ _bool bUseSystem = false;
tinyxml2::XMLElement* pInfoNode = pSocketNode->FirstChildElement("Info");
if (pInfoNode != nullptr)
{
@@ -422,9 +428,28 @@ void CCutSceneInfo::Load_CutSceneXML(const string& path)
SocketContents.pEventTarget = pEventTarget;
SocketContents.funcEvent = [pEventTarget](CTimeSocket& Socket) { pEventTarget->Trigger(Socket); };
}
+ else if (strcmp(pTargetText, "ACTOR_CARRIAGE") == 0)
+ {
+ CThestralCarriage* pEventTarget = m_pGameInstance->Get_Layer(NEXT_LEVEL, LAYER_ITEM)->Get_Object();
+ SocketContents.pEventTarget = pEventTarget;
+ SocketContents.funcEvent = [pEventTarget](CTimeSocket& Socket) { pEventTarget->Trigger(Socket); };
+ }
+ else if (strcmp(pTargetText, "SYSTEM") == 0)
+ {
+ bUseSystem = true;
+ }
+ assert((nullptr != SocketContents.pEventTarget) || bUseSystem);
+ assert((nullptr != SocketContents.funcEvent) || bUseSystem);
}
}
+ // -------- vFlags / Param_10 / Param_11 / Param_12 ----------
+ ReadFlags16(pSocketNode->FirstChildElement("vFlags"), SocketContents.vFlags);
+ ReadUInt4(pSocketNode->FirstChildElement("Param_10"), SocketContents.vParam_10);
+ ReadFloat4(pSocketNode->FirstChildElement("Param_11"), SocketContents.vParam_11);
+ const _char* pStringParma = pSocketNode->FirstChildElement("Param_12")->FirstChildElement("string")->Attribute("tag");
+ SocketContents.vParam_12 = pStringParma;
+
// -------- Param_0 ----------
tinyxml2::XMLElement* pParam0Node = pSocketNode->FirstChildElement("Param_0");
if (nullptr != pParam0Node)
@@ -445,10 +470,17 @@ void CCutSceneInfo::Load_CutSceneXML(const string& path)
SocketContents.wstrLayerName = CMyTools::ToWstring(pLayerNameText);
SocketContents.wstrKeyName = CMyTools::ToWstring(pTypeIdText);
- if (string_view(pTypeIdText) == "Ranrok")
+ if (string_view(pTypeIdText) == "ACTOR_RANROK")
{
- SocketContents.pOtherTarget =
- m_pGameInstance->Get_Layer(NEXT_LEVEL, SocketContents.wstrLayerName)->Get_Object();
+ SocketContents.pOtherTarget = m_pGameInstance->Get_Layer(NEXT_LEVEL, SocketContents.wstrLayerName)->Get_Object();
+ }
+ else if (string_view(pTypeIdText) == "ACTOR_PLAYER")
+ {
+ SocketContents.pOtherTarget = m_pGameInstance->Get_Layer(NEXT_LEVEL, SocketContents.wstrLayerName)->Get_Object();
+ }
+ else if (string_view(pTypeIdText) == "ACTOR_CARRIAGE")
+ {
+ SocketContents.pOtherTarget = m_pGameInstance->Get_Layer(NEXT_LEVEL, SocketContents.wstrLayerName)->Get_Object();
}
else if (string_view(pTypeIdText) == "CAMERA_CINEMATIC")
{
@@ -458,28 +490,49 @@ void CCutSceneInfo::Load_CutSceneXML(const string& path)
{
SocketContents.pOtherTarget = m_pGameInstance->Get_Camera(NEXT_LEVEL, CAMERA_SHOULDER);
}
-
- break;
- }
-
+ assert(nullptr != SocketContents.pOtherTarget);
+ }break;
case TIMESOCKET_PARAM::TRANSFORM:
{
tinyxml2::XMLElement* pTransformNode = pParam0Node->FirstChildElement("Transform");
ReadPxTransform(pTransformNode, SocketContents.pxTransform);
- break;
- }
+
+ }break;
+ case TIMESOCKET_PARAM::NOT_USE:
+ {
+ if (true == bUseSystem) {
+ switch (SocketContents.eTypeFunc)
+ {
+ case TIMESOCKET_FUNC::STOP_CINEMATIC:
+ SocketContents.funcEvent = [&](CTimeSocket& Socket) { m_pInfoInstance->DeActive_ActiveEvent(Socket.m_Contents.vParam_12); };
+ break;
+ case TIMESOCKET_FUNC::RESET_ENVIRONMENT:
+ SocketContents.funcEvent = [&](CTimeSocket& Socket) { m_pGameInstance->ResetLevel_Environment(); };
+ break;
+ case TIMESOCKET_FUNC::SET_VOLUMETRIC:
+ {
+ tinyxml2::XMLElement* pTransformNode = pParam0Node->FirstChildElement("Transform");
+ ReadPxTransform(pTransformNode, SocketContents.pxTransform);
+ SocketContents.funcEvent = [&](CTimeSocket& Socket) {
+ if (Socket.m_Contents.vFlags.b[0]) {
+ m_pGameInstance->Setting_Volumetirc(
+ Socket.m_Contents.pxTransform.q.x, Socket.m_Contents.pxTransform.q.y, Socket.m_Contents.pxTransform.q.z, Socket.m_Contents.pxTransform.q.w,
+ Socket.m_Contents.pxTransform.p.x);
+ }
+ };
+ }break;
+ default:
+ break;
+ }
+ assert(nullptr != SocketContents.funcEvent);
+ }
+ }break;
case TIMESOCKET_PARAM::END:
default:
break;
}
}
- // -------- vFlags / Param_10 / Param_11 / Param_12 ----------
- ReadFlags16(pSocketNode->FirstChildElement("vFlags"), SocketContents.vFlags);
- ReadUInt4(pSocketNode->FirstChildElement("Param_10"), SocketContents.vParam_10);
- ReadFloat4(pSocketNode->FirstChildElement("Param_11"), SocketContents.vParam_11);
- const _char* pStringParma = pSocketNode->FirstChildElement("Param_12")->FirstChildElement("string")->Attribute("tag");
- SocketContents.vParam_12 = pStringParma;
CTimeSocket* pSocket = CTimeSocket::Create(&SocketContents);
if (!pSocket) {
continue;
@@ -494,7 +547,7 @@ void CCutSceneInfo::Load_CutSceneXML(const string& path)
pTriggerNode->QueryFloatAttribute("X", &Desc.vPosition_Radius.x);
pTriggerNode->QueryFloatAttribute("Y", &Desc.vPosition_Radius.y);
pTriggerNode->QueryFloatAttribute("Z", &Desc.vPosition_Radius.z);
- pTimeLine->m_pTriggerBox = CTriggerBox::Create(&Desc);
+ pTimeLine->m_pTriggerBox = CTriggerBox::Create(m_pDevice, m_pContext, &Desc);
}
}
diff --git a/Jusin154_Team3D/Client/Private/Decendo.cpp b/Jusin154_Team3D/Client/Private/Decendo.cpp
index 4ea08497c..0247ff623 100644
--- a/Jusin154_Team3D/Client/Private/Decendo.cpp
+++ b/Jusin154_Team3D/Client/Private/Decendo.cpp
@@ -24,7 +24,6 @@ CDecendo::CDecendo(const CDecendo& rhs)
HRESULT CDecendo::Initialize_Prototype()
{
-
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Decendo")))
return E_FAIL;
@@ -40,11 +39,11 @@ HRESULT CDecendo::Initialize(void* pArg)
if (FAILED(Ready_Components(pArg)))
return E_FAIL;
+
if (FAILED(Create_Effect()))
return E_FAIL;
m_iSkillType = ENUM_CLASS(SKILL_TYPE::DESCENDO);
-
m_wstrEffectName = L"Decendo";
m_pProjectile_Blur = Get_PartObject("Decendo_Proj_Blur");
@@ -90,7 +89,6 @@ void CDecendo::Update(_float fTimeDelta)
m_pProjectile_Blur->Get_Component()->Translation(XMLoadFloat3(&m_vRotateUp) * sinf(m_fRotateAccTime) * 0.1f);
m_pProjectile->Get_Component()->Translation(XMLoadFloat3(&m_vRotateUp) * sinf(m_fRotateAccTime) * 0.1f);
-
}
void CDecendo::Late_Update(_float fTimeDelta)
@@ -98,19 +96,25 @@ void CDecendo::Late_Update(_float fTimeDelta)
if (m_bVisible == false)
return;
- Get_PartObject()->Trail_Update(m_pProjectile->Get_Component()->Get_XMWorldMatrix(), fTimeDelta);
+ Get_PartObject()->Oneside_Rope_Trail_Update(m_pProjectile->Get_Component()->Get_XMWorldMatrix(), fTimeDelta);
XMStoreFloat4(&m_vEndPos, m_pProjectile->Get_WorldPostion());
_vector vDir = XMLoadFloat4(&m_vEndPos) - XMLoadFloat4(&m_vStartPos);
-
if (false == m_bHit) {
_vector vStartPos = XMLoadFloat4(&m_vStartPos);
_vector vEndPos = XMLoadFloat4(&m_vEndPos);
- ON_COLLISION_INFO CollisionInfo = SweepTarget(vStartPos, vEndPos, 0.002f);
- OnCollision(this, &CollisionInfo);
+ if (false == m_bHit) {
+ _vector vStartPos = XMLoadFloat4(&m_vStartPos);
+ _vector vEndPos = XMLoadFloat4(&m_vEndPos);
+ if (false == XMVector3NearEqual(vEndPos, XMVectorZero(), XMVectorReplicate(FLT_EPSILON5)))
+ {
+ ON_COLLISION_INFO CollisionInfo = SweepTarget(vStartPos, vEndPos, 0.02f);
+ OnCollision(this, &CollisionInfo);
+ }
+ }
}
__super::Late_Update(fTimeDelta);
@@ -129,12 +133,15 @@ HRESULT CDecendo::Pre_Setting(CGameObject* pObject, void* pArg)
CPartObject* pCircle0 = Get_PartObject();
CPartObject* pWandLight = Get_PartObject("Decendo_Wand_Light");
+ CPartObject* pDecendo_Wand_Line = Get_PartObject("Decendo_Wand_Line");
pCircle0->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
pWandLight->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
+ pDecendo_Wand_Line->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
pCircle0->Set_Visible(true);
pWandLight->Set_Visible(true);
+ pDecendo_Wand_Line->Set_Visible(true);
/* 초기 위치 저장 */
_vector vStartPos = m_pOwner->Get_WorldPostion();
@@ -148,6 +155,7 @@ HRESULT CDecendo::Pre_Setting(CGameObject* pObject, void* pArg)
/* 초기 객체 비지블 */
m_pProjectile->Set_Visible(true);
m_pProjectile_Blur->Set_Visible(true);
+ //m_pProjectile_Fire->Set_Visible(true);
/*트레일 초기화 */
Get_PartObject()->Set_Visible(true);
@@ -158,11 +166,9 @@ HRESULT CDecendo::Pre_Setting(CGameObject* pObject, void* pArg)
XMStoreFloat3(&m_vCameraLook, vDirection);
-
-
{ /* 대상 위치 지정 */
-
m_pInfoInstance->Get_LockOnInfo(m_Info);
+
if (nullptr != m_Info.pUnit || nullptr != m_Info.pEffect) {
XMStoreFloat4(&m_vTargetPos, Get_LockOnPos(m_Info));
@@ -258,48 +264,52 @@ void CDecendo::OnCollision(CGameObject* pOther, void* pDesc)
ON_COLLISION_INFO CollisionDesc = *static_cast(pDesc);
- _vector vPos = XMLoadFloat4(&CollisionDesc.vWorldPos);
+ _vector vHitPos = XMLoadFloat4(&CollisionDesc.vWorldPos);
+ CCharacter_Controller* pCCT = CollisionDesc.pObject->Get_Component();
+ _vector vFootPos = {};
+ _vector vHeadPos = {};
+ _vector vPos = {};
- for (auto& pPair : m_PartObjects)
+ if (pCCT != nullptr)
{
- pPair.second->Set_Visible(true);
- pPair.second->Get_Component()->Set_State(STATE::POSITION, vPos);
- }
+ vFootPos = pCCT->Get_FootPosition();
+ vPos = pCCT->Get_Position();
+ vHeadPos = pCCT->Get_HeadPosition();
+ CPartObject* pDecendo_Rock_PT = Get_PartObject("Decendo_Rock_PT");
+ CPartObject* pDecendo_Red_Blur = Get_PartObject("Decendo_Red_Blur");
+ CPartObject* pDecendo_Down = Get_PartObject("Decendo_Down");
+ CPartObject* pDecendo_Ring = Get_PartObject("Decendo_Ring");
+ CPartObject* pDecendo_Smoke = Get_PartObject("Decendo_Smoke");
+
+ pDecendo_Rock_PT->Set_Visible(true);
+ pDecendo_Rock_PT->Get_Component()->Set_State(STATE::POSITION, vFootPos);
+
+ pDecendo_Red_Blur->Set_Visible(true);
+ pDecendo_Red_Blur->Get_Component()->Set_State(STATE::POSITION, vPos);
+
+ pDecendo_Down->Set_Visible(true);
+ pDecendo_Down->Get_Component()->Set_State(STATE::POSITION, vHeadPos);
+
+ pDecendo_Ring->Set_Visible(true);
+ pDecendo_Ring->Get_Component()->Set_State(STATE::POSITION, vFootPos);
+
+ pDecendo_Smoke->Set_Visible(true);
+ pDecendo_Smoke->Get_Component()->Set_State(STATE::POSITION, vFootPos);
+
+
+ }
+
m_pProjectile_Blur->Set_Visible(false);
m_pProjectile->Set_Visible(false);
-
- CWand* pWand = static_cast(m_pOwner);
-
- if (pWand == nullptr)
- return;
-
- CPartObject* pCircle0 = Get_PartObject();
- CPartObject* pWandLight = Get_PartObject("Decendo_Wand_Light");
-
-
- pCircle0->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
- pWandLight->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
-
- pCircle0->Set_Visible(false);
- pWandLight->Set_Visible(false);
-
- _vector vPlayerPos = m_pOwner->Get_Component()->Get_State(STATE::POSITION);
-
-
-
- Get_PartObject("Decendo_Down")->Get_Component()->LookAt(vPlayerPos);
- Get_PartObject("Decendo_Smoke")->Get_Component()->LookAt(vPlayerPos);
-
-
-
Get_PartObject()->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f, 0.f, 0.f, 1.f));
Get_PartObject()->Set_Visible(false);
+
}
void CDecendo::Free()
@@ -308,12 +318,11 @@ void CDecendo::Free()
SAFE_RELEASE(m_pProjectile_Blur);
SAFE_RELEASE(m_pProjectile);
-
}
#ifdef _DEBUG
void CDecendo::Describe_Entity()
{
- GUI::Begin("DECENDO", 0, IMGUI_GLOBAL_BEGIN_FLAG);
+ GUI::Begin("DECENDO");
GUI::InputFloat("Speed", &m_fLinearSpeed);
diff --git a/Jusin154_Team3D/Client/Private/DecendoSide.cpp b/Jusin154_Team3D/Client/Private/DecendoSide.cpp
index 481332cbf..eac181609 100644
--- a/Jusin154_Team3D/Client/Private/DecendoSide.cpp
+++ b/Jusin154_Team3D/Client/Private/DecendoSide.cpp
@@ -44,21 +44,19 @@ HRESULT CDecendoSide::Initialize(void* pArg)
m_pWandLight = Get_PartObject("Wand_Light_R");
m_pWandTrail = Get_PartObject();
+ m_pWand_Fire = Get_PartObject("Wand_Fire");
SAFE_ADDREF(m_pWandLight);
SAFE_ADDREF(m_pWandTrail);
+ SAFE_ADDREF(m_pWand_Fire);
m_fDuration = 2.f;
- m_Events.emplace(0.6f, [&]() {
- CWand* pWand = static_cast(m_pOwner);
- if (pWand == nullptr)
- return;
-
- m_isTrailEnd = true;
-
- XMStoreFloat4x4(&m_TrailStopMat, pWand->Get_WorldMatrix());
+ m_Events.emplace(0.8f, [&]() {
+ m_isParticleEnd = true;
+ m_pWandTrail->SetDissolve(true);
+ m_pWand_Fire->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f, -9999.f, 0.f, 1.f));
});
return S_OK;
@@ -87,6 +85,9 @@ void CDecendoSide::Update(_float fTimeDelta)
m_pWandLight->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
+ if(m_isParticleEnd == false)
+ m_pWand_Fire->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
+
_matrix TrailMat = m_isTrailEnd ? XMLoadFloat4x4(&m_TrailStopMat) : pWand->Get_WorldMatrix();
m_pWandTrail->Trail_Update(TrailMat, fTimeDelta);
@@ -114,17 +115,20 @@ HRESULT CDecendoSide::Pre_Setting(CGameObject* pObject, void* pArg)
return E_FAIL;
m_isTrailEnd = false;
+ m_isParticleEnd = false;
m_pWandLight->Set_Visible(true);
+ m_pWand_Fire->Set_Visible(true);
/*트레일 초기화 */
m_pWandTrail->Set_Visible(true);
+
m_pWandTrail->Get_Component()->Reset_Trail();
/*_vector pPos = pPlayer->Get_WandPos().r[3];*/
m_pWandLight->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
-
+ m_pWand_Fire->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
return S_OK;
}
@@ -182,6 +186,8 @@ void CDecendoSide::Free()
Safe_Release(m_pWandLight);
Safe_Release(m_pWandTrail);
+ Safe_Release(m_pWand_Fire);
+
}
#ifdef _DEBUG
diff --git a/Jusin154_Team3D/Client/Private/Dialogue_Panel.cpp b/Jusin154_Team3D/Client/Private/Dialogue_Panel.cpp
index ab0a59d8b..a438c9f5c 100644
--- a/Jusin154_Team3D/Client/Private/Dialogue_Panel.cpp
+++ b/Jusin154_Team3D/Client/Private/Dialogue_Panel.cpp
@@ -150,7 +150,7 @@ void CDialogue_Panel::Change_Map()
CLayer* pDuelistLayer = m_pGameInstance->Get_Layer(CURRENT_LEVEL, LAYER_DUELIST);
if (nullptr != pDuelistLayer) {
CHuman_Duelist* pDuelist = pDuelistLayer->Get_Object();
- pDuelist->Get_Component()->Set_Position(XMVectorSet(1007.23f, 2.f, 1016.f, 1.f));
+ pDuelist->Get_Component()->Set_Position(XMVectorSet(1007.23f, 2.f, 1015.f, 1.f));
pDuelist->Set_Battle(true);
}
@@ -158,9 +158,10 @@ void CDialogue_Panel::Change_Map()
if (nullptr != pLayer) {
CHuman_Duelist* pDuelist = pDuelistLayer->Get_Object();
CPlayer* pPlayer = pLayer->Get_Object();
- pPlayer->Get_Component()->Set_Position(XMVectorSet(1007.23f, 2.f, 1008.f, 1.f));
+ _vector vOriginPos = pPlayer->Get_Component()->Get_Position();
+ pPlayer->Get_Component()->Set_Position(XMVectorSet(1007.23f, 2.f, 1010.f, 1.f));
pPlayer->Set_Battle(true);
-
+ pPlayer->Set_OriginPos(vOriginPos);
_vector vPos = pPlayer->Get_WorldPostion();
_vector vForward = XMVectorSet(0.f, 0.f, 1.f, 0.f);
@@ -184,7 +185,6 @@ void CDialogue_Panel::Change_Map()
}
}
#endif // Bin
-
}
void CDialogue_Panel::Priority_Update(_float fTimeDelta)
diff --git a/Jusin154_Team3D/Client/Private/Duelist_Levioso.cpp b/Jusin154_Team3D/Client/Private/Duelist_Levioso.cpp
index 505c1e6ea..8c019cd6e 100644
--- a/Jusin154_Team3D/Client/Private/Duelist_Levioso.cpp
+++ b/Jusin154_Team3D/Client/Private/Duelist_Levioso.cpp
@@ -92,9 +92,16 @@ void CDuelist_Levioso::Late_Update(_float fTimeDelta)
_vector vStartPos = XMLoadFloat4(&m_vStartPos);
_vector vEndPos = XMLoadFloat4(&m_vEndPos);
- ON_COLLISION_INFO CollisionInfo = MonsterSweepTarget(vStartPos, vEndPos, 0.002f);
- OnCollision(this, &CollisionInfo);
+ if (false == m_bHit) {
+ _vector vStartPos = XMLoadFloat4(&m_vStartPos);
+ _vector vEndPos = XMLoadFloat4(&m_vEndPos);
+ if (false == XMVector3NearEqual(vEndPos, XMVectorZero(), XMVectorReplicate(FLT_EPSILON5)))
+ {
+ ON_COLLISION_INFO CollisionInfo = MonsterSweepTarget(vStartPos, vEndPos, 0.02f);
+ OnCollision(this, &CollisionInfo);
+ }
+ }
}
__super::Late_Update(fTimeDelta);
diff --git a/Jusin154_Team3D/Client/Private/Duelist_NormalJap.cpp b/Jusin154_Team3D/Client/Private/Duelist_NormalJap.cpp
index 033f89984..1169c6e4b 100644
--- a/Jusin154_Team3D/Client/Private/Duelist_NormalJap.cpp
+++ b/Jusin154_Team3D/Client/Private/Duelist_NormalJap.cpp
@@ -129,9 +129,19 @@ void CDuelist_NormalJap::Late_Update(_float fTimeDelta)
if (false == m_bHit) {
_vector vStartPos = XMLoadFloat4(&m_vStartPos);
_vector vEndPos = m_pProjectile->Get_WorldPostion();
- ON_COLLISION_INFO CollisionInfo = MonsterSweepTarget(vStartPos, vEndPos, 0.02f);
- OnCollision(this, &CollisionInfo);
+ if (false == m_bHit) {
+ _vector vStartPos = XMLoadFloat4(&m_vStartPos);
+ _vector vEndPos = XMLoadFloat4(&m_vEndPos);
+ if (false == XMVector3NearEqual(vEndPos, XMVectorZero(), XMVectorReplicate(FLT_EPSILON5)))
+ {
+ ON_COLLISION_INFO CollisionInfo = MonsterSweepTarget(vStartPos, vEndPos, 0.02f);
+ OnCollision(this, &CollisionInfo);
+ }
+ else {
+ int a = 0;
+ }
+ }
}
__super::Late_Update(fTimeDelta);
diff --git a/Jusin154_Team3D/Client/Private/Duelist_Protego.cpp b/Jusin154_Team3D/Client/Private/Duelist_Protego.cpp
index 8259220b0..bc7c74009 100644
--- a/Jusin154_Team3D/Client/Private/Duelist_Protego.cpp
+++ b/Jusin154_Team3D/Client/Private/Duelist_Protego.cpp
@@ -62,8 +62,9 @@ void CDuelist_Protego::Priority_Update(_float fTimeDelta)
void CDuelist_Protego::Update(_float fTimeDelta)
{
- if (m_bVisible == false)
+ if (m_bVisible == false) {
return;
+ }
m_pSphere->Get_Component()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
m_pSphereLay->Get_Component()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
@@ -101,6 +102,12 @@ void CDuelist_Protego::Late_Update(_float fTimeDelta)
}
+void CDuelist_Protego::Set_Visible(_bool bVisible)
+{
+ m_bVisible = true;
+ m_pGameInstance->Attach_Actor(*m_pRigidBody->Get_Actor(), CURRENT_LEVEL);
+}
+
HRESULT CDuelist_Protego::Pre_Setting(CGameObject* pObject, void* pArg)
{
if (FAILED(__super::Pre_Setting(pObject, nullptr)))
@@ -196,11 +203,13 @@ void CDuelist_Protego::OnCollision(CGameObject* pOther, void* pDesc)
{
case ENUM_CLASS(SKILL_TYPE::LEVIOSO):
m_pOwner->OnCollision(pOther, CollisionDesc);
+ m_pRigidBody->Detach_Actor(CURRENT_LEVEL);
m_bVisible = false;
m_pGameInstance->Detach_Actor(*m_pRigidBody->Get_Actor(), NEXT_LEVEL);
break;
case ENUM_CLASS(SKILL_TYPE::STUPEFY):
m_pOwner->OnCollision(pOther, CollisionDesc);
+ m_pRigidBody->Detach_Actor(CURRENT_LEVEL);
m_bVisible = false;
m_pGameInstance->Detach_Actor(*m_pRigidBody->Get_Actor(), NEXT_LEVEL);
break;
diff --git a/Jusin154_Team3D/Client/Private/EffectObject.cpp b/Jusin154_Team3D/Client/Private/EffectObject.cpp
index 416db96f1..a39378b13 100644
--- a/Jusin154_Team3D/Client/Private/EffectObject.cpp
+++ b/Jusin154_Team3D/Client/Private/EffectObject.cpp
@@ -180,7 +180,7 @@ void CEffectObject::FollowParents(const _float4x4* pParentsMat,const _float4x4*
m_pParentMatrix = pParentsMat;
}
- m_bVisible = true;
+ Set_Visible(true);
}
diff --git a/Jusin154_Team3D/Client/Private/EffectPool.cpp b/Jusin154_Team3D/Client/Private/EffectPool.cpp
index 1fd0ae662..01ab839fb 100644
--- a/Jusin154_Team3D/Client/Private/EffectPool.cpp
+++ b/Jusin154_Team3D/Client/Private/EffectPool.cpp
@@ -20,6 +20,7 @@
#include "AvadakedavraSide.h"
#include "StupefySide.h"
#include "TransformationSide.h"
+#include "AccioSide.h"
#include "NomalJapSide.h"
#include "Lumos.h"
@@ -30,6 +31,10 @@
#include "Troll_Rush_Hit.h"
#include "Troll_Nomal_Smoke.h"
#include "TrollSwing.h"
+#include "Troll_Rush.h"
+#include "Troll_Shout.h"
+#include "Troll_Self_Hit.h"
+
#include "Goblin_Protego.h"
#include "Goblin_Attack.h"
#include "Mage_Down_Attack.h"
@@ -92,6 +97,8 @@ HRESULT CEffectPool::Initialize(void* pArg)
if (FAILED(Ready_Components())) {
return E_FAIL;
}
+ m_isActiveEffectCreate = true;
+ m_isActiveMonsterEffectCreate = true;
// 디버그 모드일 때
#ifdef _DEBUG
#ifdef gimch
@@ -115,31 +122,6 @@ HRESULT CEffectPool::Initialize(void* pArg)
m_isActiveMonsterEffectCreate = true;
#endif //
#endif
- //// 디버그 모드가 아닐 때, 릴리즈모드에
-#ifndef _DEBUG
-#ifdef gimch
- m_isActiveEffectCreate = true;
- m_isActiveMonsterEffectCreate = true;
-#endif // gimch
-#ifdef Bin
- m_isActiveEffectCreate = true;
- m_isActiveMonsterEffectCreate = true;
-#endif //
-#ifdef 진우
- m_isActiveEffectCreate = true;
- m_isActiveMonsterEffectCreate = true;
-#endif //
-#ifdef 기무리
- m_isActiveEffectCreate = true;
- m_isActiveMonsterEffectCreate = true;
-#endif //
-#ifdef 나
- m_isActiveEffectCreate = true;
- m_isActiveMonsterEffectCreate = true;
-#endif //
-#endif // !_DEBUG
-
-
if (m_isActiveEffectCreate)
{
if (FAILED(Ready_Effect()))
@@ -521,6 +503,14 @@ HRESULT CEffectPool::Ready_Effect()
return pEffect; }
))) return E_FAIL;
+ if (FAILED(Create_Effect(SKILL_TYPE::ACCIO_SIDE, 3, g_iStaticLevel, g_iStaticLevel, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
+
+ CAccioSide* pEffect = nullptr;
+
+ pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr);
+
+ return pEffect; }
+ ))) return E_FAIL;
return S_OK;
}
@@ -782,7 +772,36 @@ HRESULT CEffectPool::Ready_MonsterEffect()
return pEffect; }
))) return E_FAIL;
+
+ if (FAILED(Create_Effect(SKILL_TYPE::TROLL_SHOUT, 5, g_iStaticLevel, g_iStaticLevel, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
+
+ CTroll_Shout* pEffect = nullptr;
+
+ pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr);
+
+ return pEffect; }
+ ))) return E_FAIL;
+
+
+ if (FAILED(Create_Effect(SKILL_TYPE::TROLL_RUSH, 5, g_iStaticLevel, g_iStaticLevel, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
+
+ CTroll_Rush* pEffect = nullptr;
+
+ pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr);
+
+ return pEffect; }
+ ))) return E_FAIL;
+
+ if (FAILED(Create_Effect(SKILL_TYPE::TROLL_SELF_HIT, 5, g_iStaticLevel, g_iStaticLevel, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
+
+ CTroll_Self_Hit* pEffect = nullptr;
+
+ pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr);
+
+ return pEffect; }
+ ))) return E_FAIL;
+
return S_OK;
}
diff --git a/Jusin154_Team3D/Client/Private/Effect_Container.cpp b/Jusin154_Team3D/Client/Private/Effect_Container.cpp
index 89f5f376a..0490cc895 100644
--- a/Jusin154_Team3D/Client/Private/Effect_Container.cpp
+++ b/Jusin154_Team3D/Client/Private/Effect_Container.cpp
@@ -565,7 +565,7 @@ HRESULT CEffect_Container::Pre_Setting(CGameObject* pObject, void* pArg)
m_fAccTime = 0.f;
m_fPreAccTime = 0.f;
- m_bVisible = true;
+ Set_Visible(true);
m_isCollisionEnter = false;
m_bHit = false;
diff --git a/Jusin154_Team3D/Client/Private/Elf.cpp b/Jusin154_Team3D/Client/Private/Elf.cpp
new file mode 100644
index 000000000..b0414f746
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/Elf.cpp
@@ -0,0 +1,628 @@
+#include "pch.h"
+#include "Elf.h"
+
+#include "GameInstance.h"
+#include "InfoInstance.h"
+#include "Player.h"
+#include "NPCInteraction.h"
+#include "CallBack_NonPlayable_Behavior.h"
+#include "CallBack_NonPlayable_HitReport.h"
+#include "Layer.h"
+
+CElf::CElf(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CUnit(pDevice, pContext)
+{
+}
+
+CElf::CElf(const CElf& Prototype)
+ : CUnit(Prototype),
+ m_pInfoInstance(CInfoInstance::GetInstance())
+{
+}
+
+HRESULT CElf::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CElf::Initialize(void* pArg)
+{
+ if (FAILED(__super::Initialize(pArg))) {
+ return E_FAIL;
+ }
+
+ ELFDESC* pDesc = static_cast(pArg);
+
+ if (FAILED(Ready_Components(pArg))) {
+ return E_FAIL;
+ }
+
+ Load_AnimXML("../Bin/Resources/Data/AnimList/Elf.xml");
+
+ Load_ElfPos("../Bin/Resources/Data/ElfPos/ElfPos.xml");
+
+ _vector vPos = XMLoadFloat4(&pDesc->vPos);
+ m_pTransformCom->Set_State(STATE::POSITION, vPos);
+ m_pCharacter_Controller->Set_Position(vPos);
+ m_pTransformCom->Rotation(XMLoadFloat4(&pDesc->vRotQ));
+
+ m_pModelCom->Set_AnimationIndex(m_Anims[m_iCurrentFlow].AnimIndex, false);
+
+ m_pCallBack_Behavior->Initialize(m_pCharacter_Controller);
+ m_pCallBack_HitReport->Initialize(m_pCharacter_Controller);
+
+ return S_OK;
+}
+
+void CElf::Priority_Update(_float fTimeDelta)
+{
+ m_pTransformCom->RewindMomentum();
+ m_iEntered -= 1;
+ if (m_iEntered < 0) {
+ m_iEntered = 0;
+ }
+ __super::Priority_Update(fTimeDelta);
+}
+
+void CElf::Update(_float fTimeDelta)
+{
+ MoveTo(fTimeDelta);
+
+ Set_Anim();
+
+ m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
+
+ __super::Update(fTimeDelta);
+#ifdef _DEBUG
+ Describe_Entity();
+#endif // _DEBUG
+ { // 세트
+ m_pCallBack_HitReport->BeginFrame();
+ m_pCharacter_Controller->Move(fTimeDelta);
+ m_pCallBack_HitReport->Set_CurrentSlop();
+ }
+
+ m_pRigidBody->Set_Position(m_pTransformCom->Get_State(STATE::POSITION), true);
+
+ _vector vCurrentPos = Get_WorldPostion();
+ pair pairTarget = m_pInfoInstance->Get_NearestPlayerAlly(vCurrentPos);
+ if (nullptr != pairTarget.first) {
+ Set_Target(*pairTarget.first, *pairTarget.second);
+ }
+ if (nullptr != m_pTarget && m_pTarget->isDead()) {
+ SAFE_RELEASE(m_pTarget);
+ m_fTargetDistance = { FLT_MAX };
+ }
+}
+
+void CElf::Late_Update(_float fTimeDelta)
+{
+ m_pTransformCom->Set_State(STATE::POSITION, m_pCharacter_Controller->Get_FootPosition());
+
+ m_pRigidBody->Set_Position(m_pTransformCom->Get_State(STATE::POSITION), true);
+
+ m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
+
+ Set_Shadow(m_pGameInstance->IsIn_ShadowViewFrustum(m_pTransformCom->Get_State(STATE::POSITION), m_pTransformCom->Get_Radius()));
+
+
+ __super::Late_Update(fTimeDelta);
+}
+
+HRESULT CElf::Render()
+{
+ if (FAILED(Bind_ShaderResources())) {
+ return E_FAIL;
+ }
+
+ _uint iNumMeshes = m_pModelCom->Get_NumMeshes();
+
+ for (_uint i = 0; i < iNumMeshes; i++)
+ {
+ if (FAILED(m_pShaderCom->Bind_Matrices(
+ "g_OffsetMatrix",
+ m_pModelCom->Get_OffsetMatrix(i).data(),
+ (_int)m_pModelCom->Get_OffsetMatrix(i).size()
+ )))
+ {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
+ return E_FAIL;
+ }
+ if (FAILED(Bind_ShaderParameters(i))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pModelCom->Begin(i, m_pShaderCom))) {
+ return E_FAIL;
+ }
+
+ m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
+ m_pModelCom->Bind_OutPut_SRV_VS_Prev(27, 0);
+
+ if (FAILED(m_pModelCom->Render(i))) {
+ return E_FAIL;
+ }
+ }
+
+ return S_OK;
+}
+
+HRESULT CElf::Render_Shadow(SHADOW eType)
+{
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pGameInstance->Bind_Shadow_Resource(m_pShaderCom, "g_ViewMatrix", D3DTS::VIEW, eType))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pGameInstance->Bind_Shadow_Resource(m_pShaderCom, "g_ProjMatrix", D3DTS::PROJ, eType))) {
+ return E_FAIL;
+ }
+ _uint iNumMeshes = m_pModelCom->Get_NumMeshes();
+
+ for (_uint i = 0; i < iNumMeshes; i++)
+ {
+ if (FAILED(m_pShaderCom->Bind_Matrices(
+ "g_OffsetMatrix",
+ m_pModelCom->Get_OffsetMatrix(i).data(),
+ (_int)m_pModelCom->Get_OffsetMatrix(i).size()
+ )))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_NPC_PBR_ANIM::SHADOW)))) {
+ return E_FAIL;
+ }
+
+ m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
+ m_pModelCom->Bind_OutPut_SRV_VS_Prev(27, 0);
+
+ if (FAILED(m_pModelCom->Render(i))) {
+ return E_FAIL;
+ }
+ }
+
+ return S_OK;
+}
+
+void CElf::OnRayCollision(CGameObject* pCaster, _uint iCastedOrder, _float fDistance, _float3 vCastedWorldPos)
+{
+ CPlayer* pPlayer = dynamic_cast(pCaster);
+ if (nullptr == pPlayer) {
+ return;
+ }
+ if (fDistance < m_fEncounterDistance) {
+ m_iEntered = 4;
+ }
+}
+
+_wstring CElf::Get_Name()
+{
+ return m_pNpcStat->Get_Stat().pNpc_Name;
+}
+
+_wstring CElf::Get_NpcName()
+{
+ return m_pNpcStat->Get_Stat().pName;
+}
+
+void CElf::Set_Target(CUnit& pTarget, CTransform& pTransform)
+{
+ SAFE_RELEASE(m_pTarget);
+ m_pTarget = &pTarget;
+ SAFE_ADDREF(m_pTarget);
+
+ _vector vTargetPos = pTransform.Get_State(STATE::POSITION);
+ _vector vToTargetDir = vTargetPos - Get_WorldPostion();
+ XMStoreFloat4(&m_vTargetPos, vTargetPos);
+ XMStoreFloat3(&m_vToTargetDir, XMVector3Normalize(vToTargetDir));
+ m_fTargetDistance = XMVectorGetX(XMVector3Length(vToTargetDir));
+}
+
+
+HRESULT CElf::Bind_ShaderResources()
+{
+ if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevViewMatrix", D3DTS::VIEW))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevProjMatrix", D3DTS::PROJ))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
+ return E_FAIL;
+ }
+ return S_OK;
+}
+
+HRESULT CElf::Bind_ShaderParameters(_uint iMeshOrder)
+{
+ _bool bUseColorMixer = false;
+
+ _uint iColorParam = { UINT_MAX };
+ _float fMixerFactor = { FLT_MAX };
+ _uint iColorMixerMethod = { 0 };
+
+ switch (m_pModelCom->Get_UsingPass(iMeshOrder, m_pShaderCom))
+ {
+ case 23:
+ {
+ bUseColorMixer = true;
+ iColorParam = 0x2E2E2E;
+ fMixerFactor = 0.9f;
+ iColorMixerMethod = 1;
+ }
+ break;
+ }
+ if (true == bUseColorMixer) {
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_iPackedBlendColor", &iColorParam, sizeof(_uint)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fMixerFactor", &fMixerFactor, sizeof(_float)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_iColorMixerMethod", &iColorMixerMethod, sizeof(_uint)))) {
+ return E_FAIL;
+ }
+ }
+ return S_OK;
+}
+
+void CElf::MoveTo(_float fTimeDelta)
+{
+ if (m_Points.empty())
+ return;
+
+ if (m_iCurrentFlow > m_Points.size())
+ {
+ return;
+ }
+
+ _vector Target = XMLoadFloat4(&m_Points[m_iCurrentFlow]);
+
+ _vector CurPos = m_pCharacter_Controller->Get_Position();
+ _vector vLook = XMVector3Normalize(m_pTransformCom->Get_State(STATE::LOOK));
+
+
+ _vector toTarget = Target - CurPos;
+ _float fDist = XMVectorGetX(XMVector3Length(toTarget));
+
+ if (fDist < 3.f)
+ {
+ if (m_iCurrentFlow + 1 < m_Points.size())
+ {
+ if (m_pModelCom->IsFinishedAnim() && m_Anims[m_iCurrentFlow].Trigger == ENUM_CLASS(FLOW_TRIGGER::ARRIVE_POS)) {
+ m_iCurrentFlow++;
+ }
+ }
+ }
+
+ m_pTransformCom->LookAt_Horizontal_Lerp(Target, fTimeDelta, 5.f);
+}
+
+void CElf::Set_Anim()
+{
+ if (m_Anims[m_iCurrentFlow].Trigger == ENUM_CLASS(FLOW_TRIGGER::ANIM_END))
+ {
+ if (m_pModelCom->IsFinishedAnim())
+ {
+ m_iCurrentFlow++;
+ }
+ }
+
+ _bool bRootBone = true;
+
+ m_pairAnimInfo = m_Anims[m_iCurrentFlow];
+ if (m_pairAnimInfo.AnimIndex == 1)
+ {
+ bRootBone = false;
+ }
+ m_pModelCom->Set_AnimationIndex(m_pairAnimInfo.AnimIndex, m_pairAnimInfo.Loop, 1.f, false, 1.f, bRootBone);
+}
+
+
+void CElf::Load_AnimXML(const string& path)
+{
+ tinyxml2::XMLDocument doc;
+ if (doc.LoadFile(path.c_str()) != tinyxml2::XML_SUCCESS)
+ return;
+
+ tinyxml2::XMLElement* pDialogue = doc.FirstChildElement("Dialogue");
+ if (!pDialogue)
+ return;
+
+ for (tinyxml2::XMLElement* pName = pDialogue->FirstChildElement("Name");
+ pName;
+ pName = pName->NextSiblingElement("Name"))
+ {
+ _int flow = pName->IntAttribute("Flow");
+
+ pName->QueryIntAttribute("Flow", &flow);
+
+ auto* pAnim = pName->FirstChildElement("Anim");
+ if (!pAnim) continue;
+
+ const char* stateStr = pAnim->Attribute("state");
+ if (!stateStr)
+ continue;
+
+ DialogueAnim Anim = {};
+
+ STATEANIM::ESTATE State = StringToStateAnim(stateStr);
+
+ Anim.AnimIndex = pAnim->IntAttribute("index");
+ Anim.Loop = pAnim->BoolAttribute("loop");
+
+ const char* trig = pName->Attribute("Trigger");
+
+ if (!strcmp(trig, "DIALOGUE_END"))
+ Anim.Trigger = ENUM_CLASS(FLOW_TRIGGER::DIALOGUE_END);
+ else if (!strcmp(trig, "ARRIVE_POS"))
+ Anim.Trigger = ENUM_CLASS(FLOW_TRIGGER::ARRIVE_POS);
+ else if (!strcmp(trig, "ANIM_END"))
+ Anim.Trigger = ENUM_CLASS(FLOW_TRIGGER::ANIM_END);
+
+
+ m_Anims[flow] = Anim;
+
+ m_Animation[State] = { Anim.AnimIndex, Anim.Loop };
+ }
+}
+
+HRESULT CElf::Load_ElfPos(const _char* pFilePath)
+{
+ tinyxml2::XMLDocument doc;
+ if (doc.LoadFile(pFilePath) != tinyxml2::XML_SUCCESS)
+ return E_FAIL;
+
+ auto* pElfPosInfo = doc.FirstChildElement("ElfPosInfo");
+ if (!pElfPosInfo) return E_FAIL;
+
+ auto* pElfPosData = pElfPosInfo->FirstChildElement("ElfPosData");
+ if (!pElfPosData) return E_FAIL;
+
+ for (auto* pName = pElfPosData->FirstChildElement("Name");
+ pName;
+ pName = pName->NextSiblingElement("Name"))
+ {
+ int flow = -1;
+ pName->QueryIntAttribute("Flow", &flow);
+
+ auto* pPosition = pName->FirstChildElement("Position");
+ if (!pPosition) continue;
+
+ auto* pPos = pPosition->FirstChildElement("Pos");
+ if (!pPos) continue;
+
+ _float x{}, y{}, z{};
+ pPos->QueryFloatAttribute("x", &x);
+ pPos->QueryFloatAttribute("y", &y);
+ pPos->QueryFloatAttribute("z", &z);
+
+ m_Points[flow] = { x, y, z, 1.f };
+ }
+
+ return S_OK;
+}
+
+
+HRESULT CElf::Ready_Components(void* pArg)
+{
+ CTransform::TRANSFORM_DESC Desc = {};
+
+ Desc.fSpeedPerSec = 10.f;
+ Desc.fRotationPerSec = XMConvertToRadians(180.0f);
+ Desc.fRadius = 10.f;
+
+ if (FAILED(Add_Component(g_iStaticLevel, &m_pTransformCom, pArg))) {
+ return E_FAIL;
+ }
+
+ /* Com_Model */
+ if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_Elf_Model"),
+ reinterpret_cast(&m_pModelCom)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("ELF"), (CComponent**)&m_pNpcStat))) {
+ return E_FAIL;
+ }
+
+ /* Com_Shader */
+ if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_NPC_PBR_ANIM,
+ reinterpret_cast(&m_pShaderCom)))) {
+ return E_FAIL;
+ }
+ { // CCT
+ CCharacter_Controller::Character_Controller_DESC Desc{};
+
+ Desc.iSubKind = ENUM_CLASS(PXOBJECT::OLLIVANDER);
+ Desc.pTransform = m_pTransformCom;
+ Desc.eBodyType = ACTOR::CAPSULE;
+ Desc.fContactOffset = 0.0001f;
+ Desc.fMaterial = { 1.2f, 1.0f, 0.0f };
+ Desc.bAutoStepping = { false };
+ Desc.fStepOffset = { 0.02f };
+ Desc.fRadius = 0.2f;
+ Desc.fHeight = 0.3f;
+ Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_NonPlayable_HitReport::Create();
+ Desc.pCallback_Behavior = m_pCallBack_Behavior = CCallBack_NonPlayable_Behavior::Create();
+ Desc.eClimbingMode = PSX::PxCapsuleClimbingMode::eEASY;
+ Desc.fWalkableSlope = 45.f;
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_CCT_CAPSULE"), (CComponent**)&m_pCharacter_Controller, &Desc))) {
+ return E_FAIL;
+ }
+ m_pCharacter_Controller->SetGravity(true);
+ }
+ { // DO
+ CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
+ Desc.iSubKind = ENUM_CLASS(PXOBJECT::OLLIVANDER);
+ Desc.bAutoOwnerTranslation = false;
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_NPC_HITBOX"), (CComponent**)&m_pRigidBody, &Desc))) {
+ return E_FAIL;
+ }
+ }
+
+ return S_OK;
+}
+
+CElf* CElf::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CElf* pInstance = new CElf(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CElf");
+ SAFE_RELEASE(pInstance);
+ }
+ return pInstance;
+}
+
+CGameObject* CElf::Clone(void* pArg, CGameObject* pOwner)
+{
+ CElf* pInstance = new CElf(*this);
+
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CElf");
+ SAFE_RELEASE(pInstance);
+ }
+ return pInstance;
+}
+
+void CElf::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pCharacter_Controller);
+ SAFE_RELEASE(m_pNpcStat);
+ SAFE_RELEASE(m_pRigidBody);
+ SAFE_RELEASE(m_pTarget);
+ if (nullptr != m_pInfoInstance) {
+ CInfoInstance* pInfo = m_pInfoInstance;
+ m_pInfoInstance = nullptr;
+ }
+ if (nullptr != m_pCallBack_Behavior) {
+ m_pCallBack_Behavior->Finalize();
+ }
+ if (nullptr != m_pCallBack_HitReport) {
+ m_pCallBack_HitReport->Finalize();
+ }
+ Safe_Delete(m_pCallBack_Behavior);
+ Safe_Delete(m_pCallBack_HitReport);
+}
+#ifdef _DEBUG
+
+void CElf::Describe_Entity()
+{
+ if (m_Anims[m_iCurrentFlow].Trigger == ENUM_CLASS(FLOW_TRIGGER::DIALOGUE_END))
+ {
+ GUI::InputInt("Flow", &m_iCurrentFlow);
+ }
+
+ _float3 Pos;
+ XMStoreFloat3(&Pos, Get_WorldPostion());
+
+ if (GUI::DragFloat3("Pos", (_float*)&Pos, 0.01f))
+ {
+ m_pCharacter_Controller->Set_Position(
+ XMVectorSet(Pos.x, Pos.y, Pos.z, 1.f));
+ }
+
+ _float4 vMomentum = {};
+ XMStoreFloat4(&vMomentum, m_pTransformCom->Get_CurrentMomentum());
+ GUI::Text("%.2f %.2f %.2f %.2f ", vMomentum.x, vMomentum.y, vMomentum.z, vMomentum.w);
+
+ if (GUI::Button("Move To Player"))
+ {
+ CPlayer* pPlayer =
+ m_pGameInstance->Get_Layer(NEXT_LEVEL, LAYER_PLAYER)->Get_Object();
+ m_pCharacter_Controller->Set_Position(pPlayer->Get_WorldPostion());
+
+ _vector vCurPos = m_pCharacter_Controller->Get_Position();
+ _float4 vPos;
+ XMStoreFloat4(&vPos, vCurPos);
+
+ char buf[128];
+ sprintf_s(buf,
+ "",
+ vPos.x, vPos.y, vPos.z);
+
+ GUI::SetClipboardText(buf);
+ }
+
+ GUI::Separator();
+
+ if (GUI::TreeNode("Points"))
+ {
+ GUI::Text("Total Count : %d", (_int)m_Points.size());
+
+ for (auto it = m_Points.begin(); it != m_Points.end(); )
+ {
+ _int index = it->first;
+ _float4& p = it->second;
+
+ GUI::PushID(index);
+
+ GUI::Text("[%d] (%.2f, %.2f, %.2f)", index, p.x, p.y, p.z);
+ GUI::SameLine();
+
+ if (GUI::SmallButton("Move"))
+ {
+ m_pCharacter_Controller->Set_Position(
+ XMVectorSet(p.x, p.y, p.z, 1.f));
+ }
+
+ GUI::SameLine();
+
+ if (GUI::SmallButton("Copy"))
+ {
+ _vector vCurPos = m_pCharacter_Controller->Get_Position();
+ XMStoreFloat4(&p, vCurPos);
+
+ char buf[128];
+ sprintf_s(buf,
+ "",
+ p.x, p.y, p.z);
+
+ GUI::SetClipboardText(buf);
+ }
+
+ GUI::SameLine();
+
+ if (GUI::SmallButton("X"))
+ {
+ it = m_Points.erase(it);
+ GUI::PopID();
+ continue;
+ }
+
+ GUI::PopID();
+ ++it;
+ }
+
+ if (GUI::SmallButton("Clear All"))
+ {
+ m_Points.clear();
+ }
+
+ GUI::TreePop();
+ }
+
+}
+#endif // _DEBUG
diff --git a/Jusin154_Team3D/Client/Private/Enemy_Panel.cpp b/Jusin154_Team3D/Client/Private/Enemy_Panel.cpp
index 13e82b73d..07ec14580 100644
--- a/Jusin154_Team3D/Client/Private/Enemy_Panel.cpp
+++ b/Jusin154_Team3D/Client/Private/Enemy_Panel.cpp
@@ -76,6 +76,10 @@ void CEnemy_Panel::Update_Target()
static_cast(m_pEnemy_Info)->Set_FadeOut();
return;
}
+
+ CStat* pStat = m_pInfoInstance->Get_TargetMonster()->Get_Stat();
+ if (pStat == nullptr)
+ return;
if (m_pInfoInstance->Get_TargetMonster()->Get_Stat()->Get_Stat().bBoss == true)
{
static_cast(m_pBoss_HpBar)->Update_Target();
diff --git a/Jusin154_Team3D/Client/Private/Goblin.cpp b/Jusin154_Team3D/Client/Private/Goblin.cpp
index 214eb3e41..dd1139d24 100644
--- a/Jusin154_Team3D/Client/Private/Goblin.cpp
+++ b/Jusin154_Team3D/Client/Private/Goblin.cpp
@@ -393,8 +393,11 @@ void CGoblin::OnCollision(CGameObject* pOther, void* pDesc)
if (pEffect_Container != nullptr)
{
_uint iSkillType = pEffect_Container->Get_SkillType();
+
+
damagePair = Get_Damage(m_pInfoInstance->Get_Spell_Damage(iSkillType));
+
switch (iSkillType)
{
case ENUM_CLASS(SKILL_TYPE::DESCENDO):
@@ -440,7 +443,6 @@ void CGoblin::OnCollision(CGameObject* pOther, void* pDesc)
}
}
-
m_DamageInfo.fDamage = damagePair.first;
m_pInfoInstance->Event_CallBack(TEXT("Monster_Hit"), &m_DamageInfo);
if (0 == damagePair.second) {
diff --git a/Jusin154_Team3D/Client/Private/Goblin_Assassin.cpp b/Jusin154_Team3D/Client/Private/Goblin_Assassin.cpp
index 7e4506566..4b80f2b91 100644
--- a/Jusin154_Team3D/Client/Private/Goblin_Assassin.cpp
+++ b/Jusin154_Team3D/Client/Private/Goblin_Assassin.cpp
@@ -406,7 +406,12 @@ void CGoblin_Assassin::OnCollision(CGameObject* pOther, void* pDesc)
if (pEffect_Container != nullptr)
{
_uint iSkillType = pEffect_Container->Get_SkillType();
- //damagePair = Get_Damage(m_pInfoInstance->Get_Spell_Damage(iSkillType));
+
+#ifndef Bin
+ damagePair = Get_Damage(m_pInfoInstance->Get_Spell_Damage(iSkillType));
+#endif // !Bin
+
+
switch (iSkillType)
{
@@ -453,16 +458,16 @@ void CGoblin_Assassin::OnCollision(CGameObject* pOther, void* pDesc)
}
}
-
- /*m_DamageInfo.fDamage = damagePair.first;
+#ifndef Bin
+ m_DamageInfo.fDamage = damagePair.first;
m_pInfoInstance->Event_CallBack(TEXT("Monster_Hit"), &m_DamageInfo);
if (0 == damagePair.second) {
m_pFSM->Change_State(FSMSTATE::DEAD);
_int ID = m_pStat->Get_Stat().iObjectID;
m_pInfoInstance->Event_CallBack(TEXT("MonsterDead"), &ID);
return;
- }*/
-
+ }
+#endif // !Bin
m_pFSM->Change_State(FSMSTATE::HIT);
diff --git a/Jusin154_Team3D/Client/Private/Goblin_Protego.cpp b/Jusin154_Team3D/Client/Private/Goblin_Protego.cpp
index d4bd1a5bf..e136496cc 100644
--- a/Jusin154_Team3D/Client/Private/Goblin_Protego.cpp
+++ b/Jusin154_Team3D/Client/Private/Goblin_Protego.cpp
@@ -102,6 +102,12 @@ void CGoblin_Protego::Late_Update(_float fTimeDelta)
}
+void CGoblin_Protego::Set_Visible(_bool bVisible)
+{
+ m_bVisible = true;
+ m_pGameInstance->Attach_Actor(*m_pRigidBody->Get_Actor(), CURRENT_LEVEL);
+}
+
HRESULT CGoblin_Protego::Pre_Setting(CGameObject* pObject, void* pArg)
{
if (FAILED(__super::Pre_Setting(pObject, nullptr)))
@@ -197,16 +203,19 @@ void CGoblin_Protego::OnCollision(CGameObject* pOther, void* pDesc)
{
case ENUM_CLASS(SKILL_TYPE::BOMBARDA):
m_pOwner->OnCollision(pOther, CollisionDesc);
+ m_pRigidBody->Detach_Actor(CURRENT_LEVEL);
m_bVisible = false;
m_pGameInstance->Detach_Actor(*m_pRigidBody->Get_Actor(), NEXT_LEVEL);
break;
case ENUM_CLASS(SKILL_TYPE::AVADAKEDAVRA):
m_pOwner->OnCollision(pOther, CollisionDesc);
+ m_pRigidBody->Detach_Actor(CURRENT_LEVEL);
m_bVisible = false;
m_pGameInstance->Detach_Actor(*m_pRigidBody->Get_Actor(), NEXT_LEVEL);
break;
case ENUM_CLASS(SKILL_TYPE::ANCIENT_MAGIC):
m_pOwner->OnCollision(pOther, CollisionDesc);
+ m_pRigidBody->Detach_Actor(CURRENT_LEVEL);
m_bVisible = false;
m_pGameInstance->Detach_Actor(*m_pRigidBody->Get_Actor(), NEXT_LEVEL);
break;
@@ -218,7 +227,7 @@ void CGoblin_Protego::OnCollision(CGameObject* pOther, void* pDesc)
if (pProps != nullptr)
{
m_pOwner->OnCollision(pOther, CollisionDesc);
- m_pGameInstance->Detach_Actor(*m_pRigidBody->Get_Actor(), NEXT_LEVEL);
+ m_pRigidBody->Detach_Actor(CURRENT_LEVEL);
m_bVisible = false;
}
}
diff --git a/Jusin154_Team3D/Client/Private/Human_Duelist.cpp b/Jusin154_Team3D/Client/Private/Human_Duelist.cpp
index e8f82652e..63f22ab9e 100644
--- a/Jusin154_Team3D/Client/Private/Human_Duelist.cpp
+++ b/Jusin154_Team3D/Client/Private/Human_Duelist.cpp
@@ -11,6 +11,7 @@
#include "Layer.h"
#include "Wand.h"
#include "Mesh.h"
+#include "Player.h"
CHuman_Duelist::CHuman_Duelist(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CMonster(pDevice, pContext)
@@ -67,6 +68,7 @@ HRESULT CHuman_Duelist::Initialize(void* pArg)
_vector vRotQ = XMLoadFloat4(&pDesc->vRotQ);
m_pCharacter_Controller->Set_Position(vPos);
m_pTransformCom->Set_State(STATE::POSITION, vPos);
+ m_OriginPos = pDesc->vPos;
m_pTransformCom->Rotation(vRotQ);
}
@@ -93,8 +95,7 @@ void CHuman_Duelist::Update(_float fTimeDelta)
Play_Event();
-
-
+ Check_BattleLose();
__super::Update(fTimeDelta);
#ifdef _DEBUG
@@ -109,8 +110,6 @@ void CHuman_Duelist::Update(_float fTimeDelta)
for (_uint i = 0; i < ENUM_CLASS(SKILL::END); i++)
m_fSkillCoolTime[i] = max(0.f, m_fSkillCoolTime[i] - fTimeDelta);
-
-
}
void CHuman_Duelist::Late_Update(_float fTimeDelta)
@@ -481,80 +480,21 @@ HRESULT CHuman_Duelist::Bind_ShaderParameters(_uint iMeshOrder)
_float fMixerFactor = { FLT_MAX };
_uint iColorMixerMethod = { 0 };
- switch (PLAYER_MESH_ORDER(iMeshOrder))
+ switch (CPlayer::PLAYER_MESH_ORDER(iMeshOrder))
{
- case PLAYER_MESH_ORDER::HAIR_MAIN:
- case PLAYER_MESH_ORDER::HEAD_EYELASH:
- case PLAYER_MESH_ORDER::HAIR_SUB:
+ case CPlayer::PLAYER_MESH_ORDER::HAIR_MAIN:
+ case CPlayer::PLAYER_MESH_ORDER::EYELASH:
bUseColorMixer = true;
iColorParam = 0x2E2E2E;
fMixerFactor = 0.9f;
iColorMixerMethod = 1;
break;
- case PLAYER_MESH_ORDER::LOWER:
+ case CPlayer::PLAYER_MESH_ORDER::CLOTH:
bUseColorMixer = true;
iColorParam = 0x292557;
fMixerFactor = 0.5f;
iColorMixerMethod = 1;
break;
- case PLAYER_MESH_ORDER::SHOES:
- bUseColorMixer = true;
- iColorParam = 0x614242;
- fMixerFactor = 0.5f;
- iColorMixerMethod = 1;
- break;
- case PLAYER_MESH_ORDER::UPPER:
- bUseColorMixer = true;
- iColorParam = 0xBFAC29;
- fMixerFactor = 0.658333f;
- iColorMixerMethod = 1;
- break;
-#ifdef 기무리
-
- //case PLAYER_MESH_ORDER::ROBE_CLOTH:
- //{
- // CMesh* pMesh = m_pModelCom->Get_Mesh(ENUM_CLASS(PLAYER_MESH_ORDER::ROBE_CLOTH));
- // _uint MeshBoneCount = pMesh->Get_NumBone();
-
- // for (_uint i = 0; i < MeshBoneCount; ++i)
- // {
- // XMStoreFloat4x4(&SkinMatrices[i], XMMatrixIdentity());
- // }
-
- // _uint temp = 0;
- // vector<_uint> globalMask = m_pModelCom->Get_BoneMask(ENUM_CLASS(BLEND_BONE::HIPS_CLOTH));
- // vector<_int> boneIndices = pMesh->Get_BoneIndices();
-
- // for (_uint i = 0; i < MeshBoneCount; ++i)
- // {
- // _uint global = boneIndices[i];
- // if (global == 38)
- // continue;
- // if (globalMask[global] == 1)
- // {
- // SkinMatrices[i] = m_pRobePart->Get_RobeJointAnchorMatrix(temp++);
- // }
- // }
-
- // GUI::DragFloat("TempWeight", &m_fTempWeight, 0.01f);
-
- // if (FAILED(m_pShaderCom->Bind_RawValue("g_TempWeight", &m_fTempWeight, sizeof(_float)))) {
- // return E_FAIL;
- // }
-
-
- // if (FAILED(m_pShaderCom->Bind_Matrices(
- // "g_BoneMatrices",
- // SkinMatrices.data(),
- // (_int)SkinMatrices.size()
- // )))
- // {
- // return E_FAIL;
- // }
- //}
- //break;
-#endif // _DEBUG
-
default:
break;
}
@@ -574,6 +514,29 @@ HRESULT CHuman_Duelist::Bind_ShaderParameters(_uint iMeshOrder)
return S_OK;
}
+void CHuman_Duelist::Check_BattleLose()
+{
+ if (!m_bBattle)
+ return;
+
+ _float vPosY = XMVectorGetY(m_pCharacter_Controller->Get_Position());
+
+ if (m_OriginPos.y > vPosY)
+ {
+ if (true == m_pCharacter_Controller->IsOnGround())
+ {
+ m_pEffectPool->Use_Skill(SKILL_TYPE::BOX_SPLESH, this);
+ m_bBattle = false;
+ CPlayer* pPlayer = dynamic_cast(m_pInfoInstance->Get_NearestPlayerAlly(Get_WorldPostion()).first);
+
+ if (pPlayer == nullptr)
+ return;
+
+ pPlayer->ExitBattle();
+ }
+ }
+}
+
_matrix CHuman_Duelist::Get_WandPos()
{
diff --git a/Jusin154_Team3D/Client/Private/Human_Duelist_States.cpp b/Jusin154_Team3D/Client/Private/Human_Duelist_States.cpp
index 42cb3e79b..3b46ee80f 100644
--- a/Jusin154_Team3D/Client/Private/Human_Duelist_States.cpp
+++ b/Jusin154_Team3D/Client/Private/Human_Duelist_States.cpp
@@ -35,11 +35,15 @@ void CHuman_Duelist::Behavior_IdleEnter()
HRESULT CHuman_Duelist::Behavior_IdleExitCheck(_float fTimeDelta)
{
- if (m_bBattle) {
- m_pFSM->Change_State(FSMSTATE::CUTSCENE);
- return E_FAIL;
+ if (false == m_pFSM->IsEnable_Previous(FSMSTATE::COMBAT))
+ {
+ if (m_bBattle) {
+ m_pFSM->Change_State(FSMSTATE::CUTSCENE);
+ return E_FAIL;
+ }
}
+
if (m_fTargetDistance <= 20.f) {
for (_uint i = 0; i < ENUM_CLASS(SKILL::END); i++)
{
@@ -263,6 +267,7 @@ void CHuman_Duelist::Behavior_HitEnter()
{
pair<_uint, _bool> pairAnimInfo;
m_bLookAt = false;
+ m_bCameraShake = true;
switch (m_eHitSpell)
{
@@ -278,11 +283,8 @@ void CHuman_Duelist::Behavior_HitEnter()
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
break;
case ENUM_CLASS(SKILL_TYPE::STUPEFY):
- if (m_eHitState != ENUM_CLASS(HIT_STATE::END)) {
- return;
- }
pairAnimInfo = m_Animation[STATEANIM::DAZED_START];
- m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 0.5f);
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 0.3f);
Add_Event(pairAnimInfo.first,
[this]() {
pair<_uint, _bool> pairAnimInfo = m_Animation[STATEANIM::DAZED_LOOP];
@@ -343,6 +345,15 @@ void CHuman_Duelist::Behavior_HitEnter()
HRESULT CHuman_Duelist::Behavior_HitExitCheck(_float fTimeDelta)
{
_int iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
+
+ if (iCurrAnimIndex == m_Animation[STATEANIM::KNOCKDOWN_BWD_SPLT].first ||
+ iCurrAnimIndex == m_Animation[STATEANIM::KNOCKDOWN_FWD_SPLT].first)
+ {
+ if (true == m_pCharacter_Controller->IsOnGround() && m_bCameraShake) {
+ CameraShake(10.f, 1.f, 2.f, 0.3f);
+ m_bCameraShake = false;
+ }
+ }
Hit_Levioso(fTimeDelta);
@@ -387,7 +398,7 @@ HRESULT CHuman_Duelist::Behavior_CutSceneExitCheck(_float fTimeDelta)
void CHuman_Duelist::Behavior_CutSceneExit()
{
m_pFSM->Disable_State(FSMSTATE::CUTSCENE);
- m_bBattle = false;
+ //m_bBattle = false;
}
void CHuman_Duelist::Hit_Levioso(_float fTimeDelta)
diff --git a/Jusin154_Team3D/Client/Private/InfoInstance.cpp b/Jusin154_Team3D/Client/Private/InfoInstance.cpp
index 746bb26ca..b9cf7d5aa 100644
--- a/Jusin154_Team3D/Client/Private/InfoInstance.cpp
+++ b/Jusin154_Team3D/Client/Private/InfoInstance.cpp
@@ -42,7 +42,7 @@ void CInfoInstance::Change_Level()
m_pInteractiveInfo->Change_Level();
m_pEffectInfo->Change_Level();
// UI_Event.clear();
- m_pCutSceneInfo->Change_Level();
+ m_pCutSceneInfo->Load_CutScenes();
}
CStat* CInfoInstance::Get_PlayerStatPtr()
@@ -172,10 +172,18 @@ HRESULT CInfoInstance::Load_EffectParts(const _char* pFileName, const _char* pEf
{
return m_pMapInfo->Load_EffectParts(pFileName, pEffectrFilePath);
}
+HRESULT CInfoInstance::Load_ReparoObjects(const _char* pFileName)
+{
+ return m_pMapInfo->Load_ReparoObjects(pFileName);
+}
HRESULT CInfoInstance::Load_DADA_INT()
{
return m_pMapInfo->Load_DADA_INT();
}
+HRESULT CInfoInstance::Load_Npc()
+{
+ return m_pMapInfo->Load_Npc();
+}
#pragma endregion
#pragma region EFFECT_INFO
@@ -541,6 +549,11 @@ HRESULT CInfoInstance::NPC_FileLoad(const _char* pDirectoryPath)
return S_OK;
}
+void CInfoInstance::Load_CutScenes()
+{
+ m_pCutSceneInfo->Load_CutScenes();
+}
+
void CInfoInstance::Release_Information()
{
UI_Event.clear();
diff --git a/Jusin154_Team3D/Client/Private/Land.cpp b/Jusin154_Team3D/Client/Private/Land.cpp
index f37bd626d..e52bf5d0e 100644
--- a/Jusin154_Team3D/Client/Private/Land.cpp
+++ b/Jusin154_Team3D/Client/Private/Land.cpp
@@ -98,6 +98,13 @@ HRESULT CLand::Initialize(void* pArg)
m_fRaduis = 350.f;
+ LAND_DESC* pDesc = static_cast(pArg);
+
+ string RigidBodyTag = CMyTools::ToString(pDesc->strModelComTag) + "_RigidBody";
+
+ ReadyForPhysX(RigidBodyTag.c_str());
+ ConvertToPhysX(RigidBodyTag.c_str());
+
return S_OK;
}
@@ -166,12 +173,15 @@ HRESULT CLand::Bind_ShaderResources()
if (FAILED(m_pDiffuseTextureCom->Bind_ShaderResources(m_pShaderCom, "g_DiffuseTextures", 0, m_pDiffuseTextureCom->Get_Size()))) {
return E_FAIL;
}
+
if (FAILED(m_pNormalTextureCom->Bind_ShaderResources(m_pShaderCom, "g_NormalTextures", 0, m_pNormalTextureCom->Get_Size()))) {
return E_FAIL;
}
+
if (FAILED(m_pMROTextureCom->Bind_ShaderResources(m_pShaderCom, "g_SurfaceParamsTextures", 0, m_pMROTextureCom->Get_Size()))) {
return E_FAIL;
}
+
if (FAILED(m_pShaderCom->Bind_SRV("g_MaskTexture", m_pMaskTextureCom->Get_SRV(0)))) {
return E_FAIL;
}
@@ -182,6 +192,28 @@ HRESULT CLand::Bind_ShaderResources()
return S_OK;
}
+void CLand::ReadyForPhysX(const _char* pName)
+{
+ _uint iLevel = NEXT_LEVEL;
+
+ if (FAILED(m_pModelCom->Ready_PhysXMeshes(XMMatrixIdentity(), iLevel, pName))) {
+ assert(false);
+ }
+}
+
+void CLand::ConvertToPhysX(const _char* pName)
+{
+ _wstring wstrName = CMyTools::ToWstring(pName);
+
+ CRigidBody_Static::RIGIDBODY_STATIC_DESC Desc = {};
+ Desc.iSubKind = ENUM_CLASS(PXOBJECT::TERRAIN);
+ Desc.pMeshName = wstrName.c_str();
+ Desc.pWorldMatrix = m_pTransformCom->Get_WorldMatrixPtr();
+ if (FAILED(__super::Add_Asset_Component(NEXT_LEVEL, wstrName, (CComponent**)&m_RigidBody, &Desc))) {
+ assert(false);
+ }
+}
+
CLand* CLand::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
CLand* pInstance = new CLand(pDevice, pContext);
@@ -217,6 +249,7 @@ void CLand::Free()
SAFE_RELEASE(m_pMaskTextureCom);
SAFE_RELEASE(m_pShaderCom);
+ SAFE_RELEASE(m_RigidBody);
SAFE_RELEASE(m_pModelCom);
for (auto& pInstanceProp : m_InstanceProps)
diff --git a/Jusin154_Team3D/Client/Private/Level_Field.cpp b/Jusin154_Team3D/Client/Private/Level_Field.cpp
index 965056526..d49249dc7 100644
--- a/Jusin154_Team3D/Client/Private/Level_Field.cpp
+++ b/Jusin154_Team3D/Client/Private/Level_Field.cpp
@@ -63,6 +63,9 @@ HRESULT CLevel_Field::Initialize(void* pArg)
if (FAILED(Ready_Layer_Monster())) {
return E_FAIL;
}
+
+ m_pInfoInstance->Load_CutScenes();
+
m_bLevel = true;
m_pInfoInstance->Event_CallBack(TEXT("UIManagerFadeIn"));
@@ -152,8 +155,6 @@ HRESULT CLevel_Field::Render()
HRESULT CLevel_Field::Ready_Lights()
{
- CLight_Main* pLight = { nullptr };
-
LIGHT_DESC Desc = {};
if (m_isDay)
{
@@ -169,7 +170,7 @@ HRESULT CLevel_Field::Ready_Lights()
}
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, LAYER_LIGHT, &Desc, nullptr, &pLight))) {
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, LAYER_LIGHT, &Desc, nullptr, &m_pLight))) {
return E_FAIL;
}
@@ -184,9 +185,7 @@ HRESULT CLevel_Field::Ready_Lights()
#endif // gimch
-
-
- pLight->Get_Component()->Set_Color(vDiffuse, vAmbient, vSpecular);
+ m_pLight->Get_Component()->Set_Color(vDiffuse, vAmbient, vSpecular);
return S_OK;
@@ -237,7 +236,7 @@ HRESULT CLevel_Field::Ready_Camera()
Camera_Desc.fNear = 0.1f;
Camera_Desc.fFar = 500.f;
Camera_Desc.pCameraKey = CAMERA_CINEMATIC;
- Camera_Desc.iPriority = 65;
+ Camera_Desc.iPriority = 52;
Camera_Desc.bEnableTransitionLerp = false;
Camera_Desc.bEnableLookLerp = false;
Camera_Desc.bEnableFollowLerp = false;
@@ -369,6 +368,10 @@ HRESULT CLevel_Field::Reday_Layer_EffectPool()
return S_OK;
}
+void CLevel_Field::ResetLevel_Environment()
+{
+}
+
pair> CLevel_Field::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID, void* pArg)
{
CLevel_Field* pInstance = new CLevel_Field(pDevice, pContext, eLevelID);
diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp
index cb04257b1..c0bcca4b1 100644
--- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp
+++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp
@@ -5,7 +5,6 @@
#include "Light_Main.h"
#include "Camera_Debug.h"
#include "InfoInstance.h"
-#include "Camera_Model.h"
#include "UI_Manager.h"
#include "Layer.h"
#include "SkyBox.h"
@@ -21,6 +20,7 @@
#include "BroomRaceManager.h"
#include "ReparoObject.h"
#include "ThestralCarriage.h"
+#include "Camera_Cinematic.h"
#pragma region ACTOR
#include "Player.h"
@@ -35,6 +35,7 @@
#include "BroomRacerAI.h"
#include "Ranrok.h"
#include "RandomNpc.h"
+#include "Elf.h"
#pragma endregion
@@ -56,7 +57,7 @@ HRESULT CLevel_GamePlay::Initialize(void* pArg)
m_isDay = true;
#endif //
#ifdef 진우
- m_isDay = false;
+ m_isDay = true;
#endif //
#ifdef 기무리
m_isDay = true;
@@ -85,13 +86,15 @@ HRESULT CLevel_GamePlay::Initialize(void* pArg)
map<_string, CLand*> Lands = {};
+
if (FAILED(Ready_Land(&Lands))) {
return E_FAIL;
}
+#ifndef 진우
if (FAILED(Ready_IntstanceProp(&Lands)))
return E_FAIL;
-
+#endif
if (FAILED(Ready_Markers())) {
return E_FAIL;
}
@@ -107,9 +110,9 @@ HRESULT CLevel_GamePlay::Initialize(void* pArg)
return E_FAIL;
}
- //if (FAILED(Ready_Layer_ReparoObject(TEXT("Layer_ReparoObject")))) {
- // return E_FAIL;
- //}
+ if (FAILED(Ready_Layer_ReparoObject(TEXT("Layer_ReparoObject")))) {
+ return E_FAIL;
+ }
if (FAILED(Ready_Layer_SkyBox(TEXT("Layer_SkyBox")))) {
return E_FAIL;
@@ -119,8 +122,23 @@ HRESULT CLevel_GamePlay::Initialize(void* pArg)
return E_FAIL;
}
- if (FAILED(Ready_Layer_RacerAI(LAYER_RACERAI))) {
- return E_FAIL;
+ _bool bLoadNPC = { true };
+#ifdef _DEBUG
+#ifdef 기무리
+ bLoadNPC = false;
+#endif
+#endif // _DEBUG
+ if (true == bLoadNPC) {
+ if (FAILED(Ready_Layer_RacerAI(LAYER_RACERAI))) {
+ return E_FAIL;
+ }
+ if (FAILED(Ready_Layer_Duelist())) {
+ return E_FAIL;
+ }
+
+ if (FAILED(Ready_Layer_Npc())) {
+ return E_FAIL;
+ }
}
@@ -128,21 +146,13 @@ HRESULT CLevel_GamePlay::Initialize(void* pArg)
return E_FAIL;
}
- if (FAILED(Ready_Layer_Duelist())) {
- return E_FAIL;
- }
-
- if (FAILED(Ready_Layer_Npc())) {
- return E_FAIL;
- }
-
-
if (FAILED(m_pInfoInstance->Late_Initialize()))
return E_FAIL;
m_bLevel = true;
m_pInfoInstance->Event_CallBack(TEXT("UIManagerFadeIn"));
+
return S_OK;
}
@@ -238,7 +248,7 @@ HRESULT CLevel_GamePlay::Ready_Lights()
Desc.vSpecular = _float4(0.0f, 0.0f, 0.0f, 0.0f);
}
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, LAYER_LIGHT, &Desc))) {
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, LAYER_LIGHT, &Desc, nullptr, &m_pLight))) {
return E_FAIL;
}
@@ -258,6 +268,7 @@ HRESULT CLevel_GamePlay::Ready_Volumetric()
0.f
);
}
+
else
{
m_pGameInstance->Setting_Volumetirc(
@@ -318,6 +329,7 @@ HRESULT CLevel_GamePlay::Ready_Background()
isReady_Background = true;
isReady_Hogsmeade = true;
isReady_Hogwart = false;
+ m_pInfoInstance->Load_ReparoObjects("Reparo_Data");
#endif // gimch
#ifdef Bin
isReady_Background = false;
@@ -330,8 +342,8 @@ HRESULT CLevel_GamePlay::Ready_Background()
isReady_Hogwart = false;
#endif //
#ifdef 기무리
- isReady_Background = true;
- isReady_Hogsmeade = true;
+ isReady_Background = false;
+ isReady_Hogsmeade = false;
isReady_Hogwart = false;
#endif //
#ifdef 나
@@ -554,6 +566,7 @@ HRESULT CLevel_GamePlay::Ready_Layer_Hogwart()
{
CInfoInstance::GetInstance()->Load_MapObjects("Hogwart_MapContainer_Data", LAYER_HOGWART);
CInfoInstance::GetInstance()->Load_MapObjects("HogwartMap1221", LAYER_HOGWART);
+ CInfoInstance::GetInstance()->Load_MapObjects("CaveData", LAYER_HOGWART);
CUnified::UNIFIED_DESC Desc = {};
@@ -895,29 +908,31 @@ HRESULT CLevel_GamePlay::Ready_Layer_Camera()
m_pGameInstance->Add_Camera(NEXT_LEVEL, pCamera, CAMERA_DEBUG);
}
- {
- CCamera_Model::CAMERA_MODEL_DESC Camera_Desc{};
- Camera_Desc.fSpeedPerSec = 5.f;
- Camera_Desc.fRotationPerSec = XMConvertToRadians(90.0f);
- Camera_Desc.fFovy = XMConvertToRadians(60.0f);
- Camera_Desc.fNear = 0.1f;
- Camera_Desc.fFar = 500.f;
- Camera_Desc.pCameraKey = CAMERA_MODEL;
- Camera_Desc.iPriority = 49;
- Camera_Desc.pFollowTarget = { nullptr };
- Camera_Desc.pLookTarget = { nullptr };
-
- CCamera_Model* pCamera = { nullptr };
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_CAMERA, &Camera_Desc, nullptr, &pCamera))) {
- return E_FAIL;
- }
- m_pGameInstance->Add_Camera(NEXT_LEVEL, pCamera, CAMERA_MODEL);
-
- }
-
#endif // _DEBUG
+ {
+ CCamera_Cinematic::Camera_Cinematic_DESC Camera_Desc{};
+ Camera_Desc.fSpeedPerSec = 5.f;
+ Camera_Desc.fRotationPerSec = XMConvertToRadians(90.0f);
+ Camera_Desc.fFovy = XMConvertToRadians(60.0f);
+ Camera_Desc.fNear = 0.3f;
+ Camera_Desc.fFar = 500.f;
+ Camera_Desc.pCameraKey = CAMERA_CINEMATIC;
+ Camera_Desc.iPriority = 52;
+ Camera_Desc.bEnableTransitionLerp = false;
+ Camera_Desc.bEnableLookLerp = false;
+ Camera_Desc.bEnableFollowLerp = false;
+ Camera_Desc.vTransitionTime.y = 1.f;
+ Camera_Desc.pFollowTarget = { nullptr };
+ Camera_Desc.pLookTarget = { nullptr };
+
+ CCamera_Cinematic* pCamera = { nullptr };
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_CAMERA, &Camera_Desc, nullptr, &pCamera))) {
+ return E_FAIL;
+ }
+ m_pGameInstance->Add_Camera(NEXT_LEVEL, pCamera, CAMERA_CINEMATIC);
+ }
if (FAILED(m_pGameInstance->Bind_Camera(NEXT_LEVEL, CAMERA_SHOULDER, true))) {
return E_FAIL;
}
@@ -973,11 +988,11 @@ HRESULT CLevel_GamePlay::Ready_Layer_Item(const _wstring& strLayerTag)
HRESULT CLevel_GamePlay::Ready_Layer_ReparoObject(const _wstring& strLayerTag)
{
- for (_uint i = 0; i < 1; ++i) {
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag))) {
- return E_FAIL;
- }
- }
+ //for (_uint i = 0; i < 1; ++i) {
+ // if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag))) {
+ // return E_FAIL;
+ // }
+ //}
return S_OK;
}
@@ -1090,11 +1105,12 @@ HRESULT CLevel_GamePlay::Ready_Layer_Duelist()
{
CHuman_Duelist::DUELISTDESC DuelistDesc = {};
- DuelistDesc.vPos = _float4(1007.f, 6.f, 1016.f, 1.f);
+ DuelistDesc.vPos = _float4(1007.23f, 1.775f, 1015.f, 1.f);
DuelistDesc.vRotQ = _float4(0.f, 0.f, 0.f, 1.f);
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_DUELIST, &DuelistDesc))) {
return E_FAIL;
}
+
return S_OK;
}
@@ -1102,18 +1118,20 @@ HRESULT CLevel_GamePlay::Ready_Layer_Npc()
{
_bool isLoad_NPC = { true };
_bool isLoad_RandomNPC = { true };
+ _bool isRandomPosition = { true };
#ifdef _DEBUG
#ifdef gimch
- isLoad_NPC = false;
- isLoad_RandomNPC = false;
+ isLoad_NPC = true;
+ isLoad_RandomNPC = true;
+ isRandomPosition = false;
#endif // gimch
#ifdef 진우
- isLoad_RandomNPC = true;
- isLoad_NPC = true;
+ isLoad_RandomNPC = false;
+ isLoad_NPC = false;
#endif //
#ifdef 기무리
- isLoad_NPC = true;
- isLoad_RandomNPC = true;
+ isLoad_NPC = false;
+ isLoad_RandomNPC = false;
#endif //
#ifdef 나
isLoad_RandomNPC = true;
@@ -1142,12 +1160,22 @@ HRESULT CLevel_GamePlay::Ready_Layer_Npc()
return E_FAIL;
}
}
+ {
+ CElf::ELFDESC ElfDesc{};
+ ElfDesc.vPos = _float4(-84.20f, -30.98f, -60.13f, 1.f);
+ ElfDesc.vRotQ = _float4(0.f, 0.f, 0.f, 1.f);
+
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_NPC, &ElfDesc))) {
+ return E_FAIL;
+ }
+ }
}
if (true == isLoad_RandomNPC)
{
- for (_uint i = 0; i < 11; i++)
+ if(isRandomPosition)
{
+ for (_uint i = 0; i < 12; i++)
{
CRandomNpc::NPCDESC NPCDesc{};
_float X = m_pGameInstance->Real_Random_Float(22.f, 29.f);
@@ -1160,10 +1188,33 @@ HRESULT CLevel_GamePlay::Ready_Layer_Npc()
}
}
}
+ else
+ m_pInfoInstance->Load_Npc();
}
return S_OK;
}
+void CLevel_GamePlay::ResetLevel_Environment()
+{
+ Ready_Volumetric();
+ _float4 vDiffuse;
+ _float4 vAmbient;
+ _float4 vSpecular;
+ if (m_isDay)
+ {
+ vDiffuse = _float4(0.6529f, 0.6157f, 0.7843f, 1.0f);
+ vAmbient = _float4(0.6275f, 0.6275f, 0.6275f, 0.0314f);
+ vSpecular = _float4(0.05f, 0.05f, 0.05f, 0.05f);
+ }
+ else
+ {
+ vDiffuse = _float4(0.0471f, 0.0745f, 0.1294f, 0.2549f);
+ vAmbient = _float4(0.1686f, 0.1765f, 0.1373f, 0.0f);
+ vSpecular = _float4(0.0f, 0.0f, 0.0f, 0.0f);
+ }
+ m_pLight->Get_Component()->Set_Color(vDiffuse, vAmbient, vSpecular);
+}
+
pair> CLevel_GamePlay::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID, void* pArg)
{
CLevel_GamePlay* pInstance = new CLevel_GamePlay(pDevice, pContext, eLevelID);
@@ -1174,7 +1225,8 @@ pair> CLevel_GamePlay::Create(ID3D11Device* pDevice, I
SAFE_RELEASE(pInstance);
}
- return { pInstance, [pInstance]() { pInstance->Ready_Layer_Camera(); pInstance->Ready_Layer_Sound(); } };
+ return { pInstance, [=]() { pInstance->Ready_Layer_Camera(); pInstance->Ready_Layer_Sound();
+ pInstance->m_pInfoInstance->Load_CutScenes(); } };
}
void CLevel_GamePlay::Free()
diff --git a/Jusin154_Team3D/Client/Private/Level_Loading.cpp b/Jusin154_Team3D/Client/Private/Level_Loading.cpp
index ac72eb3bd..0cef5f61a 100644
--- a/Jusin154_Team3D/Client/Private/Level_Loading.cpp
+++ b/Jusin154_Team3D/Client/Private/Level_Loading.cpp
@@ -25,7 +25,7 @@ HRESULT CLevel_Loading::Initialize(LEVEL eNextLevelID)
if (nullptr == m_pLoader) {
return E_FAIL;
}
-
+
if (FAILED(Ready_Layer_BackGround(LAYER_UI))) {
return E_FAIL;
}
diff --git a/Jusin154_Team3D/Client/Private/Levioso.cpp b/Jusin154_Team3D/Client/Private/Levioso.cpp
index 2368577a6..ec346f614 100644
--- a/Jusin154_Team3D/Client/Private/Levioso.cpp
+++ b/Jusin154_Team3D/Client/Private/Levioso.cpp
@@ -92,9 +92,16 @@ void CLevioso::Late_Update(_float fTimeDelta)
_vector vStartPos = XMLoadFloat4(&m_vStartPos);
_vector vEndPos = XMLoadFloat4(&m_vEndPos);
- ON_COLLISION_INFO CollisionInfo = SweepTarget(vStartPos, vEndPos, 0.002f);
- OnCollision(this, &CollisionInfo);
+ if (false == m_bHit) {
+ _vector vStartPos = XMLoadFloat4(&m_vStartPos);
+ _vector vEndPos = XMLoadFloat4(&m_vEndPos);
+ if (false == XMVector3NearEqual(vEndPos, XMVectorZero(), XMVectorReplicate(FLT_EPSILON5)))
+ {
+ ON_COLLISION_INFO CollisionInfo = SweepTarget(vStartPos, vEndPos, 0.02f);
+ OnCollision(this, &CollisionInfo);
+ }
+ }
}
__super::Late_Update(fTimeDelta);
diff --git a/Jusin154_Team3D/Client/Private/Lightning.cpp b/Jusin154_Team3D/Client/Private/Lightning.cpp
index 00fde485b..3f41eee83 100644
--- a/Jusin154_Team3D/Client/Private/Lightning.cpp
+++ b/Jusin154_Team3D/Client/Private/Lightning.cpp
@@ -109,6 +109,7 @@ HRESULT CLightning::Pre_Setting(CGameObject* pObject, void* pArg)
CPartObject* pHitPT0 = Get_PartObject("HitPT0");
CPartObject* pLightning_Tornado_PT = Get_PartObject("Lightning_Tornado_PT");
CPartObject* pLightning0 = Get_PartObject("Lightning0");
+ CPartObject* pLightning1 = Get_PartObject("Lightning1");
CPartObject* pStart_Line = Get_PartObject("Start_Line");
CPartObject* pLightning_Smoke = Get_PartObject("Lightning_Smoke");
CPartObject* pLightning_Rock_PT = Get_PartObject("Lightning_Rock_PT");
@@ -124,13 +125,25 @@ HRESULT CLightning::Pre_Setting(CGameObject* pObject, void* pArg)
m_pInfoInstance->Get_LockOnInfo(m_Info);
if (nullptr != m_Info.pUnit || nullptr != m_Info.pEffect) {
- XMStoreFloat4(&m_vTargetPos, Get_LockOnPos(m_Info));
+ _vector vLockOnPos = Get_LockOnPos(m_Info);
+
+ CCharacter_Controller* pCCT = m_Info.pUnit->Get_Component();
+
+ if (pCCT != nullptr)
+ {
+ _float fYHeight = XMVectorGetY(pCCT->Get_FootPosition()) - pCCT->Get_Volume().y * 2.f + pCCT->Get_Volume().x * 2.f;
+ //_float fYHeight = XMVectorGetY(m_Info.pUnit->Get_Component()->Get_State(STATE::POSITION));
+ vLockOnPos = XMVectorSetY(vLockOnPos, fYHeight);
+ }
+
+ XMStoreFloat4(&m_vTargetPos, vLockOnPos);
+
XMStoreFloat3(&m_vCameraLook, XMVector3Normalize(XMLoadFloat4(&m_vTargetPos) - XMLoadFloat4(&m_vStartPos)));
}
else {
// 타겟이 없다면 현재위치 -> 카메라 룩벡터 * duration간 예상 이동거리 를 대상으로 지정
- XMStoreFloat4(&m_vTargetPos, vStartPos + vDirection * m_fLinearSpeed * 0.5f);
+ XMStoreFloat4(&m_vTargetPos, vStartPos + vDirection * m_fLinearSpeed * 10.f);
}
}
@@ -139,18 +152,20 @@ HRESULT CLightning::Pre_Setting(CGameObject* pObject, void* pArg)
pHitPT0->Set_Visible(true);
pLightning_Tornado_PT->Set_Visible(true);
pLightning0->Set_Visible(true);
+ pLightning1->Set_Visible(true);
pStart_Line->Set_Visible(true);
pLightning_Smoke->Set_Visible(true);
- //pLightning_Rock_PT->Set_Visible(true);
+ pLightning_Rock_PT->Set_Visible(true);
pBottomLightning->Get_Component()->Set_State(STATE::POSITION, XMLoadFloat4(&m_vTargetPos));
pFlare->Get_Component()->Set_State(STATE::POSITION, XMLoadFloat4(&m_vTargetPos));
pHitPT0->Get_Component()->Set_State(STATE::POSITION, XMLoadFloat4(&m_vTargetPos));
pLightning_Tornado_PT->Get_Component()->Set_State(STATE::POSITION, XMLoadFloat4(&m_vTargetPos));
pLightning0->Get_Component()->Set_State(STATE::POSITION, XMLoadFloat4(&m_vTargetPos));
+ pLightning1->Get_Component()->Set_State(STATE::POSITION, XMLoadFloat4(&m_vTargetPos));
pStart_Line->Get_Component()->Set_State(STATE::POSITION, XMLoadFloat4(&m_vTargetPos));
pLightning_Smoke->Get_Component()->Set_State(STATE::POSITION, XMLoadFloat4(&m_vTargetPos));
- //pLightning_Rock_PT->Get_Component()->Set_State(STATE::POSITION, XMLoadFloat4(&m_vTargetPos));
+ pLightning_Rock_PT->Get_Component()->Set_State(STATE::POSITION, XMLoadFloat4(&m_vTargetPos));
m_fDistance = XMVectorGetX(XMVector3Length(XMLoadFloat4(&m_vTargetPos) - XMLoadFloat4(&m_vStartPos)));
@@ -210,17 +225,6 @@ void CLightning::OnCollision(CGameObject* pOther, void* pDesc)
_vector vPos = XMLoadFloat4(&CollisionDesc.vWorldPos);
- for (auto& pPair : m_PartObjects)
- {
- pPair.second->Set_Visible(true);
- pPair.second->Get_Component()->Set_State(STATE::POSITION, vPos);
- }
-
- CWand* pWand = static_cast(m_pOwner);
-
- if (pWand == nullptr)
- return;
-
}
diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp
index f5abcc74b..367fd1845 100644
--- a/Jusin154_Team3D/Client/Private/Loader.cpp
+++ b/Jusin154_Team3D/Client/Private/Loader.cpp
@@ -33,7 +33,7 @@
#include "Player.h"
#include "Human_Duelist.h"
-#include "PlayerRobe.h"
+//#include "PlayerRobe.h"
#include "Goblin.h"
#include "Goblin_Mage.h"
#include "Goblin_Assassin.h"
@@ -45,11 +45,7 @@
#include "BroomRacerAI.h"
#include "Ranrok.h"
#include "RandomNpc.h"
-
-#ifdef _DEBUG
-#include "Camera_Model.h"
-#endif // _DEBUG
-
+#include "Elf.h"
#pragma endregion
@@ -192,6 +188,7 @@
#include "DecendoSide.h"
#include "BombardSide.h"
#include "LeviosoSide.h"
+#include "AccioSide.h"
#include "TransformationSide.h"
#include "AvadakedavraSide.h"
@@ -216,7 +213,9 @@
#include "TrollSwing.h"
#include "Troll_Nomal_Smoke.h"
#include "Troll_Rush_Hit.h"
-
+#include "Troll_Rush.h"
+#include "Troll_Shout.h"
+#include "Troll_Self_Hit.h"
#include "WandEnd.h"
#include "Goblin_Protego.h"
@@ -276,6 +275,7 @@
#include "WorldDecal.h"
#include "PointLight.h"
#include "MapElement_Balloon.h"
+#include "MapElement_Cave.h"
#pragma endregion
@@ -306,7 +306,7 @@ unsigned int APIENTRY LoadingMain(void* pArg)
HRESULT CLoader::Initialize(LEVEL eNextLevelID)
{
m_eNextLevelID = eNextLevelID;
-
+////
m_pGameInstance->EnqueueJob(&LoadingMain, this);
return S_OK;
@@ -486,7 +486,7 @@ HRESULT CLoader::Loading_For_GamePlay()
isLoad_Background = true;
isLoad_Hogwart = false;
isLoad_UI_SEQUANTIAL = false;
- isLoad_NPC = true;
+ isLoad_NPC = false;
isLoad_Monster = true;
#endif //
#ifdef 나
@@ -504,6 +504,7 @@ HRESULT CLoader::Loading_For_GamePlay()
#pragma region MAP_MODELS
vector*>> jobMapModels;
+ vector*>> jobCharacterModels = {};
vector*>> jobMapShaders;
{
{ /* Terrain */
@@ -1102,6 +1103,10 @@ HRESULT CLoader::Loading_For_GamePlay()
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogwarts/SUB_DADATower/StaticMesh/EXT",
".bin", false
));
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Overland_Common/Meshes",
+ ".bin", false
+ ));
}
if (true == isLoad_DataClassroom)
@@ -1138,6 +1143,200 @@ HRESULT CLoader::Loading_For_GamePlay()
}
}
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::NONANIM, "../Bin/Resources/Models/Box/Box.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f)* XMMatrixIdentity(),
+ TEXT("Prototype_Component_Box")
+ ));
+
+#pragma region ACTOR
+
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable.bin", XMMatrixRotationY(XMConvertToRadians(180.f))* XMMatrixIdentity(),
+ TEXT("Prototype_Component_Playable_Model")
+ ));
+ if (true == isLoad_NPC) {
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::ANIM, "../Bin/Resources/Models/Human/Npc/Npc.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
+ TEXT("Prototype_Component_Npc_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
+ TEXT("Prototype_Component_GerboldOlivander_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
+ TEXT("Prototype_Component_Professor_EleazarFig_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/VictorRookWood/VictorRookWood.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
+ TEXT("Prototype_Component_VictorRookWood_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/ChiyoKogawa/ChiyoKogawa.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
+ TEXT("Prototype_Component_ChiyoKogawa_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/MatildaWeasely/MatildaWeasely.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
+ TEXT("Prototype_Component_MatildaWeasely_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/SatyavatiShah/SatyavatiShah.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
+ TEXT("Prototype_Component_SatyavatiShah_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/Ghost_Peeves/Ghost_Peeves.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
+ TEXT("Prototype_Component_Ghost_Peeves_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/M_Student/M_Student.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
+ TEXT("Prototype_Component_M_Student_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/PhineasBlack/PhineasBlack.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
+ TEXT("Prototype_Component_PhineasBlack_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/F_Student/F_Student.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
+ TEXT("Prototype_Component_F_Student_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/Elf/Elf.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
+ TEXT("Prototype_Component_Elf_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/Elf/Kitchen_Female/Kitchen_Female.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
+ TEXT("Prototype_Component_Kitchen_Female_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/BaiHowin/BaiHowin.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
+ TEXT("Prototype_Component_BaiHowin_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/GeorgeOsric/GeorgeOsric.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
+ TEXT("Prototype_Component_GeorgeOsric_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/DinahHecat/DinahHecat.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
+ TEXT("Prototype_Component_DinahHecat_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/MudiwaOnai/MudiwaOnai.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
+ TEXT("Prototype_Component_MudiwaOnai_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f)* XMMatrixRotationY(XMConvertToRadians(180.f))* XMMatrixRotationZ(XMConvertToRadians(180.f))* XMMatrixIdentity(),
+ TEXT("Prototype_Component_GerboldOlivander_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f)* XMMatrixRotationY(XMConvertToRadians(180.f))* XMMatrixIdentity(),
+ TEXT("Prototype_Component_Professor_EleazarFig_Model")
+ ));
+ }
+ if (true == isLoad_Monster) {
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::ANIM, "../Bin/Resources/Models/Monster/Goblin/SK_GOB_M_T4Melee_INST_A_Master.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
+ TEXT("Prototype_Component_Goblin_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::ANIM, "../Bin/Resources/Models/Monster/Goblin_Mage/GoblinMage.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
+ TEXT("Prototype_Component_Goblin_Mage_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::ANIM, "../Bin/Resources/Models/Monster/GoblinSpector/GoblinSpector.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
+ TEXT("Prototype_Component_Goblin_Spector_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/Goblin_Assassin/SK_GOB_M_Assassin_Master.bin", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
+ TEXT("Prototype_Component_Goblin_Assassin_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/SubTroll/troll.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
+ TEXT("Prototype_Component_Troll_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/ConjuredDragon/ConjuredDragon.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
+ TEXT("Prototype_Component_Ranrok_Model")
+ ));
+ }
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::ANIM, "../Bin/Resources/Models/Object/Camera/Camera.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
+ TEXT("Prototype_Component_Camera_Model")
+ ));
+#pragma endregion
+
+#pragma region ITEM
+
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::ANIM, "../Bin/Resources/Models/Object/Wand/SK_Wands_Amit.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationX(XMConvertToRadians(-90.f)) * XMMatrixIdentity(),
+ TEXT("Prototype_Component_Wand_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::NONANIM, "../Bin/Resources/Models/Object/Potion/SM_Bottle_EmptyCapOff.bin", XMMatrixIdentity(),
+ TEXT("Prototype_Component_Potion_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::NONANIM, "../Bin/Resources/Models/Object/RaceRing/SM_BRR_RaceRing_01.bin", XMMatrixRotationX(XMConvertToRadians(90.f)) * XMMatrixIdentity(),
+ TEXT("Prototype_Component_RaceRing_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::PBR_ANIM, "../Bin/Resources/Models/Object/Broom/Broom.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
+ TEXT("Prototype_Component_Broom_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::PBR_ANIM, "../Bin/Resources/Models/Object/Broom/MoonTrimmerBroom/SK_MoonTrimmerBroom.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
+ TEXT("Prototype_Component_SK_MoonTrimmerBroom_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::PBR_ANIM, "../Bin/Resources/Models/Object/Broom/DarkWizardBroom/DarkWizardBroom.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
+ TEXT("Prototype_Component_DarkWizardBroom_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::PBR_ANIM, "../Bin/Resources/Models/Object/Broom/WildFireBroom/WildFireBroom.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
+ TEXT("Prototype_Component_WildFireBroom_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::PBR_ANIM, "../Bin/Resources/Models/Object/SubTroll_Weapon/SK_WPN_Troll_Club07.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationX(XMConvertToRadians(-90.f)) * XMMatrixIdentity(),
+ TEXT("Prototype_Component_Troll_Weapon_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::NONANIM, "../Bin/Resources/Models/Object/Troll_Rock/VFX_SM_Rock_01.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
+ TEXT("Prototype_Component_Troll_Rock_Big_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::ANIM, "../Bin/Resources/Models/Object/Goblin_Dagger/SK_WPN_GOB_SmallSword.bin", XMMatrixIdentity(),
+ TEXT("Prototype_Component_Goblin_Dagger_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::ANIM, "../Bin/Resources/Models/Object/Goblin_Sword/SK_WPN_GOB_SmallSword_L.bin", XMMatrixIdentity(),
+ TEXT("Prototype_Component_Goblin_Sword_L_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::ANIM, "../Bin/Resources/Models/Object/Goblin_Sword/SK_WPN_GOB_SmallSword_R.bin", XMMatrixIdentity(),
+ TEXT("Prototype_Component_Goblin_Sword_R_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::ANIM, "../Bin/Resources/Models/Object/Goblin_BattleAxe/SK_WPN_GOB_BattleAxe01.bin", XMMatrixRotationX(XMConvertToRadians(-90.f)) * XMMatrixIdentity(),
+ TEXT("Prototype_Component_Goblin_BattleAxe_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::ANIM, "../Bin/Resources/Models/Object/Reparo_Object/VFX_SK_OLI_TrollFight_BlockerA.bin", XMMatrixIdentity(),
+ TEXT("Prototype_Component_VFX_SK_OLI_TrollFight_BlockerA_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::ANIM, "../Bin/Resources/Models/Object/Reparo_Object/VFX_SK_OLI_TrollFight_BlockerB.bin", XMMatrixIdentity(),
+ TEXT("Prototype_Component_VFX_SK_OLI_TrollFight_BlockerB_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::PBR_ANIM, "../Bin/Resources/Models/Object/ThestralCarriage/ThestralCarriage.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
+ TEXT("Prototype_Component_ThestralCarriage_Model")
+ ));
+ jobCharacterModels.emplace_back(Deferred_ModelLoad(
+ MODEL::NONANIM, "../Bin/Resources/Models/SkyBox/SkyBox.bin", XMMatrixIdentity(),
+ TEXT("Prototype_Component_SkyboxModel")
+ ));
+
+#pragma endregion
+
#ifndef 진우
#pragma region SHADER
@@ -1174,127 +1373,158 @@ HRESULT CLoader::Loading_For_GamePlay()
TEXT("../Bin/Resources/ShaderFiles/Shader_VtxPos.hlsl"), VTXPOS::Elements, VTXPOS::iNumElements));
}
+ {
+ m_strMessage = TEXT("셰이더를(을) 로딩 중 입니다.");
+ _uint iIndex = 0;
+ for (auto& JobMapShader : jobMapShaders)
+ {
+ pair<_wstring, CShader*>* pOut = JobMapShader.get();
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, pOut->first, pOut->second))) {
+ return E_FAIL;
+ }
+ Safe_Delete(pOut);
+ }
+ }
#pragma endregion
#endif
+
/* LAND_MODEL */
{
+ CRigidBody_Static::RIGIDBODY_STATIC_PROTOTYPEDESC Desc{}; //
+ {
+ Desc.eType = ACTOR::TRIANGLEMESH;
+ Desc.ePxRigidBodyFlags = {};
+ Desc.ePxShapeFlags = { PSX::PxShapeFlag::eVISUALIZATION | PSX::PxShapeFlag::eSCENE_QUERY_SHAPE | PSX::PxShapeFlag::eSIMULATION_SHAPE };
+ Desc.ePxMaterialTypes = PXMATERIAL::DEFAULT;
+ Desc.vMatInfo = _float3(0.5f, 0.5f, 0.6f);
+ Desc.fContactOffset = 0.001f;
+ }
+
/* For.Prototype_Component_South_Hogwart_Land_LOD1 */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_South_Hogwart_Land_LOD1"),
CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "../Bin/Resources/Models/MapMesh/Game/Levels/Overland/HOG/HN_BCLOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
return E_FAIL;
+ CRigidBody_Static* pRigid = CRigidBody_Static::Create(m_pDevice, m_pContext, Desc);
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_South_Hogwart_Land_LOD1_RigidBody"), pRigid))) {
+ return E_FAIL;
+ }
/* For.Prototype_Component_North_Hogwart_Land_LOD1 */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_North_Hogwart_Land_LOD1"),
CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "../Bin/Resources/Models/MapMesh/Game/Levels/Overland/HOG/HN_AVLOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
return E_FAIL;
+ pRigid = CRigidBody_Static::Create(m_pDevice, m_pContext, Desc);
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_North_Hogwart_Land_LOD1_RigidBody"), pRigid))) {
+ return E_FAIL;
+ }
/* For.Prototype_Component_North_Hogwart2_Land_LOD1 */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_North_Hogwart2_Land_LOD1"),
CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "../Bin/Resources/Models/MapMesh/Game/Levels/Overland/HOG/HN_AULOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
return E_FAIL;
+ pRigid = CRigidBody_Static::Create(m_pDevice, m_pContext, Desc);
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_North_Hogwart2_Land_LOD1_RigidBody"), pRigid))) {
+ return E_FAIL;
+ }
/* For.Prototype_Component_West_Hogwart_Land_LOD1 */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_West_Hogwart_Land_LOD1"),
CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "../Bin/Resources/Models/MapMesh/Game/Levels/Overland/HOG/HN_AZLOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
return E_FAIL;
+ pRigid = CRigidBody_Static::Create(m_pDevice, m_pContext, Desc);
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_West_Hogwart_Land_LOD1_RigidBody"), pRigid))) {
+ return E_FAIL;
+ }
/* For.Prototype_Component_East_Hogwart_Land_LOD1 */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_East_Hogsmeade_Land_LOD1"),
CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "../Bin/Resources/Models/MapMesh/Game/Levels/Overland/HOG/HN_AYLOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
return E_FAIL;
+ pRigid = CRigidBody_Static::Create(m_pDevice, m_pContext, Desc);
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_East_Hogsmeade_Land_LOD1_RigidBody"), pRigid))) {
+ return E_FAIL;
+ }
- // -----------------
/* For.Prototype_Component_Land_HN_BA */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Land_HN_BA"),
CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "../Bin/Resources/Models/MapMesh/Game/Levels/Overland/HOG/HN_BALOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
return E_FAIL;
+ pRigid = CRigidBody_Static::Create(m_pDevice, m_pContext, Desc);
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_Land_HN_BA_RigidBody"), pRigid))) {
+ return E_FAIL;
+ }
/* For.Prototype_Component_Land_HN_BD */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Land_HN_BD"),
CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "../Bin/Resources/Models/MapMesh/Game/Levels/Overland/HOG/HN_BDLOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
return E_FAIL;
+ pRigid = CRigidBody_Static::Create(m_pDevice, m_pContext, Desc);
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_Land_HN_BD_RigidBody"), pRigid))) {
+ return E_FAIL;
+ }
/* For.Prototype_Component_Land_HN_BE */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Land_HN_BE"),
CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "../Bin/Resources/Models/MapMesh/Game/Levels/Overland/HOG/HN_BELOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
return E_FAIL;
+ pRigid = CRigidBody_Static::Create(m_pDevice, m_pContext, Desc);
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_Land_HN_BE_RigidBody"), pRigid))) {
+ return E_FAIL;
+ }
/* For.Prototype_Component_Land_HN_BF */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Land_HN_BF"),
CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "../Bin/Resources/Models/MapMesh/Game/Levels/Overland/HOG/HN_BFLOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
return E_FAIL;
+ pRigid = CRigidBody_Static::Create(m_pDevice, m_pContext, Desc);
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_Land_HN_BF_RigidBody"), pRigid))) {
+ return E_FAIL;
+ }
/* For.Prototype_Component_Land_HN_BG */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Land_HN_BG"),
CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "../Bin/Resources/Models/MapMesh/Game/Levels/Overland/HOG/HN_BGLOD/SM_LandscapeStreamingProxy_1_LOD1.bin"))))
return E_FAIL;
+ pRigid = CRigidBody_Static::Create(m_pDevice, m_pContext, Desc);
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_Land_HN_BG_RigidBody"), pRigid))) {
+ return E_FAIL;
+ }
/* For.Prototype_Component_Land_HN_BH */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Land_HN_BH"),
CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "../Bin/Resources/Models/MapMesh/Game/Levels/Overland/HOG/HN_BHLOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
return E_FAIL;
+ pRigid = CRigidBody_Static::Create(m_pDevice, m_pContext, Desc);
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_Land_HN_BH_RigidBody"), pRigid))) {
+ return E_FAIL;
+ }
/* For.Prototype_Component_Land_HN_BI */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Land_HN_BI"),
CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "../Bin/Resources/Models/MapMesh/Game/Levels/Overland/HOG/HN_BILOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
return E_FAIL;
+ pRigid = CRigidBody_Static::Create(m_pDevice, m_pContext, Desc);
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_Land_HN_BI_RigidBody"), pRigid))) {
+ return E_FAIL;
+ }
/* For.Prototype_Component_Land_HN_BJ */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Land_HN_BJ"),
CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "../Bin/Resources/Models/MapMesh/Game/Levels/Overland/HOG/HN_BJLOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
return E_FAIL;
+ pRigid = CRigidBody_Static::Create(m_pDevice, m_pContext, Desc);
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_Land_HN_BJ_RigidBody"), pRigid))) {
+ return E_FAIL;
+ }
/* For.Prototype_Component_Land_TU_BB */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Land_TU_BB"),
CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "../Bin/Resources/Models/MapMesh/Game/Levels/Overland/HOG/TU_BBLOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
return E_FAIL;
-
-
- ///* For.Prototype_Component_Land_HN_BA */
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Land_HN_BA"),
- // CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "C:/MeshTable/Game/Levels/Overland/HOG/HN_BALOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
- // return E_FAIL;
-
- ///* For.Prototype_Component_Land_HN_BD */
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Land_HN_BD"),
- // CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "C:/MeshTable/Game/Levels/Overland/HOG/HN_BDLOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
- // return E_FAIL;
-
- ///* For.Prototype_Component_Land_HN_BG */
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Land_HN_BG"),
- // CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "C:/MeshTable/Game/Levels/Overland/HOG/HN_BGLOD/SM_LandscapeStreamingProxy_1_LOD1.bin"))))
- // return E_FAIL;
-
- ///* For.Prototype_Component_Land_HN_BH */
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Land_HN_BH"),
- // CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "C:/MeshTable/Game/Levels/Overland/HOG/HN_BHLOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
- // return E_FAIL;
-
-
- ///* For.Prototype_Component_Land_HN_BE */
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Land_HN_BE"),
- // CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "C:/MeshTable/Game/Levels/Overland/HOG/HN_BELOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
- // return E_FAIL;
-
- ///* For.Prototype_Component_Land_HN_BF */
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Land_HN_BF"),
- // CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "C:/MeshTable/Game/Levels/Overland/HOG/HN_BFLOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
- // return E_FAIL;
-
- ///* For.Prototype_Component_Land_HN_BI */
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Land_HN_BI"),
- // CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "C:/MeshTable/Game/Levels/Overland/HOG/HN_BILOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
- // return E_FAIL;
-
- ///* For.Prototype_Component_Land_HN_BJ */
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Land_HN_BJ"),
- // CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "C:/MeshTable/Game/Levels/Overland/HOG/HN_BJLOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
- // return E_FAIL;
-
- ///* For.Prototype_Component_Land_TU_BB */
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Land_TU_BB"),
- // CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "C:/MeshTable/Game/Levels/Overland/HOG/TU_BBLOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
- // return E_FAIL;
+ pRigid = CRigidBody_Static::Create(m_pDevice, m_pContext, Desc);
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_Land_TU_BB_RigidBody"), pRigid))) {
+ return E_FAIL;
+ }
}
#pragma endregion
#pragma region UI
@@ -2228,7 +2458,7 @@ HRESULT CLoader::Loading_For_GamePlay()
Desc1.ePxMaterialTypes = { PXMATERIAL::DEFAULT };
Desc1.vMatInfo = { 0.5f, 0.5f, 0.6f };
Desc1.fContactOffset = { 0.05f };
- Desc1.vhalfGeometryInfo = { 2.f, 2.f, 2.f };
+ Desc1.vhalfGeometryInfo = { 2.34f, 2.34f, 2.34f };
Desc1.fDensity = 1.f;
Desc1.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY());
Desc1.eLockFlag = {};
@@ -2307,252 +2537,19 @@ HRESULT CLoader::Loading_For_GamePlay()
Desc.vMatInfo = { 0.5f, 0.5f, 0.1f };
Desc.fContactOffset = { 0.05f };
Desc.vhalfGeometryInfo = { 0.5f, 1.f, 0.01f };
- Desc.fDensity = 100.f;
+ Desc.fDensity = 10.f;
PSX::PxTransform pxPivotTransform = PSX::PxTransform(PSX::PxVec3(0.f, 1.f, 0.f));
Desc.vLocalRotQ = { 0.f, 0.f, 0.f, 1.f };
Desc.vLocalTranslation = { 0.5f, 1.375f, 0.f };
Desc.pxMassCenter = pxPivotTransform;
- Desc.vAutoDamping = { 10.f, 10.f };
+ Desc.vAutoDamping = { 5.f, 5.f };
}
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_DOOR"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
return E_FAIL;
}
}
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Box"),
- CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Box/Box.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixIdentity())))) {
- return E_FAIL;
- }
-
-#pragma region ACTOR
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Playable_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))){
- return E_FAIL;
- }
- if (true == isLoad_NPC) {
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Npc_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Human/Npc/Npc.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
- return E_FAIL;
- }
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_GerboldOlivander_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
- return E_FAIL;
- }
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Professor_EleazarFig_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
- return E_FAIL;
- }
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_VictorRookWood_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/VictorRookWood/VictorRookWood.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
- return E_FAIL;
- }
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_ChiyoKogawa_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/ChiyoKogawa/ChiyoKogawa.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
- return E_FAIL;
- }
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_MatildaWeasely_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/MatildaWeasely/MatildaWeasely.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
- return E_FAIL;
- }
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_SatyavatiShah_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/SatyavatiShah/SatyavatiShah.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
- return E_FAIL;
- }
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Ghost_Peeves_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/Ghost_Peeves/Ghost_Peeves.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
- return E_FAIL;
- }
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_PhineasBlack_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/PhineasBlack/PhineasBlack.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
- return E_FAIL;
- }
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_M_Student_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/M_Student/M_Student.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
- return E_FAIL;
- }
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_F_Student_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/F_Student/F_Student.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
- return E_FAIL;
- }
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Elf_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/Elf/Elf.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
- return E_FAIL;
- }
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Kitchen_Female_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/Elf/Kitchen_Female/Kitchen_Female.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
- return E_FAIL;
- }
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_BaiHowin_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/BaiHowin/BaiHowin.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
- return E_FAIL;
- }
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_GeorgeOsric_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/GeorgeOsric/GeorgeOsric.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
- return E_FAIL;
- }
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_DinahHecat_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/DinahHecat/DinahHecat.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
- return E_FAIL;
- }
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_MudiwaOnai_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/MudiwaOnai/MudiwaOnai.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
- return E_FAIL;
- }
- }
- if (true == isLoad_Monster) {
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/Goblin/SK_GOB_M_T4Melee_INST_A_Master.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
- return E_FAIL;
- }
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_Mage_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/Goblin_Mage/GoblinMage.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
- return E_FAIL;
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_Spector_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/GoblinSpector/GoblinSpector.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
- return E_FAIL;
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_Assassin_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/Goblin_Assassin/SK_GOB_M_Assassin_Master.bin", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
- return E_FAIL;
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_GerboldOlivander_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
- return E_FAIL;
- }
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Professor_EleazarFig_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
- return E_FAIL;
- }
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Ghost_Peeves_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/Ghost_Peeves/Ghost_Peeves.bin", XMMatrixScaling(0.1f, 0.1f, 0.1f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
- return E_FAIL;
- }
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Troll_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/SubTroll/troll.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
- return E_FAIL;
- }
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_Spector_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/GoblinSpector/GoblinSpector.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
- return E_FAIL;
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_Assassin_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/Goblin_Assassin/SK_GOB_M_Assassin_Master.bin", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
- return E_FAIL;
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Ranrok_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/ConjuredDragon/ConjuredDragon.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
- return E_FAIL;
- }
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Camera_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Camera/Camera.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
- return E_FAIL;
- }
- }
-#pragma endregion
-
-#pragma region ITEM
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Wand_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Wand/SK_Wands_Amit.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationX(XMConvertToRadians(-90.f)) * XMMatrixIdentity()))))
- return E_FAIL;
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Potion_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Object/Potion/SM_Bottle_EmptyCapOff.bin", XMMatrixIdentity()))))
- return E_FAIL;
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_RaceRing_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Object/RaceRing/SM_BRR_RaceRing_01.bin", XMMatrixRotationX(XMConvertToRadians(90.f)) * XMMatrixIdentity()))))
- return E_FAIL;
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Broom_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Object/Broom/Broom.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
- return E_FAIL;
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_SK_MoonTrimmerBroom_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Object/Broom/MoonTrimmerBroom/SK_MoonTrimmerBroom.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
- return E_FAIL;
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_DarkWizardBroom_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Object/Broom/DarkWizardBroom/DarkWizardBroom.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
- return E_FAIL;
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_WildFireBroom_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Object/Broom/WildFireBroom/WildFireBroom.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
- return E_FAIL;
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Troll_Weapon_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Object/SubTroll_Weapon/SK_WPN_Troll_Club07.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationX(XMConvertToRadians(-90.f)) * XMMatrixIdentity()))))
- return E_FAIL;
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Troll_Rock_Big_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Object/Troll_Rock/VFX_SM_Rock_01.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
- return E_FAIL;
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_Dagger_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Goblin_Dagger/SK_WPN_GOB_SmallSword.bin", XMMatrixIdentity()))))
- return E_FAIL;
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_Sword_L_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Goblin_Sword/SK_WPN_GOB_SmallSword_L.bin", XMMatrixIdentity()))))
- return E_FAIL;
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_Sword_R_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Goblin_Sword/SK_WPN_GOB_SmallSword_R.bin", XMMatrixIdentity()))))
- return E_FAIL;
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_BattleAxe_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Goblin_BattleAxe/SK_WPN_GOB_BattleAxe01.bin", XMMatrixRotationX(XMConvertToRadians(-90.f)) * XMMatrixIdentity()))))
- return E_FAIL;
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_VFX_SK_OLI_TrollFight_BlockerA_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Reparo_Object/VFX_SK_OLI_TrollFight_BlockerA.bin", XMMatrixIdentity()))))
- return E_FAIL;
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_VFX_SK_OLI_TrollFight_BlockerB_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Reparo_Object/VFX_SK_OLI_TrollFight_BlockerB.bin", XMMatrixIdentity()))))
- return E_FAIL;
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_ThestralCarriage_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Object/ThestralCarriage/ThestralCarriage.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
- return E_FAIL;
-
-
-#pragma endregion
-
- if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CPlayerRobe::Create(m_pDevice, m_pContext)))) {
- return E_FAIL;
- }
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_CCL_CameraRig.001_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Camera/CCL_CameraRig.001.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
- return E_FAIL;
-
- /* For.Prototype_Component_SkyboxModel */
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_SkyboxModel"),
- CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/SkyBox/SkyBox.bin", XMMatrixIdentity()))))
- return E_FAIL;
-
-
m_strMessage = TEXT("이펙트를(을) 로딩 중 입니다.");
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CTrail::Create(m_pDevice, m_pContext)))) {
@@ -2628,6 +2625,10 @@ HRESULT CLoader::Loading_For_GamePlay()
return E_FAIL;
}
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CAccioSide::Create(m_pDevice, m_pContext)))) {
+ return E_FAIL;
+ }
+
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CStupefySide::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
}
@@ -2649,6 +2650,19 @@ HRESULT CLoader::Loading_For_GamePlay()
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CTroll_Rush_Hit::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
}
+
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CTroll_Rush::Create(m_pDevice, m_pContext)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CTroll_Shout::Create(m_pDevice, m_pContext)))) {
+ return E_FAIL;
+ }
+
+
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CTroll_Self_Hit::Create(m_pDevice, m_pContext)))) {
+ return E_FAIL;
+ }
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CGoblin_Protego::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
}
@@ -2866,6 +2880,16 @@ HRESULT CLoader::Loading_For_GamePlay()
});
+ Asset_FileLoad("../Bin/Resources/Models/Effect/Rock", L"Prototype_Instance_Model_", [&](_wstring wstrFileName, const _char* pFilePath) {
+
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, wstrFileName,
+ CInstance_Model::Create(m_pDevice, m_pContext, pFilePath, MODEL::NONANIM, XMMatrixScaling(0.1f, 0.1f, 0.1f) * XMMatrixIdentity(), 0))))
+ return E_FAIL;
+
+ return S_OK;
+
+ });
+
m_strMessage = TEXT("객체원형를(을) 로딩 중 입니다.");
#pragma region UI
@@ -3622,7 +3646,7 @@ HRESULT CLoader::Loading_For_GamePlay()
/* For.Prototype_Component_FloatingBalloon */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_FloatingBalloon"),
- CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "C:/MeshTable/Game/RiggedObjects/Props/FloatingBalloonTarget/SK_FloatingBalloonTarget_.bin"))))
+ CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "../Bin/Resources/Models/MapMesh/Game/RiggedObjects/Props/FloatingBalloonTarget/SK_FloatingBalloonTarget_.bin"))))
return E_FAIL;
/* For.Prototype_Component_Hogwart_Lake */
@@ -3715,6 +3739,10 @@ HRESULT CLoader::Loading_For_GamePlay()
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CMapElement_Lake::Create(m_pDevice, m_pContext))))
return E_FAIL;
+ /* For.Prototype_GameObject_Cave */
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CMapElement_Cave::Create(m_pDevice, m_pContext))))
+ return E_FAIL;
+
/* For.Prototype_GameObject_Land */
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CLand::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
@@ -3784,13 +3812,10 @@ HRESULT CLoader::Loading_For_GamePlay()
return E_FAIL;
}
-#ifdef _DEBUG
- if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CCamera_Model::Create(m_pDevice, m_pContext)))) {
+ /* For.Prototype_GameObject_Elf */
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CElf::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
}
-#endif // _DEBUG
-
-
#pragma endregion
@@ -3883,11 +3908,7 @@ HRESULT CLoader::Loading_For_GamePlay()
}
-
-/* 쉐이더 로딩 종료 이후 로딩*/
-
#pragma region RECEIVE_THREAD
-
{ // MapModels
m_strMessage = TEXT("모델를(을) 로딩 중 입니다.");
_uint iIndex = 0;
@@ -3912,20 +3933,18 @@ HRESULT CLoader::Loading_For_GamePlay()
}
}
-
{
- m_strMessage = TEXT("셰이더를(을) 로딩 중 입니다.");
- _uint iIndex = 0;
- for (auto& JobMapShader : jobMapShaders)
- {
- pair<_wstring, CShader*>* pOut = JobMapShader.get();
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, pOut->first, pOut->second))) {
+ for (auto& job : jobCharacterModels) {
+ pair<_wstring, CModel*>* pResult = job.get();
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, pResult->first, pResult->second))) {
+ assert(false);
return E_FAIL;
}
- Safe_Delete(pOut);
+ Safe_Delete(pResult);
}
}
+
#pragma endregion
m_strMessage = TEXT("정보를 불러오는 중입니다.");
diff --git a/Jusin154_Team3D/Client/Private/MapElement_Cave.cpp b/Jusin154_Team3D/Client/Private/MapElement_Cave.cpp
new file mode 100644
index 000000000..16882de34
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/MapElement_Cave.cpp
@@ -0,0 +1,267 @@
+#include "pch.h"
+#include "MapElement_Cave.h"
+#include "GameInstance.h"
+
+#include "Layer.h"
+#include "TriggerBox.h"
+
+CMapElement_Cave::CMapElement_Cave(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CMapElement{ pDevice, pContext }
+{
+}
+
+CMapElement_Cave::CMapElement_Cave(const CMapElement_Cave& rhs)
+ : CMapElement(rhs)
+{
+}
+
+HRESULT CMapElement_Cave::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CMapElement_Cave::Initialize(void* pArg)
+{
+ MAPELEMENT_DESC* pDesc = static_cast(pArg);
+
+ m_bVisible = pDesc->bVisible;
+ m_iMaxLodLevel = pDesc->iMaxLodLevel;
+
+ for (_uint i = 0; i < m_iMaxLodLevel + 1; i++)
+ {
+ m_ModelPrototypeTags.push_back(pDesc->ModelPrototypeTags[i]);
+ }
+
+ if (FAILED(__super::Initialize(pArg)))
+ return E_FAIL;
+
+ if (FAILED(Ready_Components(pArg)))
+ return E_FAIL;
+
+ m_pTransformCom->Set_Scale(pDesc->vScale);
+ m_pTransformCom->Rotation(XMConvertToRadians(pDesc->vRotation.x), XMConvertToRadians(pDesc->vRotation.y), XMConvertToRadians(pDesc->vRotation.z));
+ m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&pDesc->vPosition), 1.f));
+
+ _float fMaxScale = max(max(pDesc->vScale.x, pDesc->vScale.y), pDesc->vScale.z);
+
+ m_fRadius = m_pModelComs[0]->Get_Radius() * fMaxScale;
+
+ _float3 vOffset = m_pModelComs[0]->Get_RadiusOffset();
+ XMStoreFloat3(&m_vWorldCenterPosition, XMVector3TransformCoord(XMLoadFloat3(&vOffset), m_pTransformCom->Get_XMWorldMatrix()));
+
+ ReadyForPhysX();
+ ConvertToPhysX();
+
+ if (FAILED(Ready_TriggerBox()))
+ return E_FAIL;
+
+ return S_OK;
+}
+
+void CMapElement_Cave::Priority_Update(_float fTimeDelta)
+{
+}
+
+void CMapElement_Cave::Update(_float fTimeDelta)
+{
+}
+
+void CMapElement_Cave::Late_Update(_float fTimeDelta)
+{
+ if (m_pGameInstance->IsIn_WorldFrustum(XMVectorSetW(XMLoadFloat3(&m_vWorldCenterPosition), 1.f), m_fRadius)) {
+ if (m_bVisible)
+ {
+ m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
+#ifdef _DEBUG
+ m_pGameInstance->Add_RenderGroup(RENDER::NONLIGHT, m_pTriggerBox);
+#endif // _DEBUG
+
+ }
+
+
+
+ if (SUCCEEDED(m_pTriggerBox->TryScanArea(fTimeDelta)))
+ {
+ Enter_Cave();
+ }
+ }
+}
+
+HRESULT CMapElement_Cave::Render()
+{
+ if (FAILED(Bind_ShaderResources()))
+ return E_FAIL;
+
+ _uint iNumMeshes = m_pModelComs[m_iLodIndex]->Get_NumMeshes();
+
+ for (_uint i = 0; i < iNumMeshes; i++)
+ {
+ if (FAILED(m_pModelComs[0]->Bind_Material(i, m_pShaderCom))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::DEFAULT)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pModelComs[m_iLodIndex]->Render(i))) {
+ return E_FAIL;
+ }
+ }
+
+ return S_OK;
+}
+
+HRESULT CMapElement_Cave::Ready_Components(void* pArg)
+{
+ if (FAILED(__super::Ready_Components(pArg))) {
+ return E_FAIL;
+ }
+
+ for (_uint i = 0; i < m_iMaxLodLevel + 1; ++i)
+ {
+ CModel* pModel = { nullptr };
+
+ /* Com_Model */
+ if (FAILED(__super::Add_Asset_Component(NEXT_LEVEL, m_ModelPrototypeTags[i],
+ reinterpret_cast(&pModel))))
+ return E_FAIL;
+
+ m_pModelComs.push_back(pModel);
+ }
+
+ /* Com_Shader */
+ if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH,
+ reinterpret_cast(&m_pShaderCom))))
+ return E_FAIL;
+
+ return S_OK;
+}
+
+HRESULT CMapElement_Cave::Bind_ShaderResources()
+{
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CMapElement_Cave::Ready_TriggerBox()
+{
+ CTriggerBox::TRIGGERBOX_DESC Desc = {};
+
+ XMStoreFloat4(&Desc.vPosition_Radius, m_pTransformCom->Get_State(STATE::POSITION));
+ Desc.vPosition_Radius.w = 10.f;
+
+ m_pTriggerBox = CTriggerBox::Create(m_pDevice, m_pContext, &Desc);
+
+#ifdef _DEBUG
+
+#endif // _DEBUG
+
+ return S_OK;
+}
+
+void CMapElement_Cave::ReadyForPhysX()
+{
+ if (true == m_bConverted) {
+ return;
+ }
+ m_bConverted = true;
+ _uint iLevel = NEXT_LEVEL;
+
+ CModel* pModel = m_pModelComs[0];
+
+ if (FAILED(pModel->Ready_PhysXMeshes(XMMatrixIdentity(), iLevel))) {
+ assert(false);
+ }
+}
+
+void CMapElement_Cave::ConvertToPhysX()
+{
+ if (true == m_bReadyToCreatePhysX) {
+ return;
+ }
+ m_bReadyToCreatePhysX = true;
+
+ CModel* pModel = m_pModelComs[0];
+
+ _uint iNumMeshes = pModel->Get_NumMeshes();
+
+ for (_uint iIndex = 0; iIndex < iNumMeshes; ++iIndex)
+ {
+ _wstring wstrName = CMyTools::ToWstring(pModel->Get_MeshName(iIndex)) + to_wstring(iIndex);
+ CRigidBody_Static* pRigidBody = { nullptr };
+ CRigidBody_Static::RIGIDBODY_STATIC_DESC Desc = {};
+ Desc.iSubKind = ENUM_CLASS(PXOBJECT::TERRAIN);
+ Desc.pMeshName = wstrName.c_str();
+ Desc.pWorldMatrix = m_pTransformCom->Get_WorldMatrixPtr();
+ if (FAILED(__super::Add_Asset_Component(NEXT_LEVEL, wstrName, (CComponent**)&pRigidBody, &Desc))) {
+ assert(false);
+ }
+ m_RigidBodies.push_back(pRigidBody);
+ }
+}
+
+void CMapElement_Cave::Enter_Cave()
+{
+ m_pGameInstance->Set_LevelToChange();
+}
+
+CMapElement_Cave* CMapElement_Cave::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CMapElement_Cave* pInstance = new CMapElement_Cave(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CMapElement_Cave");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CMapElement_Cave::Clone(void* pArg, CGameObject* pOwner)
+{
+ CMapElement_Cave* pInstance = new CMapElement_Cave(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CMapElement_Cave");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CMapElement_Cave::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pShaderCom);
+
+ for (_uint i = 0; i < m_RigidBodies.size(); ++i) {
+ SAFE_RELEASE(m_RigidBodies[i]);
+ } m_RigidBodies.clear();
+
+ for (auto& pModel : m_pModelComs)
+ SAFE_RELEASE(pModel);
+}
+
+#ifdef _DEBUG
+void CMapElement_Cave::Describe_Entity()
+{
+
+}
+#endif // _DEBUG
diff --git a/Jusin154_Team3D/Client/Private/MapElement_Chest_Lid.cpp b/Jusin154_Team3D/Client/Private/MapElement_Chest_Lid.cpp
index 3f90bbb64..cd1d54fd5 100644
--- a/Jusin154_Team3D/Client/Private/MapElement_Chest_Lid.cpp
+++ b/Jusin154_Team3D/Client/Private/MapElement_Chest_Lid.cpp
@@ -36,7 +36,7 @@ HRESULT CMapElement_Chest_Lid::Initialize(void* pArg)
if (FAILED(Ready_Components(pArg)))
return E_FAIL;
- m_fOpenDuration = 0.1f;
+ m_fOpenDuration = 0.3f;
m_fRotationAngle = pDesc->fRotaitionAngle;
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&pDesc->vLid_Offset), 1.f));
diff --git a/Jusin154_Team3D/Client/Private/MapElement_Door.cpp b/Jusin154_Team3D/Client/Private/MapElement_Door.cpp
index e539ed59b..1c8c4e357 100644
--- a/Jusin154_Team3D/Client/Private/MapElement_Door.cpp
+++ b/Jusin154_Team3D/Client/Private/MapElement_Door.cpp
@@ -271,7 +271,7 @@ void CMapElement_Door::Free()
#ifdef _DEBUG
void CMapElement_Door::Describe_Entity()
{
- GUI::Begin("PhysX");
+ GUI::Begin("PhysX", 0, IMGUI_GLOBAL_BEGIN_FLAG);
if (GUI::CollapsingHeader("Door")) {
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
GUI::Text("m_vKinematicTimer %.3f", m_vKinematicTimer.x);
diff --git a/Jusin154_Team3D/Client/Private/MapElement_Static.cpp b/Jusin154_Team3D/Client/Private/MapElement_Static.cpp
index 2d337ae85..dd61188d2 100644
--- a/Jusin154_Team3D/Client/Private/MapElement_Static.cpp
+++ b/Jusin154_Team3D/Client/Private/MapElement_Static.cpp
@@ -30,7 +30,6 @@ HRESULT CMapElement_Static::Initialize(void* pArg)
for (_uint i = 0; i < m_iMaxLodLevel + 1; i++)
{
m_ModelPrototypeTags.push_back(pDesc->ModelPrototypeTags[i]);
- //m_ModelPathIndices.push_back((*pDesc->pModelPathIndices)[i]);
}
if (FAILED(__super::Initialize(pArg)))
diff --git a/Jusin154_Team3D/Client/Private/MapInfo.cpp b/Jusin154_Team3D/Client/Private/MapInfo.cpp
index 33f3553c6..6811e12f8 100644
--- a/Jusin154_Team3D/Client/Private/MapInfo.cpp
+++ b/Jusin154_Team3D/Client/Private/MapInfo.cpp
@@ -18,6 +18,9 @@
#include "InstancedProp_Light.h"
#include "Layer.h"
#include "EffectParts.h"
+#include "RandomNpc.h"
+#include "MapElement_Cave.h"
+#include "ReparoObject.h"
CMapInfo::CMapInfo()
{
@@ -155,6 +158,10 @@ HRESULT CMapInfo::Load_MapObjects(const _char* pFileName, const _wchar* pLayerTa
Desc.bVisible = false;
m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, pLayerTag, &Desc);
}
+ else if (MAPOBJECT_TYPE::ELEMENT_CAVE == eType)
+ {
+ m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, pLayerTag, &Desc);
+ }
/*else if (MAPOBJECT_TYPE::ELEMENT_INTERACT == eType)
m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Element_Interact"), &Desc);*/
}
@@ -829,6 +836,48 @@ HRESULT CMapInfo::Load_EffectParts(const _char* pFileName, const _char* pEffectr
return S_OK;
}
+HRESULT CMapInfo::Load_ReparoObjects(const _char* pFileName)
+{
+ tinyxml2::XMLDocument xmlDoc;
+
+ string strPath = "../Bin/Resources/Data/Map/Reparo/" + string(pFileName) + ".xml";
+
+ if ((tinyxml2::XML_SUCCESS != xmlDoc.LoadFile(strPath.c_str())))
+ return E_FAIL;
+
+ tinyxml2::XMLElement* root = xmlDoc.FirstChildElement("Reparo");
+
+ if (nullptr == root)
+ {
+ MSG_BOX("Failed to Find root");
+ return S_OK;
+ }
+
+ for (auto* Object = root->FirstChildElement("Object"); Object; Object = Object->NextSiblingElement("Object"))
+ {
+ CReparoObject::REPARO_OBJECT_DESC Desc = {};
+
+ Object->QueryUnsignedAttribute("Type", &Desc.iModelID);
+ Object->QueryFloatAttribute("Radius", &Desc.fRadius);
+
+ /* Transform */
+ auto* Rotation = Object->FirstChildElement("Rotation");
+ Rotation->QueryFloatAttribute("x", &Desc.vRotation.x);
+ Rotation->QueryFloatAttribute("y", &Desc.vRotation.y);
+ Rotation->QueryFloatAttribute("z", &Desc.vRotation.z);
+
+ auto* Position = Object->FirstChildElement("Position");
+ Position->QueryFloatAttribute("x", &Desc.vPosition.x);
+ Position->QueryFloatAttribute("y", &Desc.vPosition.y);
+ Position->QueryFloatAttribute("z", &Desc.vPosition.z);
+
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_REPARO, &Desc)))
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
HRESULT CMapInfo::Load_DADA_INT()
{
if (FAILED(Load_MapObjects("DATA_INT_Data", LAYER_DADA_INT)))
@@ -853,6 +902,47 @@ HRESULT CMapInfo::Load_DADA_INT()
return S_OK;
}
+HRESULT CMapInfo::Load_Npc()
+{
+ tinyxml2::XMLDocument xmlDoc;
+
+ string strPath = "../Bin/Resources/Data/Map/NPC/DummyNPC_Data.xml";
+
+ if ((tinyxml2::XML_SUCCESS != xmlDoc.LoadFile(strPath.c_str())))
+ return E_FAIL;
+
+ tinyxml2::XMLElement* root = xmlDoc.FirstChildElement("NPC");
+
+ if (nullptr == root)
+ {
+ MSG_BOX("Failed to Find root");
+ return S_OK;
+ }
+
+ for (auto* Object = root->FirstChildElement("Object"); Object; Object = Object->NextSiblingElement("Object"))
+ {
+ CRandomNpc::NPCDESC NPCDesc{};
+ Object->QueryIntAttribute("Index", &NPCDesc.iIndex);
+ /* Transform */
+ auto* Position = Object->FirstChildElement("Position");
+ Position->QueryFloatAttribute("x", &NPCDesc.vPos.x);
+ Position->QueryFloatAttribute("y", &NPCDesc.vPos.y);
+ Position->QueryFloatAttribute("z", &NPCDesc.vPos.z);
+ NPCDesc.vPos.w = 1.f;
+
+ auto* Rotation = Object->FirstChildElement("Rotation");
+ Rotation->QueryFloatAttribute("x", &NPCDesc.vRotQ.x);
+ Rotation->QueryFloatAttribute("y", &NPCDesc.vRotQ.y);
+ Rotation->QueryFloatAttribute("z", &NPCDesc.vRotQ.z);
+ NPCDesc.vRotQ.w = 1.f;
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_NPC, &NPCDesc))) {
+ return E_FAIL;
+ }
+ }
+
+ return S_OK;
+}
+
HRESULT CMapInfo::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex)
{
m_pGameInstance = CGameInstance::GetInstance();
diff --git a/Jusin154_Team3D/Client/Private/MonsterInfo.cpp b/Jusin154_Team3D/Client/Private/MonsterInfo.cpp
index c2232d956..1621040f8 100644
--- a/Jusin154_Team3D/Client/Private/MonsterInfo.cpp
+++ b/Jusin154_Team3D/Client/Private/MonsterInfo.cpp
@@ -147,9 +147,15 @@ HRESULT CMonsterInfo::Refresh_LockOnMonsters()
{
// (카메라의 룩)과 (카메라 -> 몬스터 방향 벡터)를 내적해서 가장 큰 크기가 나온 몬스타가 락온 대상
CMonster* pMonster = (*iter);
- if (pMonster->Get_Hp().x <= 0) {
- continue;
+
+ CStat*pStat = pMonster->Get_Component();
+
+ if (pStat != nullptr) {
+ if (pMonster->Get_Hp().x <= 0) {
+ continue;
+ }
}
+
vMonsterPos = pMonster->Get_LockOnPos();
vToMonsterDir = vMonsterPos - vCameraPos;
if (40.f <= XMVectorGetX(XMVector4Length(vToMonsterDir))) {
diff --git a/Jusin154_Team3D/Client/Private/NomalJap.cpp b/Jusin154_Team3D/Client/Private/NomalJap.cpp
index 9456e9d98..6fdb6e2ed 100644
--- a/Jusin154_Team3D/Client/Private/NomalJap.cpp
+++ b/Jusin154_Team3D/Client/Private/NomalJap.cpp
@@ -127,6 +127,21 @@ void CNomalJap::Late_Update(_float fTimeDelta)
if (false == m_bVisible) {
return;
}
+ //if (false == m_bHit) {
+ // _vector vStartPos = XMLoadFloat4(&m_vStartPos);
+ // _vector vEndPos = m_pProjectile->Get_WorldPostion();
+
+ // if (false == m_bHit) {
+ // _vector vStartPos = XMLoadFloat4(&m_vStartPos);
+ // _vector vEndPos = XMLoadFloat4(&m_vEndPos);
+ // if (false == XMVector3NearEqual(vEndPos, XMVectorZero(), XMVectorReplicate(FLT_EPSILON5)))
+ // {
+ // ON_COLLISION_INFO CollisionInfo = SweepTarget(vStartPos, vEndPos, 0.02f);
+ // OnCollision(this, &CollisionInfo);
+ // }
+ // }
+ //}
+
if (false == m_bHit) {
_vector vStartPos = XMLoadFloat4(&m_vStartPos);
_vector vEndPos = m_pProjectile->Get_WorldPostion();
diff --git a/Jusin154_Team3D/Client/Private/Player.cpp b/Jusin154_Team3D/Client/Private/Player.cpp
index aaf10d146..4c4bfe1fa 100644
--- a/Jusin154_Team3D/Client/Private/Player.cpp
+++ b/Jusin154_Team3D/Client/Private/Player.cpp
@@ -15,13 +15,13 @@
#include "MapElement_Interactable.h"
#include "Monster.h"
#include "TimeSocket.h"
-#include "PlayerRobe.h"
#include "RaceRing.h"
#include "Wand.h"
#include "Mesh.h"
#include "Effect_Container.h"
#include "ThestralCarriage.h"
#include "MapElement_Chest.h"
+#include "ReparoObject.h"
CPlayer::CPlayer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CUnit(pDevice, pContext)
@@ -255,7 +255,9 @@ HRESULT CPlayer::Render()
}
}
#ifdef _DEBUG
- Render_CameraCoordinateSystem();
+#ifdef 기무리
+ //Render_CameraCoordinateSystem();
+#endif // 기무리
//m_pCharacter_Controller->Render();
#endif // _DEBUG
@@ -430,6 +432,12 @@ void CPlayer::Set_Interaction(_bool bInteraction)
m_bCurrentInteraction = bInteraction;
}
+void CPlayer::ExitBattle()
+{
+ m_bDuel_ZOnlyMove = false;
+ m_pCharacter_Controller->Set_Position(XMLoadFloat4(&m_OriginPos));
+}
+
HRESULT CPlayer::Render_Shadow(SHADOW eType)
{
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) {
@@ -455,16 +463,8 @@ HRESULT CPlayer::Render_Shadow(SHADOW eType)
if (FAILED(Bind_ShaderParameters(i))) {
return E_FAIL;
}
- if (i == ENUM_CLASS(PLAYER_MESH_ORDER::ROBE_CLOTH)) {
- if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_NPC_PBR_ANIM::SHADOW_LEGACY)))) {
- return E_FAIL;
- }
-
- }
- else {
- if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_NPC_PBR_ANIM::SHADOW)))) {
- return E_FAIL;
- }
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_NPC_PBR_ANIM::SHADOW)))) {
+ return E_FAIL;
}
m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
m_pModelCom->Bind_OutPut_SRV_VS_Prev(27, 0);
@@ -549,6 +549,7 @@ void CPlayer::Trigger(CTimeSocket& Socket)
m_pCharacter_Controller->Set_Position(vNewPos);
m_pTransformCom->RotationQ(pContents->pxTransform.q);
m_pTransformCom->RewindMomentum();
+ } break;
}
break;
case TIMESOCKET_FUNC::TRANSLATION_LERP:
@@ -557,6 +558,22 @@ void CPlayer::Trigger(CTimeSocket& Socket)
} break;
case TIMESOCKET_FUNC::SET_ANIMSTATE:
{
+ } break;
+ case TIMESOCKET_FUNC::SET_FSMSTATE:
+ {
+ if (pContents->vFlags.b[0]) {
+ m_pFSM->Change_State(FSMSTATE::CUTSCENE);
+ }
+ else if (pContents->vFlags.b[1]) {
+ m_pFSM->Change_State(FSMSTATE::IDLE);
+ }
+ } break;
+ case TIMESOCKET_FUNC::BIND_SOCKET_MATRIX:
+ {
+
+ } break;
+ case TIMESOCKET_FUNC::UNBIND_SOCKET_MATRIX:
+ {
} break;
default:
@@ -667,6 +684,10 @@ HRESULT CPlayer::Ready_Components()
return E_FAIL;
}
m_pCharacter_Controller->SetGravity(false);
+ m_pCharacter_Controller->Set_GravityAmount(1.2f);
+#ifdef _DEBUG
+ m_pCharacter_Controller->Set_Name("CCT_PLAYER");
+#endif // _DEBUG
}
{ // DO
@@ -770,17 +791,16 @@ HRESULT CPlayer::Bind_ShaderParameters(_uint iMeshOrder)
_float fMixerFactor = { FLT_MAX };
_uint iColorMixerMethod = { 0 };
- switch (PLAYER_MESH_ORDER(iMeshOrder))
+ switch (CPlayer::PLAYER_MESH_ORDER(iMeshOrder))
{
- case PLAYER_MESH_ORDER::HAIR_MAIN:
- case PLAYER_MESH_ORDER::HEAD_EYELASH:
- case PLAYER_MESH_ORDER::HAIR_SUB:
+ case CPlayer::PLAYER_MESH_ORDER::HAIR_MAIN:
+ case CPlayer::PLAYER_MESH_ORDER::EYELASH:
bUseColorMixer = true;
iColorParam = 0x2E2E2E;
fMixerFactor = 0.9f;
iColorMixerMethod = 1;
break;
- case PLAYER_MESH_ORDER::LOWER:
+ case CPlayer::PLAYER_MESH_ORDER::CLOTH:
bUseColorMixer = true;
iColorParam = 0x292557;
fMixerFactor = 0.5f;
@@ -964,6 +984,24 @@ void CPlayer::Find_HiddenObjects()
}
+void CPlayer::Check_Reparoobejcts()
+{
+ CLayer* pLayer = m_pGameInstance->Get_Layer(NEXT_LEVEL, LAYER_REPARO);
+
+ if (nullptr == pLayer)
+ return;
+
+ const list* pReparoObjects = pLayer->Get_Objects();
+
+ for (auto& pObject : *pReparoObjects)
+ {
+ CReparoObject* pReparoObject = dynamic_cast(pObject);
+ if (nullptr != pReparoObject)
+ if (pReparoObject->IsRepairable(false))
+ return;
+ }
+}
+
void CPlayer::Update_CameraCoordinateSystem(_float fTimeDelta)
{
_vector xmvCameraLook = XMVector3Normalize(XMVectorSetY(m_pGameInstance->Get_CameraLook(), 0.f));
@@ -1012,7 +1050,7 @@ void CPlayer::Free()
{
__super::Free();
- SAFE_RELEASE(m_pRobePart);
+ //SAFE_RELEASE(m_pRobePart);
SAFE_RELEASE(m_pGrapInteractive);
if (nullptr != m_pInfoInstance) {
@@ -1191,12 +1229,9 @@ void CPlayer::Describe_Entity()
m_pLightCom->Describe_Entity();
- for (_int i = 0; i < m_pModelCom->Get_AnimSize(); i++)
- {
- if (GUI::Button(m_pModelCom->Get_AnimList(i)))
- {
- m_pModelCom->Set_AnimationIndex(i);
- }
+ if (GUI::TreeNode("PLAYER_ANIMLIST")) {
+ m_pModelCom->Describe_Entity();
+ GUI::TreePop();
}
}
GUI::End();
diff --git a/Jusin154_Team3D/Client/Private/PlayerRobe.cpp b/Jusin154_Team3D/Client/Private/PlayerRobe.cpp
index 9e0897e11..70e741d78 100644
--- a/Jusin154_Team3D/Client/Private/PlayerRobe.cpp
+++ b/Jusin154_Team3D/Client/Private/PlayerRobe.cpp
@@ -345,7 +345,7 @@ HRESULT CPlayerRobe::Update_RobeJoints()
void CPlayerRobe::Describe_Entity()
{
- GUI::Begin("PhysX");
+ GUI::Begin("PhysX", 0, IMGUI_GLOBAL_BEGIN_FLAG);
if (GUI::CollapsingHeader("Robe")) {
for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_ORDER::END); ++i) {
_uint iActor0 = i;
diff --git a/Jusin154_Team3D/Client/Private/Player_States.cpp b/Jusin154_Team3D/Client/Private/Player_States.cpp
index c72019d42..3634dadb7 100644
--- a/Jusin154_Team3D/Client/Private/Player_States.cpp
+++ b/Jusin154_Team3D/Client/Private/Player_States.cpp
@@ -9,6 +9,7 @@
#include "CamPosition_Arm.h"
#include "State_CutScene.h"
#include "Wand.h"
+#include "ThestralCarriage.h"
#include "Item_Potion.h"
#include "Character_Controller.h"
#include "MapElement_Interactable.h"
@@ -382,7 +383,7 @@ void CPlayer::Behavior_CutSceneEnter()
m_bSprintToggle = false;
m_bWalkToggle = false;
- pairAnimInfo = m_Animation[STATEANIM::CUTSCENE_OPENINGINTRO2];
+ pairAnimInfo = m_Animation[STATEANIM::CUTSCENE_OPENINGINTRO1];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
m_bOpeningCutScene = true;
}
@@ -391,16 +392,11 @@ HRESULT CPlayer::Behavior_CutSceneExitCheck(_float fTimeDelta)
{
if (m_bOpeningCutScene)
{
- //_vector Offset = XMVectorSet(1.820f, 0.44f, 0.f, 0.f);
- //m_pTransformCom->Set_WorldMatrix(m_pCarriage->Get_Component()->Get_XMWorldMatrix());
- m_pCharacter_Controller->Set_Position(m_pCarriage->Get_WorldPostion() /*+ Offset*/);
+ m_pTransformCom->Set_State(STATE::POSITION, m_pCarriage->Get_SocketWorldMatrix(CThestralCarriage::CARRIAGE_SOCKET::FRONT_RIGHT).r[3]);
+ m_pCharacter_Controller->Set_Position(m_pTransformCom->Get_State(STATE::POSITION));
+ m_pTransformCom->RotationQ(XMQuaternionRotationAxis(XMVectorSet(0.f, -1.f, 0.f, 0.f), XMConvertToRadians(90.f)));
}
- /*if (m_pCarriage->Get_Component()->IsFinishedAnim())
- {
- m_pFSM->Change_State(FSMSTATE::IDLE);
- return E_FAIL;
- }*/
return S_OK;
}
@@ -1120,7 +1116,6 @@ void CPlayer::Behavior_CombatEnter()
0.1f);
}
}
-
}
HRESULT CPlayer::Behavior_CombatExitCheck()
@@ -1473,8 +1468,9 @@ void CPlayer::Behavior_SpellEnter()
0.01f);
}
Add_SpellEvent(pairAnimInfo.first, fRatio);
- if (m_eSpell != ENUM_CLASS(SKILL_TYPE::LUMOS) &&
- m_eSpell != ENUM_CLASS(SKILL_TYPE::AVADAKEDAVRA))
+ if(ENUM_CLASS(SKILL_TYPE::REPARO) == m_eSpell)
+ Check_Reparoobejcts();
+ if (!m_bStartSpellAnim)
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, fAnimSpeed);
}
@@ -1482,8 +1478,7 @@ void CPlayer::Behavior_SpellEnter()
fRatio = 0.2f;
pairAnimInfo = m_Animation[STATEANIM::SPELL];
Add_SpellEvent(pairAnimInfo.first, fRatio);
- if (m_eSpell != ENUM_CLASS(SKILL_TYPE::LUMOS) &&
- m_eSpell !=ENUM_CLASS(SKILL_TYPE::AVADAKEDAVRA))
+ if (!m_bStartSpellAnim)
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
}
@@ -1505,7 +1500,7 @@ HRESULT CPlayer::Behavior_SpellExitCheck()
_uint iIndex = m_pModelCom->Get_AnimIndex();
_float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio();
- if (SUCCEEDED(InputSpell()) && !m_bSpellHit)
+ if (SUCCEEDED(InputSpell()) && !m_bSpellHit && iIndex != m_Animation[STATEANIM::AVADA_KEDAVRA].first)
{
_uint iCurr = m_pModelCom->Get_AnimIndex();
_uint iStart = m_Animation[STATEANIM::SPELL].first;
@@ -1625,7 +1620,7 @@ void CPlayer::Behavior_SpellExit()
Reset_Event();
m_bLookAt = false;
m_bSpellHit = false;
-
+ m_bStartSpellAnim = false;
}
void CPlayer::Behavior_AncientSpellEnter()
@@ -2747,7 +2742,7 @@ void CPlayer::Attach_Broom()
_matrix BoneNoScale = XMMatrixRotationQuaternion(Rot) * XMMatrixTranslationFromVector(Trans);
- m_OffsetPos = { 0.f,0.9f,0.f };
+ m_OffsetPos = { 0.f,1.f,0.f };
_matrix Offset = XMMatrixTranslation(m_OffsetPos.x,
m_OffsetPos.y, m_OffsetPos.z);
@@ -2885,6 +2880,7 @@ void CPlayer::Add_SpellEvent(_uint AnimIndex,_float fRatio)
switch (m_eSpell)
{
case ENUM_CLASS(SKILL_TYPE::BOMBARDA):
+ m_bStartSpellAnim = false;
Add_Event(AnimIndex,
[this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::BOMBARDA, this); }, /* 임시로 바꿔놓음 */
fRatio);
@@ -2896,6 +2892,7 @@ void CPlayer::Add_SpellEvent(_uint AnimIndex,_float fRatio)
break;
case ENUM_CLASS(SKILL_TYPE::DESCENDO):
+ m_bStartSpellAnim = false;
Add_Event(AnimIndex,
[this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::DESCENDO, Get_PartObject()); },
fRatio);
@@ -2907,6 +2904,7 @@ void CPlayer::Add_SpellEvent(_uint AnimIndex,_float fRatio)
break;
case ENUM_CLASS(SKILL_TYPE::LEVIOSO):
+ m_bStartSpellAnim = false;
Add_Event(AnimIndex,
[this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::LEVIOSO, this); },
fRatio);
@@ -2918,14 +2916,20 @@ void CPlayer::Add_SpellEvent(_uint AnimIndex,_float fRatio)
break;
case ENUM_CLASS(SKILL_TYPE::ACCIO):
+ m_bStartSpellAnim = false;
Add_Event(AnimIndex,
[this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::ACCIO, this); },
fRatio);
+
+ Add_Event(AnimIndex,
+ [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::ACCIO_SIDE, Get_PartObject()); },
+ 0.f);
Info.pText = TEXT("아씨오!");
m_pInfoInstance->Event_CallBack(TEXT("Dialogue"), &Info);
break;
case ENUM_CLASS(SKILL_TYPE::TRANSFORMATION):
+ m_bStartSpellAnim = false;
Add_Event(AnimIndex,
[this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::TRANSFORMATION, this); },
fRatio);
@@ -2936,19 +2940,8 @@ void CPlayer::Add_SpellEvent(_uint AnimIndex,_float fRatio)
Info.pText = TEXT("베라베르토!");
m_pInfoInstance->Event_CallBack(TEXT("Dialogue"), &Info);
break;
-
- case ENUM_CLASS(SKILL_TYPE::DIFFINDO):
- pairAnimInfo = m_Animation[STATEANIM::DIFFINDO];
- m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
- Info.pText = TEXT("디핀도!");
- m_pInfoInstance->Event_CallBack(TEXT("Dialogue"), &Info);
- break;
-
- case ENUM_CLASS(SKILL_TYPE::DISILLUSIONMENT):
- pairAnimInfo = m_Animation[STATEANIM::DISILLUSION_ENTER];
- m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
- break;
case ENUM_CLASS(SKILL_TYPE::AVADAKEDAVRA):
+ m_bStartSpellAnim = true;
m_pInfoInstance->Set_SearchLockOnFlag(false);
pairAnimInfo = m_Animation[STATEANIM::AVADA_KEDAVRA];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, false,1.f,true);
@@ -2970,6 +2963,7 @@ void CPlayer::Add_SpellEvent(_uint AnimIndex,_float fRatio)
break;
case ENUM_CLASS(SKILL_TYPE::REPARO):
{
+ m_bStartSpellAnim = true;
pairAnimInfo = m_Animation[STATEANIM::REPARO_START];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
@@ -2987,6 +2981,7 @@ void CPlayer::Add_SpellEvent(_uint AnimIndex,_float fRatio)
}
break;
case ENUM_CLASS(SKILL_TYPE::LUMOS):
+ m_bStartSpellAnim = true;
if (m_pModelCom->Get_SecondAnimIndex() != m_Animation[STATEANIM::LUMOS].first)
{
if (SUCCEEDED(InputMove()))
@@ -3033,6 +3028,7 @@ void CPlayer::Add_SpellEvent(_uint AnimIndex,_float fRatio)
}
break;
default:
+ m_bStartSpellAnim = true;
pairAnimInfo = m_Animation[STATEANIM::SPELL_FAIL];
Add_Event(AnimIndex,
[this]() { m_pEffectPool->Use_Skill(SKILL_TYPE::WAND_END, Get_PartObject()); },
diff --git a/Jusin154_Team3D/Client/Private/Protego.cpp b/Jusin154_Team3D/Client/Private/Protego.cpp
index 851ee14c1..0ab2b647d 100644
--- a/Jusin154_Team3D/Client/Private/Protego.cpp
+++ b/Jusin154_Team3D/Client/Private/Protego.cpp
@@ -131,6 +131,12 @@ HRESULT CProtego::Pre_Setting(CGameObject* pObject, void* pArg)
return S_OK;
}
+void CProtego::Set_Visible(_bool bVisible)
+{
+ m_bVisible = true;
+ m_pGameInstance->Attach_Actor(*m_pRigidBody->Get_Actor(), CURRENT_LEVEL);
+}
+
HRESULT CProtego::Ready_Components(void* pArg)
{
if (FAILED(__super::Ready_Components(pArg))) {
@@ -199,8 +205,7 @@ void CProtego::OnCollision(CGameObject* pOther, void* pDesc)
static_cast(m_pOwner)->Start_CameraShake(0.3f, 2.f);
- m_pGameInstance->Detach_Actor(*m_pRigidBody->Get_Actor(), NEXT_LEVEL);
-
+ m_pRigidBody->Detach_Actor(CURRENT_LEVEL);
m_bVisible = false;
}
diff --git a/Jusin154_Team3D/Client/Private/RandomNpc.cpp b/Jusin154_Team3D/Client/Private/RandomNpc.cpp
index 4f7fd24f7..e3d4a14f5 100644
--- a/Jusin154_Team3D/Client/Private/RandomNpc.cpp
+++ b/Jusin154_Team3D/Client/Private/RandomNpc.cpp
@@ -37,15 +37,20 @@ HRESULT CRandomNpc::Initialize(void* pArg)
return E_FAIL;
}
+ Load_AnimXML(("../Bin/Resources/Data/AnimList/RandomNpc.xml"));
+
_vector vPos = XMLoadFloat4(&pDesc->vPos);
m_pTransformCom->Set_State(STATE::POSITION, vPos);
m_pCharacter_Controller->Set_Position(vPos);
- m_pTransformCom->Rotation(XMLoadFloat4(&pDesc->vRotQ));
+ m_pTransformCom->Rotation(XMConvertToRadians(pDesc->vRotQ.x), XMConvertToRadians(pDesc->vRotQ.y), XMConvertToRadians(pDesc->vRotQ.z));
- m_pModelCom->Set_AnimationIndex(0, true);
+ _int iRandom = m_pGameInstance->Real_Random_Int(0, 12);
+ m_pModelCom->Set_AnimationIndex(m_Anims[iRandom], false,1.f,false,1.f,false);
m_pCallBack_Behavior->Initialize(m_pCharacter_Controller);
m_pCallBack_HitReport->Initialize(m_pCharacter_Controller);
m_bNpc = true;
+
+
return S_OK;
}
@@ -67,8 +72,18 @@ void CRandomNpc::Update(_float fTimeDelta)
if (!m_pGameInstance->IsIn_WorldFrustum(m_pTransformCom->Get_State(STATE::POSITION), m_pTransformCom->Get_Radius())) {
return;
}
+
BattleObserve_Anim();
+ if (m_pModelCom->IsFinishedAnim())
+ {
+ if (false == m_bBattle)
+ {
+ _int iRandom = m_pGameInstance->Real_Random_Int(0, 12);
+ m_pModelCom->Set_AnimationIndex(m_Anims[iRandom], false, 1.f, false, 1.f, false);
+ }
+ }
+
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
__super::Update(fTimeDelta);
#ifdef _DEBUG
@@ -91,28 +106,6 @@ void CRandomNpc::Update(_float fTimeDelta)
SAFE_RELEASE(m_pTarget);
m_fTargetDistance = { FLT_MAX };
}
-
- /*if (m_fTargetDistance <= 5.f && m_bInteract == false)
- {
- m_pInfoInstance->Event_CallBack(TEXT("NPCDialogue"), m_pNpcStat);
- m_bInteract = true;
- }
-
- if (m_bInteract != m_bPreviousInteract)
- {
- m_bPreviousInteract = m_bInteract;
- m_fInteractTime = 0.f;
- }
- else
- {
- m_fInteractTime += fTimeDelta;
- }
-
- if (m_fInteractTime >= 5.f)
- {
- m_bInteract = false;
- m_fInteractTime = 0.f;
- }*/
}
void CRandomNpc::Late_Update(_float fTimeDelta)
@@ -320,7 +313,7 @@ HRESULT CRandomNpc::Ready_Components(void* pArg)
Desc.fRotationPerSec = XMConvertToRadians(180.0f);
Desc.fRadius = 10.f;
- if (FAILED(Add_Component(g_iStaticLevel, &m_pTransformCom, pArg))) {
+ if (FAILED(Add_Component(g_iStaticLevel, &m_pTransformCom, &Desc))) {
return E_FAIL;
}
@@ -363,39 +356,47 @@ HRESULT CRandomNpc::Ready_Components(void* pArg)
return E_FAIL;
}
m_bBattleObserve_Npc = true;
- break;
+ break;
case 6:
- m_strModelPrototypeTag = TEXT("Prototype_Component_Elf_Model");
- if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("ELF"), (CComponent**)&m_pNpcStat))) {
- return E_FAIL;
- }
- break;
- case 7:
m_strModelPrototypeTag = TEXT("Prototype_Component_BaiHowin_Model");
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("BAIHOWIN"), (CComponent**)&m_pNpcStat))) {
return E_FAIL;
}
break;
- case 8:
+ case 7:
m_strModelPrototypeTag = TEXT("Prototype_Component_GeorgeOsric_Model");
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("GEORGEOSRIC"), (CComponent**)&m_pNpcStat))) {
return E_FAIL;
}
m_bBattleObserve_Npc = true;
break;
- case 9:
+ case 8:
m_strModelPrototypeTag = TEXT("Prototype_Component_DinahHecat_Model");
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("DINAHHECAT"), (CComponent**)&m_pNpcStat))) {
return E_FAIL;
}
break;
- case 10:
+ case 9:
m_strModelPrototypeTag = TEXT("Prototype_Component_MudiwaOnai_Model");
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("MUDIWAONAI"), (CComponent**)&m_pNpcStat))) {
return E_FAIL;
}
m_bBattleObserve_Npc = true;
break;
+ case 10:
+ m_strModelPrototypeTag = TEXT("Prototype_Component_VictorRookWood_Model");
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("VICTORROCKWOOD"), (CComponent**)&m_pNpcStat))) {
+ return E_FAIL;
+ }
+ m_bBroomRacer = true;
+ break;
+ case 11:
+ m_strModelPrototypeTag = TEXT("Prototype_Component_ChiyoKogawa_Model");
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("CHIYOKOGAWA"), (CComponent**)&m_pNpcStat))) {
+ return E_FAIL;
+ }
+ m_bBroomRacer = true;
+ break;
}
/* Com_Model */
@@ -450,15 +451,15 @@ void CRandomNpc::BattleObserve_Anim()
_float fRandX = 0.f;
if (iRand == 0)
{
- fRandX = m_pGameInstance->Real_Random_Float(1002.f, 1004.f);
+ fRandX = m_pGameInstance->Real_Random_Float(1003.f, 1005.f);
}
else {
- fRandX = m_pGameInstance->Real_Random_Float(1010.f, 1012.f);
+ fRandX = m_pGameInstance->Real_Random_Float(1009.f, 1011.f);
}
- _float fRandY = m_pGameInstance->Real_Random_Float(1008.f, 1016.f);
+ _float fRandZ = m_pGameInstance->Real_Random_Float(1008.f, 1016.f);
- m_pCharacter_Controller->Set_Position(XMVectorSet(fRandX, 2.f, fRandY, 1.f));
+ m_pCharacter_Controller->Set_Position(XMVectorSet(fRandX, 2.f, fRandZ, 1.f));
_vector vPos = Get_WorldPostion();
_vector vForward = XMVectorZero();
@@ -469,6 +470,8 @@ void CRandomNpc::BattleObserve_Anim()
vForward = XMVectorSet(-1.f, 0.f, 0.f, 0.f);
}
+ _int iRandIndex = m_pGameInstance->Real_Random_Int(14, 21);
+ m_pModelCom->Set_AnimationIndex(iRandIndex, false, 1.f, false, 1.f, false);
m_pTransformCom->LookAt(vPos + vForward);
@@ -480,11 +483,47 @@ void CRandomNpc::BattleObserve_Anim()
if (m_pModelCom->IsFinishedAnim())
{
_int iRand = m_pGameInstance->Real_Random_Int(14, 21);
- m_pModelCom->Set_AnimationIndex(iRand, false,1.f,false,1.f,false);
+ m_pModelCom->Set_AnimationIndex(iRand, false, 1.f, false, 1.f, false);
}
}
}
+void CRandomNpc::Load_AnimXML(const _char* pFilePath)
+{
+ tinyxml2::XMLDocument doc;
+ if (doc.LoadFile(pFilePath) != tinyxml2::XML_SUCCESS)
+ return;
+
+ tinyxml2::XMLElement* pRoot = doc.FirstChildElement("NPCAnimations");
+
+ const char* pModelType =
+ (m_bBroomRacer == true) ? "RACING" : "DEFAULT";
+
+ for (tinyxml2::XMLElement* pNPC = pRoot->FirstChildElement("NPC");
+ pNPC;
+ pNPC = pNPC->NextSiblingElement("NPC"))
+ {
+ if (strcmp(pNPC->Attribute("Model"), pModelType) != 0)
+ continue;
+
+ for (tinyxml2::XMLElement* pAnim = pNPC->FirstChildElement("Anim");
+ pAnim;
+ pAnim = pAnim->NextSiblingElement("Anim"))
+ {
+ string animName = pAnim->Attribute("Name");
+
+ for (tinyxml2::XMLElement* pIndex = pAnim->FirstChildElement("Index");
+ pIndex;
+ pIndex = pIndex->NextSiblingElement("Index"))
+ {
+ m_Anims.push_back(pIndex->IntText());
+ }
+ }
+ break;
+ }
+}
+
+
CRandomNpc* CRandomNpc::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
CRandomNpc* pInstance = new CRandomNpc(pDevice, pContext);
diff --git a/Jusin154_Team3D/Client/Private/ReparoObject.cpp b/Jusin154_Team3D/Client/Private/ReparoObject.cpp
index 94fef5cff..5fc1d0554 100644
--- a/Jusin154_Team3D/Client/Private/ReparoObject.cpp
+++ b/Jusin154_Team3D/Client/Private/ReparoObject.cpp
@@ -8,13 +8,12 @@
#include "EffectParts.h"
CReparoObject::CReparoObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
- : CUnit(pDevice, pContext)
+ : CMonster(pDevice, pContext)
{
}
CReparoObject::CReparoObject(const CReparoObject& Prototype)
- : CUnit(Prototype),
- m_pInfoInstance(CInfoInstance::GetInstance())
+ : CMonster(Prototype)
{
}
@@ -29,15 +28,20 @@ HRESULT CReparoObject::Initialize(void* pArg)
return E_FAIL;
}
-
if (FAILED(Ready_Components())) {
return E_FAIL;
}
- m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(0.f, 0.f, 0.f, 1.f));
-
- m_pModelCom->Set_AnimationIndex(0);
+ REPARO_OBJECT_DESC* pDesc = static_cast(pArg);
+ m_iModelID = pDesc->iModelID;
+ m_fRadius = pDesc->fRadius;
+ m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&pDesc->vPosition), 1.f));
+ m_pTransformCom->Rotation(XMConvertToRadians(pDesc->vRotation.x), XMConvertToRadians(pDesc->vRotation.y), XMConvertToRadians(pDesc->vRotation.z));
+ // 되돌리기 전 Before
+ m_ePreState = m_eCurState = REPARO_OBJECT_STATE::SLEEP;
+ m_pModelCom->Set_AnimationIndex(2);
+ m_pInfoInstance->Deregist_PlayerAlly(this);
return S_OK;
}
@@ -51,20 +55,41 @@ void CReparoObject::Update(_float fTimeDelta)
{
__super::Update(fTimeDelta);
+ Change_State();
+
+ switch (m_eCurState)
+ {
+ case Client::CReparoObject::REPARO_OBJECT_STATE::SLEEP:
+ break;
+ case Client::CReparoObject::REPARO_OBJECT_STATE::BEFORE:
+ break;
+ case Client::CReparoObject::REPARO_OBJECT_STATE::PLAYANIM:
+ if (true == m_pModelCom->IsFinishedAnim())
+ m_eCurState = REPARO_OBJECT_STATE::AFTER;
+ break;
+
+ case Client::CReparoObject::REPARO_OBJECT_STATE::AFTER:
+ break;
+
+ default:
+ break;
+ }
+
+
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
#ifdef _DEBUG
Describe_Entity();
#endif // _DEBUG
-
}
void CReparoObject::Late_Update(_float fTimeDelta)
{
__super::Late_Update(fTimeDelta);
- m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
+ if(m_pGameInstance->IsIn_WorldFrustum(m_pTransformCom->Get_State(STATE::POSITION), m_fRadius))
+ m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
}
@@ -79,6 +104,10 @@ HRESULT CReparoObject::Render()
}
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
+ _uint iShaderPass = ENUM_CLASS(SHADER_PASS_ANIM::DEFAULT);
+ if (true == m_bDrawOutLine) {
+ iShaderPass = ENUM_CLASS(SHADER_PASS_ANIM::OUTLINE_WRITE);
+ }
for (_uint i = 0; i < iNumMeshes; i++)
{
@@ -107,9 +136,130 @@ HRESULT CReparoObject::Render()
}
}
+ if (m_bDrawOutLine) {
+ Render_OutLine();
+ }
+
return S_OK;
}
+_bool CReparoObject::IsRepairable(_bool isAwake)
+{
+ if (isAwake && REPARO_OBJECT_STATE::SLEEP == m_eCurState)
+ {
+ m_eCurState = REPARO_OBJECT_STATE::BEFORE;
+ return false;
+ }
+ LOCKON_INFO info = {};
+ m_pInfoInstance->Get_LockOnInfo(info);
+
+ if (info.pUnit == this && REPARO_OBJECT_STATE::BEFORE == m_eCurState)
+ {
+ m_eCurState = REPARO_OBJECT_STATE::PLAYANIM;
+ return true;
+ }
+
+ return false;
+}
+
+HRESULT CReparoObject::Render_OutLine()
+{
+ m_bDrawOutLine = false;
+ if (FAILED(Bind_ShaderResources())) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevViewMatrix", D3DTS::VIEW))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevProjMatrix", D3DTS::PROJ))) {
+ return E_FAIL;
+ }
+
+ Compute_Depth();
+ _float fCamFar = *m_pGameInstance->Get_CurrentCameraFar();
+ _float fRatio = CMyTools::Saturate((m_fCamDepth / (fCamFar * fCamFar)));
+ m_fOutLineThickness = CMyTools::Lerp_f1D(0.024f, 0.5f, fRatio);
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_vOutLineColor", &m_vOutLineColor, sizeof(_float3)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fOutLineThickness", &m_fOutLineThickness, sizeof(_float)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fOutLineScale", &m_fOutLineScale, sizeof(_float)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fOutLinePower", &m_fOutLinePower, sizeof(_float)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_vCamPosition", m_pGameInstance->Get_CamPosition(), sizeof(_float4)))) {
+ return E_FAIL;
+ }
+ _uint iNumMeshes = m_pModelCom->Get_NumMeshes();
+
+ for (_uint i = 0; i < iNumMeshes; i++)
+ {
+ if (FAILED(m_pShaderCom->Bind_Matrices(
+ "g_OffsetMatrix",
+ m_pModelCom->Get_OffsetMatrix(i).data(),
+ (_int)m_pModelCom->Get_OffsetMatrix(i).size()
+ )))
+ {
+ return E_FAIL;
+ }
+
+
+ if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_ANIM::OUTLINE_READ)))) {
+ return E_FAIL;
+ }
+
+ m_pModelCom->Bind_OutPut_SRV_VS(31, 0);
+ m_pModelCom->Bind_OutPut_SRV_VS_Prev(32, 0);
+
+ if (FAILED(m_pModelCom->Render(i))) {
+ return E_FAIL;
+ }
+ }
+ return S_OK;
+}
+
+void CReparoObject::Change_State()
+{
+ if (m_eCurState != m_ePreState)
+ {
+ switch (m_eCurState)
+ {
+ case Client::CReparoObject::REPARO_OBJECT_STATE::SLEEP:
+ break;
+
+ case Client::CReparoObject::REPARO_OBJECT_STATE::BEFORE:
+ m_pInfoInstance->Regist_PlayerAlly(this);
+ break;
+
+ case Client::CReparoObject::REPARO_OBJECT_STATE::PLAYANIM:
+ m_pModelCom->Set_AnimationIndex(0, false);
+ break;
+
+ case Client::CReparoObject::REPARO_OBJECT_STATE::AFTER:
+ m_pModelCom->Set_AnimationIndex(1);
+ m_pInfoInstance->Deregist_PlayerAlly(this);
+ break;
+
+ case Client::CReparoObject::REPARO_OBJECT_STATE::END:
+ default:
+ break;
+ }
+ m_ePreState = m_eCurState;
+ }
+}
+
HRESULT CReparoObject::Ready_Components()
{
CTransform::TRANSFORM_DESC Desc = {};
@@ -118,21 +268,33 @@ HRESULT CReparoObject::Ready_Components()
Desc.fRotationPerSec = XMConvertToRadians(180.0f);
Desc.fRadius = 10.f;
- __super::Ready_Components(&Desc);
-
- /* Com_Model */
- if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_VFX_SK_OLI_TrollFight_BlockerA_Model"),
- reinterpret_cast(&m_pModelCom)))) {
+ if (FAILED(Add_Component(g_iStaticLevel, &m_pTransformCom, &Desc))) {
return E_FAIL;
}
+ if(0 == m_iModelID)
+ {
+ /* Com_Model */
+ if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_VFX_SK_OLI_TrollFight_BlockerA_Model"),
+ reinterpret_cast(&m_pModelCom)))) {
+ return E_FAIL;
+ }
+ }
+ else
+ {
+ /* Com_Model */
+ if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_VFX_SK_OLI_TrollFight_BlockerB_Model"),
+ reinterpret_cast(&m_pModelCom)))) {
+ return E_FAIL;
+ }
+ }
+
/* Com_Shader */
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_ANIMMESH,
reinterpret_cast(&m_pShaderCom)))) {
return E_FAIL;
}
-
return S_OK;
}
diff --git a/Jusin154_Team3D/Client/Private/Revelio.cpp b/Jusin154_Team3D/Client/Private/Revelio.cpp
index 118d337b9..4863ab2c2 100644
--- a/Jusin154_Team3D/Client/Private/Revelio.cpp
+++ b/Jusin154_Team3D/Client/Private/Revelio.cpp
@@ -18,7 +18,6 @@ CRevelio::CRevelio(const CRevelio& rhs)
HRESULT CRevelio::Initialize_Prototype()
{
-
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Revelio")))
return E_FAIL;
@@ -41,10 +40,12 @@ HRESULT CRevelio::Initialize(void* pArg)
m_pRevelioPT_Y = Get_PartObject("WandPT_Y");
m_pRevelioPT_B = Get_PartObject("WandPT_B");
m_pRevelioPT_R = Get_PartObject("WandPT_R");
+ m_pWand_Light = Get_PartObject("Wand_Light");
SAFE_ADDREF(m_pRevelioPT_Y);
SAFE_ADDREF(m_pRevelioPT_B);
SAFE_ADDREF(m_pRevelioPT_R);
+ SAFE_ADDREF(m_pWand_Light);
m_wstrEffectName = L"Revelio";
@@ -69,7 +70,7 @@ void CRevelio::Update(_float fTimeDelta)
__super::Update(fTimeDelta);
Update_Event(fTimeDelta);
-
+
CPlayer* pPlayer = static_cast(m_pOwner);
if (pPlayer == nullptr)
@@ -82,6 +83,7 @@ void CRevelio::Update(_float fTimeDelta)
m_pRevelioPT_Y->Get_Component()->Set_WorldMatrix(WandWorld);
m_pRevelioPT_R->Get_Component()->Set_WorldMatrix(WandWorld);
m_pRevelioPT_B->Get_Component()->Set_WorldMatrix(WandWorld);
+ m_pWand_Light->Get_Component()->Set_WorldMatrix(WandWorld);
}
@@ -97,10 +99,9 @@ void CRevelio::Late_Update(_float fTimeDelta)
HRESULT CRevelio::Pre_Setting(CGameObject* pObject, void* pArg)
{
- if (FAILED(__super::Pre_Setting(pObject)))
+ if (FAILED(__super::Pre_Setting(pObject, nullptr)))
return E_FAIL;
-
CPlayer* pPlayer = static_cast(m_pOwner);
if (pPlayer == nullptr)
@@ -113,15 +114,43 @@ HRESULT CRevelio::Pre_Setting(CGameObject* pObject, void* pArg)
m_pRevelioPT_Y->Get_Component()->Set_WorldMatrix(WandWorld);
m_pRevelioPT_R->Get_Component()->Set_WorldMatrix(WandWorld);
m_pRevelioPT_B->Get_Component()->Set_WorldMatrix(WandWorld);
+ m_pWand_Light->Get_Component()->Set_WorldMatrix(WandWorld);
m_pRevelioPT_Y->Set_Visible(true);
m_pRevelioPT_R->Set_Visible(true);
m_pRevelioPT_B->Set_Visible(true);
+ m_pWand_Light->Set_Visible(true);
- Get_PartObject("Revelio_Ring")->Get_Component()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
- Get_PartObject("Revelio_Ring")->Set_Visible(true);
+ CEffectParts* pRevelio_ScreenFX = Get_PartObject("Revelio_ScreenFX");
+ CEffectParts* pRevelio_ScreenFX_Reverse = Get_PartObject("Revelio_ScreenFX_Reverse");
+ CEffectParts* pRevelio_Smoke = Get_PartObject("Revelio_Smoke");
+ CEffectParts* pRevelio_Distortion = Get_PartObject("Revelio_Distortion");
+ CEffectParts* pBottom_PT = Get_PartObject("Bottom_PT");
+ pRevelio_ScreenFX->Set_Visible(true);
+ pRevelio_ScreenFX_Reverse->Set_Visible(true);
+ pRevelio_Smoke->Set_Visible(true);
+ pRevelio_Distortion->Set_Visible(true);
+ pBottom_PT->Set_Visible(true);
+
+
+ CCharacter_Controller* pCCT = m_pOwner->Get_Component();
+
+ _vector vFootPos = {};
+ _vector vPos = {};
+
+ if (pCCT != nullptr)
+ {
+ vFootPos = pCCT->Get_FootPosition();
+ vPos = pCCT->Get_Position();
+
+ pRevelio_Smoke->Get_Component()->Set_State(STATE::POSITION, vFootPos);
+ pBottom_PT->Get_Component()->Set_State(STATE::POSITION, vFootPos);
+ pRevelio_Distortion->Get_Component()->Set_State(STATE::POSITION, vPos);
+
+
+ }
return S_OK;
}
@@ -186,7 +215,7 @@ void CRevelio::Free()
SAFE_RELEASE(m_pRevelioPT_Y);
SAFE_RELEASE(m_pRevelioPT_B);
SAFE_RELEASE(m_pRevelioPT_R);
-
+ SAFE_RELEASE(m_pWand_Light);
}
#ifdef _DEBUG
diff --git a/Jusin154_Team3D/Client/Private/Stupefy.cpp b/Jusin154_Team3D/Client/Private/Stupefy.cpp
index 400a2ee64..75a9bf618 100644
--- a/Jusin154_Team3D/Client/Private/Stupefy.cpp
+++ b/Jusin154_Team3D/Client/Private/Stupefy.cpp
@@ -94,9 +94,16 @@ void CStupefy::Late_Update(_float fTimeDelta)
if (false == m_bHit) {
_vector vStartPos = XMLoadFloat4(&m_vStartPos);
_vector vEndPos = XMLoadFloat4(&m_vEndPos);
- ON_COLLISION_INFO CollisionInfo = SweepTarget(vStartPos, vEndPos, 0.002f);
- OnCollision(this, &CollisionInfo);
+ if (false == m_bHit) {
+ _vector vStartPos = XMLoadFloat4(&m_vStartPos);
+ _vector vEndPos = XMLoadFloat4(&m_vEndPos);
+ if (false == XMVector3NearEqual(vEndPos, XMVectorZero(), XMVectorReplicate(FLT_EPSILON5)))
+ {
+ ON_COLLISION_INFO CollisionInfo = SweepTarget(vStartPos, vEndPos, 0.02f);
+ OnCollision(this, &CollisionInfo);
+ }
+ }
}
}
diff --git a/Jusin154_Team3D/Client/Private/ThestralCarriage.cpp b/Jusin154_Team3D/Client/Private/ThestralCarriage.cpp
index 251cb3500..7a595e639 100644
--- a/Jusin154_Team3D/Client/Private/ThestralCarriage.cpp
+++ b/Jusin154_Team3D/Client/Private/ThestralCarriage.cpp
@@ -5,12 +5,12 @@
#include "InfoInstance.h"
CThestralCarriage::CThestralCarriage(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
- : CGameObject(pDevice, pContext)
+ : CUnit(pDevice, pContext)
{
}
CThestralCarriage::CThestralCarriage(const CThestralCarriage& Prototype)
- : CGameObject(Prototype),
+ : CUnit(Prototype),
m_pInfoInstance(CInfoInstance::GetInstance())
{
}
@@ -31,8 +31,23 @@ HRESULT CThestralCarriage::Initialize(void* pArg)
return E_FAIL;
}
- m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(-21.f, -5.759f, -14.f, 1.f));
+#ifdef _DEBUG
+ D3D11_RASTERIZER_DESC RSS_Desc = {};
+ RSS_Desc.FillMode = D3D11_FILL_WIREFRAME;
+ RSS_Desc.CullMode = D3D11_CULL_BACK;
+ RSS_Desc.FrontCounterClockwise = FALSE;
+ RSS_Desc.DepthClipEnable = TRUE;
+ RSS_Desc.AntialiasedLineEnable = TRUE;
+
+ m_pDevice->CreateRasterizerState(&RSS_Desc, &m_pRSS);
+
+
+#endif // _DEBUG
+
+
+ m_iAnimationIndex = 2;
+ m_pModelCom->Set_AnimationIndex(m_iAnimationIndex);
//vector> chain =
//{
// { 0, false },
@@ -42,7 +57,8 @@ HRESULT CThestralCarriage::Initialize(void* pArg)
//for (auto& anim : chain)
// m_pModelCom->Set_ChainAnimation(anim);
- m_pModelCom->Set_AnimationIndex(0);
+ m_iAnimationIndex = 0;
+ m_pModelCom->Set_AnimationIndex(m_iAnimationIndex);
m_pModelCom->IsRootBone(false);
//
//m_pModelCom->Start_ChainAnimation();
@@ -58,38 +74,8 @@ void CThestralCarriage::Priority_Update(_float fTimeDelta)
void CThestralCarriage::Update(_float fTimeDelta)
{
__super::Update(fTimeDelta);
-
- if (m_pGameInstance->Key_Up(DIK_U))
- {
- m_pModelCom->Set_AnimationIndex(1);
- m_pModelCom->IsRootBone(false);
- }
-
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
- //m_pModelCom->Update_ChainAnimation();
-
- _float4 RootMomentum = m_pModelCom->Get_RootBoneMomentum();
- _vector RootDelta = XMLoadFloat4(&RootMomentum);
-
- _vector vRight = m_pTransformCom->Get_State(STATE::RIGHT);
- _vector vUp = m_pTransformCom->Get_State(STATE::UP);
- _vector vLook = m_pTransformCom->Get_State(STATE::LOOK);
-
-
- _float dx = XMVectorGetX(RootDelta);
- _float dy = XMVectorGetY(RootDelta);
- _float dz = XMVectorGetZ(RootDelta);
-
- _vector vWorldDelta =
- vRight * dx +
- vUp * dy +
- vLook * dz;
-
- _vector vPos = m_pTransformCom->Get_State(STATE::POSITION);
- m_pTransformCom->Set_State(STATE::POSITION, vPos + vWorldDelta);
-
-
#ifdef _DEBUG
Describe_Entity();
#endif // _DEBUG
@@ -101,7 +87,7 @@ void CThestralCarriage::Late_Update(_float fTimeDelta)
__super::Late_Update(fTimeDelta);
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
-
+ m_pGameInstance->Add_RenderGroup(RENDER::BLEND, this);
}
HRESULT CThestralCarriage::Render()
@@ -113,37 +99,176 @@ HRESULT CThestralCarriage::Render()
if (FAILED(Bind_ShaderResources())) {
return E_FAIL;
}
+#ifdef _DEBUG
+ ID3D11RasterizerState* pOriginalRSS = { nullptr };
+ if (m_bRender_WireFrame) {
+ m_pContext->RSGetState(&pOriginalRSS);
+ }
+#endif // _DEBUG
+ RENDER ePass = m_pGameInstance->Get_CurrentRenderPass();
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
+ if (RENDER::NONBLEND == ePass) {
+ for (_uint i = 0; i < iNumMeshes; i++)
+ {
+ if (i == ENUM_CLASS(CARRIAGE_MESH_ORDER::WINDOWS)) {
+ continue;
+ }
+ if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
+ return E_FAIL;
+ }
- for (_uint i = 0; i < iNumMeshes; i++)
- {
- if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
+ if (FAILED(m_pShaderCom->Bind_Matrices(
+ "g_OffsetMatrix",
+ m_pModelCom->Get_OffsetMatrix(i).data(),
+ (_int)m_pModelCom->Get_OffsetMatrix(i).size()
+ )))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pModelCom->Begin(i, m_pShaderCom))) {
+ return E_FAIL;
+ }
+#ifdef _DEBUG
+ if (m_bRender_WireFrame) {
+ m_pContext->RSSetState(m_pRSS);
+ }
+#endif // _DEBUG
+ m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
+
+ if (FAILED(m_pModelCom->Render(i))) {
+ return E_FAIL;
+ }
+ }
+ }
+ else if (RENDER::BLEND == ePass) {
+ if (FAILED(m_pModelCom->Bind_Material(1, m_pShaderCom))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_Matrices(
"g_OffsetMatrix",
- m_pModelCom->Get_OffsetMatrix(i).data(),
- (_int)m_pModelCom->Get_OffsetMatrix(i).size()
+ m_pModelCom->Get_OffsetMatrix(1).data(),
+ (_int)m_pModelCom->Get_OffsetMatrix(1).size()
)))
{
return E_FAIL;
}
- if (FAILED(m_pModelCom->Begin(i, m_pShaderCom))) {
+ if (FAILED(m_pModelCom->Begin(1, m_pShaderCom))) {
return E_FAIL;
}
-
+#ifdef _DEBUG
+ if (m_bRender_WireFrame) {
+ m_pContext->RSSetState(m_pRSS);
+ }
+#endif // _DEBUG
m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
- if (FAILED(m_pModelCom->Render(i))) {
+ if (FAILED(m_pModelCom->Render(1))) {
return E_FAIL;
}
}
+#ifdef _DEBUG
+ if (m_bRender_WireFrame) {
+ m_pContext->RSSetState(pOriginalRSS);
+ SAFE_RELEASE(pOriginalRSS);
+ }
+#endif // _DEBUG
+
return S_OK;
}
+void CThestralCarriage::Trigger(CTimeSocket& Socket)
+{
+ SOCKETCONTENTS* pContents = &Socket.m_Contents;
+ switch (pContents->eTypeFunc)
+ {
+ case TIMESOCKET_FUNC::TELEPORTATION:
+ {
+ m_pTransformCom->Set_WorldMatrix(pContents->pxTransform);
+ } break;
+ case TIMESOCKET_FUNC::TRANSLATION:
+ {
+ m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3((_float3*)&pContents->pxTransform.p), 1.f));
+ } break;
+ case TIMESOCKET_FUNC::TRANSLATION_LERP:
+ {
+
+ } break;
+ case TIMESOCKET_FUNC::SET_ANIMSTATE:
+ {
+
+ } break;
+ case TIMESOCKET_FUNC::SET_FSMSTATE:
+ {
+ // if (pContents->vFlags.b[0]) {
+ // m_iAnimationIndex = 0;
+ // m_pModelCom->Set_AnimationIndex(m_iAnimationIndex);
+ // m_pModelCom->IsRootBone(false);
+ // }
+ // else if (pContents->vFlags.b[1]) {
+ // m_iAnimationIndex = 1;
+ // m_pModelCom->Set_AnimationIndex(m_iAnimationIndex);
+ // m_pModelCom->IsRootBone(false);
+ // }
+ // else if (pContents->vFlags.b[2]) {
+ // m_iAnimationIndex = 2;
+ // m_pModelCom->Set_AnimationIndex(m_iAnimationIndex);
+ // m_pModelCom->IsRootBone(false);
+ // }
+ } break;
+ case TIMESOCKET_FUNC::BIND_SOCKET_MATRIX:
+ {
+
+ } break;
+ case TIMESOCKET_FUNC::UNBIND_SOCKET_MATRIX:
+ {
+
+ } break;
+ default:
+ break;
+ }
+}
+
+_vector CThestralCarriage::Get_WorldPostion()
+{
+ return (XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("seatSocket_front_left")) * m_pTransformCom->Get_XMWorldMatrix()).r[3];
+}
+
+_matrix CThestralCarriage::Get_SeatMatrix()
+{
+ return XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("seatSocket_front_left")) * m_pTransformCom->Get_XMWorldMatrix();
+}
+
+_matrix CThestralCarriage::Get_SocketWorldMatrix(CARRIAGE_SOCKET eSocket)
+{
+ switch (eSocket)
+ {
+ case CThestralCarriage::CARRIAGE_SOCKET::BACK:
+ return XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("backSeat")) * m_pTransformCom->Get_XMWorldMatrix();
+ break;
+ case CThestralCarriage::CARRIAGE_SOCKET::BACK_LEFT:
+ return XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("seatSocket_back_left")) * m_pTransformCom->Get_XMWorldMatrix();
+ break;
+ case CThestralCarriage::CARRIAGE_SOCKET::BACK_RIGHT:
+ return XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("seatSocket_back_right")) * m_pTransformCom->Get_XMWorldMatrix();
+ break;
+ case CThestralCarriage::CARRIAGE_SOCKET::FRONT:
+ return XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("frontSeat")) * m_pTransformCom->Get_XMWorldMatrix();
+ break;
+ case CThestralCarriage::CARRIAGE_SOCKET::FRONT_LEFT:
+ return XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("seatSocket_front_left")) * m_pTransformCom->Get_XMWorldMatrix();
+ break;
+ case CThestralCarriage::CARRIAGE_SOCKET::FRONT_RIGHT:
+ return XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("seatSocket_front_right")) * m_pTransformCom->Get_XMWorldMatrix();
+ break;
+ default:
+ return XMMatrixIdentity();
+ break;
+ }
+}
+
HRESULT CThestralCarriage::Ready_Components()
{
CTransform::TRANSFORM_DESC Desc = {};
@@ -192,7 +317,6 @@ HRESULT CThestralCarriage::Bind_ShaderResources()
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) {
return E_FAIL;
}
-
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
return E_FAIL;
}
@@ -230,6 +354,9 @@ void CThestralCarriage::Free()
{
__super::Free();
+#ifdef _DEBUG
+ SAFE_RELEASE(m_pRSS);
+#endif // _DEBUG
SAFE_RELEASE(m_pModelCom);
SAFE_RELEASE(m_pShaderCom);
}
@@ -239,6 +366,8 @@ void CThestralCarriage::Describe_Entity()
{
GUI::Begin("UNIT", 0, IMGUI_GLOBAL_BEGIN_FLAG);
if (GUI::CollapsingHeader("Carriage")) {
+ m_pTransformCom->Describe_Entity();
+ m_pShaderCom->Describe_Entity();
string AnimList = m_pModelCom->Get_AnimList(m_pModelCom->Get_AnimIndex());
GUI::Text(AnimList.c_str());
GUI::Text("AnimIndex %d", m_pModelCom->Get_AnimIndex());
@@ -251,6 +380,7 @@ void CThestralCarriage::Describe_Entity()
float Pos3[3] = { Pos.x, Pos.y, Pos.z };
GUI::DragFloat3("Pos", Pos3);
+ GUI::Checkbox("WireFrame", &m_bRender_WireFrame);
_float RotR, RotU, RotL;
RotR = XMVectorGetX(m_pTransformCom->Get_State(STATE::RIGHT));
@@ -264,6 +394,7 @@ void CThestralCarriage::Describe_Entity()
{
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(m_pGameInstance->Get_CamPosition()->x, m_pGameInstance->Get_CamPosition()->y, m_pGameInstance->Get_CamPosition()->z, 1.f));
}
+ m_pModelCom->Describe_Entity();
}
GUI::End();
}
diff --git a/Jusin154_Team3D/Client/Private/Transformation.cpp b/Jusin154_Team3D/Client/Private/Transformation.cpp
index 5f91c5a19..38e694493 100644
--- a/Jusin154_Team3D/Client/Private/Transformation.cpp
+++ b/Jusin154_Team3D/Client/Private/Transformation.cpp
@@ -44,7 +44,10 @@ HRESULT CTransformation::Initialize(void* pArg)
m_wstrEffectName = L"Transformation";
m_pTransformation_PJ = Get_PartObject("Transformation_PJ");
+ m_pTransformation_PJ_PT = Get_PartObject("Transformation_PJ_PT");
+
SAFE_ADDREF(m_pTransformation_PJ);
+ SAFE_ADDREF(m_pTransformation_PJ_PT);
m_fDuration = 3.5f;
@@ -70,7 +73,7 @@ void CTransformation::Update(_float fTimeDelta)
CTransform* pPJTransform = m_pTransformation_PJ->Get_Component();
pPJTransform->Translation(XMLoadFloat3(&m_vCameraLook) * m_fLinearSpeed);
-
+ m_pTransformation_PJ_PT->Get_Component()->Translation(XMLoadFloat3(&m_vCameraLook) * m_fLinearSpeed);
}
@@ -89,9 +92,16 @@ void CTransformation::Late_Update(_float fTimeDelta)
if (false == m_bHit) {
_vector vStartPos = XMLoadFloat4(&m_vStartPos);
_vector vEndPos = XMLoadFloat4(&m_vEndPos);
- ON_COLLISION_INFO CollisionInfo = SweepTarget(vStartPos, vEndPos, 0.002f);
- OnCollision(this, &CollisionInfo);
+ if (false == m_bHit) {
+ _vector vStartPos = XMLoadFloat4(&m_vStartPos);
+ _vector vEndPos = XMLoadFloat4(&m_vEndPos);
+ if (false == XMVector3NearEqual(vEndPos, XMVectorZero(), XMVectorReplicate(FLT_EPSILON5)))
+ {
+ ON_COLLISION_INFO CollisionInfo = SweepTarget(vStartPos, vEndPos, 0.02f);
+ OnCollision(this, &CollisionInfo);
+ }
+ }
}
}
@@ -108,6 +118,7 @@ HRESULT CTransformation::Pre_Setting(CGameObject* pObject, void* pArg)
m_pTransformation_PJ->Get_Effect_Info()->isDissolve = false;
m_pTransformation_PJ->Set_Visible(true);
+ m_pTransformation_PJ_PT->Set_Visible(true);
CEffectParts* pWand_Distortion = Get_PartObject("Wand_Distortion");
CEffectParts* pWand_Light = Get_PartObject("Wand_Light");
@@ -120,6 +131,7 @@ HRESULT CTransformation::Pre_Setting(CGameObject* pObject, void* pArg)
pWand_Distortion->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
pWand_Light->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
pWand_PT->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
+ m_pTransformation_PJ_PT->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
_vector vDirection = m_pOwner->Get_Component()->Get_State(STATE::LOOK);
XMStoreFloat3(&m_vCameraLook, vDirection);
@@ -257,6 +269,7 @@ void CTransformation::OnCollision(CGameObject* pOther, void* pDesc)
pHit_Light->Get_Component()->Set_State(STATE::POSITION, vHitPos);
pHit_PT->Get_Component()->Set_State(STATE::POSITION, vHitPos);
+ m_pGameInstance->BillBoard(pHit_PT->Get_Component());
pHit_Light->Set_Visible(true);
pHit_PT->Set_Visible(true);
@@ -282,7 +295,7 @@ void CTransformation::Free()
__super::Free();
Safe_Release(m_pTransformation_PJ);
-
+ Safe_Release(m_pTransformation_PJ_PT);
}
#ifdef _DEBUG
void CTransformation::Describe_Entity()
diff --git a/Jusin154_Team3D/Client/Private/TransformationSide.cpp b/Jusin154_Team3D/Client/Private/TransformationSide.cpp
index abd658bd0..b4d6210ac 100644
--- a/Jusin154_Team3D/Client/Private/TransformationSide.cpp
+++ b/Jusin154_Team3D/Client/Private/TransformationSide.cpp
@@ -43,6 +43,7 @@ HRESULT CTransformationSide::Initialize(void* pArg)
//m_pWandParticle = Get_PartObject("Wand_PT");
+
m_pWandLight = Get_PartObject("Wand_Light_B");
m_pWandTrail = Get_PartObject();
@@ -52,18 +53,9 @@ HRESULT CTransformationSide::Initialize(void* pArg)
m_fDuration = 2.f;
- m_Events.emplace(0.6f, [&]() {
+ m_Events.emplace(0.8f, [&]() {
m_isParticleEnd = true;
- //m_pWandParticle->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f, -500.f, 0.f, 1.f));
-
- CWand* pWand = static_cast(m_pOwner);
-
- if (pWand == nullptr)
- return;
-
- m_isTrailEnd = true;
-
- XMStoreFloat4x4(&m_TrailStopMat, pWand->Get_WorldMatrix());
+ m_pWandTrail->SetDissolve(true);
});
return S_OK;
@@ -99,7 +91,7 @@ void CTransformationSide::Update(_float fTimeDelta)
// 트레일이 종료되면 위치를 고정함
_matrix TrailMat = m_isTrailEnd ? XMLoadFloat4x4(&m_TrailStopMat) : pWand->Get_WorldMatrix();
- m_pWandTrail->Trail_Update(TrailMat, fTimeDelta);
+ m_pWandTrail->Oneside_Rope_Trail_Update(TrailMat, fTimeDelta);
}
diff --git a/Jusin154_Team3D/Client/Private/TriggerBox.cpp b/Jusin154_Team3D/Client/Private/TriggerBox.cpp
index 265b815b9..eb45ffbf4 100644
--- a/Jusin154_Team3D/Client/Private/TriggerBox.cpp
+++ b/Jusin154_Team3D/Client/Private/TriggerBox.cpp
@@ -1,86 +1,160 @@
#include "pch.h"
#include "TriggerBox.h"
+#include "Layer.h"
+#include "Player.h"
-CTriggerBox::CTriggerBox():
- m_pGameInstance(CGameInstance::GetInstance())
+CTriggerBox::CTriggerBox(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CGameObject(pDevice, pContext)
+{
+}
+
+CTriggerBox::CTriggerBox(const CTriggerBox& rhs)
+ : CGameObject(rhs)
{
- SAFE_ADDREF(m_pGameInstance);
}
HRESULT CTriggerBox::TryScanArea(_float fTimeDelta)
{
+#ifdef _DEBUG
+ if (false == m_bRender) {
+ m_bRender = true;
+ m_pGameInstance->Add_RenderGroup(RENDER::NONLIGHT, this);
+ }
+#endif // _DEBUG
m_vScanTimer.x += fTimeDelta;
if (m_vScanTimer.x > m_vScanTimer.y) {
- m_vScanTimer.x = m_vScanTimer.y;
+ m_vScanTimer.x = 0.f;
return Scan();
}
return E_FAIL;
}
+HRESULT CTriggerBox::Render()
+{
+#ifdef _DEBUG
+ m_Batch->Begin();
+
+ _matrix ViewMatrix = m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW);
+ _matrix ProjMatrix = m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ);
+ _vector vColor = CMyTools::ColorRGB_A_HEXtoVECTOR(0xff0f0f, CMyTools::Saturate(m_vScanTimer.x / m_vScanTimer.y + 0.1f));
+ m_pSubShape->Draw(m_pTransformCom->Get_XMWorldMatrix(), ViewMatrix, ProjMatrix, vColor, nullptr, true);
+
+ m_Batch->End();
+ m_bRender = false;
+#endif // _DEBUG
+
+ return S_OK;
+}
+
HRESULT CTriggerBox::Initialize(TRIGGERBOX_DESC* pDesc)
{
- m_fRadius = pDesc->vPosition_Radius.w;
- m_vPosition = { pDesc->vPosition_Radius.x, pDesc->vPosition_Radius.y, pDesc->vPosition_Radius.z, 1.f };
+ CTransform::TRANSFORM_DESC Desc{};
+ Desc.fRadius = pDesc->vPosition_Radius.w;
+ Desc.fRotationPerSec = 0;
+ Desc.fSpeedPerSec = 0;
+ if (FAILED(__super::Ready_Components(&Desc))) {
+ return E_FAIL;
+ }
+ m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat4(&pDesc->vPosition_Radius), 1.f));
+
+ m_pSubShape = (GeometricPrimitive::CreateSphere(m_pContext, m_pTransformCom->Get_Radius() * 2.f, 12, false, false));
+ m_Batch = make_unique>(m_pContext);
+
+ m_vScanTimer.y += m_pGameInstance->Real_Random_Float(0.f, 0.2f);
+
return S_OK;
}
HRESULT CTriggerBox::Scan()
{
- PSX::PxSweepBuffer pxBuffer = {};
- _bool bHit = m_pGameInstance->SphereCast(m_fRadius, XMLoadFloat4(&m_vPosition), XMVectorSet(0.f, 1.f, 0.f, 0.f), 0.1f,
- PSX::PxHitFlag::ePOSITION, PSX::PxQueryFlag::eDYNAMIC, pxBuffer);
+ _float fRadius = m_pTransformCom->Get_Radius();
+
+ PSX::PxSweepHit hitBuffer[32];
+ PSX::PxSweepBuffer pxBuffer(hitBuffer, 32);
+ _bool bHit = m_pGameInstance->SphereCast(fRadius, m_pTransformCom->Get_State(STATE::POSITION), XMVectorSet(0.f, 1.f, 0.f, 0.f), 0.1f,
+ PSX::PxHitFlag::eDEFAULT, PSX::PxQueryFlag::eDYNAMIC, pxBuffer);
const PSX::PxSweepHit & hit = pxBuffer.block;
PSX::PxRigidActor* pActor = hit.actor;
+ _uint iHitCount = pxBuffer.getNbAnyHits();
+ HRESULT hr = E_FAIL;
if (bHit) {
- if (nullptr != pActor && nullptr != pActor->userData)
- {
- PHYSX_USERDATA* pUserData = static_cast(pActor->userData);
- switch (pUserData->eKind)
- {
- case PHYSX_KIND::BODY_DYNAMIC:
- {
- switch (PXOBJECT(pUserData->iSubKind))
- {
- case PXOBJECT::PLAYER:
- {
- return S_OK;
- }break;
- default:
- break;
- }
- }break;
- case PHYSX_KIND::CCTActor:
- {
- switch (PXOBJECT(pUserData->iSubKind))
- {
- case PXOBJECT::PLAYER: {
- return S_OK;
- } break;
- default:
+ hr = CheckPlayerHit(pActor);
+ if (FAILED(hr)) {
+ for (_uint i = 0; i < iHitCount; ++i) {
+ PSX::PxSweepHit* pHit = &pxBuffer.touches[i];
+ hr = CheckPlayerHit(pHit->actor);
+ if (SUCCEEDED(hr)) {
break;
}
+ }
+ }
+ }
+ return hr;
+}
+
+HRESULT CTriggerBox::CheckPlayerHit(PSX::PxActor* pActor)
+{
+ if (nullptr != pActor && nullptr != pActor->userData)
+ {
+ PHYSX_USERDATA* pUserData = static_cast(pActor->userData);
+ switch (pUserData->eKind)
+ {
+ case PHYSX_KIND::BODY_DYNAMIC:
+ {
+ switch (PXOBJECT(pUserData->iSubKind))
+ {
+ case PXOBJECT::PLAYER:
+ {
+ return S_OK;
+ }break;
+ default:
+ break;
+ }
+ }break;
+ case PHYSX_KIND::CCTActor:
+ {
+ switch (PXOBJECT(pUserData->iSubKind))
+ {
+ case PXOBJECT::PLAYER: {
+ return S_OK;
} break;
default:
break;
}
+ } break;
+ default:
+ break;
}
}
- return E_FAIL;
+ return E_FAIL;
}
-CTriggerBox* CTriggerBox::Create(TRIGGERBOX_DESC* Desc)
+CTriggerBox* CTriggerBox::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, TRIGGERBOX_DESC* Desc)
{
- CTriggerBox* pInstance = new CTriggerBox();
-
- if (FAILED(pInstance->Initialize(Desc))) {
- SAFE_RELEASE(pInstance);
- }
- return pInstance;
+ CTriggerBox* pInstance = new CTriggerBox(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize(Desc))) {
+ SAFE_RELEASE(pInstance);
+ }
+ return pInstance;
}
void CTriggerBox::Free()
{
__super::Free();
- SAFE_RELEASE(m_pGameInstance);
+}
+
+HRESULT CTriggerBox::Bind_ShaderResources()
+{
+ return E_NOTIMPL;
+}
+
+CGameObject* CTriggerBox::Clone(void* pArg, CGameObject* pOwner)
+{
+ return nullptr;
+}
+
+void CTriggerBox::Describe_Entity()
+{
}
diff --git a/Jusin154_Team3D/Client/Private/Troll.cpp b/Jusin154_Team3D/Client/Private/Troll.cpp
index e74b0e6d4..6ac12d93a 100644
--- a/Jusin154_Team3D/Client/Private/Troll.cpp
+++ b/Jusin154_Team3D/Client/Private/Troll.cpp
@@ -581,6 +581,14 @@ HRESULT CTroll::Ready_Parts()
m_pLeft_Smoke->FollowParents(m_pModelCom->Get_BoneMatrixPtr("LeftArm"));
+ if (FAILED(Add_PartObject("Troll_Dead_Smoke", g_iStaticLevel, &m_pDead_Smoke, &PartsDesc)))
+ {
+ return E_FAIL;
+ }
+ m_pDead_Smoke->Load("../Bin/Resources/Data/Effect/Troll/TrollDead/TrollDead", static_cast(g_iStaticLevel));
+
+
+
if (FAILED(Add_PartObject("Left_Trail", g_iStaticLevel, &m_pLeftTrail, &PartsDesc))) {
return E_FAIL;
}
@@ -691,12 +699,15 @@ void CTroll::Free()
SAFE_RELEASE(m_pLeftTrail);
SAFE_RELEASE(m_pRightTrail);
SAFE_RELEASE(m_pWeaponTrail);
+ SAFE_RELEASE(m_pRushEffect);
+ SAFE_RELEASE(m_pDead_Smoke);
}
#ifdef _DEBUG
void CTroll::Describe_Entity()
{
GUI::Begin("UNIT", 0, IMGUI_GLOBAL_BEGIN_FLAG);
+
if (GUI::CollapsingHeader("Troll")) {
__super::Describe_Entity();
@@ -714,8 +725,6 @@ void CTroll::Describe_Entity()
}
}
-
-
m_pTransformCom->Describe_Entity();
}
GUI::End();
diff --git a/Jusin154_Team3D/Client/Private/TrollSwing.cpp b/Jusin154_Team3D/Client/Private/TrollSwing.cpp
index 1be9ce040..120c708b7 100644
--- a/Jusin154_Team3D/Client/Private/TrollSwing.cpp
+++ b/Jusin154_Team3D/Client/Private/TrollSwing.cpp
@@ -83,19 +83,29 @@ HRESULT CTrollSwing::Pre_Setting(CGameObject* pObject, void* pArg)
if (FAILED(__super::Pre_Setting(pObject, nullptr)))
return E_FAIL;
+
_vector vPos = m_pOwner->Get_Component()->Get_State(STATE::POSITION);
- vPos += m_pOwner->Get_Component()->Get_State(STATE::LOOK) * 2.f;
+ vPos += m_pOwner->Get_Component()->Get_State(STATE::LOOK) * 4.f;
CEffectParts* pRockPT = Get_PartObject("Rock_PT_25");
+ CEffectParts* pRock_PT_Brown = Get_PartObject("Rock_PT_Brown");
+ CEffectParts* pRock_PT_Large = Get_PartObject("Rock_PT_Large");
+ CEffectParts* pCrack_Decal = Get_PartObject("Crack_Decal");
CEffectParts* pSmoke = Get_PartObject("Smoke");
pRockPT->Get_Component()->Set_State(STATE::POSITION, vPos + XMVectorSet(0.f, 0.5f, 0.f, 0.f));
- pSmoke->Get_Component()->Set_State(STATE::POSITION, vPos + XMVectorSet(0.f, 0.2f, 0.f, 0.f));
+ pRock_PT_Large->Get_Component()->Set_State(STATE::POSITION, vPos + XMVectorSet(0.f, 0.5f, 0.f, 0.f));
+ pSmoke->Get_Component()->Set_State(STATE::POSITION, vPos + XMVectorSet(0.f, 1.5f, 0.f, 0.f));
+ pCrack_Decal->Get_Component()->Set_State(STATE::POSITION, vPos + XMVectorSet(0.f, 0.2f, 0.f, 0.f));
pRockPT->Set_Visible(true);
+ pRock_PT_Large->Set_Visible(true);
+
pSmoke->Set_Visible(true);
+ //pRock_PT_Brown->Set_Visible(true);
+ pCrack_Decal->Set_Visible(true);
CPlayer* pPlayer = static_cast(m_pInfoInstance->Get_NearestPlayerAlly(m_pOwner->Get_WorldPostion()).first);
@@ -155,25 +165,6 @@ CGameObject* CTrollSwing::Clone(void* pArg, CGameObject* pOwner)
void CTrollSwing::OnCollision(CGameObject* pOther, void* pDesc)
{
- _int iIndex = CollisionCheck();
-
- if (iIndex < 0)
- return;
-
- if (m_isCollisionEnter == true)
- return;
-
- m_isCollisionEnter = true;
-
- _vector vPos = XMVectorSet(m_Hitbuffer.touches[iIndex].position.x, m_Hitbuffer.touches[iIndex].position.y, m_Hitbuffer.touches[iIndex].position.z, 1.f);
-
-
- for (auto& pPair : m_PartObjects)
- {
- pPair.second->Set_Visible(true);
- pPair.second->Get_Component()->Set_State(STATE::POSITION, vPos);
- }
-
}
diff --git a/Jusin154_Team3D/Client/Private/Troll_Rock.cpp b/Jusin154_Team3D/Client/Private/Troll_Rock.cpp
index d226aee9d..1521ee601 100644
--- a/Jusin154_Team3D/Client/Private/Troll_Rock.cpp
+++ b/Jusin154_Team3D/Client/Private/Troll_Rock.cpp
@@ -3,6 +3,8 @@
#include "GameInstance.h"
#include "Troll.h"
+#include "EffectPool.h"
+#include "Layer.h"
CTroll_Rock::CTroll_Rock(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CPartObject(pDevice, pContext)
@@ -33,11 +35,17 @@ HRESULT CTroll_Rock::Initialize(void* pArg)
return E_FAIL;
}
+
+ m_pEffectPool = m_pGameInstance->Get_Layer(NEXT_LEVEL, TEXT("Layer_EffectPool"))->Get_Object();
+ SAFE_ADDREF(m_pEffectPool);
+
+
return S_OK;
}
void CTroll_Rock::Priority_Update(_float fTimeDelta)
{
+
XMStoreFloat4(&m_vStartPos, m_pTransformCom->Get_State(STATE::POSITION));
m_pModelCom->Combined_BoneMatrix();
if (m_bAttach)
@@ -152,6 +160,9 @@ void CTroll_Rock::RockHit()
break;
}
m_bVisible = false;
+
+
+ m_pEffectPool->Use_Skill(SKILL_TYPE::TROLL_NOMAL_SMOKE, m_pOwner , &tagCollInfo.vWorldPos);
pUserData->pOwner->OnCollision(this, &tagCollInfo);
}
break;
@@ -287,7 +298,7 @@ void CTroll_Rock::Free()
SAFE_RELEASE(m_pShaderCom);
SAFE_RELEASE(m_pModelCom);
-
+ SAFE_RELEASE(m_pEffectPool);
}
#ifdef _DEBUG
diff --git a/Jusin154_Team3D/Client/Private/Troll_Rush.cpp b/Jusin154_Team3D/Client/Private/Troll_Rush.cpp
new file mode 100644
index 000000000..737399d17
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/Troll_Rush.cpp
@@ -0,0 +1,190 @@
+#include "pch.h"
+#include "Troll_Rush.h"
+
+#include "GameInstance.h"
+#include "EffectParts.h"
+#include "Wand.h"
+#include "Player.h"
+
+CTroll_Rush::CTroll_Rush(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CEffect_Container{ pDevice, pContext }
+{
+}
+
+CTroll_Rush::CTroll_Rush(const CTroll_Rush& rhs)
+ : CEffect_Container(rhs)
+{
+}
+
+HRESULT CTroll_Rush::Initialize_Prototype()
+{
+ if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/TrollRushBlur")))
+ return E_FAIL;
+
+
+ return S_OK;
+
+}
+
+HRESULT CTroll_Rush::Initialize(void* pArg)
+{
+ if (FAILED(__super::Initialize(pArg)))
+ return E_FAIL;
+
+ if (FAILED(Ready_Components(pArg)))
+ return E_FAIL;
+
+
+
+ if (FAILED(Create_Effect()))
+ return E_FAIL;
+
+
+ m_wstrEffectName = L"TrollRushBlur";
+
+
+ m_pRush_Blur = Get_PartObject("Rush_Blur");
+
+ SAFE_ADDREF(m_pRush_Blur);
+
+ m_fDuration = 2.5f;
+
+ return S_OK;
+}
+
+void CTroll_Rush::Priority_Update(_float fTimeDelta)
+{
+ __super::Priority_Update(fTimeDelta);
+
+}
+
+void CTroll_Rush::Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Update(fTimeDelta);
+
+ Update_Event(fTimeDelta);
+
+ CCharacter_Controller* pCCT = m_pOwner->Get_Component();
+
+ _vector vPos = pCCT->Get_Position();
+
+ vPos += m_pOwner->Get_Component()->Get_State(STATE::LOOK) * 2.f;
+
+ m_pRush_Blur->Set_Visible(true);
+
+ _vector vRight = XMVector3Normalize(m_pOwner->Get_Component()->Get_State(STATE::LOOK));
+ _vector vLook = XMVector3Normalize(XMVector3Cross(vRight , XMVectorSet(0.f, 1.f, 0.f, 0.f)));
+ _vector vUp = XMVector3Normalize(XMVector3Cross(vLook ,vRight));
+
+ _matrix PJ_WorldMat = { vRight , vUp ,vLook , vPos };
+
+ m_pRush_Blur->Get_Component()->Set_WorldMatrix(PJ_WorldMat);
+
+}
+
+void CTroll_Rush::Late_Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Late_Update(fTimeDelta);
+
+
+}
+
+HRESULT CTroll_Rush::Pre_Setting(CGameObject* pObject, void* pArg)
+{
+ if (FAILED(__super::Pre_Setting(pObject, nullptr)))
+ return E_FAIL;
+
+ m_pRush_Blur->Get_Component()->Set_Loop(true);
+
+ CCharacter_Controller* pCCT = m_pOwner->Get_Component();
+
+ _vector vPos = pCCT->Get_Position();
+
+ vPos += m_pOwner->Get_Component()->Get_State(STATE::LOOK);
+
+
+ m_pRush_Blur->Set_Visible(true);
+
+ _vector vRight = XMVector3Normalize( m_pOwner->Get_Component