diff --git a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl
index 3ac1e5d5d..5c51ddefb 100644
--- a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl
+++ b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl
@@ -64,13 +64,21 @@ Texture2D g_DiffuseTexture;
Texture2D g_MaskingTexture;
int g_iHover;
+int g_iBoosterOn;
+int g_iBoosterOff;
int g_iClick;
int g_iColor;
+int g_Count;
+int g_ChaseCount;
int g_iStep1 = 0;
int g_iStep2 = 0;
int g_iStep3 = 0;
+float2 g_Trail[200];
+float2 g_ChaseTrail[200];
+
+
struct VS_IN
{
float3 vPosition : POSITION;
@@ -1795,32 +1803,105 @@ PS_OUT PS_SpellLearnColor(PS_IN In)
Color = tex;
Color.rgb *= tex1.rgb;
-
- float2 rectPos = g_fPosition;
+
+ float2 rectPos = g_fPosition - float2(256.f, 259.f);
float2 rectSize = g_fCurrent_Size;
float2 itemPos = g_fItemPosition1;
float2 itemSize = g_fItemImageSizes1;
- float x0 = max(rectPos.x, itemPos.x);
- float x1 = min(rectPos.x + rectSize.x, itemPos.x + itemSize.x);
- float y0 = max(rectPos.y, itemPos.y);
- float y1 = min(rectPos.y + rectSize.y, itemPos.y + itemSize.y);
+ float2 pixelPos;
+ pixelPos.x = rectPos.x + In.vTexcoord.x * rectSize.x;
+ pixelPos.y = rectPos.y + (1.0f - In.vTexcoord.y) * rectSize.y;
- float uMin = (x0 - rectPos.x) / rectSize.x;
- float uMax = (x1 - rectPos.x) / rectSize.x;
- float vMin = (y0 - rectPos.y) / rectSize.y;
- float vMax = (y1 - rectPos.y) / rectSize.y;
-
- vMin = 1.0f - vMin;
- vMax = 1.0f - vMax;
-
- if (In.vTexcoord.x >= min(uMin, uMax) && In.vTexcoord.x <= max(uMin, uMax) &&
- In.vTexcoord.y >= min(vMin, vMax) && In.vTexcoord.y <= max(vMin, vMax))
+ if (pixelPos.x >= itemPos.x &&
+ pixelPos.x <= itemPos.x + itemSize.x &&
+ pixelPos.y >= itemPos.y &&
+ pixelPos.y <= itemPos.y + itemSize.y)
{
Color.rgb = float3(0.f, 0.f, 1.f);
}
+
+ for (int i = 0; i < g_Count; ++i)
+ {
+ float2 trailTopLeft = g_Trail[i];
+ float2 trailCenter = trailTopLeft + itemSize / 2.0f;
+
+ float halfWidth = itemSize.x / 2.0f + 6.f;
+ float halfHeight = itemSize.y / 2.0f + 6.f;
+
+ if (pixelPos.x >= trailCenter.x - halfWidth &&
+ pixelPos.x <= trailCenter.x + halfWidth &&
+ pixelPos.y >= trailCenter.y - halfHeight &&
+ pixelPos.y <= trailCenter.y + halfHeight)
+ {
+ Color.rgb = float3(20.f, 100.f, 180.f) / 255.f;
+ break;
+ }
+ }
+ for (int j = 0; j < g_ChaseCount; ++j)
+ {
+ float2 ChaseTopLeft = g_ChaseTrail[j];
+ float2 ChaseCenter = ChaseTopLeft + itemSize / 2.0f;
+
+ float halfWidth = itemSize.x * 0.7f;
+ float halfHeight = itemSize.y * 0.7f;
+
+ if (pixelPos.x >= ChaseCenter.x - halfWidth &&
+ pixelPos.x <= ChaseCenter.x + halfWidth &&
+ pixelPos.y >= ChaseCenter.y - halfHeight &&
+ pixelPos.y <= ChaseCenter.y + halfHeight)
+ {
+ Color.rgb = float3(110.f, 5.f, 5.f) / 255.f;
+ break;
+ }
+ }
+
+ Color.a *= Alpha;
+ Out.vColor = Color;
+ return Out;
+}
+
+PS_OUT PS_SpellLearnBooster(PS_IN In)
+{
+ PS_OUT Out;
+ float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
+
+ float4 Color = float4(1.f, 1.f, 1.f, 1.f);
+ float4 tex = g_Texture.Sample(DefaultSampler, In.vTexcoord);
+
+ Color = tex;
+
+ float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size;
+ float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size;
+ float2 Imagelocal = (In.vTexcoord - Imagetexpos1) / Imagetexsize1;
+ bool inside1 = all(Imagelocal >= 0.0f && Imagelocal <= 1.0f);
+
+ if (g_iBoosterOn == 0 && g_iBoosterOff == 0)
+ {
+ if (inside1)
+ {
+ float4 tex1 = g_Texture1.Sample(DefaultSampler, Imagelocal);
+ Color = lerp(Color, tex1, tex1.a);
+ }
+ }
+ else if (g_iBoosterOn != 0 && g_iBoosterOff == 0)
+ {
+
+ float4 tex3 = g_Texture3.Sample(DefaultSampler, In.vTexcoord);
+ Color = lerp(Color, tex3, tex3.a);
+ }
+ else if (g_iBoosterOn == 0 && g_iBoosterOff != 0)
+ {
+ float4 tex2 = g_Texture2.Sample(DefaultSampler, In.vTexcoord);
+
+ tex2.rgb *= float3(1.f, 0.f, 0.f);
+ Color = tex;
+
+ Color = lerp(Color, tex2, tex2.a);
+ }
+
Color.a *= Alpha;
Out.vColor = Color;
return Out;
@@ -2416,6 +2497,16 @@ technique11 PosTexTechnique11
PixelShader = compile ps_5_0 PS_SpellLearnColor();
}
+ pass SpellLearnBooster
+ {
+ SetRasterizerState(RS_Nocull);
+ SetDepthStencilState(DSS_Default, 0);
+ SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
+ VertexShader = compile vs_5_0 VS_MAIN();
+ GeometryShader = NULL;
+ PixelShader = compile ps_5_0 PS_SpellLearnBooster();
+ }
+
pass Enemy_Detection
{
SetRasterizerState(RS_Nocull);
diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj
index ccbe52877..42e196758 100644
--- a/Jusin154_Team3D/Client/Default/Client.vcxproj
+++ b/Jusin154_Team3D/Client/Default/Client.vcxproj
@@ -168,12 +168,17 @@ call Update_Resources.bat
+
+
+
+
+
@@ -391,12 +396,17 @@ call Update_Resources.bat
+
+
+
+
+
diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
index 2bad73827..0b117a485 100644
--- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
+++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
@@ -688,6 +688,21 @@
02.GameObjects\Effect\Effects\Transformation\TransformationSide
+
+
+ 02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Slot
+
+
+ 02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Overlay
+
+
+ 02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLeam_LookPointer
+
+
+ 02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SPellLeam_ChaserPointer
+
+
+ 02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Booster
@@ -1436,6 +1451,21 @@
{064b5e2f-dcde-47fd-a43d-43e25800393d}
+
+
+ {d9c0bcb6-64f6-4b58-a68d-ff04c91b9861}
+
+
+ {61024044-17a9-45ed-a6f9-73385290846d}
+
+
+ {b512f128-fcec-4db4-8cd2-08abfc56e000}
+
+
+ {2af08f38-aff0-4632-acb8-492111ff88f2}
+
+
+ {dd7d2910-1d3d-42c4-9390-ac60685357ee}
@@ -2072,6 +2102,21 @@
02.GameObjects\NPC\Ally\GateKeeper
+
+
+ 02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Slot
+
+
+ 02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Overlay
+
+
+ 02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLeam_LookPointer
+
+
+ 02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SPellLeam_ChaserPointer
+
+
+ 02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Booster
diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp
index 6c7b4ff3d..bf7b52469 100644
--- a/Jusin154_Team3D/Client/Private/Loader.cpp
+++ b/Jusin154_Team3D/Client/Private/Loader.cpp
@@ -118,6 +118,11 @@
#include "SpellLearn_Name.h"
#include "SpellLearn.h"
#include "SpellLearn_MovePointer.h"
+#include "SpellLearn_ChaserPointer.h"
+#include "SpellLearn_LookPointer.h"
+#include "SpellLearn_Booster.h"
+#include "SpellLearn_Slot.h"
+#include "SpellLearn_Overlay.h"
#include "Interaction_Key.h"
@@ -2414,6 +2419,31 @@ HRESULT CLoader::Loading_For_GamePlay()
{
return E_FAIL;
}
+ /* For.Prototype_GameObject_SpellLearn_ChaserPointer*/
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpellLearn_ChaserPointer::Create(m_pDevice, m_pContext))))
+ {
+ return E_FAIL;
+ }
+ /* For.Prototype_GameObject_SpellLearn_SpellLearn_LookPointer*/
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpellLearn_LookPointer::Create(m_pDevice, m_pContext))))
+ {
+ return E_FAIL;
+ }
+ /* For.Prototype_GameObject_SpellLearn_SpellLearn_Booster*/
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpellLearn_Booster::Create(m_pDevice, m_pContext))))
+ {
+ return E_FAIL;
+ }
+ /* For.Prototype_GameObject_SpellLearn_SpellLearn_Slot*/
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpellLearn_Slot::Create(m_pDevice, m_pContext))))
+ {
+ return E_FAIL;
+ }
+ /* For.Prototype_GameObject_SpellLearn_SpellLearn_Overlay*/
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpellLearn_Overlay::Create(m_pDevice, m_pContext))))
+ {
+ return E_FAIL;
+ }
/* For.Prototype_GameObject_Interaction_Key*/
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CInteraction_Key::Create(m_pDevice, m_pContext))))
diff --git a/Jusin154_Team3D/Client/Private/SpellLearn.cpp b/Jusin154_Team3D/Client/Private/SpellLearn.cpp
index 884254d57..0a5a69e9d 100644
--- a/Jusin154_Team3D/Client/Private/SpellLearn.cpp
+++ b/Jusin154_Team3D/Client/Private/SpellLearn.cpp
@@ -1,6 +1,8 @@
#include "pch.h"
#include "SpellLearn.h"
#include "GameInstance.h"
+#include "SpellLearn_MovePointer.h"
+#include "SpellLearn_ChaserPointer.h"
#include "InfoInstance.h"
CSpellLearn::CSpellLearn(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
@@ -39,8 +41,12 @@ HRESULT CSpellLearn::Initialize(void* pArg)
}
m_fTimeMult = 3.f;
- m_fAlpha = 1.f;
+ m_fAlpha = 0.f;
m_fAlphaTime = 5.f;
+ m_iTrailIndex = 0;
+ m_fSortZ = 0.02f;
+ static_cast(m_pOwner)->Add_Function(TEXT("LearnClear"), [this](void* p) {this->Clear(); });
+ static_cast(m_pOwner)->Add_Function(TEXT("OverrlayClear"), [this](void* p) {this->Set_FadeOut(); });
Change_Image(0);
Visible(false);
return S_OK;
@@ -87,7 +93,44 @@ void CSpellLearn::Update(_float fTimeDelta)
}
}
- m_fTime += fTimeDelta * m_fTimeMult;
+ if (m_bReset == true)
+ {
+ m_Trail.clear();
+ m_ChaseTrail.clear();
+ m_bReset = false;
+ }
+
+ if (m_bHover == false)
+ {
+ fill(m_Trail.begin(), m_Trail.end(), _float2(-9999.f, -9999.f));
+ fill(m_ChaseTrail.begin(), m_ChaseTrail.end(), _float2(-9999.f, -9999.f));
+ m_bReset = true;
+ }
+
+ if (m_pPointer != nullptr)
+ {
+ if (m_pPointer->Get_MoveStart() == true)
+ {
+ m_bHover = true;
+ m_vPointerPosition = m_pPointer->Get_Position();
+ m_vPointerScale = m_pPointer->Get_Current_Size();
+
+ m_vChasePosition = m_pChasePointer->Get_Position();
+ m_vChaseScale = m_pChasePointer->Get_Current_Size();
+
+ m_fTime += fTimeDelta * m_fTimeMult;
+ if (m_fTime >= 0.3f)
+ {
+ m_fTime = 0.f;
+ m_Trail.push_back(m_vPointerPosition);
+ m_iTrailIndex++;
+ m_ChaseTrail.push_back(m_vChasePosition);
+ m_iChaseiTrailIndex++;
+ }
+ }
+ }
+
+
__super::Update(fTimeDelta);
}
@@ -108,7 +151,7 @@ HRESULT CSpellLearn::Render()
if (FAILED(Bind_ShaderResources())) {
return E_FAIL;
}
- if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::COLOR)))) {
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::SPELLLEARNCOLOR)))) {
return E_FAIL;
}
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
@@ -168,6 +211,34 @@ HRESULT CSpellLearn::Bind_ShaderResources()
{
return E_FAIL;
}
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fItemImageSizes1", &m_vPointerScale, 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_fPosition", &m_fCurrent_Position, sizeof(_float2))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_Trail", m_Trail.data(), sizeof(_float2) * _uint(m_Trail.size()))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_Count", &m_iTrailIndex, sizeof(_int))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_ChaseTrail", m_ChaseTrail.data(), sizeof(_float2) * _uint(m_Trail.size()))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_ChaseCount", &m_iChaseiTrailIndex, sizeof(_int))))
+ {
+ return E_FAIL;
+ }
return S_OK;
}
@@ -195,9 +266,14 @@ HRESULT CSpellLearn::Ready_Components(void* pArg)
HRESULT CSpellLearn::Change_Image(_int SpellID)
{
+ m_bHover = false;
+ m_ChaseTrail.push_back(_float2(-9999.f, -9999.f));
+ m_Trail.push_back(_float2(-9999.f, -9999.f));
+ m_iTrailIndex = 0;
+ m_iChaseiTrailIndex = 0;
_wstring pName = TEXT("Prototype_Texture_");
_wstring pImageName = pName + m_pInfoInstance->Get_SpellLearn(SpellID).pImageName;
-
+ m_MoveLine = m_pInfoInstance->Get_SpellLearn(SpellID).Lines;
if (m_pDiffuse_TextureCom)
{
Remove_Component();
@@ -206,9 +282,21 @@ HRESULT CSpellLearn::Change_Image(_int SpellID)
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, pImageName, reinterpret_cast(&m_pDiffuse_TextureCom))))
return E_FAIL;
+ Set_FadeIn();
return S_OK;
}
+void CSpellLearn::Set_Pointer(CSpellLearn_MovePointer* Pointer, CSpellLearn_ChaserPointer* Chase)
+{
+ m_pPointer = Pointer;
+ m_pChasePointer = Chase;
+}
+
+void CSpellLearn::Clear()
+{
+ fill(m_ChaseTrail.begin(), m_ChaseTrail.end(), _float2(-9999.f, -9999.f));
+}
+
CSpellLearn* CSpellLearn::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
CSpellLearn* pInstance = new CSpellLearn(pDevice, pContext);
diff --git a/Jusin154_Team3D/Client/Private/SpellLearn_Booster.cpp b/Jusin154_Team3D/Client/Private/SpellLearn_Booster.cpp
new file mode 100644
index 000000000..ecb3ae787
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/SpellLearn_Booster.cpp
@@ -0,0 +1,321 @@
+#include "pch.h"
+#include "SpellLearn_Booster.h"
+#include "GameInstance.h"
+#include "InfoInstance.h"
+
+CSpellLearn_Booster::CSpellLearn_Booster(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ :CElementObject(pDevice, pContext)
+{
+}
+
+CSpellLearn_Booster::CSpellLearn_Booster(const CSpellLearn_Booster& rhs)
+ :CElementObject(rhs),
+ m_pInfoInstance(CInfoInstance::GetInstance())
+{
+}
+
+HRESULT CSpellLearn_Booster::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CSpellLearn_Booster::Initialize(void* pArg)
+{
+ CUIObject::UIOBJECT_DESC Desc{};
+
+ Desc.fX = 476.f;
+ Desc.fY = -253.f;
+ Desc.fSizeX = 64.f;
+ Desc.fSizeY = 64.f;
+ m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
+
+ if (FAILED(__super::Initialize(&Desc)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Ready_Components(pArg)))
+ {
+ return E_FAIL;
+ }
+
+ m_fTimeMult = 3.f;
+ m_fAlpha = 1.f;
+ m_fAlphaTime = 5.f;
+ m_fAngle = XMConvertToRadians(0);
+ m_bHover = true;
+ m_fImagePosi = _float4(16.f, 16.f, 32.f, 32.f);
+ static_cast(m_pOwner)->Add_Function(TEXT("BoosterOn"), [this](void* p) {this->BoosterOn(p); });
+ static_cast(m_pOwner)->Add_Function(TEXT("BoosterOff"), [this](void* p) {this->BoosterOff(p); });
+ static_cast(m_pOwner)->Add_Function(TEXT("LearnClear"), [this](void* p) {this->Clear(); });
+ Visible(true);
+ return S_OK;
+}
+
+void CSpellLearn_Booster::BoosterOn(void* pArg)
+{
+ Booster* State = static_cast(pArg);
+ if (State->iBoosterIndex != m_iIndex)
+ return;
+
+ m_bBoosterOn = true;
+ m_bBoosterOff = false;
+}
+
+void CSpellLearn_Booster::BoosterOff(void* pArg)
+{
+ Booster* State = static_cast(pArg);
+
+ if (m_bBoosterOn == true)
+ return;
+
+ if (State->iBoosterIndex != m_iIndex)
+ return;
+
+ m_bBoosterOff = true;
+ static_cast(m_pOwner)->Function_Callback(TEXT("ChaseBooster"));
+}
+
+void CSpellLearn_Booster::Set_Index(_int iIndex)
+{
+ m_iIndex = iIndex;
+}
+
+void CSpellLearn_Booster::Reset()
+{
+ m_bBoosterOn = false;
+ m_bBoosterOff = false;
+ Set_FadeIn();
+}
+
+void CSpellLearn_Booster::Clear()
+{
+ Set_FadeOut();
+}
+
+void CSpellLearn_Booster::Priority_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ __super::Priority_Update(fTimeDelta);
+}
+
+void CSpellLearn_Booster::Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ if (m_bFadeIn == true)
+ {
+ if (m_fAlpha <= 1.f)
+ {
+ m_fAlpha += fTimeDelta * m_fAlphaTime;
+ }
+
+ if (m_fAlpha >= 1.f)
+ {
+ m_bFadeIn = false;
+ m_fAlpha = 1.f;
+ }
+ }
+
+ if (m_bFadeOut == true)
+ {
+ if (m_fAlpha >= 0.f)
+ m_fAlpha -= fTimeDelta * m_fAlphaTime;;
+
+ if (m_fAlpha <= 0.f)
+ {
+ m_bFadeOut = false;
+ m_fAlpha = 0.f;
+ }
+ }
+
+ m_fTime += fTimeDelta * m_fTimeMult;
+ __super::Update(fTimeDelta);
+}
+
+void CSpellLearn_Booster::Late_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ if (m_bVisible) {
+ m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
+ __super::Late_Update(fTimeDelta);
+ }
+}
+
+HRESULT CSpellLearn_Booster::Render()
+{
+ if (FAILED(Bind_ShaderResources())) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::SPELLLEARNBOOSTER)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Bind_Resources())) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Render())) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+_vector CSpellLearn_Booster::Get_WorldPostion()
+{
+ return m_pTransformCom->Get_State(STATE::POSITION);
+}
+
+HRESULT CSpellLearn_Booster::Bind_ShaderResources()
+{
+ if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
+ {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom1->Bind_ShaderResource(m_pShaderCom, "g_Texture1", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom2->Bind_ShaderResource(m_pShaderCom, "g_Texture2", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom3->Bind_ShaderResource(m_pShaderCom, "g_Texture3", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_vScale, sizeof(_float2))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageSipos1", &m_fImagePosi, sizeof(_float4))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_iHover", &m_bHover, sizeof(_bool))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_iBoosterOn", &m_bBoosterOn, sizeof(_bool))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_iBoosterOff", &m_bBoosterOff, sizeof(_bool))))
+ {
+ return E_FAIL;
+ }
+ return S_OK;
+}
+
+HRESULT CSpellLearn_Booster::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_SU_ButtonCalloutRing"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_Mouse_LeftClick"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_SpellMinigame_SpeedBurstFail"), reinterpret_cast(&m_pDiffuse_TextureCom2), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_VFX_T_Speck_HighCoverage_D"), reinterpret_cast(&m_pDiffuse_TextureCom3), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
+ {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+CSpellLearn_Booster* CSpellLearn_Booster::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CSpellLearn_Booster* pInstance = new CSpellLearn_Booster(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CSpellLearn_Booster");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CSpellLearn_Booster::Clone(void* pArg, CGameObject* pOwner)
+{
+ CSpellLearn_Booster* pInstance = new CSpellLearn_Booster(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CSpellLearn_Booster");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CSpellLearn_Booster::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pDiffuse_TextureCom);
+ SAFE_RELEASE(m_pDiffuse_TextureCom1);
+ SAFE_RELEASE(m_pDiffuse_TextureCom2);
+ SAFE_RELEASE(m_pDiffuse_TextureCom3);
+ SAFE_RELEASE(m_pShaderCom);
+ SAFE_RELEASE(m_pVIBufferCom);
+}
+
+#ifdef _DEBUG
+void CSpellLearn_Booster::Describe_Entity()
+{
+}
+#endif // _DEBUG
diff --git a/Jusin154_Team3D/Client/Private/SpellLearn_ChaserPointer.cpp b/Jusin154_Team3D/Client/Private/SpellLearn_ChaserPointer.cpp
new file mode 100644
index 000000000..05a2bcc0a
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/SpellLearn_ChaserPointer.cpp
@@ -0,0 +1,294 @@
+#include "pch.h"
+#include "SpellLearn_ChaserPointer.h"
+#include "GameInstance.h"
+#include "SpellLearn_MovePointer.h"
+#include "InfoInstance.h"
+
+CSpellLearn_ChaserPointer::CSpellLearn_ChaserPointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ :CElementObject(pDevice, pContext)
+{
+}
+
+CSpellLearn_ChaserPointer::CSpellLearn_ChaserPointer(const CSpellLearn_ChaserPointer& rhs)
+ :CElementObject(rhs),
+ m_pInfoInstance(CInfoInstance::GetInstance())
+{
+}
+
+HRESULT CSpellLearn_ChaserPointer::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CSpellLearn_ChaserPointer::Initialize(void* pArg)
+{
+ CUIObject::UIOBJECT_DESC Desc{};
+
+ Desc.fX = 476.f;
+ Desc.fY = -253.f;
+ Desc.fSizeX = 32.f;
+ Desc.fSizeY = 32.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 = 5.f;
+ m_fMoveSpeed = 165.f;
+ static_cast(m_pOwner)->Add_Function(TEXT("ChaseBooster"), [this](void* p) {this->SpeedUp(); });
+ static_cast(m_pOwner)->Add_Function(TEXT("LearnClear"), [this](void* p) {this->Clear(); });
+ Set_SpellLearn(0);
+ Visible(false);
+ return S_OK;
+}
+
+void CSpellLearn_ChaserPointer::Priority_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ __super::Priority_Update(fTimeDelta);
+}
+
+void CSpellLearn_ChaserPointer::Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ if (m_bFadeIn == true)
+ {
+ if (m_fAlpha <= 1.f)
+ {
+ m_fAlpha += fTimeDelta * m_fAlphaTime;
+ }
+
+ if (m_fAlpha >= 1.f)
+ {
+ m_bFadeIn = false;
+ m_fAlpha = 1.f;
+ }
+ }
+
+ if (m_bFadeOut == true)
+ {
+ if (m_fAlpha >= 0.f)
+ m_fAlpha -= fTimeDelta * m_fAlphaTime;;
+
+ if (m_fAlpha <= 0.f)
+ {
+ m_bFadeOut = false;
+ m_fAlpha = 0.f;
+ }
+ }
+
+ if (m_bMoveStart == true)
+ {
+ Line(fTimeDelta);
+ }
+
+ if (m_fMoveSpeed >= 165.f)
+ {
+ m_fMoveSpeed -= fTimeDelta;
+ }
+
+ m_fTime += fTimeDelta * m_fTimeMult;
+
+
+ __super::Update(fTimeDelta);
+}
+
+void CSpellLearn_ChaserPointer::Late_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ if (m_bVisible) {
+
+ m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
+ __super::Late_Update(fTimeDelta);
+ }
+}
+
+HRESULT CSpellLearn_ChaserPointer::Render()
+{
+ if (FAILED(Bind_ShaderResources())) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::DEFAULT)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Bind_Resources())) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Render())) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+_vector CSpellLearn_ChaserPointer::Get_WorldPostion()
+{
+ return m_pTransformCom->Get_State(STATE::POSITION);
+}
+
+void CSpellLearn_ChaserPointer::Set_SpellLearn(_int Index)
+{
+ m_fAlpha = 0.f;
+ m_bHover = false;
+ m_bMoveStart = false;
+ m_fTime = 0.f;
+ m_iLineIndex = _int(m_pInfoInstance->Get_SpellLearn(Index).Lines.size());
+ m_MoveLine = m_pInfoInstance->Get_SpellLearn(Index).Lines;
+ m_iCurrentLine = 0;
+ m_fX = m_pInfoInstance->Get_SpellLearn(Index).fStartPosition.x;
+ m_fY = m_pInfoInstance->Get_SpellLearn(Index).fStartPosition.y;
+ m_fMoveSpeed = 165.f;
+}
+
+void CSpellLearn_ChaserPointer::Set_Move()
+{
+ m_bHover = true;
+ m_bMoveStart = true;
+}
+
+void CSpellLearn_ChaserPointer::Line(_float fTime)
+{
+ m_vLerp_Position = m_MoveLine[m_iCurrentLine];
+
+ if (Start_Lerp(fTime) == true)
+ {
+ if (m_iCurrentLine < m_iLineIndex - 1)
+ {
+ ++m_iCurrentLine;
+ }
+ else
+ {
+ m_bMoveStart = false;
+ }
+ }
+
+}
+
+void CSpellLearn_ChaserPointer::SpeedUp()
+{
+ m_fMoveSpeed = 190.f;
+}
+
+void CSpellLearn_ChaserPointer::Clear()
+{
+ m_fMoveSpeed = 0.f;
+ Set_FadeOut();
+}
+
+HRESULT CSpellLearn_ChaserPointer::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 CSpellLearn_ChaserPointer::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_SpellMinigame_SpeedBurstDropBack"), 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;
+}
+
+CSpellLearn_ChaserPointer* CSpellLearn_ChaserPointer::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CSpellLearn_ChaserPointer* pInstance = new CSpellLearn_ChaserPointer(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CSpellLearn_ChaserPointer");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CSpellLearn_ChaserPointer::Clone(void* pArg, CGameObject* pOwner)
+{
+ CSpellLearn_ChaserPointer* pInstance = new CSpellLearn_ChaserPointer(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CSpellLearn_ChaserPointer");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CSpellLearn_ChaserPointer::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pDiffuse_TextureCom);
+ SAFE_RELEASE(m_pShaderCom);
+ SAFE_RELEASE(m_pVIBufferCom);
+}
+
+#ifdef _DEBUG
+void CSpellLearn_ChaserPointer::Describe_Entity()
+{
+}
+#endif // _DEBUG
diff --git a/Jusin154_Team3D/Client/Private/SpellLearn_Data.cpp b/Jusin154_Team3D/Client/Private/SpellLearn_Data.cpp
index 0f4d1a4aa..cdfd5f9e0 100644
--- a/Jusin154_Team3D/Client/Private/SpellLearn_Data.cpp
+++ b/Jusin154_Team3D/Client/Private/SpellLearn_Data.cpp
@@ -50,12 +50,34 @@ HRESULT CSpellLearn_Data::Load_SpellInfo(const _char* pFilePath)
// 속성 읽기
Info.pSpellName = CMyTools::ToWstring(pName->Attribute("SpellName"));
Info.pImageName = CMyTools::ToWstring(pName->Attribute("ImageName"));
+ pName->QueryIntAttribute("SpellID", &Info.iSpellID);
+ pName->QueryIntAttribute("SpellType", &Info.iSpellType);
pName->QueryFloatAttribute("Size", &Info.fSpellSize);
_float fX{}, fY{};
pName->QueryFloatAttribute("x", &fX);
pName->QueryFloatAttribute("y", &fY);
Info.fStartPosition = _float2(fX, fY);
+ _float endx{}, endy{};
+ pName->QueryFloatAttribute("endx", &endx);
+ pName->QueryFloatAttribute("endy", &endy);
+ Info.fEndPosition = _float2(endx, endy);
+
+ tinyxml2::XMLElement* pBooster = pName->FirstChildElement("Booster");
+ while (pBooster)
+ {
+ tinyxml2::XMLElement* pPos = pBooster->FirstChildElement("Pos");
+ if (pPos)
+ {
+ _float px{}, py{};
+ pPos->QueryFloatAttribute("x", &px);
+ pPos->QueryFloatAttribute("y", &py);
+ Info.Booster.push_back(XMVectorSet(px, py, 0.f, 1.f));
+ }
+
+ // 다음 Position으로 이동
+ pBooster = pBooster->NextSiblingElement("Booster");
+ }
// Position 요소 반복
tinyxml2::XMLElement* pPosition = pName->FirstChildElement("Position");
diff --git a/Jusin154_Team3D/Client/Private/SpellLearn_LookPointer.cpp b/Jusin154_Team3D/Client/Private/SpellLearn_LookPointer.cpp
new file mode 100644
index 000000000..57e1deea0
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/SpellLearn_LookPointer.cpp
@@ -0,0 +1,255 @@
+#include "pch.h"
+#include "SpellLearn_LookPointer.h"
+#include "GameInstance.h"
+
+CSpellLearn_LookPointer::CSpellLearn_LookPointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ :CElementObject(pDevice, pContext)
+{
+}
+
+CSpellLearn_LookPointer::CSpellLearn_LookPointer(const CSpellLearn_LookPointer& rhs)
+ :CElementObject(rhs)
+{
+}
+
+HRESULT CSpellLearn_LookPointer::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CSpellLearn_LookPointer::Initialize(void* pArg)
+{
+ CUIObject::UIOBJECT_DESC Desc{};
+
+ Desc.fX = 100.f;
+ Desc.fY = 100.f;
+ Desc.fSizeX = 80.f;
+ Desc.fSizeY = 80.f;
+ m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
+
+ if (FAILED(__super::Initialize(&Desc)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Ready_Components(pArg)))
+ {
+ return E_FAIL;
+ }
+
+ m_fTimeMult = 3.f;
+ m_fAlpha = 1.f;
+ m_fAlphaTime = 5.f;
+ m_fMoveSpeed = 130.f;
+ Set_SpellLearn(0);
+ m_fAngle = XMConvertToRadians(0);
+ Visible(true);
+ m_localX = 0.f;
+ m_localY = 20.f;
+ return S_OK;
+}
+
+void CSpellLearn_LookPointer::Priority_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ __super::Priority_Update(fTimeDelta);
+}
+
+void CSpellLearn_LookPointer::Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ if (m_bFadeIn == true)
+ {
+ if (m_fAlpha <= 1.f)
+ {
+ m_fAlpha += fTimeDelta * m_fAlphaTime;
+ }
+
+ if (m_fAlpha >= 1.f)
+ {
+ m_bFadeIn = false;
+ m_fAlpha = 1.f;
+ }
+ }
+
+ if (m_bFadeOut == true)
+ {
+ if (m_fAlpha >= 0.f)
+ m_fAlpha -= fTimeDelta * m_fAlphaTime;;
+
+ if (m_fAlpha <= 0.f)
+ {
+ m_bFadeOut = false;
+ m_fAlpha = 0.f;
+ }
+ }
+
+ m_fAngle = XMConvertToRadians(static_cast(m_pOwner)->Get_Angle());
+
+ float cosA = cos(m_fAngle);
+ float sinA = sin(m_fAngle);
+
+ float rotatedX = m_localX * cosA - m_localY * sinA;
+ float rotatedY = m_localX * sinA + m_localY * cosA;
+
+ MoveX(rotatedX);
+ MoveY(rotatedY);
+
+ m_fTime += fTimeDelta * m_fTimeMult;
+ __super::Update(fTimeDelta);
+}
+
+void CSpellLearn_LookPointer::Late_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ if (m_bVisible) {
+ m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
+ __super::Late_Update(fTimeDelta);
+ }
+}
+
+HRESULT CSpellLearn_LookPointer::Render()
+{
+ if (FAILED(Bind_ShaderResources())) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ROTATION)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Bind_Resources())) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Render())) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+_vector CSpellLearn_LookPointer::Get_WorldPostion()
+{
+ return m_pTransformCom->Get_State(STATE::POSITION);
+}
+
+HRESULT CSpellLearn_LookPointer::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;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fMapAngle", &m_fAngle, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ return S_OK;
+}
+
+HRESULT CSpellLearn_LookPointer::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_SU_CursorArrow"), 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 CSpellLearn_LookPointer::Set_SpellLearn(_int Index)
+{
+ m_bMoveStart = false;
+ m_iLineIndex = _int(static_cast(m_pOwner)->Get_Learninfo(Index).Lines.size());
+ m_MoveLine = static_cast(m_pOwner)->Get_Learninfo(Index).Lines;
+ m_iCurrentLine = 0;
+ m_fX = static_cast(m_pOwner)->Get_Learninfo(Index).fStartPosition.x;
+ m_fY = static_cast(m_pOwner)->Get_Learninfo(Index).fStartPosition.y;
+}
+
+CSpellLearn_LookPointer* CSpellLearn_LookPointer::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CSpellLearn_LookPointer* pInstance = new CSpellLearn_LookPointer(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CSpellLearn_LookPointer");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CSpellLearn_LookPointer::Clone(void* pArg, CGameObject* pOwner)
+{
+ CSpellLearn_LookPointer* pInstance = new CSpellLearn_LookPointer(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CSpellLearn_LookPointer");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CSpellLearn_LookPointer::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pDiffuse_TextureCom);
+ SAFE_RELEASE(m_pShaderCom);
+ SAFE_RELEASE(m_pVIBufferCom);
+}
+
+#ifdef _DEBUG
+void CSpellLearn_LookPointer::Describe_Entity()
+{
+}
+#endif // _DEBUG
diff --git a/Jusin154_Team3D/Client/Private/SpellLearn_MovePointer.cpp b/Jusin154_Team3D/Client/Private/SpellLearn_MovePointer.cpp
index 85ca12265..306ace767 100644
--- a/Jusin154_Team3D/Client/Private/SpellLearn_MovePointer.cpp
+++ b/Jusin154_Team3D/Client/Private/SpellLearn_MovePointer.cpp
@@ -1,6 +1,7 @@
#include "pch.h"
#include "SpellLearn_MovePointer.h"
#include "GameInstance.h"
+#include "SpellLearn_LookPointer.h"
#include "InfoInstance.h"
CSpellLearn_MovePointer::CSpellLearn_MovePointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
@@ -38,41 +39,69 @@ HRESULT CSpellLearn_MovePointer::Initialize(void* pArg)
return E_FAIL;
}
- m_fTimeMult = 3.f;
- m_fAlpha = 1.f;
+ m_fTimeMult = 10.f;
+ m_fAlpha = 0.f;
m_fAlphaTime = 5.f;
- m_fMoveSpeed = 15.f;
+ m_fMoveSpeed = 105.f;
Set_SpellLearn(0);
m_fAngle = XMConvertToRadians(0);
+ static_cast(m_pOwner)->Add_Function(TEXT("Booster"), [this](void* p) {this->Set_Booster(p); });
Visible(false);
return S_OK;
}
void CSpellLearn_MovePointer::Set_SpellLearn(_int Index)
{
+ m_bMoveStart = false;
+ m_bHover = true;
m_iLineIndex = _int(m_pInfoInstance->Get_SpellLearn(Index).Lines.size());
+ m_Boosters = m_pInfoInstance->Get_SpellLearn(Index).Booster;
m_MoveLine = m_pInfoInstance->Get_SpellLearn(Index).Lines;
m_iCurrentLine = 0;
m_fX = m_pInfoInstance->Get_SpellLearn(Index).fStartPosition.x;
m_fY = m_pInfoInstance->Get_SpellLearn(Index).fStartPosition.y;
+ m_iCurrentLine = 0;
+ m_Booster.iBoosterIndex = -1;
+ m_Booster.bBoosterOn = false;
+ Set_FadeIn();
}
-void CSpellLearn_MovePointer::Line(_float fTime)
+_int CSpellLearn_MovePointer::Get_SpellTrail()
+{
+ return m_iCurrentLine;
+}
+
+_bool CSpellLearn_MovePointer::Get_MoveStart()
+{
+ return m_bMoveStart;
+}
+
+void CSpellLearn_MovePointer::Line(_float fTime, _float2 fMouse)
{
m_vLerp_Position = m_MoveLine[m_iCurrentLine];
- if (Start_Lerp(m_fMoveSpeed * fTime) == true)
+ if (Start_Lerp_Speed(fTime, fMouse) == true)
{
if (m_iCurrentLine < m_iLineIndex - 1)
{
++m_iCurrentLine;
+ m_fPerPosition = _float2(m_MoveLine[m_iCurrentLine - 1].m128_f32[0], m_MoveLine[m_iCurrentLine - 1].m128_f32[1]);
}
else
{
m_bMoveStart = false;
+ Set_FadeOut();
+ static_cast(m_pOwner)->Function_Callback(TEXT("LearnClear"));
}
}
+}
+void CSpellLearn_MovePointer::Set_Booster(void* pArg)
+{
+ Booster* Info = static_cast(pArg);
+ m_Booster.iBoosterIndex = Info->iBoosterIndex;
+ m_Booster.bBoosterOn = Info->bBoosterOn;
+ m_bBooster = true;
}
void CSpellLearn_MovePointer::Priority_Update(_float fTimeDelta)
@@ -116,28 +145,45 @@ void CSpellLearn_MovePointer::Update(_float fTimeDelta)
}
}
+ POINT ptMouse{};
+ GetCursorPos(&ptMouse);
+ ScreenToClient(g_hWnd, &ptMouse);
+ _float2 fMouse{};
+ fMouse.x = ptMouse.x - (g_iWinSizeX * 0.5f);
+ fMouse.y = -ptMouse.y + (g_iWinSizeY * 0.5f);
+
+ _float2 fFinalMouse{};
+ fFinalMouse.x = fMouse.x - m_fX;
+ fFinalMouse.y = fMouse.y - m_fY;
+
if (m_pGameInstance->Key_Down(DIK_L))
{
m_bMoveStart = true;
+ m_bBooster = false;
+ m_fMoveSpeed = 105.f;
}
if (m_bMoveStart == true)
{
- Line(fTimeDelta);
+ Line(fTimeDelta, fMouse);
}
- POINT ptMouse{};
- GetCursorPos(&ptMouse);
- ScreenToClient(g_hWnd, &ptMouse);
- _float2 fMouse;
- fMouse.x = ptMouse.x - (g_iWinSizeX * 0.5f);
- fMouse.y = -ptMouse.y + (g_iWinSizeY * 0.5f);
+ m_fAngle = atan2(-fFinalMouse.x, fFinalMouse.y);
- fMouse.x = fMouse.x - m_fX;
- fMouse.y = fMouse.y - m_fY;
+ if (m_bBooster == true)
+ {
+ if (m_pGameInstance->Mouse_Down(DIM_LBUTTON))
+ {
+ m_bBooster = false;
+ m_fMoveSpeed = 160.f;
+ static_cast(m_pOwner)->Function_Callback(TEXT("BoosterOn"), &m_Booster);
+ }
+ }
-
- m_fAngle = atan2(-fMouse.x, fMouse.y);
+ if (m_fMoveSpeed >= 105.f)
+ {
+ m_fMoveSpeed -= fTimeDelta * m_fTimeMult;
+ }
m_fTime += fTimeDelta * m_fTimeMult;
__super::Update(fTimeDelta);
@@ -150,7 +196,8 @@ void CSpellLearn_MovePointer::Late_Update(_float fTimeDelta)
return;
}
if (m_bVisible) {
- m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
+ if (m_bHover == true)
+ m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
__super::Late_Update(fTimeDelta);
}
}
@@ -239,6 +286,10 @@ HRESULT CSpellLearn_MovePointer::Ready_Components(void* pArg)
return E_FAIL;
}
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLeam_LookPointer))))
+ {
+ return E_FAIL;
+ }
return S_OK;
}
diff --git a/Jusin154_Team3D/Client/Private/SpellLearn_Overlay.cpp b/Jusin154_Team3D/Client/Private/SpellLearn_Overlay.cpp
new file mode 100644
index 000000000..c97dfdcf8
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/SpellLearn_Overlay.cpp
@@ -0,0 +1,391 @@
+#include "pch.h"
+#include "SpellLearn_Overlay.h"
+#include "GameInstance.h"
+#include "InfoInstance.h"
+
+CSpellLearn_Overlay::CSpellLearn_Overlay(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ :CElementObject(pDevice, pContext)
+{
+}
+
+CSpellLearn_Overlay::CSpellLearn_Overlay(const CSpellLearn_Overlay& rhs)
+ :CElementObject(rhs),
+ m_pInfoInstance(CInfoInstance::GetInstance())
+{
+}
+
+HRESULT CSpellLearn_Overlay::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CSpellLearn_Overlay::Initialize(void* pArg)
+{
+ CUIObject::UIOBJECT_DESC Desc{};
+
+ Desc.fX = 380.f;
+ Desc.fY = -30.f;
+ Desc.fSizeX = 105.f;
+ Desc.fSizeY = 105.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_iImageFrameX = 8;
+ m_iImageFrameY = 8;
+ m_fFrame = 0.2f;
+ m_fTimeMult = 3.f;
+ m_fAngle = XMConvertToRadians(-135.f);
+ m_fAlpha = 1.f;
+ m_fAlphaTime = 1.f;
+ m_vUVScale.x = 1.f;
+ m_vUVScale.y = 1.f;
+ m_fCoolTime = 5.f;
+ m_fSortZ = 0.01f;
+ m_fMoveSpeed = 10.f;
+ m_fLerpX = 600.f;
+ m_fLerpY = 100.f;
+ m_iSpellType = ENUM_CLASS(SPELLTYPE::CONTROL);
+ static_cast(m_pOwner)->Add_Function(TEXT("LearnClear"), [this](void* p) {this->Clear(); });
+ Compute_UI(5);
+ return S_OK;
+}
+
+void CSpellLearn_Overlay::Set_SpellLearn(_int Index)
+{
+ Compute_UI(m_pInfoInstance->Get_SpellLearn(Index).iSpellID);
+ m_vUVScale.y = 0.f;
+ m_fTrail = 0.f;
+ m_iSpellType = m_pInfoInstance->Get_SpellLearn(Index).iSpellType;
+ m_fSpellLearn = _float(m_pInfoInstance->Get_SpellLearn(Index).Lines.size());
+ MoveX(m_pInfoInstance->Get_SpellLearn(Index).fEndPosition.x);
+ MoveY(m_pInfoInstance->Get_SpellLearn(Index).fEndPosition.y);
+ SizeUpdate(m_fOrigin_Size.x, m_fOrigin_Size.y);
+ m_fSizeUp = false;
+ m_bClear = false;
+}
+
+void CSpellLearn_Overlay::Set_Count(_int Index)
+{
+ m_fTrail = _float(Index);
+}
+
+void CSpellLearn_Overlay::Priority_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ __super::Priority_Update(fTimeDelta);
+}
+
+void CSpellLearn_Overlay::Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+
+ if (m_bFadeIn == true)
+ {
+ if (m_fAlpha <= 1.f)
+ m_fAlpha += fTimeDelta * m_fAlphaTime;
+
+ if (m_fAlpha >= 1.f)
+ {
+ m_bFadeIn = false;
+ m_fAlpha = 1.f;
+ }
+ }
+
+ if (m_bFadeOut == true)
+ {
+ if (m_fAlpha >= 0.f)
+ m_fAlpha -= fTimeDelta;
+
+ if (m_fAlpha <= 0.f)
+ {
+ m_bFadeOut = false;
+ m_fAlpha = 0.f;
+ }
+ }
+
+ Update_Trail(fTimeDelta);
+
+ if (m_bClear == true)
+ {
+ SizeUp(fTimeDelta * m_fTimeMult * m_fMoveSpeed);
+ }
+
+ if (m_fSizeUp == true)
+ {
+ if (Start_Lerp(fTimeDelta * m_fTimeMult * m_fMoveSpeed) == true)
+ {
+ m_fSizeUp = false;
+ }
+ }
+
+ m_fTime += fTimeDelta * m_fTimeMult;
+ __super::Update(fTimeDelta);
+}
+
+void CSpellLearn_Overlay::Late_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ if (m_bVisible) {
+ m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
+ }
+ __super::Late_Update(fTimeDelta);
+}
+
+HRESULT CSpellLearn_Overlay::Render()
+{
+ if (FAILED(Bind_ShaderResources()))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::TYPE))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Bind_Resources()))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Render()))
+ {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+_vector CSpellLearn_Overlay::Get_WorldPostion()
+{
+ return m_pTransformCom->Get_State(STATE::POSITION);
+}
+
+HRESULT CSpellLearn_Overlay::Bind_ShaderResources()
+{
+ if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom1->Bind_ShaderResource(m_pShaderCom, "g_Texture1", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom2->Bind_ShaderResource(m_pShaderCom, "g_Texture2", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom3->Bind_ShaderResource(m_pShaderCom, "g_Texture3", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_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_fFrame", &m_fFrame, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fAngle", &m_fAngle, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_iSpellType", &m_iSpellType, sizeof(_int))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_iImageCountX", &m_iImageFrameX, sizeof(_int))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_iImageCountY", &m_iImageFrameY, sizeof(_int))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fDeltaU", &m_vUVScale.x, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fDeltaV", &m_vUVScale.y, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fCoolTime", &m_fCoolTime, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageUV", &m_vUV, sizeof(_float4))))
+ {
+ return E_FAIL;
+ }
+ return S_OK;
+}
+
+HRESULT CSpellLearn_Overlay::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_ActionItemBack_4K"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_spellmeter_Generic"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_Atlas_Spell"), reinterpret_cast(&m_pDiffuse_TextureCom2), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_tillingSmokes"), reinterpret_cast(&m_pDiffuse_TextureCom3), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
+ {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+void CSpellLearn_Overlay::Clear()
+{
+ m_vUVScale.y = 1.2f;
+ m_bClear = true;
+}
+
+void CSpellLearn_Overlay::Compute_UI(_uint SpellID)
+{
+ _float2 fImage_Size = { 1024.f, 1792.f };
+
+ _uint iCountX = 4;
+ _uint iCountY = 6;
+
+ _float iImageX = 256.f;
+ _float iImageY = 256.f;
+
+ _uint iframeX = SpellID % iCountX;
+ _uint iframeY = SpellID / iCountX;
+
+ _float2 UVStart;
+ UVStart.x = iframeX * iImageX / fImage_Size.x;
+ UVStart.y = iframeY * iImageY / fImage_Size.y;
+
+ _float2 UVEnd;
+ UVEnd.x = UVStart.x + (iImageX / fImage_Size.x);
+ UVEnd.y = UVStart.y + (iImageY / fImage_Size.y);
+
+ _float4 UV = _float4{ UVStart.x, UVStart.y, UVEnd.x, UVEnd.y };
+ m_vUV = UV;
+}
+
+void CSpellLearn_Overlay::Update_Trail(_float fTimeaDalta)
+{
+ m_vUVScale.y = CMyTools::Lerp_f1D(m_vUVScale.y, m_fTrail / m_fSpellLearn * 1.05f, fTimeaDalta * m_fMoveSpeed);
+}
+
+void CSpellLearn_Overlay::SizeUp(_float fSizeX)
+{
+ m_fSizeX += fSizeX;
+ m_fSizeY += fSizeX;
+
+ if (160.f <= m_fSizeX + fSizeX)
+ {
+ m_fSizeX = 160.f;
+ m_fSizeY = 160.f;
+ m_bClear = false;
+ m_fSizeUp = true;
+ static_cast(m_pOwner)->Function_Callback(TEXT("OverrlayClear"));
+ }
+}
+
+CSpellLearn_Overlay* CSpellLearn_Overlay::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CSpellLearn_Overlay* pInstance = new CSpellLearn_Overlay(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CSpellLearn_Overlay");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CSpellLearn_Overlay::Clone(void* pArg, CGameObject* pOwner)
+{
+ CSpellLearn_Overlay* pInstance = new CSpellLearn_Overlay(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CSpell_Overlay");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CSpellLearn_Overlay::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pDiffuse_TextureCom);
+ SAFE_RELEASE(m_pDiffuse_TextureCom1);
+ SAFE_RELEASE(m_pDiffuse_TextureCom2);
+ SAFE_RELEASE(m_pDiffuse_TextureCom3);
+ SAFE_RELEASE(m_pShaderCom);
+ SAFE_RELEASE(m_pVIBufferCom);
+}
+
+#ifdef _DEBUG
+void CSpellLearn_Overlay::Describe_Entity()
+{
+}
+#endif // _DEBUG
diff --git a/Jusin154_Team3D/Client/Private/SpellLearn_Panel.cpp b/Jusin154_Team3D/Client/Private/SpellLearn_Panel.cpp
index ff5a40be3..b01e080f1 100644
--- a/Jusin154_Team3D/Client/Private/SpellLearn_Panel.cpp
+++ b/Jusin154_Team3D/Client/Private/SpellLearn_Panel.cpp
@@ -4,7 +4,11 @@
#include "SpellLearn_Name.h"
#include "SpellLearn.h"
#include "SpellLearn_MovePointer.h"
+#include "SPellLearn_ChaserPointer.h"
#include "SpellLearn_Data.h"
+#include "SpellLearn_Booster.h"
+#include "SpellLearn_Slot.h"
+#include "SpellLearn_Overlay.h"
#include "InfoInstance.h"
CSpellLearn_Panel::CSpellLearn_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
@@ -47,11 +51,45 @@ HRESULT CSpellLearn_Panel::Initialize(void* pArg)
m_fCanvasAlpha = 1.f;
m_fSortZ = 0.05f;
m_fDelayTime = 1.f;
+ static_cast(m_pSpellLearn)->Set_Pointer(
+ static_cast(m_pSpellLearn_MovePointer),
+ static_cast(m_pSpellLearn_ChaserPointer));
+
+ for (size_t i = 0; i < m_pBooster.size(); ++i)
+ {
+ static_cast(m_pBooster[i])->Move(m_pInfoInstance->Get_SpellLearn(Index).Booster[i].m128_f32[0],
+ m_pInfoInstance->Get_SpellLearn(Index).Booster[i].m128_f32[1]);
+ }
+ for (size_t i = 0; i < m_pBooster.size(); ++i)
+ {
+ m_PointerStates.push_back(m_State);
+ m_ChaseStates.push_back(m_State);
+ }
+ static_cast(m_pSpellLearn_Overlay)->Set_SpellLearn(0);
+ static_cast(m_pSpellLearn_Slot)->Set_SpellLearn(0);
Visible(true);
ElementAllVisible(true);
return S_OK;
}
+void CSpellLearn_Panel::Set_Learn(_int Index)
+{
+ m_fTime = 0.f;
+ static_cast(m_pSpellLearn)->Change_Image(Index);
+ static_cast(m_pSpellLearn_MovePointer)->Set_SpellLearn(Index);
+ static_cast(m_pSpellLearn_ChaserPointer)->Set_SpellLearn(Index);
+ static_cast(m_pSpellLearn_Name)->Set_Name(Index);
+ static_cast(m_pSpellLearn_Overlay)->Set_SpellLearn(Index);
+ static_cast(m_pSpellLearn_Slot)->Set_SpellLearn(Index);
+ for (size_t i = 0; i < m_pBooster.size(); ++i)
+ {
+ static_cast(m_pBooster[i])->Move(
+ m_pInfoInstance->Get_SpellLearn(Index).Booster[i].m128_f32[0],
+ m_pInfoInstance->Get_SpellLearn(Index).Booster[i].m128_f32[1]);
+ static_cast(m_pBooster[i])->Reset();
+ }
+}
+
void CSpellLearn_Panel::Priority_Update(_float fTimeDelta)
{
if (!__super::Chack_Visible())
@@ -78,11 +116,90 @@ void CSpellLearn_Panel::Update(_float fTimeDelta)
{
Index++;
}
- static_cast(m_pSpellLearn)->Change_Image(Index);
- static_cast(m_pSpellLearn_MovePointer)->Set_SpellLearn(Index);
- static_cast(m_pSpellLearn_Name)->Set_Name(Index);
+ Set_Learn(Index);
}
+ if (static_cast(m_pSpellLearn_MovePointer)->Get_MoveStart() == true)
+ {
+ m_fTime += fTimeDelta;
+
+ for (size_t i = 0; i < m_pBooster.size(); ++i)
+ {
+ m_PointerStates[i].bPerHit = m_PointerStates[i].bHit;
+
+ _bool bPointer = Chack_Element(static_cast(m_pBooster[i])->Get_Position(),
+ static_cast(m_pSpellLearn_MovePointer)->Get_Position(),
+ static_cast(m_pSpellLearn_MovePointer)->Get_Current_Size().x,
+ static_cast(m_pSpellLearn_MovePointer)->Get_Current_Size().x);
+
+ m_PointerStates[i].bHit = bPointer;
+
+ if (m_PointerStates[i].bHit == true && m_PointerStates[i].bPerHit == false)
+ {
+ m_Booster.iBoosterIndex = _int(i);
+ m_Booster.bBoosterOn = true;
+ Function_Callback(TEXT("Booster"), &m_Booster);
+ }
+
+ if (m_PointerStates[i].bHit == false && m_PointerStates[i].bPerHit == true)
+ {
+ m_Booster.iBoosterIndex = _int(i);
+ m_Booster.bBoosterOn = false;
+ Function_Callback(TEXT("Booster"), &m_Booster);
+ }
+ }
+
+ for (size_t i = 0; i < m_pBooster.size(); ++i)
+ {
+ m_ChaseStates[i].bPerHit = m_ChaseStates[i].bHit;
+
+ _bool bPointer = Chack_Element(static_cast(m_pBooster[i])->Get_Position(),
+ static_cast(m_pSpellLearn_ChaserPointer)->Get_Position(),
+ static_cast(m_pSpellLearn_ChaserPointer)->Get_Current_Size().x,
+ static_cast(m_pSpellLearn_ChaserPointer)->Get_Current_Size().x);
+
+ m_ChaseStates[i].bHit = bPointer;
+
+ if (m_ChaseStates[i].bHit == true && m_ChaseStates[i].bPerHit == false)
+ {
+ m_Booster.iBoosterIndex = _int(i);
+ m_Booster.bBoosterOn = true;
+ Function_Callback(TEXT("BoosterOff"), &m_Booster);
+ }
+
+ static_cast(m_pSpellLearn_Overlay)->Set_Count(
+ static_cast(m_pSpellLearn_MovePointer)->Get_SpellTrail());
+
+ }
+
+ if (m_fTime >= 1.f)
+ {
+ static_cast(m_pSpellLearn_ChaserPointer)->Set_FadeIn();
+ }
+
+ if (m_fTime >= 2.f)
+ {
+ static_cast(m_pSpellLearn_ChaserPointer)->Set_Move();
+
+ if (_bool bPointer = Chack_Element(static_cast(m_pSpellLearn_MovePointer)->Get_Position(),
+ static_cast(m_pSpellLearn_ChaserPointer)->Get_Position(),
+ static_cast(m_pSpellLearn_MovePointer)->Get_Current_Size().x,
+ static_cast(m_pSpellLearn_ChaserPointer)->Get_Current_Size().x) == true)
+ {
+ Set_Learn(Index);
+
+ m_Booster.iBoosterIndex = _int(-1);
+ m_Booster.bBoosterOn = false;
+ Function_Callback(TEXT("Booster"), &m_Booster);
+ for (size_t i = 0; i < m_PointerStates.size(); ++i)
+ {
+ m_PointerStates[i].bPerHit = false;
+ m_PointerStates[i].bHit = false;
+ }
+ }
+
+ }
+ }
__super::Update(fTimeDelta);
}
@@ -204,6 +321,36 @@ HRESULT CSpellLearn_Panel::Ready_Element(void* pArg)
}
Add_Element(TEXT("SpellLearn_MovePointer"), m_pSpellLearn_MovePointer);
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_ChaserPointer))))
+ {
+ return E_FAIL;
+ }
+ Add_Element(TEXT("SPellLeam_ChaserPointer"), m_pSpellLearn_ChaserPointer);
+
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_Slot))))
+ {
+ return E_FAIL;
+ }
+ Add_Element(TEXT("SpellLearn_Slot"), m_pSpellLearn_Slot);
+
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_Overlay))))
+ {
+ return E_FAIL;
+ }
+ Add_Element(TEXT("SpellLearn_Overlay"), m_pSpellLearn_Overlay);
+
+ for (_int i = 0; i < 3; ++i)
+ {
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_Booster))))
+ {
+ return E_FAIL;
+ }
+
+ static_cast(m_pSpellLearn_Booster)->Set_Index(i);
+
+ m_pBooster.push_back(m_pSpellLearn_Booster);
+ }
+
return S_OK;
}
diff --git a/Jusin154_Team3D/Client/Private/SpellLearn_Slot.cpp b/Jusin154_Team3D/Client/Private/SpellLearn_Slot.cpp
new file mode 100644
index 000000000..5fcebb92a
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/SpellLearn_Slot.cpp
@@ -0,0 +1,287 @@
+#include "pch.h"
+#include "SpellLearn_Slot.h"
+#include "GameInstance.h"
+#include "InfoInstance.h"
+
+CSpellLearn_Slot::CSpellLearn_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ :CElementObject(pDevice, pContext)
+{
+}
+
+CSpellLearn_Slot::CSpellLearn_Slot(const CSpellLearn_Slot& rhs)
+ :CElementObject(rhs),
+ m_pInfoInstance(CInfoInstance::GetInstance())
+{
+}
+
+HRESULT CSpellLearn_Slot::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CSpellLearn_Slot::Initialize(void* pArg)
+{
+ CUIObject::UIOBJECT_DESC Desc{};
+
+ Desc.fX = 380.f;
+ Desc.fY = -30.f;
+ Desc.fSizeX = 105.f;
+ Desc.fSizeY = 105.f;
+
+ m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
+
+ if (FAILED(__super::Initialize(&Desc)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Ready_Components(pArg)))
+ {
+ return E_FAIL;
+ }
+
+ m_fTimeMult = 3.f;
+ m_fAngle = XMConvertToRadians(135.f);
+ m_fAlpha = 1.f;
+ m_fAlphaTime = 1.f;
+ m_fMoveSpeed = 10.f;
+ m_fLerpX = 600.f;
+ m_fLerpY = 100.f;
+ static_cast(m_pOwner)->Add_Function(TEXT("LearnClear"), [this](void* p) {this->Clear(); });
+ return S_OK;
+}
+
+void CSpellLearn_Slot::Priority_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ __super::Priority_Update(fTimeDelta);
+}
+
+void CSpellLearn_Slot::Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+
+ if (m_bFadeIn == true)
+ {
+ if (m_fAlpha <= 1.f)
+ m_fAlpha += fTimeDelta * m_fAlphaTime;
+
+ if (m_fAlpha >= 1.f)
+ {
+ m_bFadeIn = false;
+ m_fAlpha = 1.f;
+ }
+ }
+
+ if (m_bFadeOut == true)
+ {
+ if (m_fAlpha >= 0.f)
+ m_fAlpha -= fTimeDelta;
+
+ if (m_fAlpha <= 0.f)
+ {
+ m_bFadeOut = false;
+ m_fAlpha = 0.f;
+ }
+ }
+
+ if (m_bClear == true)
+ {
+ SizeUp(fTimeDelta * m_fTimeMult * m_fMoveSpeed);
+ }
+
+ if (m_fSizeUp == true)
+ {
+ if (Start_Lerp(fTimeDelta * m_fTimeMult * m_fMoveSpeed) == true)
+ {
+ m_fSizeUp = false;
+ }
+ }
+
+ m_fTime += fTimeDelta * m_fTimeMult;
+ __super::Update(fTimeDelta);
+}
+
+void CSpellLearn_Slot::Late_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ if (m_bVisible) {
+ m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
+ }
+ __super::Late_Update(fTimeDelta);
+}
+
+HRESULT CSpellLearn_Slot::Render()
+{
+ if (FAILED(Bind_ShaderResources()))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::SLOT))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Bind_Resources()))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Render()))
+ {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+_vector CSpellLearn_Slot::Get_WorldPostion()
+{
+ return m_pTransformCom->Get_State(STATE::POSITION);
+}
+
+HRESULT CSpellLearn_Slot::Bind_ShaderResources()
+{
+ if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fAngle", &m_fAngle, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_iSpellType", &m_iSpellType, sizeof(_int))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fAngle", &m_fAngle, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ return S_OK;
+}
+
+HRESULT CSpellLearn_Slot::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_ActionItemGoldleaf_4K"), 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 CSpellLearn_Slot::Set_SpellLearn(_int Index)
+{
+ MoveX(m_pInfoInstance->Get_SpellLearn(Index).fEndPosition.x);
+ MoveY(m_pInfoInstance->Get_SpellLearn(Index).fEndPosition.y);
+ SizeUpdate(m_fOrigin_Size.x, m_fOrigin_Size.y);
+ m_fSizeUp = false;
+ m_bClear = false;
+}
+
+void CSpellLearn_Slot::Clear()
+{
+ m_bClear = true;
+}
+
+void CSpellLearn_Slot::SizeUp(_float fSizeX)
+{
+ m_fSizeX += fSizeX;
+ m_fSizeY += fSizeX;
+
+ if (160.f <= m_fSizeX + fSizeX)
+ {
+ m_fSizeX = 160.f;
+ m_fSizeY = 160.f;
+ m_bClear = false;
+ m_fSizeUp = true;
+ }
+}
+
+CSpellLearn_Slot* CSpellLearn_Slot::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CSpellLearn_Slot* pInstance = new CSpellLearn_Slot(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CSpellLearn_Slot");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CSpellLearn_Slot::Clone(void* pArg, CGameObject* pOwner)
+{
+ CSpellLearn_Slot* pInstance = new CSpellLearn_Slot(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CSpellLearn_Slot");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CSpellLearn_Slot::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pDiffuse_TextureCom);
+ SAFE_RELEASE(m_pShaderCom);
+ SAFE_RELEASE(m_pVIBufferCom);
+}
+
+#ifdef _DEBUG
+void CSpellLearn_Slot::Describe_Entity()
+{
+}
+#endif // _DEBUG
diff --git a/Jusin154_Team3D/Client/Public/Client_Enum.h b/Jusin154_Team3D/Client/Public/Client_Enum.h
index 200110b3e..2428c25c1 100644
--- a/Jusin154_Team3D/Client/Public/Client_Enum.h
+++ b/Jusin154_Team3D/Client/Public/Client_Enum.h
@@ -19,8 +19,8 @@ namespace Client
REVELIO, POTION, MAGIC_ITEM, SPELL_PREVIEW, SPELL_HEADER,
SPELL_HEADER_LINE, SPELL_DRAG, CAMERA_LOCKON, LODING_SCREEN,
ENEMY_HPBAR, BOSS_HPBAR, QUEST_BORDER, QUEST_INFO, QUEST_STATUS, BROOMSTICK,
- SPELL_LEARN,
- ENEMY_DETECTION, INTERACTION_OBJECT, END };
+ SPELL_LEARN, SPELLLEARNCOLOR, SPELLLEARNBOOSTER,
+ ENEMY_DETECTION, INTERACTION_OBJECT, END};
enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, UVALPHABLEND, MAGIC_METER, SPELL_LIST, EESSENTIAL_SPELL_SOLT, EESSENTIAL_SPELL, COLOR, SPELL_HOVER, SPELL_SLOT_EFFECT, SPELL_SLOT, SPELL_LOCK, QUEST_SLOT, END };
enum class SHADER_PASS_NPC_PBR_ANIM {
diff --git a/Jusin154_Team3D/Client/Public/Client_Struct.h b/Jusin154_Team3D/Client/Public/Client_Struct.h
index 8a11e9859..d3986ed7d 100644
--- a/Jusin154_Team3D/Client/Public/Client_Struct.h
+++ b/Jusin154_Team3D/Client/Public/Client_Struct.h
@@ -94,10 +94,14 @@ namespace Client
typedef struct tagSpellLearnInfo
{
- _wstring pSpellName{};
- _wstring pImageName{};
- _float fSpellSize{};
- _float2 fStartPosition{};
+ _wstring pSpellName{};
+ _wstring pImageName{};
+ _int iSpellID{};
+ _int iSpellType{};
+ _float fSpellSize{};
+ _float2 fStartPosition{};
+ _float2 fEndPosition{};
+ vector<_vector> Booster;
vector<_vector> Lines;
}SPELLLEARNINFO;
diff --git a/Jusin154_Team3D/Client/Public/SpellLearn.h b/Jusin154_Team3D/Client/Public/SpellLearn.h
index 2e8e8f361..9f05f27b6 100644
--- a/Jusin154_Team3D/Client/Public/SpellLearn.h
+++ b/Jusin154_Team3D/Client/Public/SpellLearn.h
@@ -33,6 +33,10 @@ class CSpellLearn final : public CElementObject
public:
HRESULT Change_Image(_int SpellID);
+ void Set_Pointer(class CSpellLearn_MovePointer* Pointer, class CSpellLearn_ChaserPointer* Chase);
+
+private:
+ void Clear();
private:
CInfoInstance* m_pInfoInstance = { nullptr };
@@ -42,6 +46,25 @@ class CSpellLearn final : public CElementObject
CShader* m_pShaderCom = { nullptr };
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
+ class CSpellLearn_MovePointer* m_pPointer = { nullptr };
+ class CSpellLearn_ChaserPointer* m_pChasePointer = { nullptr };
+
+ _float2 m_vPointerPosition{};
+ _float3 m_vPointerScale{};
+
+ _float2 m_vChasePosition{};
+ _float3 m_vChaseScale{};
+
+ _bool m_bReset{};
+
+ _int m_iIndex{};
+ _int m_iTrailIndex{};
+ vector<_float2> m_Trail;
+
+ _int m_iChaseiTrailIndex{};
+ vector<_float2> m_ChaseTrail;
+ vector<_vector> m_MoveLine;
+
public:
static CSpellLearn* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
diff --git a/Jusin154_Team3D/Client/Public/SpellLearn_Booster.h b/Jusin154_Team3D/Client/Public/SpellLearn_Booster.h
new file mode 100644
index 000000000..14d8dcabc
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/SpellLearn_Booster.h
@@ -0,0 +1,72 @@
+#pragma once
+
+#include "Client_Define.h"
+#include "ElementObject.h"
+
+NS_BEGIN(Engine)
+class CTexture;
+class CShader;
+class CVIBuffer_Rect;
+NS_END
+
+NS_BEGIN(Client)
+
+class CSpellLearn_Booster final : public CElementObject
+{
+private:
+ struct Booster
+ {
+ _bool bBoosterOn = { false };
+ _int iBoosterIndex{};
+ };
+private:
+ CSpellLearn_Booster(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CSpellLearn_Booster(const CSpellLearn_Booster& rhs);
+ virtual ~CSpellLearn_Booster() = 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 BoosterOn(void* pArg);
+ void BoosterOff(void* pArg);
+
+ void Set_Index(_int iIndex);
+ void Reset();
+
+private:
+ void Clear();
+
+private:
+ CInfoInstance* m_pInfoInstance = { nullptr };
+ CTexture* m_pDiffuse_TextureCom = { nullptr };
+ CTexture* m_pDiffuse_TextureCom1 = { nullptr };
+ CTexture* m_pDiffuse_TextureCom2 = { nullptr };
+ CTexture* m_pDiffuse_TextureCom3 = { nullptr };
+ CShader* m_pShaderCom = { nullptr };
+ CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
+
+ _bool m_bBoosterOn = { false };
+ _bool m_bBoosterOff = { false };
+ _float4 m_fImagePosi{};
+ _int m_iIndex{};
+public:
+ static CSpellLearn_Booster* 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/SpellLearn_ChaserPointer.h b/Jusin154_Team3D/Client/Public/SpellLearn_ChaserPointer.h
new file mode 100644
index 000000000..985b4bb2d
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/SpellLearn_ChaserPointer.h
@@ -0,0 +1,65 @@
+#pragma once
+
+#include "Client_Define.h"
+#include "ElementObject.h"
+
+NS_BEGIN(Engine)
+class CTexture;
+class CShader;
+class CVIBuffer_Rect;
+NS_END
+
+NS_BEGIN(Client)
+
+class CSpellLearn_ChaserPointer final : public CElementObject
+{
+private:
+ CSpellLearn_ChaserPointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CSpellLearn_ChaserPointer(const CSpellLearn_ChaserPointer& rhs);
+ virtual ~CSpellLearn_ChaserPointer() = 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_SpellLearn(_int Index);
+ void Set_Move();
+private:
+ void Line(_float fTime);
+ void SpeedUp();
+ void Clear();
+
+private:
+ CInfoInstance* m_pInfoInstance = { nullptr };
+ CTexture* m_pDiffuse_TextureCom = { nullptr };
+ CShader* m_pShaderCom = { nullptr };
+ CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
+
+
+ _bool m_bMoveStart = { false };
+
+ _int m_iLineIndex{};
+ _int m_iCurrentLine{};
+ vector<_vector> m_MoveLine;
+
+public:
+ static CSpellLearn_ChaserPointer* 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/SpellLearn_LookPointer.h b/Jusin154_Team3D/Client/Public/SpellLearn_LookPointer.h
new file mode 100644
index 000000000..34d128575
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/SpellLearn_LookPointer.h
@@ -0,0 +1,59 @@
+#pragma once
+
+#include "Client_Define.h"
+#include "ElementObject.h"
+
+NS_BEGIN(Engine)
+class CTexture;
+class CShader;
+class CVIBuffer_Rect;
+NS_END
+
+NS_BEGIN(Client)
+
+class CSpellLearn_LookPointer final : public CElementObject
+{
+private:
+ CSpellLearn_LookPointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CSpellLearn_LookPointer(const CSpellLearn_LookPointer& rhs);
+ virtual ~CSpellLearn_LookPointer() = 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_SpellLearn(_int Index);
+
+private:
+ CTexture* m_pDiffuse_TextureCom = { nullptr };
+ CShader* m_pShaderCom = { nullptr };
+ CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
+
+
+ _bool m_bMoveStart = { false };
+
+ _int m_iLineIndex{};
+ _int m_iCurrentLine{};
+ vector<_vector> m_MoveLine;
+ _float m_localX{};
+ _float m_localY{};
+public:
+ static CSpellLearn_LookPointer* 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/SpellLearn_MovePointer.h b/Jusin154_Team3D/Client/Public/SpellLearn_MovePointer.h
index a467bb9b9..b1ed7965d 100644
--- a/Jusin154_Team3D/Client/Public/SpellLearn_MovePointer.h
+++ b/Jusin154_Team3D/Client/Public/SpellLearn_MovePointer.h
@@ -13,6 +13,12 @@ NS_BEGIN(Client)
class CSpellLearn_MovePointer final : public CElementObject
{
+private:
+ struct Booster
+ {
+ _bool bBoosterOn = { false };
+ _int iBoosterIndex{};
+ };
private:
CSpellLearn_MovePointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
CSpellLearn_MovePointer(const CSpellLearn_MovePointer& rhs);
@@ -33,8 +39,12 @@ class CSpellLearn_MovePointer final : public CElementObject
public:
void Set_SpellLearn(_int Index);
+ _int Get_SpellTrail();
+ _bool Get_MoveStart();
private:
- void Line(_float fTime);
+ void Line(_float fTime, _float2 fMouse);
+
+ void Set_Booster(void* pArg);
private:
@@ -43,11 +53,17 @@ class CSpellLearn_MovePointer final : public CElementObject
CShader* m_pShaderCom = { nullptr };
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
+ class SpellLearm_LookPointer* m_pSpellLeam_LookPointer = { nullptr };
+
_bool m_bMoveStart = { false };
+ _bool m_bBooster = { false };
+
+ Booster m_Booster;
_int m_iLineIndex{};
_int m_iCurrentLine{};
vector<_vector> m_MoveLine;
+ vector<_vector> m_Boosters;
public:
static CSpellLearn_MovePointer* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
diff --git a/Jusin154_Team3D/Client/Public/SpellLearn_Overlay.h b/Jusin154_Team3D/Client/Public/SpellLearn_Overlay.h
new file mode 100644
index 000000000..578c725b7
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/SpellLearn_Overlay.h
@@ -0,0 +1,72 @@
+#pragma once
+
+#include "Client_Define.h"
+#include "ElementObject.h"
+
+NS_BEGIN(Engine)
+class CTexture;
+class CShader;
+class CVIBuffer_Rect;
+NS_END
+
+NS_BEGIN(Client)
+
+class CSpellLearn_Overlay final : public CElementObject
+{
+private:
+ CSpellLearn_Overlay(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CSpellLearn_Overlay(const CSpellLearn_Overlay& rhs);
+ virtual ~CSpellLearn_Overlay() = 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_SpellLearn(_int Index);
+ void Set_Count(_int Index);
+
+private:
+ void Clear();
+ void Compute_UI(_uint SpellID);
+ void Update_Trail(_float fTimeaDalta);
+ void SizeUp(_float fSizeX);
+private:
+ CInfoInstance* m_pInfoInstance = { nullptr };
+ CTexture* m_pDiffuse_TextureCom = { nullptr };
+ CTexture* m_pDiffuse_TextureCom1 = { nullptr };
+ CTexture* m_pDiffuse_TextureCom2 = { nullptr };
+ CTexture* m_pDiffuse_TextureCom3 = { nullptr };
+ CShader* m_pShaderCom = { nullptr };
+ CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
+
+ _int m_iImageFrameX{};
+ _int m_iImageFrameY{};
+ _float m_fFrame{};
+ _float4 m_vUV{};
+
+ _float m_fSpellLearn{};
+ _float m_fTrail{};
+ _float m_fTargetTrail{};
+ _bool m_bClear = { false };
+ _bool m_fSizeUp = { false };
+public:
+ static CSpellLearn_Overlay* 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/SpellLearn_Panel.h b/Jusin154_Team3D/Client/Public/SpellLearn_Panel.h
index 4d6a891bf..79535e13b 100644
--- a/Jusin154_Team3D/Client/Public/SpellLearn_Panel.h
+++ b/Jusin154_Team3D/Client/Public/SpellLearn_Panel.h
@@ -13,7 +13,17 @@ NS_BEGIN(Client)
class CSpellLearn_Panel final : public CPanelObject
{
-
+private:
+ struct Booster
+ {
+ _bool bBoosterOn = { false };
+ _int iBoosterIndex{};
+ };
+ struct State
+ {
+ _bool bHit = { false };
+ _bool bPerHit = { false };
+ };
private:
CSpellLearn_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
CSpellLearn_Panel(const CSpellLearn_Panel& rhs);
@@ -33,6 +43,9 @@ class CSpellLearn_Panel final : public CPanelObject
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
+public:
+ void Set_Learn(_int Index);
+
private:
CTexture* m_pDiffuse_TextureCom = { nullptr };
CTexture* m_pDiffuse_TextureCom1 = { nullptr };
@@ -46,10 +59,18 @@ class CSpellLearn_Panel final : public CPanelObject
CGameObject* m_pSpellLearn_Name = { nullptr };
CGameObject* m_pSpellLearn = { nullptr };
CGameObject* m_pSpellLearn_MovePointer = { nullptr };
+ CGameObject* m_pSpellLearn_ChaserPointer = { nullptr };
CGameObject* m_pSpellLearn_Data = { nullptr };
+ CGameObject* m_pSpellLearn_Booster = { nullptr };
+ CGameObject* m_pSpellLearn_Slot = { nullptr };
+ CGameObject* m_pSpellLearn_Overlay = { nullptr };
_int Index{};
-
+ vector m_pBooster;
+ Booster m_Booster;
+ State m_State;
+ vector m_PointerStates;
+ vector m_ChaseStates;
public:
static CSpellLearn_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
diff --git a/Jusin154_Team3D/Client/Public/SpellLearn_Slot.h b/Jusin154_Team3D/Client/Public/SpellLearn_Slot.h
new file mode 100644
index 000000000..e9a1e3e56
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/SpellLearn_Slot.h
@@ -0,0 +1,58 @@
+#pragma once
+
+#include "Client_Define.h"
+#include "ElementObject.h"
+
+NS_BEGIN(Engine)
+class CTexture;
+class CShader;
+class CVIBuffer_Rect;
+NS_END
+
+NS_BEGIN(Client)
+
+class CSpellLearn_Slot final : public CElementObject
+{
+private:
+ CSpellLearn_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CSpellLearn_Slot(const CSpellLearn_Slot& rhs);
+ virtual ~CSpellLearn_Slot() = default;
+
+public:
+ virtual void Priority_Update(_float fTimeDelta);
+ virtual void Update(_float fTimeDelta);
+ virtual void Late_Update(_float fTimeDelta);
+ virtual HRESULT Render() override;
+ virtual _vector Get_WorldPostion() override;
+
+
+private:
+ virtual HRESULT Bind_ShaderResources() override;
+ virtual HRESULT Ready_Components(void* pArg) override;
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+
+public:
+ void Set_SpellLearn(_int Index);
+ void Clear();
+
+private:
+ void SizeUp(_float fSizeX);
+private:
+ CInfoInstance* m_pInfoInstance = { nullptr };
+ CTexture* m_pDiffuse_TextureCom = { nullptr };
+ CShader* m_pShaderCom = { nullptr };
+ CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
+
+ _bool m_bClear = { false };
+ _bool m_fSizeUp = { false };
+public:
+ static CSpellLearn_Slot* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
+ virtual void Free() override;
+#ifdef _DEBUG
+ void Describe_Entity() override;
+#endif // _DEBUG
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/UI/SpellLearn.xml b/Jusin154_Team3D/Editor/Bin/Resources/Data/UI/SpellLearn.xml
index a5a168e36..920bb4764 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/UI/SpellLearn.xml
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/UI/SpellLearn.xml
@@ -1,28 +1,256 @@
-
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
@@ -87,9 +315,60 @@
-
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -158,7 +437,58 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -244,10 +574,58 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_NPC_PBR_Anim.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_NPC_PBR_Anim.hlsl
index a66366e2e..4a1c9a8a7 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_NPC_PBR_Anim.hlsl
+++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_NPC_PBR_Anim.hlsl
@@ -316,9 +316,9 @@ PS_OUT_OUTLINE PS_MAIN_OUTLINE_READ(PS_IN In)
Out.vOutLine = float4(g_vOutLineColor.rgb, fRim);
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
- Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
- (In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
- (float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
+ Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
+ (In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
+ (float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
1.f);
Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
@@ -354,9 +354,9 @@ PS_OUT PS_EYELASH_DAOTHV_ToSRO(PS_IN In)
Out.vAlbedo = float4(fDiffuseMask, fDiffuseMask, fDiffuseMask, AlphaMask);
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
- Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
- (In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
- (float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
+ Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
+ (In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
+ (float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(lerp(0.7f, 0.3f, SpecMask), SpecMask * 0.5f, AoMask_Dao * AoMask_Thv, 0.f);
@@ -383,9 +383,9 @@ PS_OUT PS_TEETH_SRXO_ToSRO(PS_IN In)
Out.vAlbedo = vDiffuse;
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
- Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
- (In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
- (float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
+ Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
+ (In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
+ (float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(vSRXO_MASK.r, vSRXO_MASK.g, vSRXO_MASK.a, 0.f);
@@ -410,9 +410,9 @@ PS_OUT PS_EYE_DN_SRO(PS_IN In)
Out.vAlbedo = vDiffuse;
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
- Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
- (In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
- (float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
+ Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
+ (In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
+ (float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(0.5f, 0.5f, 1.f, 0.f);
@@ -459,9 +459,9 @@ PS_OUT PS_FACIAL_HAIR_DAOTHV_ToSRO(PS_IN In)
Out.vAlbedo = float4(fDiffuseMask, fDiffuseMask, fDiffuseMask, AlphaMask);
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
- Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
- (In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
- (float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
+ Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
+ (In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
+ (float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(lerp(0.7f, 0.3f, SpecMask), SpecMask * 0.5f, AoMask_Dao * AoMask_Thv, 0.f);
@@ -501,9 +501,9 @@ PS_OUT PS_HEAD_HAIR_DAOTHV_ToSRO(PS_IN In)
Out.vAlbedo = float4(fDiffuseMask, fDiffuseMask, fDiffuseMask, AlphaMask);
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
- Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
- (In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
- (float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
+ Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
+ (In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
+ (float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(lerp(0.7f, 0.3f, SpecMask), SpecMask * 0.5f, AoMask_Dao * AoMask_Thv, 0.f);
@@ -529,9 +529,9 @@ PS_OUT PS_HEADwtHAND_DSRXON_ToSRO(PS_IN In)
Out.vAlbedo = vDiffuse;
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
- Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
- (In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
- (float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
+ Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
+ (In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
+ (float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(vSRXO_Mask.r, vSRXO_Mask.g, vSRXO_Mask.a, 0.f);
@@ -557,9 +557,9 @@ PS_OUT PS_LOWER_DSRON_ToSRO(PS_IN In)
Out.vAlbedo = vDiffuse;
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
- Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
- (In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
- (float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
+ Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
+ (In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
+ (float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(vSRO_Mask.r, vSRO_Mask.g, vSRO_Mask.b, 0.f);
@@ -585,9 +585,9 @@ PS_OUT PS_UPPER_DMRON_ToMRO(PS_IN In)
Out.vAlbedo = vDiffuse;
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
- Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
- (In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
- (float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
+ Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
+ (In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
+ (float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(vMRO_Mask.r, vMRO_Mask.g, vMRO_Mask.b, 0.f);
@@ -613,9 +613,9 @@ PS_OUT PS_GLASSES_DMRON_ToMRO(PS_IN In)
Out.vAlbedo = vDiffuse;
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
- Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
- (In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
- (float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
+ Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
+ (In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
+ (float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(vMRO_Mask.r, vMRO_Mask.g, vMRO_Mask.b, 0.f);
@@ -642,9 +642,9 @@ PS_OUT PS_EmissiveMetalness_DENMRO_ToMRO(PS_IN In)
Out.vAlbedo = vDiffuse;
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
- Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
- (In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
- (float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
+ Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
+ (In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
+ (float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(vMRO_Mask.r, vMRO_Mask.g, vMRO_Mask.b, 0.f);
@@ -671,9 +671,9 @@ PS_OUT PS_DNMRO_ToMRO(PS_IN In)
Out.vAlbedo = vDiffuse;
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
- Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
- (In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
- (float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
+ Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
+ (In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
+ (float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(vMRO_Mask.r, vMRO_Mask.g, vMRO_Mask.b, 0.f);
@@ -700,9 +700,9 @@ PS_OUT PS_MI_ClothSim_DSEN_ToSRO(PS_IN In)
Out.vAlbedo = vDiffuse;
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
- Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
- (In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
- (float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
+ Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
+ (In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
+ (float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(vSpecular_Mask.r, 0.5f, 1.f, 0.f);
@@ -735,9 +735,9 @@ PS_OUT PS_MI_DANSROMRO_ToSRO(PS_IN In)
Out.vAlbedo = vDiffuse;
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
- Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
- (In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
- (float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
+ Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
+ (In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
+ (float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(vSRO_Mask.r, Roughness, Occlusion, 0.f);
@@ -771,9 +771,9 @@ PS_OUT PS_Troll_Club_DAENMROSRXO_ToMROX(PS_IN In)
Out.vAlbedo = vDiffuse;
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
- Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
- (In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
- (float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
+ Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
+ (In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
+ (float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(vMRO_MASK.r, Roughness, Occlusion, vSRXO_Mask.b);
@@ -802,7 +802,7 @@ PS_OUT_BLEND PS_Dragon_EtherealEyes(PS_IN In)
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, uv);
float fOppacity = g_NormalBlendTexture.Sample(DefaultSampler, uv).a;
float4 vBaseColor = g_DiffuseBlend.Sample(DefaultSampler, uv);
- //TODO 눈알 더 해야함
+ //TODO ?덉븣 ???댁빞??
Out.vAlbedo = lerp(vDiffuse, vBaseColor, fOppacity);
return Out;
}
@@ -842,9 +842,9 @@ PS_OUT PS_Dragon_Body(PS_IN In)
Out.vAlbedo = vDiffuse;
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
- Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
- (In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
- (float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
+ Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
+ (In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
+ (float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(vMRO, 0.f);
@@ -875,9 +875,9 @@ PS_OUT PS_Dragon_Wings(PS_IN In)
Out.vAlbedo = vDiffuse;
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
- Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
- (In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
- (float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
+ Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
+ (In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
+ (float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(vMRO, 0.f);
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl
index 3ac1e5d5d..5c51ddefb 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl
+++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl
@@ -64,13 +64,21 @@ Texture2D g_DiffuseTexture;
Texture2D g_MaskingTexture;
int g_iHover;
+int g_iBoosterOn;
+int g_iBoosterOff;
int g_iClick;
int g_iColor;
+int g_Count;
+int g_ChaseCount;
int g_iStep1 = 0;
int g_iStep2 = 0;
int g_iStep3 = 0;
+float2 g_Trail[200];
+float2 g_ChaseTrail[200];
+
+
struct VS_IN
{
float3 vPosition : POSITION;
@@ -1795,32 +1803,105 @@ PS_OUT PS_SpellLearnColor(PS_IN In)
Color = tex;
Color.rgb *= tex1.rgb;
-
- float2 rectPos = g_fPosition;
+
+ float2 rectPos = g_fPosition - float2(256.f, 259.f);
float2 rectSize = g_fCurrent_Size;
float2 itemPos = g_fItemPosition1;
float2 itemSize = g_fItemImageSizes1;
- float x0 = max(rectPos.x, itemPos.x);
- float x1 = min(rectPos.x + rectSize.x, itemPos.x + itemSize.x);
- float y0 = max(rectPos.y, itemPos.y);
- float y1 = min(rectPos.y + rectSize.y, itemPos.y + itemSize.y);
+ float2 pixelPos;
+ pixelPos.x = rectPos.x + In.vTexcoord.x * rectSize.x;
+ pixelPos.y = rectPos.y + (1.0f - In.vTexcoord.y) * rectSize.y;
- float uMin = (x0 - rectPos.x) / rectSize.x;
- float uMax = (x1 - rectPos.x) / rectSize.x;
- float vMin = (y0 - rectPos.y) / rectSize.y;
- float vMax = (y1 - rectPos.y) / rectSize.y;
-
- vMin = 1.0f - vMin;
- vMax = 1.0f - vMax;
-
- if (In.vTexcoord.x >= min(uMin, uMax) && In.vTexcoord.x <= max(uMin, uMax) &&
- In.vTexcoord.y >= min(vMin, vMax) && In.vTexcoord.y <= max(vMin, vMax))
+ if (pixelPos.x >= itemPos.x &&
+ pixelPos.x <= itemPos.x + itemSize.x &&
+ pixelPos.y >= itemPos.y &&
+ pixelPos.y <= itemPos.y + itemSize.y)
{
Color.rgb = float3(0.f, 0.f, 1.f);
}
+
+ for (int i = 0; i < g_Count; ++i)
+ {
+ float2 trailTopLeft = g_Trail[i];
+ float2 trailCenter = trailTopLeft + itemSize / 2.0f;
+
+ float halfWidth = itemSize.x / 2.0f + 6.f;
+ float halfHeight = itemSize.y / 2.0f + 6.f;
+
+ if (pixelPos.x >= trailCenter.x - halfWidth &&
+ pixelPos.x <= trailCenter.x + halfWidth &&
+ pixelPos.y >= trailCenter.y - halfHeight &&
+ pixelPos.y <= trailCenter.y + halfHeight)
+ {
+ Color.rgb = float3(20.f, 100.f, 180.f) / 255.f;
+ break;
+ }
+ }
+ for (int j = 0; j < g_ChaseCount; ++j)
+ {
+ float2 ChaseTopLeft = g_ChaseTrail[j];
+ float2 ChaseCenter = ChaseTopLeft + itemSize / 2.0f;
+
+ float halfWidth = itemSize.x * 0.7f;
+ float halfHeight = itemSize.y * 0.7f;
+
+ if (pixelPos.x >= ChaseCenter.x - halfWidth &&
+ pixelPos.x <= ChaseCenter.x + halfWidth &&
+ pixelPos.y >= ChaseCenter.y - halfHeight &&
+ pixelPos.y <= ChaseCenter.y + halfHeight)
+ {
+ Color.rgb = float3(110.f, 5.f, 5.f) / 255.f;
+ break;
+ }
+ }
+
+ Color.a *= Alpha;
+ Out.vColor = Color;
+ return Out;
+}
+
+PS_OUT PS_SpellLearnBooster(PS_IN In)
+{
+ PS_OUT Out;
+ float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
+
+ float4 Color = float4(1.f, 1.f, 1.f, 1.f);
+ float4 tex = g_Texture.Sample(DefaultSampler, In.vTexcoord);
+
+ Color = tex;
+
+ float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size;
+ float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size;
+ float2 Imagelocal = (In.vTexcoord - Imagetexpos1) / Imagetexsize1;
+ bool inside1 = all(Imagelocal >= 0.0f && Imagelocal <= 1.0f);
+
+ if (g_iBoosterOn == 0 && g_iBoosterOff == 0)
+ {
+ if (inside1)
+ {
+ float4 tex1 = g_Texture1.Sample(DefaultSampler, Imagelocal);
+ Color = lerp(Color, tex1, tex1.a);
+ }
+ }
+ else if (g_iBoosterOn != 0 && g_iBoosterOff == 0)
+ {
+
+ float4 tex3 = g_Texture3.Sample(DefaultSampler, In.vTexcoord);
+ Color = lerp(Color, tex3, tex3.a);
+ }
+ else if (g_iBoosterOn == 0 && g_iBoosterOff != 0)
+ {
+ float4 tex2 = g_Texture2.Sample(DefaultSampler, In.vTexcoord);
+
+ tex2.rgb *= float3(1.f, 0.f, 0.f);
+ Color = tex;
+
+ Color = lerp(Color, tex2, tex2.a);
+ }
+
Color.a *= Alpha;
Out.vColor = Color;
return Out;
@@ -2416,6 +2497,16 @@ technique11 PosTexTechnique11
PixelShader = compile ps_5_0 PS_SpellLearnColor();
}
+ pass SpellLearnBooster
+ {
+ SetRasterizerState(RS_Nocull);
+ SetDepthStencilState(DSS_Default, 0);
+ SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
+ VertexShader = compile vs_5_0 VS_MAIN();
+ GeometryShader = NULL;
+ PixelShader = compile ps_5_0 PS_SpellLearnBooster();
+ }
+
pass Enemy_Detection
{
SetRasterizerState(RS_Nocull);
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_CursorArrow.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_CursorArrow.png
index 9df5cba6e..1cfceb4d7 100644
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_CursorArrow.png and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_CursorArrow.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SpellMinigame_SpeedBurstDropBack.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SpellMinigame_SpeedBurstDropBack.png
new file mode 100644
index 000000000..4e4b60dda
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SpellMinigame_SpeedBurstDropBack.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SpellMinigame_SpeedBurstFail.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SpellMinigame_SpeedBurstFail.png
new file mode 100644
index 000000000..f8b24e389
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SpellMinigame_SpeedBurstFail.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/VFX_T_Speck_HighCoverage_D.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/VFX_T_Speck_HighCoverage_D.png
new file mode 100644
index 000000000..60dfbbad3
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/VFX_T_Speck_HighCoverage_D.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Spells/Atlas_Widget_Spell.dds b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Spells/Atlas_Widget_Spell.dds
index 66d912ed0..ca819de01 100644
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Spells/Atlas_Widget_Spell.dds and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Spells/Atlas_Widget_Spell.dds differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Spells/SpellMeters/Atlas_Spell.dds b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Spells/SpellMeters/Atlas_Spell.dds
index 094852933..d202a99fd 100644
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Spells/SpellMeters/Atlas_Spell.dds and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Spells/SpellMeters/Atlas_Spell.dds differ
diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj b/Jusin154_Team3D/Editor/Default/Editor.vcxproj
index d026e6ada..93f64a17c 100644
--- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj
+++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj
@@ -198,13 +198,17 @@ call Update_Shaders.bat
-
+
+
+
+
+
@@ -424,13 +428,17 @@ call Update_Shaders.bat
-
+
+
+
+
+
diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters
index 9b40d75f3..f06c47741 100644
--- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters
+++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters
@@ -631,11 +631,23 @@
{6e769435-83c4-4f64-b306-1b8c5f2d228d}
-
+
{54a92f0d-26f1-49bf-a13b-ab11995968c7}
{3b207257-c396-473b-9906-df04b28fb0cd}
+
+
+ {ea002e2c-481e-4f1f-a16f-4e47e3a48d37}
+
+
+ {933a90c2-8fce-4e6d-89e7-74e88cbc7f45}
+
+
+ {5bab4bbf-253e-4d66-a0d2-8a6328ae244b}
+
+
+ {268e67a6-fa77-4a34-84d9-b3e6f6e46a00}
@@ -1263,8 +1275,20 @@
50.UI\SpellLearn_Data
-
- 50.UI\SpellLearn_Canvas\SpellLearn_Panel\SPellLeam_SpeedPointer
+
+ 50.UI\SpellLearn_Canvas\SpellLearn_Panel\SPellLeam_ChaserPointer
+
+
+ 50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLeam_LookPointer
+
+
+ 50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Booster
+
+
+ 50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Overlay
+
+
+ 50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Slot
02.GameObjects\Layer_Effect\Effect\Magic\Blink
@@ -1897,8 +1921,20 @@
50.UI\SpellLearn_Data
-
- 50.UI\SpellLearn_Canvas\SpellLearn_Panel\SPellLeam_SpeedPointer
+
+ 50.UI\SpellLearn_Canvas\SpellLearn_Panel\SPellLeam_ChaserPointer
+
+
+ 50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLeam_LookPointer
+
+
+ 50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Booster
+
+
+ 50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Overlay
+
+
+ 50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Slot
02.GameObjects\Layer_Effect\Effect\Magic\Blink
diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp
index 17dc7760c..9174e57e1 100644
--- a/Jusin154_Team3D/Editor/Private/Loader.cpp
+++ b/Jusin154_Team3D/Editor/Private/Loader.cpp
@@ -118,6 +118,11 @@
#include "SpellLearn_Name.h"
#include "SpellLearn.h"
#include "SpellLearn_MovePointer.h"
+#include "SpellLearn_ChaserPointer.h"
+#include "SpellLearn_LookPointer.h"
+#include "SpellLearn_Booster.h"
+#include "SpellLearn_Slot.h"
+#include "SpellLearn_Overlay.h"
#include "IMGUIUI.h"
@@ -1220,6 +1225,7 @@ HRESULT CLoader::Loading_For_UI()
{
return E_FAIL;
}
+
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpellLearn_Canvas::Create(m_pDevice, m_pContext))))
{
return E_FAIL;
@@ -1240,6 +1246,26 @@ HRESULT CLoader::Loading_For_UI()
{
return E_FAIL;
}
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpellLearn_ChaserPointer::Create(m_pDevice, m_pContext))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpellLearn_LookPointer::Create(m_pDevice, m_pContext))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpellLearn_Booster::Create(m_pDevice, m_pContext))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpellLearn_Slot::Create(m_pDevice, m_pContext))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpellLearn_Overlay::Create(m_pDevice, m_pContext))))
+ {
+ return E_FAIL;
+ }
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CIMGUIUI::Create(m_pDevice, m_pContext))))
{
diff --git a/Jusin154_Team3D/Editor/Private/SPellLeam_SpeedPointer.cpp b/Jusin154_Team3D/Editor/Private/SPellLeam_SpeedPointer.cpp
deleted file mode 100644
index de1ee7712..000000000
--- a/Jusin154_Team3D/Editor/Private/SPellLeam_SpeedPointer.cpp
+++ /dev/null
@@ -1,96 +0,0 @@
-#include "pch.h"
-#include "SPellLeam_SpeedPointer.h"
-#include "GameInstance.h"
-
-CSPellLeam_SpeedPointer::CSPellLeam_SpeedPointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
- :CElementObject(pDevice, pContext)
-{
-}
-
-CSPellLeam_SpeedPointer::CSPellLeam_SpeedPointer(const CSPellLeam_SpeedPointer& rhs)
- :CElementObject(rhs)
-{
-}
-
-HRESULT CSPellLeam_SpeedPointer::Initialize_Prototype()
-{
- return S_OK;
-}
-
-HRESULT CSPellLeam_SpeedPointer::Initialize(void* pArg)
-{
- CUIObject::UIOBJECT_DESC Desc{};
-
- Desc.fX = 476.f;
- Desc.fY = -253.f;
- Desc.fSizeX = 32.f;
- Desc.fSizeY = 32.f;
- m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
-
- if (FAILED(__super::Initialize(&Desc)))
- {
- return E_FAIL;
- }
- if (FAILED(Ready_Components(pArg)))
- {
- return E_FAIL;
- }
-
- m_fTimeMult = 3.f;
- m_fAlpha = 1.f;
- m_fAlphaTime = 5.f;
- m_fMoveSpeed = 15.f;
- m_fAngle = XMConvertToRadians(0);
- Visible(false);
- return S_OK;
-}
-
-void CSPellLeam_SpeedPointer::Priority_Update(_float fTimeDelta)
-{
-}
-
-void CSPellLeam_SpeedPointer::Update(_float fTimeDelta)
-{
-}
-
-void CSPellLeam_SpeedPointer::Late_Update(_float fTimeDelta)
-{
-}
-
-HRESULT CSPellLeam_SpeedPointer::Render()
-{
- return S_OK;
-}
-
-_vector CSPellLeam_SpeedPointer::Get_WorldPostion()
-{
- return _vector();
-}
-
-HRESULT CSPellLeam_SpeedPointer::Bind_ShaderResources()
-{
- return S_OK;
-}
-
-HRESULT CSPellLeam_SpeedPointer::Ready_Components(void* pArg)
-{
- return S_OK;
-}
-
-CSPellLeam_SpeedPointer* CSPellLeam_SpeedPointer::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
-{
- return nullptr;
-}
-
-CGameObject* CSPellLeam_SpeedPointer::Clone(void* pArg, CGameObject* pOwner)
-{
- return nullptr;
-}
-
-void CSPellLeam_SpeedPointer::Free()
-{
-}
-
-void CSPellLeam_SpeedPointer::Describe_Entity()
-{
-}
diff --git a/Jusin154_Team3D/Editor/Private/SpellLearn.cpp b/Jusin154_Team3D/Editor/Private/SpellLearn.cpp
index 8a0468f02..5798d5f0d 100644
--- a/Jusin154_Team3D/Editor/Private/SpellLearn.cpp
+++ b/Jusin154_Team3D/Editor/Private/SpellLearn.cpp
@@ -2,6 +2,7 @@
#include "SpellLearn.h"
#include "GameInstance.h"
#include "SpellLearn_MovePointer.h"
+#include "SpellLearn_ChaserPointer.h"
CSpellLearn::CSpellLearn(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CElementObject(pDevice, pContext)
@@ -38,8 +39,12 @@ HRESULT CSpellLearn::Initialize(void* pArg)
}
m_fTimeMult = 3.f;
- m_fAlpha = 1.f;
+ m_fAlpha = 0.f;
m_fAlphaTime = 5.f;
+ m_iTrailIndex = 0;
+ m_fSortZ = 0.02f;
+ static_cast(m_pOwner)->Add_Function(TEXT("LearnClear"), [this](void* p) {this->Clear(); });
+ static_cast(m_pOwner)->Add_Function(TEXT("OverrlayClear"), [this](void* p) {this->Set_FadeOut(); });
Change_Image(0);
Visible(false);
return S_OK;
@@ -86,7 +91,44 @@ void CSpellLearn::Update(_float fTimeDelta)
}
}
- m_fTime += fTimeDelta * m_fTimeMult;
+ if (m_bReset == true)
+ {
+ m_Trail.clear();
+ m_ChaseTrail.clear();
+ m_bReset = false;
+ }
+
+ if (m_bHover == false)
+ {
+ fill(m_Trail.begin(), m_Trail.end(), _float2(-9999.f, -9999.f));
+ fill(m_ChaseTrail.begin(), m_ChaseTrail.end(), _float2(-9999.f, -9999.f));
+ m_bReset = true;
+ }
+
+ if (m_pPointer != nullptr)
+ {
+ if (m_pPointer->Get_MoveStart() == true)
+ {
+ m_bHover = true;
+ m_vPointerPosition = m_pPointer->Get_Position();
+ m_vPointerScale = m_pPointer->Get_Current_Size();
+
+ m_vChasePosition = m_pChasePointer->Get_Position();
+ m_vChaseScale = m_pChasePointer->Get_Current_Size();
+
+ m_fTime += fTimeDelta * m_fTimeMult;
+ if (m_fTime >= 0.3f)
+ {
+ m_fTime = 0.f;
+ m_Trail.push_back(m_vPointerPosition);
+ m_iTrailIndex++;
+ m_ChaseTrail.push_back(m_vChasePosition);
+ m_iChaseiTrailIndex++;
+ }
+ }
+ }
+
+
__super::Update(fTimeDelta);
}
@@ -98,11 +140,7 @@ void CSpellLearn::Late_Update(_float fTimeDelta)
}
if (m_bVisible) {
if (m_pPointer != nullptr)
- {
- m_vPointerPosition = m_pPointer->Get_Position();
- m_vPointerScale = m_pPointer->Get_Current_Size();
- }
- m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
+ m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
__super::Late_Update(fTimeDelta);
}
}
@@ -172,10 +210,6 @@ HRESULT CSpellLearn::Bind_ShaderResources()
{
return E_FAIL;
}
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fItemPosition1", &m_vPointerPosition, sizeof(_float2))))
- {
- return E_FAIL;
- }
if (FAILED(m_pShaderCom->Bind_RawValue("g_fItemImageSizes1", &m_vPointerScale, sizeof(_float2))))
{
return E_FAIL;
@@ -188,7 +222,22 @@ HRESULT CSpellLearn::Bind_ShaderResources()
{
return E_FAIL;
}
-
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_Trail", m_Trail.data(), sizeof(_float2) * _uint(m_Trail.size()))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_Count", &m_iTrailIndex, sizeof(_int))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_ChaseTrail", m_ChaseTrail.data(), sizeof(_float2) * _uint(m_Trail.size()))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_ChaseCount", &m_iChaseiTrailIndex, sizeof(_int))))
+ {
+ return E_FAIL;
+ }
return S_OK;
}
@@ -216,9 +265,14 @@ HRESULT CSpellLearn::Ready_Components(void* pArg)
HRESULT CSpellLearn::Change_Image(_int SpellID)
{
+ m_bHover = false;
+ m_ChaseTrail.push_back(_float2(-9999.f, -9999.f));
+ m_Trail.push_back(_float2(-9999.f, -9999.f));
+ m_iTrailIndex = 0;
+ m_iChaseiTrailIndex = 0;
_wstring pName = TEXT("Prototype_Texture_");
_wstring pImageName = pName + static_cast(m_pOwner)->Get_Learninfo(SpellID).pImageName;
-
+ m_MoveLine = static_cast(m_pOwner)->Get_Learninfo(SpellID).Lines;
if (m_pDiffuse_TextureCom)
{
Remove_Component();
@@ -227,12 +281,19 @@ HRESULT CSpellLearn::Change_Image(_int SpellID)
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(LEVEL::UI), pImageName, reinterpret_cast(&m_pDiffuse_TextureCom))))
return E_FAIL;
+ Set_FadeIn();
return S_OK;
}
-void CSpellLearn::Set_Pointer(CSpellLearn_MovePointer* Pointer)
+void CSpellLearn::Set_Pointer(CSpellLearn_MovePointer* Pointer, CSpellLearn_ChaserPointer* Chase)
{
m_pPointer = Pointer;
+ m_pChasePointer = Chase;
+}
+
+void CSpellLearn::Clear()
+{
+ fill(m_ChaseTrail.begin(), m_ChaseTrail.end(), _float2(-9999.f, -9999.f));
}
CSpellLearn* CSpellLearn::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
diff --git a/Jusin154_Team3D/Editor/Private/SpellLearn_Booster.cpp b/Jusin154_Team3D/Editor/Private/SpellLearn_Booster.cpp
new file mode 100644
index 000000000..df6f02a4a
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/SpellLearn_Booster.cpp
@@ -0,0 +1,317 @@
+#include "pch.h"
+#include "SpellLearn_Booster.h"
+#include "GameInstance.h"
+
+CSpellLearn_Booster::CSpellLearn_Booster(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ :CElementObject(pDevice, pContext)
+{
+}
+
+CSpellLearn_Booster::CSpellLearn_Booster(const CSpellLearn_Booster& rhs)
+ :CElementObject(rhs)
+{
+}
+
+HRESULT CSpellLearn_Booster::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CSpellLearn_Booster::Initialize(void* pArg)
+{
+ CUIObject::UIOBJECT_DESC Desc{};
+
+ Desc.fX = 476.f;
+ Desc.fY = -253.f;
+ Desc.fSizeX = 64.f;
+ Desc.fSizeY = 64.f;
+ m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
+
+ if (FAILED(__super::Initialize(&Desc)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Ready_Components(pArg)))
+ {
+ return E_FAIL;
+ }
+
+ m_fTimeMult = 3.f;
+ m_fAlpha = 1.f;
+ m_fAlphaTime = 5.f;
+ m_fAngle = XMConvertToRadians(0);
+ m_bHover = true;
+ m_fImagePosi = _float4(16.f, 16.f, 32.f, 32.f);
+ static_cast(m_pOwner)->Add_Function(TEXT("BoosterOn"), [this](void* p) {this->BoosterOn(p); });
+ static_cast(m_pOwner)->Add_Function(TEXT("BoosterOff"), [this](void* p) {this->BoosterOff(p); });
+ static_cast(m_pOwner)->Add_Function(TEXT("LearnClear"), [this](void* p) {this->Clear(); });
+ Visible(true);
+ return S_OK;
+}
+
+void CSpellLearn_Booster::BoosterOn(void* pArg)
+{
+ Booster* State = static_cast(pArg);
+ if (State->iBoosterIndex != m_iIndex)
+ return;
+
+ m_bBoosterOn = true;
+ m_bBoosterOff = false;
+}
+
+void CSpellLearn_Booster::BoosterOff(void* pArg)
+{
+ Booster* State = static_cast(pArg);
+
+ if (m_bBoosterOn == true)
+ return;
+
+ if (State->iBoosterIndex != m_iIndex)
+ return;
+
+ m_bBoosterOff = true;
+ static_cast(m_pOwner)->Function_Callback(TEXT("ChaseBooster"));
+}
+
+void CSpellLearn_Booster::Set_Index(_int iIndex)
+{
+ m_iIndex = iIndex;
+}
+
+void CSpellLearn_Booster::Reset()
+{
+ m_bBoosterOn = false;
+ m_bBoosterOff = false;
+ Set_FadeIn();
+}
+
+void CSpellLearn_Booster::Clear()
+{
+ Set_FadeOut();
+}
+
+void CSpellLearn_Booster::Priority_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ __super::Priority_Update(fTimeDelta);
+}
+
+void CSpellLearn_Booster::Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ if (m_bFadeIn == true)
+ {
+ if (m_fAlpha <= 1.f)
+ {
+ m_fAlpha += fTimeDelta * m_fAlphaTime;
+ }
+
+ if (m_fAlpha >= 1.f)
+ {
+ m_bFadeIn = false;
+ m_fAlpha = 1.f;
+ }
+ }
+
+ if (m_bFadeOut == true)
+ {
+ if (m_fAlpha >= 0.f)
+ m_fAlpha -= fTimeDelta * m_fAlphaTime;;
+
+ if (m_fAlpha <= 0.f)
+ {
+ m_bFadeOut = false;
+ m_fAlpha = 0.f;
+ }
+ }
+
+ m_fTime += fTimeDelta * m_fTimeMult;
+ __super::Update(fTimeDelta);
+}
+
+void CSpellLearn_Booster::Late_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ if (m_bVisible) {
+ m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
+ __super::Late_Update(fTimeDelta);
+ }
+}
+
+HRESULT CSpellLearn_Booster::Render()
+{
+ if (FAILED(Bind_ShaderResources())) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::SPELLLEARNBOOSTER)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Bind_Resources())) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Render())) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+_vector CSpellLearn_Booster::Get_WorldPostion()
+{
+ return m_pTransformCom->Get_State(STATE::POSITION);
+}
+
+HRESULT CSpellLearn_Booster::Bind_ShaderResources()
+{
+ if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
+ {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom1->Bind_ShaderResource(m_pShaderCom, "g_Texture1", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom2->Bind_ShaderResource(m_pShaderCom, "g_Texture2", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom3->Bind_ShaderResource(m_pShaderCom, "g_Texture3", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_vScale, sizeof(_float2))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageSipos1", &m_fImagePosi, sizeof(_float4))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_iHover", &m_bHover, sizeof(_bool))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_iBoosterOn", &m_bBoosterOn, sizeof(_bool))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_iBoosterOff", &m_bBoosterOff, sizeof(_bool))))
+ {
+ return E_FAIL;
+ }
+ return S_OK;
+}
+
+HRESULT CSpellLearn_Booster::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_SU_ButtonCalloutRing"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_Mouse_LeftClick"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_SpellMinigame_SpeedBurstFail"), reinterpret_cast(&m_pDiffuse_TextureCom2), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_VFX_T_Speck_HighCoverage_D"), reinterpret_cast(&m_pDiffuse_TextureCom3), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
+ {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+CSpellLearn_Booster* CSpellLearn_Booster::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CSpellLearn_Booster* pInstance = new CSpellLearn_Booster(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CSpellLearn_Booster");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CSpellLearn_Booster::Clone(void* pArg, CGameObject* pOwner)
+{
+ CSpellLearn_Booster* pInstance = new CSpellLearn_Booster(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CSpellLearn_Booster");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CSpellLearn_Booster::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pDiffuse_TextureCom);
+ SAFE_RELEASE(m_pDiffuse_TextureCom1);
+ SAFE_RELEASE(m_pDiffuse_TextureCom2);
+ SAFE_RELEASE(m_pDiffuse_TextureCom3);
+ SAFE_RELEASE(m_pShaderCom);
+ SAFE_RELEASE(m_pVIBufferCom);
+}
+
+void CSpellLearn_Booster::Describe_Entity()
+{
+}
diff --git a/Jusin154_Team3D/Editor/Private/SpellLearn_ChaserPointer.cpp b/Jusin154_Team3D/Editor/Private/SpellLearn_ChaserPointer.cpp
new file mode 100644
index 000000000..5c760c82f
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/SpellLearn_ChaserPointer.cpp
@@ -0,0 +1,290 @@
+#include "pch.h"
+#include "SpellLearn_ChaserPointer.h"
+#include "GameInstance.h"
+#include "SpellLearn_MovePointer.h"
+
+CSpellLearn_ChaserPointer::CSpellLearn_ChaserPointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ :CElementObject(pDevice, pContext)
+{
+}
+
+CSpellLearn_ChaserPointer::CSpellLearn_ChaserPointer(const CSpellLearn_ChaserPointer& rhs)
+ :CElementObject(rhs)
+{
+}
+
+HRESULT CSpellLearn_ChaserPointer::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CSpellLearn_ChaserPointer::Initialize(void* pArg)
+{
+ CUIObject::UIOBJECT_DESC Desc{};
+
+ Desc.fX = 476.f;
+ Desc.fY = -253.f;
+ Desc.fSizeX = 32.f;
+ Desc.fSizeY = 32.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 = 5.f;
+ m_fMoveSpeed = 165.f;
+ static_cast(m_pOwner)->Add_Function(TEXT("ChaseBooster"), [this](void* p) {this->SpeedUp(); });
+ static_cast(m_pOwner)->Add_Function(TEXT("LearnClear"), [this](void* p) {this->Clear(); });
+ Set_SpellLearn(0);
+ Visible(false);
+ return S_OK;
+}
+
+void CSpellLearn_ChaserPointer::Priority_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ __super::Priority_Update(fTimeDelta);
+}
+
+void CSpellLearn_ChaserPointer::Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ if (m_bFadeIn == true)
+ {
+ if (m_fAlpha <= 1.f)
+ {
+ m_fAlpha += fTimeDelta * m_fAlphaTime;
+ }
+
+ if (m_fAlpha >= 1.f)
+ {
+ m_bFadeIn = false;
+ m_fAlpha = 1.f;
+ }
+ }
+
+ if (m_bFadeOut == true)
+ {
+ if (m_fAlpha >= 0.f)
+ m_fAlpha -= fTimeDelta * m_fAlphaTime;;
+
+ if (m_fAlpha <= 0.f)
+ {
+ m_bFadeOut = false;
+ m_fAlpha = 0.f;
+ }
+ }
+
+ if (m_bMoveStart == true)
+ {
+ Line(fTimeDelta);
+ }
+
+ if (m_fMoveSpeed >= 165.f)
+ {
+ m_fMoveSpeed -= fTimeDelta;
+ }
+
+ m_fTime += fTimeDelta * m_fTimeMult;
+
+
+ __super::Update(fTimeDelta);
+}
+
+void CSpellLearn_ChaserPointer::Late_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ if (m_bVisible) {
+
+ m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
+ __super::Late_Update(fTimeDelta);
+ }
+}
+
+HRESULT CSpellLearn_ChaserPointer::Render()
+{
+ if (FAILED(Bind_ShaderResources())) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::DEFAULT)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Bind_Resources())) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Render())) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+_vector CSpellLearn_ChaserPointer::Get_WorldPostion()
+{
+ return m_pTransformCom->Get_State(STATE::POSITION);
+}
+
+void CSpellLearn_ChaserPointer::Set_SpellLearn(_int Index)
+{
+ m_fAlpha = 0.f;
+ m_bHover = false;
+ m_bMoveStart = false;
+ m_fTime = 0.f;
+ m_iLineIndex = _int(static_cast(m_pOwner)->Get_Learninfo(Index).Lines.size());
+ m_MoveLine = static_cast(m_pOwner)->Get_Learninfo(Index).Lines;
+ m_iCurrentLine = 0;
+ m_fX = static_cast(m_pOwner)->Get_Learninfo(Index).fStartPosition.x;
+ m_fY = static_cast(m_pOwner)->Get_Learninfo(Index).fStartPosition.y;
+ m_fMoveSpeed = 165.f;
+}
+
+void CSpellLearn_ChaserPointer::Set_Move()
+{
+ m_bHover = true;
+ m_bMoveStart = true;
+}
+
+void CSpellLearn_ChaserPointer::Line(_float fTime)
+{
+ m_vLerp_Position = m_MoveLine[m_iCurrentLine];
+
+ if (Start_Lerp(fTime) == true)
+ {
+ if (m_iCurrentLine < m_iLineIndex - 1)
+ {
+ ++m_iCurrentLine;
+ }
+ else
+ {
+ m_bMoveStart = false;
+ }
+ }
+
+}
+
+void CSpellLearn_ChaserPointer::SpeedUp()
+{
+ m_fMoveSpeed = 190.f;
+}
+
+void CSpellLearn_ChaserPointer::Clear()
+{
+ m_fMoveSpeed = 0.f;
+ Set_FadeOut();
+}
+
+HRESULT CSpellLearn_ChaserPointer::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 CSpellLearn_ChaserPointer::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_SpellMinigame_SpeedBurstDropBack"), 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;
+}
+
+CSpellLearn_ChaserPointer* CSpellLearn_ChaserPointer::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CSpellLearn_ChaserPointer* pInstance = new CSpellLearn_ChaserPointer(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CSpellLearn_ChaserPointer");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CSpellLearn_ChaserPointer::Clone(void* pArg, CGameObject* pOwner)
+{
+ CSpellLearn_ChaserPointer* pInstance = new CSpellLearn_ChaserPointer(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CSpellLearn_ChaserPointer");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CSpellLearn_ChaserPointer::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pDiffuse_TextureCom);
+ SAFE_RELEASE(m_pShaderCom);
+ SAFE_RELEASE(m_pVIBufferCom);
+}
+
+void CSpellLearn_ChaserPointer::Describe_Entity()
+{
+}
diff --git a/Jusin154_Team3D/Editor/Private/SpellLearn_Data.cpp b/Jusin154_Team3D/Editor/Private/SpellLearn_Data.cpp
index da293f8fe..2456abd27 100644
--- a/Jusin154_Team3D/Editor/Private/SpellLearn_Data.cpp
+++ b/Jusin154_Team3D/Editor/Private/SpellLearn_Data.cpp
@@ -41,12 +41,34 @@ HRESULT CSpellLearn_Data::Initialize(void* pArg)
// 속성 읽기
Info.pSpellName = CMyTools::ToWstring(pName->Attribute("SpellName"));
Info.pImageName = CMyTools::ToWstring(pName->Attribute("ImageName"));
+ pName->QueryIntAttribute("SpellID", &Info.iSpellID);
+ pName->QueryIntAttribute("SpellType", &Info.iSpellType);
pName->QueryFloatAttribute("Size", &Info.fSpellSize);
_float fX{}, fY{};
pName->QueryFloatAttribute("x", &fX);
pName->QueryFloatAttribute("y", &fY);
Info.fStartPosition = _float2(fX, fY);
+ _float endx{}, endy{};
+ pName->QueryFloatAttribute("endx", &endx);
+ pName->QueryFloatAttribute("endy", &endy);
+ Info.fEndPosition = _float2(endx, endy);
+
+ tinyxml2::XMLElement* pBooster = pName->FirstChildElement("Booster");
+ while (pBooster)
+ {
+ tinyxml2::XMLElement* pPos = pBooster->FirstChildElement("Pos");
+ if (pPos)
+ {
+ _float px{}, py{};
+ pPos->QueryFloatAttribute("x", &px);
+ pPos->QueryFloatAttribute("y", &py);
+ Info.Booster.push_back(XMVectorSet(px, py, 0.f, 1.f));
+ }
+
+ // 다음 Position으로 이동
+ pBooster = pBooster->NextSiblingElement("Booster");
+ }
// Position 요소 반복
tinyxml2::XMLElement* pPosition = pName->FirstChildElement("Position");
diff --git a/Jusin154_Team3D/Editor/Private/SpellLearn_LookPointer.cpp b/Jusin154_Team3D/Editor/Private/SpellLearn_LookPointer.cpp
new file mode 100644
index 000000000..1db84a47b
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/SpellLearn_LookPointer.cpp
@@ -0,0 +1,253 @@
+#include "pch.h"
+#include "SpellLearn_LookPointer.h"
+#include "GameInstance.h"
+
+CSpellLearn_LookPointer::CSpellLearn_LookPointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ :CElementObject(pDevice, pContext)
+{
+}
+
+CSpellLearn_LookPointer::CSpellLearn_LookPointer(const CSpellLearn_LookPointer& rhs)
+ :CElementObject(rhs)
+{
+}
+
+HRESULT CSpellLearn_LookPointer::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CSpellLearn_LookPointer::Initialize(void* pArg)
+{
+ CUIObject::UIOBJECT_DESC Desc{};
+
+ Desc.fX = 100.f;
+ Desc.fY = 100.f;
+ Desc.fSizeX = 80.f;
+ Desc.fSizeY = 80.f;
+ m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
+
+ if (FAILED(__super::Initialize(&Desc)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Ready_Components(pArg)))
+ {
+ return E_FAIL;
+ }
+
+ m_fTimeMult = 3.f;
+ m_fAlpha = 1.f;
+ m_fAlphaTime = 5.f;
+ m_fMoveSpeed = 130.f;
+ Set_SpellLearn(0);
+ m_fAngle = XMConvertToRadians(0);
+ Visible(true);
+ m_localX = 0.f;
+ m_localY = 20.f;
+ return S_OK;
+}
+
+void CSpellLearn_LookPointer::Priority_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ __super::Priority_Update(fTimeDelta);
+}
+
+void CSpellLearn_LookPointer::Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ if (m_bFadeIn == true)
+ {
+ if (m_fAlpha <= 1.f)
+ {
+ m_fAlpha += fTimeDelta * m_fAlphaTime;
+ }
+
+ if (m_fAlpha >= 1.f)
+ {
+ m_bFadeIn = false;
+ m_fAlpha = 1.f;
+ }
+ }
+
+ if (m_bFadeOut == true)
+ {
+ if (m_fAlpha >= 0.f)
+ m_fAlpha -= fTimeDelta * m_fAlphaTime;;
+
+ if (m_fAlpha <= 0.f)
+ {
+ m_bFadeOut = false;
+ m_fAlpha = 0.f;
+ }
+ }
+
+ m_fAngle = XMConvertToRadians(static_cast(m_pOwner)->Get_Angle());
+
+ float cosA = cos(m_fAngle);
+ float sinA = sin(m_fAngle);
+
+ float rotatedX = m_localX * cosA - m_localY * sinA;
+ float rotatedY = m_localX * sinA + m_localY * cosA;
+
+ MoveX(rotatedX);
+ MoveY(rotatedY);
+
+ m_fTime += fTimeDelta * m_fTimeMult;
+ __super::Update(fTimeDelta);
+}
+
+void CSpellLearn_LookPointer::Late_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ if (m_bVisible) {
+ m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
+ __super::Late_Update(fTimeDelta);
+ }
+}
+
+HRESULT CSpellLearn_LookPointer::Render()
+{
+ if (FAILED(Bind_ShaderResources())) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ROTATION)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Bind_Resources())) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Render())) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+_vector CSpellLearn_LookPointer::Get_WorldPostion()
+{
+ return m_pTransformCom->Get_State(STATE::POSITION);
+}
+
+HRESULT CSpellLearn_LookPointer::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;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fMapAngle", &m_fAngle, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ return S_OK;
+}
+
+HRESULT CSpellLearn_LookPointer::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_SU_CursorArrow"), 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 CSpellLearn_LookPointer::Set_SpellLearn(_int Index)
+{
+ m_bMoveStart = false;
+ m_iLineIndex = _int(static_cast(m_pOwner)->Get_Learninfo(Index).Lines.size());
+ m_MoveLine = static_cast(m_pOwner)->Get_Learninfo(Index).Lines;
+ m_iCurrentLine = 0;
+ m_fX = static_cast(m_pOwner)->Get_Learninfo(Index).fStartPosition.x;
+ m_fY = static_cast(m_pOwner)->Get_Learninfo(Index).fStartPosition.y;
+}
+
+CSpellLearn_LookPointer* CSpellLearn_LookPointer::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CSpellLearn_LookPointer* pInstance = new CSpellLearn_LookPointer(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CSpellLearn_LookPointer");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CSpellLearn_LookPointer::Clone(void* pArg, CGameObject* pOwner)
+{
+ CSpellLearn_LookPointer* pInstance = new CSpellLearn_LookPointer(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CSpellLearn_LookPointer");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CSpellLearn_LookPointer::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pDiffuse_TextureCom);
+ SAFE_RELEASE(m_pShaderCom);
+ SAFE_RELEASE(m_pVIBufferCom);
+}
+
+void CSpellLearn_LookPointer::Describe_Entity()
+{
+}
diff --git a/Jusin154_Team3D/Editor/Private/SpellLearn_MovePointer.cpp b/Jusin154_Team3D/Editor/Private/SpellLearn_MovePointer.cpp
index 2c9c95b4c..ea257f75e 100644
--- a/Jusin154_Team3D/Editor/Private/SpellLearn_MovePointer.cpp
+++ b/Jusin154_Team3D/Editor/Private/SpellLearn_MovePointer.cpp
@@ -1,6 +1,7 @@
#include "pch.h"
#include "SpellLearn_MovePointer.h"
#include "GameInstance.h"
+#include "SpellLearn_LookPointer.h"
CSpellLearn_MovePointer::CSpellLearn_MovePointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CElementObject(pDevice, pContext)
@@ -36,41 +37,68 @@ HRESULT CSpellLearn_MovePointer::Initialize(void* pArg)
return E_FAIL;
}
- m_fTimeMult = 3.f;
- m_fAlpha = 1.f;
+ m_fTimeMult = 10.f;
+ m_fAlpha = 0.f;
m_fAlphaTime = 5.f;
- m_fMoveSpeed = 15.f;
+ m_fMoveSpeed = 105.f;
Set_SpellLearn(0);
m_fAngle = XMConvertToRadians(0);
+ static_cast(m_pOwner)->Add_Function(TEXT("Booster"), [this](void* p) {this->Set_Booster(p); });
Visible(false);
return S_OK;
}
void CSpellLearn_MovePointer::Set_SpellLearn(_int Index)
{
+ m_bMoveStart = false;
+ m_bHover = true;
m_iLineIndex = _int(static_cast(m_pOwner)->Get_Learninfo(Index).Lines.size());
m_MoveLine = static_cast(m_pOwner)->Get_Learninfo(Index).Lines;
+ m_Boosters = static_cast(m_pOwner)->Get_Learninfo(Index).Booster;
m_iCurrentLine = 0;
m_fX = static_cast(m_pOwner)->Get_Learninfo(Index).fStartPosition.x;
m_fY = static_cast(m_pOwner)->Get_Learninfo(Index).fStartPosition.y;
+ m_Booster.iBoosterIndex = -1;
+ m_Booster.bBoosterOn = false;
+ Set_FadeIn();
}
-void CSpellLearn_MovePointer::Line(_float fTime)
+_int CSpellLearn_MovePointer::Get_SpellTrail()
+{
+ return m_iCurrentLine;
+}
+
+_bool CSpellLearn_MovePointer::Get_MoveStart()
+{
+ return m_bMoveStart;
+}
+
+void CSpellLearn_MovePointer::Line(_float fTime, _float2 fMouse)
{
m_vLerp_Position = m_MoveLine[m_iCurrentLine];
- if (Start_Lerp(m_fMoveSpeed * fTime) == true)
+ if (Start_Lerp_Speed(fTime, fMouse) == true)
{
if (m_iCurrentLine < m_iLineIndex - 1)
{
++m_iCurrentLine;
+ m_fPerPosition = _float2(m_MoveLine[m_iCurrentLine - 1].m128_f32[0], m_MoveLine[m_iCurrentLine - 1].m128_f32[1]);
}
else
{
m_bMoveStart = false;
+ Set_FadeOut();
+ static_cast(m_pOwner)->Function_Callback(TEXT("LearnClear"));
}
}
+}
+void CSpellLearn_MovePointer::Set_Booster(void* pArg)
+{
+ Booster* Info = static_cast(pArg);
+ m_Booster.iBoosterIndex = Info->iBoosterIndex;
+ m_Booster.bBoosterOn = Info->bBoosterOn;
+ m_bBooster = true;
}
void CSpellLearn_MovePointer::Priority_Update(_float fTimeDelta)
@@ -114,28 +142,45 @@ void CSpellLearn_MovePointer::Update(_float fTimeDelta)
}
}
+ POINT ptMouse{};
+ GetCursorPos(&ptMouse);
+ ScreenToClient(g_hWnd, &ptMouse);
+ _float2 fMouse{};
+ fMouse.x = ptMouse.x - (g_iWinSizeX * 0.5f);
+ fMouse.y = -ptMouse.y + (g_iWinSizeY * 0.5f);
+
+ _float2 fFinalMouse{};
+ fFinalMouse.x = fMouse.x - m_fX;
+ fFinalMouse.y = fMouse.y - m_fY;
+
if (m_pGameInstance->Key_Down(DIK_L))
{
m_bMoveStart = true;
+ m_bBooster = false;
+ m_fMoveSpeed = 105.f;
}
if (m_bMoveStart == true)
{
- Line(fTimeDelta);
+ Line(fTimeDelta, fMouse);
}
- POINT ptMouse{};
- GetCursorPos(&ptMouse);
- ScreenToClient(g_hWnd, &ptMouse);
- _float2 fMouse;
- fMouse.x = ptMouse.x - (g_iWinSizeX * 0.5f);
- fMouse.y = -ptMouse.y + (g_iWinSizeY * 0.5f);
+ m_fAngle = atan2(-fFinalMouse.x, fFinalMouse.y);
- fMouse.x = fMouse.x - m_fX;
- fMouse.y = fMouse.y - m_fY;
+ if (m_bBooster == true)
+ {
+ if (m_pGameInstance->Mouse_Down(DIM_LBUTTON))
+ {
+ m_bBooster = false;
+ m_fMoveSpeed = 160.f;
+ static_cast(m_pOwner)->Function_Callback(TEXT("BoosterOn"), &m_Booster);
+ }
+ }
-
- m_fAngle = atan2(-fMouse.x, fMouse.y);
+ if (m_fMoveSpeed >= 105.f)
+ {
+ m_fMoveSpeed -= fTimeDelta * m_fTimeMult;
+ }
m_fTime += fTimeDelta * m_fTimeMult;
__super::Update(fTimeDelta);
@@ -148,7 +193,8 @@ void CSpellLearn_MovePointer::Late_Update(_float fTimeDelta)
return;
}
if (m_bVisible) {
- m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
+ if (m_bHover == true)
+ m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
__super::Late_Update(fTimeDelta);
}
}
@@ -237,6 +283,10 @@ HRESULT CSpellLearn_MovePointer::Ready_Components(void* pArg)
return E_FAIL;
}
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLeam_LookPointer))))
+ {
+ return E_FAIL;
+ }
return S_OK;
}
diff --git a/Jusin154_Team3D/Editor/Private/SpellLearn_Overlay.cpp b/Jusin154_Team3D/Editor/Private/SpellLearn_Overlay.cpp
new file mode 100644
index 000000000..7c04ff286
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/SpellLearn_Overlay.cpp
@@ -0,0 +1,387 @@
+#include "pch.h"
+#include "SpellLearn_Overlay.h"
+#include "GameInstance.h"
+
+CSpellLearn_Overlay::CSpellLearn_Overlay(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ :CElementObject(pDevice, pContext)
+{
+}
+
+CSpellLearn_Overlay::CSpellLearn_Overlay(const CSpellLearn_Overlay& rhs)
+ :CElementObject(rhs)
+{
+}
+
+HRESULT CSpellLearn_Overlay::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CSpellLearn_Overlay::Initialize(void* pArg)
+{
+ CUIObject::UIOBJECT_DESC Desc{};
+
+ Desc.fX = 380.f;
+ Desc.fY = -30.f;
+ Desc.fSizeX = 105.f;
+ Desc.fSizeY = 105.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_iImageFrameX = 8;
+ m_iImageFrameY = 8;
+ m_fFrame = 0.2f;
+ m_fTimeMult = 3.f;
+ m_fAngle = XMConvertToRadians(-135.f);
+ m_fAlpha = 1.f;
+ m_fAlphaTime = 1.f;
+ m_vUVScale.x = 1.f;
+ m_vUVScale.y = 1.f;
+ m_fCoolTime = 5.f;
+ m_fSortZ = 0.01f;
+ m_fMoveSpeed = 10.f;
+ m_fLerpX = 600.f;
+ m_fLerpY = 100.f;
+ m_iSpellType = ENUM_CLASS(SPELLTYPE::CONTROL);
+ static_cast(m_pOwner)->Add_Function(TEXT("LearnClear"), [this](void* p) {this->Clear(); });
+ Compute_UI(5);
+ return S_OK;
+}
+
+void CSpellLearn_Overlay::Set_SpellLearn(_int Index)
+{
+ Compute_UI(static_cast(m_pOwner)->Get_Learninfo(Index).iSpellID);
+ m_vUVScale.y = 0.f;
+ m_fTrail = 0.f;
+ m_iSpellType = static_cast(m_pOwner)->Get_Learninfo(Index).iSpellType;
+ m_fSpellLearn = _float(static_cast(m_pOwner)->Get_Learninfo(Index).Lines.size());
+ MoveX(static_cast(m_pOwner)->Get_Learninfo(Index).fEndPosition.x);
+ MoveY(static_cast(m_pOwner)->Get_Learninfo(Index).fEndPosition.y);
+ SizeUpdate(m_fOrigin_Size.x, m_fOrigin_Size.y);
+ m_fSizeUp = false;
+ m_bClear = false;
+}
+
+void CSpellLearn_Overlay::Set_Count(_int Index)
+{
+ m_fTrail = _float(Index);
+}
+
+void CSpellLearn_Overlay::Priority_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ __super::Priority_Update(fTimeDelta);
+}
+
+void CSpellLearn_Overlay::Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+
+ if (m_bFadeIn == true)
+ {
+ if (m_fAlpha <= 1.f)
+ m_fAlpha += fTimeDelta * m_fAlphaTime;
+
+ if (m_fAlpha >= 1.f)
+ {
+ m_bFadeIn = false;
+ m_fAlpha = 1.f;
+ }
+ }
+
+ if (m_bFadeOut == true)
+ {
+ if (m_fAlpha >= 0.f)
+ m_fAlpha -= fTimeDelta;
+
+ if (m_fAlpha <= 0.f)
+ {
+ m_bFadeOut = false;
+ m_fAlpha = 0.f;
+ }
+ }
+
+ Update_Trail(fTimeDelta);
+
+ if (m_bClear == true)
+ {
+ SizeUp(fTimeDelta * m_fTimeMult * m_fMoveSpeed);
+ }
+
+ if (m_fSizeUp == true)
+ {
+ if (Start_Lerp(fTimeDelta * m_fTimeMult * m_fMoveSpeed) == true)
+ {
+ m_fSizeUp = false;
+ }
+ }
+
+ m_fTime += fTimeDelta * m_fTimeMult;
+ __super::Update(fTimeDelta);
+}
+
+void CSpellLearn_Overlay::Late_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ if (m_bVisible) {
+ m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
+ }
+ __super::Late_Update(fTimeDelta);
+}
+
+HRESULT CSpellLearn_Overlay::Render()
+{
+ if (FAILED(Bind_ShaderResources()))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::TYPE))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Bind_Resources()))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Render()))
+ {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+_vector CSpellLearn_Overlay::Get_WorldPostion()
+{
+ return m_pTransformCom->Get_State(STATE::POSITION);
+}
+
+HRESULT CSpellLearn_Overlay::Bind_ShaderResources()
+{
+ if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom1->Bind_ShaderResource(m_pShaderCom, "g_Texture1", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom2->Bind_ShaderResource(m_pShaderCom, "g_Texture2", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom3->Bind_ShaderResource(m_pShaderCom, "g_Texture3", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_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_fFrame", &m_fFrame, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fAngle", &m_fAngle, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_iSpellType", &m_iSpellType, sizeof(_int))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_iImageCountX", &m_iImageFrameX, sizeof(_int))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_iImageCountY", &m_iImageFrameY, sizeof(_int))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fDeltaU", &m_vUVScale.x, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fDeltaV", &m_vUVScale.y, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fCoolTime", &m_fCoolTime, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageUV", &m_vUV, sizeof(_float4))))
+ {
+ return E_FAIL;
+ }
+ return S_OK;
+}
+
+HRESULT CSpellLearn_Overlay::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_ActionItemBack_4K"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_spellmeter_Generic"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_Atlas_Spell"), reinterpret_cast(&m_pDiffuse_TextureCom2), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_tillingSmokes"), reinterpret_cast(&m_pDiffuse_TextureCom3), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
+ {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+void CSpellLearn_Overlay::Clear()
+{
+ m_vUVScale.y = 1.2f;
+ m_bClear = true;
+}
+
+void CSpellLearn_Overlay::Compute_UI(_uint SpellID)
+{
+ _float2 fImage_Size = { 1024.f, 1792.f };
+
+ _uint iCountX = 4;
+ _uint iCountY = 6;
+
+ _float iImageX = 256.f;
+ _float iImageY = 256.f;
+
+ _uint iframeX = SpellID % iCountX;
+ _uint iframeY = SpellID / iCountX;
+
+ _float2 UVStart;
+ UVStart.x = iframeX * iImageX / fImage_Size.x;
+ UVStart.y = iframeY * iImageY / fImage_Size.y;
+
+ _float2 UVEnd;
+ UVEnd.x = UVStart.x + (iImageX / fImage_Size.x);
+ UVEnd.y = UVStart.y + (iImageY / fImage_Size.y);
+
+ _float4 UV = _float4{ UVStart.x, UVStart.y, UVEnd.x, UVEnd.y };
+ m_vUV = UV;
+}
+
+void CSpellLearn_Overlay::Update_Trail(_float fTimeaDalta)
+{
+ m_vUVScale.y = CMyTools::Lerp_f1D(m_vUVScale.y, m_fTrail / m_fSpellLearn * 1.05f, fTimeaDalta * m_fMoveSpeed);
+}
+
+void CSpellLearn_Overlay::SizeUp(_float fSizeX)
+{
+ m_fSizeX += fSizeX;
+ m_fSizeY += fSizeX;
+
+ if (160.f <= m_fSizeX + fSizeX)
+ {
+ m_fSizeX = 160.f;
+ m_fSizeY = 160.f;
+ m_bClear = false;
+ m_fSizeUp = true;
+ static_cast(m_pOwner)->Function_Callback(TEXT("OverrlayClear"));
+ }
+}
+
+CSpellLearn_Overlay* CSpellLearn_Overlay::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CSpellLearn_Overlay* pInstance = new CSpellLearn_Overlay(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CSpellLearn_Overlay");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CSpellLearn_Overlay::Clone(void* pArg, CGameObject* pOwner)
+{
+ CSpellLearn_Overlay* pInstance = new CSpellLearn_Overlay(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CSpell_Overlay");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CSpellLearn_Overlay::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pDiffuse_TextureCom);
+ SAFE_RELEASE(m_pDiffuse_TextureCom1);
+ SAFE_RELEASE(m_pDiffuse_TextureCom2);
+ SAFE_RELEASE(m_pDiffuse_TextureCom3);
+ SAFE_RELEASE(m_pShaderCom);
+ SAFE_RELEASE(m_pVIBufferCom);
+}
+
+void CSpellLearn_Overlay::Describe_Entity()
+{
+}
diff --git a/Jusin154_Team3D/Editor/Private/SpellLearn_Panel.cpp b/Jusin154_Team3D/Editor/Private/SpellLearn_Panel.cpp
index 928db31af..be6ab523c 100644
--- a/Jusin154_Team3D/Editor/Private/SpellLearn_Panel.cpp
+++ b/Jusin154_Team3D/Editor/Private/SpellLearn_Panel.cpp
@@ -4,7 +4,11 @@
#include "SpellLearn_Name.h"
#include "SpellLearn.h"
#include "SpellLearn_MovePointer.h"
+#include "SPellLearn_ChaserPointer.h"
#include "SpellLearn_Data.h"
+#include "SpellLearn_Booster.h"
+#include "SpellLearn_Slot.h"
+#include "SpellLearn_Overlay.h"
CSpellLearn_Panel::CSpellLearn_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CPanelObject(pDevice, pContext)
@@ -45,7 +49,22 @@ HRESULT CSpellLearn_Panel::Initialize(void* pArg)
m_fCanvasAlpha = 1.f;
m_fSortZ = 0.05f;
m_fDelayTime = 1.f;
- static_cast(m_pSpellLearn)->Set_Pointer(static_cast(m_pSpellLearn_MovePointer));
+ static_cast(m_pSpellLearn)->Set_Pointer(
+ static_cast(m_pSpellLearn_MovePointer),
+ static_cast(m_pSpellLearn_ChaserPointer));
+
+ for (size_t i = 0; i < m_pBooster.size(); ++i)
+ {
+ static_cast(m_pBooster[i])->Move(Get_Learninfo(Index).Booster[i].m128_f32[0],
+ Get_Learninfo(Index).Booster[i].m128_f32[1]);
+ }
+ for (size_t i = 0; i < m_pBooster.size(); ++i)
+ {
+ m_PointerStates.push_back(m_State);
+ m_ChaseStates.push_back(m_State);
+ }
+ static_cast(m_pSpellLearn_Overlay)->Set_SpellLearn(0);
+ static_cast(m_pSpellLearn_Slot)->Set_SpellLearn(0);
Visible(true);
ElementAllVisible(true);
return S_OK;
@@ -56,6 +75,23 @@ const CUIObject::SPELLLEARNINFO CSpellLearn_Panel::Get_Learninfo(_int Index)
return static_cast(m_pSpellLearn_Data)->Get_SpellLearn(Index);
}
+void CSpellLearn_Panel::Set_Learn(_int Index)
+{
+ m_fTime = 0.f;
+ static_cast(m_pSpellLearn)->Change_Image(Index);
+ static_cast(m_pSpellLearn_MovePointer)->Set_SpellLearn(Index);
+ static_cast(m_pSpellLearn_ChaserPointer)->Set_SpellLearn(Index);
+ static_cast(m_pSpellLearn_Name)->Set_Name(Index);
+ static_cast(m_pSpellLearn_Overlay)->Set_SpellLearn(Index);
+ static_cast(m_pSpellLearn_Slot)->Set_SpellLearn(Index);
+ for (size_t i = 0; i < m_pBooster.size(); ++i)
+ {
+ static_cast(m_pBooster[i])->Move(Get_Learninfo(Index).Booster[i].m128_f32[0],
+ Get_Learninfo(Index).Booster[i].m128_f32[1]);
+ static_cast(m_pBooster[i])->Reset();
+ }
+}
+
void CSpellLearn_Panel::Priority_Update(_float fTimeDelta)
{
if (!__super::Chack_Visible())
@@ -82,11 +118,90 @@ void CSpellLearn_Panel::Update(_float fTimeDelta)
{
Index++;
}
- static_cast(m_pSpellLearn)->Change_Image(Index);
- static_cast(m_pSpellLearn_MovePointer)->Set_SpellLearn(Index);
- static_cast(m_pSpellLearn_Name)->Set_Name(Index);
+ Set_Learn(Index);
}
+ if (static_cast(m_pSpellLearn_MovePointer)->Get_MoveStart() == true)
+ {
+ m_fTime += fTimeDelta;
+
+ for (size_t i = 0; i < m_pBooster.size(); ++i)
+ {
+ m_PointerStates[i].bPerHit = m_PointerStates[i].bHit;
+
+ _bool bPointer = Chack_Element(static_cast(m_pBooster[i])->Get_Position(),
+ static_cast(m_pSpellLearn_MovePointer)->Get_Position(),
+ static_cast(m_pSpellLearn_MovePointer)->Get_Current_Size().x,
+ static_cast(m_pSpellLearn_MovePointer)->Get_Current_Size().x);
+
+ m_PointerStates[i].bHit = bPointer;
+
+ if (m_PointerStates[i].bHit == true && m_PointerStates[i].bPerHit == false)
+ {
+ m_Booster.iBoosterIndex = _int(i);
+ m_Booster.bBoosterOn = true;
+ Function_Callback(TEXT("Booster"), &m_Booster);
+ }
+
+ if (m_PointerStates[i].bHit == false && m_PointerStates[i].bPerHit == true)
+ {
+ m_Booster.iBoosterIndex = _int(i);
+ m_Booster.bBoosterOn = false;
+ Function_Callback(TEXT("Booster"), &m_Booster);
+ }
+ }
+
+ for (size_t i = 0; i < m_pBooster.size(); ++i)
+ {
+ m_ChaseStates[i].bPerHit = m_ChaseStates[i].bHit;
+
+ _bool bPointer = Chack_Element(static_cast(m_pBooster[i])->Get_Position(),
+ static_cast(m_pSpellLearn_ChaserPointer)->Get_Position(),
+ static_cast(m_pSpellLearn_ChaserPointer)->Get_Current_Size().x,
+ static_cast(m_pSpellLearn_ChaserPointer)->Get_Current_Size().x);
+
+ m_ChaseStates[i].bHit = bPointer;
+
+ if (m_ChaseStates[i].bHit == true && m_ChaseStates[i].bPerHit == false)
+ {
+ m_Booster.iBoosterIndex = _int(i);
+ m_Booster.bBoosterOn = true;
+ Function_Callback(TEXT("BoosterOff"), &m_Booster);
+ }
+
+ static_cast(m_pSpellLearn_Overlay)->Set_Count(
+ static_cast(m_pSpellLearn_MovePointer)->Get_SpellTrail());
+
+ }
+
+ if (m_fTime >= 1.f)
+ {
+ static_cast(m_pSpellLearn_ChaserPointer)->Set_FadeIn();
+ }
+
+ if (m_fTime >= 2.f)
+ {
+ static_cast(m_pSpellLearn_ChaserPointer)->Set_Move();
+
+ if (_bool bPointer = Chack_Element(static_cast(m_pSpellLearn_MovePointer)->Get_Position(),
+ static_cast(m_pSpellLearn_ChaserPointer)->Get_Position(),
+ static_cast(m_pSpellLearn_MovePointer)->Get_Current_Size().x,
+ static_cast(m_pSpellLearn_ChaserPointer)->Get_Current_Size().x) == true)
+ {
+ Set_Learn(Index);
+
+ m_Booster.iBoosterIndex = _int(-1);
+ m_Booster.bBoosterOn = false;
+ Function_Callback(TEXT("Booster"), &m_Booster);
+ for (size_t i = 0; i < m_PointerStates.size(); ++i)
+ {
+ m_PointerStates[i].bPerHit = false;
+ m_PointerStates[i].bHit = false;
+ }
+ }
+
+ }
+ }
__super::Update(fTimeDelta);
}
@@ -213,6 +328,36 @@ HRESULT CSpellLearn_Panel::Ready_Element(void* pArg)
}
Add_Element(TEXT("SpellLearn_MovePointer"), m_pSpellLearn_MovePointer);
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_ChaserPointer))))
+ {
+ return E_FAIL;
+ }
+ Add_Element(TEXT("SPellLeam_ChaserPointer"), m_pSpellLearn_ChaserPointer);
+
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_Slot))))
+ {
+ return E_FAIL;
+ }
+ Add_Element(TEXT("SpellLearn_Slot"), m_pSpellLearn_Slot);
+
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_Overlay))))
+ {
+ return E_FAIL;
+ }
+ Add_Element(TEXT("SpellLearn_Overlay"), m_pSpellLearn_Overlay);
+
+ for (_int i = 0; i < 3; ++i)
+ {
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_Booster))))
+ {
+ return E_FAIL;
+ }
+
+ static_cast(m_pSpellLearn_Booster)->Set_Index(i);
+
+ m_pBooster.push_back(m_pSpellLearn_Booster);
+ }
+
return S_OK;
}
diff --git a/Jusin154_Team3D/Editor/Private/SpellLearn_Slot.cpp b/Jusin154_Team3D/Editor/Private/SpellLearn_Slot.cpp
new file mode 100644
index 000000000..f7d879eaf
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/SpellLearn_Slot.cpp
@@ -0,0 +1,283 @@
+#include "pch.h"
+#include "SpellLearn_Slot.h"
+#include "GameInstance.h"
+
+CSpellLearn_Slot::CSpellLearn_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ :CElementObject(pDevice, pContext)
+{
+}
+
+CSpellLearn_Slot::CSpellLearn_Slot(const CSpellLearn_Slot& rhs)
+ :CElementObject(rhs)
+{
+}
+
+HRESULT CSpellLearn_Slot::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CSpellLearn_Slot::Initialize(void* pArg)
+{
+ CUIObject::UIOBJECT_DESC Desc{};
+
+ Desc.fX = 380.f;
+ Desc.fY = -30.f;
+ Desc.fSizeX = 105.f;
+ Desc.fSizeY = 105.f;
+
+ m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
+
+ if (FAILED(__super::Initialize(&Desc)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Ready_Components(pArg)))
+ {
+ return E_FAIL;
+ }
+
+ m_fTimeMult = 3.f;
+ m_fAngle = XMConvertToRadians(135.f);
+ m_fAlpha = 1.f;
+ m_fAlphaTime = 1.f;
+ m_fMoveSpeed = 10.f;
+ m_fLerpX = 600.f;
+ m_fLerpY = 100.f;
+ static_cast(m_pOwner)->Add_Function(TEXT("LearnClear"), [this](void* p) {this->Clear(); });
+ return S_OK;
+}
+
+void CSpellLearn_Slot::Priority_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ __super::Priority_Update(fTimeDelta);
+}
+
+void CSpellLearn_Slot::Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+
+ if (m_bFadeIn == true)
+ {
+ if (m_fAlpha <= 1.f)
+ m_fAlpha += fTimeDelta * m_fAlphaTime;
+
+ if (m_fAlpha >= 1.f)
+ {
+ m_bFadeIn = false;
+ m_fAlpha = 1.f;
+ }
+ }
+
+ if (m_bFadeOut == true)
+ {
+ if (m_fAlpha >= 0.f)
+ m_fAlpha -= fTimeDelta;
+
+ if (m_fAlpha <= 0.f)
+ {
+ m_bFadeOut = false;
+ m_fAlpha = 0.f;
+ }
+ }
+
+ if (m_bClear == true)
+ {
+ SizeUp(fTimeDelta * m_fTimeMult * m_fMoveSpeed);
+ }
+
+ if (m_fSizeUp == true)
+ {
+ if (Start_Lerp(fTimeDelta * m_fTimeMult * m_fMoveSpeed) == true)
+ {
+ m_fSizeUp = false;
+ }
+ }
+
+ m_fTime += fTimeDelta * m_fTimeMult;
+ __super::Update(fTimeDelta);
+}
+
+void CSpellLearn_Slot::Late_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ if (m_bVisible) {
+ m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
+ }
+ __super::Late_Update(fTimeDelta);
+}
+
+HRESULT CSpellLearn_Slot::Render()
+{
+ if (FAILED(Bind_ShaderResources()))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::SLOT))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Bind_Resources()))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Render()))
+ {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+_vector CSpellLearn_Slot::Get_WorldPostion()
+{
+ return m_pTransformCom->Get_State(STATE::POSITION);
+}
+
+HRESULT CSpellLearn_Slot::Bind_ShaderResources()
+{
+ if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fAngle", &m_fAngle, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_iSpellType", &m_iSpellType, sizeof(_int))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fAngle", &m_fAngle, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ return S_OK;
+}
+
+HRESULT CSpellLearn_Slot::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_ActionItemGoldleaf_4K"), 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 CSpellLearn_Slot::Set_SpellLearn(_int Index)
+{
+ MoveX(static_cast(m_pOwner)->Get_Learninfo(Index).fEndPosition.x);
+ MoveY(static_cast(m_pOwner)->Get_Learninfo(Index).fEndPosition.y);
+ SizeUpdate(m_fOrigin_Size.x, m_fOrigin_Size.y);
+ m_fSizeUp = false;
+ m_bClear = false;
+}
+
+void CSpellLearn_Slot::Clear()
+{
+ m_bClear = true;
+}
+
+void CSpellLearn_Slot::SizeUp(_float fSizeX)
+{
+ m_fSizeX += fSizeX;
+ m_fSizeY += fSizeX;
+
+ if (160.f <= m_fSizeX + fSizeX)
+ {
+ m_fSizeX = 160.f;
+ m_fSizeY = 160.f;
+ m_bClear = false;
+ m_fSizeUp = true;
+ }
+}
+
+CSpellLearn_Slot* CSpellLearn_Slot::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CSpellLearn_Slot* pInstance = new CSpellLearn_Slot(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CSpellLearn_Slot");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CSpellLearn_Slot::Clone(void* pArg, CGameObject* pOwner)
+{
+ CSpellLearn_Slot* pInstance = new CSpellLearn_Slot(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CSpellLearn_Slot");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CSpellLearn_Slot::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pDiffuse_TextureCom);
+ SAFE_RELEASE(m_pShaderCom);
+ SAFE_RELEASE(m_pVIBufferCom);
+}
+
+void CSpellLearn_Slot::Describe_Entity()
+{
+}
diff --git a/Jusin154_Team3D/Editor/Public/Editor_Define.h b/Jusin154_Team3D/Editor/Public/Editor_Define.h
index 717e4bb92..b972a447d 100644
--- a/Jusin154_Team3D/Editor/Public/Editor_Define.h
+++ b/Jusin154_Team3D/Editor/Public/Editor_Define.h
@@ -34,7 +34,7 @@ namespace Editor
REVELIO, POTION, MAGIC_ITEM, SPELL_PREVIEW, SPELL_HEADER,
SPELL_HEADER_LINE, SPELL_DRAG, CAMERA_LOCKON, LODING_SCREEN,
ENEMY_HPBAR, BOSS_HPBAR, QUEST_BORDER, QUEST_INFO, QUEST_STATUS, BROOMSTICK,
- SPELL_LEARN, SPELLLEARNCOLOR,
+ SPELL_LEARN, SPELLLEARNCOLOR, SPELLLEARNBOOSTER,
ENEMY_DETECTION, INTERACTION_OBJECT, END };
enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, BLEND, BLEND_NOWORLD, BLOOM, BLOOM_NOWORLD, BLUR_NO_EMMISVE, BLUR_NO_WORLD_NO_EMISSIVE, WEIGHTBLEND_FOR_BLEND, DEPTH_STOP, WB_CULLING, SCREEN_FX , DISTORTION , NONPOS , NONPOS_BLUR, BLUR_MESH, END };
enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, UVALPHABLEND, MAGIC_METER, SPELL_LIST, EESSENTIAL_SPELL_SOLT, EESSENTIAL_SPELL, COLOR, SPELL_HOVER, SPELL_SLOT_EFFECT, SPELL_SLOT, SPELL_LOCK, QUEST_SLOT, END };
diff --git a/Jusin154_Team3D/Editor/Public/SpellLearn.h b/Jusin154_Team3D/Editor/Public/SpellLearn.h
index d7d9db4b4..478448067 100644
--- a/Jusin154_Team3D/Editor/Public/SpellLearn.h
+++ b/Jusin154_Team3D/Editor/Public/SpellLearn.h
@@ -27,7 +27,11 @@ class CSpellLearn final : public CElementObject
public:
HRESULT Change_Image(_int SpellID);
- void Set_Pointer(class CSpellLearn_MovePointer* Pointer);
+ void Set_Pointer(class CSpellLearn_MovePointer* Pointer, class CSpellLearn_ChaserPointer* Chase);
+
+private:
+ void Clear();
+
private:
CTexture* m_pDiffuse_TextureCom = { nullptr };
CTexture* m_pDiffuse_TextureCom1 = { nullptr };
@@ -35,9 +39,24 @@ class CSpellLearn final : public CElementObject
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
class CSpellLearn_MovePointer* m_pPointer = { nullptr };
+ class CSpellLearn_ChaserPointer* m_pChasePointer = { nullptr };
_float2 m_vPointerPosition{};
_float3 m_vPointerScale{};
+
+ _float2 m_vChasePosition{};
+ _float3 m_vChaseScale{};
+
+ _bool m_bReset{};
+
+ _int m_iIndex{};
+ _int m_iTrailIndex{};
+ vector<_float2> m_Trail;
+
+ _int m_iChaseiTrailIndex{};
+ vector<_float2> m_ChaseTrail;
+ vector<_vector> m_MoveLine;
+
public:
static CSpellLearn* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
diff --git a/Jusin154_Team3D/Editor/Public/SpellLearn_Booster.h b/Jusin154_Team3D/Editor/Public/SpellLearn_Booster.h
new file mode 100644
index 000000000..6020654e3
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Public/SpellLearn_Booster.h
@@ -0,0 +1,63 @@
+#pragma once
+
+#include "Editor_Define.h"
+#include "ElementObject.h"
+
+NS_BEGIN(Editor)
+
+class CSpellLearn_Booster final : public CElementObject
+{
+private:
+ struct Booster
+ {
+ _bool bBoosterOn = { false };
+ _int iBoosterIndex{};
+ };
+private:
+ CSpellLearn_Booster(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CSpellLearn_Booster(const CSpellLearn_Booster& rhs);
+ virtual ~CSpellLearn_Booster() = 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 BoosterOn(void* pArg);
+ void BoosterOff(void* pArg);
+
+ void Set_Index(_int iIndex);
+ void Reset();
+
+private:
+ void Clear();
+
+private:
+ CTexture* m_pDiffuse_TextureCom = { nullptr };
+ CTexture* m_pDiffuse_TextureCom1 = { nullptr };
+ CTexture* m_pDiffuse_TextureCom2 = { nullptr };
+ CTexture* m_pDiffuse_TextureCom3 = { nullptr };
+ CShader* m_pShaderCom = { nullptr };
+ CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
+
+ _bool m_bBoosterOn = { false };
+ _bool m_bBoosterOff = { false };
+ _float4 m_fImagePosi{};
+ _int m_iIndex{};
+public:
+ static CSpellLearn_Booster* 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/SpellLearn_ChaserPointer.h b/Jusin154_Team3D/Editor/Public/SpellLearn_ChaserPointer.h
new file mode 100644
index 000000000..319b5109d
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Public/SpellLearn_ChaserPointer.h
@@ -0,0 +1,54 @@
+#pragma once
+
+#include "Editor_Define.h"
+#include "ElementObject.h"
+
+NS_BEGIN(Editor)
+
+class CSpellLearn_ChaserPointer final : public CElementObject
+{
+private:
+ CSpellLearn_ChaserPointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CSpellLearn_ChaserPointer(const CSpellLearn_ChaserPointer& rhs);
+ virtual ~CSpellLearn_ChaserPointer() = 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_SpellLearn(_int Index);
+ void Set_Move();
+private:
+ void Line(_float fTime);
+ void SpeedUp();
+ void Clear();
+private:
+ CTexture* m_pDiffuse_TextureCom = { nullptr };
+ CShader* m_pShaderCom = { nullptr };
+ CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
+
+
+ _bool m_bMoveStart = { false };
+
+ _int m_iLineIndex{};
+ _int m_iCurrentLine{};
+ vector<_vector> m_MoveLine;
+
+public:
+ static CSpellLearn_ChaserPointer* 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/SpellLearn_LookPointer.h b/Jusin154_Team3D/Editor/Public/SpellLearn_LookPointer.h
new file mode 100644
index 000000000..ca0580012
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Public/SpellLearn_LookPointer.h
@@ -0,0 +1,51 @@
+#pragma once
+
+#include "Editor_Define.h"
+#include "ElementObject.h"
+
+NS_BEGIN(Editor)
+
+class CSpellLearn_LookPointer final : public CElementObject
+{
+private:
+ CSpellLearn_LookPointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CSpellLearn_LookPointer(const CSpellLearn_LookPointer& rhs);
+ virtual ~CSpellLearn_LookPointer() = 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_SpellLearn(_int Index);
+
+private:
+ CTexture* m_pDiffuse_TextureCom = { nullptr };
+ CShader* m_pShaderCom = { nullptr };
+ CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
+
+
+ _bool m_bMoveStart = { false };
+
+ _int m_iLineIndex{};
+ _int m_iCurrentLine{};
+ vector<_vector> m_MoveLine;
+ _float m_localX{};
+ _float m_localY{};
+public:
+ static CSpellLearn_LookPointer* 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/SpellLearn_MovePointer.h b/Jusin154_Team3D/Editor/Public/SpellLearn_MovePointer.h
index b3c0b4b60..5a7c44978 100644
--- a/Jusin154_Team3D/Editor/Public/SpellLearn_MovePointer.h
+++ b/Jusin154_Team3D/Editor/Public/SpellLearn_MovePointer.h
@@ -7,6 +7,12 @@ NS_BEGIN(Editor)
class CSpellLearn_MovePointer final : public CElementObject
{
+private:
+ struct Booster
+ {
+ _bool bBoosterOn = { false };
+ _int iBoosterIndex{};
+ };
private:
CSpellLearn_MovePointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
CSpellLearn_MovePointer(const CSpellLearn_MovePointer& rhs);
@@ -27,23 +33,29 @@ class CSpellLearn_MovePointer final : public CElementObject
public:
void Set_SpellLearn(_int Index);
-
+ _int Get_SpellTrail();
+ _bool Get_MoveStart();
private:
- void Line(_float fTime);
+ void Line(_float fTime, _float2 fMouse);
+ void Set_Booster(void* pArg);
private:
CTexture* m_pDiffuse_TextureCom = { nullptr };
CShader* m_pShaderCom = { nullptr };
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
+ class SpellLearm_LookPointer* m_pSpellLeam_LookPointer = { nullptr };
_bool m_bMoveStart = { false };
+ _bool m_bBooster = { false };
+
+ Booster m_Booster;
_int m_iLineIndex{};
_int m_iCurrentLine{};
vector<_vector> m_MoveLine;
-
+ vector<_vector> m_Boosters;
public:
static CSpellLearn_MovePointer* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
diff --git a/Jusin154_Team3D/Editor/Public/SpellLearn_Overlay.h b/Jusin154_Team3D/Editor/Public/SpellLearn_Overlay.h
new file mode 100644
index 000000000..a8f0d2a5e
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Public/SpellLearn_Overlay.h
@@ -0,0 +1,63 @@
+#pragma once
+
+#include "Editor_Define.h"
+#include "ElementObject.h"
+
+NS_BEGIN(Editor)
+
+class CSpellLearn_Overlay final : public CElementObject
+{
+private:
+ CSpellLearn_Overlay(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CSpellLearn_Overlay(const CSpellLearn_Overlay& rhs);
+ virtual ~CSpellLearn_Overlay() = 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_SpellLearn(_int Index);
+ void Set_Count(_int Index);
+
+private:
+ void Clear();
+ void Compute_UI(_uint SpellID);
+ void Update_Trail(_float fTimeaDalta);
+ void SizeUp(_float fSizeX);
+private:
+ CTexture* m_pDiffuse_TextureCom = { nullptr };
+ CTexture* m_pDiffuse_TextureCom1 = { nullptr };
+ CTexture* m_pDiffuse_TextureCom2 = { nullptr };
+ CTexture* m_pDiffuse_TextureCom3 = { nullptr };
+ CShader* m_pShaderCom = { nullptr };
+ CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
+
+ _int m_iImageFrameX{};
+ _int m_iImageFrameY{};
+ _float m_fFrame{};
+ _float4 m_vUV{};
+
+ _float m_fSpellLearn{};
+ _float m_fTrail{};
+ _float m_fTargetTrail{};
+ _bool m_bClear = { false };
+ _bool m_fSizeUp = { false };
+public:
+ static CSpellLearn_Overlay* 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/SpellLearn_Panel.h b/Jusin154_Team3D/Editor/Public/SpellLearn_Panel.h
index 5405b5c18..6e2fd4bd5 100644
--- a/Jusin154_Team3D/Editor/Public/SpellLearn_Panel.h
+++ b/Jusin154_Team3D/Editor/Public/SpellLearn_Panel.h
@@ -11,7 +11,17 @@ NS_BEGIN(Editor)
class CSpellLearn_Panel final : public CPanelObject
{
-
+private:
+ struct Booster
+ {
+ _bool bBoosterOn = { false };
+ _int iBoosterIndex{};
+ };
+ struct State
+ {
+ _bool bHit = { false };
+ _bool bPerHit = { false };
+ };
private:
CSpellLearn_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
CSpellLearn_Panel(const CSpellLearn_Panel& rhs);
@@ -34,6 +44,8 @@ class CSpellLearn_Panel final : public CPanelObject
public:
virtual const SPELLLEARNINFO Get_Learninfo(_int Index) override;
+ void Set_Learn(_int Index);
+
private:
CTexture* m_pDiffuse_TextureCom = { nullptr };
CTexture* m_pDiffuse_TextureCom1 = { nullptr };
@@ -45,10 +57,19 @@ class CSpellLearn_Panel final : public CPanelObject
CGameObject* m_pSpellLearn_Name = { nullptr };
CGameObject* m_pSpellLearn = { nullptr };
CGameObject* m_pSpellLearn_MovePointer = { nullptr };
+ CGameObject* m_pSpellLearn_ChaserPointer = { nullptr };
CGameObject* m_pSpellLearn_Data = { nullptr };
+ CGameObject* m_pSpellLearn_Booster = { nullptr };
+ CGameObject* m_pSpellLearn_Slot= { nullptr };
+ CGameObject* m_pSpellLearn_Overlay = { nullptr };
_int Index{};
+ vector m_pBooster;
+ Booster m_Booster;
+ State m_State;
+ vector m_PointerStates;
+ vector m_ChaseStates;
public:
static CSpellLearn_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
diff --git a/Jusin154_Team3D/Editor/Public/SPellLeam_SpeedPointer.h b/Jusin154_Team3D/Editor/Public/SpellLearn_Slot.h
similarity index 64%
rename from Jusin154_Team3D/Editor/Public/SPellLeam_SpeedPointer.h
rename to Jusin154_Team3D/Editor/Public/SpellLearn_Slot.h
index a2c881d6d..d8b8382e6 100644
--- a/Jusin154_Team3D/Editor/Public/SPellLeam_SpeedPointer.h
+++ b/Jusin154_Team3D/Editor/Public/SpellLearn_Slot.h
@@ -5,12 +5,12 @@
NS_BEGIN(Editor)
-class CSPellLeam_SpeedPointer final : public CElementObject
+class CSpellLearn_Slot final : public CElementObject
{
private:
- CSPellLeam_SpeedPointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
- CSPellLeam_SpeedPointer(const CSPellLeam_SpeedPointer& rhs);
- virtual ~CSPellLeam_SpeedPointer() = default;
+ CSpellLearn_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CSpellLearn_Slot(const CSpellLearn_Slot& rhs);
+ virtual ~CSpellLearn_Slot() = default;
public:
virtual void Priority_Update(_float fTimeDelta);
@@ -19,19 +19,28 @@ class CSPellLeam_SpeedPointer final : public CElementObject
virtual HRESULT Render() override;
virtual _vector Get_WorldPostion() override;
+
private:
virtual HRESULT Bind_ShaderResources() override;
virtual HRESULT Ready_Components(void* pArg) override;
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
+public:
+ void Set_SpellLearn(_int Index);
+ void Clear();
+
+private:
+ void SizeUp(_float fSizeX);
private:
CTexture* m_pDiffuse_TextureCom = { nullptr };
CShader* m_pShaderCom = { nullptr };
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
+ _bool m_bClear = { false };
+ _bool m_fSizeUp = { false };
public:
- static CSPellLeam_SpeedPointer* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ static CSpellLearn_Slot* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
virtual void Free() override;
void Describe_Entity() override;
diff --git a/Jusin154_Team3D/Engine/Private/ElementObject.cpp b/Jusin154_Team3D/Engine/Private/ElementObject.cpp
index 92e573c9f..3e70c723b 100644
--- a/Jusin154_Team3D/Engine/Private/ElementObject.cpp
+++ b/Jusin154_Team3D/Engine/Private/ElementObject.cpp
@@ -158,6 +158,46 @@ _bool CElementObject::Start_Lerp(_float fTimeDelta)
}
}
+_bool CElementObject::Start_Lerp_Speed(_float fTimeDelta, _float2 MousePoint)
+{
+ _vector Mouse = XMVectorSet(MousePoint.x, MousePoint.y, 1.f, 1.f);
+ _vector Pos = m_fCurrent_Position;
+ _vector Target = m_vLerp_Position;
+
+ _vector Dir = XMVectorSubtract(Target, Pos);
+ _vector MouseDir = XMVectorSubtract(Mouse, Pos);
+
+ _vector NorDir = XMVector3Normalize(Dir);
+ _vector NorMouse = XMVector3Normalize(MouseDir);
+
+ _float SameDir = XMVectorGetX(XMVector3Dot(NorDir, NorMouse));
+ _float Weight = max(0.5f, SameDir);
+ _vector LenVec = XMVector3Length(Dir);
+ _float Distance = XMVectorGetX(LenVec);
+
+ _float move = m_fMoveSpeed * fTimeDelta * Weight;
+
+ if (Distance <= move)
+ {
+ m_fX = m_vLerp_Position.m128_f32[0];
+ m_fY = m_vLerp_Position.m128_f32[1];
+ return true;
+ }
+
+ else
+ {
+ XMVECTOR DirNorm = XMVector3Normalize(Dir);
+ m_fX = (Pos + DirNorm * move).m128_f32[0];
+ m_fY = (Pos + DirNorm * move).m128_f32[1];
+ return false;
+ }
+}
+
+_bool CElementObject::Set_Trgger()
+{
+ return _bool();
+}
+
void CElementObject::Reset_Pos(_float fTimeDelta)
{
_vector Pos = m_fCurrent_Position;
diff --git a/Jusin154_Team3D/Engine/Private/PanelObject.cpp b/Jusin154_Team3D/Engine/Private/PanelObject.cpp
index ea19fd18c..df16b10e4 100644
--- a/Jusin154_Team3D/Engine/Private/PanelObject.cpp
+++ b/Jusin154_Team3D/Engine/Private/PanelObject.cpp
@@ -183,6 +183,19 @@ _bool CPanelObject::Chack_Visible()
return m_bVisible;
}
+_bool CPanelObject::Chack_Element(_float2 Position, _float2 Target, _float Scale, _float TargetScale)
+{
+ _vector vPos = XMVectorSet(Position.x, Position.y, 0.f, 1.f);
+ _vector vTarget = XMVectorSet(Target.x, Target.y, 0.f, 1.f);
+
+ _float Dir = XMVectorGetX(XMVector3Length(XMVectorSubtract(vTarget, vPos)));
+
+ if (Dir <= (Scale * 0.5f) + (TargetScale * 0.5f))
+ return true;
+
+ return false;
+}
+
CGameObject* CPanelObject::Find_Element(const wstring& Name)
{
auto iter = m_Elements_map.find(Name);
diff --git a/Jusin154_Team3D/Engine/Private/UIObject.cpp b/Jusin154_Team3D/Engine/Private/UIObject.cpp
index cf9262857..f7a2f40b1 100644
--- a/Jusin154_Team3D/Engine/Private/UIObject.cpp
+++ b/Jusin154_Team3D/Engine/Private/UIObject.cpp
@@ -377,7 +377,7 @@ _bool CUIObject::Start_Lerp(_float fTimeDelta)
return false;
}
-_bool CUIObject::Start_Bezier(_float fTimeDelta)
+_bool CUIObject::Start_Lerp_Speed(_float fTimeDelta, _float2 Mouse_Point)
{
return _bool();
}
@@ -538,6 +538,11 @@ _float2 CUIObject::Get_Font()
return _float2(m_fFontX, m_fFontY);
}
+_float2 CUIObject::Get_PerPosition()
+{
+ return m_fPerPosition;
+}
+
void CUIObject::Free()
{
__super::Free();
diff --git a/Jusin154_Team3D/Engine/Public/ElementObject.h b/Jusin154_Team3D/Engine/Public/ElementObject.h
index 90b5c68b5..363435267 100644
--- a/Jusin154_Team3D/Engine/Public/ElementObject.h
+++ b/Jusin154_Team3D/Engine/Public/ElementObject.h
@@ -31,6 +31,8 @@ class ENGINE_DLL CElementObject abstract : public CUIObject
virtual _float Get_Nine_Slice_Bottom() override;
virtual _bool Start_Lerp(_float fTimeDelta) override;
+ virtual _bool Start_Lerp_Speed(_float fTimeDelta, _float2 MousePoint) override;
+ virtual _bool Set_Trgger();
virtual void Reset_Pos(_float fTimeDelta)override;
virtual void Start_Size_Lerp(_float fTimeDelta) override;
virtual void Reset_Size_Lerp(_float fTimeDelta) override;
@@ -43,6 +45,9 @@ class ENGINE_DLL CElementObject abstract : public CUIObject
_float m_fBezierTime = 0;
+ vector<_vector> m_vector;
+
+
public:
virtual void Free() override;
};
diff --git a/Jusin154_Team3D/Engine/Public/PanelObject.h b/Jusin154_Team3D/Engine/Public/PanelObject.h
index c661f9c47..9e790d547 100644
--- a/Jusin154_Team3D/Engine/Public/PanelObject.h
+++ b/Jusin154_Team3D/Engine/Public/PanelObject.h
@@ -33,10 +33,12 @@ class ENGINE_DLL CPanelObject abstract : public CUIObject
virtual void Add_Function(wstring Name, function Evnet) override;
virtual void Function_Callback(wstring Name, void* pArg = nullptr) override;
+
protected:
virtual void Add_Element(wstring Name, class CGameObject* pElement);
virtual _bool Chack_Visible() override;
+ virtual _bool Chack_Element(_float2 Position, _float2 Target, _float Scale, _float TargetScale);
protected:
vector m_Elements; // 패널이 엘리먼츠를 관리하기 위해 만듬
vector m_ElementName; // 엘리멘트들의 이름을 전해주기 위해서
diff --git a/Jusin154_Team3D/Engine/Public/UIObject.h b/Jusin154_Team3D/Engine/Public/UIObject.h
index b2104dc38..019f8e113 100644
--- a/Jusin154_Team3D/Engine/Public/UIObject.h
+++ b/Jusin154_Team3D/Engine/Public/UIObject.h
@@ -76,10 +76,14 @@ typedef struct tagCurrentQeustSerectInfo
typedef struct tagSpellLearnInfo
{
- _wstring pSpellName{};
- _wstring pImageName{};
- _float fSpellSize{};
- _float2 fStartPosition{};
+ _wstring pSpellName{};
+ _wstring pImageName{};
+ _int iSpellID{};
+ _int iSpellType{};
+ _float fSpellSize{};
+ _float2 fStartPosition{};
+ _float2 fEndPosition{};
+ vector<_vector> Booster;
vector<_vector> Lines;
}SPELLLEARNINFO;
@@ -152,7 +156,7 @@ typedef struct tagSpellLearnInfo
virtual void Lerp_PosX(_float PosX);
virtual void Lerp_PosY(_float PosY);
virtual _bool Start_Lerp(_float fTimeDelta);
- virtual _bool Start_Bezier(_float fTimeDelta);
+ virtual _bool Start_Lerp_Speed(_float fTimeDelta, _float2 Mouse_Point);
virtual void Reset_Pos(_float fTimeDelta);
virtual void Start_Size_Lerp(_float fTimeDelta);
virtual void Reset_Size_Lerp(_float fTimeDelta);
@@ -190,6 +194,7 @@ typedef struct tagSpellLearnInfo
virtual void Set_FontX(_float fFontX);
virtual void Set_FontY(_float fFontY);
virtual _float2 Get_Font();
+ virtual _float2 Get_PerPosition();
protected:
_vector m_fOrigin_Position_vector{};
_float2 m_fOrigin_Position{};
@@ -246,6 +251,8 @@ typedef struct tagSpellLearnInfo
_float m_fFontX{};
_float m_fFontY{};
_float m_fFontOffSet{};
+
+ _float2 m_fPerPosition{};
protected:
virtual HRESULT Initialize_Prototype();
virtual HRESULT Initialize(void* pArg);