Merge branch 'UI' into Develope

This commit is contained in:
qordlsgur
2025-12-19 10:11:38 +09:00
committed by GitHub
52 changed files with 1989 additions and 57 deletions
@@ -1745,6 +1745,27 @@ PS_OUT PS_Broomstick(PS_IN In)
return Out;
}
PS_OUT PS_SpellLearn(PS_IN In)
{
PS_OUT Out;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
float4 tex = g_Texture.Sample(DefaultSampler, In.vTexcoord);
float tex1 = g_Texture1.Sample(DefaultSampler, In.vTexcoord).r;
Color = tex;
tex1 *= 0.95f;
Color.a = tex1;
Color.a *= Alpha;
Out.vColor = Color;
return Out;
}
struct VS_IN3D
{
float3 vPosition : POSITION;
@@ -2305,6 +2326,16 @@ technique11 PosTexTechnique11
PixelShader = compile ps_5_0 PS_Broomstick();
}
pass SpellLearn
{
SetRasterizerState(RS_Nocull);
SetDepthStencilState(DSS_Default, 0);
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
VertexShader = compile vs_5_0 VS_MAIN();
GeometryShader = NULL;
PixelShader = compile ps_5_0 PS_SpellLearn();
}
pass Enemy_Detection
{
SetRasterizerState(RS_Nocull);
@@ -326,6 +326,8 @@ void CGoblin_Mage::OnCollision(CGameObject* pOther, void* pDesc)
m_pInfoInstance->Event_CallBack(TEXT("Monster_Hit"), &m_DamageInfo);
if (0 == damagePair.second) {
m_pFSM->Change_State(FSMSTATE::DEAD);
_int ID = m_pStat->Get_Stat().iObjectID;
m_pInfoInstance->Event_CallBack(TEXT("MonsterDead"), &ID);
return;
}
@@ -262,9 +262,9 @@ void CInfoInstance::Event_CallBack(_wstring EventName, void* pArg)
}
}
QUESTINFO CInfoInstance::Get_Quest(_int QuestID)
QUESTINFO CInfoInstance::Get_Quest(_int QuestType, _int QuestID)
{
return m_pQuestInfo->Get_Quest(QuestID);
return m_pQuestInfo->Get_Quest(QuestType, QuestID);
}
_int CInfoInstance::Get_Quest_Count(_int Index)
@@ -44,6 +44,8 @@ HRESULT CQuest_Canvas::Initialize(void* pArg)
}
Visible(false);
m_pInfoInstance->Set_AcceptQuest(0);
m_pInfoInstance->Set_AcceptQuest(1);
m_pInfoInstance->Set_AcceptQuest(2);
return S_OK;
}
+31 -14
View File
@@ -95,9 +95,20 @@ HRESULT CQuest_Data::Load_QuestInfo(const _char* pFilePath)
return S_OK;
}
QUESTINFO CQuest_Data::Get_Quest(_int QuestID)
QUESTINFO CQuest_Data::Get_Quest(_int QuestType, _int QuestID)
{
return QuestInfos[QuestID];
switch (QuestType)
{
case 0:
return QuestInfos[QuestID];
case 1:
return m_QuestAcceptedInfos[QuestID];
case 2:
return m_QuestEndInfos[QuestID];
default:
return QuestInfos[QuestID];
}
}
const vector<QUESTINFO>& CQuest_Data::Get_AllQuest() const
@@ -164,18 +175,24 @@ void CQuest_Data::Set_ClearQuest(_int Index)
void CQuest_Data::Update_AcceptQuest(_int MonsterID)
{
m_QuestAcceptedInfoObject.erase(remove_if(m_QuestAcceptedInfoObject.begin(), m_QuestAcceptedInfoObject.end(),
[MonsterID, this](auto& it) {
CQuestInstance* instance = static_cast<CQuestInstance*>(it);
if (static_cast<CQuestInstance*>(it)->Update_Objective(MonsterID) == true)
{
Set_ClearQuest(static_cast<CQuestInstance*>(it)->Get_QuestID());
return true;
}
return false;
}),
m_QuestAcceptedInfoObject.end()
);
vector<_int> toRemoveIndex;
_int index = 0;
for (auto* instance : m_QuestAcceptedInfoObject)
{
if (static_cast<CQuestInstance*>(instance)->Update_Objective(MonsterID))
{
Set_ClearQuest(static_cast<CQuestInstance*>(instance)->Get_QuestID());
toRemoveIndex.push_back(index);
}
index++;
}
for (auto it = toRemoveIndex.rbegin(); it != toRemoveIndex.rend(); ++it)
{
m_QuestAcceptedInfoObject.erase(m_QuestAcceptedInfoObject.begin() + *it);
m_QuestAcceptedInfos.erase(m_QuestAcceptedInfos.begin() + *it);
}
}
CQuest_Data* CQuest_Data::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
@@ -40,11 +40,11 @@ HRESULT CQuest_Entry_Line::Initialize(void* pArg)
m_fAlpha = 1.f;
m_fAlphaTime = 5.f;
m_vNine_Slice = _float4(0.f, 256.f, 0.f, 64.f);
m_fFontX = 928.f;
m_fFontX = 948.f;
m_fFontY = 520.f;
SizeUpX(800.f);
SizeUpY(15.f);
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("QuestListHover"), [this](void* p) {this->Set_Hover(*reinterpret_cast<_int*>(p)); });
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("QuestListHover"), [this](void* p) {this->Set_Hover(p); });
Visible(false);
return S_OK;
}
@@ -120,7 +120,7 @@ HRESULT CQuest_Entry_Line::Render()
if (FAILED(m_pVIBufferCom->Render())) {
return E_FAIL;
}
_float OffSet = (m_pGameInstance->FontSizeX(TEXT("Font_size20"), TEXT("보 상")) - 22) * 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));
@@ -208,9 +208,12 @@ HRESULT CQuest_Entry_Line::Ready_Components(void* pArg)
return S_OK;
}
void CQuest_Entry_Line::Set_Hover(_int Index)
void CQuest_Entry_Line::Set_Hover(void* pArg)
{
m_iQuest_Index = Index;
CURRENTQUESTSECETINFO* Desc = static_cast<CURRENTQUESTSECETINFO*>(pArg);
m_iCurrentQuest = Desc->iQuestCategory;
m_iQuest_Index = Desc->iQuestIndex;
if (m_iQuest_Index == -1)
{
Visible(false);
@@ -51,7 +51,7 @@ HRESULT CQuest_Info::Initialize(void* pArg)
m_fFontY = 500.f;
m_iPerQuestIndex = -1;
Visible(false);
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("QuestListHover"), [this](void* p) {this->Set_Hover(*reinterpret_cast<_int*>(p)); });
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("QuestListHover"), [this](void* p) {this->Set_Hover(p); });
return S_OK;
}
@@ -129,7 +129,7 @@ HRESULT CQuest_Info::Render()
return E_FAIL;
}
m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pInfoInstance->Get_Quest(m_iQuest_Index).pQuestInfo.c_str(), _float2(m_fFontX + m_fX, m_fFontY - m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha));
m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pInfoInstance->Get_Quest(m_iCurrentQuest ,m_iQuest_Index).pQuestInfo.c_str(), _float2(m_fFontX + m_fX, m_fFontY - m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha));
return S_OK;
}
@@ -217,9 +217,12 @@ HRESULT CQuest_Info::Ready_Components(void* pArg)
return S_OK;
}
void CQuest_Info::Set_Hover(_int Index)
void CQuest_Info::Set_Hover(void* pArg)
{
m_iQuest_Index = Index;
CURRENTQUESTSECETINFO* Desc = static_cast<CURRENTQUESTSECETINFO*>(pArg);
m_iCurrentQuest = Desc->iQuestCategory;
m_iQuest_Index = Desc->iQuestIndex;
if (m_iQuest_Index == -1)
{
Visible(false);
@@ -48,7 +48,7 @@ HRESULT CQuest_Info_Header::Initialize(void* pArg)
m_iColor = 2;
SizeUpX(1105.f);
SizeUpY(60.f);
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("QuestListHover"), [this](void* p) {this->Set_Hover(*reinterpret_cast<_int*>(p)); });
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("QuestListHover"), [this](void* p) {this->Set_Hover(p); });
Visible(false);
return S_OK;
}
@@ -129,8 +129,8 @@ HRESULT CQuest_Info_Header::Render()
return E_FAIL;
}
_float OffSet = (m_pGameInstance->FontSizeX(TEXT("Font_size20"), m_pInfoInstance->Get_Quest(m_iQuest_Index).pQuestName.c_str()) - 30) * 0.5f;
m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pInfoInstance->Get_Quest(m_iQuest_Index).pQuestName.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));
_float OffSet = (m_pGameInstance->FontSizeX(TEXT("Font_size20"), m_pInfoInstance->Get_Quest(m_iCurrentQuest, m_iQuest_Index).pQuestName.c_str()) - 30) * 0.5f;
m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pInfoInstance->Get_Quest(m_iCurrentQuest, m_iQuest_Index).pQuestName.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;
}
@@ -214,9 +214,12 @@ HRESULT CQuest_Info_Header::Ready_Components(void* pArg)
return S_OK;
}
void CQuest_Info_Header::Set_Hover(_int Index)
void CQuest_Info_Header::Set_Hover(void* pArg)
{
m_iQuest_Index = Index;
CURRENTQUESTSECETINFO* Desc = static_cast<CURRENTQUESTSECETINFO*>(pArg);
m_iCurrentQuest = Desc->iQuestCategory;
m_iQuest_Index = Desc->iQuestIndex;
if (m_iQuest_Index == -1)
{
Visible(false);
@@ -42,7 +42,7 @@ HRESULT CQuest_Info_Line::Initialize(void* pArg)
m_vNine_Slice = _float4(11.f, 245.f, 0.f, 64.f);
SizeUpX(934.f);
SizeUpY(15.f);
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("QuestListHover"), [this](void* p) {this->Set_Hover(*reinterpret_cast<_int*>(p)); });
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("QuestListHover"), [this](void* p) {this->Set_Hover(p); });
Visible(false);
return S_OK;
}
@@ -202,9 +202,12 @@ HRESULT CQuest_Info_Line::Ready_Components(void* pArg)
return S_OK;
}
void CQuest_Info_Line::Set_Hover(_int Index)
void CQuest_Info_Line::Set_Hover(void* pArg)
{
m_iQuest_Index = Index;
CURRENTQUESTSECETINFO* Desc = static_cast<CURRENTQUESTSECETINFO*>(pArg);
m_iCurrentQuest = Desc->iQuestCategory;
m_iQuest_Index = Desc->iQuestIndex;
if (m_iQuest_Index == -1)
{
Visible(false);
+76 -9
View File
@@ -49,12 +49,15 @@ HRESULT CQuest_Slot::Initialize(void* pArg)
m_fOffSetX = 0.f;
m_fOffSetY = 85;
m_iCols = 1;
m_fPositionX = -475.f;
m_fPositionY = 330.f;
SizeUpX(495.f);
SizeUpY(80.f);
m_pVIBufferCom->Set_Cloned(true);
m_pVIBufferCom->Set_Pos(-475.f, 330.f, m_fOffSetX, m_fOffSetY, m_iCols);
m_pVIBufferCom->Set_Pos(m_fPositionX, m_fPositionY, m_fOffSetX, m_fOffSetY, m_iCols);
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
m_iQuestCount = m_pInfoInstance->Get_Quest_Count(ENUM_CLASS(QUESTSTATE::NONE));
Set_QuestType(ENUM_CLASS(QUESTSTATE::NONE));
Visible(true);
return S_OK;
}
@@ -99,8 +102,7 @@ void CQuest_Slot::Update(_float fTimeDelta)
}
}
Hover();
static_cast<CUIObject*>(m_pOwner)->Function_Callback(TEXT("QuestListHover"), &m_iQuestIndex);
static_cast<CUIObject*>(m_pOwner)->Function_Callback(TEXT("QuestListHover"), &m_Info);
m_fTime += fTimeDelta * m_fTimeMult;
@@ -139,19 +141,73 @@ HRESULT CQuest_Slot::Render()
return E_FAIL;
}
for (_int i = 0; i < m_iQuestCount; ++i)
{
m_pGameInstance->Render_Text(m_Fonts[i].pFontSizeName.c_str(), m_Fonts[i].pQuestName.c_str(), m_Fonts[i].m_fFontSize);
}
return S_OK;
}
void CQuest_Slot::Font_Size()
{
for (_int i = 0; i < m_iQuestCount; ++i)
{
m_fFontY = 190 + i * 85.f;
if (i == m_iQuestIndex)
if (m_Index == -1)
{
m_pGameInstance->Render_Text(TEXT("Font_size30"), m_pInfoInstance->Get_Quest(i).pQuestName.c_str(), _float2(m_fFontX - 10.f + m_fX, m_fFontY - 10.F - m_fY));
m_Fonts[i].pFontSizeName = TEXT("Font_size20");
m_Fonts[i].m_fFontSize = _float2(m_fFontX + m_fX, m_fFontY - m_fY);
}
else
{
m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pInfoInstance->Get_Quest(i).pQuestName.c_str(), _float2(m_fFontX + m_fX, m_fFontY - m_fY));
if (i == m_Index)
{
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);
}
else
{
m_Fonts[i].pFontSizeName = TEXT("Font_size20");
m_Fonts[i].m_fFontSize = _float2(m_fFontX + m_fX, m_fFontY - m_fY);
}
}
}
return S_OK;
}
void CQuest_Slot::Font_Setting(_int Index)
{
m_Fonts.clear();
FontInfo Fonts;
for (_int i = 0; i < Index; ++i)
{
m_fFontY = 190 + i * 85.f;
Fonts.pFontSizeName = TEXT("Font_size20");
Fonts.pQuestName = m_pInfoInstance->Get_Quest(m_Info.iQuestCategory, i).pQuestName.c_str();
Fonts.m_fFontSize = _float2(m_fFontX + m_fX, m_fFontY - m_fY);
m_Fonts.push_back(Fonts);
}
}
_int CQuest_Slot::Mousechack(POINT Mouse)
{
for (_int i = 0; i < m_iQuestCount; ++i)
{
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),
long((m_fPositionY + (i * m_fOffSetY)) + m_fSizeY * 0.5f) };
if (PtInRect(&Box, Mouse))
{
return i;
}
}
return -1;
}
_vector CQuest_Slot::Get_WorldPostion()
@@ -258,9 +314,14 @@ void CQuest_Slot::Hover()
fMouse.x = ptMouse.x - (g_iWinSizeX * 0.5f);
fMouse.y = -(ptMouse.y - (g_iWinSizeY * 0.5f));
m_iQuestIndex = m_pVIBufferCom->Set_Mouse_Hover(fMouse);
POINT Mouse{};
Mouse.x = _long(fMouse.x);
Mouse.y = _long(fMouse.y);
m_Index = Mousechack(Mouse);
if (m_iQuestIndex != -1)
m_pVIBufferCom->Set_Hover(m_Index);
if (m_Index != -1)
{
m_bHover = true;
}
@@ -268,23 +329,28 @@ void CQuest_Slot::Hover()
{
m_bHover = false;
}
Font_Size();
}
void CQuest_Slot::Set_QuestType(_int Index)
{
switch (Index)
{
case 0:
m_Info.iQuestCategory = ENUM_CLASS(QUESTSTATE::NONE);
m_iQuestCount = m_pInfoInstance->Get_Quest_Count(ENUM_CLASS(QUESTSTATE::NONE));
m_pVIBufferCom->Set_Draw(-1);
break;
case 1:
m_Info.iQuestCategory = ENUM_CLASS(QUESTSTATE::ACCEPTED);
m_iQuestCount = m_pInfoInstance->Get_Quest_Count(ENUM_CLASS(QUESTSTATE::ACCEPTED));
m_pVIBufferCom->Set_Draw(m_iQuestCount);
break;
case 2:
m_Info.iQuestCategory = ENUM_CLASS(QUESTSTATE::CLEARED);
m_iQuestCount = m_pInfoInstance->Get_Quest_Count(ENUM_CLASS(QUESTSTATE::CLEARED));
m_pVIBufferCom->Set_Draw(m_iQuestCount);
break;
@@ -292,6 +358,7 @@ void CQuest_Slot::Set_QuestType(_int Index)
default:
break;
}
Font_Setting(m_iQuestCount);
}
CQuest_Slot* CQuest_Slot::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+2
View File
@@ -402,6 +402,8 @@ void CTroll::OnCollision(CGameObject* pOther, void* pDesc)
m_pInfoInstance->Event_CallBack(TEXT("Monster_Hit"), &m_DamageInfo);
if (0 == damagePair.second) {
m_pFSM->Change_State(FSMSTATE::DEAD);
_int ID = m_pStat->Get_Stat().iObjectID;
m_pInfoInstance->Event_CallBack(TEXT("MonsterDead"), &ID);
return;
}
m_pFSM->Change_State(FSMSTATE::HIT);
+1 -1
View File
@@ -67,7 +67,7 @@ DECLARE_SINGLETON(CInfoInstance)
void Event_CallBack(_wstring EventName, void* pArg = nullptr);
#pragma endregion
#pragma region QuestINFO
QUESTINFO Get_Quest(_int QuestID);
QUESTINFO Get_Quest(_int QuestType, _int QuestID);
_int Get_Quest_Count(_int Index);
const vector<QUESTINFO>& Get_AllQuest() const;
const vector<QUESTINFO>& Get_ClearQuest() const;
+1 -1
View File
@@ -25,7 +25,7 @@ class CQuest_Data final : public CBase
void Update_AcceptQuest(_int MonsterIndex = -1);
public:
QUESTINFO Get_Quest(_int QuestID);
QUESTINFO Get_Quest(_int QuestType, _int QuestID);
_int Get_Count(_int Index);
const vector<QUESTINFO>& Get_AllQuest() const;
const vector<QUESTINFO>& Get_ClearQuest() const;
@@ -32,7 +32,7 @@ class CQuest_Entry_Line final : public CElementObject
virtual HRESULT Initialize(void* pArg) override;
public:
void Set_Hover(_int Index);
void Set_Hover(void* pArg);
private:
CTexture* m_pDiffuse_TextureCom = { nullptr };
@@ -41,6 +41,7 @@ class CQuest_Entry_Line final : public CElementObject
_int m_iColor = { false };
_int m_iQuest_Index{};
_int m_iCurrentQuest{};
public:
static CQuest_Entry_Line* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+3 -1
View File
@@ -32,7 +32,7 @@ class CQuest_Info final : public CElementObject
virtual HRESULT Initialize(void* pArg) override;
public:
void Set_Hover(_int Index);
void Set_Hover(void* pArg);
private:
CTexture* m_pDiffuse_TextureCom = { nullptr };
@@ -46,7 +46,9 @@ class CQuest_Info final : public CElementObject
_float m_fOriginPerviewSize{};
_float m_fPreviewOffSet{};
_float4 m_vHeaderBack{};
_int m_iQuest_Index{};
_int m_iCurrentQuest{};
_int m_iPerQuestIndex{};
public:
@@ -32,7 +32,7 @@ class CQuest_Info_Header final : public CElementObject
virtual HRESULT Initialize(void* pArg) override;
public:
void Set_Hover(_int Index);
void Set_Hover(void* pArg);
private:
CTexture* m_pDiffuse_TextureCom = { nullptr };
@@ -42,6 +42,7 @@ class CQuest_Info_Header final : public CElementObject
_int m_iColor = true;
_int m_iQuest_Index{};
_int m_iCurrentQuest{};
public:
static CQuest_Info_Header* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
@@ -32,7 +32,7 @@ class CQuest_Info_Line final : public CElementObject
virtual HRESULT Initialize(void* pArg) override;
public:
void Set_Hover(_int Index);
void Set_Hover(void* pArg);
private:
CTexture* m_pDiffuse_TextureCom = { nullptr };
@@ -41,7 +41,7 @@ class CQuest_Info_Line final : public CElementObject
_int m_iColor = { false };
_int m_iQuest_Index{};
_int m_iCurrentQuest{};
public:
static CQuest_Info_Line* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
+18 -2
View File
@@ -13,6 +13,12 @@ NS_BEGIN(Client)
class CQuest_Slot final : public CElementObject
{
struct FontInfo
{
_wstring pFontSizeName;
_wstring pQuestName;
_float2 m_fFontSize{};
};
private:
CQuest_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
CQuest_Slot(const CQuest_Slot& rhs);
@@ -37,6 +43,10 @@ class CQuest_Slot final : public CElementObject
private:
void Hover();
void Font_Size();
void Font_Setting(_int Index);
_int Mousechack(POINT Mouse);
public:
void Set_QuestType(_int Index);
@@ -46,14 +56,20 @@ class CQuest_Slot final : public CElementObject
CShader* m_pShaderCom = { nullptr };
CVIBuffer_UI_Instance* m_pVIBufferCom = { nullptr };
CInfoInstance* m_pInfoInstance = { nullptr };
CURRENTQUESTSECETINFO m_Info;
_float m_fOffSetX{};
_float m_fOffSetY{};
_uint m_iCols{};
_int m_iColor{};
_int m_iQuestIndex{};
_int m_iCurrentQeustClick{};
_int m_iQuestCount{};
_float m_fPositionX{};
_float m_fPositionY{};
_int m_Index{};
vector<FontInfo> m_Fonts;
public:
static CQuest_Slot* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
@@ -0,0 +1,258 @@
<Emart>
<Name SpellName="봄바르다" Size="550">
<Start>
<Pos x="730" y="200"/>
</Start>
<Position>
<Pos x="625" y="60"/>
</Position>
<Position>
<Pos x="810" y="-185"/>
</Position>
<Position>
<Pos x="395" y="-185"/>
</Position>
<Position>
<Pos x="515" y="-45"/>
</Position>
</Name>
<Name SpellName="루모스" Size="520">
<Start>
<Pos x="410" y="-210"/>
</Start>
<Position>
<Pos x="600" y="200"/>
</Position>
<Position>
<Pos x="790" y="-230"/>
</Position>
</Name>
<Name SpellName="아씨오" Size="520">
<Start>
<Pos x="850" y="-110"/>
</Start>
<Position>
<Pos x="841" y="-78"/>
</Position>
<Position>
<Pos x="830" y="-46"/>
</Position>
<Position>
<Pos x="815" y="-14"/>
</Position>
<Position>
<Pos x="794" y="18"/>
</Position>
<Position>
<Pos x="764.5" y="50"/>
</Position>
<Position>
<Pos x="719" y="82"/>
</Position>
<Position>
<Pos x="687" y="95.9"/>
</Position>
<Position>
<Pos x="655" y="104.5"/>
</Position>
<Position>
<Pos x="623" y="109"/>
</Position>
<Position>
<Pos x="591" y="110"/>
</Position>
<Position>
<Pos x="559" y="108"/>
</Position>
<Position>
<Pos x="527" y="102.5"/>
</Position>
<Position>
<Pos x="495" y="93"/>
</Position>
<Position>
<Pos x="463" y="78"/>
</Position>
<Position>
<Pos x="431" y="56.5"/>
</Position>
<Position>
<Pos x="399" y="24"/>
</Position>
<Position>
<Pos x="379" y="-2"/>
</Position>
<Position>
<Pos x="369" y="-20"/>
</Position>
<Position>
<Pos x="354.5" y="-52"/>
</Position>
<Position>
<Pos x="347.5" y="-71"/>
</Position>
</Name>
<Name SpellName="디센도" Size="520">
<Start>
<Pos x="453" y="-245"/>
</Start>
<Position>
<Pos x="453" y="90"/>
</Position>
<Position>
<Pos x="458" y="122"/>
</Position>
<Position>
<Pos x="471" y="154"/>
</Position>
<Position>
<Pos x="494" y="186"/>
</Position>
<Position>
<Pos x="500" y="192"/>
</Position>
<Position>
<Pos x="510" y="200"/>
</Position>
<Position>
<Pos x="518" y="206"/>
</Position>
<Position>
<Pos x="550" y="222"/>
</Position>
<Position>
<Pos x="582" y="228.5"/>
</Position>
<Position>
<Pos x="614" y="228.5"/>
</Position>
<Position>
<Pos x="646" y="220.5"/>
</Position>
<Position>
<Pos x="678" y="206"/>
</Position>
<Position>
<Pos x="690" y="197.5"/>
</Position>
<Position>
<Pos x="720" y="165.5"/>
</Position>
<Position>
<Pos x="736" y="133"/>
</Position>
<Position>
<Pos x="744" y="101"/>
</Position>
<Position>
<Pos x="745" y="69"/>
</Position>
<Position>
<Pos x="739" y="37"/>
</Position>
<Position>
<Pos x="725" y="5"/>
</Position>
<Position>
<Pos x="707" y="-20"/>
</Position>
<Position>
<Pos x="675" y="-47"/>
</Position>
<Position>
<Pos x="643" y="-61.5"/>
</Position>
<Position>
<Pos x="580" y="-68"/>
</Position>
</Name>
<Name SpellName="레벨리오" Size="550">
<Start>
<Pos x="454" y="-240"/>
</Start>
<Position>
<Pos x="454" y="90"/>
</Position>
<Position>
<Pos x="459" y="122"/>
</Position>
<Position>
<Pos x="472" y="154"/>
</Position>
<Position>
<Pos x="490" y="180"/>
</Position>
<Position>
<Pos x="490" y="180"/>
</Position>
<Position>
<Pos x="510" y="199"/>
</Position>
<Position>
<Pos x="542" y="218"/>
</Position>
<Position>
<Pos x="574" y="227"/>
</Position>
<Position>
<Pos x="606" y="229"/>
</Position>
<Position>
<Pos x="638" y="224"/>
</Position>
<Position>
<Pos x="670" y="211"/>
</Position>
<Position>
<Pos x="670" y="211"/>
</Position>
<Position>
<Pos x="690" y="197"/>
</Position>
<Position>
<Pos x="720" y="164"/>
</Position>
<Position>
<Pos x="736" y="132"/>
</Position>
<Position>
<Pos x="743" y="100"/>
</Position>
<Position>
<Pos x="744" y="68"/>
</Position>
<Position>
<Pos x="738" y="36"/>
</Position>
<Position>
<Pos x="723" y="4"/>
</Position>
<Position>
<Pos x="697" y="-28"/>
</Position>
<Position>
<Pos x="665" y="-50"/>
</Position>
<Position>
<Pos x="633" y="-62"/>
</Position>
<Position>
<Pos x="602" y="-67"/>
</Position>
<Position>
<Pos x="621" y="-90"/>
</Position>
<Position>
<Pos x="648" y="-120"/>
</Position>
<Position>
<Pos x="675" y="-150"/>
</Position>
<Position>
<Pos x="702" y="-180"/>
</Position>
<Position>
<Pos x="710" y="-189"/>
</Position>
</Name>
</Emart>
@@ -1745,6 +1745,27 @@ PS_OUT PS_Broomstick(PS_IN In)
return Out;
}
PS_OUT PS_SpellLearn(PS_IN In)
{
PS_OUT Out;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
float4 tex = g_Texture.Sample(DefaultSampler, In.vTexcoord);
float tex1 = g_Texture1.Sample(DefaultSampler, In.vTexcoord).r;
Color = tex;
tex1 *= 0.95f;
Color.a = tex1;
Color.a *= Alpha;
Out.vColor = Color;
return Out;
}
struct VS_IN3D
{
float3 vPosition : POSITION;
@@ -2305,6 +2326,16 @@ technique11 PosTexTechnique11
PixelShader = compile ps_5_0 PS_Broomstick();
}
pass SpellLearn
{
SetRasterizerState(RS_Nocull);
SetDepthStencilState(DSS_Default, 0);
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
VertexShader = compile vs_5_0 VS_MAIN();
GeometryShader = NULL;
PixelShader = compile ps_5_0 PS_SpellLearn();
}
pass Enemy_Detection
{
SetRasterizerState(RS_Nocull);
Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 567 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

@@ -197,6 +197,11 @@ call Update_Shaders.bat
<ClInclude Include="..\public\Quest_Slot.h" />
<ClInclude Include="..\public\Quest_Status.h" />
<ClInclude Include="..\Public\Skill_Data.h" />
<ClInclude Include="..\Public\SpellLearn.h" />
<ClInclude Include="..\public\SpellLearn_Canvas.h" />
<ClInclude Include="..\public\SpellLearn_MovePointer.h" />
<ClInclude Include="..\public\SpellLearn_Name.h" />
<ClInclude Include="..\public\SpellLearn_Panel.h" />
<ClInclude Include="..\Public\State_Blink.h" />
<ClInclude Include="..\Public\State_Dead.h" />
<ClInclude Include="..\Public\State_Hit.h" />
@@ -415,6 +420,11 @@ call Update_Shaders.bat
<ClCompile Include="..\private\Quest_Slot.cpp" />
<ClCompile Include="..\private\Quest_Status.cpp" />
<ClCompile Include="..\Private\Skill_Data.cpp" />
<ClCompile Include="..\Private\SpellLearn.cpp" />
<ClCompile Include="..\private\SpellLearn_Canvas.cpp" />
<ClCompile Include="..\private\SpellLearn_MovePointer.cpp" />
<ClCompile Include="..\private\SpellLearn_Name.cpp" />
<ClCompile Include="..\private\SpellLearn_Panel.cpp" />
<ClCompile Include="..\Private\State_Blink.cpp" />
<ClCompile Include="..\Private\State_Dead.cpp" />
<ClCompile Include="..\Private\State_Hit.cpp" />
@@ -610,6 +610,21 @@
<Filter Include="50.UI\QuestInstance">
<UniqueIdentifier>{a2d06f57-c74f-4604-91b4-884bf6586584}</UniqueIdentifier>
</Filter>
<Filter Include="50.UI\SpellLearn_Canvas">
<UniqueIdentifier>{91999870-f29b-4c24-b888-09eb08b8e10c}</UniqueIdentifier>
</Filter>
<Filter Include="50.UI\SpellLearn_Canvas\SpellLearn_Panel">
<UniqueIdentifier>{37571a2a-97dd-447b-a25b-11194584a57a}</UniqueIdentifier>
</Filter>
<Filter Include="50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Name">
<UniqueIdentifier>{f4d24f99-186c-4074-90ef-48a95d74fb47}</UniqueIdentifier>
</Filter>
<Filter Include="50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn">
<UniqueIdentifier>{7a016450-f745-4313-ba9d-781fa5909b76}</UniqueIdentifier>
</Filter>
<Filter Include="50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_MovePointer">
<UniqueIdentifier>{d9382839-c0b8-4b3d-9227-6dcf65fba44f}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Editor.h">
@@ -1218,6 +1233,21 @@
<ClInclude Include="..\public\QuestInstance.h">
<Filter>50.UI\QuestInstance</Filter>
</ClInclude>
<ClInclude Include="..\public\SpellLearn_Canvas.h">
<Filter>50.UI\SpellLearn_Canvas</Filter>
</ClInclude>
<ClInclude Include="..\public\SpellLearn_Panel.h">
<Filter>50.UI\SpellLearn_Canvas\SpellLearn_Panel</Filter>
</ClInclude>
<ClInclude Include="..\public\SpellLearn_Name.h">
<Filter>50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Name</Filter>
</ClInclude>
<ClInclude Include="..\Public\SpellLearn.h">
<Filter>50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn</Filter>
</ClInclude>
<ClInclude Include="..\public\SpellLearn_MovePointer.h">
<Filter>50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_MovePointer</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Image Include="Editor.ico">
@@ -1828,6 +1858,21 @@
<ClCompile Include="..\private\QuestInstance.cpp">
<Filter>50.UI\QuestInstance</Filter>
</ClCompile>
<ClCompile Include="..\private\SpellLearn_Canvas.cpp">
<Filter>50.UI\SpellLearn_Canvas</Filter>
</ClCompile>
<ClCompile Include="..\private\SpellLearn_Panel.cpp">
<Filter>50.UI\SpellLearn_Canvas\SpellLearn_Panel</Filter>
</ClCompile>
<ClCompile Include="..\private\SpellLearn_Name.cpp">
<Filter>50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Name</Filter>
</ClCompile>
<ClCompile Include="..\Private\SpellLearn.cpp">
<Filter>50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn</Filter>
</ClCompile>
<ClCompile Include="..\private\SpellLearn_MovePointer.cpp">
<Filter>50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_MovePointer</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Editor.rc">
+43
View File
@@ -111,6 +111,12 @@
#include "QuestInstance.h"
#include "SpellLearn_Canvas.h"
#include "SpellLearn_Panel.h"
#include "SpellLearn_Name.h"
#include "SpellLearn.h"
#include "SpellLearn_MovePointer.h"
#include "IMGUIUI.h"
#pragma endregion
@@ -531,6 +537,22 @@ HRESULT CLoader::Loading_For_UI()
_wstring wstrFilePath = CMyTools::ToWstring(strFilePath);
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), wstrFileName,
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) {
return E_FAIL;
}
return S_OK;
});
Asset_FileLoad("../Bin/Resources/Textures/SpellUnlock", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath)
{
_string strFilePath = pFilePath;
_wstring wstrFilePath = CMyTools::ToWstring(strFilePath);
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), wstrFileName,
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) {
return E_FAIL;
@@ -1184,6 +1206,27 @@ HRESULT CLoader::Loading_For_UI()
{
return E_FAIL;
}
if (FAILED(m_pGameInstance->Add_Prototype<CSpellLearn_Canvas>(g_iStaticLevel, CSpellLearn_Canvas::Create(m_pDevice, m_pContext))))
{
return E_FAIL;
}
if (FAILED(m_pGameInstance->Add_Prototype<CSpellLearn_Panel>(g_iStaticLevel, CSpellLearn_Panel::Create(m_pDevice, m_pContext))))
{
return E_FAIL;
}
if (FAILED(m_pGameInstance->Add_Prototype<CSpellLearn_Name>(g_iStaticLevel, CSpellLearn_Name::Create(m_pDevice, m_pContext))))
{
return E_FAIL;
}
if (FAILED(m_pGameInstance->Add_Prototype<CSpellLearn>(g_iStaticLevel, CSpellLearn::Create(m_pDevice, m_pContext))))
{
return E_FAIL;
}
if (FAILED(m_pGameInstance->Add_Prototype<CSpellLearn_MovePointer>(g_iStaticLevel, CSpellLearn_MovePointer::Create(m_pDevice, m_pContext))))
{
return E_FAIL;
}
if (FAILED(m_pGameInstance->Add_Prototype<CIMGUIUI>(g_iStaticLevel, CIMGUIUI::Create(m_pDevice, m_pContext))))
{
@@ -0,0 +1,223 @@
#include "pch.h"
#include "SpellLearn.h"
#include "GameInstance.h"
CSpellLearn::CSpellLearn(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CElementObject(pDevice, pContext)
{
}
CSpellLearn::CSpellLearn(const CSpellLearn& rhs)
:CElementObject(rhs)
{
}
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;
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::DEFAULT)))) {
return E_FAIL;
}
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
return E_FAIL;
}
if (FAILED(m_pVIBufferCom->Render())) {
return E_FAIL;
}
return S_OK;
}
_vector CSpellLearn::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_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<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
{
return E_FAIL;
}
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_SU_Levioso_Path"), reinterpret_cast<CComponent**>(&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* 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 : CSpell_Header");
SAFE_RELEASE(pInstance);
}
return pInstance;
}
void CSpellLearn::Free()
{
__super::Free();
SAFE_RELEASE(m_pDiffuse_TextureCom);
SAFE_RELEASE(m_pShaderCom);
SAFE_RELEASE(m_pVIBufferCom);
}
void CSpellLearn::Describe_Entity()
{
}
@@ -0,0 +1,138 @@
#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<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom))) {
return E_FAIL;
}
return S_OK;
}
HRESULT CSpellLearn_Canvas::Ready_Panel(void* pArg)
{
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpellLearn_Panel>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CSpellLearn_Panel**>(&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);
}
void CSpellLearn_Canvas::Describe_Entity()
{
}
@@ -0,0 +1,272 @@
#include "pch.h"
#include "SpellLearn_MovePointer.h"
#include "GameInstance.h"
CSpellLearn_MovePointer::CSpellLearn_MovePointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CElementObject(pDevice, pContext)
{
}
CSpellLearn_MovePointer::CSpellLearn_MovePointer(const CSpellLearn_MovePointer& rhs)
:CElementObject(rhs)
{
}
HRESULT CSpellLearn_MovePointer::Initialize_Prototype()
{
return S_OK;
}
HRESULT CSpellLearn_MovePointer::Initialize(void* pArg)
{
CUIObject::UIOBJECT_DESC Desc{};
Desc.fX = 454.f;
Desc.fY = -240.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_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;
Visible(false);
return S_OK;
}
void CSpellLearn_MovePointer::SpellLearn(_int Index)
{
m_iSpell = Index;
m_bMoveStart = true;
}
void CSpellLearn_MovePointer::Line(_float fTime)
{
m_vLerp_Position = m_MoveLine[Index];
if (Start_Lerp(m_fMoveSpeed * fTime) == true)
{
if (Index < m_MoveLine.size() -1)
{
++Index;
}
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)
{
if (m_iSpell == ENUM_CLASS(SPELL_LINE::LINE))
{
Line(fTimeDelta);
}
else if (m_iSpell == ENUM_CLASS(SPELL_LINE::CURVE))
{
//Curve();
}
}
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::DEFAULT)))) {
return E_FAIL;
}
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
return E_FAIL;
}
if (FAILED(m_pVIBufferCom->Render())) {
return E_FAIL;
}
return S_OK;
}
_vector CSpellLearn_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;
}
return S_OK;
}
HRESULT CSpellLearn_MovePointer::Ready_Components(void* pArg)
{
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
{
return E_FAIL;
}
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_SU_Cursor"), reinterpret_cast<CComponent**>(&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);
}
void CSpellLearn_MovePointer::Describe_Entity()
{
}
@@ -0,0 +1,243 @@
#include "pch.h"
#include "SpellLearn_Name.h"
CSpellLearn_Name::CSpellLearn_Name(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CElementObject(pDevice, pContext)
{
}
CSpellLearn_Name::CSpellLearn_Name(const CSpellLearn_Name& rhs)
:CElementObject(rhs)
{
}
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);
Visible(false);
return S_OK;
}
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"), 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));
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<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
{
return E_FAIL;
}
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_Spell_Name"), reinterpret_cast<CComponent**>(&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);
}
void CSpellLearn_Name::Describe_Entity()
{
}
@@ -0,0 +1,229 @@
#include "pch.h"
#include "SpellLearn_Panel.h"
#include "GameInstance.h"
#include "SpellLearn_Name.h"
#include "SpellLearn.h"
#include "SpellLearn_MovePointer.h"
CSpellLearn_Panel::CSpellLearn_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CPanelObject(pDevice, pContext)
{
}
CSpellLearn_Panel::CSpellLearn_Panel(const CSpellLearn_Panel& rhs)
:CPanelObject(rhs)
{
}
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;
}
__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<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
{
return E_FAIL;
}
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_SpellLearn"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
{
return E_FAIL;
}
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_SpellLinkDivide"), reinterpret_cast<CComponent**>(&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<CSpellLearn_Name>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpellLearn_Name**>(&m_pSpellLearn_Name))))
{
return E_FAIL;
}
Add_Element(TEXT("SpellLearn_Name"), m_pSpellLearn_Name);
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpellLearn>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpellLearn**>(&m_pSpellLearn))))
{
return E_FAIL;
}
Add_Element(TEXT("SpellLearn"), m_pSpellLearn);
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpellLearn_MovePointer>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpellLearn_MovePointer**>(&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);
}
void CSpellLearn_Panel::Describe_Entity()
{
}
@@ -92,6 +92,7 @@ HRESULT CSpell_Canvas::Ready_Panel(void* pArg)
return E_FAIL;
}
Add_Panel(TEXT("Spell_Panel"), m_pSpell_Panel);
return S_OK;
}
@@ -4,6 +4,7 @@
#include "GamePlay_Canvas.h"
#include "Spell_Canvas.h"
#include "Quest_Canvas.h"
#include "SpellLearn_Canvas.h"
#include "Mouse_Cursor.h"
#include "CameraLockOn.h"
#include "Loding_Canvas.h"
@@ -165,6 +166,11 @@ HRESULT CUI_Manager::Ready_Components(void* pArg)
}
Add_Canvas(TEXT("Quest_Canves"), m_pQuest_Canves);
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpellLearn_Canvas>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CSpellLearn_Canvas**>(&m_pSpellLearn_Canvas)))) {
return E_FAIL;
}
Add_Canvas(TEXT("SpellLearn_Canvas"), m_pSpellLearn_Canvas);
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;
}
@@ -34,6 +34,7 @@ namespace Editor
REVELIO, POTION, MAGIC_ITEM, SPELL_PREVIEW, SPELL_HEADER,
SPELL_HEADER_LINE, SPELL_DRAG, CAMERA_LOCKON, LODING_SCREEN,
ENEMY_HPBAR, BOSS_HPBAR, QUEST_BORDER, QUEST_INFO, QUEST_STATUS, BROOMSTICK,
SPELL_LEARN,
ENEMY_DETECTION, INTERACTION_OBJECT, END };
enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, BLEND, BLEND_NOWORLD, BLOOM, BLOOM_NOWORLD, BLUR_NO_EMMISVE, BLUR_NO_WORLD_NO_EMISSIVE, WEIGHTBLEND_FOR_BLEND, DEPTH_STOP, WB_CULLING, SCREEN_FX , DISTORTION ,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 };
@@ -58,6 +59,8 @@ namespace Editor
END
};
enum class SPELL_LINE { LINE, CURVE };
enum class BLOOM_TYPE { NONE, BASIC, MULTIPLY, END };
enum class ELEMENT_INTERACTABLE_ID { BARREL, BOX, END };
+1
View File
@@ -101,6 +101,7 @@ class CIMGUIUI final : public CGameObject
_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;
@@ -0,0 +1,40 @@
#pragma once
#include "Editor_Define.h"
#include "ElementObject.h"
NS_BEGIN(Editor)
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;
private:
CTexture* m_pDiffuse_TextureCom = { 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;
void Describe_Entity() override;
};
NS_END
@@ -0,0 +1,48 @@
#pragma once
#include "Editor_Define.h"
#include "CanvasObject.h"
NS_BEGIN(Engine)
class CGameObject;
NS_END
NS_BEGIN(Editor)
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;
void Describe_Entity() override;
};
NS_END
@@ -0,0 +1,52 @@
#pragma once
#include "Editor_Define.h"
#include "ElementObject.h"
NS_BEGIN(Editor)
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 SpellLearn(_int Index);
private:
void Line(_float fTime);
private:
CTexture* m_pDiffuse_TextureCom = { nullptr };
CShader* m_pShaderCom = { nullptr };
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
_bool m_bMoveStart = { false };
_int m_iSpell{};
_int Index{};
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;
void Describe_Entity() override;
};
NS_END
@@ -0,0 +1,40 @@
#pragma once
#include "Editor_Define.h"
#include "ElementObject.h"
NS_BEGIN(Editor)
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;
private:
CTexture* m_pDiffuse_TextureCom = { nullptr };
CShader* m_pShaderCom = { nullptr };
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
public:
static CSpellLearn_Name* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
virtual void Free() override;
void Describe_Entity() override;
};
NS_END
@@ -0,0 +1,51 @@
#pragma once
#include "Editor_Define.h"
#include "PanelObject.h"
NS_BEGIN(Engine)
class CGameObject;
NS_END
NS_BEGIN(Editor)
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 };
CGameObject* m_pSpellLearn_Name = { nullptr };
CGameObject* m_pSpellLearn = { nullptr };
CGameObject* m_pSpellLearn_MovePointer = { nullptr };
public:
static CSpellLearn_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
virtual void Free() override;
void Describe_Entity() override;
};
NS_END
@@ -53,6 +53,7 @@ class CUI_Manager final : public CUIObject
CGameObject* m_pSpell_Canvas = { nullptr };
CGameObject* m_pLoding_Canvas= { nullptr };
CGameObject* m_pQuest_Canves= { nullptr };
CGameObject* m_pSpellLearn_Canvas = { nullptr };
CGameObject* m_pMouse_Cursor = { nullptr };
CGameObject* m_pCamera_LockOn = { nullptr };
_bool m_bCanvas_Change = { false };
@@ -130,7 +130,7 @@ _float CElementObject::Get_Nine_Slice_Bottom()
return m_vNine_Slice.w;
}
void CElementObject::Start_Lerp(_float fTimeDelta)
_bool CElementObject::Start_Lerp(_float fTimeDelta)
{
_vector Pos = m_fCurrent_Position;
@@ -146,7 +146,7 @@ void CElementObject::Start_Lerp(_float fTimeDelta)
{
m_fX = m_vLerp_Position.m128_f32[0];
m_fY = m_vLerp_Position.m128_f32[1];
m_bLerpOn = false;
return true;
}
else
@@ -154,6 +154,7 @@ void CElementObject::Start_Lerp(_float fTimeDelta)
XMVECTOR DirNorm = XMVector3Normalize(Dir);
m_fX = (Pos + DirNorm * move).m128_f32[0];
m_fY = (Pos + DirNorm * move).m128_f32[1];
return false;
}
}
+8 -2
View File
@@ -304,7 +304,7 @@ void CUIObject::Nine_Slice_Left(_float X)
void CUIObject::Nine_Slice_Right(_float Y)
{
m_vNine_Slice.y =Y;
m_vNine_Slice.y = Y;
}
void CUIObject::Nine_Slice_Top(_float Z)
@@ -367,8 +367,14 @@ void CUIObject::Lerp_PosY(_float PosY)
m_fLerpY = PosY;
}
void CUIObject::Start_Lerp(_float fTimeDelta)
_bool CUIObject::Start_Lerp(_float fTimeDelta)
{
return false;
}
_bool CUIObject::Start_Bezier(_float fTimeDelta)
{
return _bool();
}
void CUIObject::Reset_Pos(_float fTimeDelta)
@@ -336,6 +336,32 @@ _int CVIBuffer_UI_Instance::Set_Mouse_Hover(_float2 fMousePos)
return hoveredIndex;
}
void CVIBuffer_UI_Instance::Set_Hover(_int Index)
{
D3D11_MAPPED_SUBRESOURCE SubResource{};
m_pContext->Map(m_pVBInstance, 0, D3D11_MAP_WRITE_NO_OVERWRITE, 0, &SubResource);
VTX_INSTANCE_UI* pVertices = static_cast<VTX_INSTANCE_UI*>(SubResource.pData);
if(Index == -1)
for (_uint i = 0; i < m_iNumInstance; i++)
pVertices[i].bHover = 0.f;
for (_uint i = 0; i < m_iNumInstance; i++)
{
if (i == Index)
{
pVertices[i].bHover = 1.f;
}
else
{
pVertices[i].bHover = 0.f;
}
}
m_pContext->Unmap(m_pVBInstance, 0);
}
void CVIBuffer_UI_Instance::Set_Hover_Index(_uint iIndex)
{
D3D11_MAPPED_SUBRESOURCE SubResource{};
@@ -30,7 +30,7 @@ class ENGINE_DLL CElementObject abstract : public CUIObject
virtual _float Get_Nine_Slice_Top() override;
virtual _float Get_Nine_Slice_Bottom() override;
virtual void Start_Lerp(_float fTimeDelta) override;
virtual _bool Start_Lerp(_float fTimeDelta) override;
virtual void Reset_Pos(_float fTimeDelta)override;
virtual void Start_Size_Lerp(_float fTimeDelta) override;
virtual void Reset_Size_Lerp(_float fTimeDelta) override;
@@ -41,6 +41,8 @@ class ENGINE_DLL CElementObject abstract : public CUIObject
virtual HRESULT Initialize(void* pArg);
virtual HRESULT Ready_Components(void* pArg) override;
_float m_fBezierTime = 0;
public:
virtual void Free() override;
};
+9 -1
View File
@@ -67,6 +67,13 @@ typedef struct SlotHover
_int iSlotID{};
_int iHover_Index{};
}HOVER_INFO;
typedef struct tagCurrentQeustSerectInfo
{
_int iQuestCategory{};
_int iQuestIndex{};
}CURRENTQUESTSECETINFO;
protected:
CUIObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
CUIObject(const CUIObject& rhs);
@@ -134,7 +141,8 @@ typedef struct SlotHover
virtual void Lerp_PosX(_float PosX);
virtual void Lerp_PosY(_float PosY);
virtual void Start_Lerp(_float fTimeDelta);
virtual _bool Start_Lerp(_float fTimeDelta);
virtual _bool Start_Bezier(_float fTimeDelta);
virtual void Reset_Pos(_float fTimeDelta);
virtual void Start_Size_Lerp(_float fTimeDelta);
virtual void Reset_Size_Lerp(_float fTimeDelta);
@@ -36,6 +36,7 @@ class ENGINE_DLL CVIBuffer_UI_Instance final : public CVIBuffer_Instance
void Set_Index_Renge_Color(_uint StartIndex, _uint EndIndex, _float vColor);
void Set_Index_Color(_int Index, _float vColor);
_int Set_Mouse_Hover(_float2 fMousePos);
void Set_Hover(_int Index);
void Set_Hover_Index(_uint iIndex);
void Set_Equip_Index(_uint iIndex);
void Set_Draw(_int iCount = -1);