diff --git a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl index 2915d2fa6..b196e4b18 100644 --- a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl +++ b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl @@ -104,9 +104,6 @@ PS_OUT PS_MAIN(PS_IN In) float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord); - if (Color.a <= 0.1f) - discard; - Color.a *= Alpha; Out.vColor = Color; return Out; @@ -1232,6 +1229,27 @@ PS_OUT PS_Camera_LockOn(PS_IN In) return Out; } +PS_OUT PS_Loding_Screen(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 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord); + Color = tex1; + + float4 tex2 = g_Texture1.Sample(DefaultSampler, In.vTexcoord); + + Color = lerp(Color, tex2, tex2.a); + + Color.a *= Alpha; + + Out.vColor = Color; + + return Out; +} + technique11 PosTexTechnique11 { pass Default @@ -1482,4 +1500,14 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Camera_LockOn(); } + pass Loding_Screen + { + SetRasterizerState(RS_Default); + SetDepthStencilState(DSS_Default, 0); + SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_Loding_Screen(); + } + } diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj index b4cf14b63..402f63ed6 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj @@ -160,6 +160,7 @@ call Update_Resources.bat + @@ -167,6 +168,8 @@ call Update_Resources.bat + + @@ -175,6 +178,7 @@ call Update_Resources.bat + @@ -284,6 +288,7 @@ call Update_Resources.bat + @@ -291,6 +296,8 @@ call Update_Resources.bat + + @@ -299,6 +306,7 @@ call Update_Resources.bat + diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters index 965d42bdd..a417f6b2c 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters @@ -367,6 +367,18 @@ 02.GameObjects\Item\Goblin_Dagger + + 02.GameObjects\UI\Mouse_Cursor + + + 02.GameObjects\UI\Mouse_Cursor + + + 02.GameObjects\UI\Loding_Canvas\Loding_Panel + + + 02.GameObjects\UI\Loding_Canvas + @@ -782,6 +794,15 @@ {7e641382-9dfa-4da7-a8c8-a3ee06360e7a} + + {b8c7e12b-da04-4d49-bc61-104649975d0b} + + + {d068e67f-b59a-4456-b11c-1aa3aa1f1389} + + + {b4b5d9a6-152d-43fc-b746-49a3666d31a4} + @@ -1141,7 +1162,21 @@ 02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Drag - + + 02.GameObjects\UI\Mouse_Cursor + + + 02.GameObjects\UI\Mouse_Cursor + + + 02.GameObjects\Environment\00.MapContainer + + + 02.GameObjects\UI\Loding_Canvas + + + 02.GameObjects\UI\Loding_Canvas\Loding_Panel + diff --git a/Jusin154_Team3D/Client/Private/CameraLockOn.cpp b/Jusin154_Team3D/Client/Private/CameraLockOn.cpp new file mode 100644 index 000000000..eea042db9 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/CameraLockOn.cpp @@ -0,0 +1,197 @@ +#include "pch.h" +#include "CameraLockOn.h" +#include "GameInstance.h" + +CCameraLockOn::CCameraLockOn(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CUIObject(pDevice, pContext) +{ +} + +CCameraLockOn::CCameraLockOn(const CCameraLockOn& rhs) + :CUIObject(rhs) +{ +} + +HRESULT CCameraLockOn::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CCameraLockOn::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 960.f; + Desc.fY = 540.f; + Desc.fSizeX = 50.f; + Desc.fSizeY = 50.f; + + m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) }; + + if (FAILED(__super::Initialize(&Desc))) + { + return E_FAIL; + } + if (FAILED(Ready_Components(pArg))) + { + return E_FAIL; + } + m_fTimeMult = 0.5f; + Set_Visible(false); + return S_OK; +} + +void CCameraLockOn::Priority_Update(_float fTimeDelta) +{ +} + +void CCameraLockOn::Update(_float fTimeDelta) +{ + if (m_pGameInstance->Mouse_Pressing(DIM_RBUTTON)) + { + m_bHover = true; + } + else + m_bHover = false; + + m_fTime += fTimeDelta * m_fTimeMult; +} + +void CCameraLockOn::Late_Update(_float fTimeDelta) +{ + if (m_bVisible) { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + } +} + +HRESULT CCameraLockOn::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::CAMERA_LOCKON)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + return S_OK; +} + +_vector CCameraLockOn::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CCameraLockOn::Bind_ShaderResources() +{ + if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom1->Bind_ShaderResource(m_pShaderCom, "g_Texture1", 0))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom2->Bind_ShaderResource(m_pShaderCom, "g_Texture2", 0))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_iHover", &m_bHover, sizeof(_int)))) + { + return E_FAIL; + } + return S_OK; +} + +HRESULT CCameraLockOn::Ready_Components(void* pArg) +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_CameraLockOnReticlePulse"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_AimReticleBase"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_MagicSplatter"), reinterpret_cast(&m_pDiffuse_TextureCom2), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + + return S_OK; +} + +CCameraLockOn* CCameraLockOn::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CCameraLockOn* pInstance = new CCameraLockOn(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CCameraLockOn"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CCameraLockOn::Clone(void* pArg, CGameObject* pOwner) +{ + CCameraLockOn* pInstance = new CCameraLockOn(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CCameraLockOn"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CCameraLockOn::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pDiffuse_TextureCom1); + SAFE_RELEASE(m_pDiffuse_TextureCom2); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +#ifdef _DEBUG +void CCameraLockOn::Describe_Entity() +{ +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/GamePlay_Canvas.cpp b/Jusin154_Team3D/Client/Private/GamePlay_Canvas.cpp index 26378f14d..e42fc9290 100644 --- a/Jusin154_Team3D/Client/Private/GamePlay_Canvas.cpp +++ b/Jusin154_Team3D/Client/Private/GamePlay_Canvas.cpp @@ -44,7 +44,6 @@ HRESULT CGamePlay_Canvas::Initialize(void* pArg) { return E_FAIL; } - Visible(true); return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Level_Loading.cpp b/Jusin154_Team3D/Client/Private/Level_Loading.cpp index 8c55a61aa..cea603217 100644 --- a/Jusin154_Team3D/Client/Private/Level_Loading.cpp +++ b/Jusin154_Team3D/Client/Private/Level_Loading.cpp @@ -12,7 +12,6 @@ CLevel_Loading::CLevel_Loading(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID) : CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) } { - } HRESULT CLevel_Loading::Initialize(LEVEL eNextLevelID) @@ -118,6 +117,7 @@ void CLevel_Loading::Capture_TerrainPreShadow(SHADOW_LIGHT_DESC& ShadowDesc) HRESULT CLevel_Loading::Ready_Layer_BackGround(const _wstring& strLayerTag) { + return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index 319634a25..c523cb581 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -33,6 +33,12 @@ #include "Skill_Data.h" #include "UI_Manager.h" +#include "Mouse_Cursor.h" +#include "CameraLockOn.h" + +#include "Loding_Canvas.h" +#include "Loding_Panel.h" + #include "GamePlay_Canvas.h" #include "Mission_Panel.h" @@ -351,7 +357,7 @@ HRESULT CLoader::Loading_For_GamePlay() ".bin", false )); } - { /* BLDG_DB_GR */ + { /* BLDG_DB_GR rorcprr jobMapModels.emplace_back(Deferred_FolderLoad( "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_DB_GR/Meshes", ".bin", false @@ -532,11 +538,6 @@ HRESULT CLoader::Loading_For_GamePlay() }); - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Cursor"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/Cursor/UI_T_CursorRings.dds"), 0)))) { - return E_FAIL; - } - Asset_FileLoad("../Bin/Resources/Textures/Mission", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath) { @@ -585,6 +586,15 @@ HRESULT CLoader::Loading_For_GamePlay() return E_FAIL; } + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Screen_BG"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/LoadingScreen/UI_T_Loding_Screen_BG.png"), 0)))) { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("LoadingScreen"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("../Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_%d.png"), 2)))) { + return E_FAIL; + } Asset_FileLoad("../Bin/Resources/Textures/MiniMap", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath) { @@ -697,6 +707,23 @@ HRESULT CLoader::Loading_For_GamePlay() return S_OK; }); + + Asset_FileLoad("../Bin/Resources/Textures/Cursor", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath) + { + + _string strFilePath = pFilePath; + _wstring wstrFilePath = CMyTools::ToWstring(strFilePath); + + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, wstrFileName, + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) { + return E_FAIL; + } + + return S_OK; + + }); + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Item"), CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("../Bin/Resources/Textures/GadgetWheel/Item%d.png"), 8)))) { return E_FAIL; @@ -1672,11 +1699,34 @@ HRESULT CLoader::Loading_For_GamePlay() return E_FAIL; } - /* For.Prototype_GameObject_UI_Manager*/ + /* For.Prototype_GameObject_Mouse_Cursor*/ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CMouse_Cursor::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + + /* For.Prototype_GameObject_CameraLockOn*/ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CCameraLockOn::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + + /* For.Prototype_GameObject_Skill_Data*/ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSkill_Data::Create(m_pDevice, m_pContext)))) { return E_FAIL; } + /* For.Prototype_GameObject_Loding_Canvas*/ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CLoding_Canvas::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + /* For.Prototype_GameObject_Loding_Panel*/ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CLoding_Panel::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + /* For.Prototype_GameObject_GamePlay_Canvas*/ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CGamePlay_Canvas::Create(m_pDevice, m_pContext)))) { return E_FAIL; @@ -1763,70 +1813,87 @@ HRESULT CLoader::Loading_For_GamePlay() return E_FAIL; } + /* For.Prototype_GameObject_Spell_Canvas*/ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpell_Canvas::Create(m_pDevice, m_pContext)))) { return E_FAIL; } + /* For.Prototype_GameObject_Spell_Panel*/ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpell_Panel::Create(m_pDevice, m_pContext)))) { return E_FAIL; } + /* For.Prototype_GameObject_Current_Spell_Slot*/ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CCurrent_Spell_Slot::Create(m_pDevice, m_pContext)))) { return E_FAIL; } + /* For.Prototype_GameObject_Spell_List*/ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpell_List::Create(m_pDevice, m_pContext)))) { return E_FAIL; } + /* For.Prototype_GameObject_Eessential_Spell_Slot*/ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CEessential_Spell_Slot::Create(m_pDevice, m_pContext)))) { return E_FAIL; } + /* For.Prototype_GameObject_Eessential_Spell*/ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CEessential_Spell::Create(m_pDevice, m_pContext)))) { return E_FAIL; } + /* For.Prototype_GameObject_Spell_List_Image*/ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpell_List_Image::Create(m_pDevice, m_pContext)))) { return E_FAIL; } + /* For.Prototype_GameObject_Spell_State*/ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpell_State::Create(m_pDevice, m_pContext)))) { return E_FAIL; } + /* For.Prototype_GameObject_Spell_Hover*/ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpell_Hover::Create(m_pDevice, m_pContext)))) { return E_FAIL; } + /* For.Prototype_GameObject_Spell_Hover_Effect*/ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpell_Hover_Effect::Create(m_pDevice, m_pContext)))) { return E_FAIL; } + /* For.Prototype_GameObject_Spell_Preview*/ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpell_Preview::Create(m_pDevice, m_pContext)))) { return E_FAIL; } + /* For.Prototype_GameObject_Spell_Header*/ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpell_Header::Create(m_pDevice, m_pContext)))) { return E_FAIL; } + /* For.Prototype_GameObject_Spell_Header_Line*/ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpell_Header_Line::Create(m_pDevice, m_pContext)))) { return E_FAIL; } + /* For.Prototype_GameObject_Spell_Vidio_Border*/ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpell_Vidio_Border::Create(m_pDevice, m_pContext)))) { return E_FAIL; } + /* For.Prototype_GameObject_Spell_Anim*/ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpell_Anim::Create(m_pDevice, m_pContext)))) { return E_FAIL; } + /* For.Prototype_GameObject_Current_Slot_Number*/ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CCurrent_Slot_Number::Create(m_pDevice, m_pContext)))) { return E_FAIL; } + /* For.Prototype_GameObject_Spell_Drag*/ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpell_Drag::Create(m_pDevice, m_pContext)))) { return E_FAIL; diff --git a/Jusin154_Team3D/Client/Private/Loding_Canvas.cpp b/Jusin154_Team3D/Client/Private/Loding_Canvas.cpp new file mode 100644 index 000000000..8f00f949b --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Loding_Canvas.cpp @@ -0,0 +1,141 @@ +#include "pch.h" +#include "Loding_Canvas.h" +#include "GameInstance.h" +#include "UI_Manager.h" +#include "Loding_Panel.h" + +CLoding_Canvas::CLoding_Canvas(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CCanvasObject(pDevice, pContext) +{ +} + +CLoding_Canvas::CLoding_Canvas(const CLoding_Canvas& rhs) + :CCanvasObject(rhs) +{ +} + +HRESULT CLoding_Canvas::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CLoding_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(true); + return S_OK; +} + +void CLoding_Canvas::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); +} + +void CLoding_Canvas::Update(_float fTimeDelta) +{ + __super::Update(fTimeDelta); +} + +void CLoding_Canvas::Late_Update(_float fTimeDelta) +{ + if (m_bVisible) { + } + __super::Late_Update(fTimeDelta); +} + +HRESULT CLoding_Canvas::Render() +{ + return S_OK; +} + +_vector CLoding_Canvas::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CLoding_Canvas::Bind_ShaderResources() +{ + + return S_OK; +} + +HRESULT CLoding_Canvas::Ready_Components(void* pArg) +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CLoding_Canvas::Ready_Panel(void* pArg) +{ + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pLoding_Panel)))) + { + return E_FAIL; + } + Add_Panel(TEXT("Loding_Panel"), m_pLoding_Panel); + + return S_OK; +} + +void CLoding_Canvas::Clear_Penel() +{ +} + +CLoding_Canvas* CLoding_Canvas::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CLoding_Canvas* pInstance = new CLoding_Canvas(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CLoding_Canvas"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CLoding_Canvas::Clone(void* pArg, CGameObject* pOwner) +{ + CLoding_Canvas* pInstance = new CLoding_Canvas(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CLoding_Canvas"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CLoding_Canvas::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pVIBufferCom); +} + +#ifdef _DEBUG +void CLoding_Canvas::Describe_Entity() +{ +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Loding_Panel.cpp b/Jusin154_Team3D/Client/Private/Loding_Panel.cpp new file mode 100644 index 000000000..fe865dfa0 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Loding_Panel.cpp @@ -0,0 +1,212 @@ +#include "pch.h" +#include "Loding_Panel.h" +#include "GameInstance.h" + +CLoding_Panel::CLoding_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CPanelObject(pDevice, pContext) +{ +} + +CLoding_Panel::CLoding_Panel(const CLoding_Panel& rhs) + :CPanelObject(rhs) +{ +} + +HRESULT CLoding_Panel::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CLoding_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_iImageNum = 0; + return S_OK; +} +void CLoding_Panel::Set_Image(_int Index) +{ + m_iImageNum = Index; +} +void CLoding_Panel::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CLoding_Panel::Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + + __super::Update(fTimeDelta); +} + +void CLoding_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 CLoding_Panel::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::LODING_SCREEN)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + + return S_OK; +} + +_vector CLoding_Panel::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CLoding_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", m_iImageNum))) + { + 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 CLoding_Panel::Ready_Components(void* pArg) +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Screen_BG"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("LoadingScreen"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CLoding_Panel::Ready_Element(void* pArg) +{ + return S_OK; +} + +CLoding_Panel* CLoding_Panel::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CLoding_Panel* pInstance = new CLoding_Panel(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CLoding_Panel"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CLoding_Panel::Clone(void* pArg, CGameObject* pOwner) +{ + CLoding_Panel* pInstance = new CLoding_Panel(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CSpell_Panel"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CLoding_Panel::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pDiffuse_TextureCom1); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +#ifdef _DEBUG +void CLoding_Panel::Describe_Entity() +{ +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Mouse_Cursor.cpp b/Jusin154_Team3D/Client/Private/Mouse_Cursor.cpp new file mode 100644 index 000000000..01676921a --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Mouse_Cursor.cpp @@ -0,0 +1,192 @@ +#include "pch.h" +#include "Mouse_Cursor.h" +#include "GameInstance.h" +#include "InfoInstance.h" + +CMouse_Cursor::CMouse_Cursor(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CUIObject(pDevice, pContext) +{ +} + +CMouse_Cursor::CMouse_Cursor(const CMouse_Cursor& rhs) + :CUIObject(rhs), + m_pInfoInstance(CInfoInstance::GetInstance()) +{ +} + +HRESULT CMouse_Cursor::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CMouse_Cursor::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 0.f; + Desc.fY = 0.f; + // 호버 시 74 + Desc.fSizeX = 100.f; + Desc.fSizeY = 100.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 = 5.f; + m_bVisible = false; + m_fSortZ = 0.f; + // 메뉴가 실행이 되면 마우스가 나타나고 다른 UI위에 올라가면 살짝 작아진다. + return S_OK; +} + +void CMouse_Cursor::Priority_Update(_float fTimeDelta) +{ + if (m_bVisible) + { + POINT m_pPt{}; + GetCursorPos(&m_pPt); + ScreenToClient(g_hWnd, &m_pPt); + _vector MousePos = XMVectorSet(static_cast<_float>(m_pPt.x - m_fWinSizeX * 0.5f), static_cast<_float>(-m_pPt.y + m_fWinSizeY * 0.5f) - 10.f, 0.f, 1.f); + m_pTransformCom->Set_State(STATE::POSITION, MousePos); + } + +} + +void CMouse_Cursor::Update(_float fTimeDelta) +{ + if (m_bVisible) + { + m_fTime += fTimeDelta * m_fTimeMult; + } + /*ShowCursor(false);*/ +} + +void CMouse_Cursor::Late_Update(_float fTimeDelta) +{ + if (m_bVisible) { + m_pGameInstance->Add_RenderGroup(RENDER::UI_OVERLAY, this); + } +} + +HRESULT CMouse_Cursor::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::CURSOR)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + + return S_OK; +} + +_vector CMouse_Cursor::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CMouse_Cursor::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_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture2", 0))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float)))) + { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CMouse_Cursor::Ready_Components(void* pArg) +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_CursorRings"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + + return S_OK; +} + +CMouse_Cursor* CMouse_Cursor::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CMouse_Cursor* pInstance = new CMouse_Cursor(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CMouse_Cursor"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CMouse_Cursor::Clone(void* pArg, CGameObject* pOwner) +{ + CMouse_Cursor* pInstance = new CMouse_Cursor(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CMouse_Cursor"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CMouse_Cursor::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} +#ifdef _DEBUG +void CMouse_Cursor::Describe_Entity() +{ +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Spell_Drag.cpp b/Jusin154_Team3D/Client/Private/Spell_Drag.cpp index b140f9ef9..d5290e3e4 100644 --- a/Jusin154_Team3D/Client/Private/Spell_Drag.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_Drag.cpp @@ -407,7 +407,6 @@ void CSpell_Drag::Free() SAFE_RELEASE(m_pShaderCom); SAFE_RELEASE(m_pVIBufferCom); } -#ifdef _DEBUG #ifdef _DEBUG void CSpell_Drag::Describe_Entity() diff --git a/Jusin154_Team3D/Client/Private/Spell_Overlay.cpp b/Jusin154_Team3D/Client/Private/Spell_Overlay.cpp index 0abb218d8..6e3529b24 100644 --- a/Jusin154_Team3D/Client/Private/Spell_Overlay.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_Overlay.cpp @@ -201,6 +201,16 @@ void CSpell_Overlay::Update(_float fTimeDelta) } } + if (m_pGameInstance->Key_Down(DIK_N)) + { + Nocool = true; + m_pInfoInstance->Event_CallBack(TEXT("NoCooL"),&Nocool); + } + if (m_pGameInstance->Key_Down(DIK_M)) + { + Nocool = false; + m_pInfoInstance->Event_CallBack(TEXT("NoCooL"),&Nocool); + } if (m_pGameInstance->Key_Down(DIK_N)) { diff --git a/Jusin154_Team3D/Client/Private/UI_Manager.cpp b/Jusin154_Team3D/Client/Private/UI_Manager.cpp index 1cb619279..7bde79b07 100644 --- a/Jusin154_Team3D/Client/Private/UI_Manager.cpp +++ b/Jusin154_Team3D/Client/Private/UI_Manager.cpp @@ -4,6 +4,10 @@ #include "GamePlay_Canvas.h" #include "Spell_Canvas.h" #include "InfoInstance.h" +#include "Mouse_Cursor.h" +#include "CameraLockOn.h" +#include "Loding_Canvas.h" +#include "Skill_Data.h" CUI_Manager::CUI_Manager(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) :CUIObject(pDevice, pContext) @@ -28,7 +32,7 @@ HRESULT CUI_Manager::Initialize(void* pArg) return E_FAIL; } m_bCanvas_Change = false; - m_eType = UI_STATE::GAMEPLAYER; + m_eType = UI_STATE::LODING; m_pInfoInstance->Set_UISTATE(m_eType); m_pInfoInstance->Add_Event(TEXT("Canvas_Change"), [this](void* p) {this->Canvas_Change(*reinterpret_cast(p)); }); return S_OK; @@ -40,14 +44,27 @@ void CUI_Manager::Canvas_Change(UI_STATE eType) switch (eType) { + case UI_STATE::LODING: + m_pMouse_Cursor->Set_Visible(false); + m_pCamera_LockOn->Set_Visible(false); + static_cast(m_pLoding_Canvas)->Visible(true); + static_cast(m_pGamePlay_Canves)->Visible(false); + static_cast(m_pSpell_Canvas)->Visible(false); + case UI_STATE::GAMEPLAYER: + m_pMouse_Cursor->Set_Visible(false); + m_pCamera_LockOn->Set_Visible(false); + static_cast(m_pLoding_Canvas)->Visible(false); static_cast(m_pGamePlay_Canves)->Visible(true); static_cast(m_pSpell_Canvas)->Visible(false); break; case UI_STATE::SPELL: - static_cast(m_pSpell_Canvas)->Visible(true); + m_pMouse_Cursor->Set_Visible(true); + m_pCamera_LockOn->Set_Visible(false); + static_cast(m_pLoding_Canvas)->Visible(false); static_cast(m_pGamePlay_Canves)->Visible(false); + static_cast(m_pSpell_Canvas)->Visible(true); break; case UI_STATE::POTION: @@ -130,15 +147,20 @@ HRESULT CUI_Manager::Ready_Components(void* pArg) } Add_Canvas(TEXT("Spell_Canvas"), m_pSpell_Canvas); - //if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMouse_Cursor)))) { - // return E_FAIL; - //} - //Add_Canvas(TEXT("Mouse_Cursor"), m_pMouse_Cursor); + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pLoding_Canvas)))) { + return E_FAIL; + } + Add_Canvas(TEXT("Loding_Canvas"), m_pLoding_Canvas); - //if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pCamera_LockOn)))) { - // return E_FAIL; - //} - //Add_Canvas(TEXT("Camera_LockOn"), m_pCamera_LockOn); + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMouse_Cursor)))) { + return E_FAIL; + } + Add_Canvas(TEXT("Mouse_Cursor"), m_pMouse_Cursor); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pCamera_LockOn)))) { + return E_FAIL; + } + Add_Canvas(TEXT("Camera_LockOn"), m_pCamera_LockOn); return S_OK; } diff --git a/Jusin154_Team3D/Client/Public/CameraLockOn.h b/Jusin154_Team3D/Client/Public/CameraLockOn.h new file mode 100644 index 000000000..5b6995067 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/CameraLockOn.h @@ -0,0 +1,51 @@ +#pragma once + +#include "Client_Define.h" +#include "ElementObject.h" + +NS_BEGIN(Engine) +class CTexture; +class CShader; +class CVIBuffer_Rect; +NS_END + +NS_BEGIN(Client) + + +class CCameraLockOn final : public CUIObject +{ +private: + CCameraLockOn(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CCameraLockOn(const CCameraLockOn& rhs); + virtual ~CCameraLockOn() = 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 }; + CTexture* m_pDiffuse_TextureCom1 = { nullptr }; + CTexture* m_pDiffuse_TextureCom2 = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + +public: + static CCameraLockOn* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; +#ifdef _DEBUG + void Describe_Entity() override; +#endif // _DEBUG +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Client_Enum.h b/Jusin154_Team3D/Client/Public/Client_Enum.h index c24ca3e7d..84acd0372 100644 --- a/Jusin154_Team3D/Client/Public/Client_Enum.h +++ b/Jusin154_Team3D/Client/Public/Client_Enum.h @@ -12,10 +12,10 @@ namespace Client enum class SHADER_PASS_PARTICLE { EXPLOSION, END }; enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, TRAIL_BLEND, TRAILWB_FOR_BLEND, TRAIL_BLUR, TRAIL_BLOOM, END }; enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, BLEND, BLEND_NOWORLD, BLOOM, BLOOM_NOWORLD, BLUR_NO_EMMISVE, BLUR_NO_WORLD_NO_EMISSIVE, WEIGHTBLEND_FOR_BLEND, END }; - enum class SHADER_PASS_UIEDITOR { DEFAULT, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, TYPE, HPBAR, MAGIC_METER, MAGIC_ICON, REMOVEUV, REVELIO, POTION, MAGIC_ITEM, SPELL_PREVIEW, SPELL_HEADER, SPELL_HEADER_LINE, SPELL_DRAG, END }; + enum class SHADER_PASS_UIEDITOR { DEFAULT, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, TYPE, HPBAR, MAGIC_METER, MAGIC_ICON, REMOVEUV, REVELIO, POTION, MAGIC_ITEM, SPELL_PREVIEW, SPELL_HEADER, SPELL_HEADER_LINE, SPELL_DRAG, CAMERA_LOCKON, LODING_SCREEN, END }; enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, UVALPHABLEND, MAGIC_METER, SPELL_LIST, EESSENTIAL_SPELL_SOLT, EESSENTIAL_SPELL, COLOR, SPELL_HOVER, SPELL_SLOT_EFFECT, SPELL_SLOT, END }; - enum class UI_STATE { GAMEPLAYER, SPELL, POTION, INVENTORY, END }; + enum class UI_STATE { LODING, GAMEPLAYER, SPELL, POTION, INVENTORY, END }; enum class EFFECT_TYPE { EFFECT, TRAIL, END }; diff --git a/Jusin154_Team3D/Client/Public/Loding_Canvas.h b/Jusin154_Team3D/Client/Public/Loding_Canvas.h new file mode 100644 index 000000000..d12a1bccd --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Loding_Canvas.h @@ -0,0 +1,51 @@ +#pragma once + +#include "Client_Define.h" +#include "CanvasObject.h" + +NS_BEGIN(Engine) +class CGameObject; +NS_END + +NS_BEGIN(Client) + + +class CLoding_Canvas final : public CCanvasObject +{ +private: + CLoding_Canvas(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CLoding_Canvas(const CLoding_Canvas& rhs); + virtual ~CLoding_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_pLoding_Panel= { nullptr }; + + +public: + static CLoding_Canvas* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; +#ifdef _DEBUG + void Describe_Entity() override; +#endif // _DEBUG +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Loding_Panel.h b/Jusin154_Team3D/Client/Public/Loding_Panel.h new file mode 100644 index 000000000..4b40b193a --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Loding_Panel.h @@ -0,0 +1,59 @@ +#pragma once + +#include "Client_Define.h" +#include "PanelObject.h" + +NS_BEGIN(Engine) +class CGameObject; +NS_END + +NS_BEGIN(Client) + +class CLoding_Panel final : public CPanelObject +{ + +private: + CLoding_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CLoding_Panel(const CLoding_Panel& rhs); + virtual ~CLoding_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; + +public: + void Set_Image(_int Index); + +private: + CTexture* m_pDiffuse_TextureCom = { nullptr }; + CTexture* m_pDiffuse_TextureCom1 = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + CGameObject* m_pCurrent_Spell_Slot = { nullptr }; + + _int m_iImageNum{}; + +public: + static CLoding_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; +#ifdef _DEBUG + void Describe_Entity() override; + +#endif // _DEBUG + +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Mouse_Cursor.h b/Jusin154_Team3D/Client/Public/Mouse_Cursor.h new file mode 100644 index 000000000..21622d8dc --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Mouse_Cursor.h @@ -0,0 +1,53 @@ +#pragma once + +#include "Client_Define.h" +#include "ElementObject.h" + +NS_BEGIN(Engine) +class CTexture; +class CShader; +class CVIBuffer_Rect; +NS_END + +NS_BEGIN(Client) + + +class CMouse_Cursor final : public CUIObject +{ +private: + CMouse_Cursor(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CMouse_Cursor(const CMouse_Cursor& rhs); + virtual ~CMouse_Cursor() = 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: + CInfoInstance* m_pInfoInstance = { nullptr }; + + CTexture* m_pDiffuse_TextureCom = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + +public: + static CMouse_Cursor* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; +#ifdef _DEBUG + void Describe_Entity() override; +#endif // _DEBUG +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/UI_Manager.h b/Jusin154_Team3D/Client/Public/UI_Manager.h index 07d9fab3c..47e25afbd 100644 --- a/Jusin154_Team3D/Client/Public/UI_Manager.h +++ b/Jusin154_Team3D/Client/Public/UI_Manager.h @@ -52,6 +52,7 @@ class CUI_Manager final : public CUIObject CGameObject* m_pGamePlay_Canves = { nullptr }; CGameObject* m_pSpell_Canvas = { nullptr }; + CGameObject* m_pLoding_Canvas = { nullptr }; CGameObject* m_pMouse_Cursor = { nullptr }; CGameObject* m_pCamera_LockOn = { nullptr }; _bool m_bCanvas_Change = { false }; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl index 2915d2fa6..b196e4b18 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl @@ -104,9 +104,6 @@ PS_OUT PS_MAIN(PS_IN In) float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord); - if (Color.a <= 0.1f) - discard; - Color.a *= Alpha; Out.vColor = Color; return Out; @@ -1232,6 +1229,27 @@ PS_OUT PS_Camera_LockOn(PS_IN In) return Out; } +PS_OUT PS_Loding_Screen(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 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord); + Color = tex1; + + float4 tex2 = g_Texture1.Sample(DefaultSampler, In.vTexcoord); + + Color = lerp(Color, tex2, tex2.a); + + Color.a *= Alpha; + + Out.vColor = Color; + + return Out; +} + technique11 PosTexTechnique11 { pass Default @@ -1482,4 +1500,14 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Camera_LockOn(); } + pass Loding_Screen + { + SetRasterizerState(RS_Default); + SetDepthStencilState(DSS_Default, 0); + SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_Loding_Screen(); + } + } diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Hogsmeade3.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_0.png similarity index 100% rename from Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Hogsmeade3.png rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_0.png diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Hogwarts5.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_1.png similarity index 100% rename from Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Hogwarts5.png rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_1.png diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Dungeon1.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Dungeon1.png deleted file mode 100644 index 600f0f7dc..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Dungeon1.png and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Dungeon2.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Dungeon2.png deleted file mode 100644 index 43fb0e20e..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Dungeon2.png and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Dungeon3.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Dungeon3.png deleted file mode 100644 index 338839f98..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Dungeon3.png and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Dungeon4.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Dungeon4.png deleted file mode 100644 index cddd2e7ce..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Dungeon4.png and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Dungeon5.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Dungeon5.png deleted file mode 100644 index 5fa9f592b..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Dungeon5.png and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Generic1.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Generic1.png deleted file mode 100644 index b02760373..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Generic1.png and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Hogsmeade1.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Hogsmeade1.png deleted file mode 100644 index 5a35bb55e..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Hogsmeade1.png and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Hogsmeade2.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Hogsmeade2.png deleted file mode 100644 index e2577da72..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Hogsmeade2.png and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Hogsmeade4.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Hogsmeade4.png deleted file mode 100644 index 6b517cb51..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Hogsmeade4.png and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Hogsmeade5.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Hogsmeade5.png deleted file mode 100644 index db4ffab63..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Hogsmeade5.png and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Hogwarts1.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Hogwarts1.png deleted file mode 100644 index 9ff845e51..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Hogwarts1.png and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Hogwarts2.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Hogwarts2.png deleted file mode 100644 index 6904d09eb..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Hogwarts2.png and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Hogwarts3.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Hogwarts3.png deleted file mode 100644 index a836c1325..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Hogwarts3.png and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Hogwarts4.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Hogwarts4.png deleted file mode 100644 index a40e52a7a..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Hogwarts4.png and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Overland1.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Overland1.png deleted file mode 100644 index f4a2aa4a5..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Overland1.png and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Overland2.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Overland2.png deleted file mode 100644 index a52b20c2a..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Overland2.png and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Overland3.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Overland3.png deleted file mode 100644 index d3bb27e91..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Overland3.png and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Overland4.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Overland4.png deleted file mode 100644 index 1735958a6..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Overland4.png and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Overland5.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Overland5.png deleted file mode 100644 index f94edf1b1..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Overland5.png and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Sanctuary1.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Sanctuary1.png deleted file mode 100644 index 37fad41d3..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Sanctuary1.png and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Sanctuary2.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Sanctuary2.png deleted file mode 100644 index 18942ce0f..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Sanctuary2.png and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Sanctuary3.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Sanctuary3.png deleted file mode 100644 index f7af17cc5..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Sanctuary3.png and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Sanctuary4.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Sanctuary4.png deleted file mode 100644 index 387a9ba87..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Sanctuary4.png and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Sanctuary5.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Sanctuary5.png deleted file mode 100644 index 33fd6f430..000000000 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_Sanctuary5.png and /dev/null differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_Loding_Screen_BG.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_Loding_Screen_BG.png new file mode 100644 index 000000000..370927a8d Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/LoadingScreen/UI_T_Loding_Screen_BG.png differ diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj b/Jusin154_Team3D/Editor/Default/Editor.vcxproj index 1180b5e42..d2533347a 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj @@ -220,6 +220,8 @@ + + @@ -389,6 +391,8 @@ + + diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters index ba233a597..b321d0237 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters @@ -478,6 +478,12 @@ {fe7d5909-159c-4130-ae5e-e08e648b193c} + + {ebad2fd8-622f-4c17-9ba3-b0c4bd366c05} + + + {944a2f28-34bc-4559-b179-85b920086b30} + @@ -936,6 +942,12 @@ 50.UI\Mouse_Cursor + + 50.UI\Loding_Canvas + + + 50.UI\Loding_Canvas\Loding_Panel + @@ -1393,6 +1405,12 @@ 50.UI\Mouse_Cursor + + 50.UI\Loding_Canvas + + + 50.UI\Loding_Canvas\Loding_Panel + diff --git a/Jusin154_Team3D/Editor/Private/GamePlay_Canvas.cpp b/Jusin154_Team3D/Editor/Private/GamePlay_Canvas.cpp index 077702144..fe9d06fe4 100644 --- a/Jusin154_Team3D/Editor/Private/GamePlay_Canvas.cpp +++ b/Jusin154_Team3D/Editor/Private/GamePlay_Canvas.cpp @@ -51,7 +51,6 @@ HRESULT CGamePlay_Canvas::Initialize(void* pArg) void CGamePlay_Canvas::Priority_Update(_float fTimeDelta) { - __super::Priority_Update(fTimeDelta); } diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp index 0b8d8ca7c..c8e922279 100644 --- a/Jusin154_Team3D/Editor/Private/Loader.cpp +++ b/Jusin154_Team3D/Editor/Private/Loader.cpp @@ -42,6 +42,9 @@ #include "Mouse_Cursor.h" #include "CameraLockOn.h" +#include "Loding_Canvas.h" +#include "Loding_Panel.h" + #include "GamePlay_Canvas.h" #include "Mission_Panel.h" @@ -513,6 +516,16 @@ HRESULT CLoader::Loading_For_UI() }); + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Screen_BG"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/LoadingScreen/UI_T_Loding_Screen_BG.png"), 0)))) { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("LoadingScreen"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("../Bin/Resources/Textures/LoadingScreen/UI_T_LoadingScreen_%d.png"), 2)))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Item"), CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("../Bin/Resources/Textures/GadgetWheel/Item%d.png"), 8)))) { return E_FAIL; @@ -847,6 +860,15 @@ HRESULT CLoader::Loading_For_UI() return E_FAIL; } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CLoding_Canvas::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CLoding_Panel::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CGamePlay_Canvas::Create(m_pDevice, m_pContext)))) { return E_FAIL; diff --git a/Jusin154_Team3D/Editor/Private/Loding_Canvas.cpp b/Jusin154_Team3D/Editor/Private/Loding_Canvas.cpp new file mode 100644 index 000000000..e98efcd8c --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/Loding_Canvas.cpp @@ -0,0 +1,139 @@ +#include "pch.h" +#include "Loding_Canvas.h" +#include "GameInstance.h" +#include "UI_Manager.h" +#include "Loding_Panel.h" + +CLoding_Canvas::CLoding_Canvas(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CCanvasObject(pDevice, pContext) +{ +} + +CLoding_Canvas::CLoding_Canvas(const CLoding_Canvas& rhs) + :CCanvasObject(rhs) +{ +} + +HRESULT CLoding_Canvas::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CLoding_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(true); + return S_OK; +} + +void CLoding_Canvas::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); +} + +void CLoding_Canvas::Update(_float fTimeDelta) +{ + __super::Update(fTimeDelta); +} + +void CLoding_Canvas::Late_Update(_float fTimeDelta) +{ + if (m_bVisible) { + } + __super::Late_Update(fTimeDelta); +} + +HRESULT CLoding_Canvas::Render() +{ + return S_OK; +} + +_vector CLoding_Canvas::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CLoding_Canvas::Bind_ShaderResources() +{ + + return S_OK; +} + +HRESULT CLoding_Canvas::Ready_Components(void* pArg) +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CLoding_Canvas::Ready_Panel(void* pArg) +{ + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pLoding_Panel)))) + { + return E_FAIL; + } + Add_Panel(TEXT("Loding_Panel"), m_pLoding_Panel); + + return S_OK; +} + +void CLoding_Canvas::Clear_Penel() +{ +} + +CLoding_Canvas* CLoding_Canvas::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CLoding_Canvas* pInstance = new CLoding_Canvas(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CLoding_Canvas"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CLoding_Canvas::Clone(void* pArg, CGameObject* pOwner) +{ + CLoding_Canvas* pInstance = new CLoding_Canvas(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CLoding_Canvas"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CLoding_Canvas::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pVIBufferCom); +} + +void CLoding_Canvas::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Editor/Private/Loding_Panel.cpp b/Jusin154_Team3D/Editor/Private/Loding_Panel.cpp new file mode 100644 index 000000000..a2eca5bf7 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/Loding_Panel.cpp @@ -0,0 +1,210 @@ +#include "pch.h" +#include "Loding_Panel.h" +#include "GameInstance.h" + +CLoding_Panel::CLoding_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CPanelObject(pDevice, pContext) +{ +} + +CLoding_Panel::CLoding_Panel(const CLoding_Panel& rhs) + :CPanelObject(rhs) +{ +} + +HRESULT CLoding_Panel::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CLoding_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_iImageNum = 0; + return S_OK; +} +void CLoding_Panel::Set_Image(_int Index) +{ + m_iImageNum = Index; +} +void CLoding_Panel::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CLoding_Panel::Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + + __super::Update(fTimeDelta); +} + +void CLoding_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 CLoding_Panel::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::LODING_SCREEN)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + + return S_OK; +} + +_vector CLoding_Panel::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CLoding_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", m_iImageNum))) + { + 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 CLoding_Panel::Ready_Components(void* pArg) +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Screen_BG"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("LoadingScreen"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CLoding_Panel::Ready_Element(void* pArg) +{ + return S_OK; +} + +CLoding_Panel* CLoding_Panel::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CLoding_Panel* pInstance = new CLoding_Panel(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CLoding_Panel"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CLoding_Panel::Clone(void* pArg, CGameObject* pOwner) +{ + CLoding_Panel* pInstance = new CLoding_Panel(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CSpell_Panel"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CLoding_Panel::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pDiffuse_TextureCom1); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +void CLoding_Panel::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Editor/Private/MainApp.cpp b/Jusin154_Team3D/Editor/Private/MainApp.cpp index 6c5a471de..554bb1a11 100644 --- a/Jusin154_Team3D/Editor/Private/MainApp.cpp +++ b/Jusin154_Team3D/Editor/Private/MainApp.cpp @@ -59,7 +59,7 @@ void CMainApp::Update(_float fTimeDelta) HRESULT CMainApp::Render() { - _float4 vClearColor = _float4(0.f, 0.f, 1.f, 1.f); + _float4 vClearColor = _float4(0.f, 0.f, 0.f, 1.f); m_pGameInstance->Render_Begin(&vClearColor); diff --git a/Jusin154_Team3D/Editor/Private/UI_Manager.cpp b/Jusin154_Team3D/Editor/Private/UI_Manager.cpp index 678d6dca5..87bdabbdc 100644 --- a/Jusin154_Team3D/Editor/Private/UI_Manager.cpp +++ b/Jusin154_Team3D/Editor/Private/UI_Manager.cpp @@ -1,11 +1,11 @@ -#include "UI_Manager.h" -#include "pch.h" +#include "pch.h" #include "UI_Manager.h" #include "GameInstance.h" #include "GamePlay_Canvas.h" #include "Spell_Canvas.h" #include "Mouse_Cursor.h" #include "CameraLockOn.h" +#include "Loding_Canvas.h" CUI_Manager::CUI_Manager(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) :CUIObject(pDevice, pContext) @@ -139,6 +139,11 @@ HRESULT CUI_Manager::Ready_Components(void* pArg) } Add_Canvas(TEXT("Spell_Canvas"), m_pSpell_Canvas); + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pLoding_Canvas)))) { + return E_FAIL; + } + Add_Canvas(TEXT("Loding_Canvas"), m_pLoding_Canvas); + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMouse_Cursor)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Editor/Public/Editor_Define.h b/Jusin154_Team3D/Editor/Public/Editor_Define.h index 008672f98..6d70fcc49 100644 --- a/Jusin154_Team3D/Editor/Public/Editor_Define.h +++ b/Jusin154_Team3D/Editor/Public/Editor_Define.h @@ -26,7 +26,7 @@ namespace Editor enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, TRAIL_BLEND, TRAILWB_FOR_BLEND, TRAIL_BLUR, TRAIL_BLOOM, END }; enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, BLEND, BLEND_NOWORLD, BLOOM, BLOOM_NOWORLD, BLUR_NO_EMMISVE, BLUR_NO_WORLD_NO_EMISSIVE, WEIGHTBLEND_FOR_BLEND, END }; - enum class SHADER_PASS_UIEDITOR { DEFAULT, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, TYPE, HPBAR, MAGIC_METER, MAGIC_ICON, REMOVEUV, REVELIO, POTION, MAGIC_ITEM, SPELL_PREVIEW, SPELL_HEADER, SPELL_HEADER_LINE, SPELL_DRAG, CAMERA_LOCKON, END }; + enum class SHADER_PASS_UIEDITOR { DEFAULT, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, TYPE, HPBAR, MAGIC_METER, MAGIC_ICON, REMOVEUV, REVELIO, POTION, MAGIC_ITEM, SPELL_PREVIEW, SPELL_HEADER, SPELL_HEADER_LINE, SPELL_DRAG, CAMERA_LOCKON, LODING_SCREEN, END }; enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, UVALPHABLEND, MAGIC_METER, SPELL_LIST, EESSENTIAL_SPELL_SOLT, EESSENTIAL_SPELL, COLOR, SPELL_HOVER, SPELL_SLOT_EFFECT, SPELL_SLOT, END }; diff --git a/Jusin154_Team3D/Editor/Public/GamePlay_Canvas.h b/Jusin154_Team3D/Editor/Public/GamePlay_Canvas.h index f879ea4e7..33353a99e 100644 --- a/Jusin154_Team3D/Editor/Public/GamePlay_Canvas.h +++ b/Jusin154_Team3D/Editor/Public/GamePlay_Canvas.h @@ -44,9 +44,7 @@ class CGamePlay_Canvas final : public CCanvasObject static CGamePlay_Canvas* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; virtual void Free() override; -#ifdef _DEBUG void Describe_Entity() override; -#endif // _DEBUG }; NS_END diff --git a/Jusin154_Team3D/Editor/Public/Loding_Canvas.h b/Jusin154_Team3D/Editor/Public/Loding_Canvas.h new file mode 100644 index 000000000..cf94ecbf7 --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/Loding_Canvas.h @@ -0,0 +1,48 @@ +#pragma once + +#include "Editor_Define.h" +#include "CanvasObject.h" + +NS_BEGIN(Engine) +class CGameObject; +NS_END + +NS_BEGIN(Editor) + +class CLoding_Canvas final : public CCanvasObject +{ +private: + CLoding_Canvas(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CLoding_Canvas(const CLoding_Canvas& rhs); + virtual ~CLoding_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_pLoding_Panel= { nullptr }; + + +public: + static CLoding_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 diff --git a/Jusin154_Team3D/Editor/Public/Loding_Panel.h b/Jusin154_Team3D/Editor/Public/Loding_Panel.h new file mode 100644 index 000000000..e33d3b390 --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/Loding_Panel.h @@ -0,0 +1,55 @@ +#pragma once + +#include "Editor_Define.h" +#include "PanelObject.h" + +NS_BEGIN(Engine) +class CGameObject; +NS_END + +NS_BEGIN(Editor) + +class CLoding_Panel final : public CPanelObject +{ + +private: + CLoding_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CLoding_Panel(const CLoding_Panel& rhs); + virtual ~CLoding_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; + +public: + void Set_Image(_int Index); + +private: + CTexture* m_pDiffuse_TextureCom = { nullptr }; + CTexture* m_pDiffuse_TextureCom1 = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + CGameObject* m_pCurrent_Spell_Slot = { nullptr }; + + _int m_iImageNum{}; + +public: + static CLoding_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; + void Describe_Entity() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Editor/Public/UI_Manager.h b/Jusin154_Team3D/Editor/Public/UI_Manager.h index dee3be174..2b8f5dba2 100644 --- a/Jusin154_Team3D/Editor/Public/UI_Manager.h +++ b/Jusin154_Team3D/Editor/Public/UI_Manager.h @@ -29,7 +29,6 @@ class CUI_Manager final : public CUIObject 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; @@ -51,6 +50,7 @@ class CUI_Manager final : public CUIObject CGameObject* m_pGamePlay_Canves = { nullptr }; CGameObject* m_pSpell_Canvas = { nullptr }; + CGameObject* m_pLoding_Canvas= { nullptr }; CGameObject* m_pMouse_Cursor = { nullptr }; CGameObject* m_pCamera_LockOn = { nullptr }; _bool m_bCanvas_Change = { false }; diff --git a/Jusin154_Team3D/Engine/Private/Renderer.cpp b/Jusin154_Team3D/Engine/Private/Renderer.cpp index 02b27864f..0252491b9 100644 --- a/Jusin154_Team3D/Engine/Private/Renderer.cpp +++ b/Jusin154_Team3D/Engine/Private/Renderer.cpp @@ -33,6 +33,7 @@ void CRenderer::Render() Render_LastColor(); Render_Tone_Mapping(); Render_UI(); + Render_UI_Overley(); #ifdef _DEBUG Describe_Entitiy(); @@ -743,6 +744,22 @@ void CRenderer::Render_UI() m_RenderObjects[ENUM_CLASS(RENDER::UI)].clear(); } +void CRenderer::Render_UI_Overley() +{ + for (auto& pRenderObject : m_RenderObjects[ENUM_CLASS(RENDER::UI_OVERLAY)]) + { + if (nullptr != pRenderObject) { + if (FAILED(pRenderObject->Render())) { + assert(false); + } + } + SAFE_RELEASE(pRenderObject); + } + + m_RenderObjects[ENUM_CLASS(RENDER::UI_OVERLAY)].clear(); + +} + void CRenderer::Render_LastColor() { // Bind_Resorces diff --git a/Jusin154_Team3D/Engine/Public/Engine_Enum.h b/Jusin154_Team3D/Engine/Public/Engine_Enum.h index 13eabbb94..c565e99e5 100644 --- a/Jusin154_Team3D/Engine/Public/Engine_Enum.h +++ b/Jusin154_Team3D/Engine/Public/Engine_Enum.h @@ -5,7 +5,7 @@ NS_BEGIN(Engine) enum class STATE { RIGHT, UP, LOOK, POSITION, END }; enum class LIGHT { DIRECTIONAL, POINT, SPOT, END }; enum class COLLIDER { AABB, OBB, SPHERE, END }; -enum class RENDER {PRIORITY, SHADOW, NONBLEND, DECAL, BLUR, NONLIGHT, EFFECT ,BLEND, BLOOM, UI, OCCLUSION, PRESHADOW, END }; +enum class RENDER {PRIORITY, SHADOW, NONBLEND, DECAL, BLUR, NONLIGHT, EFFECT ,BLEND, BLOOM, UI, OCCLUSION, PRESHADOW, UI_OVERLAY, END }; enum class RAY { LOCAL, WORLD, END }; enum class ACTOR { BOX, CAPSULE, SPHERE, PLANE, TRIANGLEMESH, HEIGHTFIELD, END }; enum class BLEND_BONE{SPINE,SHOULDER_L,SHOULDER_R,NECK,SHOULDER_NECK_L, SHOULDER_NECK_R,END}; diff --git a/Jusin154_Team3D/Engine/Public/Renderer.h b/Jusin154_Team3D/Engine/Public/Renderer.h index 8d31dd266..55fd9390e 100644 --- a/Jusin154_Team3D/Engine/Public/Renderer.h +++ b/Jusin154_Team3D/Engine/Public/Renderer.h @@ -87,6 +87,7 @@ class CRenderer final : public CBase void Render_LastColor(); void Render_Tone_Mapping(); void Render_UI(); + void Render_UI_Overley(); #ifdef _DEBUG