diff --git a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl
index da3d61395..a9d7fff5f 100644
--- a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl
+++ b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl
@@ -120,6 +120,20 @@ PS_OUT PS_MAIN(PS_IN In)
return Out;
}
+PS_OUT PS_Texture_Color(PS_IN In)
+{
+ PS_OUT Out;
+ float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
+ float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
+ float4 Color = g_Texture1.Sample(DefaultSampler, In.vTexcoord);
+
+ tex1.rgb *= Color.rgb;
+
+ tex1.a *= Alpha;
+ Out.vColor = tex1;
+ return Out;
+}
+
PS_OUT PS_Logo(PS_IN In)
{
PS_OUT Out;
@@ -517,12 +531,15 @@ PS_OUT PS_Rotation(PS_IN In)
float2 center = float2(0.5f, 0.5f);
float2 uv = In.vTexcoord - center;
- float2 Rotation = In.vTexcoord;
+ float2 Rotation;
Rotation.x = uv.x * cos(g_fMapAngle) - uv.y * sin(g_fMapAngle);
Rotation.y = uv.x * sin(g_fMapAngle) + uv.y * cos(g_fMapAngle);
Rotation += center;
- float4 tex1 = g_Texture.Sample(ClampSampler, Rotation);
+ float4 tex1 = g_Texture.Sample(BorderZeroLinearSampler, Rotation);
+
+ if (tex1.a <= 0.f)
+ discard;
color = tex1;
@@ -1988,6 +2005,16 @@ technique11 PosTexTechnique11
PixelShader = compile ps_5_0 PS_MAIN();
}
+ pass Texture_Color
+ {
+ SetRasterizerState(RS_Default);
+ SetDepthStencilState(DSS_Default, 0);
+ SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
+ VertexShader = compile vs_5_0 VS_MAIN();
+ GeometryShader = NULL;
+ PixelShader = compile ps_5_0 PS_Texture_Color();
+ }
+
pass Logo
{
SetRasterizerState(RS_Default);
diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj
index 60559d5fb..6cab1a64e 100644
--- a/Jusin154_Team3D/Client/Default/Client.vcxproj
+++ b/Jusin154_Team3D/Client/Default/Client.vcxproj
@@ -163,6 +163,12 @@ call Update_Resources.bat
+
+
+
+
+
+
@@ -375,6 +381,12 @@ call Update_Resources.bat
+
+
+
+
+
+
diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
index eda2de299..2c5421783 100644
--- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
+++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
@@ -596,9 +596,6 @@
04.Mechanic\Quest
-
- 02.GameObjects\BroomRaceManager
-
02.GameObjects\UI\Interaction_Key
@@ -656,6 +653,27 @@
04.Mechanic\State\State_Combat\State_Skill
+
+ 02.GameObjects\BroomRaceManager
+
+
+ 04.Mechanic\Skill\SpellLearn_Data
+
+
+ 02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn
+
+
+ 02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_MovePointer
+
+
+ 02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Name
+
+
+ 02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel
+
+
+ 02.GameObjects\UI\SpellLearn_Canvas
+
@@ -1371,6 +1389,24 @@
{b494a051-9dcc-4739-9048-13fb963c441f}
+
+ {c00fdde9-9768-475d-bde2-d89305b759d9}
+
+
+ {1c4d53fe-facb-4a8e-9f4e-c02e3b333d07}
+
+
+ {f0015309-1656-42bb-8c06-58660586eeeb}
+
+
+ {ec3213cc-8976-4c8b-b317-6155cae388cd}
+
+
+ {7d84f56c-9d2f-483e-9ee1-2637d35ccb7d}
+
+
+ {69f95207-1e94-42f2-9690-d3e34e4ff5a9}
+
@@ -1914,9 +1950,6 @@
04.Mechanic\Quest
-
- 02.GameObjects\BroomRaceManager
-
02.GameObjects\UI\Interaction_Key
@@ -1974,6 +2007,27 @@
02.GameObjects\Effect\Effects\Lightning\LightningSide
+
+ 02.GameObjects\BroomRaceManager
+
+
+ 04.Mechanic\Skill\SpellLearn_Data
+
+
+ 02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn
+
+
+ 02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_MovePointer
+
+
+ 02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Name
+
+
+ 02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel
+
+
+ 02.GameObjects\UI\SpellLearn_Canvas
+
diff --git a/Jusin154_Team3D/Client/Private/InfoInstance.cpp b/Jusin154_Team3D/Client/Private/InfoInstance.cpp
index 38ff9bf1a..180c71d90 100644
--- a/Jusin154_Team3D/Client/Private/InfoInstance.cpp
+++ b/Jusin154_Team3D/Client/Private/InfoInstance.cpp
@@ -8,6 +8,7 @@
#include "Skill_Data.h"
#include "Quest_Data.h"
#include "Damage_Font.h"
+#include "SpellLearn_Data.h"
#include "Player.h"
IMPLEMENT_SINGLETON(CInfoInstance)
@@ -206,6 +207,18 @@ void CInfoInstance::Key_Input(_uint Input)
Event_CallBack(TEXT("Canvas_Change"), &m_eUI_State);
}
break;
+ case ENUM_CLASS(KEYINPUT::INPUT_N):
+ if (m_eUI_State == UI_STATE::GAMEPLAYER)
+ {
+ m_eUI_State = UI_STATE::SPELLNEARN;
+ Event_CallBack(TEXT("Canvas_Change"), &m_eUI_State);
+ }
+ else if (m_eUI_State == UI_STATE::SPELLNEARN)
+ {
+ m_eUI_State = UI_STATE::GAMEPLAYER;
+ Event_CallBack(TEXT("Canvas_Change"), &m_eUI_State);
+ }
+ break;
default:
break;
@@ -292,6 +305,16 @@ HRESULT CInfoInstance::Set_AcceptQuest(_int Index)
return m_pQuestInfo->Set_AcceptQuest(Index);
}
+const SPELLLEARNINFO& CInfoInstance::Get_SpellLearn(_int Index) const
+{
+ return m_pSpellLearn_Data->Get_SpellLearn(Index);
+}
+
+_int CInfoInstance::Get_SpellLearnIndex()
+{
+ return m_pSpellLearn_Data->Get_Index();
+}
+
HRESULT CInfoInstance::Regist_ActiveInteractive(CMapElement_Interactable* pInteractive)
{
if (nullptr == s_pInstance || nullptr == m_pInteractiveInfo) {
@@ -355,6 +378,10 @@ HRESULT CInfoInstance::Initialize_Information(ID3D11Device* pDevice, ID3D11Devic
if (nullptr == m_pInteractiveInfo) {
return E_FAIL;
}
+ m_pSpellLearn_Data = CSpellLearn_Data::Create(pDevice, pContext);
+ if (nullptr == m_pSpellLearn_Data) {
+ return E_FAIL;
+ }
return S_OK;
}
diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp
index 767c5a6a6..6fac4fd4c 100644
--- a/Jusin154_Team3D/Client/Private/Loader.cpp
+++ b/Jusin154_Team3D/Client/Private/Loader.cpp
@@ -113,6 +113,12 @@
#include "QuestInstance.h"
+#include "SpellLearn_Canvas.h"
+#include "SpellLearn_Panel.h"
+#include "SpellLearn_Name.h"
+#include "SpellLearn.h"
+#include "SpellLearn_MovePointer.h"
+
#include "Interaction_Key.h"
#pragma endregion
@@ -340,7 +346,7 @@ HRESULT CLoader::Loading_For_GamePlay()
isLoad_Background = true;
#endif //
#ifdef 인혁
- isLoad_Background = true;
+ isLoad_Background = false;
#endif //
#pragma region MAP_MODELS
@@ -734,6 +740,22 @@ HRESULT CLoader::Loading_For_GamePlay()
_wstring wstrFilePath = CMyTools::ToWstring(strFilePath);
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, wstrFileName,
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+
+ });
+
+ Asset_FileLoad("../Bin/Resources/Textures/SpellUnlock", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath)
+ {
+
+ _string strFilePath = pFilePath;
+ _wstring wstrFilePath = CMyTools::ToWstring(strFilePath);
+
+
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, wstrFileName,
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) {
return E_FAIL;
@@ -2074,13 +2096,39 @@ HRESULT CLoader::Loading_For_GamePlay()
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CQuest_Status::Create(m_pDevice, m_pContext))))
{
return E_FAIL;
- /* For.Prototype_GameObject_Quest_Slot*/
}
+ /* For.Prototype_GameObject_Quest_Slot*/
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CQuest_Slot::Create(m_pDevice, m_pContext))))
{
return E_FAIL;
}
+ /* For.Prototype_GameObject_SpellLearn_Canvas*/
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpellLearn_Canvas::Create(m_pDevice, m_pContext))))
+ {
+ return E_FAIL;
+ }
+ /* For.Prototype_GameObject_SpellLearn_Panel*/
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpellLearn_Panel::Create(m_pDevice, m_pContext))))
+ {
+ return E_FAIL;
+ }
+ /* For.Prototype_GameObject_SpellLearn_Name*/
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpellLearn_Name::Create(m_pDevice, m_pContext))))
+ {
+ return E_FAIL;
+ }
+ /* For.Prototype_GameObject_SpellLearn*/
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpellLearn::Create(m_pDevice, m_pContext))))
+ {
+ return E_FAIL;
+ }
+ /* For.Prototype_GameObject_SpellLearn_MovePointer*/
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpellLearn_MovePointer::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/MainApp.cpp b/Jusin154_Team3D/Client/Private/MainApp.cpp
index 09702f732..21ca68f0c 100644
--- a/Jusin154_Team3D/Client/Private/MainApp.cpp
+++ b/Jusin154_Team3D/Client/Private/MainApp.cpp
@@ -116,6 +116,12 @@ HRESULT CMainApp::Ready_Default_Setting()
if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size21"), TEXT("../Bin/Resources/Fonts/Font_size21.spritefont"))))
return E_FAIL;
+ if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size22"), TEXT("../Bin/Resources/Fonts/Font_size22.spritefont"))))
+ return E_FAIL;
+
+ if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size23"), TEXT("../Bin/Resources/Fonts/Font_size23.spritefont"))))
+ return E_FAIL;
+
if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size30"), TEXT("../Bin/Resources/Fonts/Font_size30.spritefont"))))
return E_FAIL;
diff --git a/Jusin154_Team3D/Client/Private/Player_States.cpp b/Jusin154_Team3D/Client/Private/Player_States.cpp
index 01957dbb8..16f22953d 100644
--- a/Jusin154_Team3D/Client/Private/Player_States.cpp
+++ b/Jusin154_Team3D/Client/Private/Player_States.cpp
@@ -81,6 +81,7 @@ HRESULT CPlayer::InputAction()
if (m_pGameInstance->Key_Down(DIK_X)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_X));
if (m_pGameInstance->Key_Down(DIK_G)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_G));
if (m_pGameInstance->Key_Down(DIK_Z)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_Z));
+ if (m_pGameInstance->Key_Down(DIK_N)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_N));
return S_OK;
}
}
@@ -243,6 +244,9 @@ HRESULT CPlayer::Behavior_IdleExitCheck(_float fTimeDelta)
else if (m_pGameInstance->Key_Down(DIK_Z)) {
m_pFSM->Change_State(FSMSTATE::COMBAT);
}
+ else if (m_pGameInstance->Key_Down(DIK_N)) {
+ m_pInfoInstance->Change_Canvas();
+ }
return E_FAIL;
}
diff --git a/Jusin154_Team3D/Client/Private/Quest_Slot.cpp b/Jusin154_Team3D/Client/Private/Quest_Slot.cpp
index f927a1486..11eba6548 100644
--- a/Jusin154_Team3D/Client/Private/Quest_Slot.cpp
+++ b/Jusin154_Team3D/Client/Private/Quest_Slot.cpp
@@ -102,6 +102,7 @@ void CQuest_Slot::Update(_float fTimeDelta)
}
}
Hover();
+
static_cast(m_pOwner)->Function_Callback(TEXT("QuestListHover"), &m_Info);
@@ -117,6 +118,7 @@ void CQuest_Slot::Late_Update(_float fTimeDelta)
}
if (m_bVisible)
{
+ m_pVIBufferCom->Set_Hover(m_iIndex);
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
}
__super::Late_Update(fTimeDelta);
@@ -153,14 +155,14 @@ void CQuest_Slot::Font_Size()
for (_int i = 0; i < m_iQuestCount; ++i)
{
m_fFontY = 190 + i * 85.f;
- if (m_Index == -1)
+ if (m_iIndex == -1)
{
m_Fonts[i].pFontSizeName = TEXT("Font_size20");
m_Fonts[i].m_fFontSize = _float2(m_fFontX + m_fX, m_fFontY - m_fY);
}
else
{
- if (i == m_Index)
+ if (i == m_iIndex)
{
m_Fonts[i].pFontSizeName = TEXT("Font_size30");
m_Fonts[i].m_fFontSize = _float2(m_fFontX - 10.f + m_fX, m_fFontY - 10.f - m_fY);
@@ -194,7 +196,7 @@ _int CQuest_Slot::Mousechack(POINT Mouse)
{
for (_int i = 0; i < m_iQuestCount; ++i)
{
- RECT Box = {
+ RECT Box = {
long(m_fPositionX - m_fSizeX * 0.5f),
long((m_fPositionY - (i * m_fOffSetY)) - m_fSizeY * 0.5f),
long(m_fPositionX + m_fSizeX * 0.5f),
@@ -202,11 +204,11 @@ _int CQuest_Slot::Mousechack(POINT Mouse)
if (PtInRect(&Box, Mouse))
{
+
return i;
}
}
-
return -1;
}
@@ -317,19 +319,15 @@ void CQuest_Slot::Hover()
POINT Mouse{};
Mouse.x = _long(fMouse.x);
Mouse.y = _long(fMouse.y);
-
- m_Index = Mousechack(Mouse);
- m_pVIBufferCom->Set_Hover(m_Index);
- if (m_Index != -1)
+ m_iIndex = Mousechack(Mouse);
+
+ if (m_iIndex != m_iPrevIndex)
{
- m_bHover = true;
+ m_pVIBufferCom->Set_Hover(m_iIndex);
+ Font_Size();
+ m_iPrevIndex = m_iIndex;
}
- else
- {
- m_bHover = false;
- }
- Font_Size();
}
diff --git a/Jusin154_Team3D/Client/Private/SpellLearn.cpp b/Jusin154_Team3D/Client/Private/SpellLearn.cpp
new file mode 100644
index 000000000..884254d57
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/SpellLearn.cpp
@@ -0,0 +1,252 @@
+#include "pch.h"
+#include "SpellLearn.h"
+#include "GameInstance.h"
+#include "InfoInstance.h"
+
+CSpellLearn::CSpellLearn(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ :CElementObject(pDevice, pContext)
+{
+}
+
+CSpellLearn::CSpellLearn(const CSpellLearn& rhs)
+ :CElementObject(rhs),
+ m_pInfoInstance(CInfoInstance::GetInstance())
+{
+}
+
+HRESULT CSpellLearn::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CSpellLearn::Initialize(void* pArg)
+{
+ CUIObject::UIOBJECT_DESC Desc{};
+
+ Desc.fX = 600.f;
+ Desc.fY = 0.f;
+ Desc.fSizeX = 550.f;
+ Desc.fSizeY = 550.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;
+ Change_Image(0);
+ Visible(false);
+ return S_OK;
+}
+
+void CSpellLearn::Priority_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ __super::Priority_Update(fTimeDelta);
+}
+
+void CSpellLearn::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::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::Render()
+{
+ if (FAILED(Bind_ShaderResources())) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::COLOR)))) {
+ 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::Get_WorldPostion()
+{
+ return m_pTransformCom->Get_State(STATE::POSITION);
+}
+
+HRESULT CSpellLearn::Bind_ShaderResources()
+{
+ if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom1->Bind_ShaderResource(m_pShaderCom, "g_Texture1", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_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::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_Levioso"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_Goldleaf_Large"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
+ {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CSpellLearn::Change_Image(_int SpellID)
+{
+ _wstring pName = TEXT("Prototype_Texture_");
+ _wstring pImageName = pName + m_pInfoInstance->Get_SpellLearn(SpellID).pImageName;
+
+ if (m_pDiffuse_TextureCom)
+ {
+ Remove_Component();
+ SAFE_RELEASE(m_pDiffuse_TextureCom);
+ }
+ if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, pImageName, reinterpret_cast(&m_pDiffuse_TextureCom))))
+ return E_FAIL;
+
+ return S_OK;
+}
+
+CSpellLearn* CSpellLearn::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CSpellLearn* pInstance = new CSpellLearn(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CSpellLearn");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CSpellLearn::Clone(void* pArg, CGameObject* pOwner)
+{
+ CSpellLearn* pInstance = new CSpellLearn(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CSpellLearn");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CSpellLearn::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pDiffuse_TextureCom);
+ SAFE_RELEASE(m_pDiffuse_TextureCom1);
+ SAFE_RELEASE(m_pShaderCom);
+ SAFE_RELEASE(m_pVIBufferCom);
+}
+
+#ifdef _DEBUG
+void CSpellLearn::Describe_Entity()
+{
+}
+#endif // _DEBUG
diff --git a/Jusin154_Team3D/Client/Private/SpellLearn_Canvas.cpp b/Jusin154_Team3D/Client/Private/SpellLearn_Canvas.cpp
new file mode 100644
index 000000000..36d8e4dd0
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/SpellLearn_Canvas.cpp
@@ -0,0 +1,140 @@
+#include "pch.h"
+#include "UI_Manager.h"
+#include "SpellLearn_Canvas.h"
+#include "GameInstance.h"
+#include "SpellLearn_Panel.h"
+
+CSpellLearn_Canvas::CSpellLearn_Canvas(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ :CCanvasObject(pDevice, pContext)
+{
+}
+
+CSpellLearn_Canvas::CSpellLearn_Canvas(const CSpellLearn_Canvas& rhs)
+ :CCanvasObject(rhs)
+{
+}
+
+HRESULT CSpellLearn_Canvas::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CSpellLearn_Canvas::Initialize(void* pArg)
+{
+ CUIObject::UIOBJECT_DESC Desc{};
+
+ Desc.fX = 0.f;
+ Desc.fY = 0.f;
+ Desc.fSizeX = 1920.f;
+ Desc.fSizeY = 1080.f;
+
+ if (FAILED(__super::Initialize(&Desc)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Ready_Components(pArg)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Ready_Panel(pArg)))
+ {
+ return E_FAIL;
+ }
+ Visible(false);
+ return S_OK;
+}
+
+void CSpellLearn_Canvas::Priority_Update(_float fTimeDelta)
+{
+ __super::Priority_Update(fTimeDelta);
+}
+
+void CSpellLearn_Canvas::Update(_float fTimeDelta)
+{
+ __super::Update(fTimeDelta);
+}
+
+void CSpellLearn_Canvas::Late_Update(_float fTimeDelta)
+{
+ if (m_bVisible) {
+ }
+ __super::Late_Update(fTimeDelta);
+}
+
+HRESULT CSpellLearn_Canvas::Render()
+{
+ return S_OK;
+}
+
+_vector CSpellLearn_Canvas::Get_WorldPostion()
+{
+ return m_pTransformCom->Get_State(STATE::POSITION);
+}
+
+HRESULT CSpellLearn_Canvas::Bind_ShaderResources()
+{
+ return S_OK;
+}
+
+HRESULT CSpellLearn_Canvas::Ready_Components(void* pArg)
+{
+ if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CSpellLearn_Canvas::Ready_Panel(void* pArg)
+{
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pSpellLearn_Panel))))
+ {
+ return E_FAIL;
+ }
+ Add_Panel(TEXT("SpellLearn_Panel"), m_pSpellLearn_Panel);
+
+ return S_OK;
+}
+
+void CSpellLearn_Canvas::Clear_Penel()
+{
+}
+
+CSpellLearn_Canvas* CSpellLearn_Canvas::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CSpellLearn_Canvas* pInstance = new CSpellLearn_Canvas(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CSpellLearn_Canvas");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CSpellLearn_Canvas::Clone(void* pArg, CGameObject* pOwner)
+{
+ CSpellLearn_Canvas* pInstance = new CSpellLearn_Canvas(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CSpellLearn_Canvas");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CSpellLearn_Canvas::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pVIBufferCom);
+}
+
+#ifdef _DEBUG
+void CSpellLearn_Canvas::Describe_Entity()
+{
+}
+#endif // _DEBUG
diff --git a/Jusin154_Team3D/Client/Private/SpellLearn_Data.cpp b/Jusin154_Team3D/Client/Private/SpellLearn_Data.cpp
new file mode 100644
index 000000000..f343c4a8e
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/SpellLearn_Data.cpp
@@ -0,0 +1,104 @@
+#include "pch.h"
+#include "SpellLearn_Data.h"
+#include "UIObject.h"
+#include "InfoInstance.h"
+
+CSpellLearn_Data::CSpellLearn_Data()
+ :m_pInfoInstance(CInfoInstance::GetInstance())
+{
+}
+
+HRESULT CSpellLearn_Data::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex)
+{
+ Load_SpellInfo("../Bin/Resources/Data/UI/SpellLearn.xml");
+
+ return S_OK;
+}
+
+const SPELLLEARNINFO& CSpellLearn_Data::Get_SpellLearn(_int Index) const
+{
+ return m_SpellLearnInfos[Index];
+}
+
+_int CSpellLearn_Data::Get_Index()
+{
+ return m_iSpellLearn_Count;
+}
+
+void CSpellLearn_Data::Update(_float fTimeDelta)
+{
+}
+
+HRESULT CSpellLearn_Data::Load_SpellInfo(const _char* pFilePath)
+{
+ tinyxml2::XMLDocument doc;
+ if (doc.LoadFile(pFilePath) != tinyxml2::XML_SUCCESS)
+ return E_FAIL;
+
+ tinyxml2::XMLElement* pSpellLearnInfo = doc.FirstChildElement("SpellLearnInfo");
+ if (!pSpellLearnInfo) return E_FAIL;
+
+ tinyxml2::XMLElement* pSpellLearnData = pSpellLearnInfo->FirstChildElement("SpellLearnData");
+ if (!pSpellLearnData) return E_FAIL;
+
+ // 모든 Name 요소 반복
+ tinyxml2::XMLElement* pName = pSpellLearnData->FirstChildElement("Name");
+ while (pName)
+ {
+ SPELLLEARNINFO Info{};
+
+ // 속성 읽기
+ Info.pSpellName = CMyTools::ToWstring(pName->Attribute("SpellName"));
+ Info.pImageName = CMyTools::ToWstring(pName->Attribute("ImageName"));
+ pName->QueryFloatAttribute("Size", &Info.fSpellSize);
+
+ _float fX{}, fY{};
+ pName->QueryFloatAttribute("x", &fX);
+ pName->QueryFloatAttribute("y", &fY);
+ Info.fStartPosition = _float2(fX, fY);
+
+ // Position 요소 반복
+ tinyxml2::XMLElement* pPosition = pName->FirstChildElement("Position");
+ while (pPosition)
+ {
+ tinyxml2::XMLElement* pPos = pPosition->FirstChildElement("Pos");
+ if (pPos)
+ {
+ _float px{}, py{};
+ pPos->QueryFloatAttribute("x", &px);
+ pPos->QueryFloatAttribute("y", &py);
+ Info.Lines.push_back(XMVectorSet(px, py, 0.f, 1.f));
+ }
+
+ // 다음 Position으로 이동
+ pPosition = pPosition->NextSiblingElement("Position");
+ }
+
+ // 벡터에 추가
+ m_SpellLearnInfos.push_back(Info);
+ m_iSpellLearn_Count++;
+
+ // 다음 Name으로 이동
+ pName = pName->NextSiblingElement("Name");
+ }
+
+ return S_OK;
+}
+
+CSpellLearn_Data* CSpellLearn_Data::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CSpellLearn_Data* pInstance = new CSpellLearn_Data();
+
+ if (FAILED(pInstance->Initialize(pDevice, pContext)))
+ {
+ MSG_BOX("Failed to Cloned : CSpellLearn_Data");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CSpellLearn_Data::Free()
+{
+ __super::Free();
+}
diff --git a/Jusin154_Team3D/Client/Private/SpellLearn_MovePointer.cpp b/Jusin154_Team3D/Client/Private/SpellLearn_MovePointer.cpp
new file mode 100644
index 000000000..85ca12265
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/SpellLearn_MovePointer.cpp
@@ -0,0 +1,284 @@
+#include "pch.h"
+#include "SpellLearn_MovePointer.h"
+#include "GameInstance.h"
+#include "InfoInstance.h"
+
+CSpellLearn_MovePointer::CSpellLearn_MovePointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ :CElementObject(pDevice, pContext)
+{
+}
+
+CSpellLearn_MovePointer::CSpellLearn_MovePointer(const CSpellLearn_MovePointer& rhs)
+ :CElementObject(rhs),
+ m_pInfoInstance(CInfoInstance::GetInstance())
+{
+}
+
+HRESULT CSpellLearn_MovePointer::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CSpellLearn_MovePointer::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;
+ Set_SpellLearn(0);
+ m_fAngle = XMConvertToRadians(0);
+ Visible(false);
+ return S_OK;
+}
+
+void CSpellLearn_MovePointer::Set_SpellLearn(_int Index)
+{
+ 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;
+}
+
+void CSpellLearn_MovePointer::Line(_float fTime)
+{
+ m_vLerp_Position = m_MoveLine[m_iCurrentLine];
+
+ if (Start_Lerp(m_fMoveSpeed * fTime) == true)
+ {
+ if (m_iCurrentLine < m_iLineIndex - 1)
+ {
+ ++m_iCurrentLine;
+ }
+ else
+ {
+ m_bMoveStart = false;
+ }
+ }
+
+}
+
+void CSpellLearn_MovePointer::Priority_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ __super::Priority_Update(fTimeDelta);
+}
+
+void CSpellLearn_MovePointer::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_pGameInstance->Key_Down(DIK_L))
+ {
+ m_bMoveStart = true;
+ }
+
+ if (m_bMoveStart == true)
+ {
+ Line(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);
+
+ fMouse.x = fMouse.x - m_fX;
+ fMouse.y = fMouse.y - m_fY;
+
+
+ m_fAngle = atan2(-fMouse.x, fMouse.y);
+
+ m_fTime += fTimeDelta * m_fTimeMult;
+ __super::Update(fTimeDelta);
+}
+
+void CSpellLearn_MovePointer::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_MovePointer::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_MovePointer::Get_WorldPostion()
+{
+ return m_pTransformCom->Get_State(STATE::POSITION);
+}
+
+HRESULT CSpellLearn_MovePointer::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_MovePointer::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_Cursor"), 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_MovePointer* CSpellLearn_MovePointer::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CSpellLearn_MovePointer* pInstance = new CSpellLearn_MovePointer(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CSpellLearn_MovePointer");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CSpellLearn_MovePointer::Clone(void* pArg, CGameObject* pOwner)
+{
+ CSpellLearn_MovePointer* pInstance = new CSpellLearn_MovePointer(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CSpellLearn_MovePointer");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CSpellLearn_MovePointer::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pDiffuse_TextureCom);
+ SAFE_RELEASE(m_pShaderCom);
+ SAFE_RELEASE(m_pVIBufferCom);
+}
+
+#ifdef _DEBUG
+void CSpellLearn_MovePointer::Describe_Entity()
+{
+}
+#endif // _DEBUG
diff --git a/Jusin154_Team3D/Client/Private/SpellLearn_Name.cpp b/Jusin154_Team3D/Client/Private/SpellLearn_Name.cpp
new file mode 100644
index 000000000..ad96fa494
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/SpellLearn_Name.cpp
@@ -0,0 +1,255 @@
+#include "pch.h"
+#include "SpellLearn_Name.h"
+#include "GameInstance.h"
+#include "InfoInstance.h"
+
+CSpellLearn_Name::CSpellLearn_Name(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ :CElementObject(pDevice, pContext)
+{
+}
+
+CSpellLearn_Name::CSpellLearn_Name(const CSpellLearn_Name& rhs)
+ :CElementObject(rhs),
+ m_pInfoInstance(CInfoInstance::GetInstance())
+
+{
+}
+
+HRESULT CSpellLearn_Name::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CSpellLearn_Name::Initialize(void* pArg)
+{
+ CUIObject::UIOBJECT_DESC Desc{};
+
+ Desc.fX = 600.f;
+ Desc.fY = 420.f;
+ Desc.fSizeX = 432.f;
+ Desc.fSizeY = 27.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_vNine_Slice = _float4(216.f, 216.f, 0.f, 27.f);
+ m_fFontX = 944.f;
+ m_fFontY = 520.f;
+ SizeUpX(550.f);
+ SizeUpY(27.f);
+ Set_Name(0);
+ Visible(false);
+ return S_OK;
+}
+
+void CSpellLearn_Name::Set_Name(_int Index)
+{
+ SizeUpX(m_pInfoInstance->Get_SpellLearn(Index).fSpellSize);
+ m_pSpell_Name = m_pInfoInstance->Get_SpellLearn(Index).pSpellName;
+}
+
+void CSpellLearn_Name::Priority_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ __super::Priority_Update(fTimeDelta);
+}
+
+void CSpellLearn_Name::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_Name::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_Name::Render()
+{
+ if (FAILED(Bind_ShaderResources())) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::QUEST_BORDER)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Bind_Resources())) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Render())) {
+ return E_FAIL;
+ }
+
+ _float OffSet = (m_pGameInstance->FontSizeX(TEXT("Font_size20"), m_pSpell_Name.c_str()) - 30) * 0.5f;
+ m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pSpell_Name.c_str(), _float2((m_fFontX + m_fX) - OffSet, m_fFontY - m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha));
+
+ return S_OK;
+}
+
+_vector CSpellLearn_Name::Get_WorldPostion()
+{
+ return m_pTransformCom->Get_State(STATE::POSITION);
+}
+
+HRESULT CSpellLearn_Name::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_fNine_Slice", &m_vNine_Slice, sizeof(_float4))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fOrigin_Size", &m_fOrigin_Size, sizeof(_float2))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_vScale, sizeof(_float2))))
+ {
+ return E_FAIL;
+ }
+ return S_OK;
+}
+
+HRESULT CSpellLearn_Name::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_Spell_Name"), 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_Name* CSpellLearn_Name::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CSpellLearn_Name* pInstance = new CSpellLearn_Name(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CSpellLearn_Name");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CSpellLearn_Name::Clone(void* pArg, CGameObject* pOwner)
+{
+ CSpellLearn_Name* pInstance = new CSpellLearn_Name(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CSpellLearn_Name");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CSpellLearn_Name::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pDiffuse_TextureCom);
+ SAFE_RELEASE(m_pShaderCom);
+ SAFE_RELEASE(m_pVIBufferCom);
+}
+
+#ifdef _DEBUG
+void CSpellLearn_Name::Describe_Entity()
+{
+}
+#endif // _DEBUG
diff --git a/Jusin154_Team3D/Client/Private/SpellLearn_Panel.cpp b/Jusin154_Team3D/Client/Private/SpellLearn_Panel.cpp
new file mode 100644
index 000000000..ff5a40be3
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/SpellLearn_Panel.cpp
@@ -0,0 +1,250 @@
+#include "pch.h"
+#include "SpellLearn_Panel.h"
+#include "GameInstance.h"
+#include "SpellLearn_Name.h"
+#include "SpellLearn.h"
+#include "SpellLearn_MovePointer.h"
+#include "SpellLearn_Data.h"
+#include "InfoInstance.h"
+
+CSpellLearn_Panel::CSpellLearn_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ :CPanelObject(pDevice, pContext)
+{
+}
+
+CSpellLearn_Panel::CSpellLearn_Panel(const CSpellLearn_Panel& rhs)
+ :CPanelObject(rhs),
+ m_pInfoInstance(CInfoInstance::GetInstance())
+{
+}
+
+HRESULT CSpellLearn_Panel::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CSpellLearn_Panel::Initialize(void* pArg)
+{
+ CUIObject::UIOBJECT_DESC Desc{};
+
+ Desc.fX = 960.f;
+ Desc.fY = -540.f;
+ Desc.fSizeX = g_iWinSizeX;
+ Desc.fSizeY = g_iWinSizeY;
+
+ if (FAILED(__super::Initialize(&Desc)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Ready_Components(pArg)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Ready_Element(pArg)))
+ {
+ return E_FAIL;
+ }
+ m_fCanvasAlpha = 1.f;
+ m_fSortZ = 0.05f;
+ m_fDelayTime = 1.f;
+ Visible(true);
+ ElementAllVisible(true);
+ return S_OK;
+}
+
+void CSpellLearn_Panel::Priority_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ __super::Priority_Update(fTimeDelta);
+}
+
+void CSpellLearn_Panel::Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+
+ if (m_pGameInstance->Key_Down(DIK_M))
+ {
+ if (Index >= m_pInfoInstance->Get_SpellLearnIndex() - 1)
+ {
+ Index = 0;
+ }
+ else
+ {
+ Index++;
+ }
+ static_cast(m_pSpellLearn)->Change_Image(Index);
+ static_cast(m_pSpellLearn_MovePointer)->Set_SpellLearn(Index);
+ static_cast(m_pSpellLearn_Name)->Set_Name(Index);
+ }
+
+ __super::Update(fTimeDelta);
+}
+
+void CSpellLearn_Panel::Late_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ if (m_bVisible) {
+ m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
+ __super::Late_Update(fTimeDelta);
+ }
+}
+
+HRESULT CSpellLearn_Panel::Render()
+{
+ if (FAILED(Bind_ShaderResources())) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::SPELL_LEARN)))) {
+ 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_Panel::Get_WorldPostion()
+{
+ return m_pTransformCom->Get_State(STATE::POSITION);
+}
+
+HRESULT CSpellLearn_Panel::Bind_ShaderResources()
+{
+ if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom1->Bind_ShaderResource(m_pShaderCom, "g_Texture1", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_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_Panel::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_SpellLearn"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_SpellLinkDivide"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
+ {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CSpellLearn_Panel::Ready_Element(void* pArg)
+{
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_Name))))
+ {
+ return E_FAIL;
+ }
+ Add_Element(TEXT("SpellLearn_Name"), m_pSpellLearn_Name);
+
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn))))
+ {
+ return E_FAIL;
+ }
+ Add_Element(TEXT("SpellLearn"), m_pSpellLearn);
+
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_MovePointer))))
+ {
+ return E_FAIL;
+ }
+ Add_Element(TEXT("SpellLearn_MovePointer"), m_pSpellLearn_MovePointer);
+
+ return S_OK;
+}
+
+CSpellLearn_Panel* CSpellLearn_Panel::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CSpellLearn_Panel* pInstance = new CSpellLearn_Panel(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CSpellLearn_Panel");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CSpellLearn_Panel::Clone(void* pArg, CGameObject* pOwner)
+{
+ CSpellLearn_Panel* pInstance = new CSpellLearn_Panel(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CSpellLearn_Panel");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CSpellLearn_Panel::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pDiffuse_TextureCom);
+ SAFE_RELEASE(m_pDiffuse_TextureCom1);
+ SAFE_RELEASE(m_pShaderCom);
+ SAFE_RELEASE(m_pVIBufferCom);
+}
+
+#ifdef _DEBUG
+void CSpellLearn_Panel::Describe_Entity()
+{
+}
+#endif // _DEBUG
diff --git a/Jusin154_Team3D/Client/Private/UI_Manager.cpp b/Jusin154_Team3D/Client/Private/UI_Manager.cpp
index 16f414456..d77ff84e9 100644
--- a/Jusin154_Team3D/Client/Private/UI_Manager.cpp
+++ b/Jusin154_Team3D/Client/Private/UI_Manager.cpp
@@ -8,6 +8,7 @@
#include "Mouse_Cursor.h"
#include "CameraLockOn.h"
#include "Damage_Font.h"
+#include "SpellLearn_Canvas.h"
#include "Interaction_Key.h"
CUI_Manager::CUI_Manager(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
@@ -53,6 +54,7 @@ void CUI_Manager::Canvas_Change(UI_STATE eType)
static_cast(m_pGamePlay_Canves)->Visible(true);
static_cast(m_pSpell_Canvas)->Visible(false);
static_cast(m_pQuest_Canvas)->Visible(false);
+ static_cast(m_pSpellLearn_Canvas)->Visible(false);
break;
case UI_STATE::SPELL:
@@ -72,6 +74,13 @@ void CUI_Manager::Canvas_Change(UI_STATE eType)
case UI_STATE::INVENTORY:
break;
+ case UI_STATE::SPELLNEARN:
+ m_pMouse_Cursor->Set_Visible(true);
+ m_pCamera_LockOn->Set_Visible(false);
+ static_cast(m_pSpellLearn_Canvas)->Visible(true);
+ static_cast(m_pGamePlay_Canves)->Visible(false);
+ break;
+
default:
return;
}
@@ -172,6 +181,11 @@ HRESULT CUI_Manager::Ready_Components(void* pArg)
}
Add_Canvas(TEXT("Interaction_Key"), m_pInteraction_Key);
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_Canvas)))) {
+ return E_FAIL;
+ }
+ Add_Canvas(TEXT("SpellLearn_Canvas"), m_pSpellLearn_Canvas);
+
return S_OK;
}
diff --git a/Jusin154_Team3D/Client/Public/Client_Enum.h b/Jusin154_Team3D/Client/Public/Client_Enum.h
index 23eb41d79..f2dd96b1c 100644
--- a/Jusin154_Team3D/Client/Public/Client_Enum.h
+++ b/Jusin154_Team3D/Client/Public/Client_Enum.h
@@ -13,13 +13,14 @@ namespace Client
enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, TRAIL_BLEND, TRAILWB_FOR_BLEND, TRAIL_BLUR, TRAIL_BLOOM, END };
enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, BLEND, BLEND_NOWORLD, BLOOM, BLOOM_NOWORLD, BLUR_NO_EMMISVE, BLUR_NO_WORLD_NO_EMISSIVE, WEIGHTBLEND_FOR_BLEND, DEPTH_STOP, WB_CULLING, SCREEN_FX, DISTORTION,END };
enum class SHADER_PASS_UIEDITOR {
- DEFAULT, LOGO, LOGO_TEXT, LOGO_GLOW, ALPHABLEND, CLAMP, CURSOR,
+ DEFAULT, COLOR, LOGO, LOGO_TEXT, LOGO_GLOW, ALPHABLEND, CLAMP, CURSOR,
LODING, HOLD_ROTATION, MISSION, QUESTTYPE, UVMULT, NINECLICE,
ROTATION, SLOT, TYPE, HPBAR, MAGIC_METER, MAGIC_ICON, REMOVEUV,
REVELIO, POTION, MAGIC_ITEM, SPELL_PREVIEW, SPELL_HEADER,
SPELL_HEADER_LINE, SPELL_DRAG, CAMERA_LOCKON, LODING_SCREEN,
ENEMY_HPBAR, BOSS_HPBAR, QUEST_BORDER, QUEST_INFO, QUEST_STATUS, BROOMSTICK,
- ENEMY_DETECTION, INTERACTION_OBJECT, END};
+ SPELL_LEARN,
+ 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 {
@@ -27,7 +28,7 @@ namespace Client
, OUTLINE_READ, TEETH_SRXO_ToSRO__OUTLINE_WRITE, EYE_DN_ToSRO__OUTLINE_WRITE, HEADwtHAND_DSRXON_ToSRO__OUTLINE_WRITE, UPPER_DMRON_ToMRO__OUTLINE_WRITE, EmissiveMetalness_DENMRO_ToMRO__OUTLINE_WRITE, MI_ClothSim_DSEN_ToSRO__OUTLINE_WRITE
, END
};
- enum class UI_STATE { GAMEPLAYER, SPELL, QUEST_CANVES, INVENTORY, END };
+ enum class UI_STATE { GAMEPLAYER, SPELL, QUEST_CANVES, INVENTORY, SPELLNEARN, END };
enum class QUESTTYPE { MAIN, SUB, END };
enum class QUESTSTATE {NONE, ACCEPTED, CLEARED, END };
@@ -76,7 +77,7 @@ namespace Client
enum class KEYINPUT
{
INPUT_1 = 1, INPUT_2, INPUT_3, INPUT_4,
- INPUT_T, INPUT_G, INPUT_X, INPUT_Z,
+ INPUT_T, INPUT_G, INPUT_X, INPUT_Z, INPUT_N,
INPUT_TAB,
DIM_RBUTTON_UP, DIM_RBUTTON_DOWN,
END
diff --git a/Jusin154_Team3D/Client/Public/Client_Struct.h b/Jusin154_Team3D/Client/Public/Client_Struct.h
index b3a9bda8d..b610406bc 100644
--- a/Jusin154_Team3D/Client/Public/Client_Struct.h
+++ b/Jusin154_Team3D/Client/Public/Client_Struct.h
@@ -91,6 +91,15 @@ namespace Client
_int iAcceptState;
}QUESTINFO;
+ typedef struct tagSpellLearnInfo
+ {
+ _wstring pSpellName{};
+ _wstring pImageName{};
+ _float fSpellSize{};
+ _float2 fStartPosition{};
+ vector<_vector> Lines;
+ }SPELLLEARNINFO;
+
typedef struct tagEffectInfo
{
_float4 vColor = { 0.f ,0.f ,0.f ,1.f };
diff --git a/Jusin154_Team3D/Client/Public/InfoInstance.h b/Jusin154_Team3D/Client/Public/InfoInstance.h
index cce173060..526f60054 100644
--- a/Jusin154_Team3D/Client/Public/InfoInstance.h
+++ b/Jusin154_Team3D/Client/Public/InfoInstance.h
@@ -9,6 +9,7 @@ class CTransform;
class CUnit;
class CState;
class CStat;
+class CUIObject;
NS_END
NS_BEGIN(Client)
@@ -75,6 +76,10 @@ DECLARE_SINGLETON(CInfoInstance)
HRESULT Set_AcceptQuest(_int Index);
#pragma endregion
#pragma region Interactive_INFO
+#pragma region SpellLearn_Data
+ const SPELLLEARNINFO& Get_SpellLearn(_int Index) const;
+ _int Get_SpellLearnIndex();
+#pragma endregion
HRESULT Regist_ActiveInteractive(class CMapElement_Interactable* pInteractive);
HRESULT Deregist_ActiveInteractive(class CMapElement_Interactable* pInteractive);
#pragma endregion
@@ -90,6 +95,7 @@ DECLARE_SINGLETON(CInfoInstance)
class CQuest_Data* m_pQuestInfo= { nullptr };
class CInteractiveInfo* m_pInteractiveInfo = { nullptr };
class CDamage_Font* m_pDamage_Font = { nullptr };
+ class CSpellLearn_Data* m_pSpellLearn_Data = { nullptr };
_uint m_eInput = ENUM_CLASS(KEYINPUT::END);
_int m_eSpell = ENUM_CLASS(SKILL_TYPE::END);
diff --git a/Jusin154_Team3D/Client/Public/Quest_Slot.h b/Jusin154_Team3D/Client/Public/Quest_Slot.h
index 5a51a0bcf..812531768 100644
--- a/Jusin154_Team3D/Client/Public/Quest_Slot.h
+++ b/Jusin154_Team3D/Client/Public/Quest_Slot.h
@@ -68,7 +68,8 @@ class CQuest_Slot final : public CElementObject
_float m_fPositionX{};
_float m_fPositionY{};
- _int m_Index{};
+ _int m_iIndex{};
+ _int m_iPrevIndex{};
vector m_Fonts;
public:
static CQuest_Slot* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
diff --git a/Jusin154_Team3D/Client/Public/SpellLearn.h b/Jusin154_Team3D/Client/Public/SpellLearn.h
new file mode 100644
index 000000000..2e8e8f361
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/SpellLearn.h
@@ -0,0 +1,54 @@
+#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 final : public CElementObject
+{
+private:
+ CSpellLearn(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CSpellLearn(const CSpellLearn& rhs);
+ virtual ~CSpellLearn() = 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:
+ HRESULT Change_Image(_int SpellID);
+
+private:
+ CInfoInstance* m_pInfoInstance = { nullptr };
+
+ CTexture* m_pDiffuse_TextureCom = { nullptr };
+ CTexture* m_pDiffuse_TextureCom1 = { nullptr };
+ CShader* m_pShaderCom = { nullptr };
+ CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
+
+public:
+ static CSpellLearn* 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_Canvas.h b/Jusin154_Team3D/Client/Public/SpellLearn_Canvas.h
new file mode 100644
index 000000000..34719df3f
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/SpellLearn_Canvas.h
@@ -0,0 +1,50 @@
+#pragma once
+
+#include "Client_Define.h"
+#include "CanvasObject.h"
+
+NS_BEGIN(Engine)
+class CVIBuffer_Rect;
+NS_END
+
+NS_BEGIN(Client)
+
+class CSpellLearn_Canvas final : public CCanvasObject
+{
+private:
+ CSpellLearn_Canvas(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CSpellLearn_Canvas(const CSpellLearn_Canvas& rhs);
+ virtual ~CSpellLearn_Canvas() = default;
+
+public:
+ virtual void Priority_Update(_float fTimeDelta);
+ virtual void Update(_float fTimeDelta);
+ virtual void Late_Update(_float fTimeDelta);
+ virtual HRESULT Render() override;
+ virtual _vector Get_WorldPostion() override;
+
+private:
+ virtual HRESULT Bind_ShaderResources() override;
+ virtual HRESULT Ready_Components(void* pArg) override;
+ virtual HRESULT Ready_Panel(void* pArg) override;
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+
+public:
+ void Clear_Penel();
+
+private:
+ CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
+
+ CGameObject* m_pSpellLearn_Panel = { nullptr };
+
+public:
+ static CSpellLearn_Canvas* 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_Data.h b/Jusin154_Team3D/Client/Public/SpellLearn_Data.h
new file mode 100644
index 000000000..fa1942bee
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/SpellLearn_Data.h
@@ -0,0 +1,44 @@
+#pragma once
+
+#include "Client_Define.h"
+#include "Base.h"
+#include "UIObject.h"
+
+NS_BEGIN(Engine)
+class CGameInstance;
+class CUIObject;
+NS_END
+
+NS_BEGIN(Client)
+
+class CSpellLearn_Data final : public CBase
+{
+private:
+ CSpellLearn_Data();
+ ~CSpellLearn_Data() = default;
+
+public:
+ void Update(_float fTimeDelta);
+public:
+ HRESULT Load_SpellInfo(const _char* pFilePath);\
+
+
+public:
+ const SPELLLEARNINFO& Get_SpellLearn(_int Index) const;
+ _int Get_Index();
+
+private:
+ CInfoInstance* m_pInfoInstance = { nullptr };
+
+ _int m_iSpellLearn_Count{};
+ vector m_SpellLearnInfos;
+
+private:
+ HRESULT Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex);
+
+public:
+ static CSpellLearn_Data* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual void Free() override;
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Client/Public/SpellLearn_MovePointer.h b/Jusin154_Team3D/Client/Public/SpellLearn_MovePointer.h
new file mode 100644
index 000000000..a467bb9b9
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/SpellLearn_MovePointer.h
@@ -0,0 +1,61 @@
+#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_MovePointer final : public CElementObject
+{
+private:
+ CSpellLearn_MovePointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CSpellLearn_MovePointer(const CSpellLearn_MovePointer& rhs);
+ virtual ~CSpellLearn_MovePointer() = 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:
+ void Line(_float fTime);
+
+
+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_MovePointer* 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_Name.h b/Jusin154_Team3D/Client/Public/SpellLearn_Name.h
new file mode 100644
index 000000000..5e06df1dd
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/SpellLearn_Name.h
@@ -0,0 +1,53 @@
+#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_Name final : public CElementObject
+{
+private:
+ CSpellLearn_Name(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CSpellLearn_Name(const CSpellLearn_Name& rhs);
+ virtual ~CSpellLearn_Name() = 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_Name(_int Index);
+
+private:
+ CInfoInstance* m_pInfoInstance = { nullptr };
+ CTexture* m_pDiffuse_TextureCom = { nullptr };
+ CShader* m_pShaderCom = { nullptr };
+ CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
+
+ _wstring m_pSpell_Name;
+
+public:
+ static CSpellLearn_Name* 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
new file mode 100644
index 000000000..4d6a891bf
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/SpellLearn_Panel.h
@@ -0,0 +1,62 @@
+#pragma once
+
+#include "Client_Define.h"
+#include "PanelObject.h"
+
+NS_BEGIN(Engine)
+class CTexture;
+class CShader;
+class CVIBuffer_Rect;
+NS_END
+
+NS_BEGIN(Client)
+
+class CSpellLearn_Panel final : public CPanelObject
+{
+
+private:
+ CSpellLearn_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CSpellLearn_Panel(const CSpellLearn_Panel& rhs);
+ virtual ~CSpellLearn_Panel() = default;
+
+public:
+ virtual void Priority_Update(_float fTimeDelta);
+ virtual void Update(_float fTimeDelta);
+ virtual void Late_Update(_float fTimeDelta);
+ virtual HRESULT Render() override;
+ virtual _vector Get_WorldPostion() override;
+
+private:
+ virtual HRESULT Bind_ShaderResources() override;
+ virtual HRESULT Ready_Components(void* pArg) override;
+ virtual HRESULT Ready_Element(void* pArg) override;
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+
+private:
+ CTexture* m_pDiffuse_TextureCom = { nullptr };
+ CTexture* m_pDiffuse_TextureCom1 = { nullptr };
+ CShader* m_pShaderCom = { nullptr };
+ CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
+
+ CInfoInstance* m_pInfoInstance = { nullptr };
+
+ vector m_Info = {};
+
+ CGameObject* m_pSpellLearn_Name = { nullptr };
+ CGameObject* m_pSpellLearn = { nullptr };
+ CGameObject* m_pSpellLearn_MovePointer = { nullptr };
+ CGameObject* m_pSpellLearn_Data = { nullptr };
+
+ _int Index{};
+
+public:
+ static CSpellLearn_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
+ virtual void Free() override;
+#ifdef _DEBUG
+ void Describe_Entity() override;
+#endif // _DEBUG
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Client/Public/UI_Manager.h b/Jusin154_Team3D/Client/Public/UI_Manager.h
index afacb5176..8025623e5 100644
--- a/Jusin154_Team3D/Client/Public/UI_Manager.h
+++ b/Jusin154_Team3D/Client/Public/UI_Manager.h
@@ -54,6 +54,7 @@ class CUI_Manager final : public CUIObject
CGameObject* m_pSpell_Canvas = { nullptr };
CGameObject* m_pMouse_Cursor = { nullptr };
CGameObject* m_pQuest_Canvas = { nullptr };
+ CGameObject* m_pSpellLearn_Canvas = { nullptr };
CGameObject* m_pCamera_LockOn = { nullptr };
CGameObject* m_pDamage_Font = { nullptr };
CGameObject* m_pInteraction_Key = { nullptr };
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/UI/Data.xml b/Jusin154_Team3D/Editor/Bin/Resources/Data/UI/Data.xml
deleted file mode 100644
index 34ec5ed9b..000000000
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/UI/Data.xml
+++ /dev/null
@@ -1,258 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/UI/SpellLearn.xml b/Jusin154_Team3D/Editor/Bin/Resources/Data/UI/SpellLearn.xml
new file mode 100644
index 000000000..a5a168e36
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/UI/SpellLearn.xml
@@ -0,0 +1,340 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl
index da3d61395..a9d7fff5f 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl
+++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl
@@ -120,6 +120,20 @@ PS_OUT PS_MAIN(PS_IN In)
return Out;
}
+PS_OUT PS_Texture_Color(PS_IN In)
+{
+ PS_OUT Out;
+ float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
+ float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
+ float4 Color = g_Texture1.Sample(DefaultSampler, In.vTexcoord);
+
+ tex1.rgb *= Color.rgb;
+
+ tex1.a *= Alpha;
+ Out.vColor = tex1;
+ return Out;
+}
+
PS_OUT PS_Logo(PS_IN In)
{
PS_OUT Out;
@@ -517,12 +531,15 @@ PS_OUT PS_Rotation(PS_IN In)
float2 center = float2(0.5f, 0.5f);
float2 uv = In.vTexcoord - center;
- float2 Rotation = In.vTexcoord;
+ float2 Rotation;
Rotation.x = uv.x * cos(g_fMapAngle) - uv.y * sin(g_fMapAngle);
Rotation.y = uv.x * sin(g_fMapAngle) + uv.y * cos(g_fMapAngle);
Rotation += center;
- float4 tex1 = g_Texture.Sample(ClampSampler, Rotation);
+ float4 tex1 = g_Texture.Sample(BorderZeroLinearSampler, Rotation);
+
+ if (tex1.a <= 0.f)
+ discard;
color = tex1;
@@ -1988,6 +2005,16 @@ technique11 PosTexTechnique11
PixelShader = compile ps_5_0 PS_MAIN();
}
+ pass Texture_Color
+ {
+ SetRasterizerState(RS_Default);
+ SetDepthStencilState(DSS_Default, 0);
+ SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
+ VertexShader = compile vs_5_0 VS_MAIN();
+ GeometryShader = NULL;
+ PixelShader = compile ps_5_0 PS_Texture_Color();
+ }
+
pass Logo
{
SetRasterizerState(RS_Default);
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Accio_Path.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/Accio.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Accio_Path.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/Accio.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Bombarda_Path.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/Bombarda.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Bombarda_Path.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/Bombarda.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Descendo_Path.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/Descendo.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Descendo_Path.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/Descendo.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Levioso_Path.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/Levioso.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Levioso_Path.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/Levioso.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Lumos_Path.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/Lumos.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Lumos_Path.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/Lumos.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Revelio_Path.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/Revelio.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Revelio_Path.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/Revelio.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Cursor.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Cursor.png
index 25f79bf8d..3398d2963 100644
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Cursor.png and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Cursor.png differ
diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj b/Jusin154_Team3D/Editor/Default/Editor.vcxproj
index 39ddab3ef..1980633a3 100644
--- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj
+++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj
@@ -197,8 +197,10 @@ call Update_Shaders.bat
+
+
@@ -420,8 +422,10 @@ call Update_Shaders.bat
+
+
diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters
index 5efb931c5..3eb9266b7 100644
--- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters
+++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters
@@ -627,6 +627,12 @@
{eef1db06-8a9f-42b4-93e2-cc29de2b275d}
+
+
+ {6e769435-83c4-4f64-b306-1b8c5f2d228d}
+
+
+ {54a92f0d-26f1-49bf-a13b-ab11995968c7}
@@ -1251,6 +1257,12 @@
50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_MovePointer
+
+ 50.UI\SpellLearn_Data
+
+
+ 50.UI\SpellLearn_Canvas\SpellLearn_Panel\SPellLeam_SpeedPointer
+
@@ -1876,6 +1888,12 @@
50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_MovePointer
+
+ 50.UI\SpellLearn_Data
+
+
+ 50.UI\SpellLearn_Canvas\SpellLearn_Panel\SPellLeam_SpeedPointer
+
diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp
index 267cdab08..879703ab6 100644
--- a/Jusin154_Team3D/Editor/Private/Loader.cpp
+++ b/Jusin154_Team3D/Editor/Private/Loader.cpp
@@ -111,6 +111,8 @@
#include "QuestInstance.h"
+#include "SpellLearn_Data.h"
+
#include "SpellLearn_Canvas.h"
#include "SpellLearn_Panel.h"
#include "SpellLearn_Name.h"
@@ -1207,6 +1209,10 @@ HRESULT CLoader::Loading_For_UI()
return E_FAIL;
}
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpellLearn_Data::Create(m_pDevice, m_pContext))))
+ {
+ return E_FAIL;
+ }
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpellLearn_Canvas::Create(m_pDevice, m_pContext))))
{
return E_FAIL;
diff --git a/Jusin154_Team3D/Editor/Private/Quest_Data.cpp b/Jusin154_Team3D/Editor/Private/Quest_Data.cpp
index 87145ea6f..398972733 100644
--- a/Jusin154_Team3D/Editor/Private/Quest_Data.cpp
+++ b/Jusin154_Team3D/Editor/Private/Quest_Data.cpp
@@ -242,6 +242,7 @@ void CQuest_Data::Free()
{
__super::Free();
+ SAFE_RELEASE(m_pVIBufferCom);
}
void CQuest_Data::Describe_Entity()
diff --git a/Jusin154_Team3D/Editor/Private/SPellLeam_SpeedPointer.cpp b/Jusin154_Team3D/Editor/Private/SPellLeam_SpeedPointer.cpp
new file mode 100644
index 000000000..de1ee7712
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/SPellLeam_SpeedPointer.cpp
@@ -0,0 +1,96 @@
+#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 947fe07b2..406e63368 100644
--- a/Jusin154_Team3D/Editor/Private/SpellLearn.cpp
+++ b/Jusin154_Team3D/Editor/Private/SpellLearn.cpp
@@ -39,6 +39,7 @@ HRESULT CSpellLearn::Initialize(void* pArg)
m_fTimeMult = 3.f;
m_fAlpha = 1.f;
m_fAlphaTime = 5.f;
+ Change_Image(0);
Visible(false);
return S_OK;
}
@@ -105,7 +106,7 @@ HRESULT CSpellLearn::Render()
if (FAILED(Bind_ShaderResources())) {
return E_FAIL;
}
- if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::DEFAULT)))) {
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::COLOR)))) {
return E_FAIL;
}
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
@@ -133,7 +134,6 @@ HRESULT CSpellLearn::Bind_ShaderResources()
{
return E_FAIL;
}
-
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
{
return E_FAIL;
@@ -142,6 +142,10 @@ HRESULT CSpellLearn::Bind_ShaderResources()
{
return E_FAIL;
}
+ if (FAILED(m_pDiffuse_TextureCom1->Bind_ShaderResource(m_pShaderCom, "g_Texture1", 0)))
+ {
+ return E_FAIL;
+ }
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
{
return E_FAIL;
@@ -171,7 +175,11 @@ HRESULT CSpellLearn::Ready_Components(void* pArg)
{
return E_FAIL;
}
- if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_SU_Levioso_Path"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr)))
+ if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_Levioso"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_Goldleaf_Large"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr)))
{
return E_FAIL;
}
@@ -183,6 +191,22 @@ HRESULT CSpellLearn::Ready_Components(void* pArg)
return S_OK;
}
+HRESULT CSpellLearn::Change_Image(_int SpellID)
+{
+ _wstring pName = TEXT("Prototype_Texture_");
+ _wstring pImageName = pName + static_cast(m_pOwner)->Get_Learninfo(SpellID).pImageName;
+
+ if (m_pDiffuse_TextureCom)
+ {
+ Remove_Component();
+ SAFE_RELEASE(m_pDiffuse_TextureCom);
+ }
+ if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(LEVEL::UI), pImageName, reinterpret_cast(&m_pDiffuse_TextureCom))))
+ return E_FAIL;
+
+ return S_OK;
+}
+
CSpellLearn* CSpellLearn::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
CSpellLearn* pInstance = new CSpellLearn(pDevice, pContext);
@@ -202,7 +226,7 @@ CGameObject* CSpellLearn::Clone(void* pArg, CGameObject* pOwner)
pInstance->m_pOwner = pOwner;
if (FAILED(pInstance->Initialize(pArg)))
{
- MSG_BOX("Failed to Cloned : CSpell_Header");
+ MSG_BOX("Failed to Cloned : CSpellLearn");
SAFE_RELEASE(pInstance);
}
@@ -214,6 +238,7 @@ void CSpellLearn::Free()
__super::Free();
SAFE_RELEASE(m_pDiffuse_TextureCom);
+ SAFE_RELEASE(m_pDiffuse_TextureCom1);
SAFE_RELEASE(m_pShaderCom);
SAFE_RELEASE(m_pVIBufferCom);
}
diff --git a/Jusin154_Team3D/Editor/Private/SpellLearn_Data.cpp b/Jusin154_Team3D/Editor/Private/SpellLearn_Data.cpp
new file mode 100644
index 000000000..da293f8fe
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/SpellLearn_Data.cpp
@@ -0,0 +1,153 @@
+#include "pch.h"
+#include "SpellLearn_Data.h"
+#include "GameObject.h"
+#include "UIObject.h"
+
+CSpellLearn_Data::CSpellLearn_Data(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ :CGameObject(pDevice, pContext)
+{
+}
+
+CSpellLearn_Data::CSpellLearn_Data(const CSpellLearn_Data& rhs)
+ :CGameObject(rhs)
+{
+}
+
+HRESULT CSpellLearn_Data::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CSpellLearn_Data::Initialize(void* pArg)
+{
+ auto* pInfo = static_cast*>(pArg);
+
+ tinyxml2::XMLDocument doc;
+ if (doc.LoadFile("../Bin/Resources/Data/UI/SpellLearn.xml") != tinyxml2::XML_SUCCESS)
+ return E_FAIL;
+
+ tinyxml2::XMLElement* pSpellLearnInfo = doc.FirstChildElement("SpellLearnInfo");
+ if (!pSpellLearnInfo) return E_FAIL;
+
+ tinyxml2::XMLElement* pSpellLearnData = pSpellLearnInfo->FirstChildElement("SpellLearnData");
+ if (!pSpellLearnData) return E_FAIL;
+
+ // 모든 Name 요소 반복
+ tinyxml2::XMLElement* pName = pSpellLearnData->FirstChildElement("Name");
+ while (pName)
+ {
+ CUIObject::SPELLLEARNINFO Info{};
+
+ // 속성 읽기
+ Info.pSpellName = CMyTools::ToWstring(pName->Attribute("SpellName"));
+ Info.pImageName = CMyTools::ToWstring(pName->Attribute("ImageName"));
+ pName->QueryFloatAttribute("Size", &Info.fSpellSize);
+
+ _float fX{}, fY{};
+ pName->QueryFloatAttribute("x", &fX);
+ pName->QueryFloatAttribute("y", &fY);
+ Info.fStartPosition = _float2(fX, fY);
+
+ // Position 요소 반복
+ tinyxml2::XMLElement* pPosition = pName->FirstChildElement("Position");
+ while (pPosition)
+ {
+ tinyxml2::XMLElement* pPos = pPosition->FirstChildElement("Pos");
+ if (pPos)
+ {
+ _float px{}, py{};
+ pPos->QueryFloatAttribute("x", &px);
+ pPos->QueryFloatAttribute("y", &py);
+ Info.Lines.push_back(XMVectorSet(px, py, 0.f, 1.f));
+ }
+
+ // 다음 Position으로 이동
+ pPosition = pPosition->NextSiblingElement("Position");
+ }
+
+ // 벡터에 추가
+ m_SpellLearnInfos.push_back(Info);
+ m_iSpellLearn_Count++;
+
+ // 다음 Name으로 이동
+ pName = pName->NextSiblingElement("Name");
+ }
+
+ *pInfo = m_SpellLearnInfos;
+
+ return S_OK;
+}
+
+const CUIObject::SPELLLEARNINFO& CSpellLearn_Data::Get_SpellLearn(_int Index) const
+{
+ return m_SpellLearnInfos[Index];
+}
+
+void CSpellLearn_Data::Priority_Update(_float fTimeDelta)
+{
+}
+
+void CSpellLearn_Data::Update(_float fTimeDelta)
+{
+}
+
+void CSpellLearn_Data::Late_Update(_float fTimeDelta)
+{
+}
+
+HRESULT CSpellLearn_Data::Render()
+{
+ return S_OK;
+}
+
+_vector CSpellLearn_Data::Get_WorldPostion()
+{
+ return _vector();
+}
+
+HRESULT CSpellLearn_Data::Bind_ShaderResources()
+{
+ return S_OK;
+}
+
+HRESULT CSpellLearn_Data::Ready_Components(void* pArg)
+{
+ return S_OK;
+}
+
+CSpellLearn_Data* CSpellLearn_Data::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CSpellLearn_Data* pInstance = new CSpellLearn_Data(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CSpellLearn_Data");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CSpellLearn_Data::Clone(void* pArg, CGameObject* pOwner)
+{
+ CSpellLearn_Data* pInstance = new CSpellLearn_Data(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CSpellLearn_Data");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CSpellLearn_Data::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pVIBufferCom);
+}
+
+void CSpellLearn_Data::Describe_Entity()
+{
+}
diff --git a/Jusin154_Team3D/Editor/Private/SpellLearn_MovePointer.cpp b/Jusin154_Team3D/Editor/Private/SpellLearn_MovePointer.cpp
index 86b1ccd78..2c9c95b4c 100644
--- a/Jusin154_Team3D/Editor/Private/SpellLearn_MovePointer.cpp
+++ b/Jusin154_Team3D/Editor/Private/SpellLearn_MovePointer.cpp
@@ -21,8 +21,8 @@ HRESULT CSpellLearn_MovePointer::Initialize(void* pArg)
{
CUIObject::UIOBJECT_DESC Desc{};
- Desc.fX = 454.f;
- Desc.fY = -240.f;
+ 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) };
@@ -40,32 +40,30 @@ HRESULT CSpellLearn_MovePointer::Initialize(void* pArg)
m_fAlpha = 1.f;
m_fAlphaTime = 5.f;
m_fMoveSpeed = 15.f;
- m_MoveLine.push_back(XMVectorSet(454.f, -240.f, 0.f, 1.f));
- m_MoveLine.push_back(XMVectorSet(454.f, 90.f, 0.f, 1.f));
-
-
-
- Index = 0;
-
+ Set_SpellLearn(0);
+ m_fAngle = XMConvertToRadians(0);
Visible(false);
return S_OK;
}
-void CSpellLearn_MovePointer::SpellLearn(_int Index)
+void CSpellLearn_MovePointer::Set_SpellLearn(_int Index)
{
- m_iSpell = Index;
- m_bMoveStart = true;
+ 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;
}
void CSpellLearn_MovePointer::Line(_float fTime)
{
- m_vLerp_Position = m_MoveLine[Index];
+ m_vLerp_Position = m_MoveLine[m_iCurrentLine];
if (Start_Lerp(m_fMoveSpeed * fTime) == true)
{
- if (Index < m_MoveLine.size() -1)
+ if (m_iCurrentLine < m_iLineIndex - 1)
{
- ++Index;
+ ++m_iCurrentLine;
}
else
{
@@ -123,16 +121,22 @@ void CSpellLearn_MovePointer::Update(_float fTimeDelta)
if (m_bMoveStart == true)
{
- if (m_iSpell == ENUM_CLASS(SPELL_LINE::LINE))
- {
- Line(fTimeDelta);
- }
- else if (m_iSpell == ENUM_CLASS(SPELL_LINE::CURVE))
- {
- //Curve();
- }
+ Line(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);
+
+ fMouse.x = fMouse.x - m_fX;
+ fMouse.y = fMouse.y - m_fY;
+
+
+ m_fAngle = atan2(-fMouse.x, fMouse.y);
+
m_fTime += fTimeDelta * m_fTimeMult;
__super::Update(fTimeDelta);
}
@@ -154,7 +158,7 @@ HRESULT CSpellLearn_MovePointer::Render()
if (FAILED(Bind_ShaderResources())) {
return E_FAIL;
}
- if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::DEFAULT)))) {
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ROTATION)))) {
return E_FAIL;
}
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
@@ -211,6 +215,10 @@ HRESULT CSpellLearn_MovePointer::Bind_ShaderResources()
{
return E_FAIL;
}
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fMapAngle", &m_fAngle, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
return S_OK;
}
diff --git a/Jusin154_Team3D/Editor/Private/SpellLearn_Name.cpp b/Jusin154_Team3D/Editor/Private/SpellLearn_Name.cpp
index ed9106018..ec41f369f 100644
--- a/Jusin154_Team3D/Editor/Private/SpellLearn_Name.cpp
+++ b/Jusin154_Team3D/Editor/Private/SpellLearn_Name.cpp
@@ -43,10 +43,16 @@ HRESULT CSpellLearn_Name::Initialize(void* pArg)
m_fFontY = 520.f;
SizeUpX(550.f);
SizeUpY(27.f);
+ Set_Name(0);
Visible(false);
return S_OK;
}
+void CSpellLearn_Name::Set_Name(_int Index)
+{
+ SizeUpX(static_cast(m_pOwner)->Get_Learninfo(Index).fSpellSize);
+ m_pSpell_Name = static_cast(m_pOwner)->Get_Learninfo(Index).pSpellName;
+}
void CSpellLearn_Name::Priority_Update(_float fTimeDelta)
{
@@ -120,8 +126,8 @@ HRESULT CSpellLearn_Name::Render()
return E_FAIL;
}
- _float OffSet = (m_pGameInstance->FontSizeX(TEXT("Font_size20"), TEXT("봄바르다")) - 30) * 0.5f;
- m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("봄바르다"), _float2((m_fFontX + m_fX) - OffSet, m_fFontY - m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha));
+ _float OffSet = (m_pGameInstance->FontSizeX(TEXT("Font_size20"), m_pSpell_Name.c_str()) - 30) * 0.5f;
+ m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pSpell_Name.c_str(), _float2((m_fFontX + m_fX) - OffSet, m_fFontY - m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha));
return S_OK;
}
diff --git a/Jusin154_Team3D/Editor/Private/SpellLearn_Panel.cpp b/Jusin154_Team3D/Editor/Private/SpellLearn_Panel.cpp
index fc448de6a..62eba1f91 100644
--- a/Jusin154_Team3D/Editor/Private/SpellLearn_Panel.cpp
+++ b/Jusin154_Team3D/Editor/Private/SpellLearn_Panel.cpp
@@ -4,6 +4,7 @@
#include "SpellLearn_Name.h"
#include "SpellLearn.h"
#include "SpellLearn_MovePointer.h"
+#include "SpellLearn_Data.h"
CSpellLearn_Panel::CSpellLearn_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CPanelObject(pDevice, pContext)
@@ -49,6 +50,11 @@ HRESULT CSpellLearn_Panel::Initialize(void* pArg)
return S_OK;
}
+const CUIObject::SPELLLEARNINFO CSpellLearn_Panel::Get_Learninfo(_int Index)
+{
+ return static_cast(m_pSpellLearn_Data)->Get_SpellLearn(Index);
+}
+
void CSpellLearn_Panel::Priority_Update(_float fTimeDelta)
{
if (!__super::Chack_Visible())
@@ -64,6 +70,22 @@ void CSpellLearn_Panel::Update(_float fTimeDelta)
{
return;
}
+
+ if (m_pGameInstance->Key_Down(DIK_M))
+ {
+ if (Index >= m_Info.size() - 1)
+ {
+ Index = 0;
+ }
+ else
+ {
+ Index++;
+ }
+ static_cast(m_pSpellLearn)->Change_Image(Index);
+ static_cast(m_pSpellLearn_MovePointer)->Set_SpellLearn(Index);
+ static_cast(m_pSpellLearn_Name)->Set_Name(Index);
+ }
+
__super::Update(fTimeDelta);
}
@@ -167,6 +189,11 @@ HRESULT CSpellLearn_Panel::Ready_Components(void* pArg)
HRESULT CSpellLearn_Panel::Ready_Element(void* pArg)
{
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, &m_Info, this, reinterpret_cast(&m_pSpellLearn_Data))))
+ {
+ return E_FAIL;
+ }
+
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_Name))))
{
return E_FAIL;
diff --git a/Jusin154_Team3D/Editor/Public/Editor_Define.h b/Jusin154_Team3D/Editor/Public/Editor_Define.h
index 35c5b4156..d74bf1448 100644
--- a/Jusin154_Team3D/Editor/Public/Editor_Define.h
+++ b/Jusin154_Team3D/Editor/Public/Editor_Define.h
@@ -28,7 +28,7 @@ namespace Editor
enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, TRAIL_BLEND, TRAILWB_FOR_BLEND, TRAIL_BLUR, TRAIL_BLOOM, END };
- enum class SHADER_PASS_UIEDITOR { DEFAULT, LOGO, LOGO_TEXT, LOGO_GLOW, ALPHABLEND, CLAMP, CURSOR,
+ enum class SHADER_PASS_UIEDITOR { DEFAULT, COLOR, LOGO, LOGO_TEXT, LOGO_GLOW, ALPHABLEND, CLAMP, CURSOR,
LODING, HOLD_ROTATION, MISSION, QUESTTYPE, UVMULT, NINECLICE,
ROTATION, SLOT, TYPE, HPBAR, MAGIC_METER, MAGIC_ICON, REMOVEUV,
REVELIO, POTION, MAGIC_ITEM, SPELL_PREVIEW, SPELL_HEADER,
diff --git a/Jusin154_Team3D/Editor/Public/SPellLeam_SpeedPointer.h b/Jusin154_Team3D/Editor/Public/SPellLeam_SpeedPointer.h
new file mode 100644
index 000000000..a2c881d6d
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Public/SPellLeam_SpeedPointer.h
@@ -0,0 +1,40 @@
+#pragma once
+
+#include "Editor_Define.h"
+#include "ElementObject.h"
+
+NS_BEGIN(Editor)
+
+class CSPellLeam_SpeedPointer final : public CElementObject
+{
+private:
+ CSPellLeam_SpeedPointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CSPellLeam_SpeedPointer(const CSPellLeam_SpeedPointer& rhs);
+ virtual ~CSPellLeam_SpeedPointer() = default;
+
+public:
+ virtual void Priority_Update(_float fTimeDelta);
+ virtual void Update(_float fTimeDelta);
+ virtual void Late_Update(_float fTimeDelta);
+ virtual HRESULT Render() override;
+ virtual _vector Get_WorldPostion() override;
+
+private:
+ virtual HRESULT Bind_ShaderResources() override;
+ virtual HRESULT Ready_Components(void* pArg) override;
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+
+private:
+ CTexture* m_pDiffuse_TextureCom = { nullptr };
+ CShader* m_pShaderCom = { nullptr };
+ CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
+
+public:
+ static CSPellLeam_SpeedPointer* 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.h b/Jusin154_Team3D/Editor/Public/SpellLearn.h
index e5dcfcd5b..e5e54bade 100644
--- a/Jusin154_Team3D/Editor/Public/SpellLearn.h
+++ b/Jusin154_Team3D/Editor/Public/SpellLearn.h
@@ -25,8 +25,12 @@ class CSpellLearn final : public CElementObject
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
+public:
+ HRESULT Change_Image(_int SpellID);
+
private:
CTexture* m_pDiffuse_TextureCom = { nullptr };
+ CTexture* m_pDiffuse_TextureCom1 = { nullptr };
CShader* m_pShaderCom = { nullptr };
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
diff --git a/Jusin154_Team3D/Editor/Public/SpellLearn_Data.h b/Jusin154_Team3D/Editor/Public/SpellLearn_Data.h
new file mode 100644
index 000000000..b3c9f6f4e
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Public/SpellLearn_Data.h
@@ -0,0 +1,57 @@
+#pragma once
+
+#include "Editor_Define.h"
+#include "GameObject.h"
+#include "UIObject.h"
+
+NS_BEGIN(Engine)
+class CGameObject;
+NS_END
+
+NS_BEGIN(Editor)
+
+class CSpellLearn_Data final : public CGameObject
+{
+private:
+ //typedef struct tagSpellLearnInfo
+ //{
+ // _wstring pSpellName;
+ // _wstring pImageName;
+ // _float fSpellSize{};
+ // _float2 fStartPosition{};
+ // vector<_float2> Lines;
+ //}SPELLLEARNINFO;
+private:
+ CSpellLearn_Data(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CSpellLearn_Data(const CSpellLearn_Data& rhs);
+ virtual ~CSpellLearn_Data() = 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:
+ const CUIObject::SPELLLEARNINFO& Get_SpellLearn(_int Index) const;
+
+private:
+ CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
+
+ _int m_iSpellLearn_Count{};
+ vector m_SpellLearnInfos;
+public:
+ static CSpellLearn_Data* 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 1cbad5c47..9adb87aaf 100644
--- a/Jusin154_Team3D/Editor/Public/SpellLearn_MovePointer.h
+++ b/Jusin154_Team3D/Editor/Public/SpellLearn_MovePointer.h
@@ -26,7 +26,7 @@ class CSpellLearn_MovePointer final : public CElementObject
virtual HRESULT Initialize(void* pArg) override;
public:
- void SpellLearn(_int Index);
+ void Set_SpellLearn(_int Index);
private:
void Line(_float fTime);
@@ -37,9 +37,9 @@ class CSpellLearn_MovePointer final : public CElementObject
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
_bool m_bMoveStart = { false };
- _int m_iSpell{};
- _int Index{};
+ _int m_iLineIndex{};
+ _int m_iCurrentLine{};
vector<_vector> m_MoveLine;
public:
diff --git a/Jusin154_Team3D/Editor/Public/SpellLearn_Name.h b/Jusin154_Team3D/Editor/Public/SpellLearn_Name.h
index 6449ec521..c97d6dcd5 100644
--- a/Jusin154_Team3D/Editor/Public/SpellLearn_Name.h
+++ b/Jusin154_Team3D/Editor/Public/SpellLearn_Name.h
@@ -25,11 +25,16 @@ class CSpellLearn_Name final : public CElementObject
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
+public:
+ void Set_Name(_int Index);
+
private:
CTexture* m_pDiffuse_TextureCom = { nullptr };
CShader* m_pShaderCom = { nullptr };
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
+ _wstring m_pSpell_Name;
+
public:
static CSpellLearn_Name* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
diff --git a/Jusin154_Team3D/Editor/Public/SpellLearn_Panel.h b/Jusin154_Team3D/Editor/Public/SpellLearn_Panel.h
index 8cb5c3066..5405b5c18 100644
--- a/Jusin154_Team3D/Editor/Public/SpellLearn_Panel.h
+++ b/Jusin154_Team3D/Editor/Public/SpellLearn_Panel.h
@@ -31,15 +31,23 @@ class CSpellLearn_Panel final : public CPanelObject
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
+public:
+ virtual const SPELLLEARNINFO Get_Learninfo(_int Index) override;
+
private:
CTexture* m_pDiffuse_TextureCom = { nullptr };
CTexture* m_pDiffuse_TextureCom1 = { nullptr };
CShader* m_pShaderCom = { nullptr };
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
+ vector m_Info = {};
+
CGameObject* m_pSpellLearn_Name = { nullptr };
CGameObject* m_pSpellLearn = { nullptr };
CGameObject* m_pSpellLearn_MovePointer = { nullptr };
+ CGameObject* m_pSpellLearn_Data = { nullptr };
+
+ _int Index{};
public:
static CSpellLearn_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
diff --git a/Jusin154_Team3D/Engine/Private/UIObject.cpp b/Jusin154_Team3D/Engine/Private/UIObject.cpp
index d88e3d418..eab58ba82 100644
--- a/Jusin154_Team3D/Engine/Private/UIObject.cpp
+++ b/Jusin154_Team3D/Engine/Private/UIObject.cpp
@@ -513,6 +513,11 @@ const CUIObject::QUESTINFO CUIObject::Get_QuestInfo(_int Index)
return QUESTINFO();
}
+const CUIObject::SPELLLEARNINFO CUIObject::Get_Learninfo(_int Index)
+{
+ return SPELLLEARNINFO();
+}
+
void CUIObject::Set_FontX(_float fFontX)
{
m_fFontX = fFontX;
diff --git a/Jusin154_Team3D/Engine/Public/Engine_Macro.h b/Jusin154_Team3D/Engine/Public/Engine_Macro.h
index 8a05494c6..523d96f33 100644
--- a/Jusin154_Team3D/Engine/Public/Engine_Macro.h
+++ b/Jusin154_Team3D/Engine/Public/Engine_Macro.h
@@ -47,7 +47,7 @@
#undef ASSERT_INHYUK
#define ASSERT_INHYUK(expression) assert(expression)
//#undef OPTIONAL_TRUE_KEYINPUTGUICHECK
-#define OPTIONAL_TRUE_KEYINPUTGUICHECK ||true
+//#define OPTIONAL_TRUE_KEYINPUTGUICHECK || true
#endif
diff --git a/Jusin154_Team3D/Engine/Public/UIObject.h b/Jusin154_Team3D/Engine/Public/UIObject.h
index cbd2bff11..c37bd7ca5 100644
--- a/Jusin154_Team3D/Engine/Public/UIObject.h
+++ b/Jusin154_Team3D/Engine/Public/UIObject.h
@@ -74,6 +74,15 @@ typedef struct tagCurrentQeustSerectInfo
_int iQuestIndex{};
}CURRENTQUESTSECETINFO;
+typedef struct tagSpellLearnInfo
+{
+ _wstring pSpellName{};
+ _wstring pImageName{};
+ _float fSpellSize{};
+ _float2 fStartPosition{};
+ vector<_vector> Lines;
+}SPELLLEARNINFO;
+
protected:
CUIObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
CUIObject(const CUIObject& rhs);
@@ -175,6 +184,7 @@ typedef struct tagCurrentQeustSerectInfo
virtual const SPELLINFO Get_Info(_int Index);
virtual const QUESTINFO Get_QuestInfo(_int Index);
+ virtual const SPELLLEARNINFO Get_Learninfo(_int Index);
virtual void Set_FontX(_float fFontX);
virtual void Set_FontY(_float fFontY);