diff --git a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl
index 5465e90a7..fec7287d9 100644
--- a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl
+++ b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl
@@ -4,6 +4,8 @@
matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix;
Texture2D g_DepthTexture;
+float4 g_CamaraPosition;
+
int g_iImageCountX;
int g_iImageCountY;
@@ -56,11 +58,16 @@ 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_iStep1 = 0;
+int g_iStep2 = 0;
+int g_iStep3 = 0;
+
struct VS_IN
{
float3 vPosition : POSITION;
@@ -1483,6 +1490,158 @@ PS_OUT PS_Boss_HpBer(PS_IN In)
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;
+
+ float3 CamaeraPos = float3(g_CamaraPosition.x, 1.f, g_CamaraPosition.z);
+ float3 UIPos = float3(g_WorldMatrix._41, g_WorldMatrix._42, g_WorldMatrix._43);
+
+ float3 CameraDir = normalize(CamaeraPos - UIPos);
+
+ float angle = atan2(CameraDir.x, CameraDir.z);
+ float cosA = cos(angle);
+ float sinA = sin(angle);
+
+
+ float3 rotation = float3(0.f, 0.f, 0.f);
+
+ rotation.x = In.vPosition.x * cosA - In.vPosition.z * sinA;
+ rotation.y = In.vPosition.y;
+ rotation.z = In.vPosition.x * sinA + In.vPosition.z * cosA;
+
+ float3 worldPos = rotation + UIPos;
+
+ matrix matWVP = mul(g_ViewMatrix, g_ProjMatrix);
+ float4 clipPos = mul(float4(worldPos, 1.0f), matWVP);
+
+ Out.vPosition = clipPos;
+ Out.vTexcoord = In.vTexcoord;
+
+ return Out;
+}
+
+
+PS_OUT PS_Enemy_Detection(PS_IN In)
+{
+ PS_OUT Out;
+
+ 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;
+}
+
technique11 PosTexTechnique11
{
pass Default
@@ -1793,4 +1952,14 @@ technique11 PosTexTechnique11
PixelShader = compile ps_5_0 PS_Boss_HpBer();
}
+ pass PS_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();
+ GeometryShader = NULL;
+ PixelShader = compile ps_5_0 PS_Enemy_Detection();
+ }
+
}
diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj
index 5324d0bfb..429af2e83 100644
--- a/Jusin154_Team3D/Client/Default/Client.vcxproj
+++ b/Jusin154_Team3D/Client/Default/Client.vcxproj
@@ -170,6 +170,7 @@ call Update_Resources.bat
+
@@ -189,8 +190,15 @@ call Update_Resources.bat
+
+
+
+
+
+
+
@@ -336,6 +344,7 @@ call Update_Resources.bat
+
@@ -356,9 +365,16 @@ call Update_Resources.bat
+
+
+
+
+
+
+
diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
index 630cdf7ce..7437ad89f 100644
--- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
+++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
@@ -497,6 +497,18 @@
04.Mechanic\Damage
+
+ 02.GameObjects\Effect\MonsterEffect\Goblin_Mage\Mage_Down_Attack
+
+
+ 02.GameObjects\Effect\MonsterEffect\Goblin_Mage\MageSide
+
+
+ 02.GameObjects\Effect\MonsterEffect\Goblin_Mage\Mage_Nomal_Attack
+
+
+ 02.GameObjects\Effect\State_Effect\Stun
+
04.Mechanic\State\Broom_Player\State_Broom_Ride_Move
@@ -512,6 +524,18 @@
02.GameObjects\UI\GamePlay_Canvas\Enemy_Penel\Boss_HpBar
+
+ 04.Mechanic\State\Broom_Player\State_Broom_Hover
+
+
+ 04.Mechanic\State\Broom_Player\State_Broom_Fly
+
+
+ 02.GameObjects\Cameras\MiniMap_Camera
+
+
+ 02.GameObjects\UI\Enemy_Detection
+
@@ -1056,6 +1080,24 @@
{36962dce-8c99-4c54-9189-2a49785a211e}
+
+ {13977e62-6b05-41de-9919-20a06cd336e5}
+
+
+ {bb1ae3a9-b8e7-49bf-83b4-811b627d0818}
+
+
+ {743a4a75-9482-4c8e-9c55-cab0daffffe9}
+
+
+ {920aabfe-6033-4a5c-b562-35b20bd2e0a6}
+
+
+ {5af878d0-07f2-4626-95bb-fd86abc64914}
+
+
+ {c9370e36-317e-45e7-a8c7-98a623864824}
+
{48b905c1-b91e-44ca-a61b-86633826768b}
@@ -1077,6 +1119,18 @@
{b49a3671-96d0-47b8-833f-28190d549b0f}
+
+ {24f6903f-8f6b-46ff-a387-ecb44d673887}
+
+
+ {f24321bb-6750-4baa-b19a-bf5a3c2a8909}
+
+
+ {dbf4ff12-e5eb-439a-aa02-e5a424453b08}
+
+
+ {34a4beb9-ccb9-4847-ae45-af4e7dc25d94}
+
@@ -1518,6 +1572,18 @@
04.Mechanic\Damage
+
+ 02.GameObjects\Effect\MonsterEffect\Goblin_Mage\Mage_Down_Attack
+
+
+ 02.GameObjects\Effect\MonsterEffect\Goblin_Mage\MageSide
+
+
+ 02.GameObjects\Effect\MonsterEffect\Goblin_Mage\Mage_Nomal_Attack
+
+
+ 02.GameObjects\Effect\State_Effect\Stun
+
04.Mechanic\State\Broom_Player\State_Broom_Ride_Move
@@ -1533,6 +1599,18 @@
02.GameObjects\UI\GamePlay_Canvas\Enemy_Penel\Boss_HpBar
+
+ 04.Mechanic\State\Broom_Player\State_Broom_Hover
+
+
+ 04.Mechanic\State\Broom_Player\State_Broom_Fly
+
+
+ 02.GameObjects\Cameras\MiniMap_Camera
+
+
+ 02.GameObjects\UI\Enemy_Detection
+
diff --git a/Jusin154_Team3D/Client/Private/Broom.cpp b/Jusin154_Team3D/Client/Private/Broom.cpp
index 202b43f12..2ac342ac1 100644
--- a/Jusin154_Team3D/Client/Private/Broom.cpp
+++ b/Jusin154_Team3D/Client/Private/Broom.cpp
@@ -57,6 +57,14 @@ void CBroom::Update(_float fTimeDelta)
{
Update_CameraCoordinateSystem();
+ if (!m_bRide)
+ {
+ m_bHoverToggle = true;
+ m_fSpeed = 0.f;
+
+ m_pFSM->Change_State(FSMSTATE::IDLE);
+ }
+
m_pFSM->Update_State(fTimeDelta);
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
diff --git a/Jusin154_Team3D/Client/Private/Broom_States.cpp b/Jusin154_Team3D/Client/Private/Broom_States.cpp
index 107dd43e1..ebb0a07e6 100644
--- a/Jusin154_Team3D/Client/Private/Broom_States.cpp
+++ b/Jusin154_Team3D/Client/Private/Broom_States.cpp
@@ -18,7 +18,6 @@ HRESULT CBroom::InputAction()
m_pGameInstance->Key_Pressing(DIK_SPACE)
|| m_pGameInstance->Key_Pressing(DIK_LCONTROL)
|| m_pGameInstance->Key_Pressing(DIK_E)
- || m_pGameInstance->Key_Pressing(DIK_R)
|| m_pGameInstance->Key_Pressing(DIK_Q)
|| m_pGameInstance->Key_Down(DIK_LSHIFT)
|| m_pGameInstance->Key_Pressing(DIK_C)
@@ -26,6 +25,7 @@ HRESULT CBroom::InputAction()
|| m_pGameInstance->Key_Pressing(DIK_Z)
|| m_pGameInstance->Key_Pressing(DIK_G)
|| m_pGameInstance->Key_Pressing(DIK_B)
+ || m_pGameInstance->Key_Pressing(DIK_N)
)
{
return S_OK;
@@ -138,14 +138,6 @@ HRESULT CBroom::Behavior_MoveExitCheck(_float fTimeDelta)
pair<_uint, _bool> pairAnimInfo = {};
_uint iCurrentAnimIndex = m_pModelCom->Get_AnimIndex();
- if (!m_bRide)
- {
- m_bHoverToggle = true;
-
- m_pFSM->Change_State(FSMSTATE::IDLE);
- return E_FAIL;
- }
-
if (SUCCEEDED(InputMove()) || SUCCEEDED(InputAction()))
{
if (m_pGameInstance->Key_Pressing(DIK_W))
@@ -168,6 +160,10 @@ HRESULT CBroom::Behavior_MoveExitCheck(_float fTimeDelta)
{
m_pFSM->Change_State(FSMSTATE::HOVER);
}
+ else if (m_pGameInstance->Key_Pressing(DIK_N))
+ {
+ m_pFSM->Change_State(FSMSTATE::HOVER);
+ }
else if (m_pGameInstance->Key_Down(DIK_LSHIFT))
{
m_bHoverToggle = false;
@@ -197,7 +193,7 @@ HRESULT CBroom::Behavior_Broom_HoverExitCheck(_float fTimeDelta)
_bool bFwd = m_pGameInstance->Key_Pressing(DIK_W);
_bool bLft = m_pGameInstance->Key_Pressing(DIK_A);
_bool bRht = m_pGameInstance->Key_Pressing(DIK_D);
- _bool bDown = m_pGameInstance->Key_Pressing(DIK_LCONTROL);
+ _bool bDown = m_pGameInstance->Key_Pressing(DIK_LCONTROL) || m_pGameInstance->Key_Pressing(DIK_N);
_bool bUp = m_pGameInstance->Key_Pressing(DIK_SPACE);
if (m_bHoverToggle)
@@ -354,7 +350,7 @@ HRESULT CBroom::Behavior_Broom_FlyExitCheck(_float fTimeDelta)
_bool bFwd = m_pGameInstance->Key_Pressing(DIK_W);
_bool bLft = m_pGameInstance->Key_Pressing(DIK_A);
_bool bRht = m_pGameInstance->Key_Pressing(DIK_D);
- _bool bDown = m_pGameInstance->Key_Pressing(DIK_LCONTROL);
+ _bool bDown = m_pGameInstance->Key_Pressing(DIK_LCONTROL) || m_pGameInstance->Key_Pressing(DIK_N);
_bool bUp = m_pGameInstance->Key_Pressing(DIK_SPACE);
_bool bShift = m_pGameInstance->Key_Down(DIK_LSHIFT);
@@ -413,24 +409,24 @@ HRESULT CBroom::Behavior_Broom_FlyExitCheck(_float fTimeDelta)
_bool bHasInput = !(vInput.x == 0 && vInput.y == 0 && vInput.z == 0);
_vector vDir = XMVector3Normalize(XMLoadFloat3(&vInput));
- if (vInput.z >= 0.f)
- {
- Camera_InterpTurn(fTimeDelta * 0.2f);
- }
-
-
if (vInput.x < 0.f)
{
- if (vInput.z < 0.f)
+ if (vInput.z <= 0.f)
{
- Camera_InterpTurn(fTimeDelta * 0.3f);
+ Camera_InterpTurn(fTimeDelta * 0.4f);
+ }
+ else {
+ Camera_InterpTurn(fTimeDelta * 0.2f);
}
}
else if (vInput.x > 0.f)
{
- if (vInput.z < 0.f)
+ if (vInput.z <= 0.f)
{
- Camera_InterpTurn(fTimeDelta * 0.3f);
+ Camera_InterpTurn(fTimeDelta * 0.4f);
+ }
+ else {
+ Camera_InterpTurn(fTimeDelta * 0.2f);
}
}
@@ -530,9 +526,6 @@ void CBroom::Camera_InterpTurn(_float fTimeDelta)
{
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
- //if (iCurrAnimIndex != m_Animation[STATEANIM::BROOM_FLY_B].first)
- // return;
-
_vector xmvCurLook = XMVector4Normalize(
XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f));
_float2 vCurLook = { XMVectorGetX(xmvCurLook),XMVectorGetZ(xmvCurLook) };
@@ -658,7 +651,7 @@ void CBroom::Set_Anim()
m_Animation[STATEANIM::BROOM_FLY_DOWN_B] = { 13,true };
m_Animation[STATEANIM::BROOM_FLY_LEFT_B] = { 15,true };
m_Animation[STATEANIM::BROOM_FLY_RIGHT_B] = { 16,true };
- m_Animation[STATEANIM::BROOM_FLY_UP_B] = { 17,true };
+ m_Animation[STATEANIM::BROOM_FLY_UP_B] = { 17,true };
//Mount 29
//호버 스탑 6
//호버 제자리 24
diff --git a/Jusin154_Team3D/Client/Private/Decendo.cpp b/Jusin154_Team3D/Client/Private/Decendo.cpp
index ee6f95b01..449a67bd5 100644
--- a/Jusin154_Team3D/Client/Private/Decendo.cpp
+++ b/Jusin154_Team3D/Client/Private/Decendo.cpp
@@ -251,6 +251,7 @@ void CDecendo::OnCollision(CGameObject* pOther, void* pDesc)
if (m_bHit == false)
return;
+ dynamic_cast(m_pOwner->Get_Owner())->Set_SpellHit(true);
ON_COLLISION_INFO CollisionDesc = *static_cast(pDesc);
diff --git a/Jusin154_Team3D/Client/Private/EffectPool.cpp b/Jusin154_Team3D/Client/Private/EffectPool.cpp
index 9247652a3..47fb11e1d 100644
--- a/Jusin154_Team3D/Client/Private/EffectPool.cpp
+++ b/Jusin154_Team3D/Client/Private/EffectPool.cpp
@@ -24,6 +24,10 @@
#include "TrollSwing.h"
#include "Goblin_Protego.h"
#include "Goblin_Attack.h"
+#include "Mage_Down_Attack.h"
+#include "Mage_Nomal_Attack.h"
+#include "MageSide.h"
+#include "StunEffect.h"
CEffectPool::CEffectPool(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CGameObject(pDevice, pContext)
@@ -315,6 +319,51 @@ HRESULT CEffectPool::Ready_MonsterEffect()
return pEffect; }
))) return E_FAIL;
+
+ if (FAILED(Create_Effect(SKILL_TYPE::GOBLIN_MAGE_ATTACK, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
+
+ CMage_Nomal_Attack* pEffect = nullptr;
+
+ pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr);
+
+ return pEffect; }
+
+ ))) return E_FAIL;
+
+ if (FAILED(Create_Effect(SKILL_TYPE::GOBLIN_MAGE_DOWN, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
+
+ CMage_Down_Attack* pEffect = nullptr;
+
+ pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr);
+
+ return pEffect; }
+
+
+ ))) return E_FAIL;
+
+ if (FAILED(Create_Effect(SKILL_TYPE::GOBLIN_MAGE_SIDE, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
+
+ CMageSide* pEffect = nullptr;
+
+ pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr);
+
+ return pEffect; }
+
+ ))) return E_FAIL;
+
+
+ if (FAILED(Create_Effect(SKILL_TYPE::STUN, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
+
+ CStunEffect* 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 a8881cd0c..46c6cdf10 100644
--- a/Jusin154_Team3D/Client/Private/Effect_Container.cpp
+++ b/Jusin154_Team3D/Client/Private/Effect_Container.cpp
@@ -463,6 +463,107 @@ ON_COLLISION_INFO CEffect_Container::SweepTarget(_vector StartPos, _vector EndPo
return tagCollInfo;
}
+ON_COLLISION_INFO CEffect_Container::MonsterSweepTarget(_vector StartPos, _vector EndPos, _float fRadius, _bool isTerrainCollision)
+{
+ _vector vStartPos = StartPos;
+ _vector vEndPos = EndPos;
+ _vector vDir = { vEndPos - vStartPos };
+
+ _float fDistance = XMVectorGetX(XMVector3Length(vEndPos - vStartPos));
+
+ PSX::PxSweepBuffer pxBuffer = {};
+
+ _bool bHit = m_pGameInstance->SphereCast(fRadius, vStartPos, vDir, fDistance, PSX::PxHitFlag::ePOSITION | PSX::PxHitFlag::eNORMAL, PSX::PxQueryFlag::eDYNAMIC, pxBuffer);
+
+ const PSX::PxSweepHit& hit = pxBuffer.block;
+ PSX::PxRigidActor* pActor = hit.actor;
+ PSX::PxShape* pShape = hit.shape;
+ ON_COLLISION_INFO tagCollInfo = {};
+
+ tagCollInfo.vWorldPos.w = 1.f;
+
+ if (bHit) {
+
+ memcpy_s(&tagCollInfo.vWorldPos, sizeof(tagCollInfo.vWorldPos), &hit.position, sizeof(hit.position));
+
+ memcpy_s(&tagCollInfo.vWorldNomal, sizeof(tagCollInfo.vWorldNomal), &hit.normal, sizeof(hit.normal));
+ XMStoreFloat4(&tagCollInfo.vHitDir, vDir);
+ tagCollInfo.fLength = fDistance;
+
+
+ if (nullptr != pActor && nullptr != pActor->userData)
+ {
+ PhsXUserData* pUserData = static_cast(pActor->userData);
+ tagCollInfo.pObject = pUserData->pOwner;
+
+ switch (pUserData->eKind)
+ {
+ case PHYSX_KIND::CCTActor:
+ {
+ switch (PXOBJECT(pUserData->iSubKind))
+ {
+
+ case PXOBJECT::PLAYER:
+ {
+ pUserData->pOwner->OnCollision(this, &tagCollInfo);
+ m_bHit = true;
+ }
+ break;
+ }
+ }
+ }
+ }
+
+
+ }
+
+ if (isTerrainCollision == true && bHit == false)
+ {
+ memcpy_s(&tagCollInfo.vWorldPos, sizeof(tagCollInfo.vWorldPos), &hit.position, sizeof(hit.position));
+ memcpy_s(&tagCollInfo.vWorldNomal, sizeof(tagCollInfo.vWorldNomal), &hit.normal, sizeof(hit.normal));
+ XMStoreFloat4(&tagCollInfo.vHitDir, vDir);
+ tagCollInfo.fLength = fDistance;
+ tagCollInfo.pObject = m_pOwner->Get_Owner();
+
+ bHit = m_pGameInstance->SphereCast(fRadius, vStartPos, vDir, fDistance, PSX::PxHitFlag::ePOSITION | PSX::PxHitFlag::eNORMAL, PSX::PxQueryFlag::eSTATIC, pxBuffer);
+
+ const PSX::PxSweepHit& hit = pxBuffer.block;
+ PSX::PxRigidActor* pActor = hit.actor;
+ PSX::PxShape* pShape = hit.shape;
+
+ tagCollInfo.vWorldPos.w = 1.f;
+
+ if (bHit)
+ {
+ memcpy_s(&tagCollInfo.vWorldPos, sizeof(tagCollInfo.vWorldPos), &hit.position, sizeof(hit.position));
+ memcpy_s(&tagCollInfo.vWorldNomal, sizeof(tagCollInfo.vWorldNomal), &hit.normal, sizeof(hit.normal));
+ XMStoreFloat4(&tagCollInfo.vHitDir, vDir);
+ tagCollInfo.fLength = fDistance;
+
+ if (nullptr != pActor && nullptr != pActor->userData)
+ {
+ PhsXUserData* pUserData = static_cast(pActor->userData);
+ tagCollInfo.pObject = pUserData->pOwner;
+
+ switch (PXOBJECT(pUserData->iSubKind))
+ {
+ case PXOBJECT::TERRAIN:
+ {
+
+ m_bHit = true;
+ break;
+ }
+ }
+
+ }
+ }
+
+
+ }
+
+ return tagCollInfo;
+}
+
void CEffect_Container::Update_Event(_float fTimeDelta)
{
diff --git a/Jusin154_Team3D/Client/Private/Enemy_Detection.cpp b/Jusin154_Team3D/Client/Private/Enemy_Detection.cpp
new file mode 100644
index 000000000..09c59bcfb
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/Enemy_Detection.cpp
@@ -0,0 +1,342 @@
+#include "pch.h"
+#include "Enemy_Detection.h"
+#include "GameInstance.h"
+#include "Monster.h"
+
+CEnemy_Detection::CEnemy_Detection(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CPartObject(pDevice, pContext)
+{
+}
+
+CEnemy_Detection::CEnemy_Detection(const CEnemy_Detection& Prototype)
+ : CPartObject(Prototype)
+{
+}
+
+HRESULT CEnemy_Detection::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CEnemy_Detection::Initialize(void* pArg)
+{
+ ENEMY_DETECTION_DESC* pDesc = static_cast (pArg);
+ m_pSocketMatrices = pDesc->pSocketMatrices;
+
+ if (FAILED(__super::Initialize(pArg))) {
+ return E_FAIL;
+ }
+
+
+ if (FAILED(Ready_Components())) {
+ return E_FAIL;
+ }
+
+ m_fOrigin_Size = _float3(150.f, 150.f, 1.f);
+ m_fSize.x = m_fOrigin_Size.x;
+ m_fSize.y = m_fOrigin_Size.y;
+ m_pTransformCom->Set_Scale(m_fOrigin_Size);
+
+ m_fAlpha = 1.f;
+ m_bStep1 = true;
+ m_vImageposi = _float4(37.5f, 37.5f, 75.f, 75.f);
+
+ return S_OK;
+}
+
+void CEnemy_Detection::Priority_Update(_float fTimeDelta)
+{
+
+ XMFLOAT4X4 Head = *static_cast(m_pOwner)->Get_HeadMatrix();
+
+ XMVECTOR HeadPos = XMVectorSet(static_cast(m_pOwner)->Get_WorldPostion().m128_f32[0], static_cast(m_pOwner)->Get_WorldPostion().m128_f32[1], static_cast(m_pOwner)->Get_WorldPostion().m128_f32[2], 1.f);
+
+ m_vPosition = HeadPos;
+ m_pTransformCom->Set_State(STATE::POSITION, m_vPosition);
+}
+
+void CEnemy_Detection::Update(_float fTimeDelta)
+{
+ if (m_fActive == true)
+ {
+ m_fTime += fTimeDelta;
+
+ if (m_fTime >= 2.f)
+ {
+ if (m_bStep1 == true)
+ {
+ m_bStep1 = false;
+ m_bStep2 = true;
+ m_bStep3 = false;
+ m_fTime = 0.f;
+ }
+ else if (m_bStep2 == true)
+ {
+ m_bStep1 = false;
+ m_bStep2 = false;
+ m_bStep3 = true;
+ m_fTime = 0.f;
+ }
+ else if (m_bStep3 == true)
+ {
+ m_bStep1 = false;
+ m_bStep2 = false;
+ m_bStep3 = true;
+ m_fAlpha -= fTimeDelta;
+ }
+ }
+ }
+ else if (m_fActive == false)
+ {
+ m_fTime = 0.f;
+ m_bStep1 = true;
+ m_bStep2 = false;
+ m_bStep3 = false;
+ m_fSizeUp = false;
+ m_fAlpha = 1.f;
+ SizeUpX(m_fOrigin_Size.x);
+ SizeUpY(m_fOrigin_Size.y);
+ m_vImageposi.z = 75.f;
+ m_vImageposi.w = 75.f;
+ }
+
+ if (m_bStep3 == true)
+ {
+ if (m_fSizeUp == false)
+ {
+ SizeUpX(m_fSize.x + 10.f);
+ SizeUpY(m_fSize.y + 10.f);
+ m_vImageposi.z += 10.f;
+ m_vImageposi.w += 10.f;
+ m_fSizeUp = true;
+ }
+ }
+
+ if (m_fSize.x != m_fOrigin_Size.x)
+ {
+ SizeUpdate(-fTimeDelta * 10.f);
+ m_vImageposi.z -= fTimeDelta;
+ m_vImageposi.w -= fTimeDelta;
+ }
+
+ if (m_fAlpha <= 0.f)
+ m_fAlpha = 0.f;
+
+ _float3 Size = _float3(100.f,100.f, 1.f);
+ m_pTransformCom->Set_Scale(Size);
+}
+
+void CEnemy_Detection::Late_Update(_float fTimeDelta)
+{
+ m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
+}
+
+HRESULT CEnemy_Detection::Render()
+{
+ if (FAILED(Bind_ShaderResources())) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ENEMY_DETECTION)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Bind_Resources())) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Render())) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CEnemy_Detection::Render_Disolve()
+{
+ return S_OK;
+}
+
+void CEnemy_Detection::SizeUpX(_float fX)
+{
+ m_fSize.x = fX;
+}
+
+void CEnemy_Detection::SizeUpY(_float fY)
+{
+ m_fSize.y = fY;
+}
+
+void CEnemy_Detection::SizeUpdate(_float fSizeX)
+{
+ m_fSize.x += fSizeX;
+ m_fSize.y += fSizeX;
+ m_vImageposi.z += fSizeX;
+ m_vImageposi.w += fSizeX;
+ if (m_fSize.x - m_fOrigin_Size.x <= fSizeX)
+ {
+ m_fSize.x = m_fOrigin_Size.x;
+ m_fSize.y = m_fOrigin_Size.y;
+ m_vImageposi.z = 75.f;
+ m_vImageposi.w = 75.f;
+ }
+}
+
+HRESULT CEnemy_Detection::Ready_Components()
+{
+ __super::Ready_Components(nullptr);
+
+ if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_HUD_Ring_Aggroed_Burst"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_HUD_NPC_WhiteFrameBlip"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_HUD_NPC_Alert"), reinterpret_cast(&m_pDiffuse_TextureCom2), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_HUD_Ring_Alert_Fill"), reinterpret_cast(&m_pDiffuse_TextureCom3), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_HUD_Ring_Alert_Yellow"), reinterpret_cast(&m_pDiffuse_TextureCom4), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_HUD_Ring_Aggro_Blip"), reinterpret_cast(&m_pDiffuse_TextureCom5), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
+ {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CEnemy_Detection::Bind_ShaderResources()
+{
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_CamaraPosition", m_pGameInstance->Get_CamPosition(), sizeof(_float4))))
+ {
+ 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_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom1->Bind_ShaderResource(m_pShaderCom, "g_Texture1", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom2->Bind_ShaderResource(m_pShaderCom, "g_Texture2", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom3->Bind_ShaderResource(m_pShaderCom, "g_Texture3", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom4->Bind_ShaderResource(m_pShaderCom, "g_Texture4", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom5->Bind_ShaderResource(m_pShaderCom, "g_Texture5", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_iStep1", &m_bStep1, sizeof(_bool))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_iStep2", &m_bStep2, sizeof(_bool))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_iStep3", &m_bStep3, sizeof(_bool))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageSipos1", &m_vImageposi, sizeof(_float4))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_fSize, sizeof(_float2))))
+ {
+ return E_FAIL;
+ }
+ return S_OK;
+ return S_OK;
+}
+
+CEnemy_Detection* CEnemy_Detection::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CEnemy_Detection* pInstance = new CEnemy_Detection(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CEnemy_Detection");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CEnemy_Detection::Clone(void* pArg, CGameObject* pOwner)
+{
+ CEnemy_Detection* pInstance = new CEnemy_Detection(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CEnemy_Detection");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CEnemy_Detection::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pShaderCom);
+ SAFE_RELEASE(m_pDiffuse_TextureCom);
+ SAFE_RELEASE(m_pDiffuse_TextureCom1);
+ SAFE_RELEASE(m_pDiffuse_TextureCom2);
+ SAFE_RELEASE(m_pDiffuse_TextureCom3);
+ SAFE_RELEASE(m_pDiffuse_TextureCom4);
+ SAFE_RELEASE(m_pDiffuse_TextureCom5);
+ SAFE_RELEASE(m_pVIBufferCom);
+
+}
+
+#ifdef _DEBUG
+void CEnemy_Detection::Describe_Entity()
+{
+}
+#endif // _DEBUG
diff --git a/Jusin154_Team3D/Client/Private/Enemy_HpBar.cpp b/Jusin154_Team3D/Client/Private/Enemy_HpBar.cpp
index b830165c1..d58a517fc 100644
--- a/Jusin154_Team3D/Client/Private/Enemy_HpBar.cpp
+++ b/Jusin154_Team3D/Client/Private/Enemy_HpBar.cpp
@@ -44,9 +44,9 @@ HRESULT CEnemy_HpBar::Initialize(void* pArg)
m_fAlpha = 0.f;
m_fAlphaTime = 10.f;
m_vNine_Slice = _float4(15.f, 100.f, 5.f, 15.f);
- m_fMaxHp = 0.f;
- m_fCurrentHp = 0.f;
- m_fTargetHp = 0.f;
+ m_fMaxHp = -1.f;
+ m_fCurrentHp = -1.f;
+ m_fTargetHp = -1.f;
SizeUpX(360.f);
m_fMoveSpeed = 5.f;
m_bAnimation = false;
diff --git a/Jusin154_Team3D/Client/Private/Enemy_Panel.cpp b/Jusin154_Team3D/Client/Private/Enemy_Panel.cpp
index f04ecc88b..35147ac54 100644
--- a/Jusin154_Team3D/Client/Private/Enemy_Panel.cpp
+++ b/Jusin154_Team3D/Client/Private/Enemy_Panel.cpp
@@ -65,7 +65,7 @@ void CEnemy_Panel::Update_Target()
if (m_pInfoInstance->Get_TargetMonster()->Get_Stat()->Get_Stat().bBoss == true)
{
static_cast(m_pBoss_HpBar)->Update_Target();
- static_cast(m_pEnemy_Info)->Set_FadeOut();
+ static_cast(m_pEnemy_HpBar)->Set_FadeOut();
static_cast(m_pEnemy_Info)->Update_Target();
static_cast(m_pEnemy_Info)->Set_Font_Move(true);
}
diff --git a/Jusin154_Team3D/Client/Private/Goblin.cpp b/Jusin154_Team3D/Client/Private/Goblin.cpp
index d68058979..5a5395478 100644
--- a/Jusin154_Team3D/Client/Private/Goblin.cpp
+++ b/Jusin154_Team3D/Client/Private/Goblin.cpp
@@ -50,26 +50,26 @@ HRESULT CGoblin::Initialize(void* pArg)
Add_FSM();
-Set_Anim();
+ Set_Anim();
-{
- CFSM::FSM_DESC FSMDesc{};
- FSMDesc.pStates = &m_States;
- FSMDesc.pStateMask = &m_iStateMask;
+ {
+ CFSM::FSM_DESC FSMDesc{};
+ FSMDesc.pStates = &m_States;
+ FSMDesc.pStateMask = &m_iStateMask;
- m_pFSM->Bind_States(FSMDesc);
- m_pFSM->Change_State(FSMSTATE::IDLE);
-}
+ m_pFSM->Bind_States(FSMDesc);
+ m_pFSM->Change_State(FSMSTATE::IDLE);
+ }
-m_pCallBack_Behavior->Initialize(m_pCharacter_Controller, m_pRigidBody);
-m_pCallBack_HitReport->Initialize(m_pCharacter_Controller, m_pRigidBody);
+ m_pCallBack_Behavior->Initialize(m_pCharacter_Controller, m_pRigidBody);
+ m_pCallBack_HitReport->Initialize(m_pCharacter_Controller, m_pRigidBody);
-m_pCharacter_Controller->Set_Position(XMVectorSet(-40.f, 5.f, -20.f, 1.f));
+ m_pCharacter_Controller->Set_Position(XMVectorSet(-40.f, 5.f, -20.f, 1.f));
-m_pEffectPool = m_pGameInstance->Get_Layer(NEXT_LEVEL, TEXT("Layer_EffectPool"))->Get_Object();
-SAFE_ADDREF(m_pEffectPool);
+ m_pEffectPool = m_pGameInstance->Get_Layer(NEXT_LEVEL, TEXT("Layer_EffectPool"))->Get_Object();
+ SAFE_ADDREF(m_pEffectPool);
-return S_OK;
+ return S_OK;
}
void CGoblin::Priority_Update(_float fTimeDelta)
@@ -185,7 +185,7 @@ HRESULT CGoblin::Render()
return E_FAIL;
}
}
- else if (true == m_pRigidBody->IsActive()){
+ else if (true == m_pRigidBody->IsActive()) {
if (FAILED(m_pRigidBody->Render())) {
return E_FAIL;
}
@@ -280,7 +280,7 @@ void CGoblin::OnCollision(CGameObject* pOther, void* pDesc)
}
}
- break;
+ break;
case ENUM_CLASS(SKILL_TYPE::LEVIOSO):
m_eHitSpell = STATEANIM::HIT_LEVIOSO;
break;
@@ -288,7 +288,7 @@ void CGoblin::OnCollision(CGameObject* pOther, void* pDesc)
m_eHitSpell = STATEANIM::KNOCKDOWN_FWD;
break;
}
- if (!m_pFSM->IsEnable(FSMSTATE::BLINK)){
+ if (!m_pFSM->IsEnable(FSMSTATE::BLINK)) {
m_pFSM->Change_State(FSMSTATE::HIT);
}
@@ -312,7 +312,7 @@ HRESULT CGoblin::Ready_Components()
/* Com_Model */
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_strModelPrototypeTag,
- reinterpret_cast(&m_pModelCom)))){
+ reinterpret_cast(&m_pModelCom)))) {
return E_FAIL;
}
@@ -370,7 +370,7 @@ HRESULT CGoblin::Ready_Parts()
Goblin_SpectorDesc.pParentTransform = m_pTransformCom;
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER, &Goblin_SpectorDesc,this, &m_pGoblinSpector))) {
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER, &Goblin_SpectorDesc, this, &m_pGoblinSpector))) {
return E_FAIL;
}
@@ -381,7 +381,7 @@ HRESULT CGoblin::Ready_Parts()
PartsDesc.pParentTransform = m_pTransformCom;
- if (FAILED(Add_PartObject("Goblin_Particle",g_iStaticLevel, &m_pGoblin_Particle, &PartsDesc)))
+ if (FAILED(Add_PartObject("Goblin_Particle", g_iStaticLevel, &m_pGoblin_Particle, &PartsDesc)))
{
return E_FAIL;
}
@@ -411,6 +411,10 @@ HRESULT CGoblin::Ready_Parts()
#pragma endregion
+ if (FAILED(Add_PartObject("Enemy_Detection", g_iStaticLevel, &m_pDetection, &PartsDesc)))
+ {
+ return E_FAIL;
+ }
return S_OK;
}
@@ -448,7 +452,7 @@ CGoblin* CGoblin::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
CGameObject* CGoblin::Clone(void* pArg, CGameObject* pOwner)
{
CGoblin* pInstance = new CGoblin(*this);
-
+
if (FAILED(pInstance->Initialize(pArg)))
{
MSG_BOX("Failed to Cloned : CGoblin");
@@ -473,6 +477,7 @@ void CGoblin::Free()
SAFE_RELEASE(m_pSmoke);
SAFE_RELEASE(m_pGoblin_Particle);
SAFE_RELEASE(m_pGoblin_Particle2);
+ SAFE_RELEASE(m_pDetection);
SAFE_RELEASE(m_pEffectPool);
Safe_Delete(m_pCallBack_Behavior);
Safe_Delete(m_pCallBack_HitReport);
diff --git a/Jusin154_Team3D/Client/Private/Goblin_Mage.cpp b/Jusin154_Team3D/Client/Private/Goblin_Mage.cpp
index 3a3d07a0c..f5a1177a7 100644
--- a/Jusin154_Team3D/Client/Private/Goblin_Mage.cpp
+++ b/Jusin154_Team3D/Client/Private/Goblin_Mage.cpp
@@ -66,6 +66,7 @@ HRESULT CGoblin_Mage::Initialize(void* pArg)
m_pCharacter_Controller->Set_Position(XMVectorSet(-50.f, 5.f, -10.f, 1.f));
+
return S_OK;
}
@@ -178,16 +179,16 @@ HRESULT CGoblin_Mage::Render()
}
#ifdef _DEBUG
- if (true == m_pCharacter_Controller->IsActive()) {
- if (FAILED(m_pCharacter_Controller->Render())) {
- return E_FAIL;
- }
- }
- else if (true == m_pRigidBody->IsActive()) {
- if (FAILED(m_pRigidBody->Render())) {
- return E_FAIL;
- }
- }
+ //if (true == m_pCharacter_Controller->IsActive()) {
+ // if (FAILED(m_pCharacter_Controller->Render())) {
+ // return E_FAIL;
+ // }
+ //}
+ //else if (true == m_pRigidBody->IsActive()) {
+ // if (FAILED(m_pRigidBody->Render())) {
+ // return E_FAIL;
+ // }
+ //}
#endif
diff --git a/Jusin154_Team3D/Client/Private/Goblin_Mage_States.cpp b/Jusin154_Team3D/Client/Private/Goblin_Mage_States.cpp
index b2bfd8eba..a3f0d0f2e 100644
--- a/Jusin154_Team3D/Client/Private/Goblin_Mage_States.cpp
+++ b/Jusin154_Team3D/Client/Private/Goblin_Mage_States.cpp
@@ -181,6 +181,15 @@ void CGoblin_Mage::Behavior_SpellEnter()
pairAnimInfo = m_Animation[STATEANIM::SPELL_CHARGE];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, false, 1.3f);
m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::SPELL)] = m_fMaxSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::SPELL)];
+
+ Add_Event(pairAnimInfo.first, [this]() {
+
+ m_pEffectPool->Use_Skill(SKILL_TYPE::GOBLIN_MAGE_SIDE, this);
+
+ }, 0.1f);
+
+
+
}
HRESULT CGoblin_Mage::Behavior_SpellExitCheck(_float fTimeDelta)
@@ -193,6 +202,12 @@ HRESULT CGoblin_Mage::Behavior_SpellExitCheck(_float fTimeDelta)
{
pairAnimInfo = m_Animation[STATEANIM::SPELL];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, false, 1.3f);
+
+ Add_Event(pairAnimInfo.first, [this]() {
+
+ m_pEffectPool->Use_Skill(SKILL_TYPE::GOBLIN_MAGE_DOWN, this);
+
+ }, 0.1f);
}
return S_OK;
}
@@ -219,6 +234,20 @@ void CGoblin_Mage::Behavior_LightAttackEnter()
pairAnimInfo = m_Animation[STATEANIM::LIGHT_ATTACK];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::LIGHTATTACK)] = m_fMaxSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::LIGHTATTACK)];
+
+
+
+ Add_Event(pairAnimInfo.first, [this]() {
+
+ m_pEffectPool->Use_Skill(SKILL_TYPE::GOBLIN_MAGE_SIDE, this);
+
+ }, 0.1f);
+
+ Add_Event(pairAnimInfo.first, [this]() {
+
+ m_pEffectPool->Use_Skill(SKILL_TYPE::GOBLIN_MAGE_ATTACK, this);
+
+ }, 0.4f);
}
HRESULT CGoblin_Mage::Behavior_LightAttackExitCheck(_float fTimeDelta)
diff --git a/Jusin154_Team3D/Client/Private/HpBarBG.cpp b/Jusin154_Team3D/Client/Private/HpBarBG.cpp
index 81c4232a8..ff79636ab 100644
--- a/Jusin154_Team3D/Client/Private/HpBarBG.cpp
+++ b/Jusin154_Team3D/Client/Private/HpBarBG.cpp
@@ -1,6 +1,7 @@
#include "pch.h"
#include "HpBarBG.h"
#include "GameInstance.h"
+#include "InfoInstance.h"
CHpBarBG::CHpBarBG(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CElementObject(pDevice, pContext)
@@ -8,7 +9,8 @@ CHpBarBG::CHpBarBG(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
}
CHpBarBG::CHpBarBG(const CHpBarBG& rhs)
- :CElementObject(rhs)
+ :CElementObject(rhs),
+ m_pInfoInstance(CInfoInstance::GetInstance())
{
}
@@ -41,13 +43,14 @@ HRESULT CHpBarBG::Initialize(void* pArg)
m_fAlpha = 1.f;
m_fAlphaTime = 1.f;
m_vNine_Slice = _float4(27.f, 125.f, m_fSizeY * 0.5f, m_fSizeY * 0.5f);
- m_fMaxHp = 1000.f;
+ m_fMaxHp = 0.f;
m_fCurrentHp = m_fMaxHp;
m_fMoveSpeed = 5.f;
m_fHpBGSize = _float2(144.f, 24.f);
m_fHpBGPos = _float2(0.f, 13.f);
m_fHpBG = _float2(0, m_fSizeX);
SizeUpX(240.f);
+ //m_pInfoInstance->Add_Event(TEXT("PlayerHit"), [this](void* p) {this->Set_Damage(*reinterpret_cast<_float*>(p)); });
return S_OK;
}
@@ -91,11 +94,18 @@ void CHpBarBG::Update(_float fTimeDelta)
}
}
+ if (m_fMaxHp != m_pInfoInstance->Get_PlayerStatPtr()->Get_Stat().fMaxHp)
+ {
+ m_fMaxHp = m_pInfoInstance->Get_PlayerStatPtr()->Get_Stat().fMaxHp;
+ m_fCurrentHp = m_fMaxHp;
+ }
+
if (m_fCurrentHp < 0.f)
m_fCurrentHp = 0.f;
if (m_fDamage <= 0.f)
m_fDamage = 0.f;
- m_fTargetHp = m_fMaxHp - m_fDamage;
+ m_fTargetHp = m_pInfoInstance->Get_PlayerStatPtr()->Get_Stat().fCurrentHp;
+
if (m_fTargetHp > m_fCurrentHp)
Heal(fTimeDelta);
@@ -103,15 +113,6 @@ void CHpBarBG::Update(_float fTimeDelta)
Hit(fTimeDelta);
m_fHpBar = m_fCurrentHp / m_fMaxHp;
- if (m_pGameInstance->Key_Down(DIK_3))
- {
- Lerp_PosX(100.f);
- }
-
- if (m_pGameInstance->Key_Down(DIK_4))
- {
- Lerp_PosX(-101.f);
- }
if (m_fHpBar <= 0.3f)
{
m_fBlinkTime += fTimeDelta * m_fTimeMult;
@@ -125,6 +126,7 @@ void CHpBarBG::Update(_float fTimeDelta)
m_fBlinkTime = 0.f;
m_fTime = 0.f;
}
+
__super::Update(fTimeDelta);
}
@@ -184,6 +186,11 @@ void CHpBarBG::SizeUpX(_float fSizeX)
m_fX -= (fSizeX - m_vScale.x) * 0.5f;
}
+void CHpBarBG::Set_Damage(_float fDamage)
+{
+ m_fDamage += fDamage;
+}
+
HRESULT CHpBarBG::Bind_ShaderResources()
{
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
diff --git a/Jusin154_Team3D/Client/Private/InfoInstance.cpp b/Jusin154_Team3D/Client/Private/InfoInstance.cpp
index fbb039561..c62d49a82 100644
--- a/Jusin154_Team3D/Client/Private/InfoInstance.cpp
+++ b/Jusin154_Team3D/Client/Private/InfoInstance.cpp
@@ -34,6 +34,11 @@ void CInfoInstance::Change_Level()
m_pInteractiveInfo->Change_Level();
}
+CStat* CInfoInstance::Get_PlayerStatPtr()
+{
+ return m_pPlayerInfo->Get_PlayerStatPtr();
+}
+
void CInfoInstance::Update_CameraCoordinateSystem(_float3& vLook, _float3& vRight)
{
m_pPlayerInfo->Update_CameraCoordinateSystem(vLook, vRight);
@@ -56,6 +61,14 @@ void CInfoInstance::Set_Damage(_float fDamage)
m_pSkillInfo->Update_Damage(fDamage);
}
+CPlater* CInfoInstance::Get_PlayerInfo()
+{
+ //return m_pPlayerInfo->Get_CameraCoordinateSystem();
+ return nullptr;
+}
+
+
+
#pragma region MONSTER_INFO
HRESULT CInfoInstance::Regist_PlayerAlly(CUnit* pUnit)
{
@@ -273,9 +286,17 @@ HRESULT CInfoInstance::Initialize_Information(ID3D11Device* pDevice, ID3D11Devic
if (nullptr == m_pMapInfo) {
return E_FAIL;
}
- m_pPlayerInfo = CPlayerInfo::Create(pDevice, pContext);
- if (nullptr == m_pPlayerInfo) {
- return E_FAIL;
+
+ { // 순서 고정
+#pragma region STAT PROTOTYPE
+ if (FAILED(Stat_FileLoad("../Bin/Resources/Data/Stat/Stat.xml"))) {
+ return E_FAIL;
+ }
+#pragma endregion
+ m_pPlayerInfo = CPlayerInfo::Create(pDevice, pContext);
+ if (nullptr == m_pPlayerInfo) {
+ return E_FAIL;
+ }
}
m_pMonsterInfo = CMonsterInfo::Create(pDevice, pContext);
if (nullptr == m_pMonsterInfo) {
@@ -293,6 +314,33 @@ HRESULT CInfoInstance::Initialize_Information(ID3D11Device* pDevice, ID3D11Devic
return S_OK;
}
+HRESULT CInfoInstance::Stat_FileLoad(const _char* pDirectoryPath)
+{
+ filesystem::path pathStatFile = pDirectoryPath;
+
+ tinyxml2::XMLDocument doc;
+ tinyxml2::XMLError Error = doc.LoadFile(pathStatFile.string().c_str());
+ if (Error != tinyxml2::XML_SUCCESS) {
+ return E_FAIL;
+ }
+
+ tinyxml2::XMLElement* pStatInfo = doc.FirstChildElement("StatInfo");
+ if (!pStatInfo) {
+ return E_FAIL;
+ }
+
+ _uint iNumChild = pStatInfo->ChildElementCount();
+ tinyxml2::XMLNode* pChild = pStatInfo->FirstChildElement();
+ for (_uint i = 0; i < iNumChild; ++i) {
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, CMyTools::ToWstring(pChild->Value()),
+ CStat::Create(m_pDevice, m_pContext, pChild)))) {
+ return E_FAIL;
+ }
+ pChild = pChild->NextSiblingElement();
+ }
+
+ return S_OK;
+}
void CInfoInstance::Release_Information()
{
UI_Event.clear();
diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp
index 0daf9e672..f834d357a 100644
--- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp
+++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp
@@ -228,7 +228,7 @@ HRESULT CLevel_GamePlay::Ready_Background()
// >> M A P Configuration <<
// 맵 로드할지 안할지 bool 설정
// ---------------------------------
- _bool isReady_Background = { false };
+ _bool isReady_Background = { true };
#ifdef gimch
isReady_Background = true;
@@ -511,12 +511,13 @@ HRESULT CLevel_GamePlay::Ready_Layer_SkyBox(const _wstring& strLayerTag)
HRESULT CLevel_GamePlay::Ready_Layer_Monster()
{
- for (_uint i = 0; i < 1; ++i)
+ for (_uint i = 0; i < 0; ++i)
{
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
return E_FAIL;
}
}
+
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
return E_FAIL;
}
diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp
index 57b8b55b4..e910e2351 100644
--- a/Jusin154_Team3D/Client/Private/Loader.cpp
+++ b/Jusin154_Team3D/Client/Private/Loader.cpp
@@ -76,6 +76,7 @@
#include "Enemy_HpBar.h"
#include "Enemy_Info.h"
#include "Boss_HpBar.h"
+#include "Enemy_Detection.h"
#include "Spell_Canvas.h"
#include "Spell_Panel.h"
@@ -127,6 +128,7 @@
#include "Lumos.h"
+
#include "TrollSwing.h"
#include "Troll_Nomal_Smoke.h"
#include "Troll_Rush_Hit.h"
@@ -135,7 +137,11 @@
#include "Goblin_Protego.h"
#include "Goblin_Attack.h"
+#include "Mage_Down_Attack.h"
+#include "Mage_Nomal_Attack.h"
+#include "MageSide.h"
+#include "StunEffect.h"
#pragma endregion
@@ -295,7 +301,7 @@ HRESULT CLoader::Loading_For_GamePlay()
{
m_strMessage = TEXT("텍스쳐를(을) 로딩 중 입니다.");
- _bool isLoad_Background = { false };
+ _bool isLoad_Background = { true };
#ifdef gimch
isLoad_Background = true;
@@ -665,6 +671,22 @@ HRESULT CLoader::Loading_For_GamePlay()
_wstring wstrFilePath = CMyTools::ToWstring(strFilePath);
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, wstrFileName,
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+
+ });
+
+ Asset_FileLoad("../Bin/Resources/Textures/Enemy", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath)
+ {
+
+ _string strFilePath = pFilePath;
+ _wstring wstrFilePath = CMyTools::ToWstring(strFilePath);
+
+
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, wstrFileName,
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) {
return E_FAIL;
@@ -845,203 +867,203 @@ HRESULT CLoader::Loading_For_GamePlay()
}
#pragma endregion
#pragma region UI_ANI
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Altering_Spell"),
- // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Altering_Spell\\Altering_Spell%d.png"), 349))))
- //{
- // return E_FAIL;
- //}
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Altering_Spell"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Altering_Spell\\Altering_Spell%d.png"), 349))))
+ {
+ return E_FAIL;
+ }
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Alohomora"),
- // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Alohomora\\Alohomora%d.png"), 394))))
- //{
- // return E_FAIL;
- //}
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Alohomora"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Alohomora\\Alohomora%d.png"), 394))))
+ {
+ return E_FAIL;
+ }
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Ancient_Magic"),
- // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Ancient_Magic\\Ancient_Magic%d.png"), 152))))
- //{
- // return E_FAIL;
- //}
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Ancient_Magic"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Ancient_Magic\\Ancient_Magic%d.png"), 152))))
+ {
+ return E_FAIL;
+ }
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Ancient_Magic_Throw"),
- // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Ancient_Magic_Throw\\Ancient_Magic_Throw%d.png"), 89))))
- //{
- // return E_FAIL;
- //}
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Ancient_Magic_Throw"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Ancient_Magic_Throw\\Ancient_Magic_Throw%d.png"), 89))))
+ {
+ return E_FAIL;
+ }
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Arresto_Momentum"),
- // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Arresto_Momentum\\Arresto_Momentum%d.png"), 120))))
- //{
- // return E_FAIL;
- //}
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Arresto_Momentum"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Arresto_Momentum\\Arresto_Momentum%d.png"), 120))))
+ {
+ return E_FAIL;
+ }
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Avada_Kedavra"),
- // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Avada_Kedavra\\Avada_Kedavra%d.png"), 208))))
- //{
- // return E_FAIL;
- //}
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Avada_Kedavra"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Avada_Kedavra\\Avada_Kedavra%d.png"), 208))))
+ {
+ return E_FAIL;
+ }
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Basic_Cast"),
- // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Basic_Cast\\Basic_Cast%d.png"), 308))))
- //{
- // return E_FAIL;
- //}
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Basic_Cast"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Basic_Cast\\Basic_Cast%d.png"), 308))))
+ {
+ return E_FAIL;
+ }
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Beast_Feed"),
- // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Beast_Feed\\Beast_Feed%d.png"), 378))))
- //{
- // return E_FAIL;
- //}
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Beast_Feed"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Beast_Feed\\Beast_Feed%d.png"), 378))))
+ {
+ return E_FAIL;
+ }
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Beast_Petting_Brush"),
- // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Beast_Petting_Brush\\Beast_Petting_Brush%d.png"), 327))))
- //{
- // return E_FAIL;
- //}
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Beast_Petting_Brush"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Beast_Petting_Brush\\Beast_Petting_Brush%d.png"), 327))))
+ {
+ return E_FAIL;
+ }
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Bombarda"),
- // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Bombarda\\Bombarda%d.png"), 262))))
- //{
- // return E_FAIL;
- //}
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Bombarda"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Bombarda\\Bombarda%d.png"), 262))))
+ {
+ return E_FAIL;
+ }
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Confringo"),
- // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Confringo\\Confringo%d.png"), 157))))
- //{
- // return E_FAIL;
- //}
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Confringo"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Confringo\\Confringo%d.png"), 157))))
+ {
+ return E_FAIL;
+ }
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Conjuring_Spell"),
- // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Conjuring_Spell\\Conjuring_Spell%d.png"), 115))))
- //{
- // return E_FAIL;
- //}
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Conjuring_Spell"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Conjuring_Spell\\Conjuring_Spell%d.png"), 115))))
+ {
+ return E_FAIL;
+ }
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Descendo"),
- // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Descendo\\Descendo%d.png"), 155))))
- //{
- // return E_FAIL;
- //}
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Descendo"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Descendo\\Descendo%d.png"), 155))))
+ {
+ return E_FAIL;
+ }
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Depulso"),
- // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Depulso\\Depulso%d.png"), 152))))
- //{
- // return E_FAIL;
- //}
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Depulso"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Depulso\\Depulso%d.png"), 152))))
+ {
+ return E_FAIL;
+ }
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Diffindo"),
- // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Diffindo\\Diffindo%d.png"), 150))))
- //{
- // return E_FAIL;
- //}
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Diffindo"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Diffindo\\Diffindo%d.png"), 150))))
+ {
+ return E_FAIL;
+ }
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Disillusionment"),
- // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Disillusionment\\Disillusionment%d.png"), 260))))
- //{
- // return E_FAIL;
- //}
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Disillusionment"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Disillusionment\\Disillusionment%d.png"), 260))))
+ {
+ return E_FAIL;
+ }
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Evanesco"),
- // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Evanesco\\Evanesco%d.png"), 136))))
- //{
- // return E_FAIL;
- //}
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Evanesco"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Evanesco\\Evanesco%d.png"), 136))))
+ {
+ return E_FAIL;
+ }
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Expelliarmus"),
- // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Expelliarmus\\Expelliarmus%d.png"), 146))))
- //{
- // return E_FAIL;
- //}
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Expelliarmus"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Expelliarmus\\Expelliarmus%d.png"), 146))))
+ {
+ return E_FAIL;
+ }
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Flipendo"),
- // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Flipendo\\Flipendo%d.png"), 188))))
- //{
- // return E_FAIL;
- //}
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Flipendo"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Flipendo\\Flipendo%d.png"), 188))))
+ {
+ return E_FAIL;
+ }
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Glacius"),
- // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Glacius\\Glacius%d.png"), 156))))
- //{
- // return E_FAIL;
- //}
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Glacius"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Glacius\\Glacius%d.png"), 156))))
+ {
+ return E_FAIL;
+ }
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Imperio"),
- // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Imperio\\Imperio%d.png"), 462))))
- //{
- // return E_FAIL;
- //}
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Imperio"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Imperio\\Imperio%d.png"), 462))))
+ {
+ return E_FAIL;
+ }
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Incendio"),
- // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Incendio\\Incendio%d.png"), 213))))
- //{
- // return E_FAIL;
- //}
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Incendio"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Incendio\\Incendio%d.png"), 213))))
+ {
+ return E_FAIL;
+ }
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Levioso"),
- // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Levioso\\Levioso%d.png"), 180))))
- //{
- // return E_FAIL;
- //}
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Levioso"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Levioso\\Levioso%d.png"), 180))))
+ {
+ return E_FAIL;
+ }
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Lumos"),
- // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Lumos\\Lumos%d.png"), 365))))
- //{
- // return E_FAIL;
- //}
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Lumos"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Lumos\\Lumos%d.png"), 365))))
+ {
+ return E_FAIL;
+ }
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Nab_Sack"),
- // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Nab_Sack\\Nab_Sack%d.png"), 235))))
- //{
- // return E_FAIL;
- //}
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Nab_Sack"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Nab_Sack\\Nab_Sack%d.png"), 235))))
+ {
+ return E_FAIL;
+ }
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Petrificus_Totalus"),
- // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Petrificus_Totalus\\Petrificus_Totalus%d.png"), 275))))
- //{
- // return E_FAIL;
- //}
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Petrificus_Totalus"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Petrificus_Totalus\\Petrificus_Totalus%d.png"), 275))))
+ {
+ return E_FAIL;
+ }
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Protego"),
- // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Protego\\Protego%d.png"), 285))))
- //{
- // return E_FAIL;
- //}
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Protego"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Protego\\Protego%d.png"), 285))))
+ {
+ return E_FAIL;
+ }
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Reparo"),
- // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Reparo\\Reparo%d.png"), 385))))
- //{
- // return E_FAIL;
- //}
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Reparo"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Reparo\\Reparo%d.png"), 385))))
+ {
+ return E_FAIL;
+ }
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Revelio"),
- // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Revelio\\Revelio%d.png"), 227))))
- //{
- // return E_FAIL;
- //}
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Revelio"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Revelio\\Revelio%d.png"), 227))))
+ {
+ return E_FAIL;
+ }
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Stupefy"),
- // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Stupefy\\Stupefy%d.png"), 222))))
- //{
- // return E_FAIL;
- //}
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Stupefy"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Stupefy\\Stupefy%d.png"), 222))))
+ {
+ return E_FAIL;
+ }
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Transformation"),
- // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Transformation\\Transformation%d.png"), 146))))
- //{
- // return E_FAIL;
- //}
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Transformation"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Transformation\\Transformation%d.png"), 146))))
+ {
+ return E_FAIL;
+ }
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Wingardium_Leviosa"),
- // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Wingardium_Leviosa\\Wingardium_Leviosa%d.png"), 273))))
- //{
- // return E_FAIL;
- //}
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Wingardium_Leviosa"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Wingardium_Leviosa\\Wingardium_Leviosa%d.png"), 273))))
+ {
+ return E_FAIL;
+ }
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Crucio"),
- // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Crucio\\Crucio%d.png"), 216))))
- //{
- // return E_FAIL;
- //}
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Crucio"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Crucio\\Crucio%d.png"), 216))))
+ {
+ return E_FAIL;
+ }
#pragma endregion
@@ -1433,7 +1455,7 @@ HRESULT CLoader::Loading_For_GamePlay()
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()))))
+ CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Object/SubTroll_Weapon/SK_WPN_Troll_Club07.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
return E_FAIL;
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Troll_Rock_Big_Model"),
@@ -1528,6 +1550,23 @@ HRESULT CLoader::Loading_For_GamePlay()
return E_FAIL;
}
+ if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CMage_Down_Attack::Create(m_pDevice, m_pContext)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CMage_Nomal_Attack::Create(m_pDevice, m_pContext)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CMageSide::Create(m_pDevice, m_pContext)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CStunEffect::Create(m_pDevice, m_pContext)))) {
+ return E_FAIL;
+ }
+
+
if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CWandEnd::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
}
@@ -1687,6 +1726,10 @@ HRESULT CLoader::Loading_For_GamePlay()
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CBoss_HpBar::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
}
+ /* For.Prototype_GameObject_Enemy_Detection*/
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CEnemy_Detection::Create(m_pDevice, m_pContext)))) {
+ return E_FAIL;
+ }
/* For.Prototype_GameObject_Spell_Canvas*/
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpell_Canvas::Create(m_pDevice, m_pContext))))
@@ -2062,11 +2105,6 @@ HRESULT CLoader::Loading_For_GamePlay()
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CTroll::Create(m_pDevice, m_pContext))))
return E_FAIL;
-#pragma endregion
-#pragma region STAT PROTOTYPE
- if (FAILED(Stat_FileLoad("../Bin/Resources/Data/Stat/Stat.xml"))) {
- return E_FAIL;
- }
#pragma endregion
@@ -2233,33 +2271,6 @@ HRESULT CLoader::Asset_FileLoad(const _char* pDirectoryPath, const _tchar* pPreN
return S_OK;
}
-HRESULT CLoader::Stat_FileLoad(const _char* pDirectoryPath)
-{
- filesystem::path pathStatFile = pDirectoryPath;
-
- tinyxml2::XMLDocument doc;
- tinyxml2::XMLError Error = doc.LoadFile(pathStatFile.string().c_str());
- if (Error != tinyxml2::XML_SUCCESS) {
- return E_FAIL;
- }
-
- tinyxml2::XMLElement* pStatInfo = doc.FirstChildElement("StatInfo");
- if (!pStatInfo) {
- return E_FAIL;
- }
-
- _uint iNumChild = pStatInfo->ChildElementCount();
- tinyxml2::XMLNode* pChild = pStatInfo->FirstChildElement();
- for (_uint i = 0; i < iNumChild; ++i) {
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, CMyTools::ToWstring(pChild->Value()),
- CStat::Create(m_pDevice, m_pContext, pChild)))) {
- return E_FAIL;
- }
- pChild = pChild->NextSiblingElement();
- }
-
- return S_OK;
-}
vector* APIENTRY Deferred_FolderLoad_Main(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const _char* pDirectoryPath, const _char* pFileExt, _bool bUseTag)
{
diff --git a/Jusin154_Team3D/Client/Private/MageSide.cpp b/Jusin154_Team3D/Client/Private/MageSide.cpp
new file mode 100644
index 000000000..ae98ce65e
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/MageSide.cpp
@@ -0,0 +1,212 @@
+#include "pch.h"
+#include "MageSide.h"
+
+#include "GameInstance.h"
+#include "EffectParts.h"
+#include "Wand.h"
+#include "Player.h"
+#include "TrailObject.h"
+
+CMageSide::CMageSide(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CEffect_Container{ pDevice, pContext }
+{
+}
+
+CMageSide::CMageSide(const CMageSide& rhs)
+ : CEffect_Container(rhs)
+{
+}
+
+HRESULT CMageSide::Initialize_Prototype()
+{
+
+ return S_OK;
+
+}
+
+HRESULT CMageSide::Initialize(void* pArg)
+{
+ if (FAILED(__super::Initialize(pArg)))
+ return E_FAIL;
+
+ if (FAILED(Ready_Components(pArg)))
+ return E_FAIL;
+
+
+ if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/GoblinMage/MageSide")))
+ return E_FAIL;
+
+
+ m_wstrEffectName = L"MageSide";
+
+ m_pMage_PT = Get_PartObject("Mage_PT0");
+ m_pMage_Trail = Get_PartObject("Mage_Trail");
+
+ SAFE_ADDREF(m_pMage_PT);
+ SAFE_ADDREF(m_pMage_Trail);
+
+ m_fDuration = 5.f;
+
+ m_Events.emplace(3.f, [&]() {
+ m_isParticleEnd = true;
+ m_pMage_PT->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f, -500.f, 0.f, 1.f));
+
+ });
+
+ return S_OK;
+}
+
+void CMageSide::Priority_Update(_float fTimeDelta)
+{
+ __super::Priority_Update(fTimeDelta);
+
+}
+
+void CMageSide::Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Update(fTimeDelta);
+
+ Update_Event(fTimeDelta);
+
+
+ _matrix BoneMat = XMLoadFloat4x4(m_pOwner->Get_Component()->Get_BoneMatrixPtr("RightHand"));
+
+ for (int i = 0; i < 3; ++i) {
+ BoneMat.r[i] = XMVector3Normalize(BoneMat.r[i]);
+ }
+
+
+
+ _matrix WorldMat = m_pOwner->Get_Component()->Get_XMWorldMatrix();
+
+ _matrix CombinedMat = BoneMat * WorldMat;
+
+
+ if(m_isParticleEnd == false)
+ m_pMage_PT->Get_Component()->Set_State(STATE::POSITION, CombinedMat.r[3]);
+ m_pMage_Trail->Trail_Update(CombinedMat, fTimeDelta);
+
+}
+
+void CMageSide::Late_Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Late_Update(fTimeDelta);
+
+
+}
+
+HRESULT CMageSide::Pre_Setting(CGameObject* pObject, void* pArg)
+{
+ if (FAILED(__super::Pre_Setting(pObject, nullptr)))
+ return E_FAIL;
+
+ _matrix BoneMat = XMLoadFloat4x4(m_pOwner->Get_Component()->Get_BoneMatrixPtr("RightHand"));
+ _matrix WorldMat = m_pOwner->Get_Component()->Get_XMWorldMatrix();
+
+ _matrix CombinedMat = BoneMat * WorldMat;
+
+ m_pMage_Trail->Get_Component()->Reset_Trail();
+
+ m_pMage_PT->Get_Component()->Set_State(STATE::POSITION, CombinedMat.r[3]);
+
+ m_pMage_PT->Set_Visible(true);
+ m_pMage_Trail->Set_Visible(true);
+
+ m_isParticleEnd = false;
+
+ return S_OK;
+}
+
+HRESULT CMageSide::Ready_Components(void* pArg)
+{
+ if (FAILED(__super::Ready_Components(pArg))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CMageSide::Ready_Child()
+{
+ return S_OK;
+}
+
+CMageSide* CMageSide::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CMageSide* pInstance = new CMageSide(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CMageSide");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+
+CGameObject* CMageSide::Clone(void* pArg, CGameObject* pOwner)
+{
+ CMageSide* pInstance = new CMageSide(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CMageSide");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CMageSide::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);
+ }
+
+
+}
+
+void CMageSide::Free()
+{
+ __super::Free();
+
+
+ SAFE_RELEASE(m_pMage_PT);
+ SAFE_RELEASE(m_pMage_Trail);
+
+}
+#ifdef _DEBUG
+void CMageSide::Describe_Entity()
+{
+
+}
+#endif
+
+HRESULT CMageSide::Bind_ShaderResources()
+{
+ return S_OK;
+}
+
+
diff --git a/Jusin154_Team3D/Client/Private/Mage_Down_Attack.cpp b/Jusin154_Team3D/Client/Private/Mage_Down_Attack.cpp
new file mode 100644
index 000000000..3191a3526
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/Mage_Down_Attack.cpp
@@ -0,0 +1,169 @@
+#include "pch.h"
+#include "Mage_Down_Attack.h"
+
+#include "GameInstance.h"
+#include "EffectParts.h"
+#include "Wand.h"
+#include "Player.h"
+
+CMage_Down_Attack::CMage_Down_Attack(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CEffect_Container{ pDevice, pContext }
+{
+}
+
+CMage_Down_Attack::CMage_Down_Attack(const CMage_Down_Attack& rhs)
+ : CEffect_Container(rhs)
+{
+}
+
+HRESULT CMage_Down_Attack::Initialize_Prototype()
+{
+
+ return S_OK;
+
+}
+
+HRESULT CMage_Down_Attack::Initialize(void* pArg)
+{
+ if (FAILED(__super::Initialize(pArg)))
+ return E_FAIL;
+
+ if (FAILED(Ready_Components(pArg)))
+ return E_FAIL;
+
+
+ if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/GoblinMage/DownAttack")))
+ return E_FAIL;
+
+
+ m_wstrEffectName = L"DownAttack";
+
+
+ m_fDuration = 2.F;
+
+ return S_OK;
+}
+
+void CMage_Down_Attack::Priority_Update(_float fTimeDelta)
+{
+ __super::Priority_Update(fTimeDelta);
+
+}
+
+void CMage_Down_Attack::Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Update(fTimeDelta);
+
+ Update_Event(fTimeDelta);
+
+}
+
+void CMage_Down_Attack::Late_Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Late_Update(fTimeDelta);
+
+
+}
+
+HRESULT CMage_Down_Attack::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) * 3.f;
+ vPos += XMVectorSet(0.f, 0.2f, 0.f, 0.f);
+
+ CEffectParts* pBottomPT0 = Get_PartObject("BottomPT0");
+ CEffectParts* pBottomPT1 = Get_PartObject("BottomPT1");
+ CEffectParts* pDown_R = Get_PartObject("Down_R");
+ CEffectParts* pSmoke = Get_PartObject("Smoke");
+ CEffectParts* pRound_PT = Get_PartObject("Round_PT");
+
+ pBottomPT0->Get_Component()->Set_State(STATE::POSITION, vPos);
+ pBottomPT1->Get_Component()->Set_State(STATE::POSITION, vPos);
+ pDown_R->Get_Component()->Set_State(STATE::POSITION, vPos);
+ pSmoke->Get_Component()->Set_State(STATE::POSITION, vPos);
+ pRound_PT->Get_Component()->Set_State(STATE::POSITION, vPos);
+
+ pBottomPT0->Set_Visible(true);
+ pBottomPT1->Set_Visible(true);
+ pDown_R->Set_Visible(true);
+ pSmoke->Set_Visible(true);
+ pRound_PT->Set_Visible(true);
+
+
+ return S_OK;
+}
+
+HRESULT CMage_Down_Attack::Ready_Components(void* pArg)
+{
+ if (FAILED(__super::Ready_Components(pArg))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CMage_Down_Attack::Ready_Child()
+{
+ return S_OK;
+}
+
+CMage_Down_Attack* CMage_Down_Attack::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CMage_Down_Attack* pInstance = new CMage_Down_Attack(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CMage_Down_Attack");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+
+CGameObject* CMage_Down_Attack::Clone(void* pArg, CGameObject* pOwner)
+{
+ CMage_Down_Attack* pInstance = new CMage_Down_Attack(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CMage_Down_Attack");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CMage_Down_Attack::OnCollision(CGameObject* pOther, void* pDesc)
+{
+
+}
+
+void CMage_Down_Attack::Free()
+{
+ __super::Free();
+
+}
+#ifdef _DEBUG
+void CMage_Down_Attack::Describe_Entity()
+{
+
+}
+#endif
+
+HRESULT CMage_Down_Attack::Bind_ShaderResources()
+{
+ return S_OK;
+}
+
+
diff --git a/Jusin154_Team3D/Client/Private/Mage_Nomal_Attack.cpp b/Jusin154_Team3D/Client/Private/Mage_Nomal_Attack.cpp
new file mode 100644
index 000000000..c7e81eb99
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/Mage_Nomal_Attack.cpp
@@ -0,0 +1,231 @@
+#include "pch.h"
+#include "Mage_Nomal_Attack.h"
+
+#include "GameInstance.h"
+#include "EffectParts.h"
+#include "Wand.h"
+#include "Player.h"
+#include "InfoInstance.h"
+
+CMage_Nomal_Attack::CMage_Nomal_Attack(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CEffect_Container{ pDevice, pContext }
+{
+}
+
+CMage_Nomal_Attack::CMage_Nomal_Attack(const CMage_Nomal_Attack& rhs)
+ : CEffect_Container(rhs),
+ m_pInfoInstance(CInfoInstance::GetInstance())
+{
+ SAFE_ADDREF(m_pInfoInstance);
+}
+
+HRESULT CMage_Nomal_Attack::Initialize_Prototype()
+{
+
+ return S_OK;
+
+}
+
+HRESULT CMage_Nomal_Attack::Initialize(void* pArg)
+{
+ if (FAILED(__super::Initialize(pArg)))
+ return E_FAIL;
+
+ if (FAILED(Ready_Components(pArg)))
+ return E_FAIL;
+
+
+ if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/GoblinMage/NomalAttack")))
+ return E_FAIL;
+
+
+ m_wstrEffectName = L"Mage_Nomal_Attack";
+
+ m_pCircle_Proj = Get_PartObject("Circle_Proj");
+ m_pProj_PT1 = Get_PartObject("Proj_PT");
+ m_pProj_PT2 = Get_PartObject("Proj_PT2");
+
+ SAFE_ADDREF(m_pCircle_Proj);
+ SAFE_ADDREF(m_pProj_PT1);
+ SAFE_ADDREF(m_pProj_PT2);
+
+ m_fDuration = 3.2f;
+
+ return S_OK;
+}
+
+void CMage_Nomal_Attack::Priority_Update(_float fTimeDelta)
+{
+ __super::Priority_Update(fTimeDelta);
+
+ XMStoreFloat4(&m_vStartPos, m_pCircle_Proj->Get_WorldPostion());
+}
+
+void CMage_Nomal_Attack::Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Update(fTimeDelta);
+
+ Update_Event(fTimeDelta);
+
+
+ m_pCircle_Proj->Get_Component()->Translation(XMLoadFloat3(&m_vLook) * m_fLinearSpeed);
+ m_pProj_PT1->Get_Component()->Translation(XMLoadFloat3(&m_vLook) * m_fLinearSpeed);
+ m_pProj_PT2->Get_Component()->Translation(XMLoadFloat3(&m_vLook) * m_fLinearSpeed);
+
+ if (false == m_bHit) {
+ _vector vStartPos = XMLoadFloat4(&m_vStartPos);
+ _vector vEndPos = m_pCircle_Proj->Get_WorldPostion();
+ ON_COLLISION_INFO CollisionInfo = MonsterSweepTarget(vStartPos, vEndPos, 0.2f);
+
+ OnCollision(this, &CollisionInfo);
+ }
+
+}
+
+void CMage_Nomal_Attack::Late_Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Late_Update(fTimeDelta);
+
+
+}
+
+HRESULT CMage_Nomal_Attack::Pre_Setting(CGameObject* pObject, void* pArg)
+{
+ if (FAILED(__super::Pre_Setting(pObject, nullptr)))
+ return E_FAIL;
+
+
+ /* 초기 객체 비지블*/
+ m_pCircle_Proj->Set_Visible(true);
+ m_pProj_PT1->Set_Visible(true);
+ m_pProj_PT2->Set_Visible(true);
+
+ /* 초기 객체 위치 초기화*/
+
+ _matrix BoneMat = XMLoadFloat4x4(m_pOwner->Get_Component()->Get_BoneMatrixPtr("RightHand"));
+
+ for (int i = 0; i < 3; ++i) {
+ BoneMat.r[i] = XMVector3Normalize(BoneMat.r[i]);
+ }
+
+ _matrix WorldMat = m_pOwner->Get_Component()->Get_XMWorldMatrix();
+
+ _matrix CombinedMat = BoneMat * WorldMat;
+
+ _vector vStartPos = CombinedMat.r[3];
+
+ XMStoreFloat4(&m_vStartPos, vStartPos);
+
+ m_pCircle_Proj->Get_Component()->Set_State(STATE::POSITION, vStartPos);
+ m_pProj_PT1->Get_Component()->Set_State(STATE::POSITION, vStartPos);
+ m_pProj_PT2->Get_Component()->Set_State(STATE::POSITION, vStartPos);
+
+
+
+ /* 플레이어 위치 받기 */
+ CUnit* pPlayer = m_pInfoInstance->Get_NearestPlayerAlly(m_pOwner->Get_WorldPostion()).first;
+
+ if (pPlayer == nullptr)
+ return E_FAIL;
+
+ /* 초기 방향 */
+ XMStoreFloat4(&m_vTargetPos, pPlayer->Get_Component()->Get_Position());
+ XMStoreFloat3(&m_vLook, XMVector3Normalize(XMLoadFloat4(&m_vTargetPos) - XMLoadFloat4(&m_vStartPos)));
+
+
+ return S_OK;
+}
+
+HRESULT CMage_Nomal_Attack::Ready_Components(void* pArg)
+{
+ if (FAILED(__super::Ready_Components(pArg))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CMage_Nomal_Attack::Ready_Child()
+{
+ return S_OK;
+}
+
+CMage_Nomal_Attack* CMage_Nomal_Attack::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CMage_Nomal_Attack* pInstance = new CMage_Nomal_Attack(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CMage_Nomal_Attack");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+
+CGameObject* CMage_Nomal_Attack::Clone(void* pArg, CGameObject* pOwner)
+{
+ CMage_Nomal_Attack* pInstance = new CMage_Nomal_Attack(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CMage_Nomal_Attack");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CMage_Nomal_Attack::OnCollision(CGameObject* pOther, void* pDesc)
+{
+ if (m_bHit == false)
+ return;
+
+ ON_COLLISION_INFO CollisionDesc = *static_cast(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);
+ }
+
+
+ m_pCircle_Proj->Set_Visible(false);
+ m_pProj_PT1->Set_Visible(false);
+ m_pProj_PT2->Set_Visible(false);
+
+}
+
+void CMage_Nomal_Attack::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pInfoInstance);
+
+ SAFE_RELEASE(m_pCircle_Proj);
+ SAFE_RELEASE(m_pProj_PT1);
+ SAFE_RELEASE(m_pProj_PT2);
+}
+#ifdef _DEBUG
+void CMage_Nomal_Attack::Describe_Entity()
+{
+
+}
+#endif
+
+HRESULT CMage_Nomal_Attack::Bind_ShaderResources()
+{
+ return S_OK;
+}
+
+
diff --git a/Jusin154_Team3D/Client/Private/MiniMap_Camera.cpp b/Jusin154_Team3D/Client/Private/MiniMap_Camera.cpp
new file mode 100644
index 000000000..071f397ac
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/MiniMap_Camera.cpp
@@ -0,0 +1,99 @@
+#include "pch.h"
+#include "MiniMap_Camera.h"
+#include "InfoInstance.h"
+
+CMiniMap_Camera::CMiniMap_Camera(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CCamera(pDevice, pContext)
+{
+}
+
+CMiniMap_Camera::CMiniMap_Camera(const CMiniMap_Camera& rhs)
+ : CCamera(rhs),
+ m_pInfoInstance(CInfoInstance::GetInstance())
+{
+}
+
+void CMiniMap_Camera::Priority_Update(_float fTimeDelta)
+{
+}
+
+void CMiniMap_Camera::Update(_float fTimeDelta)
+{
+}
+
+void CMiniMap_Camera::Update_LerpTimer(Engine::_float fTimeDelta)
+{
+}
+
+void CMiniMap_Camera::Enable_FollowLerp()
+{
+}
+
+void CMiniMap_Camera::Enable_LookLerp()
+{
+}
+
+void CMiniMap_Camera::Toggle_Priority()
+{
+}
+
+void CMiniMap_Camera::Late_Update(_float fTimeDelta)
+{
+}
+
+HRESULT CMiniMap_Camera::Render()
+{
+ return S_OK;
+}
+
+HRESULT CMiniMap_Camera::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CMiniMap_Camera::Initialize(void* pArg)
+{
+ return S_OK;
+}
+
+HRESULT CMiniMap_Camera::Ready_Components(void* pArg)
+{
+ return S_OK;
+}
+
+HRESULT CMiniMap_Camera::Bind_ShaderResources()
+{
+ return S_OK;
+}
+
+CMiniMap_Camera* CMiniMap_Camera::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CMiniMap_Camera* pInstance = new CMiniMap_Camera(pDevice, pContext);
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CMiniMap_Camera");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+CGameObject* CMiniMap_Camera::Clone(void* pArg, CGameObject* pOwner)
+{
+ CMiniMap_Camera* pInstance = new CMiniMap_Camera(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CMiniMap_Camera");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+void CMiniMap_Camera::Free()
+{
+ __super::Free();
+}
+
+void CMiniMap_Camera::Describe_Entity()
+{
+}
diff --git a/Jusin154_Team3D/Client/Private/Monster.cpp b/Jusin154_Team3D/Client/Private/Monster.cpp
index 55dcec0c1..1a6b083ed 100644
--- a/Jusin154_Team3D/Client/Private/Monster.cpp
+++ b/Jusin154_Team3D/Client/Private/Monster.cpp
@@ -206,6 +206,21 @@ void CMonster::Free()
void CMonster::Describe_Entity()
{
+ if (ImGui::TreeNode("ANIM STATE")) {
+
+ for (auto& pState : m_States)
+ {
+ if (ImGui::Button(to_string(pState.first).c_str()))
+ {
+ m_pFSM->Change_State(pState.first);
+ }
+
+ }
+
+ GUI::Text(to_string(m_pModelCom->Get_CurrentTrackProgressRatio()).c_str());
+
+ ImGui::TreePop();
+ }
}
#endif // _DEBUG
diff --git a/Jusin154_Team3D/Client/Private/Player.cpp b/Jusin154_Team3D/Client/Private/Player.cpp
index d7a8c90e6..578553abd 100644
--- a/Jusin154_Team3D/Client/Private/Player.cpp
+++ b/Jusin154_Team3D/Client/Private/Player.cpp
@@ -387,11 +387,10 @@ HRESULT CPlayer::Ready_Components()
return E_FAIL;
}
- if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("STAT_PLAYER"), (CComponent**)&m_pStat))) {
- return E_FAIL;
-
- }
-
+ m_pStat = m_pInfoInstance->Get_PlayerStatPtr();
+ m_Components.push_back(m_pStat);
+ SAFE_ADDREF(m_pStat);
+ SAFE_ADDREF(m_pStat);
{ // CCT
CCharacter_Controller::Character_Controller_DESC Desc{};
diff --git a/Jusin154_Team3D/Client/Private/PlayerInfo.cpp b/Jusin154_Team3D/Client/Private/PlayerInfo.cpp
index 57d8fe77a..e7cc16ab6 100644
--- a/Jusin154_Team3D/Client/Private/PlayerInfo.cpp
+++ b/Jusin154_Team3D/Client/Private/PlayerInfo.cpp
@@ -2,11 +2,17 @@
#include "PlayerInfo.h"
#include "GameInstance.h"
#include "InfoInstance.h"
+#include "Player.h"
CPlayerInfo::CPlayerInfo()
{
}
+CStat* CPlayerInfo::Get_PlayerStatPtr()
+{
+ return m_pStat;
+}
+
void CPlayerInfo::Update(_float fTimeDelta)
{
}
@@ -32,13 +38,16 @@ HRESULT CPlayerInfo::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pCon
m_pInfoInstance = CInfoInstance::GetInstance();
m_pDevice = pDevice;
m_pContext = pContex;
-
+
SAFE_ADDREF(m_pGameInstance);
SAFE_ADDREF(m_pInfoInstance);
SAFE_ADDREF(m_pDevice);
SAFE_ADDREF(m_pContext);
-
+ m_pStat = (CStat*)m_pGameInstance->Clone_Asset_Prototype(g_iStaticLevel, TEXT("STAT_PLAYER"), nullptr, nullptr);
+ if (nullptr == m_pStat) {
+ return E_FAIL;
+ }
return S_OK;
}
@@ -61,5 +70,5 @@ void CPlayerInfo::Free()
SAFE_RELEASE(m_pInfoInstance);
SAFE_RELEASE(m_pDevice);
SAFE_RELEASE(m_pContext);
-
+ SAFE_RELEASE(m_pStat);
}
diff --git a/Jusin154_Team3D/Client/Private/Player_States.cpp b/Jusin154_Team3D/Client/Private/Player_States.cpp
index 077da5e13..505e032cf 100644
--- a/Jusin154_Team3D/Client/Private/Player_States.cpp
+++ b/Jusin154_Team3D/Client/Private/Player_States.cpp
@@ -27,6 +27,8 @@
#include "State_Hit.h"
#include "State_Broom_Ride.h"
#include "State_Broom_Ride_Move.h"
+#include "State_Broom_Hover.h"
+#include "State_Broom_Fly.h"
#include "State_Broom_Dismount.h"
#pragma endregion
@@ -713,11 +715,17 @@ void CPlayer::Behavior_JumpEnter()
HRESULT CPlayer::Behavior_JumpExitCheck()
{
_float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio();
- if (fRatio>=0.7f) {
+
+ if (m_pGameInstance->Key_Down(DIK_B))
+ {
+ m_pFSM->Change_State(FSMSTATE::BROOM_RIDE);
+ }
+
+ if (fRatio>=0.6f) {
m_pFSM->Change_State(FSMSTATE::LAND);
return E_FAIL;
}
- return S_OK;
+ return E_FAIL;
}
void CPlayer::Behavior_JumpExit()
@@ -1331,7 +1339,7 @@ HRESULT CPlayer::Behavior_SpellExitCheck()
m_pFSM->Change_State(FSMSTATE::COMBAT);
}
- if (m_pFSM->IsEnable(FSMSTATE::SPELL) && fRatio >= 0.3f)
+ if (m_bSpellHit)
{
if (m_eSpell != ENUM_CLASS(SKILL_TYPE::END))
{
@@ -1349,12 +1357,13 @@ HRESULT CPlayer::Behavior_SpellExitCheck()
break;
}
+ m_bSpellHit = false;
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
}
}
- if (SUCCEEDED(InputMove()) && fRatio>=0.3f) {
+ if (SUCCEEDED(InputMove()) && fRatio >= 0.3f) {
m_pFSM->Change_State(FSMSTATE::MOVE);
m_bLookAt = false;
return E_FAIL;
@@ -1445,6 +1454,14 @@ HRESULT CPlayer::Behavior_Broom_RideExitCheck(_float fTimeDelta)
m_pFSM->Change_State(FSMSTATE::BROOM_RIDE_MOVE);
}
+ if (m_pGameInstance->Key_Pressing(DIK_N))
+ {
+ auto flags = m_pCharacter_Controller->Get_CollisionFlags();
+ if (flags & PSX::PxControllerCollisionFlag::eCOLLISION_DOWN)
+ {
+ m_pFSM->Change_State(FSMSTATE::BROOM_DISMOUNT);
+ }
+ }
return E_FAIL;
}
@@ -1460,6 +1477,29 @@ void CPlayer::Behavior_Broom_Ride_MoveEnter()
}
HRESULT CPlayer::Behavior_Broom_Ride_MoveExitCheck(_float fTimeDelta)
+{
+ if (m_pBroom->Get_Hover())
+ {
+ m_pFSM->Change_State(FSMSTATE::HOVER);
+ }
+ else {
+ m_pFSM->Change_State(FSMSTATE::FLY);
+ }
+
+ return E_FAIL;
+}
+
+void CPlayer::Behavior_Broom_Ride_MoveExit()
+{
+ m_pFSM->Disable_State(FSMSTATE::BROOM_RIDE_MOVE);
+}
+
+void CPlayer::Behavior_Broom_HoverEnter()
+{
+ m_pFSM->Enable_State(FSMSTATE::HOVER);
+}
+
+HRESULT CPlayer::Behavior_Broom_HoverExitCheck(_float fTimeDelta)
{
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
pair<_uint, _bool> pairAnimInfo;
@@ -1470,28 +1510,140 @@ HRESULT CPlayer::Behavior_Broom_Ride_MoveExitCheck(_float fTimeDelta)
_bool bDown = m_pGameInstance->Key_Pressing(DIK_LCONTROL);
_bool bUp = m_pGameInstance->Key_Pressing(DIK_SPACE);
- if (m_pBroom->Get_Hover())
+ if (m_pBroom->Get_Hover() && iCurrAnimIndex != m_Animation[STATEANIM::BROOM_HOVER_REVELIO].first)
{
- if (m_pGameInstance->Key_Pressing(DIK_W))
+ if (SUCCEEDED(InputBroom()) || SUCCEEDED(InputMove()))
{
- pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_HOVER_FWD);
+ _float3 vInput = { 0.f, 0.f, 0.f };
+
+ if (bFwd) vInput.z += 1.f;
+ if (bLft) vInput.x -= 1.f;
+ if (bRht) vInput.x += 1.f;
+ if (bUp) vInput.y += 1.f;
+ if (bDown) vInput.y -= 1.f;
+
+ _bool bHasInput = !(vInput.x == 0 && vInput.y == 0 && vInput.z == 0);
+ _vector vDir = XMVector3Normalize(XMLoadFloat3(&vInput));
+
+ if (bUp || bDown)
+ {
+ if (bUp)
+ {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE];
+ }
+ else
+ {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE];
+ }
+ }
+
+ _float ax = fabsf(vInput.x);
+ _float ay = fabsf(vInput.y);
+ _float az = fabsf(vInput.z);
+
+ if (ay > ax && ay > az)
+ {
+ if (vInput.y > 0)
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE];
+ else
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE];
+ }
+ else if (ax >= az)
+ {
+ if (ay >= ax)
+ {
+ if (vInput.y > 0)
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE];
+ else
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE];
+ }
+ else {
+ if (vInput.x < 0)
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_LEFT];
+ else if (vInput.x > 0)
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_RIGHT];
+ else {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_FWD];
+ }
+ }
+ }
+ else
+ {
+ if (vInput.y > 0)
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE];
+ else if (vInput.y < 0)
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE];
+ else {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_FWD];
+ }
+ }
}
- else if (m_pGameInstance->Key_Pressing(DIK_A))
- {
- pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_HOVER_LEFT);
+ else {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE];
}
- else if (m_pGameInstance->Key_Pressing(DIK_D))
+
+ if (m_pGameInstance->Key_Down(DIK_R))
{
- pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_HOVER_RIGHT);
- }
- else
- {
- pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_HOVER_IDLE);
+ pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_HOVER_REVELIO);
+ Add_Event(pairAnimInfo.first,
+ [this]() {
+ m_pEffectPool->Use_Skill(SKILL_TYPE::REVELIO, this);
+ }, 0.2f);
}
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
}
- else
+
+
+
+ if (iCurrAnimIndex == m_Animation[STATEANIM::BROOM_HOVER_REVELIO].first)
+ {
+ if (m_pModelCom->IsFinishedAnim())
+ {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_FWD];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ }
+ }
+
+ if (m_pGameInstance->Key_Pressing(DIK_N))
+ {
+ auto flags = m_pCharacter_Controller->Get_CollisionFlags();
+ if (flags & PSX::PxControllerCollisionFlag::eCOLLISION_DOWN)
+ {
+ m_pFSM->Change_State(FSMSTATE::BROOM_DISMOUNT);
+ }
+ }
+
+ if (!m_pBroom->Get_Hover())
+ {
+ m_pFSM->Change_State(FSMSTATE::BROOM_RIDE_MOVE);
+ }
+
+ return E_FAIL;
+}
+
+void CPlayer::Behavior_Broom_HoverExit()
+{
+ m_pFSM->Disable_State(FSMSTATE::HOVER);
+}
+
+void CPlayer::Behavior_Broom_FlyEnter()
+{
+ m_pFSM->Enable_State(FSMSTATE::FLY);
+}
+
+HRESULT CPlayer::Behavior_Broom_FlyExitCheck(_float fTimeDelta)
+{
+ _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
+ pair<_uint, _bool> pairAnimInfo;
+
+ _bool bFwd = m_pGameInstance->Key_Pressing(DIK_W);
+ _bool bLft = m_pGameInstance->Key_Pressing(DIK_A);
+ _bool bRht = m_pGameInstance->Key_Pressing(DIK_D);
+ _bool bDown = m_pGameInstance->Key_Pressing(DIK_LCONTROL);
+ _bool bUp = m_pGameInstance->Key_Pressing(DIK_SPACE);
+
+ if (!m_pBroom->Get_Hover() && iCurrAnimIndex != m_Animation[STATEANIM::BROOM_REVELIO].first)
{
if (SUCCEEDED(InputBroom()) || SUCCEEDED(InputMove()))
{
@@ -1560,31 +1712,50 @@ HRESULT CPlayer::Behavior_Broom_Ride_MoveExitCheck(_float fTimeDelta)
}
}
else {
- pairAnimInfo = m_Animation[STATEANIM::BROOM_FWD];
+ pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_FWD);
}
- m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ if (m_pGameInstance->Key_Down(DIK_R))
+ {
+ pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_REVELIO);
+ Add_Event(pairAnimInfo.first,
+ [this]() {
+ m_pEffectPool->Use_Skill(SKILL_TYPE::REVELIO, this);
+ }, 0.2f);
+ }
+
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
}
+ if (iCurrAnimIndex == m_Animation[STATEANIM::BROOM_REVELIO].first)
+ {
+ if (m_pModelCom->IsFinishedAnim())
+ {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_FWD];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ }
+ }
- if (m_pGameInstance->Key_Pressing(DIK_N)) {
+ if (m_pGameInstance->Key_Pressing(DIK_N))
+ {
auto flags = m_pCharacter_Controller->Get_CollisionFlags();
if (flags & PSX::PxControllerCollisionFlag::eCOLLISION_DOWN)
{
m_pFSM->Change_State(FSMSTATE::BROOM_DISMOUNT);
}
- else {
- m_pBroomTransform->Go_Down(fTimeDelta);
- }
}
-
+ if (m_pBroom->Get_Hover())
+ {
+ m_pFSM->Change_State(FSMSTATE::BROOM_RIDE_MOVE);
+ }
+
return E_FAIL;
}
-void CPlayer::Behavior_Broom_Ride_MoveExit()
+void CPlayer::Behavior_Broom_FlyExit()
{
- m_pFSM->Disable_State(FSMSTATE::BROOM_RIDE_MOVE);
+ m_pFSM->Disable_State(FSMSTATE::FLY);
}
void CPlayer::Behavior_Broom_DismountEnter()
@@ -1594,7 +1765,17 @@ void CPlayer::Behavior_Broom_DismountEnter()
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_DISMOUNT);
m_pFSM->Enable_State(FSMSTATE::BROOM_DISMOUNT);
m_pBroom->Set_Ride(false);
- m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ _vector look = XMVector3Normalize(m_pTransformCom->Get_State(STATE::LOOK));
+
+ _vector worldUp = XMVectorSet(0.f, 1.f, 0.f, 0.f);
+
+ _vector right = XMVector3Normalize(XMVector3Cross(worldUp, look));
+ _vector up = XMVector3Normalize(XMVector3Cross(look, right));
+
+ m_pTransformCom->Set_State(STATE::RIGHT, right);
+ m_pTransformCom->Set_State(STATE::UP, up);
+ m_pTransformCom->Set_State(STATE::LOOK, look);
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second,1.f,false,1.3f);
}
HRESULT CPlayer::Behavior_Broom_DismountExitCheck(_float fTimeDelta)
@@ -1603,17 +1784,15 @@ HRESULT CPlayer::Behavior_Broom_DismountExitCheck(_float fTimeDelta)
pair<_uint, _bool> pairAnimInfo;
if (iCurrAnimIndex == m_Animation[STATEANIM::BROOM_DISMOUNT].first)
{
+ m_BroomScale.x -= (m_TargetScale.x - m_BroomScale.x) * fTimeDelta * m_fScaleSmoothSpeed;
+ m_BroomScale.y -= (m_TargetScale.y - m_BroomScale.y) * fTimeDelta * m_fScaleSmoothSpeed;
+ m_BroomScale.z -= (m_TargetScale.z - m_BroomScale.z) * fTimeDelta * m_fScaleSmoothSpeed;
+ if (m_BroomScale.x >= 0.1f)
+ {
+ m_pBroomTransform->Set_Scale(m_BroomScale);
+ }
if (m_pModelCom->IsFinishedAnim()) {
- _vector look = XMVector3Normalize(m_pTransformCom->Get_State(STATE::LOOK));
-
- _vector worldUp = XMVectorSet(0.f, 1.f, 0.f, 0.f);
-
- _vector right = XMVector3Normalize(XMVector3Cross(worldUp, look));
- _vector up = XMVector3Normalize(XMVector3Cross(look, right));
-
- m_pTransformCom->Set_State(STATE::RIGHT, right);
- m_pTransformCom->Set_State(STATE::UP, up);
- m_pTransformCom->Set_State(STATE::LOOK, look);
+ m_BroomScale = { 0.f,0.f,0.f };
if (SUCCEEDED(InputMove()))
{
m_pFSM->Change_State(FSMSTATE::MOVE);
@@ -1624,7 +1803,6 @@ HRESULT CPlayer::Behavior_Broom_DismountExitCheck(_float fTimeDelta)
return E_FAIL;
}
-
}
return E_FAIL;
@@ -1717,6 +1895,32 @@ void CPlayer::Throwing_Interactive()
SAFE_RELEASE(m_pGrapInteractive);
}
+void CPlayer::Attach_Broom()
+{
+ _matrix BroomWorld = XMLoadFloat4x4(m_pBroomTransform->Get_WorldMatrixPtr());
+ _matrix BoneLocal = XMLoadFloat4x4(m_pBroomModel->Get_BoneMatrixPtr("broomSocket"));
+
+ _vector Scale, Rot, Trans;
+
+ XMMatrixDecompose(&Scale, &Rot, &Trans, BoneLocal);
+
+ _matrix BoneNoScale = XMMatrixRotationQuaternion(Rot) * XMMatrixTranslationFromVector(Trans);
+
+ m_OffsetPos = { 0.f,0.9f,0.f };
+
+ _matrix Offset = XMMatrixTranslation(m_OffsetPos.x,
+ m_OffsetPos.y, m_OffsetPos.z);
+
+ _matrix SocketWorld = BoneNoScale * Offset * BroomWorld;
+
+ _matrix FixRot = XMMatrixRotationY(XMConvertToRadians(180.f));
+
+ _matrix FinalWorld = FixRot * SocketWorld;
+
+ m_pTransformCom->Set_WorldMatrix(FinalWorld);
+ m_pCharacter_Controller->Set_Position(FinalWorld.r[3]);
+}
+
void CPlayer::Add_FSM()
{
#pragma region Behavior_Movement_NotFocus
@@ -1887,13 +2091,21 @@ void CPlayer::Add_FSM()
Desc.funcExitEvent = [this]() { Behavior_Broom_RideExit(); };
Desc.funcPriorityUpdate = [this](_float fTimeDelta) {
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
-
if (!m_bOnce) {
m_pBroomTransform->Set_WorldMatrix(m_pTransformCom->Get_XMWorldMatrix());
- m_pBroomTransform->Set_State(STATE::POSITION, m_pBroomTransform->Get_State(STATE::POSITION)+XMVectorSet(0.f, 2.5f, 0.f, 0.f));
+ m_pBroomTransform->Set_State(STATE::POSITION, m_pBroomTransform->Get_State(STATE::POSITION) + XMVectorSet(0.f,2.f,0.f,0.f));
+ _float3 vScale = { 0.3f,0.3f,0.3f };
+ m_pBroomTransform->Set_Scale(vScale);
m_bOnce = true;
}
+ m_BroomScale.x += (m_TargetScale.x - m_BroomScale.x) * fTimeDelta * m_fScaleSmoothSpeed;
+ m_BroomScale.y += (m_TargetScale.y - m_BroomScale.y) * fTimeDelta * m_fScaleSmoothSpeed;
+ m_BroomScale.z += (m_TargetScale.z - m_BroomScale.z) * fTimeDelta * m_fScaleSmoothSpeed;
+ if (m_BroomScale.x <= 1.f)
+ {
+ m_pBroomTransform->Set_Scale(m_BroomScale);
+ }
_matrix BroomWorld = XMLoadFloat4x4(m_pBroomTransform->Get_WorldMatrixPtr());
_matrix BoneLocal = XMLoadFloat4x4(m_pBroomModel->Get_BoneMatrixPtr("broomSocket"));
@@ -1903,7 +2115,7 @@ void CPlayer::Add_FSM()
_matrix BoneNoScale = XMMatrixRotationQuaternion(Rot) * XMMatrixTranslationFromVector(Trans);
- m_OffsetPos = { 0.f, 0.9f, 0.f };
+ m_OffsetPos = { 0.f,0.9f,0.f };
_matrix Offset = XMMatrixTranslation(m_OffsetPos.x,
m_OffsetPos.y, m_OffsetPos.z);
@@ -1914,18 +2126,9 @@ void CPlayer::Add_FSM()
_matrix FinalWorld = FixRot * SocketWorld;
- _vector SourS, SourR, SourT;
- _vector DestS, DestR, DestT;
- XMMatrixDecompose(&SourS, &SourR, &SourT, FinalWorld);
- XMMatrixDecompose(&DestS, &DestR, &DestT, m_pTransformCom->Get_XMWorldMatrix());
+ m_pTransformCom->Set_WorldMatrix(FinalWorld);
+ m_pCharacter_Controller->Set_Position(FinalWorld.r[3]);
- _vector finalR = XMQuaternionSlerp(SourR, DestR, fTimeDelta);
- _vector finalT = XMVectorLerp(SourT, DestT, fTimeDelta);
-
- _matrix finalMat = XMMatrixAffineTransformation(DestS, XMVectorZero(), finalR, finalT);
-
- m_pTransformCom->Set_WorldMatrix(finalMat);
- m_pCharacter_Controller->Set_Position(finalMat.r[3]);
};
Desc.funcLateUpdate = nullptr;
m_States.emplace(FSMSTATE::BROOM_RIDE, CState_Broom_Ride::Create(&Desc));
@@ -1939,43 +2142,40 @@ void CPlayer::Add_FSM()
Desc.funcExitEvent = [this]() { Behavior_Broom_Ride_MoveExit(); };
Desc.funcPriorityUpdate = [this](_float fTimeDelta) {
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
-
- _matrix BroomWorld = XMLoadFloat4x4(m_pBroomTransform->Get_WorldMatrixPtr());
- _matrix BoneLocal = XMLoadFloat4x4(m_pBroomModel->Get_BoneMatrixPtr("broomSocket"));
-
- _vector Scale, Rot, Trans;
-
- XMMatrixDecompose(&Scale, &Rot, &Trans, BoneLocal);
-
- _matrix BoneNoScale = XMMatrixRotationQuaternion(Rot) * XMMatrixTranslationFromVector(Trans);
-
- m_OffsetPos = { 0.f, 0.9f, 0.f };
- _matrix Offset = XMMatrixTranslation(m_OffsetPos.x,
- m_OffsetPos.y, m_OffsetPos.z);
-
- _matrix SocketWorld = BoneNoScale * Offset * BroomWorld;
-
- _matrix FixRot = XMMatrixRotationY(XMConvertToRadians(180.f));
-
- _matrix FinalWorld = FixRot * SocketWorld;
-
- _vector SourS, SourR, SourT;
- _vector DestS, DestR, DestT;
- XMMatrixDecompose(&SourS, &SourR, &SourT, FinalWorld);
- XMMatrixDecompose(&DestS, &DestR, &DestT, m_pTransformCom->Get_XMWorldMatrix());
-
- _vector finalR = XMQuaternionSlerp(SourR, DestR, fTimeDelta);
- _vector finalT = XMVectorLerp(SourT, DestT, fTimeDelta);
-
- _matrix finalMat = XMMatrixAffineTransformation(DestS, XMVectorZero(), finalR, finalT);
-
- m_pTransformCom->Set_WorldMatrix(finalMat);
- m_pCharacter_Controller->Set_Position(finalMat.r[3]);
+ Attach_Broom();
};
Desc.funcLateUpdate = nullptr;
m_States.emplace(FSMSTATE::BROOM_RIDE_MOVE, CState_Broom_Ride_Move::Create(&Desc));
}
+ {
+ CState_Broom_Hover::STATE_BROOM_HOVER_DESC Desc{};
+ Desc.pOwner = this;
+ Desc.funcEnterEvent = [this]() { Behavior_Broom_HoverEnter(); };
+ Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_Broom_HoverExitCheck(fTimedelta); };
+ Desc.funcExitEvent = [this]() { Behavior_Broom_HoverExit(); };
+ Desc.funcPriorityUpdate = [this](_float fTimeDelta) {
+ _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
+ Attach_Broom();
+ };
+ Desc.funcLateUpdate = nullptr;
+ m_States.emplace(FSMSTATE::HOVER, CState_Broom_Hover::Create(&Desc));
+ }
+
+ {
+ CState_Broom_Fly::STATE_BROOM_FLY_DESC Desc{};
+ Desc.pOwner = this;
+ Desc.funcEnterEvent = [this]() { Behavior_Broom_FlyEnter(); };
+ Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_Broom_FlyExitCheck(fTimedelta); };
+ Desc.funcExitEvent = [this]() { Behavior_Broom_FlyExit(); };
+ Desc.funcPriorityUpdate = [this](_float fTimeDelta) {
+ _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
+ Attach_Broom();
+ };
+ Desc.funcLateUpdate = nullptr;
+ m_States.emplace(FSMSTATE::FLY, CState_Broom_Fly::Create(&Desc));
+ }
+
{
CState_Broom_Dismount::STATE_BROOM_DISMOUNT_DESC Desc{};
Desc.pOwner = this;
@@ -2067,6 +2267,7 @@ void CPlayer::Set_Anim()
m_Animation[STATEANIM::BROOM_RIGHT] = { 714,true };
m_Animation[STATEANIM::BROOM_DOWN] = { 712,true };
m_Animation[STATEANIM::BROOM_UP] = { 715,true };
+ m_Animation[STATEANIM::BROOM_REVELIO] = { 678,false };
m_Animation[STATEANIM::BROOM_MOUNT] = { 734,false };
m_Animation[STATEANIM::BROOM_MOUNT_END] = { 737,false };
@@ -2078,6 +2279,7 @@ void CPlayer::Set_Anim()
m_Animation[STATEANIM::BROOM_HOVER_FWD] = { 700,true };
m_Animation[STATEANIM::BROOM_HOVER_LEFT] = { 701,true };
m_Animation[STATEANIM::BROOM_HOVER_RIGHT] = { 702,true };
+ m_Animation[STATEANIM::BROOM_HOVER_REVELIO] = { 721,false };
m_Animation[STATEANIM::JOG_AIM_STOP_L] = { 295,false };
diff --git a/Jusin154_Team3D/Client/Private/Protego.cpp b/Jusin154_Team3D/Client/Private/Protego.cpp
index 2f73f140a..8d6cdb002 100644
--- a/Jusin154_Team3D/Client/Private/Protego.cpp
+++ b/Jusin154_Team3D/Client/Private/Protego.cpp
@@ -53,6 +53,8 @@ HRESULT CProtego::Initialize(void* pArg)
m_fDuration = 2.5f;
+ m_isLoop = true;
+
return S_OK;
}
diff --git a/Jusin154_Team3D/Client/Private/State_Broom_Fly.cpp b/Jusin154_Team3D/Client/Private/State_Broom_Fly.cpp
new file mode 100644
index 000000000..0d176501c
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/State_Broom_Fly.cpp
@@ -0,0 +1,64 @@
+#include "pch.h"
+#include "State_Broom_Fly.h"
+#include "Unit.h"
+
+
+CState_Broom_Fly::CState_Broom_Fly()
+ :CState_Root()
+{
+}
+
+void CState_Broom_Fly::Enter()
+{
+ __super::Enter();
+}
+
+HRESULT CState_Broom_Fly::Update(_float fTimeDelta)
+{
+ if (nullptr != m_funcPriorityUpdate) {
+ m_funcPriorityUpdate(fTimeDelta);
+ }
+ if (E_FAIL == (__super::Update(fTimeDelta))) {
+ return E_FAIL;
+ }
+ if (nullptr != m_funcLateUpdate) {
+ m_funcLateUpdate(fTimeDelta);
+ }
+ return S_OK;
+}
+
+void CState_Broom_Fly::Exit()
+{
+ __super::Exit();
+}
+
+HRESULT CState_Broom_Fly::Initialize(STATE_BROOM_FLY_DESC* pDesc)
+{
+ if (FAILED(__super::Initialize(pDesc))) {
+ return E_FAIL;
+ }
+ m_funcPriorityUpdate = pDesc->funcPriorityUpdate;
+ m_funcLateUpdate = pDesc->funcLateUpdate;
+ m_pModel = m_pOwner->Get_Component();
+ m_pFSM = m_pOwner->Get_Component();
+
+ return S_OK;
+}
+
+CState_Broom_Fly* CState_Broom_Fly::Create(STATE_BROOM_FLY_DESC* pDesc)
+{
+ CState_Broom_Fly* pInstance = new CState_Broom_Fly;
+ if (FAILED(pInstance->Initialize(pDesc))) {
+ SAFE_RELEASE(pInstance);
+ }
+ return pInstance;
+}
+
+void CState_Broom_Fly::Free()
+{
+ __super::Free();
+}
+
+void CState_Broom_Fly::Describe_Entity()
+{
+}
diff --git a/Jusin154_Team3D/Client/Private/State_Broom_Hover.cpp b/Jusin154_Team3D/Client/Private/State_Broom_Hover.cpp
new file mode 100644
index 000000000..cca209c0c
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/State_Broom_Hover.cpp
@@ -0,0 +1,64 @@
+#include "pch.h"
+#include "State_Broom_Hover.h"
+#include "Unit.h"
+
+
+CState_Broom_Hover::CState_Broom_Hover()
+ :CState_Root()
+{
+}
+
+void CState_Broom_Hover::Enter()
+{
+ __super::Enter();
+}
+
+HRESULT CState_Broom_Hover::Update(_float fTimeDelta)
+{
+ if (nullptr != m_funcPriorityUpdate) {
+ m_funcPriorityUpdate(fTimeDelta);
+ }
+ if (E_FAIL == (__super::Update(fTimeDelta))) {
+ return E_FAIL;
+ }
+ if (nullptr != m_funcLateUpdate) {
+ m_funcLateUpdate(fTimeDelta);
+ }
+ return S_OK;
+}
+
+void CState_Broom_Hover::Exit()
+{
+ __super::Exit();
+}
+
+HRESULT CState_Broom_Hover::Initialize(STATE_BROOM_HOVER_DESC* pDesc)
+{
+ if (FAILED(__super::Initialize(pDesc))) {
+ return E_FAIL;
+ }
+ m_funcPriorityUpdate = pDesc->funcPriorityUpdate;
+ m_funcLateUpdate = pDesc->funcLateUpdate;
+ m_pModel = m_pOwner->Get_Component();
+ m_pFSM = m_pOwner->Get_Component();
+
+ return S_OK;
+}
+
+CState_Broom_Hover* CState_Broom_Hover::Create(STATE_BROOM_HOVER_DESC* pDesc)
+{
+ CState_Broom_Hover* pInstance = new CState_Broom_Hover;
+ if (FAILED(pInstance->Initialize(pDesc))) {
+ SAFE_RELEASE(pInstance);
+ }
+ return pInstance;
+}
+
+void CState_Broom_Hover::Free()
+{
+ __super::Free();
+}
+
+void CState_Broom_Hover::Describe_Entity()
+{
+}
diff --git a/Jusin154_Team3D/Client/Private/StunEffect.cpp b/Jusin154_Team3D/Client/Private/StunEffect.cpp
new file mode 100644
index 000000000..939c7915a
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/StunEffect.cpp
@@ -0,0 +1,206 @@
+#include "pch.h"
+#include "StunEffect.h"
+
+#include "GameInstance.h"
+#include "EffectParts.h"
+#include "Wand.h"
+#include "Player.h"
+
+CStunEffect::CStunEffect(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CEffect_Container{ pDevice, pContext }
+{
+}
+
+CStunEffect::CStunEffect(const CStunEffect& rhs)
+ : CEffect_Container(rhs)
+{
+}
+
+HRESULT CStunEffect::Initialize_Prototype()
+{
+
+ return S_OK;
+
+}
+
+HRESULT CStunEffect::Initialize(void* pArg)
+{
+ if (FAILED(__super::Initialize(pArg)))
+ return E_FAIL;
+
+ if (FAILED(Ready_Components(pArg)))
+ return E_FAIL;
+
+
+ if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Stun")))
+ return E_FAIL;
+
+
+ m_wstrEffectName = L"Stun";
+
+
+ m_fDuration = 3.f;
+
+ m_pStunEffect = Get_PartObject("StunEffect");
+ SAFE_ADDREF(m_pStunEffect);
+
+
+ m_Events.emplace(3.f, [&]() {
+
+ m_BoneMat = nullptr;
+
+ });
+
+ return S_OK;
+}
+
+void CStunEffect::Priority_Update(_float fTimeDelta)
+{
+ __super::Priority_Update(fTimeDelta);
+
+}
+
+void CStunEffect::Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Update(fTimeDelta);
+
+ Update_Event(fTimeDelta);
+
+ if (m_BoneMat == nullptr)
+ return;
+
+ _matrix BoneMat = XMLoadFloat4x4(m_BoneMat);
+
+ for (int i = 0; i < 3; ++i) {
+ BoneMat.r[i] = XMVector3Normalize(BoneMat.r[i]);
+ }
+
+ m_pStunEffect->Get_Component()->Set_WorldMatrix(BoneMat * m_pOwner->Get_Component()->Get_XMWorldMatrix());
+
+ m_pStunEffect->Get_Component()->Rotation(XMVectorSet(0.f, 0.f, XMConvertToRadians(180.f), 0.f));
+
+}
+
+void CStunEffect::Late_Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Late_Update(fTimeDelta);
+
+
+}
+
+HRESULT CStunEffect::Pre_Setting(CGameObject* pObject, void* pArg)
+{
+
+ if (FAILED(__super::Pre_Setting(pObject, nullptr)))
+ return E_FAIL;
+
+ _string strBoneName = *static_cast<_string*>(pArg);
+
+ m_BoneMat = m_pOwner->Get_Component()->Get_BoneMatrixPtr(strBoneName.c_str()) ; // 위치 넘기기
+
+ _matrix BoneMat = XMLoadFloat4x4(m_BoneMat);
+
+ for (int i = 0; i < 3; ++i) {
+ BoneMat.r[i] = XMVector3Normalize(BoneMat.r[i]);
+ }
+
+ m_pStunEffect->Get_Component()->Set_WorldMatrix(BoneMat * m_pOwner->Get_Component()->Get_XMWorldMatrix());
+
+ m_pStunEffect->Get_Component()->Rotation(XMVectorSet(0.f, 0.f , 90.f, 0.f));
+
+ m_pStunEffect->Set_Visible(true);
+
+
+ return S_OK;
+}
+
+HRESULT CStunEffect::Ready_Components(void* pArg)
+{
+ if (FAILED(__super::Ready_Components(pArg))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CStunEffect::Ready_Child()
+{
+ return S_OK;
+}
+
+CStunEffect* CStunEffect::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CStunEffect* pInstance = new CStunEffect(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CStunEffect");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+
+CGameObject* CStunEffect::Clone(void* pArg, CGameObject* pOwner)
+{
+ CStunEffect* pInstance = new CStunEffect(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CStunEffect");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CStunEffect::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);
+ }
+
+
+}
+
+void CStunEffect::Free()
+{
+ __super::Free();
+ Safe_Release(m_pStunEffect);
+
+}
+#ifdef _DEBUG
+void CStunEffect::Describe_Entity()
+{
+
+}
+#endif
+
+HRESULT CStunEffect::Bind_ShaderResources()
+{
+ return S_OK;
+}
+
+
diff --git a/Jusin154_Team3D/Client/Private/TrailObject.cpp b/Jusin154_Team3D/Client/Private/TrailObject.cpp
index 4040b2ee5..50ec43e8d 100644
--- a/Jusin154_Team3D/Client/Private/TrailObject.cpp
+++ b/Jusin154_Team3D/Client/Private/TrailObject.cpp
@@ -92,9 +92,7 @@ void CTrailObject::Late_Update(_float fTimeDelta)
if (m_TrailInfo.isOnlyBlur == true)
return;
- if (m_pGameInstance->isIn_WorldFrustum(Get_WorldPostion(), m_pTransformCom->Get_Radius())) {
- m_pGameInstance->Add_RenderGroup(m_TrailInfo.eRenderOrder, this);
- }
+ m_pGameInstance->Add_RenderGroup(m_TrailInfo.eRenderOrder, this);
}
diff --git a/Jusin154_Team3D/Client/Private/Troll.cpp b/Jusin154_Team3D/Client/Private/Troll.cpp
index 9f557f864..c14d6667d 100644
--- a/Jusin154_Team3D/Client/Private/Troll.cpp
+++ b/Jusin154_Team3D/Client/Private/Troll.cpp
@@ -539,7 +539,14 @@ void CTroll::Describe_Entity()
{
__super::Describe_Entity();
+ _float4x4 socketMat = *m_pModelCom->Get_BoneMatrixPtr("HeadEnd");
+ _string strSocket = "Socket " + to_string(socketMat._41) + to_string(socketMat._42) + to_string(socketMat._43);
+
+ GUI::Text(strSocket.c_str());
+
+
+ m_pTransformCom->Describe_Entity();
}
#endif // _DEBUG
diff --git a/Jusin154_Team3D/Client/Private/TrollSwing.cpp b/Jusin154_Team3D/Client/Private/TrollSwing.cpp
index 8b362594e..dc8d4fff4 100644
--- a/Jusin154_Team3D/Client/Private/TrollSwing.cpp
+++ b/Jusin154_Team3D/Client/Private/TrollSwing.cpp
@@ -39,7 +39,7 @@ HRESULT CTrollSwing::Initialize(void* pArg)
m_wstrEffectName = L"TrollSwing";
- m_fDuration = 3.2f;
+ m_fDuration = 4.2f;
return S_OK;
}
diff --git a/Jusin154_Team3D/Client/Private/Troll_Nomal_Smoke.cpp b/Jusin154_Team3D/Client/Private/Troll_Nomal_Smoke.cpp
index 5766c713b..47fea75e4 100644
--- a/Jusin154_Team3D/Client/Private/Troll_Nomal_Smoke.cpp
+++ b/Jusin154_Team3D/Client/Private/Troll_Nomal_Smoke.cpp
@@ -39,7 +39,7 @@ HRESULT CTroll_Nomal_Smoke::Initialize(void* pArg)
m_wstrEffectName = L"Troll_Nomal_Smoke";
- m_fDuration = 2.5f;
+ m_fDuration = 3.5f;
return S_OK;
}
diff --git a/Jusin154_Team3D/Client/Private/Troll_Rock.cpp b/Jusin154_Team3D/Client/Private/Troll_Rock.cpp
index 3c2c78edc..c88512a42 100644
--- a/Jusin154_Team3D/Client/Private/Troll_Rock.cpp
+++ b/Jusin154_Team3D/Client/Private/Troll_Rock.cpp
@@ -256,7 +256,9 @@ void CTroll_Rock::Free()
void CTroll_Rock::Describe_Entity()
{
-
+ GUI::Begin("TrollRock");
+ GUI::Checkbox("Visible", &m_bVisible);
+ GUI::End();
}
#endif // _DEBUG
diff --git a/Jusin154_Team3D/Client/Private/Troll_Rush_Hit.cpp b/Jusin154_Team3D/Client/Private/Troll_Rush_Hit.cpp
index 16a5a8d98..1e9588849 100644
--- a/Jusin154_Team3D/Client/Private/Troll_Rush_Hit.cpp
+++ b/Jusin154_Team3D/Client/Private/Troll_Rush_Hit.cpp
@@ -39,7 +39,7 @@ HRESULT CTroll_Rush_Hit::Initialize(void* pArg)
m_wstrEffectName = L"Troll_Nomal_Smoke";
- m_fDuration = 2.f;
+ m_fDuration = 3.5f;
return S_OK;
}
@@ -79,13 +79,21 @@ HRESULT CTroll_Rush_Hit::Pre_Setting(CGameObject* pObject, void* pArg)
return E_FAIL;
- _float4 vPos = *static_cast<_float4*>(pArg); // 위치 넘기기
+ _vector vPos = m_pOwner->Get_Component()->Get_Position();
CEffectParts* pSmoke = Get_PartObject("HitSmoke");
+ CEffectParts* pRock_PT_35 = Get_PartObject("Rock_PT_35");
- pSmoke->Get_Component()->Set_State(STATE::POSITION, XMLoadFloat4(&vPos));
+ _vector vLook = m_pOwner->Get_Component()->Get_State(STATE::LOOK);
+
+ vPos += vLook * 2.f;
+
+ pSmoke->Get_Component()->Set_State(STATE::POSITION, vPos);
+ pRock_PT_35->Get_Component()->Set_State(STATE::POSITION, vPos);
pSmoke->Set_Visible(true);
+ pRock_PT_35->Set_Visible(true);
+
return S_OK;
}
diff --git a/Jusin154_Team3D/Client/Private/Troll_States.cpp b/Jusin154_Team3D/Client/Private/Troll_States.cpp
index 6d409eb9e..9652b509d 100644
--- a/Jusin154_Team3D/Client/Private/Troll_States.cpp
+++ b/Jusin154_Team3D/Client/Private/Troll_States.cpp
@@ -415,7 +415,6 @@ void CTroll::Behavior_SwingEnter()
[this]() {m_bLookAt = false; },
0.2f);
-
Troll_Trail_Visible(true);
m_pWeaponTrail->Set_Visible(true);
m_pWeaponTrail->Get_Component()->Reset_Trail();
@@ -452,6 +451,7 @@ void CTroll::SwingHit(_bool& bPlayerHit)
{
vector pxHits;
_uint iHitCount = 0;
+ _float Damage = 0.f;
CheckHammerHits(iHitCount, pxHits);
{
for (_uint i = 0; i < pxHits.size(); ++i) {
@@ -466,7 +466,8 @@ void CTroll::SwingHit(_bool& bPlayerHit)
continue;
}
CStat* pStat = pUserData->pCharacter->Get_Owner()->Get_Component();
- pStat->Get_Damage(7.f);
+ pStat->Get_Damage(20.f);
+ Damage = 7.f;
bPlayerHit = true;
} break;
case PXOBJECT::ALLY_HITBOX:
@@ -593,6 +594,12 @@ void CTroll::Behavior_StunEnter()
if (iCurrAnimIndex == m_Animation[STATEANIM::RUSH_LOOP].first)
{
pairAnimInfo = m_Animation[STATEANIM::STUN];
+
+ _string strBoneName = "HeadEnd";
+
+ m_pEffectPool->Use_Skill(SKILL_TYPE::TROLL_RUSH_HIT, this);
+ m_pEffectPool->Use_Skill(SKILL_TYPE::STUN, this, &strBoneName);
+
}
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
@@ -600,6 +607,9 @@ void CTroll::Behavior_StunEnter()
[this]() { m_bLookAt = true;
},
0.6f);
+
+
+
}
HRESULT CTroll::Behavior_StunExitCheck(_float fTimeDelta)
@@ -822,7 +832,7 @@ void CTroll::SlamHit(_bool& bPlayerHit)
continue;
}
CStat* pStat = pUserData->pCharacter->Get_Owner()->Get_Component();
- pStat->Get_Damage(10.f);
+ pStat->Get_Damage(20.f);
bPlayerHit = true;
} break;
case PXOBJECT::ALLY_HITBOX:
diff --git a/Jusin154_Team3D/Client/Public/Broom.h b/Jusin154_Team3D/Client/Public/Broom.h
index ce5a87cd8..3e2f59863 100644
--- a/Jusin154_Team3D/Client/Public/Broom.h
+++ b/Jusin154_Team3D/Client/Public/Broom.h
@@ -36,7 +36,7 @@ class CBroom final : public CUnit
_float m_fTurnMaxSpeed = 10.f;
_float m_fFlyTurnMaxSpeed = 9.f;
_float m_fFlyMaxSpeed = 15.f;
- _float m_fHoverMaxSpeed = 7.f;
+ _float m_fHoverMaxSpeed = 5.f;
_float m_fAccel = 1.f;
_float m_fDecel = 1.f;
_float m_fTurnDecel = 0.3f;
diff --git a/Jusin154_Team3D/Client/Public/Client_Enum.h b/Jusin154_Team3D/Client/Public/Client_Enum.h
index 034029cb5..201976bb7 100644
--- a/Jusin154_Team3D/Client/Public/Client_Enum.h
+++ b/Jusin154_Team3D/Client/Public/Client_Enum.h
@@ -12,7 +12,7 @@ namespace Client
enum class SHADER_PASS_PARTICLE { EXPLOSION, END };
enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, TRAIL_BLEND, TRAILWB_FOR_BLEND, TRAIL_BLUR, TRAIL_BLOOM, END };
enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, BLEND, BLEND_NOWORLD, BLOOM, BLOOM_NOWORLD, BLUR_NO_EMMISVE, BLUR_NO_WORLD_NO_EMISSIVE, WEIGHTBLEND_FOR_BLEND, END };
- enum class SHADER_PASS_UIEDITOR { DEFAULT, LOGO, LOGO_TEXT, LOGO_GLOW, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, TYPE, HPBAR, MAGIC_METER, MAGIC_ICON, REMOVEUV, REVELIO, POTION, MAGIC_ITEM, SPELL_PREVIEW, SPELL_HEADER, SPELL_HEADER_LINE, SPELL_DRAG, CAMERA_LOCKON, LODING_SCREEN, ENEMY_HPBAR, BOSS_HPBAR, END };
+ enum class SHADER_PASS_UIEDITOR { DEFAULT, LOGO, LOGO_TEXT, LOGO_GLOW, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, TYPE, HPBAR, MAGIC_METER, MAGIC_ICON, REMOVEUV, REVELIO, POTION, MAGIC_ITEM, SPELL_PREVIEW, SPELL_HEADER, SPELL_HEADER_LINE, SPELL_DRAG, CAMERA_LOCKON, LODING_SCREEN, ENEMY_HPBAR, BOSS_HPBAR, ENEMY_DETECTION, END };
enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, UVALPHABLEND, MAGIC_METER, SPELL_LIST, EESSENTIAL_SPELL_SOLT, EESSENTIAL_SPELL, COLOR, SPELL_HOVER, SPELL_SLOT_EFFECT, SPELL_SLOT, END };
enum class UI_STATE { GAMEPLAYER, SPELL, POTION, INVENTORY, END };
@@ -20,6 +20,7 @@ namespace Client
enum class EFFECT_TYPE { EFFECT, TRAIL, END };
enum class SKILL_TYPE {
+ /* 마법 */
ARRESTO_MOMENTUM, GLACIUS, LEVIOSO, TRANSFORM, // 노란색
ACCIO, DEPULSO, DESCENDO, FLIPENDO, // 보라색
CONFRINGO, DIFFINDO, EXPELLIARMUS, BOMBARDA, INCENDIO, // 빨간색
@@ -29,10 +30,22 @@ namespace Client
BEAST_PETTING_BRUSH, BEAST_FEED, NAB_SACK, // 하늘색
JAP, REVELIO, PROTEGO, STUPEFY, // 검은색
ANCIENT_MAGIC_THROW, ANCIENT_MAGIC, ALOHOMORA, PETRIFICUS_TOTALUS,
+
+ /*상태 이펙트*/
+
+ STUN,
+
+ /*사이드*/
JAP_SIDE, BOMBARDA_SIDE, DESCENDO_SIDE, LEVIOSO_SIDE, WAND_END,
+ /*트롤*/
TROLL_ATTACK, TROLL_RUSH_HIT, TROLL_NOMAL_SMOKE, GOBLIN_PROTEGO,
+
+ /*고블린*/
GOBLIN_ATTACK,
+
+ /*고블린 메이지*/
+ GOBLIN_MAGE_ATTACK , GOBLIN_MAGE_DOWN , GOBLIN_MAGE_SIDE,
END
};
diff --git a/Jusin154_Team3D/Client/Public/Effect_Container.h b/Jusin154_Team3D/Client/Public/Effect_Container.h
index ef5f506f0..ae284374e 100644
--- a/Jusin154_Team3D/Client/Public/Effect_Container.h
+++ b/Jusin154_Team3D/Client/Public/Effect_Container.h
@@ -38,7 +38,7 @@ class CEffect_Container abstract : public CContainerObject
HRESULT Reset_EffectParts();
_int CollisionCheck();
ON_COLLISION_INFO SweepTarget(_vector StartPos, _vector EndPos, _float fRadius, _bool isTerrainCollision = false);
-
+ ON_COLLISION_INFO MonsterSweepTarget(_vector StartPos, _vector EndPos, _float fRadius, _bool isTerrainCollision = false);
protected:
_float4 m_vStartPos = {};
diff --git a/Jusin154_Team3D/Client/Public/Enemy_Detection.h b/Jusin154_Team3D/Client/Public/Enemy_Detection.h
new file mode 100644
index 000000000..22dfdc79f
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/Enemy_Detection.h
@@ -0,0 +1,76 @@
+#pragma once
+
+#include "Client_Define.h"
+#include "PartObject.h"
+
+NS_BEGIN(Client)
+
+class CEnemy_Detection final : public CPartObject
+{
+public:
+ typedef struct tagEnemyDetection : public CPartObject::PARTOBJECT_DESC
+ {
+ const _float4x4* pSocketMatrices = {};
+ }ENEMY_DETECTION_DESC;
+private:
+ CEnemy_Detection(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CEnemy_Detection(const CEnemy_Detection& Prototype);
+ virtual ~CEnemy_Detection() = default;
+
+public:
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+ virtual void Priority_Update(_float fTimeDelta) override;
+ virtual void Update(_float fTimeDelta) override;
+ virtual void Late_Update(_float fTimeDelta) override;
+ virtual HRESULT Render() override;
+ HRESULT Render_Disolve();
+
+private:
+ void SizeUpX(_float fX);
+ void SizeUpY(_float fY);
+ void SizeUpdate(_float fSize);
+
+private:
+ const _float4x4* m_pSocketMatrices = { };
+ CTexture* m_pDiffuse_TextureCom = { nullptr };
+ CTexture* m_pDiffuse_TextureCom1 = { nullptr };
+ CTexture* m_pDiffuse_TextureCom2 = { nullptr };
+ CTexture* m_pDiffuse_TextureCom3 = { nullptr };
+ CTexture* m_pDiffuse_TextureCom4 = { nullptr };
+ CTexture* m_pDiffuse_TextureCom5 = { nullptr };
+ CShader* m_pShaderCom = { nullptr };
+ CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
+
+ _vector m_vPosition{};
+
+ _float4 m_vImageposi{};
+
+ _bool m_bStep1 = { false };
+ _bool m_bStep2 = { false };
+ _bool m_bStep3 = { false };
+
+ _bool m_fActive = { false };
+ _bool m_fSizeUp = { false };
+
+ _float3 m_fOrigin_Size{};
+
+ _float2 m_fSize;
+
+ _float m_fAlpha{};
+ _float m_fTime{};
+private:
+ HRESULT Ready_Components();
+ HRESULT Bind_ShaderResources();
+
+public:
+ static CEnemy_Detection* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr)override;
+ virtual void Free() override;
+
+#ifdef _DEBUG
+ void Describe_Entity() override;
+#endif // _DEBUG
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Client/Public/Goblin.h b/Jusin154_Team3D/Client/Public/Goblin.h
index d91dd4d87..53a62d583 100644
--- a/Jusin154_Team3D/Client/Public/Goblin.h
+++ b/Jusin154_Team3D/Client/Public/Goblin.h
@@ -4,6 +4,7 @@
#include "Monster.h"
#include "CallBack_Monster_Behavior.h"
#include "CallBack_Monster_HitReport.h"
+#include "Enemy_Detection.h"
NS_BEGIN(Client)
@@ -34,6 +35,7 @@ class CGoblin final : public CMonster
private:
CCallBack_Monster_Behavior* m_pCallBack_Behavior = { nullptr };
CCallBack_Monster_HitReport* m_pCallBack_HitReport = { nullptr };
+ CEnemy_Detection* m_pDetection = { nullptr };
CCharacter_Controller* m_pCharacter_Controller = { nullptr };
CRigidBody_Dynamic* m_pRigidBody = { nullptr };
diff --git a/Jusin154_Team3D/Client/Public/Goblin_Mage.h b/Jusin154_Team3D/Client/Public/Goblin_Mage.h
index 1e0047867..cc6a80c30 100644
--- a/Jusin154_Team3D/Client/Public/Goblin_Mage.h
+++ b/Jusin154_Team3D/Client/Public/Goblin_Mage.h
@@ -67,6 +67,8 @@ class CGoblin_Mage final : public CMonster
private:
virtual void Add_FSM();
virtual void Set_Anim();
+private:
+ class CEffectPool* m_pEffectPool = { nullptr };
_float m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::END)] = {};
_float m_fMaxSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::END)] = { 30.f,5.f,30.f,20.f };
@@ -117,8 +119,7 @@ class CGoblin_Mage final : public CMonster
void Behavior_DeadEnter();
HRESULT Behavior_DeadExitCheck(_float fTimeDelta);
void Behavior_DeadExit();
-private:
- class CEffectPool* m_pEffectPool = nullptr;
+
};
NS_END
diff --git a/Jusin154_Team3D/Client/Public/HpBarBG.h b/Jusin154_Team3D/Client/Public/HpBarBG.h
index f38f8c751..2ca6f2ee4 100644
--- a/Jusin154_Team3D/Client/Public/HpBarBG.h
+++ b/Jusin154_Team3D/Client/Public/HpBarBG.h
@@ -30,6 +30,8 @@ class CHpBarBG final : public CElementObject
void Heal(_float fTimeDelta);
void Hit(_float fTimeDelta);
virtual void SizeUpX(_float SizeX) override;
+ void Set_Damage(_float fDamage);
+
private:
virtual HRESULT Bind_ShaderResources() override;
virtual HRESULT Ready_Components(void* pArg) override;
@@ -43,6 +45,8 @@ class CHpBarBG final : public CElementObject
CShader* m_pShaderCom = { nullptr };
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
+ CInfoInstance* m_pInfoInstance = { nullptr };
+
_float m_fBlinkTime{};
_float m_fMaxHp{};
_float m_fCurrentHp{};
diff --git a/Jusin154_Team3D/Client/Public/InfoInstance.h b/Jusin154_Team3D/Client/Public/InfoInstance.h
index 2d602bb58..085323e09 100644
--- a/Jusin154_Team3D/Client/Public/InfoInstance.h
+++ b/Jusin154_Team3D/Client/Public/InfoInstance.h
@@ -8,6 +8,7 @@ class CGameInstance;
class CTransform;
class CUnit;
class CState;
+class CStat;
NS_END
NS_BEGIN(Client)
@@ -27,10 +28,12 @@ DECLARE_SINGLETON(CInfoInstance)
void Change_Level();
#pragma region PLAYER_INFO
+ CStat* Get_PlayerStatPtr();
void Update_CameraCoordinateSystem(_float3& vLook, _float3& vRight);
pair<_float3, _float3> Get_CameraCoordinateSystem();
_float Player_Damage();
void Set_Damage(_float fDamage);
+ class CPlater* Get_PlayerInfo();
#pragma endregion
#pragma region MONSTER_INFO
HRESULT Regist_PlayerAlly(CUnit* pUnit);
@@ -89,6 +92,9 @@ DECLARE_SINGLETON(CInfoInstance)
_string m_strLog = {};
#endif // _DEBUG
+private:
+ HRESULT Stat_FileLoad(const _char* pDirectoryPath);
+
public:
virtual void Free() override;
};
diff --git a/Jusin154_Team3D/Client/Public/Loader.h b/Jusin154_Team3D/Client/Public/Loader.h
index c75611a58..cb0ecf432 100644
--- a/Jusin154_Team3D/Client/Public/Loader.h
+++ b/Jusin154_Team3D/Client/Public/Loader.h
@@ -40,7 +40,6 @@ class CLoader final : public CBase
private:
HRESULT Asset_FileLoad(const _char* pDirectoryPath, const _tchar* pPreName, function AddPrototypeEvent);
- HRESULT Stat_FileLoad(const _char* pDirectoryPath);
future*> Deferred_FolderLoad(const _char* pDirectoryPath, const _char* pFileExt, _bool bUseTag);
future*> Deferred_ModelLoad(MODEL eType, const _char* pDirectoryPath, _fmatrix PreTransform, const _tchar* pPrototypeTag);
void Ready_MapModels(vector*>>& jobMapModels);
diff --git a/Jusin154_Team3D/Client/Public/MageSide.h b/Jusin154_Team3D/Client/Public/MageSide.h
new file mode 100644
index 000000000..70b20f270
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/MageSide.h
@@ -0,0 +1,50 @@
+#pragma once
+
+#include "Client_Define.h"
+#include "Effect_Container.h"
+
+NS_BEGIN(Engine)
+NS_END
+
+NS_BEGIN(Client)
+
+class CMageSide final : public CEffect_Container
+{
+private:
+ CMageSide(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CMageSide(const CMageSide& rhs);
+ virtual ~CMageSide() = default;
+
+public:
+ virtual void Priority_Update(_float fTimeDelta) override;
+ virtual void Update(_float fTimeDelta) override;
+ virtual void Late_Update(_float fTimeDelta) override;
+
+public:
+ virtual HRESULT Pre_Setting(CGameObject* pObject, void* pArg = nullptr) override;
+
+private:
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+ virtual HRESULT Ready_Components(void* pArg) override;
+ HRESULT Ready_Child();
+ HRESULT Bind_ShaderResources() override;
+ virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
+private:
+ _wstring m_wstrEffectName = {};
+
+ class CEffectParts* m_pMage_PT = { nullptr };
+ class CTrailObject* m_pMage_Trail = { nullptr };
+
+ _bool m_isParticleEnd = {};
+ _bool m_isTrailEnd = {};
+ _float4x4 m_TrailStopMat = {};
+
+public:
+ static CMageSide* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual void Free() override;
+ CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
+ void Describe_Entity() override;
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Client/Public/Mage_Down_Attack.h b/Jusin154_Team3D/Client/Public/Mage_Down_Attack.h
new file mode 100644
index 000000000..116acdc82
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/Mage_Down_Attack.h
@@ -0,0 +1,44 @@
+#pragma once
+
+#include "Client_Define.h"
+#include "Effect_Container.h"
+
+NS_BEGIN(Engine)
+NS_END
+
+NS_BEGIN(Client)
+
+class CMage_Down_Attack final : public CEffect_Container
+{
+private:
+ CMage_Down_Attack(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CMage_Down_Attack(const CMage_Down_Attack& rhs);
+ virtual ~CMage_Down_Attack() = default;
+
+public:
+ virtual void Priority_Update(_float fTimeDelta) override;
+ virtual void Update(_float fTimeDelta) override;
+ virtual void Late_Update(_float fTimeDelta) override;
+
+public:
+ virtual HRESULT Pre_Setting(CGameObject* pObject, void* pArg = nullptr) override;
+
+private:
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+ virtual HRESULT Ready_Components(void* pArg) override;
+ HRESULT Ready_Child();
+ HRESULT Bind_ShaderResources() override;
+ virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
+private:
+ _wstring m_wstrEffectName = {};
+
+
+public:
+ static CMage_Down_Attack* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual void Free() override;
+ CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
+ void Describe_Entity() override;
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Client/Public/Mage_Nomal_Attack.h b/Jusin154_Team3D/Client/Public/Mage_Nomal_Attack.h
new file mode 100644
index 000000000..6716d924a
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/Mage_Nomal_Attack.h
@@ -0,0 +1,54 @@
+#pragma once
+
+#include "Client_Define.h"
+#include "Effect_Container.h"
+
+NS_BEGIN(Engine)
+NS_END
+
+NS_BEGIN(Client)
+
+class CMage_Nomal_Attack final : public CEffect_Container
+{
+private:
+ CMage_Nomal_Attack(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CMage_Nomal_Attack(const CMage_Nomal_Attack& rhs);
+ virtual ~CMage_Nomal_Attack() = default;
+
+public:
+ virtual void Priority_Update(_float fTimeDelta) override;
+ virtual void Update(_float fTimeDelta) override;
+ virtual void Late_Update(_float fTimeDelta) override;
+
+public:
+ virtual HRESULT Pre_Setting(CGameObject* pObject, void* pArg = nullptr) override;
+
+private:
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+ virtual HRESULT Ready_Components(void* pArg) override;
+ HRESULT Ready_Child();
+ HRESULT Bind_ShaderResources() override;
+ virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
+private:
+ _wstring m_wstrEffectName = {};
+
+ class CEffectParts* m_pCircle_Proj = { nullptr };
+ class CEffectParts* m_pProj_PT1 = { nullptr };
+ class CEffectParts* m_pProj_PT2 = { nullptr };
+
+ _float3 m_vLook = {};
+ _float m_fLinearSpeed = 0.3f;
+
+ _float4 m_vStartPos = { 0.f, 0.f, 0.f, 1.f };
+ _float4 m_vTargetPos = { 0.f, 0.f, 10.f, 1.f };
+private:
+ class CInfoInstance* m_pInfoInstance = { nullptr };
+public:
+ static CMage_Nomal_Attack* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual void Free() override;
+ CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
+ void Describe_Entity() override;
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Client/Public/MiniMap_Camera.h b/Jusin154_Team3D/Client/Public/MiniMap_Camera.h
new file mode 100644
index 000000000..53d2b6e2d
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/MiniMap_Camera.h
@@ -0,0 +1,51 @@
+#pragma once
+
+#include "Client_Define.h"
+#include "Camera.h"
+
+NS_BEGIN(Client)
+
+class CMiniMap_Camera final : public CCamera
+{
+public:
+ typedef struct tagCamera_Gaze : public CCamera::CAMERA_DESC
+ {
+ }CAMERA_GAZE_DESC;
+private:
+ CMiniMap_Camera(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CMiniMap_Camera(const CMiniMap_Camera& rhs);
+ virtual ~CMiniMap_Camera() = default;
+
+public:
+ virtual void Priority_Update(_float fTimeDelta) override;
+ virtual void Update(_float fTimeDelta) override;
+ void Update_LerpTimer(Engine::_float fTimeDelta);
+ void Enable_FollowLerp();
+ void Enable_LookLerp();
+ void Toggle_Priority();
+ virtual void Late_Update(_float fTimeDelta) override;
+ virtual HRESULT Render() override;
+
+private:
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+ virtual HRESULT Ready_Components(void* pArg) override;
+ HRESULT Bind_ShaderResources() override;
+
+private:
+ CInfoInstance* m_pInfoInstance = { nullptr };
+
+
+public:
+ static CMiniMap_Camera* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
+ virtual void Free() override;
+
+
+#ifdef _DEBUG
+ void Describe_Entity() override;
+
+#endif // _DEBUG
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Client/Public/Player.h b/Jusin154_Team3D/Client/Public/Player.h
index e68302908..237a6cbb1 100644
--- a/Jusin154_Team3D/Client/Public/Player.h
+++ b/Jusin154_Team3D/Client/Public/Player.h
@@ -21,6 +21,7 @@ class CPlayer final : public CUnit
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr)override;
virtual void OnHit(CGameObject* pOther, CGameObject* pCaller = nullptr)override;
_bool Get_Aim() { return m_bAim; }
+ void Set_SpellHit(_bool bHit) { m_bSpellHit = bHit; }
#ifdef _DEBUG
void Render_CameraCoordinateSystem();
#endif // _DEBUG
@@ -115,6 +116,12 @@ class CPlayer final : public CUnit
_float m_fAnimSpeed = {};
_bool m_bOnce = { };
_bool m_bLookAt = {false};
+ _bool m_bSpellHit = {};
+ _float3 m_BroomScale = { 0.f, 0.f, 0.f };
+ _float3 m_TargetScale = { 1.f, 1.f, 1.f };
+ _float m_fScaleSmoothSpeed = 2.5f;
+
+
HRESULT InputAction();
HRESULT InputMove();
@@ -167,12 +174,21 @@ class CPlayer final : public CUnit
HRESULT Behavior_Broom_Ride_MoveExitCheck(_float fTimeDelta);
void Behavior_Broom_Ride_MoveExit();
+ void Behavior_Broom_HoverEnter();
+ HRESULT Behavior_Broom_HoverExitCheck(_float fTimeDelta);
+ void Behavior_Broom_HoverExit();
+
+ void Behavior_Broom_FlyEnter();
+ HRESULT Behavior_Broom_FlyExitCheck(_float fTimeDelta);
+ void Behavior_Broom_FlyExit();
+
void Behavior_Broom_DismountEnter();
HRESULT Behavior_Broom_DismountExitCheck(_float fTimeDelta);
void Behavior_Broom_DismountExit();
void Player_InterpTurn(_float fTimeDelta);
void Throwing_Interactive();
+ void Attach_Broom();
#pragma endregion
private:
diff --git a/Jusin154_Team3D/Client/Public/PlayerInfo.h b/Jusin154_Team3D/Client/Public/PlayerInfo.h
index 3a4fa0654..d48e44c0a 100644
--- a/Jusin154_Team3D/Client/Public/PlayerInfo.h
+++ b/Jusin154_Team3D/Client/Public/PlayerInfo.h
@@ -6,6 +6,7 @@
NS_BEGIN(Engine)
class CGameInstance;
class CTransform;
+class CStat;
NS_END
NS_BEGIN(Client)
@@ -16,6 +17,7 @@ class CPlayerInfo final : public CBase
CPlayerInfo();
~CPlayerInfo() = default;
public:
+ CStat* Get_PlayerStatPtr();
void Update(_float fTimeDelta);
void Change_Level();
@@ -28,7 +30,8 @@ class CPlayerInfo final : public CBase
ID3D11DeviceContext* m_pContext = { nullptr };
private:
- CTransform* m_pTransform = { nullptr };
+ CTransform* m_pTransform = { nullptr };
+ CStat* m_pStat = { nullptr };
_float3 m_vCameraLookDir = { 0.f, 0.f, 1.f, };
_float3 m_vCameraRightDir = { 1.f, 0.f, 0.f };
diff --git a/Jusin154_Team3D/Client/Public/State_Broom_Fly.h b/Jusin154_Team3D/Client/Public/State_Broom_Fly.h
new file mode 100644
index 000000000..39a0da6b2
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/State_Broom_Fly.h
@@ -0,0 +1,36 @@
+#pragma once
+#include "Client_Define.h"
+#include "State_Root.h"
+
+NS_BEGIN(Client)
+
+class CState_Broom_Fly final : public CState_Root
+{
+public:
+ typedef struct tagBroomFly : public CState_Root::STATE_ROOT_DESC {
+ function funcPriorityUpdate = { nullptr };
+ function funcLateUpdate = { nullptr };
+ }STATE_BROOM_FLY_DESC;
+private:
+ CState_Broom_Fly();
+ virtual ~CState_Broom_Fly() = default;
+
+public:
+ virtual void Enter();
+ virtual HRESULT Update(_float fTimeDelta);
+ virtual void Exit();
+
+private:
+ function m_funcPriorityUpdate = { nullptr };
+ function m_funcLateUpdate = { nullptr };
+
+private:
+ HRESULT Initialize(STATE_BROOM_FLY_DESC* pDesc);
+
+public:
+ static CState_Broom_Fly* Create(STATE_BROOM_FLY_DESC* pDesc);
+ virtual void Free() override;
+ virtual void Describe_Entity();
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Client/Public/State_Broom_Hover.h b/Jusin154_Team3D/Client/Public/State_Broom_Hover.h
new file mode 100644
index 000000000..3a9c6fa41
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/State_Broom_Hover.h
@@ -0,0 +1,36 @@
+#pragma once
+#include "Client_Define.h"
+#include "State_Root.h"
+
+NS_BEGIN(Client)
+
+class CState_Broom_Hover final : public CState_Root
+{
+public:
+ typedef struct tagBroomHover : public CState_Root::STATE_ROOT_DESC {
+ function funcPriorityUpdate = { nullptr };
+ function funcLateUpdate = { nullptr };
+ }STATE_BROOM_HOVER_DESC;
+private:
+ CState_Broom_Hover();
+ virtual ~CState_Broom_Hover() = default;
+
+public:
+ virtual void Enter();
+ virtual HRESULT Update(_float fTimeDelta);
+ virtual void Exit();
+
+private:
+ function m_funcPriorityUpdate = { nullptr };
+ function m_funcLateUpdate = { nullptr };
+
+private:
+ HRESULT Initialize(STATE_BROOM_HOVER_DESC* pDesc);
+
+public:
+ static CState_Broom_Hover* Create(STATE_BROOM_HOVER_DESC* pDesc);
+ virtual void Free() override;
+ virtual void Describe_Entity();
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Client/Public/StunEffect.h b/Jusin154_Team3D/Client/Public/StunEffect.h
new file mode 100644
index 000000000..ed8f17034
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/StunEffect.h
@@ -0,0 +1,44 @@
+#pragma once
+
+#include "Client_Define.h"
+#include "Effect_Container.h"
+
+NS_BEGIN(Engine)
+NS_END
+
+NS_BEGIN(Client)
+
+class CStunEffect final : public CEffect_Container
+{
+private:
+ CStunEffect(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CStunEffect(const CStunEffect& rhs);
+ virtual ~CStunEffect() = default;
+
+public:
+ virtual void Priority_Update(_float fTimeDelta) override;
+ virtual void Update(_float fTimeDelta) override;
+ virtual void Late_Update(_float fTimeDelta) override;
+
+public:
+ virtual HRESULT Pre_Setting(CGameObject* pObject, void* pArg = nullptr) override;
+
+private:
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+ virtual HRESULT Ready_Components(void* pArg) override;
+ HRESULT Ready_Child();
+ HRESULT Bind_ShaderResources() override;
+ virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
+private:
+ _wstring m_wstrEffectName = {};
+ class CEffectParts* m_pStunEffect = { nullptr };
+ const _float4x4* m_BoneMat = { nullptr };
+public:
+ static CStunEffect* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual void Free() override;
+ CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
+ void Describe_Entity() override;
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Client/Public/Troll_Rock.h b/Jusin154_Team3D/Client/Public/Troll_Rock.h
index 51ec72aae..2b0e8fd4e 100644
--- a/Jusin154_Team3D/Client/Public/Troll_Rock.h
+++ b/Jusin154_Team3D/Client/Public/Troll_Rock.h
@@ -28,7 +28,6 @@ class CTroll_Rock final : public CPartObject
private:
const _float4x4* m_pSocketMatrices = { };
- _bool m_bVisible = { false };
_float4 m_vStartPos = {};
PSX::PxSweepBufferN<12> m_SweepBuffer = {};
CShader* m_pShaderCom = { nullptr };
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Goblin/GoblinProtego/ProtegoCircle.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Goblin/GoblinProtego/ProtegoCircle.bin
index 009e7163d..45369ad4c 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Goblin/GoblinProtego/ProtegoCircle.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Goblin/GoblinProtego/ProtegoCircle.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:4fe532820dc147021997dd1b5a9c395e9e7ba0d8e206b0b9e1ab80cc68172f1d
-size 1121
+oid sha256:b1266a631eb89d6f8c721e7f9aa8f0a2f7ef3c7c79fa8bf47381968105ee3eee
+size 1113
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Goblin/GoblinProtego/ProtegoSphere.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Goblin/GoblinProtego/ProtegoSphere.bin
index b68fb28ba..544b8eff1 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Goblin/GoblinProtego/ProtegoSphere.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Goblin/GoblinProtego/ProtegoSphere.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:72db8483c996edbc3ca3f5de53be4d9ab2855eaf7984eb76d7b4ed6ce369406d
-size 1096
+oid sha256:79f5808f12082c1177f3ba55522759c73252e9031370c7ba332a44e85fd35b76
+size 1093
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/DownAttack/BottomPT0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/DownAttack/BottomPT0.bin
index a89fab778..874279fb5 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/DownAttack/BottomPT0.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/DownAttack/BottomPT0.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:dc4010ad9ad0bef8ddce15dd83cd1275fa60582e27baf059db85008cd7220f41
+oid sha256:2314092b91b1c16757a03d16326e6785850b33b485c1e16e4a66e0da08d3d981
size 1245
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/DownAttack/BottomPT1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/DownAttack/BottomPT1.bin
new file mode 100644
index 000000000..731874f6b
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/DownAttack/BottomPT1.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:808a35db7b51e220a4cb8b49208bdc674f79270ff77a9bf34e3d2337edffeea0
+size 1258
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/DownAttack/Down_R.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/DownAttack/Down_R.bin
index 7c5fb7ac3..ff76ef594 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/DownAttack/Down_R.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/DownAttack/Down_R.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:5008341edd23e88874301e24e2ea47693596d5d3fb0c8b96b624c03b1b5b305e
+oid sha256:b6bee4aef8a79cdfb4bf0774d8030c1fb8dd74de73f7877459f5cb4664e83fe7
size 1117
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/DownAttack/Round_PT.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/DownAttack/Round_PT.bin
new file mode 100644
index 000000000..4ab14a1d9
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/DownAttack/Round_PT.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f5e5a638c6ce4f8f8197a2f60b5b6032d6729dd19001e82008c1d6111e3dd355
+size 1252
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/DownAttack/Smoke.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/DownAttack/Smoke.bin
new file mode 100644
index 000000000..f612221e7
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/DownAttack/Smoke.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:38dfe38192e97262014ae4fc5d6d10b2857fc9ead329f58628f083aa66d4b3f5
+size 1074
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/MageSide/Mage_PT0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/MageSide/Mage_PT0.bin
new file mode 100644
index 000000000..1d6b3c6de
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/MageSide/Mage_PT0.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7325c3fa9c20f35ba837aa51eb2e8e2c0aca8cc10b855a6ef1f4573c18f2b969
+size 1230
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/MageSide/Mage_Trail.trail b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/MageSide/Mage_Trail.trail
new file mode 100644
index 000000000..7f866125d
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/MageSide/Mage_Trail.trail differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Circle_Proj.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Circle_Proj.bin
new file mode 100644
index 000000000..925aac3cf
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Circle_Proj.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f9953c5a1d5d26855f5934d44376039565fef9ee629542776ef04711d6691492
+size 983
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Hit_Lay_Corrupted.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Hit_Lay_Corrupted.bin
new file mode 100644
index 000000000..b96e9d30f
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Hit_Lay_Corrupted.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:81bb14f98e50c536b4555c95c2a8d358fed372e09bd99766be40f71658896a76
+size 1103
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Hit_PT_Corrupted.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Hit_PT_Corrupted.bin
new file mode 100644
index 000000000..97b547df8
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Hit_PT_Corrupted.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:30f5c0a250672c22692f4c260e07a7cafe73fe89f32e5b4046d494e54b359e6d
+size 1235
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Hit_R.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Hit_R.bin
new file mode 100644
index 000000000..754ede929
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Hit_R.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3dba1a364b5a2972ed7f481d533f7b1937a82ed8b164076460a4c3469ac77bf0
+size 1132
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Proj_PT.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Proj_PT.bin
new file mode 100644
index 000000000..4ecbd9329
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Proj_PT.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:92d2a6d0e0bb831ae7f5bd80fbe7cd6591adcfd4bc4b301a5aa667c48df10903
+size 1230
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Proj_PT2.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Proj_PT2.bin
new file mode 100644
index 000000000..6501c0676
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Proj_PT2.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d81bf5776b8651208b2e36d9acf0f9de8e7e9d8e70058b2f9c93ff627ef09858
+size 1252
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/GoblinMage/DownAttack.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/GoblinMage/DownAttack.bin
new file mode 100644
index 000000000..e3e1b8b8a
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/GoblinMage/DownAttack.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:27e6a7f6012ca6cec2bf3c4cae789a3f9e0720fedd092f474a6a116253b9d4bf
+size 361
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/GoblinMage/MageSide.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/GoblinMage/MageSide.bin
new file mode 100644
index 000000000..f4ce96cb6
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/GoblinMage/MageSide.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d35ef44f7e2ccae5159b052b7d4e381461eb2f97f5a20f9b6f61fd6a726a1f38
+size 148
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/GoblinMage/NomalAttack.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/GoblinMage/NomalAttack.bin
new file mode 100644
index 000000000..474e35032
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/GoblinMage/NomalAttack.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b09a22224bf492f89024a1de163cedb51e148164767d3815a9a2518d3ee866e1
+size 458
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/TrollRush.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/TrollRush.bin
index 4cd07bb23..6d7bcb288 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/TrollRush.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/TrollRush.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:cd6069fb16443fb38c1b59472360ca064aef911b01498044011e994181dd06f4
-size 70
+oid sha256:e46cc2df7c23715ef079d7be968e29ac99e8b948a1a35a87e308811cdb28af2b
+size 138
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Stun.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Stun.bin
new file mode 100644
index 000000000..ebb47504a
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Stun.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c5ace80b4be9c253a5f80bda46fa68ccd3981fbacfad30bb53c5c92a36252e58
+size 61
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Stun/StunEffect.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Stun/StunEffect.bin
new file mode 100644
index 000000000..9a1cd7e9d
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Stun/StunEffect.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:65288cca05e14c1a1ecb287e36d2ce2ffd8b427f6217cd557df931fabb117a20
+size 1090
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/TP_Test_S0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/TP_Test_S0.bin
new file mode 100644
index 000000000..d0ce54b0f
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/TP_Test_S0.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ca58aadbab22436f5d072c2ad9acc8e9f7af8d00524458a51bcd0c16823a3d2a
+size 996
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/TP_Test_S1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/TP_Test_S1.bin
new file mode 100644
index 000000000..6ae798b86
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/TP_Test_S1.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2dc51483655b161aef6293d6950df6753902e46657916127768aa01e2ce813c9
+size 996
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollNomalSmoke/Rock_PT_15.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollNomalSmoke/Rock_PT_15.bin
index 5cdad11d7..c651ccaca 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollNomalSmoke/Rock_PT_15.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollNomalSmoke/Rock_PT_15.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:63f6f81087a07cb00f8b487dd2820270c4794a1387b4ed13d8c937e027acd6e7
+oid sha256:822dfd0c124da409c10244aba199911ce0c72c53b0fe45fe877ee6d12b8d2c61
size 1023
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollRush/HitSmoke.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollRush/HitSmoke.bin
index 77a9bdde3..c05f98bfb 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollRush/HitSmoke.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollRush/HitSmoke.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:fc390eae893f71f844682d29d5e0957f84084e1e71fd3ccc276dc5df56fd3193
-size 1089
+oid sha256:b873e02c2b075110728bded6203d6c58dda69e18e725b2ecd376b6cea6772fc6
+size 1124
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollRush/Rock_PT_35.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollRush/Rock_PT_35.bin
new file mode 100644
index 000000000..3eaae4d95
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollRush/Rock_PT_35.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:354ba10ad5e30909ff87f27d52760dcfe7a5beac4ff3010ad5c100c717c65190
+size 1023
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollSwing/Rock_PT_25.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollSwing/Rock_PT_25.bin
index 39a5eb571..caddd023c 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollSwing/Rock_PT_25.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollSwing/Rock_PT_25.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:86ddfc69f4752004c34ba936aac4548a6596bea57fbcf36bc1e60eac2bf95111
+oid sha256:f693501254f7fcb522d8b879ca9a02d2f69374ca18c762b8b9b4fb21cfba2acb
size 1031
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli
index f408fe02c..a7608f95e 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli
+++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli
@@ -326,13 +326,13 @@ float2 SelectLerpUV(float2 fAmount, float _fRatio, int iSelectOption)
fRatio = fRatio * fRatio; // EaseInQuad 후반에 속도 증가
break;
case 2:
- fRatio = 1 - pow(1 - fRatio, 2); // EaseOutQuad 초반에 속도 증가
+ fRatio = pow(1 - fRatio, 2); // EaseOutQuad 초반에 속도 증가
break;
case 3:
fRatio = fRatio * fRatio * fRatio; // EaseInCubic 더 강하게 후반 속도 증가
break;
case 4:
- fRatio = 1 - pow(1 - fRatio, 3); // EaseOutCubic 더 강하게 초반 속도 증가
+ fRatio = pow(1 - fRatio, 3); // EaseOutCubic 더 강하게 초반 속도 증가
break;
case 5:
fRatio = 0.5f * (1 - cos(PI * fRatio)); // EaseInOutSin 사인 곡선
@@ -343,9 +343,7 @@ float2 SelectLerpUV(float2 fAmount, float _fRatio, int iSelectOption)
case 7:
fRatio = pow(2, 10 * (fRatio - 1)); // Expo 지수 함수
break;
- case 8:
- fRatio = 1 - pow(1 - fRatio * fRatio, 0.5); // 원형 궤적
- break;
+
}
return fAmount * fRatio;
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl
index a8640cda3..2ed787044 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl
+++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl
@@ -49,6 +49,7 @@ struct ParticleValue
float fDropAttenuation;
float3 vVelocity;
+ float fAcceleration;
};
@@ -77,6 +78,11 @@ cbuffer g_ConstantBuffer : register(b0) // b0 << 이 숫자와 컨스턴트 쉐
bool isNoWorld;
bool isDetphCompareStop;
bool isRandomAniIndex;
+ bool isMoveRight;
+
+ bool isMoveUp;
+ bool isExcludePos;
+ bool isPadding1;
bool isPadding2;
float fTimeDelta;
@@ -107,7 +113,6 @@ void CS_MAIN(
Particle particle = g_ParticleBufferInput[iIndex];
ParticleValue particleValue = g_ParticleValueBufferInput[iIndex];
-
float fGravity = particleValue.fGravity;
float fOnlyDropY = 0.f;
float fRatio = particle.vLifeTime.x / particle.vLifeTime.y;
@@ -137,6 +142,7 @@ void CS_MAIN(
particle.vLook = CurMat[2].xyzw;
particle.vTranslation = CurMat[3].xyzw;
}
+
}
// 라이프타임 움직임
@@ -148,6 +154,7 @@ void CS_MAIN(
if (particle.vLifeTime.x >= particle.vLifeTime.y)
{
+
particleValue.isCompareStop = false;
particleValue.fCollisionTime = 0.f;
@@ -158,15 +165,13 @@ void CS_MAIN(
return ;
}
- //초기화
+ //초기화
particle.vRight = particleValue.vOriginRight;
particle.vUp = particleValue.vOriginUp;
particle.vLook = particleValue.vOriginLook;
particle.vTranslation = particleValue.vOriginTranslation;
-
particle.vLifeTime.x = 0.f;
-
particleValue.vDelay.x = 0.f;
if (isRandomAniIndex == false)
@@ -189,7 +194,7 @@ void CS_MAIN(
fGravity *= (2.f * fRatio - 1.f) / particleValue.fDropAttenuation;
}
- particle.vTranslation.y -= 0.5f * particle.vLifeTime.x * fGravity;
+ particle.vTranslation.y -= 0.5f * fGravity * particle.vLifeTime.x;
fOnlyDropY = particle.vTranslation.y;
}
@@ -205,9 +210,56 @@ void CS_MAIN(
if (particleValue.fDrag < FLT_EPSILON5)
fDrag = 1;
+ float4 vAcceleration = float4(0.f, 0.f, 0.f, 0.f);
+
+ if (particleValue.fAcceleration > FLT_EPSILON5)
+ vAcceleration.xyz = normalize(particle.vLook.xyz) * fRatio * particleValue.fAcceleration;
+
float4 vVelocity = vector(normalize(particle.vLook.xyz) * particleValue.fSpeed, 0.f);
- particle.vTranslation += vVelocity * fTimeDelta * fDrag;
+ particle.vTranslation += vVelocity * fTimeDelta * fDrag + vAcceleration;
+ }
+
+ if (isMoveRight)
+ {
+ float fTime = (particle.vLifeTime.x / particle.vLifeTime.y);
+
+ float fRatio = 1 - (1 - fTime * fTime);
+
+ float fDrag = particleValue.fDrag;
+
+ if (particleValue.fDrag < FLT_EPSILON5)
+ fDrag = 1;
+
+ float4 vAcceleration = float4(0.f, 0.f, 0.f, 0.f);
+
+ if (particleValue.fAcceleration > FLT_EPSILON5)
+ vAcceleration.xyz = normalize(particle.vRight.xyz) * fRatio * particleValue.fAcceleration;
+
+ float4 vVelocity = vector(normalize(particle.vRight.xyz) * particleValue.fSpeed, 0.f);
+
+ particle.vTranslation += vVelocity * fTimeDelta * fDrag + vAcceleration;
+ }
+
+ if (isMoveUp)
+ {
+ float fTime = (particle.vLifeTime.x / particle.vLifeTime.y);
+
+ float fRatio = 1 - (1 - fTime * fTime);
+
+ float fDrag = particleValue.fDrag;
+
+ if (particleValue.fDrag < FLT_EPSILON5)
+ fDrag = 1;
+
+ float4 vAcceleration = float4(0.f, 0.f, 0.f, 0.f);
+
+ if (particleValue.fAcceleration > FLT_EPSILON5)
+ vAcceleration.xyz = normalize(particle.vUp.xyz) * fRatio * particleValue.fAcceleration;
+
+ float4 vVelocity = vector(normalize(particle.vUp.xyz) * particleValue.fSpeed, 0.f);
+
+ particle.vTranslation += vVelocity * fTimeDelta * fDrag + vAcceleration;
}
if (isPivotMove)
@@ -216,17 +268,34 @@ void CS_MAIN(
float3 vDir = normalize(particleValue.vPivot - particleValue.vOriginTranslation.xyz);
+ if (isExcludePos == true)
+ {
+ vDir = normalize(particleValue.vPivot);
+ }
+
float fDrag = particleValue.fDrag;
- if (fSizeLerpOption != 0.f)
- fDrag = SelectLerpUV(float2(particleValue.fSizeDrag, 0.f), fTime, fMoveLerpOption).x;
+ if (fMoveLerpOption != 0.f)
+ fDrag = SelectLerpUV(float2(particleValue.fDrag, 0.f), fTime, fMoveLerpOption).x;
if (particleValue.fDrag < FLT_EPSILON5)
fDrag = 1;
float4 vVelocity = vector(vDir * particleValue.fSpeed , 0.f);
+
+ float4 vAcceleration = float4(0.f,0.f,0.f,0.f);
+
+ if (particleValue.fAcceleration > FLT_EPSILON5)
+ {
+ float fAcceleration = particleValue.fAcceleration;
+
+ if (fMoveLerpOption != 0.f)
+ fAcceleration = SelectLerpUV(float2(fAcceleration, 0.f), fTime, fMoveLerpOption).x;
+
+ vAcceleration.xyz = vDir * fAcceleration;
+ }
- particle.vTranslation += vVelocity * fTimeDelta * fDrag;
+ particle.vTranslation += vVelocity * fTimeDelta * fDrag + vAcceleration;
}
@@ -306,7 +375,7 @@ void CS_MAIN(
float fOldViewZ = vDepthDesc.y * fFar;
- if (vProjPos.w >= fOldViewZ && particle.vLifeTime.x >= 0.3f)
+ if (vProjPos.w >= fOldViewZ && particle.vLifeTime.x >= 0.5f)
{
if (particleValue.isCompareStop == false)
{
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl
index 5465e90a7..fec7287d9 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl
+++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl
@@ -4,6 +4,8 @@
matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix;
Texture2D g_DepthTexture;
+float4 g_CamaraPosition;
+
int g_iImageCountX;
int g_iImageCountY;
@@ -56,11 +58,16 @@ 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_iStep1 = 0;
+int g_iStep2 = 0;
+int g_iStep3 = 0;
+
struct VS_IN
{
float3 vPosition : POSITION;
@@ -1483,6 +1490,158 @@ PS_OUT PS_Boss_HpBer(PS_IN In)
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;
+
+ float3 CamaeraPos = float3(g_CamaraPosition.x, 1.f, g_CamaraPosition.z);
+ float3 UIPos = float3(g_WorldMatrix._41, g_WorldMatrix._42, g_WorldMatrix._43);
+
+ float3 CameraDir = normalize(CamaeraPos - UIPos);
+
+ float angle = atan2(CameraDir.x, CameraDir.z);
+ float cosA = cos(angle);
+ float sinA = sin(angle);
+
+
+ float3 rotation = float3(0.f, 0.f, 0.f);
+
+ rotation.x = In.vPosition.x * cosA - In.vPosition.z * sinA;
+ rotation.y = In.vPosition.y;
+ rotation.z = In.vPosition.x * sinA + In.vPosition.z * cosA;
+
+ float3 worldPos = rotation + UIPos;
+
+ matrix matWVP = mul(g_ViewMatrix, g_ProjMatrix);
+ float4 clipPos = mul(float4(worldPos, 1.0f), matWVP);
+
+ Out.vPosition = clipPos;
+ Out.vTexcoord = In.vTexcoord;
+
+ return Out;
+}
+
+
+PS_OUT PS_Enemy_Detection(PS_IN In)
+{
+ PS_OUT Out;
+
+ 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;
+}
+
technique11 PosTexTechnique11
{
pass Default
@@ -1793,4 +1952,14 @@ technique11 PosTexTechnique11
PixelShader = compile ps_5_0 PS_Boss_HpBer();
}
+ pass PS_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();
+ GeometryShader = NULL;
+ PixelShader = compile ps_5_0 PS_Enemy_Detection();
+ }
+
}
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl
index fb1e911c9..0df171305 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl
+++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl
@@ -37,7 +37,8 @@ struct ParticleValue
float fDropAttenuation;
float3 vVelocity;
-
+ float fAcceleration;
+
};
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Enemy/UI_T_HUD_Ring_Aggroed_Burst.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Enemy/UI_T_HUD_Ring_Aggroed_Burst.png
new file mode 100644
index 000000000..196c1f0d8
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Enemy/UI_T_HUD_Ring_Aggroed_Burst.png differ
diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj b/Jusin154_Team3D/Editor/Default/Editor.vcxproj
index 8071fbad5..8981c3340 100644
--- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj
+++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj
@@ -177,6 +177,7 @@ call Update_Shaders.bat
+
@@ -379,6 +380,7 @@ call Update_Shaders.bat
+
diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters
index 66bcff3a8..b35a3774d 100644
--- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters
+++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters
@@ -562,6 +562,9 @@
{49575102-9b08-494e-bf3f-bdc98774913e}
+
+ {81c6b163-6c8b-47ac-a4b6-e86088ce709f}
+
@@ -1122,6 +1125,9 @@
50.UI\GamePlay_Canvas\Enemy_Panel\Boss_HpBar
+
+ 50.UI\GamePlay_Canvas\Enemy_Panel\Enemy_Detection
+
@@ -1684,6 +1690,9 @@
50.UI\GamePlay_Canvas\Enemy_Panel\Boss_HpBar
+
+ 50.UI\GamePlay_Canvas\Enemy_Panel\Enemy_Detection
+
diff --git a/Jusin154_Team3D/Editor/Private/Broom.cpp b/Jusin154_Team3D/Editor/Private/Broom.cpp
index cfb42833a..c0caa9293 100644
--- a/Jusin154_Team3D/Editor/Private/Broom.cpp
+++ b/Jusin154_Team3D/Editor/Private/Broom.cpp
@@ -27,7 +27,7 @@ HRESULT CBroom::Initialize(void* pArg)
if (FAILED(Ready_Components()))
return E_FAIL;
- m_pModelCom->Set_AnimationIndex(5);
+ m_pModelCom->Set_AnimationIndex(11,true);
return S_OK;
}
diff --git a/Jusin154_Team3D/Editor/Private/EffectPool.cpp b/Jusin154_Team3D/Editor/Private/EffectPool.cpp
index 6b5b2b683..4bbe549e5 100644
--- a/Jusin154_Team3D/Editor/Private/EffectPool.cpp
+++ b/Jusin154_Team3D/Editor/Private/EffectPool.cpp
@@ -44,8 +44,8 @@ HRESULT CEffectPool::Initialize(void* pArg)
if (FAILED(Ready_Components()))
return E_FAIL;
- //if (FAILED(Ready_Effect()))
- // return E_FAIL;
+ if (FAILED(Ready_Effect()))
+ return E_FAIL;
//if (FAILED(Ready_MonsterEffect()))
// return E_FAIL;
diff --git a/Jusin154_Team3D/Editor/Private/Enemy_Detection.cpp b/Jusin154_Team3D/Editor/Private/Enemy_Detection.cpp
new file mode 100644
index 000000000..3d4cd7419
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/Enemy_Detection.cpp
@@ -0,0 +1,377 @@
+#include "pch.h"
+#include "Enemy_Detection.h"
+#include "GameInstance.h"
+
+CEnemy_Detection::CEnemy_Detection(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CElementObject(pDevice, pContext)
+{
+}
+
+CEnemy_Detection::CEnemy_Detection(const CEnemy_Detection& Prototype)
+ : CElementObject(Prototype)
+{
+}
+
+HRESULT CEnemy_Detection::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CEnemy_Detection::Initialize(void* pArg)
+{
+ CUIObject::UIOBJECT_DESC Desc{};
+
+ Desc.fX = 0.f;
+ Desc.fY = 500.f;
+ Desc.fSizeX = 150.f;
+ Desc.fSizeY = 150.f;
+
+ m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
+
+ if (FAILED(__super::Initialize(&Desc)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Ready_Components(pArg)))
+ {
+ return E_FAIL;
+ }
+
+ m_fAlpha = 1.f;
+ m_bStep1 = true;
+ m_vImageposi = _float4(37.5f, 37.5f, 75.f, 75.f);
+ return S_OK;
+}
+
+void CEnemy_Detection::Priority_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ __super::Priority_Update(fTimeDelta);
+}
+
+void CEnemy_Detection::Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+
+ if (m_bFadeIn == true)
+ {
+ if (m_fAlpha <= 1.f)
+ m_fAlpha += fTimeDelta * m_fAlphaTime;
+
+ if (m_fAlpha >= 1.f)
+ {
+ m_bFadeIn = false;
+ m_fAlpha = 1.f;
+ }
+ }
+
+ if (m_bFadeOut == true)
+ {
+ if (m_fAlpha >= 0.f)
+ m_fAlpha -= fTimeDelta;
+
+ if (m_fAlpha <= 0.f)
+ {
+ m_bFadeOut = false;
+ m_fAlpha = 0.f;
+ }
+ }
+
+ if (m_pGameInstance->Key_Pressing(DIK_Q))
+ {
+ m_fTime += fTimeDelta * m_fTimeMult;
+ if (m_fTime >= 2.f)
+ {
+ if (m_bStep1 == true)
+ {
+ m_bStep1 = false;
+ m_bStep2 = true;
+ m_bStep3 = false;
+ m_fTime = 0.f;
+ }
+ else if (m_bStep2 == true)
+ {
+ m_bStep1 = false;
+ m_bStep2 = false;
+ m_bStep3 = true;
+ m_fTime = 0.f;
+ }
+ else if (m_bStep3 == true)
+ {
+ m_bStep1 = false;
+ m_bStep2 = false;
+ m_bStep3 = true;
+ m_fAlpha -= fTimeDelta * m_fAlphaTime;
+ }
+ }
+ }
+
+ else if (m_pGameInstance->Key_Up(DIK_Q))
+ {
+ m_fTime = 0.f;
+ m_bStep1 = true;
+ m_bStep2 = false;
+ m_bStep3 = false;
+ m_bHover = false;
+ m_fAlpha = 1.f;
+ SizeUpX(m_fOrigin_Size.x);
+ SizeUpY(m_fOrigin_Size.y);
+ m_vImageposi.z = 75.f;
+ m_vImageposi.w = 75.f;
+ }
+
+ if (m_bStep3 == true)
+ {
+ if (m_bHover == false)
+ {
+ SizeUpX(m_fSizeX + 10.f);
+ SizeUpY(m_fSizeY + 10.f);
+ m_vImageposi.z += 10.f;
+ m_vImageposi.w += 10.f;
+ m_bHover = true;
+ }
+ }
+
+ if (m_fSizeX != m_fOrigin_Size.x)
+ {
+ SizeUpdate(-fTimeDelta * 10.f);
+ m_vImageposi.z -= fTimeDelta;
+ m_vImageposi.w -= fTimeDelta;
+ }
+
+ if (m_fAlpha <= 0.f)
+ m_fAlpha = 0.f;
+
+ __super::Update(fTimeDelta);
+
+}
+
+void CEnemy_Detection::Late_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ if (m_bVisible) {
+ m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
+ }
+ __super::Late_Update(fTimeDelta);
+}
+
+HRESULT CEnemy_Detection::Render()
+{
+ if (FAILED(Bind_ShaderResources()))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ENEMY_DETECTION))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Bind_Resources()))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Render()))
+ {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+_vector CEnemy_Detection::Get_WorldPostion()
+{
+ return m_pTransformCom->Get_State(STATE::POSITION);
+}
+
+HRESULT CEnemy_Detection::Bind_ShaderResources()
+{
+ if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom1->Bind_ShaderResource(m_pShaderCom, "g_Texture1", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom2->Bind_ShaderResource(m_pShaderCom, "g_Texture2", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom3->Bind_ShaderResource(m_pShaderCom, "g_Texture3", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom4->Bind_ShaderResource(m_pShaderCom, "g_Texture4", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom5->Bind_ShaderResource(m_pShaderCom, "g_Texture5", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_iSpellType", &m_iSpellType, sizeof(_int))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_iStep1", &m_bStep1, sizeof(_bool))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_iStep2", &m_bStep2, sizeof(_bool))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_iStep3", &m_bStep3, sizeof(_bool))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageSipos1", &m_vImageposi, sizeof(_float4))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_vScale, sizeof(_float2))))
+ {
+ return E_FAIL;
+ }
+ return S_OK;
+}
+
+HRESULT CEnemy_Detection::Ready_Components(void* pArg)
+{
+ if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_HUD_Ring_Aggroed_Burst"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_HUD_NPC_WhiteFrameBlip"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_HUD_NPC_Alert"), reinterpret_cast(&m_pDiffuse_TextureCom2), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_HUD_Ring_Alert_Fill"), reinterpret_cast(&m_pDiffuse_TextureCom3), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_HUD_Ring_Alert_Yellow"), reinterpret_cast(&m_pDiffuse_TextureCom4), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_HUD_Ring_Aggro_Blip"), reinterpret_cast(&m_pDiffuse_TextureCom5), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
+ {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+void CEnemy_Detection::SizeUpdate(_float fSizeX)
+{
+ m_fSizeX += fSizeX;
+ m_fSizeY += fSizeX;
+ m_vImageposi.z += fSizeX;
+ m_vImageposi.w += fSizeX;
+ if (m_fSizeX - m_fOrigin_Size.x <= fSizeX)
+ {
+ m_fSizeX = m_fOrigin_Size.x;
+ m_fSizeY = m_fOrigin_Size.y;
+ m_vImageposi.z = 75.f;
+ m_vImageposi.w = 75.f;
+ }
+}
+
+CEnemy_Detection* CEnemy_Detection::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CEnemy_Detection* pInstance = new CEnemy_Detection(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CEnemy_Detection");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CEnemy_Detection::Clone(void* pArg, CGameObject* pOwner)
+{
+ CEnemy_Detection* pInstance = new CEnemy_Detection(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CEnemy_Detection");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CEnemy_Detection::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pShaderCom);
+ SAFE_RELEASE(m_pDiffuse_TextureCom);
+ SAFE_RELEASE(m_pDiffuse_TextureCom1);
+ SAFE_RELEASE(m_pDiffuse_TextureCom2);
+ SAFE_RELEASE(m_pDiffuse_TextureCom3);
+ SAFE_RELEASE(m_pDiffuse_TextureCom4);
+ SAFE_RELEASE(m_pDiffuse_TextureCom5);
+ SAFE_RELEASE(m_pVIBufferCom);
+
+}
+
+#ifdef _DEBUG
+void CEnemy_Detection::Describe_Entity()
+{
+}
+#endif // _DEBUG
diff --git a/Jusin154_Team3D/Editor/Private/Enemy_Panel.cpp b/Jusin154_Team3D/Editor/Private/Enemy_Panel.cpp
index 1691ae22c..dbb499243 100644
--- a/Jusin154_Team3D/Editor/Private/Enemy_Panel.cpp
+++ b/Jusin154_Team3D/Editor/Private/Enemy_Panel.cpp
@@ -4,6 +4,7 @@
#include "Enemy_HpBar.h"
#include "Enemy_Info.h"
#include "Boss_HpBer.h"
+#include "Enemy_Detection.h"
CEnemy_Panel::CEnemy_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CPanelObject(pDevice, pContext)
@@ -127,6 +128,12 @@ HRESULT CEnemy_Panel::Ready_Element(void* pArg)
}
Add_Element(TEXT("Boss_HpBer"), m_pBoss_HpBar);
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pEnemy_Detection))))
+ {
+ return E_FAIL;
+ }
+ Add_Element(TEXT("Enemy_Detection"), m_pEnemy_Detection);
+
return S_OK;
}
diff --git a/Jusin154_Team3D/Editor/Private/Level_Loading.cpp b/Jusin154_Team3D/Editor/Private/Level_Loading.cpp
index 90ac75136..e3a80969f 100644
--- a/Jusin154_Team3D/Editor/Private/Level_Loading.cpp
+++ b/Jusin154_Team3D/Editor/Private/Level_Loading.cpp
@@ -41,16 +41,22 @@ HRESULT CLevel_Loading::Initialize(LEVEL eNextLevelID)
void CLevel_Loading::Update(_float fTimeDelta)
{
- if (true == m_pLoader->isFinished() &&
- m_pGameInstance->Key_Down(DIK_F1))
+ if (true == m_pLoader->isFinished())
{
- if (m_eNextLevelID != LEVEL::LOGO)
+ if(m_eNextLevelID == LEVEL::UI)
m_bNextLevel = true;
- else
+
+ if (m_pGameInstance->Key_Down(DIK_F1))
{
- static_cast(m_pIntro_Image)->Set_Hover(true);
- m_bDelay = true;
+ if (m_eNextLevelID != LEVEL::LOGO)
+ m_bNextLevel = true;
+ else
+ {
+ static_cast(m_pIntro_Image)->Set_Hover(true);
+ m_bDelay = true;
+ }
}
+
}
diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp
index 6622cabf1..9ee568c00 100644
--- a/Jusin154_Team3D/Editor/Private/Loader.cpp
+++ b/Jusin154_Team3D/Editor/Private/Loader.cpp
@@ -55,6 +55,7 @@
#include "Enemy_HpBar.h"
#include "Enemy_Info.h"
#include "Boss_HpBer.h"
+#include "Enemy_Detection.h"
#include "Mission_Panel.h"
#include "MissionBanner_Border.h"
@@ -557,6 +558,22 @@ HRESULT CLoader::Loading_For_UI()
_wstring wstrFilePath = CMyTools::ToWstring(strFilePath);
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), wstrFileName,
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+
+ });
+
+ Asset_FileLoad("../Bin/Resources/Textures/Enemy", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath)
+ {
+
+ _string strFilePath = pFilePath;
+ _wstring wstrFilePath = CMyTools::ToWstring(strFilePath);
+
+
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), wstrFileName,
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) {
return E_FAIL;
@@ -920,6 +937,10 @@ HRESULT CLoader::Loading_For_UI()
{
return E_FAIL;
}
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CEnemy_Detection::Create(m_pDevice, m_pContext))))
+ {
+ return E_FAIL;
+ }
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CLoading_Panel::Create(m_pDevice, m_pContext))))
{
diff --git a/Jusin154_Team3D/Editor/Private/Monster.cpp b/Jusin154_Team3D/Editor/Private/Monster.cpp
index 6a43dbe27..621b2a162 100644
--- a/Jusin154_Team3D/Editor/Private/Monster.cpp
+++ b/Jusin154_Team3D/Editor/Private/Monster.cpp
@@ -171,7 +171,6 @@ void CMonster::Free()
void CMonster::Describe_Entity()
{
- _bool isToggle = { true };
if (ImGui::TreeNode("ANIM STATE")) {
diff --git a/Jusin154_Team3D/Editor/Private/Troll_Rush_Hit.cpp b/Jusin154_Team3D/Editor/Private/Troll_Rush_Hit.cpp
index a47019ab5..fc3c0d8a8 100644
--- a/Jusin154_Team3D/Editor/Private/Troll_Rush_Hit.cpp
+++ b/Jusin154_Team3D/Editor/Private/Troll_Rush_Hit.cpp
@@ -39,7 +39,7 @@ HRESULT CTroll_Rush_Hit::Initialize(void* pArg)
m_wstrEffectName = L"Troll_Nomal_Smoke";
- m_fDuration = 2.f;
+ m_fDuration = 3.f;
return S_OK;
}
@@ -86,6 +86,7 @@ HRESULT CTroll_Rush_Hit::Pre_Setting(CGameObject* pObject, void* pArg)
pSmoke->Get_Component()->Set_State(STATE::POSITION, XMLoadFloat4(&vPos));
pSmoke->Set_Visible(true);
+
return S_OK;
}
diff --git a/Jusin154_Team3D/Editor/Public/Editor_Define.h b/Jusin154_Team3D/Editor/Public/Editor_Define.h
index 9cc9e1481..d374e1cac 100644
--- a/Jusin154_Team3D/Editor/Public/Editor_Define.h
+++ b/Jusin154_Team3D/Editor/Public/Editor_Define.h
@@ -25,7 +25,7 @@ namespace Editor
enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, TRAIL_BLEND, TRAILWB_FOR_BLEND, TRAIL_BLUR, TRAIL_BLOOM, END };
- enum class SHADER_PASS_UIEDITOR { DEFAULT, LOGO, LOGO_TEXT, LOGO_GLOW, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, TYPE, HPBAR, MAGIC_METER, MAGIC_ICON, REMOVEUV, REVELIO, POTION, MAGIC_ITEM, SPELL_PREVIEW, SPELL_HEADER, SPELL_HEADER_LINE, SPELL_DRAG, CAMERA_LOCKON, LODING_SCREEN, ENEMY_HPBAR, BOSS_HPBAR, END };
+ enum class SHADER_PASS_UIEDITOR { DEFAULT, LOGO, LOGO_TEXT, LOGO_GLOW, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, TYPE, HPBAR, MAGIC_METER, MAGIC_ICON, REMOVEUV, REVELIO, POTION, MAGIC_ITEM, SPELL_PREVIEW, SPELL_HEADER, SPELL_HEADER_LINE, SPELL_DRAG, CAMERA_LOCKON, LODING_SCREEN, ENEMY_HPBAR, BOSS_HPBAR, ENEMY_DETECTION, END };
enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, BLEND, BLEND_NOWORLD, BLOOM, BLOOM_NOWORLD, BLUR_NO_EMMISVE, BLUR_NO_WORLD_NO_EMISSIVE, WEIGHTBLEND_FOR_BLEND, DEPTH_STOP, END };
enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, UVALPHABLEND, MAGIC_METER, SPELL_LIST, EESSENTIAL_SPELL_SOLT, EESSENTIAL_SPELL, COLOR, SPELL_HOVER, SPELL_SLOT_EFFECT, SPELL_SLOT, END };
diff --git a/Jusin154_Team3D/Editor/Public/Enemy_Detection.h b/Jusin154_Team3D/Editor/Public/Enemy_Detection.h
new file mode 100644
index 000000000..7c41587fa
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Public/Enemy_Detection.h
@@ -0,0 +1,54 @@
+#pragma once
+
+#include "Editor_Define.h"
+#include "ElementObject.h"
+
+NS_BEGIN(Editor)
+
+class CEnemy_Detection final : public CElementObject
+{
+private:
+ CEnemy_Detection(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CEnemy_Detection(const CEnemy_Detection& rhs);
+ virtual ~CEnemy_Detection() = default;
+
+public:
+ virtual void Priority_Update(_float fTimeDelta);
+ virtual void Update(_float fTimeDelta);
+ virtual void Late_Update(_float fTimeDelta);
+ virtual HRESULT Render() override;
+ virtual _vector Get_WorldPostion() override;
+
+
+private:
+ virtual HRESULT Bind_ShaderResources() override;
+ virtual HRESULT Ready_Components(void* pArg) override;
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+
+private:
+ void SizeUpdate(_float fSizeX);
+
+private:
+ CTexture* m_pDiffuse_TextureCom = { nullptr };
+ CTexture* m_pDiffuse_TextureCom1 = { nullptr };
+ CTexture* m_pDiffuse_TextureCom2 = { nullptr };
+ CTexture* m_pDiffuse_TextureCom3 = { nullptr };
+ CTexture* m_pDiffuse_TextureCom4 = { nullptr };
+ CTexture* m_pDiffuse_TextureCom5 = { nullptr };
+ CShader* m_pShaderCom = { nullptr };
+ CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
+
+ _float4 m_vImageposi{};
+
+ _bool m_bStep1 = { false };
+ _bool m_bStep2 = { false };
+ _bool m_bStep3 = { false };
+public:
+ static CEnemy_Detection* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
+ virtual void Free() override;
+ void Describe_Entity() override;
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Editor/Public/Enemy_Panel.h b/Jusin154_Team3D/Editor/Public/Enemy_Panel.h
index 7bf62d370..f3177b758 100644
--- a/Jusin154_Team3D/Editor/Public/Enemy_Panel.h
+++ b/Jusin154_Team3D/Editor/Public/Enemy_Panel.h
@@ -35,7 +35,8 @@ class CEnemy_Panel final : public CPanelObject
CGameObject* m_pEnemy_HpBar = { nullptr };
CGameObject* m_pEnemy_Info = { nullptr };
- CGameObject* m_pBoss_HpBar= { nullptr };
+ CGameObject* m_pBoss_HpBar = { nullptr };
+ CGameObject* m_pEnemy_Detection = { nullptr };
public:
static CEnemy_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli
index f408fe02c..a7608f95e 100644
--- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli
+++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli
@@ -326,13 +326,13 @@ float2 SelectLerpUV(float2 fAmount, float _fRatio, int iSelectOption)
fRatio = fRatio * fRatio; // EaseInQuad 후반에 속도 증가
break;
case 2:
- fRatio = 1 - pow(1 - fRatio, 2); // EaseOutQuad 초반에 속도 증가
+ fRatio = pow(1 - fRatio, 2); // EaseOutQuad 초반에 속도 증가
break;
case 3:
fRatio = fRatio * fRatio * fRatio; // EaseInCubic 더 강하게 후반 속도 증가
break;
case 4:
- fRatio = 1 - pow(1 - fRatio, 3); // EaseOutCubic 더 강하게 초반 속도 증가
+ fRatio = pow(1 - fRatio, 3); // EaseOutCubic 더 강하게 초반 속도 증가
break;
case 5:
fRatio = 0.5f * (1 - cos(PI * fRatio)); // EaseInOutSin 사인 곡선
@@ -343,9 +343,7 @@ float2 SelectLerpUV(float2 fAmount, float _fRatio, int iSelectOption)
case 7:
fRatio = pow(2, 10 * (fRatio - 1)); // Expo 지수 함수
break;
- case 8:
- fRatio = 1 - pow(1 - fRatio * fRatio, 0.5); // 원형 궤적
- break;
+
}
return fAmount * fRatio;
diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl
index a8640cda3..2ed787044 100644
--- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl
+++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl
@@ -49,6 +49,7 @@ struct ParticleValue
float fDropAttenuation;
float3 vVelocity;
+ float fAcceleration;
};
@@ -77,6 +78,11 @@ cbuffer g_ConstantBuffer : register(b0) // b0 << 이 숫자와 컨스턴트 쉐
bool isNoWorld;
bool isDetphCompareStop;
bool isRandomAniIndex;
+ bool isMoveRight;
+
+ bool isMoveUp;
+ bool isExcludePos;
+ bool isPadding1;
bool isPadding2;
float fTimeDelta;
@@ -107,7 +113,6 @@ void CS_MAIN(
Particle particle = g_ParticleBufferInput[iIndex];
ParticleValue particleValue = g_ParticleValueBufferInput[iIndex];
-
float fGravity = particleValue.fGravity;
float fOnlyDropY = 0.f;
float fRatio = particle.vLifeTime.x / particle.vLifeTime.y;
@@ -137,6 +142,7 @@ void CS_MAIN(
particle.vLook = CurMat[2].xyzw;
particle.vTranslation = CurMat[3].xyzw;
}
+
}
// 라이프타임 움직임
@@ -148,6 +154,7 @@ void CS_MAIN(
if (particle.vLifeTime.x >= particle.vLifeTime.y)
{
+
particleValue.isCompareStop = false;
particleValue.fCollisionTime = 0.f;
@@ -158,15 +165,13 @@ void CS_MAIN(
return ;
}
- //초기화
+ //초기화
particle.vRight = particleValue.vOriginRight;
particle.vUp = particleValue.vOriginUp;
particle.vLook = particleValue.vOriginLook;
particle.vTranslation = particleValue.vOriginTranslation;
-
particle.vLifeTime.x = 0.f;
-
particleValue.vDelay.x = 0.f;
if (isRandomAniIndex == false)
@@ -189,7 +194,7 @@ void CS_MAIN(
fGravity *= (2.f * fRatio - 1.f) / particleValue.fDropAttenuation;
}
- particle.vTranslation.y -= 0.5f * particle.vLifeTime.x * fGravity;
+ particle.vTranslation.y -= 0.5f * fGravity * particle.vLifeTime.x;
fOnlyDropY = particle.vTranslation.y;
}
@@ -205,9 +210,56 @@ void CS_MAIN(
if (particleValue.fDrag < FLT_EPSILON5)
fDrag = 1;
+ float4 vAcceleration = float4(0.f, 0.f, 0.f, 0.f);
+
+ if (particleValue.fAcceleration > FLT_EPSILON5)
+ vAcceleration.xyz = normalize(particle.vLook.xyz) * fRatio * particleValue.fAcceleration;
+
float4 vVelocity = vector(normalize(particle.vLook.xyz) * particleValue.fSpeed, 0.f);
- particle.vTranslation += vVelocity * fTimeDelta * fDrag;
+ particle.vTranslation += vVelocity * fTimeDelta * fDrag + vAcceleration;
+ }
+
+ if (isMoveRight)
+ {
+ float fTime = (particle.vLifeTime.x / particle.vLifeTime.y);
+
+ float fRatio = 1 - (1 - fTime * fTime);
+
+ float fDrag = particleValue.fDrag;
+
+ if (particleValue.fDrag < FLT_EPSILON5)
+ fDrag = 1;
+
+ float4 vAcceleration = float4(0.f, 0.f, 0.f, 0.f);
+
+ if (particleValue.fAcceleration > FLT_EPSILON5)
+ vAcceleration.xyz = normalize(particle.vRight.xyz) * fRatio * particleValue.fAcceleration;
+
+ float4 vVelocity = vector(normalize(particle.vRight.xyz) * particleValue.fSpeed, 0.f);
+
+ particle.vTranslation += vVelocity * fTimeDelta * fDrag + vAcceleration;
+ }
+
+ if (isMoveUp)
+ {
+ float fTime = (particle.vLifeTime.x / particle.vLifeTime.y);
+
+ float fRatio = 1 - (1 - fTime * fTime);
+
+ float fDrag = particleValue.fDrag;
+
+ if (particleValue.fDrag < FLT_EPSILON5)
+ fDrag = 1;
+
+ float4 vAcceleration = float4(0.f, 0.f, 0.f, 0.f);
+
+ if (particleValue.fAcceleration > FLT_EPSILON5)
+ vAcceleration.xyz = normalize(particle.vUp.xyz) * fRatio * particleValue.fAcceleration;
+
+ float4 vVelocity = vector(normalize(particle.vUp.xyz) * particleValue.fSpeed, 0.f);
+
+ particle.vTranslation += vVelocity * fTimeDelta * fDrag + vAcceleration;
}
if (isPivotMove)
@@ -216,17 +268,34 @@ void CS_MAIN(
float3 vDir = normalize(particleValue.vPivot - particleValue.vOriginTranslation.xyz);
+ if (isExcludePos == true)
+ {
+ vDir = normalize(particleValue.vPivot);
+ }
+
float fDrag = particleValue.fDrag;
- if (fSizeLerpOption != 0.f)
- fDrag = SelectLerpUV(float2(particleValue.fSizeDrag, 0.f), fTime, fMoveLerpOption).x;
+ if (fMoveLerpOption != 0.f)
+ fDrag = SelectLerpUV(float2(particleValue.fDrag, 0.f), fTime, fMoveLerpOption).x;
if (particleValue.fDrag < FLT_EPSILON5)
fDrag = 1;
float4 vVelocity = vector(vDir * particleValue.fSpeed , 0.f);
+
+ float4 vAcceleration = float4(0.f,0.f,0.f,0.f);
+
+ if (particleValue.fAcceleration > FLT_EPSILON5)
+ {
+ float fAcceleration = particleValue.fAcceleration;
+
+ if (fMoveLerpOption != 0.f)
+ fAcceleration = SelectLerpUV(float2(fAcceleration, 0.f), fTime, fMoveLerpOption).x;
+
+ vAcceleration.xyz = vDir * fAcceleration;
+ }
- particle.vTranslation += vVelocity * fTimeDelta * fDrag;
+ particle.vTranslation += vVelocity * fTimeDelta * fDrag + vAcceleration;
}
@@ -306,7 +375,7 @@ void CS_MAIN(
float fOldViewZ = vDepthDesc.y * fFar;
- if (vProjPos.w >= fOldViewZ && particle.vLifeTime.x >= 0.3f)
+ if (vProjPos.w >= fOldViewZ && particle.vLifeTime.x >= 0.5f)
{
if (particleValue.isCompareStop == false)
{
diff --git a/Jusin154_Team3D/Engine/Private/Instance_Model.cpp b/Jusin154_Team3D/Engine/Private/Instance_Model.cpp
index c215f6036..ce7a97c87 100644
--- a/Jusin154_Team3D/Engine/Private/Instance_Model.cpp
+++ b/Jusin154_Team3D/Engine/Private/Instance_Model.cpp
@@ -541,8 +541,12 @@ void CInstance_Model::Compute_CS(_float fTimeDelta)
pDesc->isPivotMove = m_InstanceDesc.isPivotMove;
pDesc->isSizeLerp = m_InstanceDesc.isSizeLerp;
pDesc->isNoWorld = m_InstanceDesc.isNoWorld;
+ pDesc->isMoveUp = m_InstanceDesc.isMoveUp;
+ pDesc->isMoveRight = m_InstanceDesc.isMoveRight;
pDesc->isDetphCompareStop = m_InstanceDesc.isDetphCompareStop;
pDesc->isRandomAniIndex = m_InstanceDesc.isRandomAniIndex;
+ pDesc->isExcludePos = m_InstanceDesc.isExcludePos;
+
pDesc->WorldMatrix = *m_pOwner->Get_Component()->Get_WorldMatrixPtr();
pDesc->fSizeLerpOption = m_InstanceDesc.fSizeLerpOption;
@@ -714,9 +718,11 @@ void CInstance_Model::Instane_Buffer_ReStruct()
pParticleValues[i].fSizeDrag = m_pGameInstance->Random_Float(m_InstanceDesc.vSizeDrag.x, m_InstanceDesc.vSizeDrag.y);
pParticleValues[i].vDelay = _float2(0.0f, m_pGameInstance->Random_Float(m_InstanceDesc.vDelay.x, m_InstanceDesc.vDelay.y));
pParticleValues[i].fDropAttenuation = m_pGameInstance->Random_Float(m_InstanceDesc.vDropAttenuation.x, m_InstanceDesc.vDropAttenuation.y);
+ pParticleValues[i].fAcceleration = _float(m_pGameInstance->Random_Float(m_InstanceDesc.vAcceleration.x, m_InstanceDesc.vAcceleration.y));
pParticleValues[i].fCollisionTime = 0.f;
pParticleValues[i].isCompareStop = false;
+
memcpy(&pParticleValues[i].vOriginRight, SRMatrix.m[0], sizeof(_float4));
memcpy(&pParticleValues[i].vOriginUp, SRMatrix.m[1], sizeof(_float4));
@@ -832,6 +838,17 @@ void CInstance_Model::Describe_Entity()
Instane_Buffer_ReStruct();
}
+ if (GUI::Checkbox("Up Move", &m_InstanceDesc.isMoveUp))
+ {
+ Instane_Buffer_ReStruct();
+ }
+
+ if (GUI::Checkbox("Right Move", &m_InstanceDesc.isMoveRight))
+ {
+ Instane_Buffer_ReStruct();
+ }
+
+
if (GUI::Checkbox("Sin Wave", &m_InstanceDesc.isSinWave))
{
Instane_Buffer_ReStruct();
@@ -847,6 +864,12 @@ void CInstance_Model::Describe_Entity()
Instane_Buffer_ReStruct();
}
+
+ if (GUI::Checkbox("ExcludePos From PibotMove", &m_InstanceDesc.isExcludePos))
+ {
+ Instane_Buffer_ReStruct();
+ }
+
if (GUI::Checkbox("PivotMove", &m_InstanceDesc.isPivotMove))
{
Instane_Buffer_ReStruct();
@@ -1050,6 +1073,10 @@ void CInstance_Model::Describe_Entity()
Instane_Buffer_ReStruct();
}
+ if (ImGui::DragFloat2("Acceleration", reinterpret_cast<_float*>(&m_InstanceDesc.vAcceleration)))
+ {
+ Instane_Buffer_ReStruct();
+ }
ImGui::PopItemWidth();
diff --git a/Jusin154_Team3D/Engine/Public/Instance_Model.h b/Jusin154_Team3D/Engine/Public/Instance_Model.h
index 08e63f8af..b04d39386 100644
--- a/Jusin154_Team3D/Engine/Public/Instance_Model.h
+++ b/Jusin154_Team3D/Engine/Public/Instance_Model.h
@@ -73,15 +73,16 @@ class ENGINE_DLL CInstance_Model final : public CComponent
_float3 vVelocityMin = {};
_float3 vVelocityMax = {};
- _float2 vPadding3 = {};
+ _float2 vAcceleration = {};
+
_float4 vPadding4 = {};
_float4 vPadding5 = {};
_float4 vPadding6 = {};
_bool isRandomAniIndex = {};
- _bool isPadding2 = {};
- _bool isPadding3 = {};
- _bool isPadding4 = {};
+ _bool isMoveUp = {};
+ _bool isMoveRight = {};
+ _bool isExcludePos = {};
_bool isPadding5 = {};
}INSTANCE_DESC;
@@ -170,6 +171,11 @@ class ENGINE_DLL CInstance_Model final : public CComponent
_int isNoWorld = {};
_int isDetphCompareStop = {};
_int isRandomAniIndex = {};
+ _int isMoveRight = {};
+
+ _int isMoveUp = {};
+ _int isExcludePos = {};
+ _int isPadding1 = {};
_int isPadding2 = {};
_float fTimeDelta = {};
@@ -222,6 +228,7 @@ class ENGINE_DLL CInstance_Model final : public CComponent
_float fCollisionTime = {};
_float fDropAttenuation = {};
_float3 vVelocity = {};
+ _float fAcceleration = {};
}CS_PARTICLE_VALUE_DESC;
diff --git a/Jusin154_Team3D/Engine/Public/State.h b/Jusin154_Team3D/Engine/Public/State.h
index df6098e3b..f47bf2032 100644
--- a/Jusin154_Team3D/Engine/Public/State.h
+++ b/Jusin154_Team3D/Engine/Public/State.h
@@ -20,7 +20,7 @@ enum ESTATE
MAPHELP,POTION,
ACCIO,DESCENDO,DIFFINDO,DEPULSO,LUMOS,LUMOS_STOP,DISILLUSION_ENTER,DISILLUSION_EXIT, ANCIENT_THROW,
SPELL_FAIL, SPELL_CHARGE,
- BROOM_IDLE,BROOM_FWD,BROOM_LEFT,BROOM_RIGHT,BROOM_DOWN,BROOM_UP, BROOM_HOVER_IDLE, BROOM_HOVER_FWD, BROOM_HOVER_LEFT, BROOM_HOVER_RIGHT, BROOM_HOVER_START,BROOM_MOUNT, BROOM_MOUNT_END,BROOM_DISMOUNT,
+ BROOM_IDLE,BROOM_FWD,BROOM_LEFT,BROOM_RIGHT,BROOM_DOWN,BROOM_UP, BROOM_REVELIO, BROOM_HOVER_IDLE, BROOM_HOVER_FWD, BROOM_HOVER_LEFT, BROOM_HOVER_RIGHT, BROOM_HOVER_START, BROOM_HOVER_REVELIO,BROOM_MOUNT, BROOM_MOUNT_END,BROOM_DISMOUNT,
RUSH_START,RUSH_LOOP,RUSH_END,
THROW_ROCK_START,THROW_ROCK,
BACKHAND_SWING_JOG,SWING_FWD,SLAM,
@@ -35,7 +35,7 @@ enum ESTATE
PETRIFICUSED_START,
STUN,
////////////////////////// 빗자루
- BROOM_MOUNT_B, BROOM_HOVER_IDLE_B, BROOM_HOVER_STOP_B,BROOM_HOVER_DOWN_B,BROOM_HOVER_UP_B,BROOM_HOVER_LEFT_B,BROOM_HOVER_RIGHT_B,BROOM_FLY_DOWN_B, BROOM_FLY_LEFT_B, BROOM_FLY_RIGHT_B, BROOM_FLY_UP_B,BROOM_FLY_B,
+ BROOM_MOUNT_B, BROOM_HOVER_IDLE_B, BROOM_HOVER_STOP_B,BROOM_HOVER_DOWN_B,BROOM_HOVER_UP_B,BROOM_HOVER_LEFT_B,BROOM_HOVER_RIGHT_B,BROOM_FLY_DOWN_B, BROOM_FLY_LEFT_B, BROOM_FLY_RIGHT_B, BROOM_FLY_UP_B,BROOM_FLY_B,BROOM_ADD,
/// ////////////////////////////
END
};