[Add] 스킬 설명

This commit is contained in:
qordlsgur
2025-12-07 18:23:55 +09:00
parent 558592dffd
commit 7d17e791c8
54 changed files with 834 additions and 65 deletions
@@ -586,7 +586,7 @@ PS_OUT PS_SpellAnim(PS_IN In)
switch (g_iSpellType)
{
case 0:
BGColor = float3(255.f, 255.f, 0.f) / 255.f;
BGColor = float3(220.f, 165.f, 70.f) / 255.f;
break;
case 1:
BGColor = float3(150.f, 120.f, 240.f) / 255.f;
@@ -1132,7 +1132,7 @@ PS_OUT PS_Spell_Header(PS_IN In)
switch (g_iSpellType)
{
case 0:
BGColor = float3(255.f, 255.f, 0.f) / 255.f;
BGColor = float3(220.f, 165.f, 70.f) / 255.f;
break;
case 1:
BGColor = float3(150.f, 120.f, 240.f) / 255.f;
@@ -1155,11 +1155,12 @@ PS_OUT PS_Spell_Header(PS_IN In)
}
float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
Color = tex1;
Color.rgb = tex1.rgb * 0.8f;
Color.a = tex1.a;
Color.rgb *= BGColor;
Color.a *= Alpha;
Color.a *= Alpha * 0.5f;
Out.vColor = Color;
@@ -47,6 +47,8 @@ HRESULT CMagic_Item::Initialize(void* pArg)
m_iArratCount = 2;
Compute_UV(0);
Compute_Image();
m_iPotionIndex = 0;
m_iPerPotionIndex = -1;
return S_OK;
}
@@ -132,6 +134,14 @@ void CMagic_Item::Update(_float fTimeDelta)
}
}
if (m_iPerPotionIndex != m_iPotionIndex)
{
m_strPotion = to_wstring(m_iPotionIndex);
m_fFontOffSet = (m_pGameInstance->FontSizeX(TEXT("UI_size15"), m_strPotion.c_str()) - 13.f) * 0.5f;
m_iPerPotionIndex = m_iPotionIndex;
}
if (m_vUVScale.y <= 1)
{
m_vUVScale.y += fTimeDelta * (1.f / m_fCoolTime);
@@ -172,6 +182,7 @@ HRESULT CMagic_Item::Render()
{
return E_FAIL;
}
m_pGameInstance->Render_Text(TEXT("UI_size15"), m_strPotion.c_str(), _float2((m_fFontX + m_fX) - m_fFontOffSet, m_fFontY + m_fY), XMVectorSet(208.f / 255.f, 177.f / 255.f, 52.f / 255.f, 1.f));
return S_OK;
}
@@ -97,6 +97,26 @@ void CMainApp::Compute_FrameCount()
HRESULT CMainApp::Ready_Default_Setting()
{
if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size13"), TEXT("../Bin/Resources/Fonts/Font_size13.spritefont"))))
return E_FAIL;
if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size14"), TEXT("../Bin/Resources/Fonts/Font_size14.spritefont"))))
return E_FAIL;
if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size15"), TEXT("../Bin/Resources/Fonts/Font_size15.spritefont"))))
return E_FAIL;
if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size20"), TEXT("../Bin/Resources/Fonts/Font_size20.spritefont"))))
return E_FAIL;
if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size21"), TEXT("../Bin/Resources/Fonts/Font_size21.spritefont"))))
return E_FAIL;
if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size30"), TEXT("../Bin/Resources/Fonts/Font_size30.spritefont"))))
return E_FAIL;
if (FAILED(m_pGameInstance->Add_Font(TEXT("UI_size15"), TEXT("../Bin/Resources/Fonts/UI_size15.spritefont"))))
return E_FAIL;
return S_OK;
}
@@ -42,6 +42,8 @@ HRESULT CPotion::Initialize(void* pArg)
m_fAlphaTime = 1.f;
m_vImageSlotPos = _float2(45.f, 45.f);
m_vImageSize = _float2(32.f, 32.f);
m_iPotionIndex = 0;
m_iPerPotionIndex = -1;
return S_OK;
}
@@ -91,6 +93,12 @@ void CPotion::Update(_float fTimeDelta)
m_fTime = -1.f;
}
if (m_iPerPotionIndex != m_iPotionIndex)
{
m_strPotion = to_wstring(m_iPotionIndex);
m_fFontOffSet = (m_pGameInstance->FontSizeX(TEXT("UI_size15"), m_strPotion.c_str()) - 13.f) * 0.5f;
m_iPerPotionIndex = m_iPotionIndex;
}
m_fTime += fTimeDelta * m_fTimeMult;
@@ -123,6 +131,7 @@ HRESULT CPotion::Render()
if (FAILED(m_pVIBufferCom->Render())) {
return E_FAIL;
}
m_pGameInstance->Render_Text(TEXT("UI_size15"), m_strPotion.c_str(), _float2((m_fFontX + m_fX) - m_fFontOffSet, m_fFontY + m_fY), XMVectorSet(208.f / 255.f, 177.f / 255.f, 52.f / 255.f, 1.f));
return S_OK;
}
@@ -106,7 +106,9 @@ HRESULT CSkill_Data::Load_SpellInfo(const _char* pFilePath)
SpellInfo[id].pSpell_Name = CMyTools::ToWstring(pSpell->Attribute("Spell_Name"));
SpellInfo[id].pImage_Name = CMyTools::ToWstring(pSpell->Attribute("Image_Name"));
pSpell->QueryIntAttribute("Spell_Type", &SpellInfo[id].iSpell_Type);
SpellInfo[id].pType_Name = CMyTools::ToWstring(pSpell->Attribute("Type_Name"));
pSpell->QueryIntAttribute("Skill_Type", &SpellInfo[id].iSkill_Type);
pSpell->QueryFloatAttribute("Spell_Damage", &SpellInfo[id].fSpell_Damage);
pSpell->QueryFloatAttribute("Spell_Cooltime", &SpellInfo[id].fSpell_CoolTime);
pSpell->QueryFloatAttribute("Duration", &SpellInfo[id].fDuration);
pSpell->QueryIntAttribute("AnimNum", &SpellInfo[id].iAnimNum);
@@ -26,7 +26,7 @@ HRESULT CSpell_Header::Initialize(void* pArg)
Desc.fX = 600.f;
Desc.fY = -385.f;
Desc.fSizeX = 512.f;
Desc.fSizeY = 64.f;
Desc.fSizeY = 80.f;
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
@@ -48,6 +48,10 @@ HRESULT CSpell_Header::Initialize(void* pArg)
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); });
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); });
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); });
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); });
m_fFontX = 920.f;
m_fFontY = 510.f;
m_fType = _float2(935.f, 550.f);
return S_OK;
}
@@ -76,6 +80,7 @@ void CSpell_Header::Update(_float fTimeDelta)
if (m_fAlpha >= 1.f)
{
m_bFadeIn = false;
m_bHover = true;
m_fAlpha = 1.f;
}
}
@@ -83,7 +88,10 @@ void CSpell_Header::Update(_float fTimeDelta)
if (m_bFadeOut == true)
{
if (m_fAlpha >= 0.f)
m_fAlpha -= fTimeDelta * m_fAlphaTime;;
{
m_fAlpha -= fTimeDelta * m_fAlphaTime;
m_bHover = false;
}
if (m_fAlpha <= 0.f)
{
@@ -95,6 +103,8 @@ void CSpell_Header::Update(_float fTimeDelta)
if (m_iSpellType != -1)
{
m_iSkillType = m_pInfoInstance->Get_Spell_Info(m_iSpellType).iSpell_Type;
m_pSpell_Name =m_pInfoInstance->Get_Spell_Info(m_iSpellType).pSpell_Name;
m_fSpell_Type =m_pInfoInstance->Get_Spell_Info(m_iSpellType).pType_Name;
}
m_fTime += fTimeDelta * m_fTimeMult;
@@ -128,6 +138,13 @@ HRESULT CSpell_Header::Render()
return E_FAIL;
}
if (m_bHover == true)
{
m_fFontOffSet = (m_pGameInstance->FontSizeX(TEXT("Font_size20"), m_pSpell_Name.c_str()) - 53.f) * 0.5f;
m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pSpell_Name.c_str(), _float2((m_fFontX + m_fX) - m_fFontOffSet, m_fFontY + m_fY), XMVectorSet(215.f / 255.f, 185.f / 255.f, 95.f / 255.f, 1.f));
m_pGameInstance->Render_Text(TEXT("Font_size13"), m_fSpell_Type.c_str(), _float2(m_fType.x + m_fX, m_fType.y + m_fY));
}
return S_OK;
}
@@ -22,7 +22,7 @@ HRESULT CSpell_Header_Line::Initialize(void* pArg)
CUIObject::UIOBJECT_DESC Desc{};
Desc.fX = 600.f;
Desc.fY = -345.f;
Desc.fY = -340.f;
Desc.fSizeX = 487.f;
Desc.fSizeY = 18.f;
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
@@ -1,6 +1,7 @@
#include "pch.h"
#include "Spell_Preview.h"
#include "GameInstance.h"
#include "InfoInstance.h"
CSpell_Preview::CSpell_Preview(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
@@ -9,7 +10,8 @@ CSpell_Preview::CSpell_Preview(ID3D11Device* pDevice, ID3D11DeviceContext* pCont
}
CSpell_Preview::CSpell_Preview(const CSpell_Preview& rhs)
:CElementObject(rhs)
:CElementObject(rhs),
m_pInfoInstance(CInfoInstance::GetInstance())
{
}
@@ -44,11 +46,14 @@ HRESULT CSpell_Preview::Initialize(void* pArg)
m_vNine_Slice = _float4(50.f, 75.f, 30.f, 96.f);
m_fTopY = m_fY - m_vScale.y * 0.5f;
SizeUpX(512.f);
SizeUpY(270.f);
SizeUpY(280.f);
m_iSpellType = ENUM_CLASS(SPELLTYPE::CONTROL);
m_fSortZ = 0.02f;
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); });
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); });
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); });
m_fFontX = 740.f;
m_fFontY = 500.f;
return S_OK;
}
@@ -76,6 +81,7 @@ void CSpell_Preview::Update(_float fTimeDelta)
if (m_fAlpha >= 1.f)
{
m_bFadeIn = false;
m_bHover = true;
m_fAlpha = 1.f;
}
}
@@ -83,7 +89,10 @@ void CSpell_Preview::Update(_float fTimeDelta)
if (m_bFadeOut == true)
{
if (m_fAlpha >= 0.f)
m_fAlpha -= fTimeDelta * m_fAlphaTime;;
{
m_fAlpha -= fTimeDelta * m_fAlphaTime;
m_bHover = false;
}
if (m_fAlpha <= 0.f)
{
@@ -91,6 +100,12 @@ void CSpell_Preview::Update(_float fTimeDelta)
m_fAlpha = 0.f;
}
}
if (m_iSpellType != -1)
{
m_pSpell_Info = m_pInfoInstance->Get_Spell_Info(m_iSpellType).pSpellInfo;
}
m_fTime += fTimeDelta * m_fTimeMult;
__super::Update(fTimeDelta);
}
@@ -121,6 +136,11 @@ HRESULT CSpell_Preview::Render()
if (FAILED(m_pVIBufferCom->Render())) {
return E_FAIL;
}
if (m_bHover == true)
{
m_pGameInstance->Render_Text(TEXT("Font_size14"), m_pSpell_Info.c_str(), _float2(m_fFontX + m_fX, m_fFontY + m_fY));
}
return S_OK;
}
@@ -22,7 +22,9 @@ namespace Client
_wstring pSpell_Name;
_wstring pImage_Name;
_int iSpell_Type{};
_wstring pType_Name;
_int iSkill_Type{};
_float fSpell_Damage{};
_float fSpell_CoolTime{};
_float fDuration{};
_int iAnimNum{};
@@ -51,6 +51,10 @@ class CMagic_Item final : public CElementObject
_float2 m_vImagePos1 = {};
_float2 m_vImageSize2 = {};
_float2 m_vImagePos2 = {};
_int m_iPotionIndex{};
_int m_iPerPotionIndex{};
_wstring m_strPotion;
public:
static CMagic_Item* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
+4
View File
@@ -42,6 +42,10 @@ class CPotion final : public CElementObject
_float2 m_vImageSlotPos{};
_float2 m_vImageSize{};
_int m_iPotionIndex{};
_int m_iPerPotionIndex{};
_wstring m_strPotion;
public:
static CPotion* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
@@ -38,6 +38,11 @@ class CSpell_Header final : public CElementObject
CShader* m_pShaderCom = { nullptr };
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
_wstring m_pSpell_Name;
_wstring m_fSpell_Type;
_float2 m_fType{};
_int m_iSkillType{};
public:
static CSpell_Header* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
@@ -35,6 +35,8 @@ class CSpell_Preview final : public CElementObject
virtual HRESULT Initialize(void* pArg) override;
private:
CInfoInstance* m_pInfoInstance = { nullptr };
CTexture* m_pDiffuse_TextureCom = { nullptr };
CTexture* m_pDiffuse_TextureCom1 = { nullptr };
CTexture* m_pDiffuse_TextureCom2 = { nullptr };
@@ -42,7 +44,7 @@ class CSpell_Preview final : public CElementObject
CShader* m_pShaderCom = { nullptr };
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
_wstring m_pSpell_Info;
_float4 m_vHeaderBack{};
@@ -0,0 +1,3 @@
<Emart>
<Floor ID="0" level="1">마트, 푸드코트, 의류매장</Floor>
</Emart>
@@ -1,36 +1,191 @@
<SpellInfo>
<Spell Spell_ID="0" Spell_Name="아레스토 모멘텀" Image_Name="Arresto_Momentum" Spell_Type="0" Skill_Type="0" Spell_Cooltime="15" Duration="15" AnimNum="120" SpellInfo="적과 대상의 속도를 모두 늦춰, 다음 행동을 생각할 시간을 벌 수 있습니다." Spell_Lock="0" Equip_Spell="0" Use_Skill="1"/>
<Spell Spell_ID="1" Spell_Name="글래시우스" Image_Name="Glacius" Spell_Type="0" Skill_Type="1" Spell_Cooltime="10" Duration="10" AnimNum="156" SpellInfo="적을 얼려서 후속 공격 시 대미지를 증가시킵니다." Spell_Lock="0" Equip_Spell="0" Use_Skill="1"/>
<Spell Spell_ID="2" Spell_Name="레비오소" Image_Name="Levioso" Spell_Type="0" Skill_Type="2" Spell_Cooltime="8" Duration="8" AnimNum="180" SpellInfo="물건과 적을 공중에 띄웁니다. 퍼즐을 풀거나 적을 놀라게 할 때 유용합니다." Spell_Lock="0" Equip_Spell="0" Use_Skill="1"/>
<Spell Spell_ID="3" Spell_Name="변신" Image_Name="Transformation" Spell_Type="0" Skill_Type="3" Spell_Cooltime="20" Duration="15" AnimNum="146" SpellInfo="물건과 적의 형태를 바꿉니다. 퍼즐을 풀 때도 사용할 수 있고 무해한 장식품에도 사용할 수 있습니다." Spell_Lock="0" Equip_Spell="0" Use_Skill="1"/>
<Spell Spell_ID="4" Spell_Name="아씨오" Image_Name="Accio" Spell_Type="1" Skill_Type="4" Spell_Cooltime="8" Duration="0" AnimNum="151" SpellInfo="다양한 물체나 적을 근처로 당기는 소환 마법입니다 특정 무거운 마법 물체를 가까이 당기려면 지속적인 노력이 더 요구되기도 합니다. 일단 물체를 소환하면 버튼을 입력하지 않고도 자동으로 윙가디움 레비오사가 시전되어 계속 공중에 띄울 수 있습니다." Spell_Lock="0" Equip_Spell="0" Use_Skill="1"/>
<Spell Spell_ID="5" Spell_Name="디펄소" Image_Name="Depulso" Spell_Type="1" Skill_Type="5" Spell_Cooltime="10" Duration="0" AnimNum="152" SpellInfo="여러 가지 물건과 적을 상당히 강력한 힘으로 밀어냅니다. 적에게 직접 대미지를 주지는 않지만, 적과 물체를 서로 부딪치게 해서 큰 대미지를 줄 수 있습니다. 또한 물건을 밀거나 회전시켜서 다양한 목적을 달성할 때 유리합니다." Spell_Lock="0" Equip_Spell="0" Use_Skill="1"/>
<Spell Spell_ID="6" Spell_Name="디센도" Image_Name="Descendo" Spell_Type="1" Skill_Type="6" Spell_Cooltime="10" Duration="0" AnimNum="155" SpellInfo="직접 대미지를 주지는 않지만 , 물건과 적을 바닥에 세게 떨어뜨리면 매우 겅력한 대미지를 줄 수 있습니다. 공중에 뜬 적을 떨어뜨리면 훨씬 더 강력한 대미지를 줍니다." Spell_Lock="0" Equip_Spell="0" Use_Skill="1"/>
<Spell Spell_ID="7" Spell_Name="플리펜도" Image_Name="Flipendo" Spell_Type="1" Skill_Type="7" Spell_Cooltime="5" Duration="0" AnimNum="188" SpellInfo="물건과 적을 들어올려 거꾸로 뒤집을 수 있습니다. 쿨다운 시간이 짧아서, 공중 콤보를 시작하거나 계속 이어 나갈 때 유용한 주문입니다. 물건을 즉시 뒤집어서 퍼즐을 풀거나 특정한 적의 약점을 이용할 때도 유용합니다." Spell_Lock="0" Equip_Spell="0" Use_Skill="1"/>
<Spell Spell_ID="8" Spell_Name="콘프링고" Image_Name="Confringo" Spell_Type="2" Skill_Type="8" Spell_Cooltime="10" Duration="0" AnimNum="157" SpellInfo="장거리 볼트로 적중 시 대미지를 줍니다. 불 기반 공격을 받는 적은 몇 초 동안 계속 대미지를 입습니다. 그리고 대미지를 입는 동안 적과 충돌하면 화염이 폭발합니다." Spell_Lock="0" Equip_Spell="0" Use_Skill="1"/>
<Spell Spell_ID="9" Spell_Name="디핀도" Image_Name="Diffindo" Spell_Type="2" Skill_Type="9" Spell_Cooltime="15" Duration="0" AnimNum="150" SpellInfo="멀리 떨어진 물건과 적을 베어 강력한 대미지를 줍니다." Spell_Lock="0" Equip_Spell="0" Use_Skill="1"/>
<Spell Spell_ID="10" Spell_Name="엑스펠리아르무스" Image_Name="Expelliarmus" Spell_Type="2" Skill_Type="10" Spell_Cooltime="10" Duration="0" AnimNum="146" SpellInfo="지팡이와 무기를 휘두르는 적을 무장해제시킵니다. 그리고 모든 적에게 대미지를 입힙니다. 무기가 없는 적에게도 대미지를 줄 수 있습니다." Spell_Lock="0" Equip_Spell="0" Use_Skill="1"/>
<Spell Spell_ID="11" Spell_Name="봄바르다" Image_Name="Bombarda" Spell_Type="2" Skill_Type="11" Spell_Cooltime="15" Duration="0" AnimNum="262" SpellInfo="적중 시 큰 대미지를 주며, 동시에 폭발하여 대형 장애물을 부수고 주변 적에 대미지르 줍니다." Spell_Lock="0" Equip_Spell="0" Use_Skill="1"/>
<Spell Spell_ID="12" Spell_Name="인센디오" Image_Name="Incendio" Spell_Type="2" Skill_Type="12" Spell_Cooltime="8" Duration="0" AnimNum="213" SpellInfo="단거리 공격으로 목표물과 거리가 가까울 때만 사용할 수 있습니다. 이 주문을 외우면 대상은 매우 강력한 대미지를 입고, 특정 물체에 사용하면 불을 붙일 수 있습니다. 불을 이용한 공격으로 공격을 받은 적은 몇 초 동안 계속 대미지를 받습니다. 그리고 대미지를 입는 공안 적과 충돌하면 화염이 폭발합니다." Spell_Lock="0" Equip_Spell="0" Use_Skill="1"/>
<Spell Spell_ID="13" Spell_Name="투영" Image_Name="Disillusionment" Spell_Type="3" Skill_Type="13" Spell_Cooltime="0.5" Duration="0" AnimNum="260" SpellInfo="주변 환경에 녹아들어 남들이 알봐보기 어렵게 만듭니다. 적들에게 들키지 않고 몰래 접근해, 페트리피쿠스 토탈루스를 시전하려고 할 때 아주 유용합니다." Spell_Lock="0" Equip_Spell="0" Use_Skill="1"/>
<Spell Spell_ID="14" Spell_Name="루모스" Image_Name="Lumos" Spell_Type="3" Skill_Type="14" Spell_Cooltime="0.5" Duration="0" AnimNum="365" SpellInfo="어두운 곳을 환하게 밝히거나, 퍼즐에서 추가 조명이 필요할 때 사용합니다." Spell_Lock="0" Equip_Spell="0" Use_Skill="1"/>
<Spell Spell_ID="15" Spell_Name="레파로" Image_Name="Reparo" Spell_Type="3" Skill_Type="15" Spell_Cooltime="0.5" Duration="0" AnimNum="385" SpellInfo="손상된 특정 물체를 이전 상태로 신속하게 되돌릴 수 있습니다." Spell_Lock="0" Equip_Spell="0" Use_Skill="1"/>
<Spell Spell_ID="16" Spell_Name="윙가디움 레비오사" Image_Name="Wingardium_Leviosa" Spell_Type="3" Skill_Type="16" Spell_Cooltime="0.5" Duration="5" AnimNum="273" SpellInfo="이동 가능한 물체를 공중에 띄워 움직입니다. 움직임으로 물체의 위치를 조절하고, F V Q E로 물체의 거리를 조절하거나 회전시킬 수 있습니다. 윙가디움 레비오사는 아씨오로 소환된 물체에 자동으로 시전됩니다." Spell_Lock="0" Equip_Spell="0" Use_Skill="1"/>
<Spell Spell_ID="17" Spell_Name="구현 마법" Image_Name="Conjuring_Spell" Spell_Type="4" Skill_Type="17" Spell_Cooltime="0" Duration="0" AnimNum="115" SpellInfo="필요의 방에서 시전하면 물체를 나타나게 할 수 있습니다." Spell_Lock="0" Equip_Spell="0" Use_Skill="1"/>
<Spell Spell_ID="18" Spell_Name="개조 마법" Image_Name="Altering_Spell" Spell_Type="4" Skill_Type="18" Spell_Cooltime="0" Duration="0" AnimNum="349" SpellInfo="필요의 방에서 시전하면 물체의 물리적 형태와 특성을 바꿉니다." Spell_Lock="0" Equip_Spell="0" Use_Skill="1"/>
<Spell Spell_ID="19" Spell_Name="에바네스코" Image_Name="Evanesco" Spell_Type="4" Skill_Type="19" Spell_Cooltime="0" Duration="0" AnimNum="136" SpellInfo="필요한 방에서 시전하면 물체를 사라지게 하고 월장석이 반환됩니다." Spell_Lock="0" Equip_Spell="0" Use_Skill="1"/>
<Spell Spell_ID="20" Spell_Name="아바다 케다브라" Image_Name="Avada_Kedavra" Spell_Type="5" Skill_Type="20" Spell_Cooltime="90" Duration="0" AnimNum="208" SpellInfo="적을 즉시 처치합니다." Spell_Lock="0" Equip_Spell="0" Use_Skill="1"/>
<Spell Spell_ID="21" Spell_Name="크루시오" Image_Name="Crucio" Spell_Type="5" Skill_Type="21" Spell_Cooltime="20" Duration="20" AnimNum="216" SpellInfo="시간이 소요되는 대미지를 주기에 대부분의 적이 고통에 몸서리칩니다. 또한 저주를 받은 적은 추가 대미지를 받습니다.." Spell_Lock="0" Equip_Spell="0" Use_Skill="1"/>
<Spell Spell_ID="22" Spell_Name="임페리오" Image_Name="Imperio" Spell_Type="5" Skill_Type="22" Spell_Cooltime="30" Duration="20" AnimNum="462" SpellInfo="일시적으로 적을 동료처럼 변화시켜 싸우게 합니다. 주문이 걸리 ㄴ동안 동료로 바뀐 적은 다른 적들의 공격을 받았을 때 방어력이 높아지며 당신에게 충성합니다. 한편 적을 저주하면 그 적은 추가로 대미지를 받습니다." Spell_Lock="0" Equip_Spell="0" Use_Skill="1"/>
<Spell Spell_ID="23" Spell_Name="마법 동물 쓰담기용 빗" Image_Name="Beast_Petting_Brush" Spell_Type="3" Skill_Type="23" Spell_Cooltime="0" Duration="0" AnimNum="327" SpellInfo="적마법 동물들을 빗질할 때 쓰는 빗입니다." Spell_Lock="0" Equip_Spell="0" Use_Skill="1"/>
<Spell Spell_ID="24" Spell_Name="마법 동물 먹이" Image_Name="Beast_Feed" Spell_Type="3" Skill_Type="24" Spell_Cooltime="0" Duration="0" AnimNum="378" SpellInfo="마법 동물에게 줄 수 있는 먹이입니다." Spell_Lock="0" Equip_Spell="0" Use_Skill="1"/>
<Spell Spell_ID="25" Spell_Name="포획 자루" Image_Name="Nab_Sack" Spell_Type="3" Skill_Type="25" Spell_Cooltime="0" Duration="0" AnimNum="235" SpellInfo="마법 동물을 구출하거나 잡을 수 있는 마법 자루입니다." Spell_Lock="0" Equip_Spell="0" Use_Skill="1"/>
<Spell Spell_ID="26" Spell_Name="기본 주문" Image_Name="Basic_cast" Spell_Type="6" Skill_Type="26" Spell_Cooltime="0" Duration="0" AnimNum="308" SpellInfo="적과 사물에게 가벼운 대미지를 줍니다. 시전하려면 을 탭하세요." Spell_Lock="0" Equip_Spell="0" Use_Skill="1"/>
<Spell Spell_ID="27" Spell_Name="레벨리오" Image_Name="Revelio" Spell_Type="6" Skill_Type="27" Spell_Cooltime="0" Duration="0" AnimNum="227" SpellInfo="숨겨진 물건, 퍼즐 아이템, 전리품, 적 등을 모두 포함해 유용하거나 상호작용할 수 있는 다양한 대상을 강조 표시합니다. 로 시전합니다." Spell_Lock="0" Equip_Spell="0" Use_Skill="1"/>
<Spell Spell_ID="28" Spell_Name="프로테고" Image_Name="Protego" Spell_Type="6" Skill_Type="28" Spell_Cooltime="0" Duration="0" AnimNum="285" SpellInfo="주문, 무기 등 여러 가지 공격으로부터 보호합니다. 공격이 닿기 직전까지 기다렸다가 로 시전하면 프로테고를 완벽하게 시전할 수 있습니다. 근접 공격자에게는 대미지를 주고, 공격을 반사시켜 적의 방어력을 부술 수도 있습니다." Spell_Lock="0" Equip_Spell="0" Use_Skill="1"/>
<Spell Spell_ID="29" Spell_Name="스투페파이" Image_Name="Stupefy" Spell_Type="6" Skill_Type="29" Spell_Cooltime="0" Duration="0" AnimNum="222" SpellInfo="적을 기절시키고 다음 주문을 걸기 쉬운 상태로 만듭니다. 큰 대미지는 아니지만 기절한 적을 추가 대미지를 받고, 이는 금속 숫자로 표시됩니다. 또한 방어벽 마법도 부술 수 있습니다.(난이도 '어려움' 제외) 다가오는 공격에 프로테고로 성공적인 공격을 방어할 , 을 계속 길게 눌러 원하는 적에게 스투페파이 카운터 공격을 사용하세요" Spell_Lock="0" Equip_Spell="0" Use_Skill="1"/>
<Spell Spell_ID="30" Spell_Name="고대 마법 던지기" Image_Name="Ancient_Magic_Throw" Spell_Type="6" Skill_Type="30" Spell_Cooltime="0" Duration="0" AnimNum="89" SpellInfo="목표하는 적에게 주변에 있는 물체를 소환하여 던집니다. 적의 방어벽 마법을 무너뜨리는 데 특히 유용합니다. 물체 위에 표시가 떳을 때 로 시전할 수 있습니다." Spell_Lock="0" Equip_Spell="0" Use_Skill="1"/>
<Spell Spell_ID="31" Spell_Name="고대 마법" Image_Name="Ancient_magic" Spell_Type="6" Skill_Type="31" Spell_Cooltime="0" Duration="0" AnimNum="152" SpellInfo="고대 마법 MP가 한 부분이라도 가득 차 있으면, 엄청난 대미지를 주고 방어벽 마버을 부수는 강력한 고대 마법을 시전할 수 있게 됩니다. 적의 머리 위에 표시가 나타나면 로 시전하세요" Spell_Lock="0" Equip_Spell="0" Use_Skill="1"/>
<Spell Spell_ID="32" Spell_Name="알로호모라" Image_Name="Alohomora" Spell_Type="6" Skill_Type="32" Spell_Cooltime="0" Duration="0" AnimNum="394" SpellInfo="마법 세계 전역에 잠겨 있는 다양한 방이나 장소를 열 수 있지만 제대로 시전하기 위해선 마법 실력이 바탕이 되어야 합니다, 자물쇠 근처에서 로 시전할 수 있습니다." Spell_Lock="0" Equip_Spell="0" Use_Skill="1"/>
<Spell Spell_ID="33" Spell_Name="페트리피쿠스 토탈루스" Image_Name="Petrificus_Totalus" Spell_Type="6" Skill_Type="33" Spell_Cooltime="0" Duration="0" AnimNum="275" SpellInfo="대부분의 적을 쓰러뜨릴 만큼 강력한 주문이지만 더 위험한 적들은 약간의 대미지를 입힐 뿐, 빠르게 그 영향에서 벗어날 수 있습니다. 이 주문을들키지 않게 적에게 몰래 접근한 후 를 누르면 시전됩니다.." Spell_Lock="0" Equip_Spell="0" Use_Skill="1"/>
</SpellInfo>
<Spell Spell_ID="0" Spell_Name="아레스토 모멘텀" Image_Name="Arresto_Momentum" Spell_Type="0" Type_Name="제어" Skill_Type="0"
Spell_Damage="10" Spell_Cooltime="15" Duration="15" AnimNum="120" SpellInfo="적과 대상의 속도를 모두 늦춰, 다음 행동을 생각할
시간을 벌 수 있습니다."
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" />
<Spell Spell_ID="1" Spell_Name="글래시우스" Image_Name="Glacius" Spell_Type="0" Type_Name="제어" Skill_Type="1"
Spell_Damage="10" Spell_Cooltime="10" Duration="10" AnimNum="156" SpellInfo="적을 얼려서 후속 공격 시 대미지를 증가시킵니다." Spell_Lock="0"
Equip_Spell="0" Use_Skill="1" />
<Spell Spell_ID="2" Spell_Name="레비오소" Image_Name="Levioso" Spell_Type="0" Type_Name="제어" Skill_Type="2"
Spell_Damage="10" Spell_Cooltime="8" Duration="8" AnimNum="180" SpellInfo="물건과 적을 공중에 띄웁니다. 퍼즐을 풀거나 적을
놀라게 할 때 유용합니다."
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" />
<Spell Spell_ID="3" Spell_Name="변신" Image_Name="Transformation" Spell_Type="0" Type_Name="제어" Skill_Type="3"
Spell_Damage="10" Spell_Cooltime="20" Duration="15" AnimNum="146"
SpellInfo="물건과 적의 형태를 바꿉니다. 퍼즐을 풀 때도 사용할 수
있고 무해한 장식품에도 사용할 수 있습니다." Spell_Lock="0" Equip_Spell="0"
Use_Skill="1" />
<Spell Spell_ID="4" Spell_Name="아씨오" Image_Name="Accio" Spell_Type="1" Type_Name="위력" Skill_Type="4"
Spell_Damage="10" Spell_Cooltime="8" Duration="0" AnimNum="151"
SpellInfo="다양한 물체나 적을 근처로 당기는 소환 마법입니다.
특정 무거운 마법 물체를 가까이 당기려면 지속적인
노력이 더 요구되기도 합니다. 일단 물체를 소환하면
버튼을 입력하지 않고도 자동으로 윙가디움 레비오사가
시전되어 계속 공중에 띄울 수 있습니다."
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" />
<Spell Spell_ID="5" Spell_Name="디펄소" Image_Name="Depulso" Spell_Type="1" Type_Name="위력" Skill_Type="5"
Spell_Damage="10" Spell_Cooltime="10" Duration="0" AnimNum="152"
SpellInfo="여러 가지 물건과 적을 상당히 강력한 힘으로
밀어냅니다. 적에게 직접 대미지를 주지는 않지만, 적과
물체를 서로 부딪치게 해서 큰 대미지를 줄 수 있습니다.
또한 물건을 밀거나 회전시켜서 다양한 목적을 달성할 때
유리합니다."
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" />
<Spell Spell_ID="6" Spell_Name="디센도" Image_Name="Descendo" Spell_Type="1" Type_Name="위력" Skill_Type="6"
Spell_Damage="10" Spell_Cooltime="10" Duration="0" AnimNum="155"
SpellInfo="직접 대미지를 주지는 않지만, 물건과 적을 바닥에 세게
떨어뜨리면 매우 겅력한 대미지를 줄 수 있습니다.
공중에 뜬 적을 떨어뜨리면 훨씬 더 강력한 대미지를
줍니다."
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" />
<Spell Spell_ID="7" Spell_Name="플리펜도" Image_Name="Flipendo" Spell_Type="1" Type_Name="위력" Skill_Type="7"
Spell_Damage="10" Spell_Cooltime="5" Duration="0" AnimNum="188"
SpellInfo="물건과 적을 들어올려 거꾸로 뒤집을 수 있습니다.
쿨다운 시간이 짧아서, 공중 콤보를 시작하거나 계속
이어 나갈 때 유용한 주문입니다. 물건을 즉시 뒤집어서
퍼즐을 풀거나 특정한 적의 약점을 이용할 때도
유용합니다."
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" />
<Spell Spell_ID="8" Spell_Name="콘프링고" Image_Name="Confringo" Spell_Type="2" Type_Name="피해" Skill_Type="8"
Spell_Damage="10" Spell_Cooltime="10" Duration="0" AnimNum="157"
SpellInfo="장거리 볼트로 적중 시 대미지를 줍니다. 불 기반 공격을
받은 적은 몇 초 동안 계속 대미지를 입습니다. 그리고
대미지를 입는 동안 적과 충돌하면 화염이 폭발합니다."
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" />
<Spell Spell_ID="9" Spell_Name="디핀도" Image_Name="Diffindo" Spell_Type="2" Type_Name="피해" Skill_Type="9"
Spell_Damage="10" Spell_Cooltime="15" Duration="0" AnimNum="150" SpellInfo="멀리 떨어진 물건과 적을 베어 강력한 대미지를 줍니다." Spell_Lock="0"
Equip_Spell="0" Use_Skill="1" />
<Spell Spell_ID="10" Spell_Name="엑스펠리아르무스" Image_Name="Expelliarmus" Spell_Type="2" Type_Name="피해" Skill_Type="10"
Spell_Damage="10" Spell_Cooltime="10" Duration="0" AnimNum="146"
SpellInfo="지팡이와 무기를 휘두르는 적을 무장해제시킵니다.
그리고 모든 적에게 대미지를 입힙니다. 무기가 없는
적에게도 대미지를 줄 수 있습니다." Spell_Lock="0"
Equip_Spell="0" Use_Skill="1" />
<Spell Spell_ID="11" Spell_Name="봄바르다" Image_Name="Bombarda" Spell_Type="2" Type_Name="피해" Skill_Type="11"
Spell_Damage="10" Spell_Cooltime="15" Duration="0" AnimNum="262" SpellInfo="적중 시 큰 대미지를 주며, 동시에 폭발하여 대형
장애물을 부수고 주변 적에 대미지르 줍니다."
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" />
<Spell Spell_ID="12" Spell_Name="인센디오" Image_Name="Incendio" Spell_Type="2" Type_Name="피해" Skill_Type="12"
Spell_Damage="10" Spell_Cooltime="8" Duration="0" AnimNum="213"
SpellInfo="단거리 공격으로 목표물과 거리가 가까울 때만 사용할 수
있습니다. 이 주문을 외우면 대상은 매우 강력한
대미지를 입고, 특정 물체에 사용하면 불을 붙일 수
있습니다. 불을 이용한 공격으로 공격을 받은 적은 몇 초
동안 계속 대미지를 받습니다. 그리고 대미지를 입는
동안 적과 충돌하면 화염이 폭발합니다."
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" />
<Spell Spell_ID="13" Spell_Name="투영" Image_Name="Disillusionment" Spell_Type="3" Type_Name="유용" Skill_Type="13"
Spell_Damage="10" Spell_Cooltime="0.5" Duration="0" AnimNum="260"
SpellInfo="주변 환경에 녹아들어 남들이 알봐보기 어렵게 만듭니다.
적들에게 들키지 않고 몰래 접근해, 페트리피쿠스
토탈루스를 시전하려고 할 때 아주 유용합니다." Spell_Lock="0"
Equip_Spell="0" Use_Skill="1" />
<Spell Spell_ID="14" Spell_Name="루모스" Image_Name="Lumos" Spell_Type="3" Type_Name="유용" Skill_Type="14"
Spell_Damage="10" Spell_Cooltime="0.5" Duration="0" AnimNum="365" SpellInfo="어두운 곳을 환하게 밝히거나, 퍼즐에서 추가 조명이
필요할 때 사용합니다."
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" />
<Spell Spell_ID="15" Spell_Name="레파로" Image_Name="Reparo" Spell_Type="3" Type_Name="유용" Skill_Type="15"
Spell_Damage="10" Spell_Cooltime="0.5" Duration="0" AnimNum="385" SpellInfo="손상된 특정 물체를 이전 상태로 신속하게 되돌릴 수
있습니다." Spell_Lock="0"
Equip_Spell="0" Use_Skill="1" />
<Spell Spell_ID="16" Spell_Name="윙가디움 레비오사" Image_Name="Wingardium_Leviosa" Spell_Type="3" Type_Name="유용"
Skill_Type="16" Spell_Damage="10" Spell_Cooltime="0.5" Duration="5" AnimNum="273"
SpellInfo="이동 가능한 물체를 공중에 띄워 움직입니다. 움직임으로
물체의 위치를 조절하고, F V Q E로 물체의
거리를 조절하거나 회전시킬 수 있습니다. 윙가디움
레비오사는 아씨오로 소환된 물체에 자동으로
시전됩니다."
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" />
<Spell Spell_ID="17" Spell_Name="구현 마법" Image_Name="Conjuring_Spell" Spell_Type="4" Type_Name="변환" Skill_Type="17"
Spell_Damage="10" Spell_Cooltime="0" Duration="0" AnimNum="115" SpellInfo="필요의 방에서 시전하면 물체를 나타나게 할 수
있습니다." Spell_Lock="0"
Equip_Spell="0" Use_Skill="1" />
<Spell Spell_ID="18" Spell_Name="개조 마법" Image_Name="Altering_Spell" Spell_Type="4" Type_Name="변환" Skill_Type="18"
Spell_Damage="10" Spell_Cooltime="0" Duration="0" AnimNum="349" SpellInfo="필요의 방에서 시전하면 물체의 물리적 형태와 특성을
바꿉니다." Spell_Lock="0"
Equip_Spell="0" Use_Skill="1" />
<Spell Spell_ID="19" Spell_Name="에바네스코" Image_Name="Evanesco" Spell_Type="4" Type_Name="변환" Skill_Type="19"
Spell_Damage="10" Spell_Cooltime="0" Duration="0" AnimNum="136" SpellInfo="필요한 방에서 시전하면 물체를 사라지게 하고 월장석이
반환됩니다." Spell_Lock="0"
Equip_Spell="0" Use_Skill="1" />
<Spell Spell_ID="20" Spell_Name="아바다 케다브라" Image_Name="Avada_Kedavra" Spell_Type="5" Type_Name="저주" Skill_Type="20"
Spell_Damage="10" Spell_Cooltime="90" Duration="0" AnimNum="208" SpellInfo="적을 즉시 처치합니다." Spell_Lock="0" Equip_Spell="0"
Use_Skill="1" />
<Spell Spell_ID="21" Spell_Name="크루시오" Image_Name="Crucio" Spell_Type="5" Type_Name="저주" Skill_Type="21"
Spell_Damage="10" Spell_Cooltime="20" Duration="20" AnimNum="216"
SpellInfo="시간이 소요되는 대미지를 주기에 대부분의 적이 고통에
몸서리칩니다. 또한 저주를 받은 적은 추가 대미지를
받습니다." Spell_Lock="0" Equip_Spell="0"
Use_Skill="1" />
<Spell Spell_ID="22" Spell_Name="임페리오" Image_Name="Imperio" Spell_Type="5" Type_Name="저주" Skill_Type="22"
Spell_Damage="10" Spell_Cooltime="30" Duration="20" AnimNum="462"
SpellInfo="일시적으로 적을 동료처럼 변화시켜 싸우게 합니다.
주문이 걸린 동안 동료로 바뀐 적은 다른 적들의 공격을
받았을 때 방어력이 높아지며 당신에게 충성합니다. 한편
적을 저주하면 그 적은 추가로 대미지를 받습니다."
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" />
<Spell Spell_ID="23" Spell_Name="마법 동물 쓰담기용 빗" Image_Name="Beast_Petting_Brush" Spell_Type="3" Type_Name="유용"
Skill_Type="23" Spell_Damage="10" Spell_Cooltime="0" Duration="0" AnimNum="327" SpellInfo="적마법 동물들을 빗질할 때 쓰는 빗입니다." Spell_Lock="0"
Equip_Spell="0" Use_Skill="1" />
<Spell Spell_ID="24" Spell_Name="마법 동물 먹이" Image_Name="Beast_Feed" Spell_Type="3" Type_Name="유용" Skill_Type="24"
Spell_Damage="10" Spell_Cooltime="0" Duration="0" AnimNum="378" SpellInfo="마법 동물에게 줄 수 있는 먹이입니다." Spell_Lock="0" Equip_Spell="0"
Use_Skill="1" />
<Spell Spell_ID="25" Spell_Name="포획 자루" Image_Name="Nab_Sack" Spell_Type="3" Type_Name="유용" Skill_Type="25"
Spell_Damage="10" Spell_Cooltime="0" Duration="0" AnimNum="235" SpellInfo="마법 동물을 구출하거나 잡을 수 있는 마법 자루입니다." Spell_Lock="0"
Equip_Spell="0" Use_Skill="1" />
<Spell Spell_ID="26" Spell_Name="기본 주문" Image_Name="Basic_Cast" Spell_Type="6" Type_Name="필수" Skill_Type="26"
Spell_Damage="10" Spell_Cooltime="0" Duration="0" AnimNum="308" SpellInfo="적과 사물에게 가벼운 대미지를 줍니다. 시전하려면
을 탭하세요." Spell_Lock="0"
Equip_Spell="0" Use_Skill="1" />
<Spell Spell_ID="27" Spell_Name="레벨리오" Image_Name="Revelio" Spell_Type="6" Type_Name="필수" Skill_Type="27"
Spell_Damage="10" Spell_Cooltime="0" Duration="0" AnimNum="227"
SpellInfo="숨겨진 물건, 퍼즐 아이템, 전리품, 적 등을 모두 포함해
유용하거나 상호작용할 수 있는 다양한 대상을 강조
표시합니다. R 로 시전합니다." Spell_Lock="0"
Equip_Spell="0" Use_Skill="1" />
<Spell Spell_ID="28" Spell_Name="프로테고" Image_Name="Protego" Spell_Type="6" Type_Name="필수" Skill_Type="28"
Spell_Damage="10" Spell_Cooltime="0" Duration="0" AnimNum="285"
SpellInfo="주문, 무기 등 여러 가지 공격으로부터 보호합니다.
공격이 닿기 직전까지 기다렸다가 Q로 시전하면
프로테고를 완벽하게 시전할 수 있습니다. 근접
공격자에게는 대미지를 주고, 공격을 반사시켜 적의
방어력을 부술 수도 있습니다."
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" />
<Spell Spell_ID="29" Spell_Name="스투페파이" Image_Name="Stupefy" Spell_Type="6" Type_Name="필수" Skill_Type="29"
Spell_Damage="10" Spell_Cooltime="0" Duration="0" AnimNum="222"
SpellInfo="적을 기절시키고 다음 주문을 걸기 쉬운 상태로
만듭니다. 큰 대미지는 아니지만 기절한 적을 추가
대미지를 받고, 이는 금속 숫자로 표시됩니다. 또한
방어벽 마법도 부술 수 있습니다.(난이도 '어려움' 제외)
다가오는 공격에 프로테고로 성공적인 공격을 방어할
때, Q를 계속 길게 눌러 원하는 적에게 스투페파이
카운터 공격을 사용하세요"
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" />
<Spell Spell_ID="30" Spell_Name="고대 마법 던지기" Image_Name="Ancient_Magic_Throw" Spell_Type="6" Type_Name="필수"
Skill_Type="30" Spell_Damage="10" Spell_Cooltime="0" Duration="0" AnimNum="89"
SpellInfo="목표하는 적에게 주변에 있는 물체를 소환하여 던집니다.
적의 방어벽 마법을 무너뜨리는 데 특히 유용합니다.
물체 위에 표시가 떳을 때 Z로 시전할 수 있습니다."
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" />
<Spell Spell_ID="31" Spell_Name="고대 마법" Image_Name="Ancient_Magic" Spell_Type="6" Type_Name="필수" Skill_Type="31"
Spell_Damage="10" Spell_Cooltime="0" Duration="0" AnimNum="152"
SpellInfo="고대 마법 MP가 한 부분이라도 가득 차 있으면, 엄청난
대미지를 주고 방어벽 마버을 부수는 강력한 고대 마법을
시전할 수 있게 됩니다. 적의 머리 위에 표시가
나타나면 X로 시전하세요"
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" />
<Spell Spell_ID="32" Spell_Name="알로호모라" Image_Name="Alohomora" Spell_Type="6" Type_Name="필수" Skill_Type="32"
Spell_Damage="10" Spell_Cooltime="0" Duration="0" AnimNum="394"
SpellInfo="마법 세계 전역에 잠겨 있는 다양한 방이나 장소를 열 수
있지만 제대로 시전하기 위해선 마법 실력이 바탕이
되어야 합니다, 자물쇠 근처에서 F로 시전할 수
있습니다."
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" />
<Spell Spell_ID="33" Spell_Name="페트리피쿠스 토탈루스" Image_Name="Petrificus_Totalus" Spell_Type="6" Type_Name="필수"
Skill_Type="33" Spell_Damage="10" Spell_Cooltime="0" Duration="0" AnimNum="275"
SpellInfo="대부분의 적을 쓰러뜨릴 만큼 강력한 주문이지만 더
위험한 적들은 약간의 대미지를 입힐 뿐, 빠르게 그
영향에서 벗어날 수 있습니다. 이 주문을들키지 않
적에게 몰래 접근한 후 F를 누르면 시전됩니다."
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" />
</SpellInfo>
@@ -586,7 +586,7 @@ PS_OUT PS_SpellAnim(PS_IN In)
switch (g_iSpellType)
{
case 0:
BGColor = float3(255.f, 255.f, 0.f) / 255.f;
BGColor = float3(220.f, 165.f, 70.f) / 255.f;
break;
case 1:
BGColor = float3(150.f, 120.f, 240.f) / 255.f;
@@ -1132,7 +1132,7 @@ PS_OUT PS_Spell_Header(PS_IN In)
switch (g_iSpellType)
{
case 0:
BGColor = float3(255.f, 255.f, 0.f) / 255.f;
BGColor = float3(220.f, 165.f, 70.f) / 255.f;
break;
case 1:
BGColor = float3(150.f, 120.f, 240.f) / 255.f;
@@ -1155,11 +1155,12 @@ PS_OUT PS_Spell_Header(PS_IN In)
}
float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
Color = tex1;
Color.rgb = tex1.rgb * 0.8f;
Color.a = tex1.a;
Color.rgb *= BGColor;
Color.a *= Alpha;
Color.a *= Alpha * 0.5f;
Out.vColor = Color;
@@ -239,7 +239,7 @@ PS_OUT PS_Color_Image(PS_IN In)
switch (In.vBaseColor)
{
case 0:
BGColor = float3(255.f, 255.f, 0.f) / 255.f;
BGColor = float3(220.f, 165.f, 70.f) / 255.f;
break;
case 1:
BGColor = float3(150.f, 120.f, 240.f) / 255.f;
+3
View File
@@ -0,0 +1,3 @@
<Emart>
<Floor ID="0" level="1">마트, 푸드코트, 의류매장</Floor>
</Emart>
@@ -187,6 +187,7 @@ void CIMGUIUI::Update(_float fTimeDelta)
m_iSpellType = static_cast<CElementObject*>(m_pElementObject)->Get_SkillType();
m_iSkillType = static_cast<CElementObject*>(m_pElementObject)->Get_SpellType();
m_fCoolTime = static_cast<CElementObject*>(m_pElementObject)->Get_CoolTime();
m_fFontPos = static_cast<CElementObject*>(m_pElementObject)->Get_Font();
}
GUI::Begin("Current_CanvasObject_Info");
if (m_pUI_Manager != nullptr)
@@ -482,6 +483,17 @@ void CIMGUIUI::Update(_float fTimeDelta)
{
static_cast<CElementObject*>(m_pElementObject)->Set_CoolTime(m_fCoolTime);
}
GUI::Text("FontPosX %.1f", m_fFontPos.x);
GUI::Text("FontPosY %.1f", m_fFontPos.y);
if (GUI::SliderFloat("FontX", &m_fFontX, -1920.f, 1920.f))
{
static_cast<CElementObject*>(m_pElementObject)->Set_FontX(m_fFontX);
}
if (GUI::SliderFloat("FontY", &m_fFontY, -1080.f, 1080.f))
{
static_cast<CElementObject*>(m_pElementObject)->Set_FontY(m_fFontY);
}
}
GUI::End();
}
+1
View File
@@ -72,6 +72,7 @@ HRESULT CLogo::Render()
if (FAILED(m_pVIBufferCom->Render())) {
return E_FAIL;
}
m_pGameInstance->Render_Text(TEXT("Font_size13"), TEXT("Font_Test"), _float2(0.f, 0.f));
return S_OK;
}
@@ -47,6 +47,9 @@ HRESULT CMagic_Item::Initialize(void* pArg)
m_iArratCount = 2;
Compute_UV(0);
Compute_Image();
m_fFontX = 1171.f;
m_fFontY = 870.f;
m_iPotionIndex = 0;
return S_OK;
}
@@ -137,6 +140,19 @@ void CMagic_Item::Update(_float fTimeDelta)
m_vUVScale.y += fTimeDelta * (1.f / m_fCoolTime);
}
if (m_pGameInstance->Key_Down(DIK_K))
{
m_iPotionIndex--;
}
if (m_pGameInstance->Key_Down(DIK_L))
{
m_iPotionIndex++;
}
m_strPotion = to_wstring(m_iPotionIndex);
m_fFontOffSet = (m_pGameInstance->FontSizeX(TEXT("UI_size15"), m_strPotion.c_str()) - 13.f) * 0.5f;
m_fTime += fTimeDelta * m_fTimeMult;
__super::Update(fTimeDelta);
}
@@ -173,6 +189,9 @@ HRESULT CMagic_Item::Render()
return E_FAIL;
}
m_pGameInstance->Render_Text(TEXT("UI_size15"), m_strPotion.c_str(), _float2((m_fFontX + m_fX) - m_fFontOffSet, m_fFontY + m_fY), XMVectorSet(208.f / 255.f, 177.f / 255.f, 52.f / 255.f, 1.f));
return S_OK;
}
@@ -83,6 +83,27 @@ void CMainApp::Compute_FrameCount()
HRESULT CMainApp::Ready_Default_Setting()
{
if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size13"), TEXT("../Bin/Resources/Fonts/Font_size13.spritefont"))))
return E_FAIL;
if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size14"), TEXT("../Bin/Resources/Fonts/Font_size14.spritefont"))))
return E_FAIL;
if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size15"), TEXT("../Bin/Resources/Fonts/Font_size15.spritefont"))))
return E_FAIL;
if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size20"), TEXT("../Bin/Resources/Fonts/Font_size20.spritefont"))))
return E_FAIL;
if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size21"), TEXT("../Bin/Resources/Fonts/Font_size21.spritefont"))))
return E_FAIL;
if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size30"), TEXT("../Bin/Resources/Fonts/Font_size30.spritefont"))))
return E_FAIL;
if (FAILED(m_pGameInstance->Add_Font(TEXT("UI_size15"), TEXT("../Bin/Resources/Fonts/UI_size15.spritefont"))))
return E_FAIL;
return S_OK;
}
+20 -2
View File
@@ -40,8 +40,11 @@ HRESULT CPotion::Initialize(void* pArg)
m_fTimeMult = 3.f;
m_fAlpha = 1.f;
m_fAlphaTime = 1.f;
m_vImageSlotPos = _float2(45.f,45.f);
m_vImageSize = _float2(32.f,32.f);
m_vImageSlotPos = _float2(45.f, 45.f);
m_vImageSize = _float2(32.f, 32.f);
m_fFontX = 1163.f;
m_fFontY = 860.f;
m_iPotionIndex = 0;
return S_OK;
}
@@ -91,6 +94,19 @@ void CPotion::Update(_float fTimeDelta)
m_fTime = -1.f;
}
if (m_pGameInstance->Key_Down(DIK_K))
{
m_iPotionIndex--;
}
if (m_pGameInstance->Key_Down(DIK_L))
{
m_iPotionIndex++;
}
m_strPotion = to_wstring(m_iPotionIndex);
m_fFontOffSet = (m_pGameInstance->FontSizeX(TEXT("UI_size15"), m_strPotion.c_str()) - 13.f) * 0.5f;
m_fTime += fTimeDelta * m_fTimeMult;
@@ -124,6 +140,8 @@ HRESULT CPotion::Render()
return E_FAIL;
}
m_pGameInstance->Render_Text(TEXT("UI_size15"), m_strPotion.c_str(), _float2((m_fFontX + m_fX) - m_fFontOffSet, m_fFontY + m_fY), XMVectorSet(208.f / 255.f, 177.f / 255.f, 52.f / 255.f, 1.f));
return S_OK;
}
@@ -51,7 +51,9 @@ HRESULT CSpell_Data::Initialize(void* pArg)
pInfo[id].pSpell_Name = CMyTools::ToWstring(pSpell->Attribute("Spell_Name"));
pInfo[id].pImage_Name = CMyTools::ToWstring(pSpell->Attribute("Image_Name"));
pSpell->QueryIntAttribute("Spell_Type", &pInfo[id].iSpell_Type);
pInfo[id].pType_Name = CMyTools::ToWstring(pSpell->Attribute("Type_Name"));
pSpell->QueryIntAttribute("Skill_Type", &pInfo[id].iSkill_Type);
pSpell->QueryFloatAttribute("Spell_Damage", &pInfo[id].fSpell_Damage);
pSpell->QueryFloatAttribute("Spell_Cooltime", &pInfo[id].fSpell_CoolTime);
pSpell->QueryFloatAttribute("Duration", &pInfo[id].fDuration);
pSpell->QueryIntAttribute("AnimNum", &pInfo[id].iAnimNum);
@@ -24,7 +24,7 @@ HRESULT CSpell_Header::Initialize(void* pArg)
Desc.fX = 600.f;
Desc.fY = -385.f;
Desc.fSizeX = 512.f;
Desc.fSizeY = 64.f;
Desc.fSizeY = 80.f;
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
@@ -46,6 +46,9 @@ HRESULT CSpell_Header::Initialize(void* pArg)
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); });
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); });
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); });
m_fFontX = 920.f;
m_fFontY = 510.f;
m_fType = _float2(935.f, 550.f);
return S_OK;
}
@@ -74,6 +77,7 @@ void CSpell_Header::Update(_float fTimeDelta)
if (m_fAlpha >= 1.f)
{
m_bFadeIn = false;
m_bHover = true;
m_fAlpha = 1.f;
}
}
@@ -81,7 +85,10 @@ void CSpell_Header::Update(_float fTimeDelta)
if (m_bFadeOut == true)
{
if (m_fAlpha >= 0.f)
m_fAlpha -= fTimeDelta * m_fAlphaTime;;
{
m_fAlpha -= fTimeDelta * m_fAlphaTime;
m_bHover = false;
}
if (m_fAlpha <= 0.f)
{
@@ -93,6 +100,8 @@ void CSpell_Header::Update(_float fTimeDelta)
if (m_iSpellType != -1)
{
m_iSkillType = static_cast<CUIObject*>(m_pOwner)->Get_Info(m_iSpellType).iSpell_Type;
m_pSpell_Name = static_cast<CUIObject*>(m_pOwner)->Get_Info(m_iSpellType).pSpell_Name;
m_fSpell_Type = static_cast<CUIObject*>(m_pOwner)->Get_Info(m_iSpellType).pType_Name;
}
m_fTime += fTimeDelta * m_fTimeMult;
@@ -126,6 +135,13 @@ HRESULT CSpell_Header::Render()
return E_FAIL;
}
if (m_bHover == true)
{
m_fFontOffSet = (m_pGameInstance->FontSizeX(TEXT("Font_size20"), m_pSpell_Name.c_str()) - 53.f) * 0.5f;
m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pSpell_Name.c_str(), _float2((m_fFontX + m_fX) - m_fFontOffSet, m_fFontY + m_fY), XMVectorSet(215.f / 255.f, 185.f / 255.f, 95.f / 255.f, 1.f));
m_pGameInstance->Render_Text(TEXT("Font_size13"), m_fSpell_Type.c_str(), _float2(m_fType.x + m_fX, m_fType.y + m_fY));
}
return S_OK;
}
@@ -22,7 +22,7 @@ HRESULT CSpell_Header_Line::Initialize(void* pArg)
CUIObject::UIOBJECT_DESC Desc{};
Desc.fX = 600.f;
Desc.fY = -345.f;
Desc.fY = -340.f;
Desc.fSizeX = 487.f;
Desc.fSizeY = 18.f;
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
@@ -44,11 +44,14 @@ HRESULT CSpell_Preview::Initialize(void* pArg)
m_vNine_Slice = _float4(50.f, 75.f, 30.f, 96.f);
m_fTopY = m_fY - m_vScale.y * 0.5f;
SizeUpX(512.f);
SizeUpY(270.f);
SizeUpY(280.f);
m_iSpellType = ENUM_CLASS(SPELLTYPE::CONTROL);
m_fSortZ = 0.02f;
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); });
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); });
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); });
m_fFontX = 740.f;
m_fFontY = 500.f;
return S_OK;
}
@@ -76,6 +79,7 @@ void CSpell_Preview::Update(_float fTimeDelta)
if (m_fAlpha >= 1.f)
{
m_bFadeIn = false;
m_bHover = true;
m_fAlpha = 1.f;
}
}
@@ -83,7 +87,10 @@ void CSpell_Preview::Update(_float fTimeDelta)
if (m_bFadeOut == true)
{
if (m_fAlpha >= 0.f)
m_fAlpha -= fTimeDelta * m_fAlphaTime;;
{
m_fAlpha -= fTimeDelta * m_fAlphaTime;
m_bHover = false;
}
if (m_fAlpha <= 0.f)
{
@@ -92,6 +99,12 @@ void CSpell_Preview::Update(_float fTimeDelta)
}
}
m_fTime += fTimeDelta * m_fTimeMult;
if (m_iSpellType != -1)
{
m_pSpell_Info = static_cast<CUIObject*>(m_pOwner)->Get_Info(m_iSpellType).pSpellInfo;
}
__super::Update(fTimeDelta);
}
@@ -121,6 +134,11 @@ HRESULT CSpell_Preview::Render()
if (FAILED(m_pVIBufferCom->Render())) {
return E_FAIL;
}
if (m_bHover == true)
{
m_pGameInstance->Render_Text(TEXT("Font_size14"), m_pSpell_Info.c_str(), _float2(m_fFontX+ m_fX, m_fFontY + m_fY));
}
return S_OK;
}
+31 -2
View File
@@ -6,6 +6,7 @@
#include "Mouse_Cursor.h"
#include "CameraLockOn.h"
#include "Loding_Canvas.h"
#include "tinyxml2.h"
CUI_Manager::CUI_Manager(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CUIObject(pDevice, pContext)
@@ -102,6 +103,11 @@ void CUI_Manager::Update(_float fTimeDelta)
Canvas_Change(Canvases::GAMEPLAYER_CANVAS);
}
if (m_pGameInstance->Key_Down(DIK_SLASH))
{
SaveXML("../Bin/Resources/Data/UI/Data.xml");
}
}
void CUI_Manager::Late_Update(_float fTimeDelta)
@@ -142,16 +148,39 @@ HRESULT CUI_Manager::Ready_Components(void* pArg)
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMouse_Cursor>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CMouse_Cursor**>(&m_pMouse_Cursor)))) {
return E_FAIL;
}
Add_Canvas(TEXT("Mouse_Cursor"), m_pMouse_Cursor);
//Add_Canvas(TEXT("Mouse_Cursor"), m_pMouse_Cursor);
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CCameraLockOn>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CCameraLockOn**>(&m_pCamera_LockOn)))) {
return E_FAIL;
}
Add_Canvas(TEXT("Camera_LockOn"), m_pCamera_LockOn);
//Add_Canvas(TEXT("Camera_LockOn"), m_pCamera_LockOn);
return S_OK;
}
bool CUI_Manager::SaveXML(const _string& filePath)
{
tinyxml2::XMLDocument doc;
// 루트 생성
tinyxml2::XMLElement* root = doc.NewElement("Emart");
doc.InsertEndChild(root);
// 1층 요소 생성, ID만 먼저 넣음
tinyxml2::XMLElement* floor1 = doc.NewElement("Floor");
floor1->SetAttribute("ID", 0); // 나중에 사용할 수 있는 ID
root->InsertEndChild(floor1);
// 나중에 다른 속성이나 텍스트 추가 가능
floor1->SetAttribute("level", 1); // 층 정보 추가
floor1->SetText("마트, 푸드코트, 의류매장"); // 텍스트 정보 추가
// 저장
doc.SaveFile("Emart.xml");
return doc.SaveFile(filePath.c_str()) == tinyxml2::XML_SUCCESS;
}
void CUI_Manager::Add_Canvas(_wstring Name, CGameObject* pCanvas)
{
if (pCanvas == nullptr)
+4
View File
@@ -97,6 +97,10 @@ class CIMGUIUI final : public CGameObject
_bool m_bElementAllVisible = { false };
_bool m_bElementVisible = { false };
_float2 m_fFontPos {};
_float m_fFontX {};
_float m_fFontY {};
public:
static CIMGUIUI* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
@@ -46,6 +46,9 @@ class CMagic_Item final : public CElementObject
_float2 m_vImagePos1 = {};
_float2 m_vImageSize2 = {};
_float2 m_vImagePos2 = {};
_int m_iPotionIndex{};
_wstring m_strPotion;
public:
static CMagic_Item* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
+3
View File
@@ -36,6 +36,9 @@ class CPotion final : public CElementObject
_float2 m_vImageSlotPos{};
_float2 m_vImageSize{};
_int m_iPotionIndex{};
_wstring m_strPotion;
public:
static CPotion* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
@@ -18,7 +18,9 @@ class CSpell_Data final : public CGameObject
_string pSpell_Name;
_string pImage_Name;
_int iSpell_Type{};
_string pType_Name{};
_int iSkill_Type{};
_float fSpell_Damage{};
_float fSpell_CoolTime{};
_float fDuration{};
_int iAnimNum{};
@@ -30,6 +30,11 @@ class CSpell_Header final : public CElementObject
CShader* m_pShaderCom = { nullptr };
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
_wstring m_pSpell_Name;
_wstring m_fSpell_Type;
_float2 m_fType{};
_int m_iSkillType{};
public:
static CSpell_Header* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
@@ -49,6 +49,7 @@ class CSpell_Hover final : public CElementObject
_float m_fOffSetX{};
_float m_fOffSetY{};
_uint m_iCols{};
public:
static CSpell_Hover* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
@@ -36,7 +36,7 @@ class CSpell_Preview final : public CElementObject
CShader* m_pShaderCom = { nullptr };
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
_wstring m_pSpell_Info;
_float4 m_vHeaderBack{};
@@ -42,6 +42,7 @@ class CUI_Manager final : public CUIObject
void Add_Manager_Event(_wstring Name, function<void(void*)> Event);
void Event_Callback(_wstring Name, void* pArg = nullptr);
private:
bool SaveXML(const _string& filePath);
void Add_Canvas(_wstring Name, class CGameObject* pCanvas);
CGameObject* Find_Canvas(const _wstring& Name);
@@ -208,6 +208,8 @@ call Update_Lib.bat
<ClCompile Include="..\Private\ContainerObject.cpp" />
<ClCompile Include="..\Private\DebugDraw.cpp" />
<ClCompile Include="..\private\Fog.cpp" />
<ClCompile Include="..\private\Font.cpp" />
<ClCompile Include="..\private\Font_Manager.cpp" />
<ClCompile Include="..\private\QuadTree.cpp" />
<ClCompile Include="..\private\OcclusionQuery.cpp" />
<ClCompile Include="..\Private\Renderer_Declare.cpp" />
@@ -426,6 +428,8 @@ call Update_Lib.bat
<ClInclude Include="..\Public\Bounding_OBB.h" />
<ClInclude Include="..\Public\Bounding_Sphere.h" />
<ClInclude Include="..\public\Fog.h" />
<ClInclude Include="..\public\Font.h" />
<ClInclude Include="..\public\Font_Manager.h" />
<ClInclude Include="..\public\FSM.h" />
<ClInclude Include="..\public\QuadTree.h" />
<ClInclude Include="..\public\OcclusionQuery.h" />
@@ -295,6 +295,12 @@
<Filter Include="02.Element\02.Component\09.Light">
<UniqueIdentifier>{7c82051e-19af-4284-8156-16f504db30b6}</UniqueIdentifier>
</Filter>
<Filter Include="03.Management\04. Font_Manager">
<UniqueIdentifier>{bba1e91b-87a8-4a7b-8e4e-b42d2041d8eb}</UniqueIdentifier>
</Filter>
<Filter Include="02.Element\01.GameObject\01. Font">
<UniqueIdentifier>{7eab7292-025e-40d7-aa71-73e7a3c71ea7}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\Private\Base.cpp">
@@ -564,6 +570,12 @@
<ClCompile Include="..\private\Resource_Manager.cpp">
<Filter>03.Management\02.Resource_Manager</Filter>
</ClCompile>
<ClCompile Include="..\private\Font_Manager.cpp">
<Filter>03.Management\04. Font_Manager</Filter>
</ClCompile>
<ClCompile Include="..\private\Font.cpp">
<Filter>02.Element\01.GameObject\01. Font</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\Public\Base.h">
@@ -1199,6 +1211,12 @@
<ClInclude Include="..\public\Resource_Manager.h">
<Filter>03.Management\02.Resource_Manager</Filter>
</ClInclude>
<ClInclude Include="..\public\Font_Manager.h">
<Filter>03.Management\04. Font_Manager</Filter>
</ClInclude>
<ClInclude Include="..\public\Font.h">
<Filter>02.Element\01.GameObject\01. Font</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\Public\Assimp\color4.inl">
+105
View File
@@ -0,0 +1,105 @@
#include "pch.h"
#include "Font.h"
CFont::CFont(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: m_pDevice{ pDevice }
, m_pContext{ pContext }
{
Safe_AddRef(m_pDevice);
Safe_AddRef(m_pContext);
}
HRESULT CFont::Initialize(const _tchar* pFontFilePath)
{
m_pBatch = new SpriteBatch(m_pContext);
m_pFont = new SpriteFont(m_pDevice, pFontFilePath);
return S_OK;
}
HRESULT CFont::Render(const _tchar* pText, const _float2& vPosition, _fvector vColor, _float vScale)
{
m_pBatch->Begin();
m_pFont->DrawString(m_pBatch, pText, vPosition, vColor, 0.f, _float2(0.f, 0.f), vScale);
m_pBatch->End();
return S_OK;
}
HRESULT CFont::Render_Rotate(const _tchar* pText, const _float2& vPosition, _fvector vColor, _float Rotation, _float vScale)
{
_float2 origin = _float2(XMVectorGetX(m_pFont->MeasureString(pText)) * 0.5f, XMVectorGetY(m_pFont->MeasureString(pText)) * 0.5f);
m_pBatch->Begin();
m_pFont->DrawString(m_pBatch, pText, vPosition, vColor, XMConvertToRadians(Rotation), origin, vScale);
m_pBatch->End();
return S_OK;
}
HRESULT CFont::Perspective_Render(_matrix View, _matrix Proj, const _tchar* pText, const _fvector& vPosition, _fvector vColor, _float vScale)
{
// 월드 좌표 -> 화면 좌표 변환
XMVECTOR projected = XMVector3Project(vPosition, 0.0f, 0.0f, 1280.f, 720.f, 0.0f, 1.0f, Proj, View, XMMatrixIdentity());
// 화면 좌표 XY만 사용
XMFLOAT2 screenPos;
XMStoreFloat2(&screenPos, projected);
// 화면 밖이면 그리지 않음
float z = XMVectorGetZ(projected);
if (z < 0.f || z > 1.f)
return S_OK;
// 텍스트 크기 계산 + 중앙 origin 설정
XMVECTOR textSizeV = m_pFont->MeasureString(pText);
XMVECTOR origin = XMVectorSet(
XMVectorGetX(textSizeV) * 0.5f,
XMVectorGetY(textSizeV) * 0.5f,
0.f, 0.f
);
// 원근에 따른 스케일 보정
float scale = vScale / (z + 0.0001f);
m_pBatch->Begin(SpriteSortMode_Deferred, nullptr, nullptr, nullptr, nullptr, nullptr);
m_pFont->DrawString(m_pBatch, pText, XMVectorSet(screenPos.x, screenPos.y, 0.f, 0.f), vColor, 0.f, origin, scale);
m_pBatch->End();
return S_OK;
}
_float CFont::FontSizeX(const _tchar* pText)
{
return XMVectorGetX(m_pFont->MeasureString(pText));
}
CFont* CFont::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const _tchar* pFontFilePath)
{
CFont* pInstance = new CFont(pDevice, pContext);
if (FAILED(pInstance->Initialize(pFontFilePath)))
{
MSG_BOX("Failed to Created : CFont");
Safe_Release(pInstance);
}
return pInstance;
}
void CFont::Free()
{
__super::Free();
Safe_Release(m_pContext);
Safe_Release(m_pDevice);
Safe_Delete(m_pBatch);
Safe_Delete(m_pFont);
}
@@ -0,0 +1,87 @@
#include "pch.h"
#include "Font_Manager.h"
#include "Font.h"
CFont_Manager::CFont_Manager(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: m_pDevice{ pDevice }
, m_pContext{ pContext }
{
Safe_AddRef(m_pDevice);
Safe_AddRef(m_pContext);
}
HRESULT CFont_Manager::Add_Font(const _wstring& strFontTag, const _tchar* pFontFilePath)
{
if (nullptr != Find_Font(strFontTag))
return E_FAIL;
CFont* pFont = CFont::Create(m_pDevice, m_pContext, pFontFilePath);
if (nullptr == pFont)
return E_FAIL;
m_Fonts.emplace(strFontTag, pFont);
return S_OK;
}
HRESULT CFont_Manager::Render(const _wstring& strFontTag, const _tchar* pText, const _float2& vPosition, _fvector vColor, _float vScale)
{
CFont* pFont = Find_Font(strFontTag);
if (nullptr == pFont)
return E_FAIL;
return pFont->Render(pText, vPosition, vColor, vScale);
}
HRESULT CFont_Manager::Render_Rotate(const _wstring& strFontTag, const _tchar* pText, const _float2& vPosition, _fvector vColor, _float Rotation, _float vScale)
{
CFont* pFont = Find_Font(strFontTag);
if (nullptr == pFont)
return E_FAIL;
return pFont->Render_Rotate(pText, vPosition, vColor, Rotation, vScale);
}
HRESULT CFont_Manager::Perspective_Render(_matrix View, _matrix Proj, const _wstring& strFontTag, const _tchar* pText, const _fvector& vPosition, _fvector vColor, _float vScale)
{
CFont* pFont = Find_Font(strFontTag);
if (nullptr == pFont)
return E_FAIL;
return pFont->Perspective_Render(View, Proj, pText, vPosition, vColor, vScale);
}
_float CFont_Manager::FontSizeX(const _wstring& strFontTag, const _tchar* pText)
{
CFont* pFont = Find_Font(strFontTag);
if (nullptr == pFont)
return 0.f;
return pFont->FontSizeX(pText);
}
CFont* CFont_Manager::Find_Font(const _wstring& strFontTag)
{
auto iter = m_Fonts.find(strFontTag);
if (iter == m_Fonts.end())
return nullptr;
return iter->second;
}
CFont_Manager* CFont_Manager::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
return new CFont_Manager(pDevice, pContext);
}
void CFont_Manager::Free()
{
__super::Free();
for (auto& Pair : m_Fonts)
Safe_Release(Pair.second);
m_Fonts.clear();
Safe_Release(m_pDevice);
Safe_Release(m_pContext);
}
@@ -19,6 +19,7 @@
#include "ThreadHolder.h"
#include "Fog.h"
#include "Resource_Manager.h"
#include "Font_Manager.h"
IMPLEMENT_SINGLETON(CGameInstance)
@@ -119,6 +120,11 @@ HRESULT CGameInstance::Initialize_Engine(const ENGINE_DESC& EngineDesc, ID3D11De
return E_FAIL;
}
m_pFont_Manager = CFont_Manager::Create(*ppDevice, *ppContext);
if (nullptr == m_pFont_Manager) {
return E_FAIL;
}
return S_OK;
}
@@ -815,8 +821,11 @@ ID3D11ShaderResourceView* CGameInstance::Add_Resource(const _char* pFilePath)
{
return m_pResource_Manager->Add_Texture(pFilePath);
}
#pragma endregion // FOG
#pragma region INPUT
bool CGameInstance::Key_Pressing(int _iKey)
{
//if (false == (GUI::IsWindowFocused(ImGuiFocusedFlags_AnyWindow))) {
@@ -920,12 +929,44 @@ _bool CGameInstance::Toggle_MouseCenter()
return m_pMouse_Manager->Toggle_MouseCenter();
}
#pragma endregion // INPUT
#pragma region FONT_MANAGER
HRESULT CGameInstance::Add_Font(const _wstring& strFontTag, const _tchar* pFontFilePath)
{
return m_pFont_Manager->Add_Font(strFontTag, pFontFilePath);
}
HRESULT CGameInstance::Render_Text(const _wstring& strFontTag, const _tchar* pText, const _float2& vPosition, _fvector vColor, _float vScale)
{
return m_pFont_Manager->Render(strFontTag, pText, vPosition, vColor, vScale);
}
HRESULT CGameInstance::Render_Rotation_Text(const _wstring& strFontTag, const _tchar* pText, const _float2& vPosition, _fvector vColor, _float Rotation, _float vScale)
{
return m_pFont_Manager->Render_Rotate(strFontTag, pText, vPosition, vColor, Rotation, vScale);
}
HRESULT CGameInstance::Perspective_Render_Text(_matrix View, _matrix Proj, const _wstring& strFontTag, const _tchar* pText, const _fvector& vPosition, _fvector vColor, _float vScale)
{
return m_pFont_Manager->Perspective_Render(View, Proj, strFontTag, pText, vPosition, vColor, vScale);
}
_float CGameInstance::FontSizeX(const _wstring& strFontTag, const _tchar* pText)
{
return m_pFont_Manager->FontSizeX(strFontTag, pText);
}
#pragma endregion
void CGameInstance::Release_Engine()
{
SAFE_RELEASE(m_pThreadHolder);
DestroyInstance();
SAFE_RELEASE(m_pFont_Manager);
SAFE_RELEASE(m_pFog);
SAFE_RELEASE(m_pPicking);
SAFE_RELEASE(m_pCollider_Manager);
@@ -502,6 +502,21 @@ const CUIObject::SPELLINFO CUIObject::Get_Info(_int Index)
return SPELLINFO();
}
void CUIObject::Set_FontX(_float fFontX)
{
m_fFontX = fFontX;
}
void CUIObject::Set_FontY(_float fFontY)
{
m_fFontY = fFontY;
}
_float2 CUIObject::Get_Font()
{
return _float2(m_fFontX, m_fFontY);
}
void CUIObject::Free()
{
__super::Free();
+31
View File
@@ -0,0 +1,31 @@
#pragma once
#include "Base.h"
NS_BEGIN(Engine)
class CFont final : public CBase
{
private:
CFont(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual ~CFont() = default;
public:
HRESULT Initialize(const _tchar* pFontFilePath);
HRESULT Render(const _tchar* pText, const _float2& vPosition, _fvector vColor, _float vScale);
HRESULT Render_Rotate(const _tchar* pText, const _float2& vPosition, _fvector vColor, _float Rotation, _float vScale);
HRESULT Perspective_Render(_matrix View, _matrix Proj, const _tchar* pText, const _fvector& vPosition, _fvector vColor, _float vScale);
_float FontSizeX(const _tchar* pText);
private:
ID3D11Device* m_pDevice = { nullptr };
ID3D11DeviceContext* m_pContext = { nullptr };
SpriteBatch* m_pBatch = { nullptr };
SpriteFont* m_pFont = { nullptr };
public:
static CFont* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const _tchar* pFontFilePath);
virtual void Free() override;
};
NS_END
@@ -0,0 +1,34 @@
#pragma once
#include "Base.h"
NS_BEGIN(Engine)
class CFont_Manager final : public CBase
{
private:
CFont_Manager(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual ~CFont_Manager() = default;
public:
HRESULT Add_Font(const _wstring& strFontTag, const _tchar* pFontFilePath);
HRESULT Render(const _wstring& strFontTag, const _tchar* pText, const _float2& vPosition, _fvector vColor, _float vScale);
HRESULT Render_Rotate(const _wstring& strFontTag, const _tchar* pText, const _float2& vPosition, _fvector vColor, _float Rotation, _float vScale);
HRESULT Perspective_Render(_matrix View, _matrix Proj, const _wstring& strFontTag, const _tchar* pText, const _fvector& vPosition, _fvector vColor, _float vScale);
_float FontSizeX(const _wstring& strFontTag, const _tchar* pText);
private:
ID3D11Device* m_pDevice = { nullptr };
ID3D11DeviceContext* m_pContext = { nullptr };
map<const _wstring, class CFont*> m_Fonts;
private:
class CFont* Find_Font(const _wstring& strFontTag);
public:
static CFont_Manager* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual void Free() override;
};
NS_END
+11 -1
View File
@@ -246,6 +246,15 @@ class ENGINE_DLL CGameInstance final : public CBase
ID3D11ShaderResourceView* Add_Resource(const _char* pFilePath);
#pragma endregion
#pragma region FONT_MANAGER
public:
HRESULT Add_Font(const _wstring& strFontTag, const _tchar* pFontFilePath);
HRESULT Render_Text(const _wstring& strFontTag, const _tchar* pText, const _float2& vPosition, _fvector vColor = XMVectorSet(1.f, 1.f, 1.f, 1.f), _float vScale = 1.f);
HRESULT Render_Rotation_Text(const _wstring& strFontTag, const _tchar* pText, const _float2& vPosition, _fvector vColor = XMVectorSet(1.f, 1.f, 1.f, 1.f), _float Rotation = 0.f, _float vScale = 1.f);
HRESULT Perspective_Render_Text(_matrix View, _matrix Proj, const _wstring& strFontTag, const _tchar* pText, const _fvector& vPosition, _fvector vColor = XMVectorSet(1.f, 1.f, 1.f, 1.f), _float vScale = 1.f);
_float FontSizeX(const _wstring& strFontTag, const _tchar* pText);
#pragma endregion
public:
void Add_ModelToMap(const _char* filePath, CModel* pModel);
@@ -282,7 +291,8 @@ class ENGINE_DLL CGameInstance final : public CBase
class CThreadHolder* m_pThreadHolder = { nullptr };
class CFog* m_pFog = { nullptr };
class CResource_Manager* m_pResource_Manager = { nullptr };
class CFont_Manager* m_pFont_Manager = { nullptr };
mt19937 m_Rng{ random_device{}() };
#ifdef _DEBUG
private:
@@ -19,7 +19,7 @@
#include "VIBuffer_Box.h"
#include "Trail.h"
#include "OcclusionQuery.h"
#include "Font.h"
NS_BEGIN(Engine)
class CGameInstance;
+10
View File
@@ -23,7 +23,9 @@ typedef struct tagSpellInfo
_wstring pSpell_Name;
_wstring pImage_Name;
_int iSpell_Type{};
_wstring pType_Name;
_int iSkill_Type{};
_float fSpell_Damage{};
_float fSpell_CoolTime{};
_float fDuration{};
_int iAnimNum{};
@@ -135,6 +137,10 @@ typedef struct SlotHover
virtual _bool Get_Hover();
virtual const SPELLINFO Get_Info(_int Index);
virtual void Set_FontX(_float fFontX);
virtual void Set_FontY(_float fFontY);
virtual _float2 Get_Font();
protected:
_vector m_fOrigin_Position_vector{};
_float2 m_fOrigin_Position{};
@@ -187,6 +193,10 @@ typedef struct SlotHover
_float m_fTopY{};
_bool m_bClick = { false };
_float m_fFontX{};
_float m_fFontY{};
_float m_fFontOffSet{};
protected:
virtual HRESULT Initialize_Prototype();
virtual HRESULT Initialize(void* pArg);