diff --git a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl
index bc248ab64..c2d688ad7 100644
--- a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl
+++ b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl
@@ -23,6 +23,7 @@ float g_fAlpha;
float g_fOwnerAlpha;
float g_fCanvasAlpha;
float g_fAngle;
+float g_fMapAngle;
float g_fCoolTime;
float g_fHp;
@@ -506,21 +507,14 @@ PS_OUT PS_Rotation(PS_IN In)
float2 center = float2(0.5f, 0.5f);
float2 uv = In.vTexcoord - center;
- uv *= sqrt(2.0f);
float2 Rotation = In.vTexcoord;
- Rotation.x = uv.x * cos(g_fAngle) - uv.y * sin(g_fAngle);
- Rotation.y = uv.x * sin(g_fAngle) + uv.y * cos(g_fAngle);
+ Rotation.x = uv.x * cos(g_fMapAngle) - uv.y * sin(g_fMapAngle);
+ Rotation.y = uv.x * sin(g_fMapAngle) + uv.y * cos(g_fMapAngle);
Rotation += center;
- float4 tex1 = g_Texture.Sample(ClampSampler, Rotation);
- float4 tex2 = g_Texture1.Sample(DefaultSampler, In.vTexcoord);
-
- tex1.rgb *= 0.4f;
+ float4 tex1 = g_Texture.Sample(ClampSampler , Rotation);
+
color = tex1;
- tex2.rgb *= 0.3f;
-
- if (tex2.a >= 0.9f)
- color = tex2;
color.a *= Alpha;
@@ -586,7 +580,7 @@ PS_OUT PS_SpellAnim(PS_IN In)
switch (g_iSpellType)
{
case 0:
- BGColor = float3(255.f, 255.f, 0.f) / 255.f;
+ BGColor = float3(220.f, 165.f, 70.f) / 255.f;
break;
case 1:
BGColor = float3(150.f, 120.f, 240.f) / 255.f;
@@ -1132,7 +1126,7 @@ PS_OUT PS_Spell_Header(PS_IN In)
switch (g_iSpellType)
{
case 0:
- BGColor = float3(255.f, 255.f, 0.f) / 255.f;
+ BGColor = float3(220.f, 165.f, 70.f) / 255.f;
break;
case 1:
BGColor = float3(150.f, 120.f, 240.f) / 255.f;
@@ -1155,11 +1149,12 @@ PS_OUT PS_Spell_Header(PS_IN In)
}
float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
- Color = tex1;
-
+ Color.rgb = tex1.rgb * 0.8f;
+ Color.a = tex1.a;
+
Color.rgb *= BGColor;
- Color.a *= Alpha;
+ Color.a *= Alpha * 0.5f;
Out.vColor = Color;
@@ -1330,6 +1325,92 @@ PS_OUT PS_Loding_Screen(PS_IN In)
return Out;
}
+PS_OUT PS_Enemy_HpBer(PS_IN In)
+{
+ PS_OUT Out;
+
+ float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
+ float4 Color = float4(1.f, 1.f, 1.f, 1.f);
+ float4 Color1 = float4(1.f, 1.f, 1.f, 1.f);
+ float2 uv = In.vTexcoord;
+ float2 CurrentPixelPosition = uv * g_fCurrent_Size;
+ float OriginLeft = g_fNine_Slice.x;
+ float OriginRight = g_fNine_Slice.y;
+ float OriginTop = g_fNine_Slice.z;
+ float OriginBottom = g_fNine_Slice.w;
+
+ float CurrentLeft = OriginLeft;
+ float CurrentRight = g_fCurrent_Size.x - (g_fOrigin_Size.x - OriginRight);
+ float CurrentTop = OriginTop;
+ float CurrentBottom = g_fCurrent_Size.y - (g_fOrigin_Size.y - OriginBottom);
+
+ float2 Finaluv = In.vTexcoord;
+
+ if (CurrentPixelPosition.x < CurrentLeft)
+ {
+ Finaluv.x = CurrentPixelPosition.x / g_fOrigin_Size.x;
+ }
+ else if (CurrentPixelPosition.x > CurrentRight)
+ {
+ float dist = CurrentPixelPosition.x - CurrentRight;
+ Finaluv.x = (OriginRight + dist) / g_fOrigin_Size.x;
+ }
+ else
+ {
+ float scale = (CurrentPixelPosition.x - CurrentLeft) / (CurrentRight - CurrentLeft);
+ Finaluv.x = (OriginLeft / g_fOrigin_Size.x) + scale * ((OriginRight - OriginLeft) / g_fOrigin_Size.x);
+ }
+
+ if (CurrentPixelPosition.y < CurrentTop)
+ {
+ Finaluv.y = CurrentPixelPosition.y / g_fOrigin_Size.y;
+ }
+ else if (CurrentPixelPosition.y > CurrentBottom)
+ {
+ float dist = CurrentPixelPosition.y - CurrentBottom;
+ Finaluv.y = (OriginBottom + dist) / g_fOrigin_Size.y;
+ }
+ else
+ {
+ float scale = (CurrentPixelPosition.y - CurrentTop) / (CurrentBottom - CurrentTop);
+ Finaluv.y = (OriginTop / g_fOrigin_Size.y) + scale * ((OriginBottom - OriginTop) / g_fOrigin_Size.y);
+ }
+
+ float4 tex1 = g_Texture.Sample(DefaultSampler, Finaluv);
+ float4 tex2 = g_Texture1.Sample(DefaultSampler, Finaluv);
+
+ Color = tex1;
+
+ tex2.rgb *= float3(1.f, 0.f, 0.f);
+
+ if (In.vTexcoord.x >= g_fHp)
+ {
+ tex2.rgb = float3(0.f, 0.f, 0.f);
+ }
+
+ Color = lerp(Color, tex2, tex2.a);
+
+ if (Color.a <= 0.f)
+ discard;
+
+ if(g_iHover != 0)
+ {
+ float4 tex3 = g_Texture2.Sample(DefaultSampler, In.vTexcoord);
+
+ tex3.rgb *= float3(1.f, 0.f, 0.f);
+
+ if (g_fTime >= tex3.r)
+ {
+ Color.a *= tex3.r;
+ Color.rgb = float3(1.f, 0.f, 0.f);
+ }
+ }
+
+ Color.a *= Alpha;
+ Out.vColor = Color;
+ return Out;
+}
+
technique11 PosTexTechnique11
{
pass Default
@@ -1620,4 +1701,14 @@ technique11 PosTexTechnique11
PixelShader = compile ps_5_0 PS_Loding_Screen();
}
+ pass Enemy_HpBer
+ {
+ SetRasterizerState(RS_Default);
+ SetDepthStencilState(DSS_Default, 0);
+ SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
+ VertexShader = compile vs_5_0 VS_MAIN();
+ GeometryShader = NULL;
+ PixelShader = compile ps_5_0 PS_Enemy_HpBer();
+ }
+
}
diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj
index 87d5d9dd0..cb53bbb61 100644
--- a/Jusin154_Team3D/Client/Default/Client.vcxproj
+++ b/Jusin154_Team3D/Client/Default/Client.vcxproj
@@ -165,6 +165,9 @@ call Update_Resources.bat
+
+
+
@@ -307,6 +310,9 @@ call Update_Resources.bat
+
+
+
diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
index 408adb875..14bfa5ce5 100644
--- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
+++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
@@ -409,18 +409,25 @@
04.Mechanic\State\State_Combat\Dead
+
+ 02.GameObjects\UI\GamePlay_Canvas\Enemy_Penel
+
+
+ 02.GameObjects\UI\GamePlay_Canvas\Enemy_Penel\Enemy_HpBar
+
+
+ 02.GameObjects\UI\GamePlay_Canvas\Enemy_Penel\Enemy_Info
+
04.Mechanic\State\Movement\Shuffle
-
- 02.GameObjects\Monster\Goblin\Goblin_Warrior
-
02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Mage
02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Warrior
+
@@ -821,9 +828,6 @@
{27251db2-19f2-4492-a3a4-32c11526f413}
-
- {7e641382-9dfa-4da7-a8c8-a3ee06360e7a}
-
{b8c7e12b-da04-4d49-bc61-104649975d0b}
@@ -890,6 +894,15 @@
{3e7156ab-9d1f-4b9b-b09d-5dd60638505e}
+
+ {2d99db17-8cc6-437a-84d6-dd21ee434c38}
+
+
+ {f28022fe-79c4-4623-af96-916e8828fedc}
+
+
+ {3246055a-734f-45e2-ab2f-437ec2ccf061}
+
@@ -1291,12 +1304,6 @@
04.Mechanic\State\Movement\Shuffle
-
- 02.GameObjects\Monster\Goblin\Goblin_Warrior
-
-
- 02.GameObjects\Monster\Goblin\Goblin_Warrior
-
02.GameObjects\Item\Broom
@@ -1315,6 +1322,17 @@
02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Warrior
+
+ 02.GameObjects\UI\GamePlay_Canvas\Enemy_Penel\Enemy_HpBar
+
+
+ 02.GameObjects\UI\GamePlay_Canvas\Enemy_Penel\Enemy_Info
+
+
+ 02.GameObjects\UI\GamePlay_Canvas\Enemy_Penel
+
+
+
diff --git a/Jusin154_Team3D/Client/Private/Bombard.cpp b/Jusin154_Team3D/Client/Private/Bombard.cpp
index fb5869804..b0869da87 100644
--- a/Jusin154_Team3D/Client/Private/Bombard.cpp
+++ b/Jusin154_Team3D/Client/Private/Bombard.cpp
@@ -88,6 +88,12 @@ void CBombard::Late_Update(_float fTimeDelta)
OnCollision(this);
}
+ if (false == m_bHit) {
+ _vector vStartPos = XMLoadFloat4(&m_vStartPos);
+ _vector vEndPos = XMLoadFloat4(&m_vEndPos);
+ SweepTarget(vStartPos, vEndPos, 0.125);
+ }
+
}
HRESULT CBombard::Pre_Setting(CGameObject* pObject, void* pArg)
diff --git a/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp b/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp
index 122b65d28..fff36f194 100644
--- a/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp
+++ b/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp
@@ -1,5 +1,6 @@
#include "pch.h"
#include "Camera_Gaze.h"
+#include "InfoInstance.h"
CCamera_Gaze::CCamera_Gaze(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CCamera(pDevice, pContext)
@@ -7,7 +8,8 @@ CCamera_Gaze::CCamera_Gaze(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
}
CCamera_Gaze::CCamera_Gaze(const CCamera_Gaze& rhs)
- : CCamera(rhs)
+ : CCamera(rhs),
+ m_pInfoInstance(CInfoInstance::GetInstance())
{
}
diff --git a/Jusin154_Team3D/Client/Private/Decendo.cpp b/Jusin154_Team3D/Client/Private/Decendo.cpp
index 406a3e61f..618bc1b54 100644
--- a/Jusin154_Team3D/Client/Private/Decendo.cpp
+++ b/Jusin154_Team3D/Client/Private/Decendo.cpp
@@ -97,50 +97,6 @@ void CDecendo::Late_Update(_float fTimeDelta)
Get_PartObject()->Trail_Update(m_pProjectile->Get_Component()->Get_XMWorldMatrix(), fTimeDelta);
- _vector vStartPos = m_pProjectile->Get_WorldPostion();
-
- _vector vEndPos = XMLoadFloat4(&m_vTargetPos);
-
- _vector vDir2 = { vEndPos - vStartPos };
-
- _float fDistance = XMVectorGetX(XMVector3Length(vEndPos - vStartPos));
-
- PSX::PxSweepBuffer pxBuffer = {};
-
- _bool bHit = m_pGameInstance->SphereCast(0.2f, vStartPos, vDir2, fDistance, PSX::PxHitFlag::ePOSITION | PSX::PxHitFlag::eNORMAL, PSX::PxQueryFlag::eDYNAMIC, pxBuffer);
-
- if (bHit) {
- const PSX::PxSweepHit& hit = pxBuffer.block;
- PSX::PxRigidActor* pActor = hit.actor;
- PSX::PxShape* pShape = hit.shape;
-
- if (nullptr != pActor && nullptr != pActor->userData)
- {
- PhsXUserData* pUserData = static_cast(pActor->userData);
-
- switch (pUserData->eKind)
- {
- case PHYSX_KIND::CCTActor:
- {
- switch (PXOBJECT(pUserData->iSubKind))
- {
- case PXOBJECT::MONSTER:
- case PXOBJECT::GOBLIN_WARRIOR:
- {
- pUserData->pOwner->OnCollision(this);
- }
- break;
- case PXOBJECT::TROLL:
- {
- pUserData->pOwner->OnCollision(this);
- }
- break;
- }
- }
- }
- }
- }
-
XMStoreFloat4(&m_vEndPos, m_pProjectile->Get_WorldPostion());
_vector vDir = XMLoadFloat4(&m_vEndPos) - XMLoadFloat4(&m_vStartPos);
@@ -151,6 +107,12 @@ void CDecendo::Late_Update(_float fTimeDelta)
OnCollision();
}
+ if (false == m_bHit) {
+ _vector vStartPos = XMLoadFloat4(&m_vStartPos);
+ _vector vEndPos = XMLoadFloat4(&m_vEndPos);
+ SweepTarget(vStartPos, vEndPos, 0.2f);
+ }
+
__super::Late_Update(fTimeDelta);
}
diff --git a/Jusin154_Team3D/Client/Private/EffectPool.cpp b/Jusin154_Team3D/Client/Private/EffectPool.cpp
index c9acb1d7f..eaf158484 100644
--- a/Jusin154_Team3D/Client/Private/EffectPool.cpp
+++ b/Jusin154_Team3D/Client/Private/EffectPool.cpp
@@ -44,9 +44,9 @@ HRESULT CEffectPool::Initialize(void* pArg)
return E_FAIL;
}
- //if (FAILED(Ready_Effect())) {
- // return E_FAIL;
- //}
+ if (FAILED(Ready_Effect())) {
+ 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 aa1d40681..6d3a8d649 100644
--- a/Jusin154_Team3D/Client/Private/Effect_Container.cpp
+++ b/Jusin154_Team3D/Client/Private/Effect_Container.cpp
@@ -317,12 +317,11 @@ _int CEffect_Container::CollisionCheck()
case PXOBJECT::GOBLIN_WARRIOR:
case PXOBJECT::GOBLIN_MAGICIAN:
case PXOBJECT::TROLL:
+ case PXOBJECT::WALL:
{
- pUserData->pOwner->OnCollision(this);
+ return i;
}
break;
- case PXOBJECT::WALL:
- break;
default:
break;
}
@@ -348,6 +347,66 @@ _int CEffect_Container::CollisionCheck()
}
+void CEffect_Container::SweepTarget(_vector StartPos, _vector EndPos, _float fRadius)
+{
+ _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);
+
+ if (bHit) {
+ const PSX::PxSweepHit& hit = pxBuffer.block;
+ PSX::PxRigidActor* pActor = hit.actor;
+ PSX::PxShape* pShape = hit.shape;
+ ON_COLLISION_INFO tagCollInfo = {};
+ 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);
+
+ switch (pUserData->eKind)
+ {
+ case PHYSX_KIND::CCTActor:
+ {
+ switch (PXOBJECT(pUserData->iSubKind))
+ {
+ case PXOBJECT::MONSTER:
+ break;
+ case PXOBJECT::GOBLIN_WARRIOR:
+ {
+ pUserData->pOwner->OnCollision(this, &tagCollInfo);
+ m_bHit = true;
+ }
+ break;
+ case PXOBJECT::GOBLIN_MAGICIAN:
+ {
+ pUserData->pOwner->OnCollision(this, &tagCollInfo);
+ m_bHit = true;
+ }
+ break;
+ case PXOBJECT::TROLL:
+ {
+ pUserData->pOwner->OnCollision(this, &tagCollInfo);
+ m_bHit = true;
+ }
+ break;
+ }
+ }
+ }
+ }
+ }
+}
+
void CEffect_Container::Update_Event(_float fTimeDelta)
{
diff --git a/Jusin154_Team3D/Client/Private/Enemy_HpBar.cpp b/Jusin154_Team3D/Client/Private/Enemy_HpBar.cpp
new file mode 100644
index 000000000..6d97f4142
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/Enemy_HpBar.cpp
@@ -0,0 +1,352 @@
+#include "pch.h"
+#include "Enemy_HpBar.h"
+#include "GameInstance.h"
+
+CEnemy_HpBar::CEnemy_HpBar(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ :CElementObject(pDevice, pContext)
+{
+}
+
+CEnemy_HpBar::CEnemy_HpBar(const CEnemy_HpBar& rhs)
+ :CElementObject(rhs)
+{
+}
+
+HRESULT CEnemy_HpBar::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CEnemy_HpBar::Initialize(void* pArg)
+{
+ CUIObject::UIOBJECT_DESC Desc{};
+
+ Desc.fX = 0.f;
+ Desc.fY = 40.f;
+ Desc.fSizeX = 128.f;
+ Desc.fSizeY = 20.f;
+
+ m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
+
+ if (FAILED(__super::Initialize(&Desc)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Ready_Components(pArg)))
+ {
+ return E_FAIL;
+ }
+
+ m_fTimeMult = 3.f;
+ m_fAlpha = 0.f;
+ m_fAlphaTime = 10.f;
+ m_vNine_Slice = _float4(15.f, 100.f, 5.f, 15.f);
+ m_fMaxHp = 200.f;
+ m_fCurrentHp = m_fMaxHp;
+ SizeUpX(360.f);
+ m_fMoveSpeed = 5.f;
+ m_bAnimation = false;
+ m_fLerpY = m_fSizeY;
+ return S_OK;
+}
+
+void CEnemy_HpBar::Priority_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ __super::Priority_Update(fTimeDelta);
+}
+
+void CEnemy_HpBar::Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+
+ if (m_bFadeIn == true)
+ {
+ if (m_fAlpha <= 1.f)
+ {
+ m_fAlpha += fTimeDelta * m_fAlphaTime;
+ m_bHover = true;
+ }
+
+
+ if (m_fAlpha >= 1.f)
+ {
+ m_bFadeIn = false;
+ m_fAlpha = 1.f;
+ }
+ }
+
+ if (m_bFadeOut == true)
+ {
+ if (m_fAlpha >= 0.f)
+ m_fAlpha -= fTimeDelta * m_fAlphaTime;
+
+ if (m_fAlpha <= 0.f)
+ {
+ m_bFadeOut = false;
+ m_bHover = false;
+ m_fAlpha = 0.f;
+ }
+ }
+
+ if (m_fCurrentHp < 0.f)
+ m_fCurrentHp = 0.f;
+ if (m_fDamage <= 0.f)
+ m_fDamage = 0.f;
+ m_fTargetHp = m_fMaxHp - m_fDamage;
+
+ if (m_fTargetHp < m_fCurrentHp)
+ Hit(fTimeDelta);
+ m_fHpBar = m_fCurrentHp / m_fMaxHp;
+
+ if (m_fHpBar <= 0.f)
+ {
+ m_bAnimation = true;
+ }
+
+ if (m_pGameInstance->Key_Down(DIK_3))
+ {
+ Lerp_PosX(101.f);
+ }
+
+ if (m_pGameInstance->Key_Down(DIK_K))
+ {
+ Set_FadeIn();
+ }
+ if (m_pGameInstance->Key_Down(DIK_L))
+ {
+ Set_FadeOut();
+ }
+ if (m_pGameInstance->Key_Down(DIK_J))
+ {
+ m_bAnimation = true;
+ m_bHover = true;
+ m_fTime = 0.f;
+ SizeUpdate(m_fLerpX, m_fLerpY);
+ }
+ if (m_bAnimation == true)
+ {
+ m_fTime += fTimeDelta * m_fTimeMult;
+ m_fSizeX += 3.f;
+ m_fSizeY += 3.f;
+ static_cast(m_pOwner)->Function_Callback(TEXT("Enemy_HpDie"));
+ }
+ if (m_fTime >= 0.9f)
+ {
+ m_bAnimation = false;
+ m_bHover = false;
+ m_fTime = 0.f;
+ SizeUpdate(m_fLerpX, m_fLerpY);
+ }
+
+ __super::Update(fTimeDelta);
+}
+
+void CEnemy_HpBar::Late_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ if (m_bVisible) {
+ m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
+ __super::Late_Update(fTimeDelta);
+ }
+}
+
+HRESULT CEnemy_HpBar::Render()
+{
+ if (m_bHover == true)
+ {
+ if (FAILED(Bind_ShaderResources())) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ENEMY_HPBAR)))) {
+ 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_HpBar::Get_WorldPostion()
+{
+ return m_pTransformCom->Get_State(STATE::POSITION);
+}
+
+void CEnemy_HpBar::Lerp_PosX(_float X)
+{
+ m_fDamage += X;
+}
+
+void CEnemy_HpBar::Hit(_float fTimeDelta)
+{
+ m_fCurrentHp = CMyTools::Lerp_f1D(m_fCurrentHp, m_fTargetHp, fTimeDelta * m_fMoveSpeed);
+}
+
+void CEnemy_HpBar::SizeUpX(_float SizeX)
+{
+ m_fSizeX = SizeX;
+ m_fLerpX = SizeX;
+}
+
+void CEnemy_HpBar::Set_Enemt_Info(void* pArg)
+{
+ if(m_bAnimation == true)
+ {
+ return;
+ }
+ //m_fMaxHp
+ //m_fCurrentHp
+ Set_FadeIn();
+}
+
+HRESULT CEnemy_HpBar::Bind_ShaderResources()
+{
+ if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom1->Bind_ShaderResource(m_pShaderCom, "g_Texture1", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom2->Bind_ShaderResource(m_pShaderCom, "g_Texture2", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fNine_Slice", &m_vNine_Slice, sizeof(_float4))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fOrigin_Size", &m_fOrigin_Size, sizeof(_float2))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_vScale, sizeof(_float2))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fHp", &m_fHpBar, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_iHover", &m_bAnimation, sizeof(_int))))
+ {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CEnemy_HpBar::Ready_Components(void* pArg)
+{
+ if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_Monster_HpBar"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_HUD_Monster_HealthMeterFill"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_VFX_T_FlameNoise_E"), reinterpret_cast(&m_pDiffuse_TextureCom2), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
+ {
+ return E_FAIL;
+ }
+ return S_OK;
+}
+
+CEnemy_HpBar* CEnemy_HpBar::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CEnemy_HpBar* pInstance = new CEnemy_HpBar(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CEnemy_HpBar");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CEnemy_HpBar::Clone(void* pArg, CGameObject* pOwner)
+{
+ CEnemy_HpBar* pInstance = new CEnemy_HpBar(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CSpell_Image");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CEnemy_HpBar::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pDiffuse_TextureCom);
+ SAFE_RELEASE(m_pDiffuse_TextureCom1);
+ SAFE_RELEASE(m_pDiffuse_TextureCom2);
+ SAFE_RELEASE(m_pShaderCom);
+ SAFE_RELEASE(m_pVIBufferCom);
+}
+
+#ifdef _DEBUG
+void CEnemy_HpBar::Describe_Entity()
+{
+}
+#endif // _DEBUG
diff --git a/Jusin154_Team3D/Client/Private/Enemy_Info.cpp b/Jusin154_Team3D/Client/Private/Enemy_Info.cpp
new file mode 100644
index 000000000..5d1b0fc8d
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/Enemy_Info.cpp
@@ -0,0 +1,263 @@
+#include "pch.h"
+#include "Enemy_Info.h"
+#include "GameInstance.h"
+
+CEnemy_Info::CEnemy_Info(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ :CElementObject(pDevice, pContext)
+{
+}
+
+CEnemy_Info::CEnemy_Info(const CEnemy_Info& rhs)
+ :CElementObject(rhs)
+{
+}
+
+HRESULT CEnemy_Info::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CEnemy_Info::Initialize(void* pArg)
+{
+ CUIObject::UIOBJECT_DESC Desc{};
+
+ Desc.fX = -180.f;
+ Desc.fY = 40.f;
+ Desc.fSizeX = 50.f;
+ Desc.fSizeY = 50.f;
+
+ m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
+
+ if (FAILED(__super::Initialize(&Desc)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Ready_Components(pArg)))
+ {
+ return E_FAIL;
+ }
+
+ m_fTimeMult = 1.f;
+ m_fAlpha = 0.f;
+ m_fAlphaTime = 10.f;
+ m_fFontX = 952.f;
+ m_fFontY = 39.f;
+ m_fFontPos = _float2(1115.f, 0.f);
+ m_fFont2OffSet = 0.f;
+ m_pEnemy_Name = TEXT("나는 문어");
+ m_pLevel = TEXT("99");
+ m_bAnimation = false;
+ static_cast(m_pOwner)->Add_Function(TEXT("Enemy_HpDie"), [this](void* p) {this->Set_FadeOut(); });
+ return S_OK;
+}
+
+void CEnemy_Info::Priority_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ __super::Priority_Update(fTimeDelta);
+}
+
+void CEnemy_Info::Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+
+ if (m_bFadeIn == true)
+ {
+ if (m_fAlpha <= 1.f)
+ {
+ m_fAlpha += fTimeDelta * m_fAlphaTime;
+ m_bHover = true;
+ }
+
+ if (m_fAlpha >= 1.f)
+ {
+ m_bFadeIn = false;
+ m_fAlpha = 1.f;
+ }
+ }
+
+ if (m_bFadeOut == true)
+ {
+ if (m_fAlpha >= 0.f)
+ m_fAlpha -= fTimeDelta * m_fAlphaTime;
+
+ if (m_fAlpha <= 0.f)
+ {
+ m_bFadeOut = false;
+ m_bHover = false;
+ m_fAlpha = 0.f;
+ }
+ }
+
+ if (m_pGameInstance->Key_Down(DIK_K))
+ {
+ Set_FadeIn();
+ }
+ if (m_pGameInstance->Key_Down(DIK_L))
+ {
+ Set_FadeOut();
+ }
+
+ __super::Update(fTimeDelta);
+}
+
+void CEnemy_Info::Late_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ if (m_bVisible) {
+ m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
+ __super::Late_Update(fTimeDelta);
+ }
+}
+
+HRESULT CEnemy_Info::Render()
+{
+ if (m_bHover == true)
+ {
+ if (FAILED(Bind_ShaderResources())) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::DEFAULT)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Bind_Resources())) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Render())) {
+ return E_FAIL;
+ }
+
+ m_fFontOffSet = (m_pGameInstance->FontSizeX(TEXT("Font_size20"), m_pEnemy_Name.c_str()) - 29.f) * 0.5f;
+ m_fFont2OffSet = (m_pGameInstance->FontSizeX(TEXT("UI_size15"), m_pLevel.c_str()) - 13.f) * 0.5f;
+
+ m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pEnemy_Name.c_str(), _float2(m_fFontPos.x + m_fX - m_fFontOffSet, m_fFontPos.y + m_fY), XMVectorSet(1.f* m_fAlpha,1.f* m_fAlpha,1.f* m_fAlpha, m_fAlpha));
+ m_pGameInstance->Render_Text(TEXT("UI_size15"), m_pLevel.c_str(), _float2(m_fFontX + m_fX - m_fFont2OffSet, m_fFontY + m_fY), XMVectorSet(0.f, (120.f / 255.f)* m_fAlpha, 0.f, m_fAlpha));
+ }
+
+ return S_OK;
+}
+
+_vector CEnemy_Info::Get_WorldPostion()
+{
+ return m_pTransformCom->Get_State(STATE::POSITION);
+}
+
+HRESULT CEnemy_Info::Bind_ShaderResources()
+{
+ if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ return S_OK;
+}
+
+HRESULT CEnemy_Info::Ready_Components(void* pArg)
+{
+ if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_HealthMeter_LevelBox"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
+ {
+ return E_FAIL;
+ }
+ return S_OK;
+}
+
+void CEnemy_Info::Set_Info(_int Level, _wstring Name)
+{
+ if (m_bAnimation == true)
+ {
+ return;
+ }
+ m_pLevel = to_wstring(Level);
+ m_pEnemy_Name = Name;
+ Set_FadeIn();
+}
+
+CEnemy_Info* CEnemy_Info::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CEnemy_Info* pInstance = new CEnemy_Info(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CEnemy_Info");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CEnemy_Info::Clone(void* pArg, CGameObject* pOwner)
+{
+ CEnemy_Info* pInstance = new CEnemy_Info(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CSpell_Image");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CEnemy_Info::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pDiffuse_TextureCom);
+
+ SAFE_RELEASE(m_pShaderCom);
+ SAFE_RELEASE(m_pVIBufferCom);
+}
+
+#ifdef _DEBUG
+void CEnemy_Info::Describe_Entity()
+{
+}
+#endif // _DEBUG
diff --git a/Jusin154_Team3D/Client/Private/Enemy_Panel.cpp b/Jusin154_Team3D/Client/Private/Enemy_Panel.cpp
new file mode 100644
index 000000000..d6c0cf606
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/Enemy_Panel.cpp
@@ -0,0 +1,163 @@
+#include "pch.h"
+#include "Enemy_Panel.h"
+#include "GameInstance.h"
+#include "Enemy_HpBar.h"
+#include "Enemy_Info.h"
+
+CEnemy_Panel::CEnemy_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ :CPanelObject(pDevice, pContext)
+{
+}
+
+CEnemy_Panel::CEnemy_Panel(const CEnemy_Panel& rhs)
+ :CPanelObject(rhs)
+{
+}
+
+HRESULT CEnemy_Panel::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CEnemy_Panel::Initialize(void* pArg)
+{
+ CUIObject::UIOBJECT_DESC Desc{};
+
+ Desc.fX = 960.f;
+ Desc.fY = 50.f;
+ Desc.fSizeX = 960.f;
+ Desc.fSizeY = 150.f;
+
+
+ if (FAILED(__super::Initialize(&Desc)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Ready_Components(pArg)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Ready_Element(pArg)))
+ {
+ return E_FAIL;
+ }
+
+ m_fAlpha = 1.f;
+ m_fCanvasAlpha = 1.f;
+ Visible(true);
+ ElementAllVisible(true);
+ return S_OK;
+}
+
+void CEnemy_Panel::Priority_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ __super::Priority_Update(fTimeDelta);
+}
+
+void CEnemy_Panel::Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+
+ __super::Update(fTimeDelta);
+}
+
+void CEnemy_Panel::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_Panel::Render()
+{
+ return S_OK;
+}
+
+_vector CEnemy_Panel::Get_WorldPostion()
+{
+ return m_pTransformCom->Get_State(STATE::POSITION);
+}
+
+HRESULT CEnemy_Panel::Bind_ShaderResources()
+{
+ return S_OK;
+}
+
+HRESULT CEnemy_Panel::Ready_Components(void* pArg)
+{
+ if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom)))
+ {
+ return E_FAIL;
+ }
+ return S_OK;
+}
+
+HRESULT CEnemy_Panel::Ready_Element(void* pArg)
+{
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pEnemy_HpBar))))
+ {
+ return E_FAIL;
+ }
+ Add_Element(TEXT("Enemy_HpBar"), m_pEnemy_HpBar);
+
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pEnemy_Info))))
+ {
+ return E_FAIL;
+ }
+ Add_Element(TEXT("Enemy_Info"), m_pEnemy_Info);
+
+ return S_OK;
+}
+
+CEnemy_Panel* CEnemy_Panel::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CEnemy_Panel* pInstance = new CEnemy_Panel(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CEnemy_Panel");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CEnemy_Panel::Clone(void* pArg, CGameObject* pOwner)
+{
+ CEnemy_Panel* pInstance = new CEnemy_Panel(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CEnemy_Panel");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CEnemy_Panel::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pVIBufferCom);
+}
+
+#ifdef _DEBUG
+void CEnemy_Panel::Describe_Entity()
+{
+}
+#endif // _DEBUG
diff --git a/Jusin154_Team3D/Client/Private/GamePlay_Canvas.cpp b/Jusin154_Team3D/Client/Private/GamePlay_Canvas.cpp
index e42fc9290..6bd2f5bff 100644
--- a/Jusin154_Team3D/Client/Private/GamePlay_Canvas.cpp
+++ b/Jusin154_Team3D/Client/Private/GamePlay_Canvas.cpp
@@ -5,6 +5,7 @@
#include "MiniMap_Panel.h"
#include "Loading_Panel.h"
#include "Action_Panel.h"
+#include "Enemy_Panel.h"
//#include "Mouse_Cursor.h"
CGamePlay_Canvas::CGamePlay_Canvas(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
@@ -111,6 +112,12 @@ HRESULT CGamePlay_Canvas::Ready_Panel(void* pArg)
}
Add_Panel(TEXT("ActionPanel"), m_pAction_Panel);
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pEnemy_Panel))))
+ {
+ return E_FAIL;
+ }
+ Add_Panel(TEXT("Enemy_Panel"), m_pEnemy_Panel);
+
return S_OK;
}
diff --git a/Jusin154_Team3D/Client/Private/Goblin.cpp b/Jusin154_Team3D/Client/Private/Goblin.cpp
index aca9ea881..0b33cbbe3 100644
--- a/Jusin154_Team3D/Client/Private/Goblin.cpp
+++ b/Jusin154_Team3D/Client/Private/Goblin.cpp
@@ -14,6 +14,8 @@
#include "State_Combat.h"
#pragma endregion
+#include "EffectParts.h"
+
CGoblin::CGoblin(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CMonster(pDevice, pContext)
@@ -296,6 +298,46 @@ HRESULT CGoblin::Ready_Parts()
Get_PartObject()->Set_Visible(false);
+#pragma region EFFECT
+ /* EFFECT */
+
+ CPartObject::PARTOBJECT_DESC PartsDesc{};
+
+ PartsDesc.pParentTransform = m_pTransformCom;
+
+
+
+ if (FAILED(Add_PartObject("Goblin_Particle",g_iStaticLevel, &m_pGoblin_Particle, &PartsDesc)))
+ {
+ return E_FAIL;
+ }
+
+ m_pGoblin_Particle->Load("../Bin/Resources/Data/Effect/Goblin/GoblinSide/Goblin_Particle", static_cast(NEXT_LEVEL));
+ m_pGoblin_Particle->FollowParants(m_pModelCom->Get_BoneMatrixPtr("RightShoulder"));
+
+
+
+ if (FAILED(Add_PartObject("Goblin_Particle2", g_iStaticLevel, &m_pGoblin_Particle2, &PartsDesc)))
+ {
+ return E_FAIL;
+ }
+
+ m_pGoblin_Particle2->Load("../Bin/Resources/Data/Effect/Goblin/GoblinSide/Goblin_Particle2", static_cast(NEXT_LEVEL));
+ m_pGoblin_Particle2->FollowParants(m_pModelCom->Get_BoneMatrixPtr("RightShoulder"));
+
+
+ if (FAILED(Add_PartObject("Goblin_Smoke", g_iStaticLevel, &m_pSmoke, &PartsDesc)))
+ {
+ return E_FAIL;
+ }
+
+ m_pSmoke->Load("../Bin/Resources/Data/Effect/Goblin/GoblinSide/Goblin_Smoke", static_cast(NEXT_LEVEL));
+ m_pSmoke->FollowParants(m_pModelCom->Get_BoneMatrixPtr("Spine2"));
+
+
+#pragma endregion
+ return S_OK;
+
return S_OK;
}
@@ -354,6 +396,9 @@ void CGoblin::Free()
SAFE_RELEASE(m_pCharacter_Controller);
SAFE_RELEASE(m_pRigidBody);
+ SAFE_RELEASE(m_pSmoke);
+ SAFE_RELEASE(m_pGoblin_Particle);
+ SAFE_RELEASE(m_pGoblin_Particle2);
Safe_Delete(m_pCallBack_Behavior);
Safe_Delete(m_pCallBack_HitReport);
}
diff --git a/Jusin154_Team3D/Client/Private/Level_Loading.cpp b/Jusin154_Team3D/Client/Private/Level_Loading.cpp
index 992ab1577..046004c60 100644
--- a/Jusin154_Team3D/Client/Private/Level_Loading.cpp
+++ b/Jusin154_Team3D/Client/Private/Level_Loading.cpp
@@ -40,15 +40,17 @@ 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)
m_bNextLevel = true;
else
{
- static_cast(m_pIntro_Image)->Set_Hover(true);
- m_bDelay = true;
+ if (m_pGameInstance->Key_Down(DIK_F1))
+ {
+ static_cast(m_pIntro_Image)->Set_Hover(true);
+ m_bDelay = true;
+ }
}
}
diff --git a/Jusin154_Team3D/Client/Private/Level_Logo.cpp b/Jusin154_Team3D/Client/Private/Level_Logo.cpp
index 0579d24ac..9e0e471b9 100644
--- a/Jusin154_Team3D/Client/Private/Level_Logo.cpp
+++ b/Jusin154_Team3D/Client/Private/Level_Logo.cpp
@@ -30,7 +30,7 @@ void CLevel_Logo::Update(_float fTimeDelta)
m_pGameInstance->Set_LevelToChange();
#endif // 기무리
- if (m_pGameInstance->Key_Up(DIK_F1))
+ if (m_pGameInstance->Key_Down(DIK_F1))
{
m_pGameInstance->Set_LevelToChange();
}
diff --git a/Jusin154_Team3D/Client/Private/Levioso.cpp b/Jusin154_Team3D/Client/Private/Levioso.cpp
index 92a800e41..6813d4568 100644
--- a/Jusin154_Team3D/Client/Private/Levioso.cpp
+++ b/Jusin154_Team3D/Client/Private/Levioso.cpp
@@ -101,6 +101,12 @@ void CLevioso::Late_Update(_float fTimeDelta)
OnCollision(this);
}
+ if (false == m_bHit) {
+ _vector vStartPos = XMLoadFloat4(&m_vStartPos);
+ _vector vEndPos = XMLoadFloat4(&m_vEndPos);
+ SweepTarget(vStartPos, vEndPos, 0.2f);
+ }
+
__super::Late_Update(fTimeDelta);
diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp
index 1adefdcd4..70c8167c5 100644
--- a/Jusin154_Team3D/Client/Private/Loader.cpp
+++ b/Jusin154_Team3D/Client/Private/Loader.cpp
@@ -70,6 +70,10 @@
#include "Spell_UI.h"
#include "Magic_Item.h"
+#include "Enemy_Panel.h"
+#include "Enemy_HpBar.h"
+#include "Enemy_Info.h"
+
#include "Spell_Canvas.h"
#include "Spell_Panel.h"
#include "Current_Spell_Slot.h"
@@ -1033,7 +1037,7 @@ HRESULT CLoader::Loading_For_GamePlay()
return E_FAIL;
}
/* Terrain_AlphaMap */
- if(FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("HogsmeadeAlphaMap"),
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("HogsmeadeAlphaMap"),
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/Terrain/Hogsmeade_AlphaMap.dds"), 0)))) {
return E_FAIL;
}
@@ -1574,6 +1578,19 @@ HRESULT CLoader::Loading_For_GamePlay()
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CNoMountIcon::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
}
+
+ /* For.Prototype_GameObject_NoMountIcon*/
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CEnemy_Panel::Create(m_pDevice, m_pContext)))) {
+ return E_FAIL;
+ }
+ /* For.Prototype_GameObject_NoMountIcon*/
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CEnemy_HpBar::Create(m_pDevice, m_pContext)))) {
+ return E_FAIL;
+ }
+ /* For.Prototype_GameObject_NoMountIcon*/
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CEnemy_Info::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))))
@@ -2044,7 +2061,7 @@ vector* APIENTRY Deferred_FolderLoad_Main(ID3D11Device* pDevice, I
if (strcmp(file.path().extension().string().c_str(), pFileExt)) { continue; }
FOLDER_LOAD* pContents = new FOLDER_LOAD;
-
+
{ // FOLDER_LOAD
_char szFilePath[MAX_PATH] = {};
strcpy_s(szFilePath, MAX_PATH, file.path().string().c_str());
@@ -2052,7 +2069,7 @@ vector* APIENTRY Deferred_FolderLoad_Main(ID3D11Device* pDevice, I
_wstring wstrFileName = L"Prototype_GameObject_" + file.path().stem().wstring();
CModel* pModel = CModel::Create(pDevice, pContext, MODEL::ENVIROMENT, szFilePath);
-
+
_uint iNumMesh = pModel->Get_NumMeshes();
{
diff --git a/Jusin154_Team3D/Client/Private/Loding_Panel.cpp b/Jusin154_Team3D/Client/Private/Loding_Panel.cpp
index 8424ed42e..cb6ce598a 100644
--- a/Jusin154_Team3D/Client/Private/Loding_Panel.cpp
+++ b/Jusin154_Team3D/Client/Private/Loding_Panel.cpp
@@ -41,7 +41,11 @@ HRESULT CLoding_Panel::Initialize(void* pArg)
m_fSortZ = 0.f;
m_iImageNum = 0;
//m_vImageposSi = _float4(0.f, 0.f, 1792.f, 1024.f);
-
+#ifdef _DEBUG
+ INHYUK = true;
+ human = 0;
+#endif // DEBUG
+
return S_OK;
}
void CLoding_Panel::Set_Image(_int Index)
@@ -54,6 +58,58 @@ void CLoding_Panel::Priority_Update(_float fTimeDelta)
void CLoding_Panel::Update(_float fTimeDelta)
{
+#ifdef _DEBUG
+ if (m_pGameInstance->Key_Down(DIK_M))
+ {
+ human++;
+ if (human > 4) // 4보다 크면 0으로
+ human = 0;
+ }
+ if (m_pGameInstance->Key_Down(DIK_N))
+ {
+ human--;
+ if (human < 0) // 0보다 작으면 4로
+ human = 4;
+ }
+ switch (human)
+ {
+ case 0:
+ INHYUK = true;
+ JINHO = false;
+ HYUNBIN = false;
+ NURI = false;
+ JINWOO = false;
+ break;
+ case 1:
+ INHYUK = false;
+ JINHO = true;
+ HYUNBIN = false;
+ NURI = false;
+ JINWOO = false;
+ break;
+ case 2:
+ INHYUK = false;
+ JINHO = false;
+ HYUNBIN = true;
+ NURI = false;
+ JINWOO = false;
+ break;
+ case 3:
+ INHYUK = false;
+ JINHO = false;
+ HYUNBIN = false;
+ NURI = true;
+ JINWOO = false;
+ break;
+ case 4:
+ INHYUK = false;
+ JINHO = false;
+ HYUNBIN = false;
+ NURI = false;
+ JINWOO = true;
+ break;
+ }
+#endif // DEBUG
}
void CLoding_Panel::Late_Update(_float fTimeDelta)
@@ -75,6 +131,20 @@ HRESULT CLoding_Panel::Render()
if (FAILED(m_pVIBufferCom->Render())) {
return E_FAIL;
}
+#ifdef _DEBUG
+ m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("<- N M->."), _float2(100.f, 750.f));
+
+ if (INHYUK == true)
+ m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("알고 계셨나요?\nUI의 생일은 28일 이랍니다."), _float2(100.f, 800.f));
+ if (JINHO == true)
+ m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("알고 계셨나요?\n우리팀 맵툴은 최강 입니다."), _float2(100.f, 800.f));
+ if (HYUNBIN == true)
+ m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("알고 계셨나요?\n이제 막 범인에서 벗어 났습니다."), _float2(100.f, 800.f));
+ if (NURI == true)
+ m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("알고 계셨나요?\n이제 막 슬슬 범인 입니다."), _float2(100.f, 800.f));
+ if (JINWOO == true)
+ m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("알고 계셨나요?\n그는 그림자의 군주입니다."), _float2(100.f, 800.f));
+#endif // DEBUG
return S_OK;
}
diff --git a/Jusin154_Team3D/Client/Private/Magic_Item.cpp b/Jusin154_Team3D/Client/Private/Magic_Item.cpp
index 4b081f9ae..577303621 100644
--- a/Jusin154_Team3D/Client/Private/Magic_Item.cpp
+++ b/Jusin154_Team3D/Client/Private/Magic_Item.cpp
@@ -47,6 +47,10 @@ HRESULT CMagic_Item::Initialize(void* pArg)
m_iArratCount = 2;
Compute_UV(0);
Compute_Image();
+ m_fFontX = 1171.f;
+ m_fFontY = 870.f;
+ m_iPotionIndex = 0;
+ m_iPerPotionIndex = -1;
return S_OK;
}
@@ -132,6 +136,14 @@ void CMagic_Item::Update(_float fTimeDelta)
}
}
+ if (m_iPerPotionIndex != m_iPotionIndex)
+ {
+ m_strPotion = to_wstring(m_iPotionIndex);
+ m_fFontOffSet = (m_pGameInstance->FontSizeX(TEXT("UI_size15"), m_strPotion.c_str()) - 13.f) * 0.5f;
+ m_iPerPotionIndex = m_iPotionIndex;
+ }
+
+
if (m_vUVScale.y <= 1)
{
m_vUVScale.y += fTimeDelta * (1.f / m_fCoolTime);
@@ -172,6 +184,7 @@ HRESULT CMagic_Item::Render()
{
return E_FAIL;
}
+ m_pGameInstance->Render_Text(TEXT("UI_size15"), m_strPotion.c_str(), _float2((m_fFontX + m_fX) - m_fFontOffSet, m_fFontY + m_fY), XMVectorSet((208.f / 255.f) * m_fAlpha, (177.f / 255.f) * m_fAlpha, (52.f / 255.f) * m_fAlpha, m_fAlpha));
return S_OK;
}
diff --git a/Jusin154_Team3D/Client/Private/MainApp.cpp b/Jusin154_Team3D/Client/Private/MainApp.cpp
index 54b8bbf5e..b2b307ef3 100644
--- a/Jusin154_Team3D/Client/Private/MainApp.cpp
+++ b/Jusin154_Team3D/Client/Private/MainApp.cpp
@@ -97,6 +97,26 @@ void CMainApp::Compute_FrameCount()
HRESULT CMainApp::Ready_Default_Setting()
{
+ if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size13"), TEXT("../Bin/Resources/Fonts/Font_size13.spritefont"))))
+ return E_FAIL;
+
+ if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size14"), TEXT("../Bin/Resources/Fonts/Font_size14.spritefont"))))
+ return E_FAIL;
+
+ if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size15"), TEXT("../Bin/Resources/Fonts/Font_size15.spritefont"))))
+ return E_FAIL;
+
+ if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size20"), TEXT("../Bin/Resources/Fonts/Font_size20.spritefont"))))
+ return E_FAIL;
+
+ if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size21"), TEXT("../Bin/Resources/Fonts/Font_size21.spritefont"))))
+ return E_FAIL;
+
+ if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size30"), TEXT("../Bin/Resources/Fonts/Font_size30.spritefont"))))
+ return E_FAIL;
+
+ if (FAILED(m_pGameInstance->Add_Font(TEXT("UI_size15"), TEXT("../Bin/Resources/Fonts/UI_size15.spritefont"))))
+ return E_FAIL;
return S_OK;
}
diff --git a/Jusin154_Team3D/Client/Private/MiniMap_TrimBorder.cpp b/Jusin154_Team3D/Client/Private/MiniMap_TrimBorder.cpp
index 1216c67d9..ce437d74f 100644
--- a/Jusin154_Team3D/Client/Private/MiniMap_TrimBorder.cpp
+++ b/Jusin154_Team3D/Client/Private/MiniMap_TrimBorder.cpp
@@ -1,6 +1,7 @@
#include "pch.h"
#include "MiniMap_TrimBorder.h"
#include "GameInstance.h"
+#include "InfoInstance.h"
CMiniMap_TrimBorder::CMiniMap_TrimBorder(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CElementObject(pDevice, pContext)
@@ -8,7 +9,8 @@ CMiniMap_TrimBorder::CMiniMap_TrimBorder(ID3D11Device* pDevice, ID3D11DeviceCont
}
CMiniMap_TrimBorder::CMiniMap_TrimBorder(const CMiniMap_TrimBorder& rhs)
- :CElementObject(rhs)
+ :CElementObject(rhs),
+ m_pInfoInstance(CInfoInstance::GetInstance())
{
}
@@ -82,7 +84,7 @@ void CMiniMap_TrimBorder::Update(_float fTimeDelta)
m_fAlpha = 0.f;
}
}
-
+ m_fAngle = -atan2(m_pInfoInstance->Get_CameraCoordinateSystem().first.x, m_pInfoInstance->Get_CameraCoordinateSystem().first.z);
m_fTime += fTimeDelta * m_fTimeMult;
__super::Update(fTimeDelta);
}
@@ -104,7 +106,7 @@ HRESULT CMiniMap_TrimBorder::Render()
if (FAILED(Bind_ShaderResources())) {
return E_FAIL;
}
- if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ALPHABLEND)))) {
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ROTATION)))) {
return E_FAIL;
}
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
@@ -160,6 +162,10 @@ HRESULT CMiniMap_TrimBorder::Bind_ShaderResources()
{
return E_FAIL;
}
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fMapAngle", &m_fAngle, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
return S_OK;
}
diff --git a/Jusin154_Team3D/Client/Private/NomalJap.cpp b/Jusin154_Team3D/Client/Private/NomalJap.cpp
index 502976a40..41a6b1429 100644
--- a/Jusin154_Team3D/Client/Private/NomalJap.cpp
+++ b/Jusin154_Team3D/Client/Private/NomalJap.cpp
@@ -123,67 +123,15 @@ void CNomalJap::Late_Update(_float fTimeDelta)
return;
}
if (false == m_bHit) {
- SweepTarget();
+ _vector vStartPos = XMLoadFloat4(&m_vStartPos);
+ _vector vEndPos = m_pProjectile->Get_WorldPostion();
+ SweepTarget(vStartPos,vEndPos, 0.002f);
}
Get_PartObject()->Trail_Update(m_pProjectile->Get_Component()->Get_XMWorldMatrix(), fTimeDelta);
__super::Late_Update(fTimeDelta);
}
-void CNomalJap::SweepTarget()
-{
- _vector vStartPos = m_pProjectile->Get_WorldPostion();
- _vector vEndPos = XMLoadFloat4(&m_vTargetPos);
- _vector vDir = { vEndPos - vStartPos };
-
- _float fDistance = XMVectorGetX(XMVector3Length(vEndPos - vStartPos));
-
- PSX::PxSweepBuffer pxBuffer = {};
-
- _bool bHit = m_pGameInstance->SphereCast(0.002f, vStartPos, vDir, fDistance, PSX::PxHitFlag::ePOSITION | PSX::PxHitFlag::eNORMAL, PSX::PxQueryFlag::eDYNAMIC, pxBuffer);
-
- if (bHit) {
- const PSX::PxSweepHit& hit = pxBuffer.block;
- PSX::PxRigidActor* pActor = hit.actor;
- PSX::PxShape* pShape = hit.shape;
- ON_COLLISION_INFO tagCollInfo = {};
- 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);
-
- switch (pUserData->eKind)
- {
- case PHYSX_KIND::CCTActor:
- {
- switch (PXOBJECT(pUserData->iSubKind))
- {
- case PXOBJECT::MONSTER:
- break;
- case PXOBJECT::GOBLIN_WARRIOR:
- {
- pUserData->pOwner->OnCollision(this, &tagCollInfo);
- m_bHit = true;
- }
- break;
- case PXOBJECT::TROLL:
- {
- pUserData->pOwner->OnCollision(this, &tagCollInfo);
- m_bHit = true;
- }
- break;
- }
- }
- }
- }
- }
-}
-
HRESULT CNomalJap::Pre_Setting(CGameObject* pObject, void* pArg)
{
if (FAILED(__super::Pre_Setting(pObject, nullptr)))
diff --git a/Jusin154_Team3D/Client/Private/Player.cpp b/Jusin154_Team3D/Client/Private/Player.cpp
index 0a67ea48d..3ca9bf976 100644
--- a/Jusin154_Team3D/Client/Private/Player.cpp
+++ b/Jusin154_Team3D/Client/Private/Player.cpp
@@ -72,8 +72,6 @@ HRESULT CPlayer::Initialize(void* pArg)
Set_Anim();
- m_eSpell = STATEANIM::DESCENDO;
-
{
CFSM::FSM_DESC FSMDesc{};
FSMDesc.pStates = &m_States;
diff --git a/Jusin154_Team3D/Client/Private/Player_States.cpp b/Jusin154_Team3D/Client/Private/Player_States.cpp
index 277034e47..38cd6c9d1 100644
--- a/Jusin154_Team3D/Client/Private/Player_States.cpp
+++ b/Jusin154_Team3D/Client/Private/Player_States.cpp
@@ -500,7 +500,7 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
{
pairAnimInfo = m_Animation[STATEANIM::JOG_AIM_LEFT];
}
- else if (m_pFSM->IsEnable(FSMSTATE::JOG))
+ else if (m_pFSM->IsEnable(FSMSTATE::JOG) && !m_pFSM->IsEnable(FSMSTATE::SPRINT))
{
if (degree > 35.f && degree < 55.f)
{
@@ -532,7 +532,7 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
{
pairAnimInfo = m_Animation[STATEANIM::JOG_AIM_RIGHT];
}
- else if (m_pFSM->IsEnable(FSMSTATE::JOG))
+ else if (m_pFSM->IsEnable(FSMSTATE::JOG) && !m_pFSM->IsEnable(FSMSTATE::SPRINT))
{
if (degree < -35.f && degree > -55.f)
{
@@ -565,7 +565,7 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
{
pairAnimInfo = m_Animation[STATEANIM::JOG_AIM_BWD];
}
- else if (m_pFSM->IsEnable(FSMSTATE::JOG))
+ else if (m_pFSM->IsEnable(FSMSTATE::JOG) && !m_pFSM->IsEnable(FSMSTATE::SPRINT))
{
if (m_pModelCom->IsFinishedAnim() && iCurrentAnimIndex == m_Animation[STATEANIM::JOG_BWD].first)
{
diff --git a/Jusin154_Team3D/Client/Private/Potion.cpp b/Jusin154_Team3D/Client/Private/Potion.cpp
index 2d52f3062..235a2e4c6 100644
--- a/Jusin154_Team3D/Client/Private/Potion.cpp
+++ b/Jusin154_Team3D/Client/Private/Potion.cpp
@@ -42,6 +42,10 @@ HRESULT CPotion::Initialize(void* pArg)
m_fAlphaTime = 1.f;
m_vImageSlotPos = _float2(45.f, 45.f);
m_vImageSize = _float2(32.f, 32.f);
+ m_fFontX = 1163.f;
+ m_fFontY = 860.f;
+ m_iPotionIndex = 0;
+ m_iPerPotionIndex = -1;
return S_OK;
}
@@ -91,6 +95,12 @@ void CPotion::Update(_float fTimeDelta)
m_fTime = -1.f;
}
+ if (m_iPerPotionIndex != m_iPotionIndex)
+ {
+ m_strPotion = to_wstring(m_iPotionIndex);
+ m_fFontOffSet = (m_pGameInstance->FontSizeX(TEXT("UI_size15"), m_strPotion.c_str()) - 13.f) * 0.5f;
+ m_iPerPotionIndex = m_iPotionIndex;
+ }
m_fTime += fTimeDelta * m_fTimeMult;
@@ -123,6 +133,7 @@ HRESULT CPotion::Render()
if (FAILED(m_pVIBufferCom->Render())) {
return E_FAIL;
}
+ m_pGameInstance->Render_Text(TEXT("UI_size15"), m_strPotion.c_str(), _float2((m_fFontX + m_fX) - m_fFontOffSet, m_fFontY + m_fY), XMVectorSet((208.f / 255.f) * m_fAlpha, (177.f / 255.f) * m_fAlpha, (52.f / 255.f) * m_fAlpha, m_fAlpha));
return S_OK;
}
diff --git a/Jusin154_Team3D/Client/Private/Skill_Data.cpp b/Jusin154_Team3D/Client/Private/Skill_Data.cpp
index 29603666b..ad7cbb26a 100644
--- a/Jusin154_Team3D/Client/Private/Skill_Data.cpp
+++ b/Jusin154_Team3D/Client/Private/Skill_Data.cpp
@@ -96,31 +96,35 @@ HRESULT CSkill_Data::Load_SpellInfo(const _char* pFilePath)
int id = 0;
pSpell->QueryIntAttribute("Spell_ID", &id);
- if (id < 0 || id > 34)
+ if (id >= 0 && id <= 34)
{
- pSpell = pSpell->NextSiblingElement("Spell");
- continue;
+ SpellInfo[id].iSpell_ID = id;
+ SpellInfo[id].pSpell_Name = CMyTools::ToWstring(pSpell->Attribute("Spell_Name"));
+ SpellInfo[id].pImage_Name = CMyTools::ToWstring(pSpell->Attribute("Image_Name"));
+ pSpell->QueryIntAttribute("Spell_Type", &SpellInfo[id].iSpell_Type);
+ SpellInfo[id].pType_Name = CMyTools::ToWstring(pSpell->Attribute("Type_Name"));
+ pSpell->QueryIntAttribute("Skill_Type", &SpellInfo[id].iSkill_Type);
+ pSpell->QueryFloatAttribute("Spell_Damage", &SpellInfo[id].fSpell_Damage);
+ pSpell->QueryFloatAttribute("Spell_Cooltime", &SpellInfo[id].fSpell_CoolTime);
+ pSpell->QueryFloatAttribute("Duration", &SpellInfo[id].fDuration);
+ pSpell->QueryIntAttribute("AnimNum", &SpellInfo[id].iAnimNum);
+ SpellInfo[id].pSpellInfo = CMyTools::ToWstring(pSpell->Attribute("SpellInfo"));
+ _int lock = 0, equip = 0, use = 0;
+ pSpell->QueryIntAttribute("Spell_Lock", &lock);
+ pSpell->QueryIntAttribute("Equip_Spell", &equip);
+ pSpell->QueryIntAttribute("Use_Skill", &use);
+ SpellInfo[id].bSpell_Lock = lock != 0;
+ SpellInfo[id].bEquip_Spell = equip != 0;
+ SpellInfo[id].bUse_Skill = use != 0;
+ pSpell->QueryFloatAttribute("Preview", &SpellInfo[id].fPreview);
+ pSpell->QueryFloatAttribute("Vidio", &SpellInfo[id].fVidio);
+
+ m_iSpell_Count++;
+ m_iSpell_CoolTime[id] = 1.2f;
}
- SpellInfo[id].iSpell_ID = id;
- SpellInfo[id].pSpell_Name = CMyTools::ToWstring(pSpell->Attribute("Spell_Name"));
- SpellInfo[id].pImage_Name = CMyTools::ToWstring(pSpell->Attribute("Image_Name"));
- pSpell->QueryIntAttribute("Spell_Type", &SpellInfo[id].iSpell_Type);
- pSpell->QueryIntAttribute("Skill_Type", &SpellInfo[id].iSkill_Type);
- pSpell->QueryFloatAttribute("Spell_Cooltime", &SpellInfo[id].fSpell_CoolTime);
- pSpell->QueryFloatAttribute("Duration", &SpellInfo[id].fDuration);
- pSpell->QueryIntAttribute("AnimNum", &SpellInfo[id].iAnimNum);
- SpellInfo[id].pSpellInfo = CMyTools::ToWstring(pSpell->Attribute("SpellInfo"));
- int lock = 0, equip = 0, use = 0;
- pSpell->QueryIntAttribute("Spell_Lock", &lock);
- pSpell->QueryIntAttribute("Equip_Spell", &equip);
- pSpell->QueryIntAttribute("Use_Skill", &use);
- SpellInfo[id].bSpell_Lock = lock != 0;
- SpellInfo[id].bEquip_Spell = equip != 0;
- SpellInfo[id].bUse_Skill = use != 0;
+ // 항상 다음 Spell로 이동
pSpell = pSpell->NextSiblingElement("Spell");
- m_iSpell_Count++;
- m_iSpell_CoolTime[id] = 1.2f;
}
return S_OK;
diff --git a/Jusin154_Team3D/Client/Private/Spell_Header.cpp b/Jusin154_Team3D/Client/Private/Spell_Header.cpp
index a7f4526f9..491322ec4 100644
--- a/Jusin154_Team3D/Client/Private/Spell_Header.cpp
+++ b/Jusin154_Team3D/Client/Private/Spell_Header.cpp
@@ -26,7 +26,7 @@ HRESULT CSpell_Header::Initialize(void* pArg)
Desc.fX = 600.f;
Desc.fY = -385.f;
Desc.fSizeX = 512.f;
- Desc.fSizeY = 64.f;
+ Desc.fSizeY = 80.f;
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
@@ -48,6 +48,11 @@ HRESULT CSpell_Header::Initialize(void* pArg)
static_cast(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); });
static_cast(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); });
static_cast(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); });
+ static_cast(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); });
+ m_fFontX = 920.f;
+ m_fFontY = 510.f;
+ m_fType = _float2(935.f, 550.f);
+ m_iPerSpellIndex = -1;
return S_OK;
}
@@ -76,6 +81,7 @@ void CSpell_Header::Update(_float fTimeDelta)
if (m_fAlpha >= 1.f)
{
m_bFadeIn = false;
+ m_bHover = true;
m_fAlpha = 1.f;
}
}
@@ -83,7 +89,10 @@ void CSpell_Header::Update(_float fTimeDelta)
if (m_bFadeOut == true)
{
if (m_fAlpha >= 0.f)
- m_fAlpha -= fTimeDelta * m_fAlphaTime;;
+ {
+ m_fAlpha -= fTimeDelta * m_fAlphaTime;
+ m_bHover = false;
+ }
if (m_fAlpha <= 0.f)
{
@@ -92,9 +101,12 @@ void CSpell_Header::Update(_float fTimeDelta)
}
}
- if (m_iSpellType != -1)
+ if (m_iSpellType != -1 && m_iPerSpellIndex != m_iSpellType)
{
- m_iSkillType = m_pInfoInstance->Get_Spell_Info(m_iSpellType).iSpell_Type;
+ m_iSkillType = static_cast(m_pOwner)->Get_Info(m_iSpellType).iSpell_Type;
+ m_pSpell_Name = static_cast(m_pOwner)->Get_Info(m_iSpellType).pSpell_Name;
+ m_fSpell_Type = static_cast(m_pOwner)->Get_Info(m_iSpellType).pType_Name;
+ m_iPerSpellIndex = m_iSpellType;
}
m_fTime += fTimeDelta * m_fTimeMult;
@@ -128,6 +140,11 @@ HRESULT CSpell_Header::Render()
return E_FAIL;
}
+
+ m_fFontOffSet = (m_pGameInstance->FontSizeX(TEXT("Font_size20"), m_pSpell_Name.c_str()) - 53.f) * 0.5f;
+ m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pSpell_Name.c_str(), _float2((m_fFontX + m_fX) - m_fFontOffSet, m_fFontY + m_fY), XMVectorSet((215.f / 255.f) * m_fAlpha, (185.f / 255.f) * m_fAlpha, (95.f / 255.f) * m_fAlpha, m_fAlpha));
+ m_pGameInstance->Render_Text(TEXT("Font_size13"), m_fSpell_Type.c_str(), _float2(m_fType.x + m_fX, m_fType.y + m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha));
+
return S_OK;
}
diff --git a/Jusin154_Team3D/Client/Private/Spell_Header_Line.cpp b/Jusin154_Team3D/Client/Private/Spell_Header_Line.cpp
index 1bd1c8aa5..c9f9518db 100644
--- a/Jusin154_Team3D/Client/Private/Spell_Header_Line.cpp
+++ b/Jusin154_Team3D/Client/Private/Spell_Header_Line.cpp
@@ -22,7 +22,7 @@ HRESULT CSpell_Header_Line::Initialize(void* pArg)
CUIObject::UIOBJECT_DESC Desc{};
Desc.fX = 600.f;
- Desc.fY = -345.f;
+ Desc.fY = -340.f;
Desc.fSizeX = 487.f;
Desc.fSizeY = 18.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) };
diff --git a/Jusin154_Team3D/Client/Private/Spell_Preview.cpp b/Jusin154_Team3D/Client/Private/Spell_Preview.cpp
index 662d64f78..67c9c579e 100644
--- a/Jusin154_Team3D/Client/Private/Spell_Preview.cpp
+++ b/Jusin154_Team3D/Client/Private/Spell_Preview.cpp
@@ -1,6 +1,7 @@
#include "pch.h"
#include "Spell_Preview.h"
#include "GameInstance.h"
+#include "InfoInstance.h"
CSpell_Preview::CSpell_Preview(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
@@ -9,7 +10,8 @@ CSpell_Preview::CSpell_Preview(ID3D11Device* pDevice, ID3D11DeviceContext* pCont
}
CSpell_Preview::CSpell_Preview(const CSpell_Preview& rhs)
- :CElementObject(rhs)
+ :CElementObject(rhs),
+ m_pInfoInstance(CInfoInstance::GetInstance())
{
}
@@ -43,12 +45,18 @@ HRESULT CSpell_Preview::Initialize(void* pArg)
m_fAlphaTime = 5.f;
m_vNine_Slice = _float4(50.f, 75.f, 30.f, 96.f);
m_fTopY = m_fY - m_vScale.y * 0.5f;
+ m_fPreviewOffSet = 0.f;
+ m_fOriginPerviewSize = 280.f;
SizeUpX(512.f);
- SizeUpY(270.f);
+ SizeUpY(m_fOriginPerviewSize);
m_iSpellType = ENUM_CLASS(SPELLTYPE::CONTROL);
m_fSortZ = 0.02f;
+ static_cast(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); });
static_cast(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); });
static_cast(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); });
+ m_fFontX = 740.f;
+ m_fFontY = 500.f;
+ m_iPerSpellIndex = -1;
return S_OK;
}
@@ -76,6 +84,7 @@ void CSpell_Preview::Update(_float fTimeDelta)
if (m_fAlpha >= 1.f)
{
m_bFadeIn = false;
+ m_bHover = true;
m_fAlpha = 1.f;
}
}
@@ -83,7 +92,10 @@ void CSpell_Preview::Update(_float fTimeDelta)
if (m_bFadeOut == true)
{
if (m_fAlpha >= 0.f)
- m_fAlpha -= fTimeDelta * m_fAlphaTime;;
+ {
+ m_fAlpha -= fTimeDelta * m_fAlphaTime;
+ m_bHover = false;
+ }
if (m_fAlpha <= 0.f)
{
@@ -91,6 +103,15 @@ void CSpell_Preview::Update(_float fTimeDelta)
m_fAlpha = 0.f;
}
}
+
+ if (m_iSpellType != -1 && m_iPerSpellIndex != m_iSpellType)
+ {
+ m_pSpell_Info = static_cast(m_pOwner)->Get_Info(m_iSpellType).pSpellInfo;
+ m_fPreviewOffSet = static_cast(m_pOwner)->Get_Info(m_iSpellType).fPreview;
+ SizeUpY(m_fOriginPerviewSize + m_fPreviewOffSet);
+ m_iPerSpellIndex = m_iSpellType;
+ }
+
m_fTime += fTimeDelta * m_fTimeMult;
__super::Update(fTimeDelta);
}
@@ -121,6 +142,10 @@ HRESULT CSpell_Preview::Render()
if (FAILED(m_pVIBufferCom->Render())) {
return E_FAIL;
}
+
+
+ m_pGameInstance->Render_Text(TEXT("Font_size14"), m_pSpell_Info.c_str(), _float2(m_fFontX + m_fX, (m_fFontY + m_fY) - m_fPreviewOffSet * 0.5f), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha));
+
return S_OK;
}
diff --git a/Jusin154_Team3D/Client/Private/Spell_Vidio_Border.cpp b/Jusin154_Team3D/Client/Private/Spell_Vidio_Border.cpp
index be702f1fb..7521a2e79 100644
--- a/Jusin154_Team3D/Client/Private/Spell_Vidio_Border.cpp
+++ b/Jusin154_Team3D/Client/Private/Spell_Vidio_Border.cpp
@@ -44,6 +44,7 @@ HRESULT CSpell_Vidio_Border::Initialize(void* pArg)
m_fLerpX = m_fX;
m_fLerpY = 45;
m_bStart = false;
+
static_cast(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); });
static_cast(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); });
static_cast(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); });
diff --git a/Jusin154_Team3D/Client/Private/Troll.cpp b/Jusin154_Team3D/Client/Private/Troll.cpp
index 1dedc976b..97ea4331f 100644
--- a/Jusin154_Team3D/Client/Private/Troll.cpp
+++ b/Jusin154_Team3D/Client/Private/Troll.cpp
@@ -316,7 +316,7 @@ HRESULT CTroll::Ready_Parts()
- /*if (FAILED(Add_PartObject("Troll_Particle", g_iStaticLevel, &m_pTroll_Particle, &PartsDesc)))
+ if (FAILED(Add_PartObject("Troll_Particle", g_iStaticLevel, &m_pTroll_Particle, &PartsDesc)))
{
return E_FAIL;
}
@@ -350,7 +350,7 @@ HRESULT CTroll::Ready_Parts()
m_pLeft_Smoke->Load("../Bin/Resources/Data/Effect/Troll/TrollSide/Troll_Smoke", static_cast(NEXT_LEVEL));
m_pLeft_Smoke->FollowParants(m_pModelCom->Get_BoneMatrixPtr("LeftArm"));
-*/
+
#pragma endregion
return S_OK;
}
diff --git a/Jusin154_Team3D/Client/Public/Camera_Debug.h b/Jusin154_Team3D/Client/Public/Camera_Debug.h
index d1cb8c255..b5183c874 100644
--- a/Jusin154_Team3D/Client/Public/Camera_Debug.h
+++ b/Jusin154_Team3D/Client/Public/Camera_Debug.h
@@ -29,6 +29,7 @@ class CCamera_Debug final : public CCamera
_float m_fMouseSensor = {};
_float4x4 m_matInitial = {};
+
private:
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
diff --git a/Jusin154_Team3D/Client/Public/Camera_Gaze.h b/Jusin154_Team3D/Client/Public/Camera_Gaze.h
index d78c1563a..67544ab4a 100644
--- a/Jusin154_Team3D/Client/Public/Camera_Gaze.h
+++ b/Jusin154_Team3D/Client/Public/Camera_Gaze.h
@@ -32,11 +32,16 @@ class CCamera_Gaze final : public CCamera
virtual HRESULT Ready_Components(void* pArg) override;
HRESULT Bind_ShaderResources() override;
+private:
+ CInfoInstance* m_pInfoInstance = { nullptr };
+
+
public:
static CCamera_Gaze* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
virtual void Free() override;
+
#ifdef _DEBUG
void Describe_Entity() override;
diff --git a/Jusin154_Team3D/Client/Public/Client_Enum.h b/Jusin154_Team3D/Client/Public/Client_Enum.h
index 17e759cc5..d70dd7682 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, 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, 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 };
diff --git a/Jusin154_Team3D/Client/Public/Client_Struct.h b/Jusin154_Team3D/Client/Public/Client_Struct.h
index 3c87189db..a3c50003b 100644
--- a/Jusin154_Team3D/Client/Public/Client_Struct.h
+++ b/Jusin154_Team3D/Client/Public/Client_Struct.h
@@ -22,7 +22,9 @@ namespace Client
_wstring pSpell_Name;
_wstring pImage_Name;
_int iSpell_Type{};
+ _wstring pType_Name;
_int iSkill_Type{};
+ _float fSpell_Damage{};
_float fSpell_CoolTime{};
_float fDuration{};
_int iAnimNum{};
@@ -30,5 +32,7 @@ namespace Client
_bool bSpell_Lock = false;
_bool bEquip_Spell = false;
_bool bUse_Skill = false;
+ _float fPreview{};
+ _float fVidio{};
}SPELL_INFO;
};
diff --git a/Jusin154_Team3D/Client/Public/Effect_Container.h b/Jusin154_Team3D/Client/Public/Effect_Container.h
index e8951b667..b190a0fcc 100644
--- a/Jusin154_Team3D/Client/Public/Effect_Container.h
+++ b/Jusin154_Team3D/Client/Public/Effect_Container.h
@@ -37,6 +37,7 @@ class CEffect_Container abstract : public CContainerObject
void Update_Event(_float fTimeDelta);
HRESULT Reset_EffectParts();
_int CollisionCheck();
+ void SweepTarget(_vector StartPos, _vector EndPos, _float fRadius);
protected:
_float4 m_vStartPos = {};
@@ -44,7 +45,7 @@ class CEffect_Container abstract : public CContainerObject
PSX::PxSweepBufferN<12> m_Hitbuffer = {};
protected:
_wstring m_wstrEffectName = {};
-
+ _bool m_bHit = { false };
_bool m_isLoop = {};
_float m_fAccTime = {};
diff --git a/Jusin154_Team3D/Client/Public/Enemy_HpBar.h b/Jusin154_Team3D/Client/Public/Enemy_HpBar.h
new file mode 100644
index 000000000..74d34a964
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/Enemy_HpBar.h
@@ -0,0 +1,61 @@
+#pragma once
+
+#include "Client_Define.h"
+#include "ElementObject.h"
+
+NS_BEGIN(Engine)
+class CGameObject;
+NS_END
+
+NS_BEGIN(Client)
+
+class CEnemy_HpBar final : public CElementObject
+{
+private:
+ CEnemy_HpBar(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CEnemy_HpBar(const CEnemy_HpBar& rhs);
+ virtual ~CEnemy_HpBar() = default;
+
+public:
+ virtual void Priority_Update(_float fTimeDelta);
+ virtual void Update(_float fTimeDelta);
+ virtual void Late_Update(_float fTimeDelta);
+ virtual HRESULT Render() override;
+ virtual _vector Get_WorldPostion() override;
+ virtual void Lerp_PosX(_float X) override;
+
+public:
+ void Hit(_float fTimeDelta);
+ virtual void SizeUpX(_float SizeX) override;
+
+ void Set_Enemt_Info(void* pArg);
+private:
+ virtual HRESULT Bind_ShaderResources() override;
+ virtual HRESULT Ready_Components(void* pArg) override;
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+
+private:
+ CTexture* m_pDiffuse_TextureCom = { nullptr };
+ CTexture* m_pDiffuse_TextureCom1 = { nullptr };
+ CTexture* m_pDiffuse_TextureCom2 = { nullptr };
+ CShader* m_pShaderCom = { nullptr };
+ CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
+
+ _float m_fMaxHp{};
+ _float m_fCurrentHp{};
+ _float m_fHpBar{};
+ _float m_fDamage{};
+ _float m_fTargetHp{};
+
+ _bool m_bAnimation = { false };
+public:
+ static CEnemy_HpBar* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
+ virtual void Free() override;
+#ifdef _DEBUG
+ void Describe_Entity() override;
+#endif // _DEBUG
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Client/Public/Enemy_Info.h b/Jusin154_Team3D/Client/Public/Enemy_Info.h
new file mode 100644
index 000000000..8a754a07a
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/Enemy_Info.h
@@ -0,0 +1,56 @@
+#pragma once
+
+#include "Client_Define.h"
+#include "ElementObject.h"
+
+NS_BEGIN(Engine)
+class CGameObject;
+NS_END
+
+NS_BEGIN(Client)
+
+
+class CEnemy_Info final : public CElementObject
+{
+private:
+ CEnemy_Info(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CEnemy_Info(const CEnemy_Info& rhs);
+ virtual ~CEnemy_Info() = default;
+
+public:
+ virtual void Priority_Update(_float fTimeDelta);
+ virtual void Update(_float fTimeDelta);
+ virtual void Late_Update(_float fTimeDelta);
+ virtual HRESULT Render() override;
+ virtual _vector Get_WorldPostion() override;
+
+private:
+ virtual HRESULT Bind_ShaderResources() override;
+ virtual HRESULT Ready_Components(void* pArg) override;
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+
+public:
+ void Set_Info(_int Level, _wstring Name);
+
+private:
+ CTexture* m_pDiffuse_TextureCom = { nullptr };
+ CShader* m_pShaderCom = { nullptr };
+ CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
+
+ _float2 m_fFontPos{};
+ _float m_fFont2OffSet{};
+ _wstring m_pEnemy_Name;
+ _wstring m_pLevel;
+ _bool m_bAnimation = {false};
+
+public:
+ static CEnemy_Info* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
+ virtual void Free() override;
+#ifdef _DEBUG
+ void Describe_Entity() override;
+#endif // _DEBUG
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Client/Public/Enemy_Panel.h b/Jusin154_Team3D/Client/Public/Enemy_Panel.h
new file mode 100644
index 000000000..13cc34ad9
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/Enemy_Panel.h
@@ -0,0 +1,49 @@
+#pragma once
+
+#include "Client_Define.h"
+#include "PanelObject.h"
+
+NS_BEGIN(Engine)
+class CGameObject;
+NS_END
+
+NS_BEGIN(Client)
+
+
+class CEnemy_Panel final : public CPanelObject
+{
+private:
+ CEnemy_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CEnemy_Panel(const CEnemy_Panel& rhs);
+ virtual ~CEnemy_Panel() = default;
+
+public:
+ virtual void Priority_Update(_float fTimeDelta);
+ virtual void Update(_float fTimeDelta);
+ virtual void Late_Update(_float fTimeDelta);
+ virtual HRESULT Render() override;
+ virtual _vector Get_WorldPostion() override;
+
+private:
+ virtual HRESULT Bind_ShaderResources() override;
+ virtual HRESULT Ready_Components(void* pArg) override;
+ virtual HRESULT Ready_Element(void* pArg) override;
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+
+private:
+ CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
+
+ CGameObject* m_pEnemy_HpBar = { nullptr };
+ CGameObject* m_pEnemy_Info = { nullptr };
+
+public:
+ static CEnemy_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
+ virtual void Free() override;
+#ifdef _DEBUG
+ void Describe_Entity() override;
+#endif // _DEBUG
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Client/Public/GamePlay_Canvas.h b/Jusin154_Team3D/Client/Public/GamePlay_Canvas.h
index 941a2de85..65099efe7 100644
--- a/Jusin154_Team3D/Client/Public/GamePlay_Canvas.h
+++ b/Jusin154_Team3D/Client/Public/GamePlay_Canvas.h
@@ -39,6 +39,7 @@ class CGamePlay_Canvas final : public CCanvasObject
CGameObject* m_pMinimap_Panel = { nullptr };
CGameObject* m_pLoading_Panel = { nullptr };
CGameObject* m_pAction_Panel = { nullptr };
+ CGameObject* m_pEnemy_Panel = { nullptr };
public:
static CGamePlay_Canvas* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
diff --git a/Jusin154_Team3D/Client/Public/Goblin.h b/Jusin154_Team3D/Client/Public/Goblin.h
index 6f3cfed34..4cb6d514e 100644
--- a/Jusin154_Team3D/Client/Public/Goblin.h
+++ b/Jusin154_Team3D/Client/Public/Goblin.h
@@ -40,6 +40,11 @@ class CGoblin final : public CMonster
_float2 m_vStunTimer = { 0.f, 4.f };
_uint iIndex;
+
+ class CEffectParts* m_pSmoke = { nullptr };
+ class CEffectParts* m_pGoblin_Particle = { nullptr };
+ class CEffectParts* m_pGoblin_Particle2 = { nullptr };
+
private:
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
diff --git a/Jusin154_Team3D/Client/Public/Level_Loading.h b/Jusin154_Team3D/Client/Public/Level_Loading.h
index b4016e7ac..ce3481472 100644
--- a/Jusin154_Team3D/Client/Public/Level_Loading.h
+++ b/Jusin154_Team3D/Client/Public/Level_Loading.h
@@ -20,7 +20,7 @@ class CLevel_Loading final : public CLevel
private:
SHADOW_LIGHT_DESC m_ShadowDesc = {};
LEVEL m_eNextLevelID = { LEVEL::END };
- class CLoader* m_pLoader = { nullptr };
+ class CLoader* m_pLoader = { nullptr };
_float m_fTimeDelta{};
_bool m_bDelay = { false };
diff --git a/Jusin154_Team3D/Client/Public/Loding_Panel.h b/Jusin154_Team3D/Client/Public/Loding_Panel.h
index 2636f47d6..729621f8d 100644
--- a/Jusin154_Team3D/Client/Public/Loding_Panel.h
+++ b/Jusin154_Team3D/Client/Public/Loding_Panel.h
@@ -46,6 +46,16 @@ class CLoding_Panel final : public CUIObject
_int m_iImageNum{};
_float4 m_vImageposSi{};
+
+#ifdef _DEBUG
+ _bool INHYUK = { false };
+ _bool JINHO = { false };
+ _bool HYUNBIN = { false };
+ _bool NURI = { false };
+ _bool JINWOO = { false };
+ _int human{};
+#endif
+
public:
static CLoding_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
diff --git a/Jusin154_Team3D/Client/Public/Magic_Item.h b/Jusin154_Team3D/Client/Public/Magic_Item.h
index fb685bca1..e2df4a2e4 100644
--- a/Jusin154_Team3D/Client/Public/Magic_Item.h
+++ b/Jusin154_Team3D/Client/Public/Magic_Item.h
@@ -51,6 +51,10 @@ class CMagic_Item final : public CElementObject
_float2 m_vImagePos1 = {};
_float2 m_vImageSize2 = {};
_float2 m_vImagePos2 = {};
+
+ _int m_iPotionIndex{};
+ _int m_iPerPotionIndex{};
+ _wstring m_strPotion;
public:
static CMagic_Item* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
diff --git a/Jusin154_Team3D/Client/Public/MiniMap_TrimBorder.h b/Jusin154_Team3D/Client/Public/MiniMap_TrimBorder.h
index de0a7da6e..b7c742a50 100644
--- a/Jusin154_Team3D/Client/Public/MiniMap_TrimBorder.h
+++ b/Jusin154_Team3D/Client/Public/MiniMap_TrimBorder.h
@@ -37,7 +37,7 @@ class CMiniMap_TrimBorder final : public CElementObject
CShader* m_pShaderCom = { nullptr };
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
-
+ CInfoInstance* m_pInfoInstance = { nullptr };
public:
static CMiniMap_TrimBorder* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
diff --git a/Jusin154_Team3D/Client/Public/NomalJap.h b/Jusin154_Team3D/Client/Public/NomalJap.h
index 0dbdfa863..f599fc6a6 100644
--- a/Jusin154_Team3D/Client/Public/NomalJap.h
+++ b/Jusin154_Team3D/Client/Public/NomalJap.h
@@ -30,7 +30,6 @@ class CNomalJap final : public CEffect_Container
HRESULT Ready_Child();
HRESULT Bind_ShaderResources() override;
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
- void SweepTarget();
private:
class CInfoInstance* m_pInfoInstance = { nullptr };
_wstring m_wstrEffectName = {};
@@ -57,7 +56,6 @@ class CNomalJap final : public CEffect_Container
_float m_fAngularSpeed = {};
_float m_fLinearSpeed = 35.f;
_float m_fTimeRate = {};
- _bool m_bHit = { false };
/*좌우 무빙 관련 변수들*/
_float3 m_vRotateRight = {};
diff --git a/Jusin154_Team3D/Client/Public/Potion.h b/Jusin154_Team3D/Client/Public/Potion.h
index 80231f230..6753becd7 100644
--- a/Jusin154_Team3D/Client/Public/Potion.h
+++ b/Jusin154_Team3D/Client/Public/Potion.h
@@ -42,6 +42,10 @@ class CPotion final : public CElementObject
_float2 m_vImageSlotPos{};
_float2 m_vImageSize{};
+
+ _int m_iPotionIndex{};
+ _int m_iPerPotionIndex{};
+ _wstring m_strPotion;
public:
static CPotion* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
diff --git a/Jusin154_Team3D/Client/Public/Spell_Header.h b/Jusin154_Team3D/Client/Public/Spell_Header.h
index d65b41934..30cd3f56c 100644
--- a/Jusin154_Team3D/Client/Public/Spell_Header.h
+++ b/Jusin154_Team3D/Client/Public/Spell_Header.h
@@ -38,7 +38,12 @@ class CSpell_Header final : public CElementObject
CShader* m_pShaderCom = { nullptr };
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
- _int m_iSkillType{};
+ _wstring m_pSpell_Name;
+ _wstring m_fSpell_Type;
+
+ _float2 m_fType{};
+
+ _int m_iPerSpellIndex{};
public:
static CSpell_Header* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
diff --git a/Jusin154_Team3D/Client/Public/Spell_Preview.h b/Jusin154_Team3D/Client/Public/Spell_Preview.h
index 5952a2c80..726018f46 100644
--- a/Jusin154_Team3D/Client/Public/Spell_Preview.h
+++ b/Jusin154_Team3D/Client/Public/Spell_Preview.h
@@ -35,6 +35,8 @@ class CSpell_Preview final : public CElementObject
virtual HRESULT Initialize(void* pArg) override;
private:
+ CInfoInstance* m_pInfoInstance = { nullptr };
+
CTexture* m_pDiffuse_TextureCom = { nullptr };
CTexture* m_pDiffuse_TextureCom1 = { nullptr };
CTexture* m_pDiffuse_TextureCom2 = { nullptr };
@@ -42,10 +44,13 @@ class CSpell_Preview final : public CElementObject
CShader* m_pShaderCom = { nullptr };
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
+ _wstring m_pSpell_Info;
-
+ _float m_fOriginPerviewSize{};
+ _float m_fPreviewOffSet{};
_float4 m_vHeaderBack{};
+ _int m_iPerSpellIndex{};
public:
static CSpell_Preview* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
diff --git a/Jusin154_Team3D/Client/Public/Spell_Vidio_Border.h b/Jusin154_Team3D/Client/Public/Spell_Vidio_Border.h
index de678b1f4..65534bc16 100644
--- a/Jusin154_Team3D/Client/Public/Spell_Vidio_Border.h
+++ b/Jusin154_Team3D/Client/Public/Spell_Vidio_Border.h
@@ -39,6 +39,7 @@ class CSpell_Vidio_Border final : public CElementObject
_float m_fStertTimer{};
_int m_iPerIndex{};
+
_bool m_bStart = { false };
public:
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Stat/Stat.xml b/Jusin154_Team3D/Editor/Bin/Resources/Data/Stat/Stat.xml
index 7b45bee9a..9501aabdc 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Stat/Stat.xml
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Stat/Stat.xml
@@ -1,5 +1,5 @@
-
-
-
+
+
+
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/UI/Data.xml b/Jusin154_Team3D/Editor/Bin/Resources/Data/UI/Data.xml
new file mode 100644
index 000000000..d1182dea5
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/UI/Data.xml
@@ -0,0 +1,3 @@
+
+ ¸¶Ʈ, ǪµåÄÚƮ, ÀǷù¸ÅÀå
+
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/UI/Spell/SpellInfo.xml b/Jusin154_Team3D/Editor/Bin/Resources/Data/UI/Spell/SpellInfo.xml
index 8d0130895..a5487a058 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/UI/Spell/SpellInfo.xml
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/UI/Spell/SpellInfo.xml
@@ -1,36 +1,191 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Fonts/Font_size13.spritefont b/Jusin154_Team3D/Editor/Bin/Resources/Fonts/Font_size13.spritefont
new file mode 100644
index 000000000..343439d0d
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Fonts/Font_size13.spritefont differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Fonts/Font_size14.spritefont b/Jusin154_Team3D/Editor/Bin/Resources/Fonts/Font_size14.spritefont
new file mode 100644
index 000000000..ea3fa21b1
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Fonts/Font_size14.spritefont differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Fonts/Font_size15.spritefont b/Jusin154_Team3D/Editor/Bin/Resources/Fonts/Font_size15.spritefont
new file mode 100644
index 000000000..4dcd04233
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Fonts/Font_size15.spritefont differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Fonts/Font_size20.spritefont b/Jusin154_Team3D/Editor/Bin/Resources/Fonts/Font_size20.spritefont
new file mode 100644
index 000000000..14658ce64
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Fonts/Font_size20.spritefont differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Fonts/Font_size21.spritefont b/Jusin154_Team3D/Editor/Bin/Resources/Fonts/Font_size21.spritefont
new file mode 100644
index 000000000..e9c3d4178
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Fonts/Font_size21.spritefont differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Fonts/Font_size30.spritefont b/Jusin154_Team3D/Editor/Bin/Resources/Fonts/Font_size30.spritefont
new file mode 100644
index 000000000..8edb425e2
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Fonts/Font_size30.spritefont differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Fonts/UI_size15.spritefont b/Jusin154_Team3D/Editor/Bin/Resources/Fonts/UI_size15.spritefont
new file mode 100644
index 000000000..69bc98fd5
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Fonts/UI_size15.spritefont differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl
index bc248ab64..c2d688ad7 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl
+++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl
@@ -23,6 +23,7 @@ float g_fAlpha;
float g_fOwnerAlpha;
float g_fCanvasAlpha;
float g_fAngle;
+float g_fMapAngle;
float g_fCoolTime;
float g_fHp;
@@ -506,21 +507,14 @@ PS_OUT PS_Rotation(PS_IN In)
float2 center = float2(0.5f, 0.5f);
float2 uv = In.vTexcoord - center;
- uv *= sqrt(2.0f);
float2 Rotation = In.vTexcoord;
- Rotation.x = uv.x * cos(g_fAngle) - uv.y * sin(g_fAngle);
- Rotation.y = uv.x * sin(g_fAngle) + uv.y * cos(g_fAngle);
+ Rotation.x = uv.x * cos(g_fMapAngle) - uv.y * sin(g_fMapAngle);
+ Rotation.y = uv.x * sin(g_fMapAngle) + uv.y * cos(g_fMapAngle);
Rotation += center;
- float4 tex1 = g_Texture.Sample(ClampSampler, Rotation);
- float4 tex2 = g_Texture1.Sample(DefaultSampler, In.vTexcoord);
-
- tex1.rgb *= 0.4f;
+ float4 tex1 = g_Texture.Sample(ClampSampler , Rotation);
+
color = tex1;
- tex2.rgb *= 0.3f;
-
- if (tex2.a >= 0.9f)
- color = tex2;
color.a *= Alpha;
@@ -586,7 +580,7 @@ PS_OUT PS_SpellAnim(PS_IN In)
switch (g_iSpellType)
{
case 0:
- BGColor = float3(255.f, 255.f, 0.f) / 255.f;
+ BGColor = float3(220.f, 165.f, 70.f) / 255.f;
break;
case 1:
BGColor = float3(150.f, 120.f, 240.f) / 255.f;
@@ -1132,7 +1126,7 @@ PS_OUT PS_Spell_Header(PS_IN In)
switch (g_iSpellType)
{
case 0:
- BGColor = float3(255.f, 255.f, 0.f) / 255.f;
+ BGColor = float3(220.f, 165.f, 70.f) / 255.f;
break;
case 1:
BGColor = float3(150.f, 120.f, 240.f) / 255.f;
@@ -1155,11 +1149,12 @@ PS_OUT PS_Spell_Header(PS_IN In)
}
float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
- Color = tex1;
-
+ Color.rgb = tex1.rgb * 0.8f;
+ Color.a = tex1.a;
+
Color.rgb *= BGColor;
- Color.a *= Alpha;
+ Color.a *= Alpha * 0.5f;
Out.vColor = Color;
@@ -1330,6 +1325,92 @@ PS_OUT PS_Loding_Screen(PS_IN In)
return Out;
}
+PS_OUT PS_Enemy_HpBer(PS_IN In)
+{
+ PS_OUT Out;
+
+ float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
+ float4 Color = float4(1.f, 1.f, 1.f, 1.f);
+ float4 Color1 = float4(1.f, 1.f, 1.f, 1.f);
+ float2 uv = In.vTexcoord;
+ float2 CurrentPixelPosition = uv * g_fCurrent_Size;
+ float OriginLeft = g_fNine_Slice.x;
+ float OriginRight = g_fNine_Slice.y;
+ float OriginTop = g_fNine_Slice.z;
+ float OriginBottom = g_fNine_Slice.w;
+
+ float CurrentLeft = OriginLeft;
+ float CurrentRight = g_fCurrent_Size.x - (g_fOrigin_Size.x - OriginRight);
+ float CurrentTop = OriginTop;
+ float CurrentBottom = g_fCurrent_Size.y - (g_fOrigin_Size.y - OriginBottom);
+
+ float2 Finaluv = In.vTexcoord;
+
+ if (CurrentPixelPosition.x < CurrentLeft)
+ {
+ Finaluv.x = CurrentPixelPosition.x / g_fOrigin_Size.x;
+ }
+ else if (CurrentPixelPosition.x > CurrentRight)
+ {
+ float dist = CurrentPixelPosition.x - CurrentRight;
+ Finaluv.x = (OriginRight + dist) / g_fOrigin_Size.x;
+ }
+ else
+ {
+ float scale = (CurrentPixelPosition.x - CurrentLeft) / (CurrentRight - CurrentLeft);
+ Finaluv.x = (OriginLeft / g_fOrigin_Size.x) + scale * ((OriginRight - OriginLeft) / g_fOrigin_Size.x);
+ }
+
+ if (CurrentPixelPosition.y < CurrentTop)
+ {
+ Finaluv.y = CurrentPixelPosition.y / g_fOrigin_Size.y;
+ }
+ else if (CurrentPixelPosition.y > CurrentBottom)
+ {
+ float dist = CurrentPixelPosition.y - CurrentBottom;
+ Finaluv.y = (OriginBottom + dist) / g_fOrigin_Size.y;
+ }
+ else
+ {
+ float scale = (CurrentPixelPosition.y - CurrentTop) / (CurrentBottom - CurrentTop);
+ Finaluv.y = (OriginTop / g_fOrigin_Size.y) + scale * ((OriginBottom - OriginTop) / g_fOrigin_Size.y);
+ }
+
+ float4 tex1 = g_Texture.Sample(DefaultSampler, Finaluv);
+ float4 tex2 = g_Texture1.Sample(DefaultSampler, Finaluv);
+
+ Color = tex1;
+
+ tex2.rgb *= float3(1.f, 0.f, 0.f);
+
+ if (In.vTexcoord.x >= g_fHp)
+ {
+ tex2.rgb = float3(0.f, 0.f, 0.f);
+ }
+
+ Color = lerp(Color, tex2, tex2.a);
+
+ if (Color.a <= 0.f)
+ discard;
+
+ if(g_iHover != 0)
+ {
+ float4 tex3 = g_Texture2.Sample(DefaultSampler, In.vTexcoord);
+
+ tex3.rgb *= float3(1.f, 0.f, 0.f);
+
+ if (g_fTime >= tex3.r)
+ {
+ Color.a *= tex3.r;
+ Color.rgb = float3(1.f, 0.f, 0.f);
+ }
+ }
+
+ Color.a *= Alpha;
+ Out.vColor = Color;
+ return Out;
+}
+
technique11 PosTexTechnique11
{
pass Default
@@ -1620,4 +1701,14 @@ technique11 PosTexTechnique11
PixelShader = compile ps_5_0 PS_Loding_Screen();
}
+ pass Enemy_HpBer
+ {
+ SetRasterizerState(RS_Default);
+ SetDepthStencilState(DSS_Default, 0);
+ SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
+ VertexShader = compile vs_5_0 VS_MAIN();
+ GeometryShader = NULL;
+ PixelShader = compile ps_5_0 PS_Enemy_HpBer();
+ }
+
}
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UI_Instance.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UI_Instance.hlsl
index 88deb62b4..832d2e2a0 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UI_Instance.hlsl
+++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UI_Instance.hlsl
@@ -239,7 +239,7 @@ PS_OUT PS_Color_Image(PS_IN In)
switch (In.vBaseColor)
{
case 0:
- BGColor = float3(255.f, 255.f, 0.f) / 255.f;
+ BGColor = float3(220.f, 165.f, 70.f) / 255.f;
break;
case 1:
BGColor = float3(150.f, 120.f, 240.f) / 255.f;
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/UI_T_HUD_Monster_HealthMeterFill.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/UI_T_HUD_Monster_HealthMeterFill.png
new file mode 100644
index 000000000..2c701689f
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/UI_T_HUD_Monster_HealthMeterFill.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/UI_T_Monster_HpBar.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/UI_T_Monster_HpBar.png
new file mode 100644
index 000000000..97144ff30
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/UI_T_Monster_HpBar.png differ
diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj b/Jusin154_Team3D/Editor/Default/Editor.vcxproj
index 34a6c7c71..f1479f203 100644
--- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj
+++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj
@@ -232,6 +232,9 @@ call Update_Shaders.bat
+
+
+
@@ -423,6 +426,9 @@ call Update_Shaders.bat
+
+
+
diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters
index f511f58bf..7b349ef5f 100644
--- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters
+++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters
@@ -508,6 +508,15 @@
{d8a5038f-4f2c-4226-85ba-9202f11f822d}
+
+ {ea790bf9-9ca6-4c51-820b-ed2c70f86104}
+
+
+ {33ba73e0-b4a1-4ebf-9b99-8856c7e1078c}
+
+
+ {e30ca8e3-8c89-4a08-b413-169ff1d5ff22}
+
{4b6ac1df-5642-42f1-a492-5c2ca2433559}
@@ -1064,6 +1073,15 @@
02.GameObjects\Layer_Effect\Effect\Monster_Effect\Goblin_Protego
+
+
+ 50.UI\GamePlay_Canvas\Enemy_Panel
+
+
+ 50.UI\GamePlay_Canvas\Enemy_Panel\Enemy_HpBar
+
+
+ 50.UI\GamePlay_Canvas\Enemy_Panel\Enemy_Info
@@ -1546,6 +1564,15 @@
50.UI\Logo\Logo_Glow
+
+ 50.UI\GamePlay_Canvas\Enemy_Panel
+
+
+ 50.UI\GamePlay_Canvas\Enemy_Panel\Enemy_HpBar
+
+
+ 50.UI\GamePlay_Canvas\Enemy_Panel\Enemy_Info
+
02.GameObjects\Env\07.Unified
diff --git a/Jusin154_Team3D/Editor/Default/Emart.xml b/Jusin154_Team3D/Editor/Default/Emart.xml
new file mode 100644
index 000000000..d1182dea5
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Default/Emart.xml
@@ -0,0 +1,3 @@
+
+ ¸¶Ʈ, ǪµåÄÚƮ, ÀǷù¸ÅÀå
+
diff --git a/Jusin154_Team3D/Editor/Private/Enemy_HpBar.cpp b/Jusin154_Team3D/Editor/Private/Enemy_HpBar.cpp
new file mode 100644
index 000000000..92c48c8aa
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/Enemy_HpBar.cpp
@@ -0,0 +1,350 @@
+#include "pch.h"
+#include "Enemy_HpBar.h"
+#include "GameInstance.h"
+
+CEnemy_HpBar::CEnemy_HpBar(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ :CElementObject(pDevice, pContext)
+{
+}
+
+CEnemy_HpBar::CEnemy_HpBar(const CEnemy_HpBar& rhs)
+ :CElementObject(rhs)
+{
+}
+
+HRESULT CEnemy_HpBar::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CEnemy_HpBar::Initialize(void* pArg)
+{
+ CUIObject::UIOBJECT_DESC Desc{};
+
+ Desc.fX = 0.f;
+ Desc.fY = 40.f;
+ Desc.fSizeX = 128.f;
+ Desc.fSizeY = 20.f;
+
+ m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
+
+ if (FAILED(__super::Initialize(&Desc)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Ready_Components(pArg)))
+ {
+ return E_FAIL;
+ }
+
+ m_fTimeMult = 3.f;
+ m_fAlpha = 0.f;
+ m_fAlphaTime = 10.f;
+ m_vNine_Slice = _float4(15.f, 100.f, 5.f, 15.f);
+ m_fMaxHp = 200.f;
+ m_fCurrentHp = m_fMaxHp;
+ SizeUpX(360.f);
+ m_fMoveSpeed = 5.f;
+ m_bAnimation = false;
+ m_fLerpY = m_fSizeY;
+ return S_OK;
+}
+
+void CEnemy_HpBar::Priority_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ __super::Priority_Update(fTimeDelta);
+}
+
+void CEnemy_HpBar::Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+
+ if (m_bFadeIn == true)
+ {
+ if (m_fAlpha <= 1.f)
+ {
+ m_fAlpha += fTimeDelta * m_fAlphaTime;
+ m_bHover = true;
+ }
+
+
+ if (m_fAlpha >= 1.f)
+ {
+ m_bFadeIn = false;
+ m_fAlpha = 1.f;
+ }
+ }
+
+ if (m_bFadeOut == true)
+ {
+ if (m_fAlpha >= 0.f)
+ m_fAlpha -= fTimeDelta * m_fAlphaTime;
+
+ if (m_fAlpha <= 0.f)
+ {
+ m_bFadeOut = false;
+ m_bHover = false;
+ m_fAlpha = 0.f;
+ }
+ }
+
+ if (m_pGameInstance->Key_Down(DIK_3))
+ {
+ Lerp_PosX(101.f);
+ }
+
+ if (m_pGameInstance->Key_Down(DIK_K))
+ {
+ Set_FadeIn();
+ }
+ if (m_pGameInstance->Key_Down(DIK_L))
+ {
+ Set_FadeOut();
+ }
+ if (m_pGameInstance->Key_Down(DIK_J))
+ {
+ m_bAnimation = true;
+ m_bHover = true;
+ m_fTime = 0.f;
+ SizeUpdate(m_fLerpX, m_fLerpY);
+ }
+
+ if (m_fCurrentHp < 0.f)
+ m_fCurrentHp = 0.f;
+ if (m_fDamage <= 0.f)
+ m_fDamage = 0.f;
+ m_fTargetHp = m_fMaxHp - m_fDamage;
+
+ if (m_fTargetHp < m_fCurrentHp)
+ Hit(fTimeDelta);
+ m_fHpBar = m_fCurrentHp / m_fMaxHp;
+
+ if (m_fHpBar <= 0.f)
+ {
+ m_bAnimation = true;
+ }
+ if (m_bAnimation == true)
+ {
+ m_fTime += fTimeDelta * m_fTimeMult;
+ m_fSizeX += 3.f;
+ m_fSizeY += 3.f;
+ static_cast(m_pOwner)->Function_Callback(TEXT("Enemy_HpDie"));
+ }
+ if (m_fTime >= 0.9f)
+ {
+ m_bAnimation = false;
+ m_bHover = false;
+ m_fTime = 0.f;
+ SizeUpdate(m_fLerpX, m_fLerpY);
+ }
+
+ __super::Update(fTimeDelta);
+}
+
+void CEnemy_HpBar::Late_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ if (m_bVisible) {
+ m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
+ __super::Late_Update(fTimeDelta);
+ }
+}
+
+HRESULT CEnemy_HpBar::Render()
+{
+ if (m_bHover == true)
+ {
+ if (FAILED(Bind_ShaderResources())) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ENEMY_HPBAR)))) {
+ 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_HpBar::Get_WorldPostion()
+{
+ return m_pTransformCom->Get_State(STATE::POSITION);
+}
+
+void CEnemy_HpBar::Lerp_PosX(_float X)
+{
+ m_fDamage += X;
+}
+
+void CEnemy_HpBar::Hit(_float fTimeDelta)
+{
+ m_fCurrentHp = CMyTools::Lerp_f1D(m_fCurrentHp, m_fTargetHp, fTimeDelta * m_fMoveSpeed);
+}
+
+void CEnemy_HpBar::SizeUpX(_float SizeX)
+{
+ m_fSizeX = SizeX;
+ m_fLerpX = SizeX;
+}
+
+void CEnemy_HpBar::Set_Enemt_Info(void* pArg)
+{
+ if(m_bAnimation == true)
+ {
+ return;
+ }
+ //m_fMaxHp
+ //m_fCurrentHp
+ Set_FadeIn();
+}
+
+HRESULT CEnemy_HpBar::Bind_ShaderResources()
+{
+ if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom1->Bind_ShaderResource(m_pShaderCom, "g_Texture1", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom2->Bind_ShaderResource(m_pShaderCom, "g_Texture2", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fNine_Slice", &m_vNine_Slice, sizeof(_float4))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fOrigin_Size", &m_fOrigin_Size, sizeof(_float2))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_vScale, sizeof(_float2))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fHp", &m_fHpBar, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_iHover", &m_bAnimation, sizeof(_int))))
+ {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CEnemy_HpBar::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_Monster_HpBar"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_HUD_Monster_HealthMeterFill"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_VFX_T_FlameNoise_E"), reinterpret_cast(&m_pDiffuse_TextureCom2), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
+ {
+ return E_FAIL;
+ }
+ return S_OK;
+}
+
+CEnemy_HpBar* CEnemy_HpBar::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CEnemy_HpBar* pInstance = new CEnemy_HpBar(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CEnemy_HpBar");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CEnemy_HpBar::Clone(void* pArg, CGameObject* pOwner)
+{
+ CEnemy_HpBar* pInstance = new CEnemy_HpBar(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CSpell_Image");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CEnemy_HpBar::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pDiffuse_TextureCom);
+ SAFE_RELEASE(m_pDiffuse_TextureCom1);
+ SAFE_RELEASE(m_pDiffuse_TextureCom2);
+ SAFE_RELEASE(m_pShaderCom);
+ SAFE_RELEASE(m_pVIBufferCom);
+}
+
+void CEnemy_HpBar::Describe_Entity()
+{
+}
diff --git a/Jusin154_Team3D/Editor/Private/Enemy_Info.cpp b/Jusin154_Team3D/Editor/Private/Enemy_Info.cpp
new file mode 100644
index 000000000..541783764
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/Enemy_Info.cpp
@@ -0,0 +1,261 @@
+#include "pch.h"
+#include "Enemy_Info.h"
+#include "GameInstance.h"
+
+CEnemy_Info::CEnemy_Info(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ :CElementObject(pDevice, pContext)
+{
+}
+
+CEnemy_Info::CEnemy_Info(const CEnemy_Info& rhs)
+ :CElementObject(rhs)
+{
+}
+
+HRESULT CEnemy_Info::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CEnemy_Info::Initialize(void* pArg)
+{
+ CUIObject::UIOBJECT_DESC Desc{};
+
+ Desc.fX = -180.f;
+ Desc.fY = 40.f;
+ Desc.fSizeX = 50.f;
+ Desc.fSizeY = 50.f;
+
+ m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
+
+ if (FAILED(__super::Initialize(&Desc)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Ready_Components(pArg)))
+ {
+ return E_FAIL;
+ }
+
+ m_fTimeMult = 1.f;
+ m_fAlpha = 0.f;
+ m_fAlphaTime = 10.f;
+ m_fFontX = 952.f;
+ m_fFontY = 39.f;
+ m_fFontPos = _float2(1115.f, 0.f);
+ m_fFont2OffSet = 0.f;
+ m_pEnemy_Name = TEXT("나는 문어");
+ m_pLevel = TEXT("99");
+ m_bAnimation = false;
+ static_cast(m_pOwner)->Add_Function(TEXT("Enemy_HpDie"), [this](void* p) {this->Set_FadeOut(); });
+ return S_OK;
+}
+
+void CEnemy_Info::Priority_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ __super::Priority_Update(fTimeDelta);
+}
+
+void CEnemy_Info::Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+
+ if (m_bFadeIn == true)
+ {
+ if (m_fAlpha <= 1.f)
+ {
+ m_fAlpha += fTimeDelta * m_fAlphaTime;
+ m_bHover = true;
+ }
+
+ if (m_fAlpha >= 1.f)
+ {
+ m_bFadeIn = false;
+ m_fAlpha = 1.f;
+ }
+ }
+
+ if (m_bFadeOut == true)
+ {
+ if (m_fAlpha >= 0.f)
+ m_fAlpha -= fTimeDelta * m_fAlphaTime;
+
+ if (m_fAlpha <= 0.f)
+ {
+ m_bFadeOut = false;
+ m_bHover = false;
+ m_fAlpha = 0.f;
+ }
+ }
+
+ if (m_pGameInstance->Key_Down(DIK_K))
+ {
+ Set_FadeIn();
+ }
+ if (m_pGameInstance->Key_Down(DIK_L))
+ {
+ Set_FadeOut();
+ }
+
+ __super::Update(fTimeDelta);
+}
+
+void CEnemy_Info::Late_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ if (m_bVisible) {
+ m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
+ __super::Late_Update(fTimeDelta);
+ }
+}
+
+HRESULT CEnemy_Info::Render()
+{
+ if (m_bHover == true)
+ {
+ if (FAILED(Bind_ShaderResources())) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::DEFAULT)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Bind_Resources())) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Render())) {
+ return E_FAIL;
+ }
+
+ m_fFontOffSet = (m_pGameInstance->FontSizeX(TEXT("Font_size20"), m_pEnemy_Name.c_str()) - 29.f) * 0.5f;
+ m_fFont2OffSet = (m_pGameInstance->FontSizeX(TEXT("UI_size15"), m_pLevel.c_str()) - 13.f) * 0.5f;
+
+ m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pEnemy_Name.c_str(), _float2(m_fFontPos.x + m_fX - m_fFontOffSet, m_fFontPos.y + m_fY), XMVectorSet(1.f* m_fAlpha,1.f* m_fAlpha,1.f* m_fAlpha, m_fAlpha));
+ m_pGameInstance->Render_Text(TEXT("UI_size15"), m_pLevel.c_str(), _float2(m_fFontX + m_fX - m_fFont2OffSet, m_fFontY + m_fY), XMVectorSet(0.f, (120.f / 255.f)* m_fAlpha, 0.f, m_fAlpha));
+ }
+
+ return S_OK;
+}
+
+_vector CEnemy_Info::Get_WorldPostion()
+{
+ return m_pTransformCom->Get_State(STATE::POSITION);
+}
+
+HRESULT CEnemy_Info::Bind_ShaderResources()
+{
+ if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ return S_OK;
+}
+
+HRESULT CEnemy_Info::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_HealthMeter_LevelBox"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
+ {
+ return E_FAIL;
+ }
+ return S_OK;
+}
+
+void CEnemy_Info::Set_Info(_int Level, _wstring Name)
+{
+ if (m_bAnimation == true)
+ {
+ return;
+ }
+ m_pLevel = to_wstring(Level);
+ m_pEnemy_Name = Name;
+ Set_FadeIn();
+}
+
+CEnemy_Info* CEnemy_Info::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CEnemy_Info* pInstance = new CEnemy_Info(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CEnemy_Info");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CEnemy_Info::Clone(void* pArg, CGameObject* pOwner)
+{
+ CEnemy_Info* pInstance = new CEnemy_Info(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CSpell_Image");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CEnemy_Info::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pDiffuse_TextureCom);
+
+ SAFE_RELEASE(m_pShaderCom);
+ SAFE_RELEASE(m_pVIBufferCom);
+}
+
+void CEnemy_Info::Describe_Entity()
+{
+}
diff --git a/Jusin154_Team3D/Editor/Private/Enemy_Panel.cpp b/Jusin154_Team3D/Editor/Private/Enemy_Panel.cpp
new file mode 100644
index 000000000..786190f82
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/Enemy_Panel.cpp
@@ -0,0 +1,161 @@
+#include "pch.h"
+#include "Enemy_Panel.h"
+#include "GameInstance.h"
+#include "Enemy_HpBar.h"
+#include "Enemy_Info.h"
+
+CEnemy_Panel::CEnemy_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ :CPanelObject(pDevice, pContext)
+{
+}
+
+CEnemy_Panel::CEnemy_Panel(const CEnemy_Panel& rhs)
+ :CPanelObject(rhs)
+{
+}
+
+HRESULT CEnemy_Panel::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CEnemy_Panel::Initialize(void* pArg)
+{
+ CUIObject::UIOBJECT_DESC Desc{};
+
+ Desc.fX = 960.f;
+ Desc.fY = 50.f;
+ Desc.fSizeX = 960.f;
+ Desc.fSizeY = 150.f;
+
+
+ if (FAILED(__super::Initialize(&Desc)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Ready_Components(pArg)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Ready_Element(pArg)))
+ {
+ return E_FAIL;
+ }
+
+ m_fAlpha = 1.f;
+ m_fCanvasAlpha = 1.f;
+ Visible(true);
+ ElementAllVisible(true);
+ return S_OK;
+}
+
+void CEnemy_Panel::Priority_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ __super::Priority_Update(fTimeDelta);
+}
+
+void CEnemy_Panel::Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+
+ __super::Update(fTimeDelta);
+}
+
+void CEnemy_Panel::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_Panel::Render()
+{
+ return S_OK;
+}
+
+_vector CEnemy_Panel::Get_WorldPostion()
+{
+ return m_pTransformCom->Get_State(STATE::POSITION);
+}
+
+HRESULT CEnemy_Panel::Bind_ShaderResources()
+{
+ return S_OK;
+}
+
+HRESULT CEnemy_Panel::Ready_Components(void* pArg)
+{
+ if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom)))
+ {
+ return E_FAIL;
+ }
+ return S_OK;
+}
+
+HRESULT CEnemy_Panel::Ready_Element(void* pArg)
+{
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pEnemy_HpBar))))
+ {
+ return E_FAIL;
+ }
+ Add_Element(TEXT("Enemy_HpBar"), m_pEnemy_HpBar);
+
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pEnemy_Info))))
+ {
+ return E_FAIL;
+ }
+ Add_Element(TEXT("Enemy_Info"), m_pEnemy_Info);
+
+ return S_OK;
+}
+
+CEnemy_Panel* CEnemy_Panel::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CEnemy_Panel* pInstance = new CEnemy_Panel(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CEnemy_Panel");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CEnemy_Panel::Clone(void* pArg, CGameObject* pOwner)
+{
+ CEnemy_Panel* pInstance = new CEnemy_Panel(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CEnemy_Panel");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CEnemy_Panel::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pVIBufferCom);
+}
+
+void CEnemy_Panel::Describe_Entity()
+{
+}
diff --git a/Jusin154_Team3D/Editor/Private/GamePlay_Canvas.cpp b/Jusin154_Team3D/Editor/Private/GamePlay_Canvas.cpp
index fe9d06fe4..2ebae093f 100644
--- a/Jusin154_Team3D/Editor/Private/GamePlay_Canvas.cpp
+++ b/Jusin154_Team3D/Editor/Private/GamePlay_Canvas.cpp
@@ -7,6 +7,7 @@
#include "Loading_Panel.h"
#include "Action_Panel.h"
#include "Mouse_Cursor.h"
+#include "Enemy_Panel.h"
CGamePlay_Canvas::CGamePlay_Canvas(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CCanvasObject(pDevice, pContext)
@@ -116,6 +117,11 @@ HRESULT CGamePlay_Canvas::Ready_Panel(void* pArg)
}
Add_Panel(TEXT("ActionPanel"), m_pAction_Panel);
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pEnemy_Panel))))
+ {
+ return E_FAIL;
+ }
+ Add_Panel(TEXT("Enemy_Panel"), m_pEnemy_Panel);
return S_OK;
}
diff --git a/Jusin154_Team3D/Editor/Private/IMGUIUI.cpp b/Jusin154_Team3D/Editor/Private/IMGUIUI.cpp
index c5ddcdc85..c433af4f4 100644
--- a/Jusin154_Team3D/Editor/Private/IMGUIUI.cpp
+++ b/Jusin154_Team3D/Editor/Private/IMGUIUI.cpp
@@ -187,6 +187,7 @@ void CIMGUIUI::Update(_float fTimeDelta)
m_iSpellType = static_cast(m_pElementObject)->Get_SkillType();
m_iSkillType = static_cast(m_pElementObject)->Get_SpellType();
m_fCoolTime = static_cast(m_pElementObject)->Get_CoolTime();
+ m_fFontPos = static_cast(m_pElementObject)->Get_Font();
}
GUI::Begin("Current_CanvasObject_Info");
if (m_pUI_Manager != nullptr)
@@ -482,6 +483,17 @@ void CIMGUIUI::Update(_float fTimeDelta)
{
static_cast(m_pElementObject)->Set_CoolTime(m_fCoolTime);
}
+
+ GUI::Text("FontPosX %.1f", m_fFontPos.x);
+ GUI::Text("FontPosY %.1f", m_fFontPos.y);
+ if (GUI::SliderFloat("FontX", &m_fFontX, -1920.f, 1920.f))
+ {
+ static_cast(m_pElementObject)->Set_FontX(m_fFontX);
+ }
+ if (GUI::SliderFloat("FontY", &m_fFontY, -1080.f, 1080.f))
+ {
+ static_cast(m_pElementObject)->Set_FontY(m_fFontY);
+ }
}
GUI::End();
}
diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp
index 7293bc61d..04c9f454b 100644
--- a/Jusin154_Team3D/Editor/Private/Loader.cpp
+++ b/Jusin154_Team3D/Editor/Private/Loader.cpp
@@ -51,6 +51,10 @@
#include "GamePlay_Canvas.h"
+#include "Enemy_Panel.h"
+#include "Enemy_HpBar.h"
+#include "Enemy_Info.h"
+
#include "Mission_Panel.h"
#include "MissionBanner_Border.h"
#include "MissionBanner_Key.h"
@@ -895,6 +899,19 @@ HRESULT CLoader::Loading_For_UI()
return E_FAIL;
}
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CEnemy_Panel::Create(m_pDevice, m_pContext))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CEnemy_HpBar::Create(m_pDevice, m_pContext))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CEnemy_Info::Create(m_pDevice, m_pContext))))
+ {
+ return E_FAIL;
+ }
+
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CLoading_Panel::Create(m_pDevice, m_pContext))))
{
return E_FAIL;
diff --git a/Jusin154_Team3D/Editor/Private/Logo.cpp b/Jusin154_Team3D/Editor/Private/Logo.cpp
index a781aa041..8e45de98b 100644
--- a/Jusin154_Team3D/Editor/Private/Logo.cpp
+++ b/Jusin154_Team3D/Editor/Private/Logo.cpp
@@ -72,6 +72,7 @@ HRESULT CLogo::Render()
if (FAILED(m_pVIBufferCom->Render())) {
return E_FAIL;
}
+ m_pGameInstance->Render_Text(TEXT("Font_size13"), TEXT("Font_Test"), _float2(0.f, 0.f));
return S_OK;
}
diff --git a/Jusin154_Team3D/Editor/Private/Magic_Item.cpp b/Jusin154_Team3D/Editor/Private/Magic_Item.cpp
index beefb262a..56307c4b4 100644
--- a/Jusin154_Team3D/Editor/Private/Magic_Item.cpp
+++ b/Jusin154_Team3D/Editor/Private/Magic_Item.cpp
@@ -47,6 +47,10 @@ HRESULT CMagic_Item::Initialize(void* pArg)
m_iArratCount = 2;
Compute_UV(0);
Compute_Image();
+ m_fFontX = 1171.f;
+ m_fFontY = 870.f;
+ m_iPotionIndex = 0;
+ m_iPerPotionIndex = -1;
return S_OK;
}
@@ -137,6 +141,13 @@ void CMagic_Item::Update(_float fTimeDelta)
m_vUVScale.y += fTimeDelta * (1.f / m_fCoolTime);
}
+ if (m_iPerPotionIndex != m_iPotionIndex)
+ {
+ m_strPotion = to_wstring(m_iPotionIndex);
+ m_fFontOffSet = (m_pGameInstance->FontSizeX(TEXT("UI_size15"), m_strPotion.c_str()) - 13.f) * 0.5f;
+ m_iPerPotionIndex = m_iPotionIndex;
+ }
+
m_fTime += fTimeDelta * m_fTimeMult;
__super::Update(fTimeDelta);
}
@@ -173,6 +184,9 @@ HRESULT CMagic_Item::Render()
return E_FAIL;
}
+
+ m_pGameInstance->Render_Text(TEXT("UI_size15"), m_strPotion.c_str(), _float2((m_fFontX + m_fX) - m_fFontOffSet, m_fFontY + m_fY), XMVectorSet((208.f / 255.f) * m_fAlpha, (177.f / 255.f) * m_fAlpha, (52.f / 255.f)* m_fAlpha, m_fAlpha));
+
return S_OK;
}
diff --git a/Jusin154_Team3D/Editor/Private/MainApp.cpp b/Jusin154_Team3D/Editor/Private/MainApp.cpp
index d44d6ef57..89d201689 100644
--- a/Jusin154_Team3D/Editor/Private/MainApp.cpp
+++ b/Jusin154_Team3D/Editor/Private/MainApp.cpp
@@ -83,6 +83,27 @@ void CMainApp::Compute_FrameCount()
HRESULT CMainApp::Ready_Default_Setting()
{
+ if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size13"), TEXT("../Bin/Resources/Fonts/Font_size13.spritefont"))))
+ return E_FAIL;
+
+ if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size14"), TEXT("../Bin/Resources/Fonts/Font_size14.spritefont"))))
+ return E_FAIL;
+
+ if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size15"), TEXT("../Bin/Resources/Fonts/Font_size15.spritefont"))))
+ return E_FAIL;
+
+ if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size20"), TEXT("../Bin/Resources/Fonts/Font_size20.spritefont"))))
+ return E_FAIL;
+
+ if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size21"), TEXT("../Bin/Resources/Fonts/Font_size21.spritefont"))))
+ return E_FAIL;
+
+ if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size30"), TEXT("../Bin/Resources/Fonts/Font_size30.spritefont"))))
+ return E_FAIL;
+
+ if (FAILED(m_pGameInstance->Add_Font(TEXT("UI_size15"), TEXT("../Bin/Resources/Fonts/UI_size15.spritefont"))))
+ return E_FAIL;
+
return S_OK;
}
diff --git a/Jusin154_Team3D/Editor/Private/Potion.cpp b/Jusin154_Team3D/Editor/Private/Potion.cpp
index 8005fa92f..dc8502e44 100644
--- a/Jusin154_Team3D/Editor/Private/Potion.cpp
+++ b/Jusin154_Team3D/Editor/Private/Potion.cpp
@@ -40,8 +40,12 @@ HRESULT CPotion::Initialize(void* pArg)
m_fTimeMult = 3.f;
m_fAlpha = 1.f;
m_fAlphaTime = 1.f;
- m_vImageSlotPos = _float2(45.f,45.f);
- m_vImageSize = _float2(32.f,32.f);
+ m_vImageSlotPos = _float2(45.f, 45.f);
+ m_vImageSize = _float2(32.f, 32.f);
+ m_fFontX = 1163.f;
+ m_fFontY = 860.f;
+ m_iPotionIndex = 0;
+ m_iPerPotionIndex = -1;
return S_OK;
}
@@ -92,6 +96,13 @@ void CPotion::Update(_float fTimeDelta)
}
+ if (m_iPerPotionIndex != m_iPotionIndex)
+ {
+ m_strPotion = to_wstring(m_iPotionIndex);
+ m_fFontOffSet = (m_pGameInstance->FontSizeX(TEXT("UI_size15"), m_strPotion.c_str()) - 13.f) * 0.5f;
+ m_iPerPotionIndex = m_iPotionIndex;
+ }
+
m_fTime += fTimeDelta * m_fTimeMult;
__super::Update(fTimeDelta);
@@ -124,6 +135,8 @@ HRESULT CPotion::Render()
return E_FAIL;
}
+ m_pGameInstance->Render_Text(TEXT("UI_size15"), m_strPotion.c_str(), _float2((m_fFontX + m_fX) - m_fFontOffSet, m_fFontY + m_fY), XMVectorSet((208.f / 255.f) * m_fAlpha, (177.f / 255.f) * m_fAlpha, (52.f / 255.f)* m_fAlpha, m_fAlpha));
+
return S_OK;
}
diff --git a/Jusin154_Team3D/Editor/Private/Spell_Anim.cpp b/Jusin154_Team3D/Editor/Private/Spell_Anim.cpp
index b283adec6..2fbcf87d7 100644
--- a/Jusin154_Team3D/Editor/Private/Spell_Anim.cpp
+++ b/Jusin154_Team3D/Editor/Private/Spell_Anim.cpp
@@ -104,6 +104,11 @@ void CSpell_Anim::Update(_float fTimeDelta)
m_iCurrentFrame = 0;
}
+ if (m_iPerSpell != -1)
+ {
+ m_fY = m_fOrigin_Position.y + static_cast(m_pOwner)->Get_Info(m_iPerSpell).fVidio;
+ }
+
__super::Update(fTimeDelta);
}
diff --git a/Jusin154_Team3D/Editor/Private/Spell_Data.cpp b/Jusin154_Team3D/Editor/Private/Spell_Data.cpp
index 2d61fc8c4..20157c07d 100644
--- a/Jusin154_Team3D/Editor/Private/Spell_Data.cpp
+++ b/Jusin154_Team3D/Editor/Private/Spell_Data.cpp
@@ -51,16 +51,22 @@ HRESULT CSpell_Data::Initialize(void* pArg)
pInfo[id].pSpell_Name = CMyTools::ToWstring(pSpell->Attribute("Spell_Name"));
pInfo[id].pImage_Name = CMyTools::ToWstring(pSpell->Attribute("Image_Name"));
pSpell->QueryIntAttribute("Spell_Type", &pInfo[id].iSpell_Type);
+ pInfo[id].pType_Name = CMyTools::ToWstring(pSpell->Attribute("Type_Name"));
pSpell->QueryIntAttribute("Skill_Type", &pInfo[id].iSkill_Type);
+ pSpell->QueryFloatAttribute("Spell_Damage", &pInfo[id].fSpell_Damage);
pSpell->QueryFloatAttribute("Spell_Cooltime", &pInfo[id].fSpell_CoolTime);
pSpell->QueryFloatAttribute("Duration", &pInfo[id].fDuration);
pSpell->QueryIntAttribute("AnimNum", &pInfo[id].iAnimNum);
pInfo[id].pSpellInfo = CMyTools::ToWstring(pSpell->Attribute("SpellInfo"));
- int lock = 0, equip = 0;
+ _int lock = 0, equip = 0, use = 0;
pSpell->QueryIntAttribute("Spell_Lock", &lock);
pSpell->QueryIntAttribute("Equip_Spell", &equip);
+ pSpell->QueryIntAttribute("Use_Skill", &use);
pInfo[id].bSpell_Lock = lock != 0;
pInfo[id].bEquip_Spell = equip != 0;
+ pInfo[id].bUse_Skill = use != 0;
+ pSpell->QueryFloatAttribute("Preview", &pInfo[id].fPreview);
+ pSpell->QueryFloatAttribute("Vidio", &pInfo[id].fVidio);
pSpell = pSpell->NextSiblingElement("Spell");
}
diff --git a/Jusin154_Team3D/Editor/Private/Spell_Header.cpp b/Jusin154_Team3D/Editor/Private/Spell_Header.cpp
index 190672a47..793d83cf4 100644
--- a/Jusin154_Team3D/Editor/Private/Spell_Header.cpp
+++ b/Jusin154_Team3D/Editor/Private/Spell_Header.cpp
@@ -24,7 +24,7 @@ HRESULT CSpell_Header::Initialize(void* pArg)
Desc.fX = 600.f;
Desc.fY = -385.f;
Desc.fSizeX = 512.f;
- Desc.fSizeY = 64.f;
+ Desc.fSizeY = 80.f;
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
@@ -46,6 +46,10 @@ HRESULT CSpell_Header::Initialize(void* pArg)
static_cast(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); });
static_cast(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); });
static_cast(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); });
+ m_fFontX = 920.f;
+ m_fFontY = 510.f;
+ m_fType = _float2(935.f, 550.f);
+ m_iPerSpellIndex = -1;
return S_OK;
}
@@ -69,6 +73,7 @@ void CSpell_Header::Update(_float fTimeDelta)
if (m_fAlpha <= 1.f)
{
m_fAlpha += fTimeDelta * m_fAlphaTime;
+ m_bHover = true;
}
if (m_fAlpha >= 1.f)
@@ -81,18 +86,24 @@ void CSpell_Header::Update(_float fTimeDelta)
if (m_bFadeOut == true)
{
if (m_fAlpha >= 0.f)
- m_fAlpha -= fTimeDelta * m_fAlphaTime;;
+ {
+ m_fAlpha -= fTimeDelta * m_fAlphaTime;
+ }
if (m_fAlpha <= 0.f)
{
m_bFadeOut = false;
m_fAlpha = 0.f;
+ m_bHover = false;
}
}
- if (m_iSpellType != -1)
+ if (m_iSpellType != -1 && m_iPerSpellIndex != m_iSpellType)
{
m_iSkillType = static_cast(m_pOwner)->Get_Info(m_iSpellType).iSpell_Type;
+ m_pSpell_Name = static_cast(m_pOwner)->Get_Info(m_iSpellType).pSpell_Name;
+ m_fSpell_Type = static_cast(m_pOwner)->Get_Info(m_iSpellType).pType_Name;
+ m_iPerSpellIndex = m_iSpellType;
}
m_fTime += fTimeDelta * m_fTimeMult;
@@ -126,6 +137,11 @@ HRESULT CSpell_Header::Render()
return E_FAIL;
}
+
+ m_fFontOffSet = (m_pGameInstance->FontSizeX(TEXT("Font_size20"), m_pSpell_Name.c_str()) - 53.f) * 0.5f;
+ m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pSpell_Name.c_str(), _float2((m_fFontX + m_fX) - m_fFontOffSet, m_fFontY + m_fY), XMVectorSet((215.f / 255.f) * m_fAlpha, (185.f / 255.f) * m_fAlpha, (95.f / 255.f) * m_fAlpha, m_fAlpha));
+ m_pGameInstance->Render_Text(TEXT("Font_size13"), m_fSpell_Type.c_str(), _float2(m_fType.x + m_fX, m_fType.y + m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha));
+
return S_OK;
}
diff --git a/Jusin154_Team3D/Editor/Private/Spell_Header_Line.cpp b/Jusin154_Team3D/Editor/Private/Spell_Header_Line.cpp
index 6810ed202..a9e1fa2a9 100644
--- a/Jusin154_Team3D/Editor/Private/Spell_Header_Line.cpp
+++ b/Jusin154_Team3D/Editor/Private/Spell_Header_Line.cpp
@@ -22,7 +22,7 @@ HRESULT CSpell_Header_Line::Initialize(void* pArg)
CUIObject::UIOBJECT_DESC Desc{};
Desc.fX = 600.f;
- Desc.fY = -345.f;
+ Desc.fY = -340.f;
Desc.fSizeX = 487.f;
Desc.fSizeY = 18.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) };
diff --git a/Jusin154_Team3D/Editor/Private/Spell_Preview.cpp b/Jusin154_Team3D/Editor/Private/Spell_Preview.cpp
index f42d4fc15..f48f0c060 100644
--- a/Jusin154_Team3D/Editor/Private/Spell_Preview.cpp
+++ b/Jusin154_Team3D/Editor/Private/Spell_Preview.cpp
@@ -43,12 +43,18 @@ HRESULT CSpell_Preview::Initialize(void* pArg)
m_fAlphaTime = 5.f;
m_vNine_Slice = _float4(50.f, 75.f, 30.f, 96.f);
m_fTopY = m_fY - m_vScale.y * 0.5f;
+ m_fPreviewOffSet = 0.f;
+ m_fOriginPerviewSize = 280.f;
SizeUpX(512.f);
- SizeUpY(270.f);
+ SizeUpY(m_fOriginPerviewSize);
m_iSpellType = ENUM_CLASS(SPELLTYPE::CONTROL);
m_fSortZ = 0.02f;
+ static_cast(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); });
static_cast(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); });
static_cast(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); });
+ m_fFontX = 740.f;
+ m_fFontY = 500.f;
+ m_iPerSpellIndex = -1;
return S_OK;
}
@@ -76,6 +82,7 @@ void CSpell_Preview::Update(_float fTimeDelta)
if (m_fAlpha >= 1.f)
{
m_bFadeIn = false;
+ m_bHover = true;
m_fAlpha = 1.f;
}
}
@@ -83,7 +90,10 @@ void CSpell_Preview::Update(_float fTimeDelta)
if (m_bFadeOut == true)
{
if (m_fAlpha >= 0.f)
- m_fAlpha -= fTimeDelta * m_fAlphaTime;;
+ {
+ m_fAlpha -= fTimeDelta * m_fAlphaTime;
+ m_bHover = false;
+ }
if (m_fAlpha <= 0.f)
{
@@ -92,6 +102,15 @@ void CSpell_Preview::Update(_float fTimeDelta)
}
}
m_fTime += fTimeDelta * m_fTimeMult;
+
+ if (m_iSpellType != -1 && m_iPerSpellIndex != m_iSpellType)
+ {
+ m_pSpell_Info = static_cast(m_pOwner)->Get_Info(m_iSpellType).pSpellInfo;
+ m_fPreviewOffSet = static_cast(m_pOwner)->Get_Info(m_iSpellType).fPreview;
+ SizeUpY(m_fOriginPerviewSize + m_fPreviewOffSet);
+ m_iPerSpellIndex = m_iSpellType;
+ }
+
__super::Update(fTimeDelta);
}
@@ -121,6 +140,8 @@ HRESULT CSpell_Preview::Render()
if (FAILED(m_pVIBufferCom->Render())) {
return E_FAIL;
}
+
+ m_pGameInstance->Render_Text(TEXT("Font_size14"), m_pSpell_Info.c_str(), _float2(m_fFontX + m_fX, (m_fFontY + m_fY) - m_fPreviewOffSet * 0.5f), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha));
return S_OK;
}
diff --git a/Jusin154_Team3D/Editor/Private/Spell_Vidio_Border.cpp b/Jusin154_Team3D/Editor/Private/Spell_Vidio_Border.cpp
index 826bec3a4..770ba74f8 100644
--- a/Jusin154_Team3D/Editor/Private/Spell_Vidio_Border.cpp
+++ b/Jusin154_Team3D/Editor/Private/Spell_Vidio_Border.cpp
@@ -44,6 +44,7 @@ HRESULT CSpell_Vidio_Border::Initialize(void* pArg)
m_fLerpX = m_fX;
m_fLerpY = 45;
m_bStart = false;
+ m_fPreviewOffSet = 0;
static_cast(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); });
static_cast(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); });
static_cast(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); });
@@ -96,6 +97,11 @@ void CSpell_Vidio_Border::Update(_float fTimeDelta)
if (m_fAlpha >= 0.3f)
m_bStart = true;
+ if (m_iSpellType != -1)
+ {
+ m_fY = m_fOrigin_Position.y + static_cast(m_pOwner)->Get_Info(m_iSpellType).fVidio;
+ }
+
__super::Update(fTimeDelta);
}
diff --git a/Jusin154_Team3D/Editor/Private/UI_Manager.cpp b/Jusin154_Team3D/Editor/Private/UI_Manager.cpp
index 6b72822f7..477e7b000 100644
--- a/Jusin154_Team3D/Editor/Private/UI_Manager.cpp
+++ b/Jusin154_Team3D/Editor/Private/UI_Manager.cpp
@@ -6,6 +6,7 @@
#include "Mouse_Cursor.h"
#include "CameraLockOn.h"
#include "Loding_Canvas.h"
+#include "tinyxml2.h"
CUI_Manager::CUI_Manager(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CUIObject(pDevice, pContext)
@@ -102,6 +103,11 @@ void CUI_Manager::Update(_float fTimeDelta)
Canvas_Change(Canvases::GAMEPLAYER_CANVAS);
}
+ if (m_pGameInstance->Key_Down(DIK_SLASH))
+ {
+ SaveXML("../Bin/Resources/Data/UI/Data.xml");
+ }
+
}
void CUI_Manager::Late_Update(_float fTimeDelta)
@@ -142,16 +148,39 @@ HRESULT CUI_Manager::Ready_Components(void* pArg)
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMouse_Cursor)))) {
return E_FAIL;
}
- Add_Canvas(TEXT("Mouse_Cursor"), m_pMouse_Cursor);
+ //Add_Canvas(TEXT("Mouse_Cursor"), m_pMouse_Cursor);
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pCamera_LockOn)))) {
return E_FAIL;
}
- Add_Canvas(TEXT("Camera_LockOn"), m_pCamera_LockOn);
+ //Add_Canvas(TEXT("Camera_LockOn"), m_pCamera_LockOn);
return S_OK;
}
+bool CUI_Manager::SaveXML(const _string& filePath)
+{
+ tinyxml2::XMLDocument doc;
+
+ // 루트 생성
+ tinyxml2::XMLElement* root = doc.NewElement("Emart");
+ doc.InsertEndChild(root);
+
+ // 1층 요소 생성, ID만 먼저 넣음
+ tinyxml2::XMLElement* floor1 = doc.NewElement("Floor");
+ floor1->SetAttribute("ID", 0); // 나중에 사용할 수 있는 ID
+ root->InsertEndChild(floor1);
+
+ // 나중에 다른 속성이나 텍스트 추가 가능
+ floor1->SetAttribute("level", 1); // 층 정보 추가
+ floor1->SetText("마트, 푸드코트, 의류매장"); // 텍스트 정보 추가
+
+ // 저장
+ doc.SaveFile("Emart.xml");
+
+ return doc.SaveFile(filePath.c_str()) == tinyxml2::XML_SUCCESS;
+}
+
void CUI_Manager::Add_Canvas(_wstring Name, CGameObject* pCanvas)
{
if (pCanvas == nullptr)
diff --git a/Jusin154_Team3D/Editor/Public/Editor_Define.h b/Jusin154_Team3D/Editor/Public/Editor_Define.h
index 038b22be6..e21106f48 100644
--- a/Jusin154_Team3D/Editor/Public/Editor_Define.h
+++ b/Jusin154_Team3D/Editor/Public/Editor_Define.h
@@ -25,8 +25,8 @@ 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, 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_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, 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_HpBar.h b/Jusin154_Team3D/Editor/Public/Enemy_HpBar.h
new file mode 100644
index 000000000..15bedf673
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Public/Enemy_HpBar.h
@@ -0,0 +1,55 @@
+#pragma once
+
+#include "Editor_Define.h"
+#include "ElementObject.h"
+
+NS_BEGIN(Editor)
+
+class CEnemy_HpBar final : public CElementObject
+{
+private:
+ CEnemy_HpBar(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CEnemy_HpBar(const CEnemy_HpBar& rhs);
+ virtual ~CEnemy_HpBar() = default;
+
+public:
+ virtual void Priority_Update(_float fTimeDelta);
+ virtual void Update(_float fTimeDelta);
+ virtual void Late_Update(_float fTimeDelta);
+ virtual HRESULT Render() override;
+ virtual _vector Get_WorldPostion() override;
+ virtual void Lerp_PosX(_float X) override;
+
+public:
+ void Hit(_float fTimeDelta);
+ virtual void SizeUpX(_float SizeX) override;
+
+ void Set_Enemt_Info(void* pArg);
+private:
+ virtual HRESULT Bind_ShaderResources() override;
+ virtual HRESULT Ready_Components(void* pArg) override;
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+
+private:
+ CTexture* m_pDiffuse_TextureCom = { nullptr };
+ CTexture* m_pDiffuse_TextureCom1 = { nullptr };
+ CTexture* m_pDiffuse_TextureCom2 = { nullptr };
+ CShader* m_pShaderCom = { nullptr };
+ CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
+
+ _float m_fMaxHp{};
+ _float m_fCurrentHp{};
+ _float m_fHpBar{};
+ _float m_fDamage{};
+ _float m_fTargetHp{};
+
+ _bool m_bAnimation = { false };
+public:
+ static CEnemy_HpBar* 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_Info.h b/Jusin154_Team3D/Editor/Public/Enemy_Info.h
new file mode 100644
index 000000000..62e0bbe42
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Public/Enemy_Info.h
@@ -0,0 +1,49 @@
+#pragma once
+
+#include "Editor_Define.h"
+#include "ElementObject.h"
+
+NS_BEGIN(Editor)
+
+class CEnemy_Info final : public CElementObject
+{
+private:
+ CEnemy_Info(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CEnemy_Info(const CEnemy_Info& rhs);
+ virtual ~CEnemy_Info() = default;
+
+public:
+ virtual void Priority_Update(_float fTimeDelta);
+ virtual void Update(_float fTimeDelta);
+ virtual void Late_Update(_float fTimeDelta);
+ virtual HRESULT Render() override;
+ virtual _vector Get_WorldPostion() override;
+
+private:
+ virtual HRESULT Bind_ShaderResources() override;
+ virtual HRESULT Ready_Components(void* pArg) override;
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+
+public:
+ void Set_Info(_int Level, _wstring Name);
+
+private:
+ CTexture* m_pDiffuse_TextureCom = { nullptr };
+ CShader* m_pShaderCom = { nullptr };
+ CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
+
+ _float2 m_fFontPos{};
+ _float m_fFont2OffSet{};
+ _wstring m_pEnemy_Name;
+ _wstring m_pLevel;
+ _bool m_bAnimation = {false};
+
+public:
+ static CEnemy_Info* 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
new file mode 100644
index 000000000..e06bd196a
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Public/Enemy_Panel.h
@@ -0,0 +1,46 @@
+#pragma once
+
+#include "Editor_Define.h"
+#include "PanelObject.h"
+
+NS_BEGIN(Engine)
+class CGameObject;
+NS_END
+
+NS_BEGIN(Editor)
+
+class CEnemy_Panel final : public CPanelObject
+{
+private:
+ CEnemy_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CEnemy_Panel(const CEnemy_Panel& rhs);
+ virtual ~CEnemy_Panel() = default;
+
+public:
+ virtual void Priority_Update(_float fTimeDelta);
+ virtual void Update(_float fTimeDelta);
+ virtual void Late_Update(_float fTimeDelta);
+ virtual HRESULT Render() override;
+ virtual _vector Get_WorldPostion() override;
+
+private:
+ virtual HRESULT Bind_ShaderResources() override;
+ virtual HRESULT Ready_Components(void* pArg) override;
+ virtual HRESULT Ready_Element(void* pArg) override;
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+
+private:
+ CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
+
+ CGameObject* m_pEnemy_HpBar = { nullptr };
+ CGameObject* m_pEnemy_Info = { nullptr };
+
+public:
+ static CEnemy_Panel* 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/GamePlay_Canvas.h b/Jusin154_Team3D/Editor/Public/GamePlay_Canvas.h
index 33353a99e..764aad6e3 100644
--- a/Jusin154_Team3D/Editor/Public/GamePlay_Canvas.h
+++ b/Jusin154_Team3D/Editor/Public/GamePlay_Canvas.h
@@ -39,6 +39,7 @@ class CGamePlay_Canvas final : public CCanvasObject
CGameObject* m_pMinimap_Panel = { nullptr };
CGameObject* m_pLoading_Panel = { nullptr };
CGameObject* m_pAction_Panel = { nullptr };
+ CGameObject* m_pEnemy_Panel = { nullptr };
public:
static CGamePlay_Canvas* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
diff --git a/Jusin154_Team3D/Editor/Public/IMGUIUI.h b/Jusin154_Team3D/Editor/Public/IMGUIUI.h
index de548593b..69d0a7a48 100644
--- a/Jusin154_Team3D/Editor/Public/IMGUIUI.h
+++ b/Jusin154_Team3D/Editor/Public/IMGUIUI.h
@@ -97,6 +97,10 @@ class CIMGUIUI final : public CGameObject
_bool m_bElementAllVisible = { false };
_bool m_bElementVisible = { false };
+
+ _float2 m_fFontPos {};
+ _float m_fFontX {};
+ _float m_fFontY {};
public:
static CIMGUIUI* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
diff --git a/Jusin154_Team3D/Editor/Public/Magic_Item.h b/Jusin154_Team3D/Editor/Public/Magic_Item.h
index 7679c208e..c29e3ffde 100644
--- a/Jusin154_Team3D/Editor/Public/Magic_Item.h
+++ b/Jusin154_Team3D/Editor/Public/Magic_Item.h
@@ -46,6 +46,10 @@ class CMagic_Item final : public CElementObject
_float2 m_vImagePos1 = {};
_float2 m_vImageSize2 = {};
_float2 m_vImagePos2 = {};
+
+ _int m_iPotionIndex{};
+ _int m_iPerPotionIndex{};
+ _wstring m_strPotion;
public:
static CMagic_Item* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
diff --git a/Jusin154_Team3D/Editor/Public/Potion.h b/Jusin154_Team3D/Editor/Public/Potion.h
index c9cab3a7f..b6932407f 100644
--- a/Jusin154_Team3D/Editor/Public/Potion.h
+++ b/Jusin154_Team3D/Editor/Public/Potion.h
@@ -36,6 +36,10 @@ class CPotion final : public CElementObject
_float2 m_vImageSlotPos{};
_float2 m_vImageSize{};
+
+ _int m_iPotionIndex{};
+ _int m_iPerPotionIndex{};
+ _wstring m_strPotion;
public:
static CPotion* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
diff --git a/Jusin154_Team3D/Editor/Public/Spell_Data.h b/Jusin154_Team3D/Editor/Public/Spell_Data.h
index e1101bbae..1f45e81f2 100644
--- a/Jusin154_Team3D/Editor/Public/Spell_Data.h
+++ b/Jusin154_Team3D/Editor/Public/Spell_Data.h
@@ -18,13 +18,16 @@ class CSpell_Data final : public CGameObject
_string pSpell_Name;
_string pImage_Name;
_int iSpell_Type{};
+ _string pType_Name{};
_int iSkill_Type{};
+ _float fSpell_Damage{};
_float fSpell_CoolTime{};
_float fDuration{};
_int iAnimNum{};
_string pSpellInfo;
_bool bSpell_Lock = false;
_bool bEquip_Spell = false;
+ _float fPreview{};
}SPELLINFO;
private:
CSpell_Data(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
diff --git a/Jusin154_Team3D/Editor/Public/Spell_Header.h b/Jusin154_Team3D/Editor/Public/Spell_Header.h
index c9690aaab..82a175a99 100644
--- a/Jusin154_Team3D/Editor/Public/Spell_Header.h
+++ b/Jusin154_Team3D/Editor/Public/Spell_Header.h
@@ -25,12 +25,18 @@ class CSpell_Header final : public CElementObject
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
+
private:
CTexture* m_pDiffuse_TextureCom = { nullptr };
CShader* m_pShaderCom = { nullptr };
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
- _int m_iSkillType{};
+ _wstring m_pSpell_Name;
+ _wstring m_fSpell_Type;
+
+ _float2 m_fType{};
+
+ _int m_iPerSpellIndex{};
public:
static CSpell_Header* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
diff --git a/Jusin154_Team3D/Editor/Public/Spell_Hover.h b/Jusin154_Team3D/Editor/Public/Spell_Hover.h
index b6ceb64fb..29e9d6118 100644
--- a/Jusin154_Team3D/Editor/Public/Spell_Hover.h
+++ b/Jusin154_Team3D/Editor/Public/Spell_Hover.h
@@ -49,6 +49,7 @@ class CSpell_Hover final : public CElementObject
_float m_fOffSetX{};
_float m_fOffSetY{};
_uint m_iCols{};
+
public:
static CSpell_Hover* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
diff --git a/Jusin154_Team3D/Editor/Public/Spell_Preview.h b/Jusin154_Team3D/Editor/Public/Spell_Preview.h
index e8d47274c..914ee158c 100644
--- a/Jusin154_Team3D/Editor/Public/Spell_Preview.h
+++ b/Jusin154_Team3D/Editor/Public/Spell_Preview.h
@@ -36,10 +36,13 @@ class CSpell_Preview final : public CElementObject
CShader* m_pShaderCom = { nullptr };
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
+ _wstring m_pSpell_Info;
-
+ _float m_fOriginPerviewSize{};
+ _float m_fPreviewOffSet{};
_float4 m_vHeaderBack{};
+ _int m_iPerSpellIndex{};
public:
static CSpell_Preview* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
diff --git a/Jusin154_Team3D/Editor/Public/Spell_Vidio_Border.h b/Jusin154_Team3D/Editor/Public/Spell_Vidio_Border.h
index 515064bc2..ed81868dd 100644
--- a/Jusin154_Team3D/Editor/Public/Spell_Vidio_Border.h
+++ b/Jusin154_Team3D/Editor/Public/Spell_Vidio_Border.h
@@ -35,6 +35,8 @@ class CSpell_Vidio_Border final : public CElementObject
_int m_iPerIndex{};
_bool m_bStart = { false };
+ _float m_fPreviewOffSet{};
+
public:
static CSpell_Vidio_Border* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
diff --git a/Jusin154_Team3D/Editor/Public/UI_Manager.h b/Jusin154_Team3D/Editor/Public/UI_Manager.h
index 2b8f5dba2..8140f98aa 100644
--- a/Jusin154_Team3D/Editor/Public/UI_Manager.h
+++ b/Jusin154_Team3D/Editor/Public/UI_Manager.h
@@ -42,6 +42,7 @@ class CUI_Manager final : public CUIObject
void Add_Manager_Event(_wstring Name, function Event);
void Event_Callback(_wstring Name, void* pArg = nullptr);
private:
+ bool SaveXML(const _string& filePath);
void Add_Canvas(_wstring Name, class CGameObject* pCanvas);
CGameObject* Find_Canvas(const _wstring& Name);
diff --git a/Jusin154_Team3D/Engine/Default/Engine.vcxproj b/Jusin154_Team3D/Engine/Default/Engine.vcxproj
index a17f9ac2f..95e1f38f6 100644
--- a/Jusin154_Team3D/Engine/Default/Engine.vcxproj
+++ b/Jusin154_Team3D/Engine/Default/Engine.vcxproj
@@ -208,6 +208,8 @@ call Update_Lib.bat
+
+
@@ -428,6 +430,8 @@ call Update_Lib.bat
+
+
diff --git a/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters b/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters
index f48a68822..67cb0c16c 100644
--- a/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters
+++ b/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters
@@ -295,6 +295,12 @@
{7c82051e-19af-4284-8156-16f504db30b6}
+
+ {bba1e91b-87a8-4a7b-8e4e-b42d2041d8eb}
+
+
+ {7eab7292-025e-40d7-aa71-73e7a3c71ea7}
+
{ea9648d8-6a9a-41d2-8b8f-ea6937017372}
@@ -570,6 +576,12 @@
03.Management\02.Resource_Manager
+
+ 03.Management\04. Font_Manager
+
+
+ 02.Element\01.GameObject\01. Font
+
02.Element\02.Component\12.Stat
@@ -1211,6 +1223,12 @@
03.Management\02.Resource_Manager
+
+ 03.Management\04. Font_Manager
+
+
+ 02.Element\01.GameObject\01. Font
+
02.Element\02.Component\12.Stat
diff --git a/Jusin154_Team3D/Engine/Private/Font.cpp b/Jusin154_Team3D/Engine/Private/Font.cpp
new file mode 100644
index 000000000..362305ed4
--- /dev/null
+++ b/Jusin154_Team3D/Engine/Private/Font.cpp
@@ -0,0 +1,105 @@
+#include "pch.h"
+#include "Font.h"
+
+CFont::CFont(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : m_pDevice{ pDevice }
+ , m_pContext{ pContext }
+{
+ Safe_AddRef(m_pDevice);
+ Safe_AddRef(m_pContext);
+}
+
+HRESULT CFont::Initialize(const _tchar* pFontFilePath)
+{
+ m_pBatch = new SpriteBatch(m_pContext);
+ m_pFont = new SpriteFont(m_pDevice, pFontFilePath);
+
+ return S_OK;
+}
+
+HRESULT CFont::Render(const _tchar* pText, const _float2& vPosition, _fvector vColor, _float vScale)
+{
+ m_pBatch->Begin();
+
+ m_pFont->DrawString(m_pBatch, pText, vPosition, vColor, 0.f, _float2(0.f, 0.f), vScale);
+
+ m_pBatch->End();
+
+ return S_OK;
+}
+
+HRESULT CFont::Render_Rotate(const _tchar* pText, const _float2& vPosition, _fvector vColor, _float Rotation, _float vScale)
+{
+ _float2 origin = _float2(XMVectorGetX(m_pFont->MeasureString(pText)) * 0.5f, XMVectorGetY(m_pFont->MeasureString(pText)) * 0.5f);
+
+ m_pBatch->Begin();
+
+ m_pFont->DrawString(m_pBatch, pText, vPosition, vColor, XMConvertToRadians(Rotation), origin, vScale);
+
+ m_pBatch->End();
+
+ return S_OK;
+}
+
+HRESULT CFont::Perspective_Render(_matrix View, _matrix Proj, const _tchar* pText, const _fvector& vPosition, _fvector vColor, _float vScale)
+{
+ // 월드 좌표 -> 화면 좌표 변환
+ XMVECTOR projected = XMVector3Project(vPosition, 0.0f, 0.0f, 1280.f, 720.f, 0.0f, 1.0f, Proj, View, XMMatrixIdentity());
+
+ // 화면 좌표 XY만 사용
+ XMFLOAT2 screenPos;
+ XMStoreFloat2(&screenPos, projected);
+
+ // 화면 밖이면 그리지 않음
+ float z = XMVectorGetZ(projected);
+ if (z < 0.f || z > 1.f)
+ return S_OK;
+
+ // 텍스트 크기 계산 + 중앙 origin 설정
+ XMVECTOR textSizeV = m_pFont->MeasureString(pText);
+ XMVECTOR origin = XMVectorSet(
+ XMVectorGetX(textSizeV) * 0.5f,
+ XMVectorGetY(textSizeV) * 0.5f,
+ 0.f, 0.f
+ );
+
+ // 원근에 따른 스케일 보정
+ float scale = vScale / (z + 0.0001f);
+
+ m_pBatch->Begin(SpriteSortMode_Deferred, nullptr, nullptr, nullptr, nullptr, nullptr);
+
+ m_pFont->DrawString(m_pBatch, pText, XMVectorSet(screenPos.x, screenPos.y, 0.f, 0.f), vColor, 0.f, origin, scale);
+
+ m_pBatch->End();
+
+ return S_OK;
+}
+
+_float CFont::FontSizeX(const _tchar* pText)
+{
+ return XMVectorGetX(m_pFont->MeasureString(pText));
+}
+
+CFont* CFont::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const _tchar* pFontFilePath)
+{
+ CFont* pInstance = new CFont(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize(pFontFilePath)))
+ {
+ MSG_BOX("Failed to Created : CFont");
+ Safe_Release(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CFont::Free()
+{
+ __super::Free();
+
+ Safe_Release(m_pContext);
+ Safe_Release(m_pDevice);
+
+ Safe_Delete(m_pBatch);
+ Safe_Delete(m_pFont);
+}
diff --git a/Jusin154_Team3D/Engine/Private/Font_Manager.cpp b/Jusin154_Team3D/Engine/Private/Font_Manager.cpp
new file mode 100644
index 000000000..3da3dd56f
--- /dev/null
+++ b/Jusin154_Team3D/Engine/Private/Font_Manager.cpp
@@ -0,0 +1,87 @@
+#include "pch.h"
+#include "Font_Manager.h"
+#include "Font.h"
+
+CFont_Manager::CFont_Manager(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : m_pDevice{ pDevice }
+ , m_pContext{ pContext }
+{
+ Safe_AddRef(m_pDevice);
+ Safe_AddRef(m_pContext);
+}
+
+HRESULT CFont_Manager::Add_Font(const _wstring& strFontTag, const _tchar* pFontFilePath)
+{
+ if (nullptr != Find_Font(strFontTag))
+ return E_FAIL;
+
+ CFont* pFont = CFont::Create(m_pDevice, m_pContext, pFontFilePath);
+ if (nullptr == pFont)
+ return E_FAIL;
+
+ m_Fonts.emplace(strFontTag, pFont);
+
+ return S_OK;
+}
+
+HRESULT CFont_Manager::Render(const _wstring& strFontTag, const _tchar* pText, const _float2& vPosition, _fvector vColor, _float vScale)
+{
+ CFont* pFont = Find_Font(strFontTag);
+ if (nullptr == pFont)
+ return E_FAIL;
+
+ return pFont->Render(pText, vPosition, vColor, vScale);
+}
+
+HRESULT CFont_Manager::Render_Rotate(const _wstring& strFontTag, const _tchar* pText, const _float2& vPosition, _fvector vColor, _float Rotation, _float vScale)
+{
+ CFont* pFont = Find_Font(strFontTag);
+ if (nullptr == pFont)
+ return E_FAIL;
+
+ return pFont->Render_Rotate(pText, vPosition, vColor, Rotation, vScale);
+}
+
+HRESULT CFont_Manager::Perspective_Render(_matrix View, _matrix Proj, const _wstring& strFontTag, const _tchar* pText, const _fvector& vPosition, _fvector vColor, _float vScale)
+{
+ CFont* pFont = Find_Font(strFontTag);
+ if (nullptr == pFont)
+ return E_FAIL;
+
+ return pFont->Perspective_Render(View, Proj, pText, vPosition, vColor, vScale);
+}
+
+_float CFont_Manager::FontSizeX(const _wstring& strFontTag, const _tchar* pText)
+{
+ CFont* pFont = Find_Font(strFontTag);
+ if (nullptr == pFont)
+ return 0.f;
+
+ return pFont->FontSizeX(pText);
+}
+
+CFont* CFont_Manager::Find_Font(const _wstring& strFontTag)
+{
+ auto iter = m_Fonts.find(strFontTag);
+ if (iter == m_Fonts.end())
+ return nullptr;
+
+ return iter->second;
+}
+
+CFont_Manager* CFont_Manager::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ return new CFont_Manager(pDevice, pContext);
+}
+
+void CFont_Manager::Free()
+{
+ __super::Free();
+
+ for (auto& Pair : m_Fonts)
+ Safe_Release(Pair.second);
+ m_Fonts.clear();
+
+ Safe_Release(m_pDevice);
+ Safe_Release(m_pContext);
+}
diff --git a/Jusin154_Team3D/Engine/Private/GameInstance.cpp b/Jusin154_Team3D/Engine/Private/GameInstance.cpp
index 7814302da..64a1655f4 100644
--- a/Jusin154_Team3D/Engine/Private/GameInstance.cpp
+++ b/Jusin154_Team3D/Engine/Private/GameInstance.cpp
@@ -19,6 +19,7 @@
#include "ThreadHolder.h"
#include "Fog.h"
#include "Resource_Manager.h"
+#include "Font_Manager.h"
IMPLEMENT_SINGLETON(CGameInstance)
@@ -119,6 +120,11 @@ HRESULT CGameInstance::Initialize_Engine(const ENGINE_DESC& EngineDesc, ID3D11De
return E_FAIL;
}
+ m_pFont_Manager = CFont_Manager::Create(*ppDevice, *ppContext);
+ if (nullptr == m_pFont_Manager) {
+ return E_FAIL;
+ }
+
m_vViewPortSize = _float2((_float)EngineDesc.iWinSizeX, (_float)EngineDesc.iWinSizeY);
@@ -828,8 +834,11 @@ ID3D11ShaderResourceView* CGameInstance::Add_Resource(const _char* pFilePath)
{
return m_pResource_Manager->Add_Texture(pFilePath);
}
+
#pragma endregion // FOG
+#pragma region INPUT
+
bool CGameInstance::Key_Pressing(int _iKey)
{
//if (false == (GUI::IsWindowFocused(ImGuiFocusedFlags_AnyWindow))) {
@@ -933,12 +942,44 @@ _bool CGameInstance::Toggle_MouseCenter()
return m_pMouse_Manager->Toggle_MouseCenter();
}
+#pragma endregion // INPUT
+
+#pragma region FONT_MANAGER
+
+HRESULT CGameInstance::Add_Font(const _wstring& strFontTag, const _tchar* pFontFilePath)
+{
+ return m_pFont_Manager->Add_Font(strFontTag, pFontFilePath);
+}
+
+HRESULT CGameInstance::Render_Text(const _wstring& strFontTag, const _tchar* pText, const _float2& vPosition, _fvector vColor, _float vScale)
+{
+ return m_pFont_Manager->Render(strFontTag, pText, vPosition, vColor, vScale);
+}
+
+HRESULT CGameInstance::Render_Rotation_Text(const _wstring& strFontTag, const _tchar* pText, const _float2& vPosition, _fvector vColor, _float Rotation, _float vScale)
+{
+ return m_pFont_Manager->Render_Rotate(strFontTag, pText, vPosition, vColor, Rotation, vScale);
+}
+
+HRESULT CGameInstance::Perspective_Render_Text(_matrix View, _matrix Proj, const _wstring& strFontTag, const _tchar* pText, const _fvector& vPosition, _fvector vColor, _float vScale)
+{
+ return m_pFont_Manager->Perspective_Render(View, Proj, strFontTag, pText, vPosition, vColor, vScale);
+}
+
+_float CGameInstance::FontSizeX(const _wstring& strFontTag, const _tchar* pText)
+{
+ return m_pFont_Manager->FontSizeX(strFontTag, pText);
+}
+
+#pragma endregion
+
void CGameInstance::Release_Engine()
{
SAFE_RELEASE(m_pThreadHolder);
DestroyInstance();
+ SAFE_RELEASE(m_pFont_Manager);
SAFE_RELEASE(m_pFog);
SAFE_RELEASE(m_pPicking);
SAFE_RELEASE(m_pCollider_Manager);
diff --git a/Jusin154_Team3D/Engine/Private/UIObject.cpp b/Jusin154_Team3D/Engine/Private/UIObject.cpp
index 554b34b9d..867890a64 100644
--- a/Jusin154_Team3D/Engine/Private/UIObject.cpp
+++ b/Jusin154_Team3D/Engine/Private/UIObject.cpp
@@ -502,6 +502,21 @@ const CUIObject::SPELLINFO CUIObject::Get_Info(_int Index)
return SPELLINFO();
}
+void CUIObject::Set_FontX(_float fFontX)
+{
+ m_fFontX = fFontX;
+}
+
+void CUIObject::Set_FontY(_float fFontY)
+{
+ m_fFontY = fFontY;
+}
+
+_float2 CUIObject::Get_Font()
+{
+ return _float2(m_fFontX, m_fFontY);
+}
+
void CUIObject::Free()
{
__super::Free();
diff --git a/Jusin154_Team3D/Engine/Public/Font.h b/Jusin154_Team3D/Engine/Public/Font.h
new file mode 100644
index 000000000..b8843a7a5
--- /dev/null
+++ b/Jusin154_Team3D/Engine/Public/Font.h
@@ -0,0 +1,31 @@
+#pragma once
+
+#include "Base.h"
+
+NS_BEGIN(Engine)
+
+class CFont final : public CBase
+{
+private:
+ CFont(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual ~CFont() = default;
+
+public:
+ HRESULT Initialize(const _tchar* pFontFilePath);
+ HRESULT Render(const _tchar* pText, const _float2& vPosition, _fvector vColor, _float vScale);
+ HRESULT Render_Rotate(const _tchar* pText, const _float2& vPosition, _fvector vColor, _float Rotation, _float vScale);
+ HRESULT Perspective_Render(_matrix View, _matrix Proj, const _tchar* pText, const _fvector& vPosition, _fvector vColor, _float vScale);
+ _float FontSizeX(const _tchar* pText);
+
+private:
+ ID3D11Device* m_pDevice = { nullptr };
+ ID3D11DeviceContext* m_pContext = { nullptr };
+ SpriteBatch* m_pBatch = { nullptr };
+ SpriteFont* m_pFont = { nullptr };
+
+public:
+ static CFont* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const _tchar* pFontFilePath);
+ virtual void Free() override;
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Engine/Public/Font_Manager.h b/Jusin154_Team3D/Engine/Public/Font_Manager.h
new file mode 100644
index 000000000..bb191edd4
--- /dev/null
+++ b/Jusin154_Team3D/Engine/Public/Font_Manager.h
@@ -0,0 +1,34 @@
+#pragma once
+
+#include "Base.h"
+
+NS_BEGIN(Engine)
+
+class CFont_Manager final : public CBase
+{
+private:
+ CFont_Manager(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual ~CFont_Manager() = default;
+
+public:
+ HRESULT Add_Font(const _wstring& strFontTag, const _tchar* pFontFilePath);
+ HRESULT Render(const _wstring& strFontTag, const _tchar* pText, const _float2& vPosition, _fvector vColor, _float vScale);
+ HRESULT Render_Rotate(const _wstring& strFontTag, const _tchar* pText, const _float2& vPosition, _fvector vColor, _float Rotation, _float vScale);
+ HRESULT Perspective_Render(_matrix View, _matrix Proj, const _wstring& strFontTag, const _tchar* pText, const _fvector& vPosition, _fvector vColor, _float vScale);
+ _float FontSizeX(const _wstring& strFontTag, const _tchar* pText);
+
+
+private:
+ ID3D11Device* m_pDevice = { nullptr };
+ ID3D11DeviceContext* m_pContext = { nullptr };
+ map m_Fonts;
+
+private:
+ class CFont* Find_Font(const _wstring& strFontTag);
+
+public:
+ static CFont_Manager* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual void Free() override;
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Engine/Public/GameInstance.h b/Jusin154_Team3D/Engine/Public/GameInstance.h
index fee0144cc..38bb242ff 100644
--- a/Jusin154_Team3D/Engine/Public/GameInstance.h
+++ b/Jusin154_Team3D/Engine/Public/GameInstance.h
@@ -248,6 +248,15 @@ class ENGINE_DLL CGameInstance final : public CBase
ID3D11ShaderResourceView* Add_Resource(const _char* pFilePath);
#pragma endregion
+#pragma region FONT_MANAGER
+ public:
+ HRESULT Add_Font(const _wstring& strFontTag, const _tchar* pFontFilePath);
+ HRESULT Render_Text(const _wstring& strFontTag, const _tchar* pText, const _float2& vPosition, _fvector vColor = XMVectorSet(1.f, 1.f, 1.f, 1.f), _float vScale = 1.f);
+ HRESULT Render_Rotation_Text(const _wstring& strFontTag, const _tchar* pText, const _float2& vPosition, _fvector vColor = XMVectorSet(1.f, 1.f, 1.f, 1.f), _float Rotation = 0.f, _float vScale = 1.f);
+ HRESULT Perspective_Render_Text(_matrix View, _matrix Proj, const _wstring& strFontTag, const _tchar* pText, const _fvector& vPosition, _fvector vColor = XMVectorSet(1.f, 1.f, 1.f, 1.f), _float vScale = 1.f);
+ _float FontSizeX(const _wstring& strFontTag, const _tchar* pText);
+#pragma endregion
+
public:
void Add_ModelToMap(const _char* filePath, CModel* pModel);
@@ -284,7 +293,8 @@ class ENGINE_DLL CGameInstance final : public CBase
class CThreadHolder* m_pThreadHolder = { nullptr };
class CFog* m_pFog = { nullptr };
class CResource_Manager* m_pResource_Manager = { nullptr };
-
+ class CFont_Manager* m_pFont_Manager = { nullptr };
+
mt19937 m_Rng{ random_device{}() };
#ifdef _DEBUG
private:
diff --git a/Jusin154_Team3D/Engine/Public/Prototype_Manager.h b/Jusin154_Team3D/Engine/Public/Prototype_Manager.h
index 2b631aef4..67caa7a82 100644
--- a/Jusin154_Team3D/Engine/Public/Prototype_Manager.h
+++ b/Jusin154_Team3D/Engine/Public/Prototype_Manager.h
@@ -21,7 +21,7 @@
#include "VIBuffer_Box.h"
#include "Trail.h"
#include "OcclusionQuery.h"
-
+#include "Font.h"
NS_BEGIN(Engine)
class CGameInstance;
diff --git a/Jusin154_Team3D/Engine/Public/UIObject.h b/Jusin154_Team3D/Engine/Public/UIObject.h
index 7953560e8..c411d326f 100644
--- a/Jusin154_Team3D/Engine/Public/UIObject.h
+++ b/Jusin154_Team3D/Engine/Public/UIObject.h
@@ -23,13 +23,18 @@ typedef struct tagSpellInfo
_wstring pSpell_Name;
_wstring pImage_Name;
_int iSpell_Type{};
+ _wstring pType_Name;
_int iSkill_Type{};
+ _float fSpell_Damage{};
_float fSpell_CoolTime{};
_float fDuration{};
_int iAnimNum{};
_wstring pSpellInfo;
_bool bSpell_Lock = false;
_bool bEquip_Spell = false;
+ _bool bUse_Skill = false;
+ _float fPreview{};
+ _float fVidio{};
}SPELLINFO;
typedef struct SlotHover
{
@@ -135,6 +140,10 @@ typedef struct SlotHover
virtual _bool Get_Hover();
virtual const SPELLINFO Get_Info(_int Index);
+
+ virtual void Set_FontX(_float fFontX);
+ virtual void Set_FontY(_float fFontY);
+ virtual _float2 Get_Font();
protected:
_vector m_fOrigin_Position_vector{};
_float2 m_fOrigin_Position{};
@@ -187,6 +196,10 @@ typedef struct SlotHover
_float m_fTopY{};
_bool m_bClick = { false };
+
+ _float m_fFontX{};
+ _float m_fFontY{};
+ _float m_fFontOffSet{};
protected:
virtual HRESULT Initialize_Prototype();
virtual HRESULT Initialize(void* pArg);