Merge pull request #343 from SpicyGangjeong/Effect

Effect
This commit is contained in:
jinwoo0522
2025-12-06 14:32:42 +09:00
committed by GitHub
30 changed files with 643 additions and 617 deletions
@@ -48,7 +48,7 @@ HRESULT CBombardSide::Initialize(void* pArg)
SAFE_ADDREF(m_pWandTrail);
SAFE_ADDREF(m_pWandParticle);
m_fDuration = 2.5f;
m_fDuration = 2.f;
m_Events.emplace(0.6f, [&]() {
m_isParticleEnd = true;
@@ -65,6 +65,14 @@ void CEffectParts::Late_Update(_float fTimeDelta)
m_pInstance_ModelCom->Drop(fTimeDelta);
if (m_EffectInfo.isLightDissolve == true)
{
if (m_pLightCom != nullptr)
{
m_pLightCom->Update_AmbientRatio(fTimeDelta, m_EffectInfo.isLightTime);
}
}
if (m_EffectInfo.isBillboard)
m_pGameInstance->BillBoard(m_pTransformCom);
@@ -83,6 +91,9 @@ void CEffectParts::Late_Update(_float fTimeDelta)
if (m_EffectInfo.isOnlyBlur == true)
return;
if (m_pLightCom != nullptr)
m_pGameInstance->Add_Light_Group(CURRENT_LEVEL, m_pLightCom);
m_pGameInstance->Add_RenderGroup(m_EffectInfo.eRenderOrder, this);
@@ -58,10 +58,25 @@ void CEffect_Container::Late_Update(_float fTimeDelta)
__super::Late_Update(fTimeDelta);
}
void CEffect_Container::OnCollision(CGameObject* pOther, void* pDesc)
{
}
void CEffect_Container::Reset_Light()
{
for (auto& iter : m_PartObjects)
{
CLight* pLight = iter.second->Get_Component<CLight>();
if (pLight == nullptr)
continue;
pLight->Reset_AmbientRatio();
}
}
HRESULT CEffect_Container::Load_Package(const _char* pPath)
{
@@ -214,9 +229,8 @@ HRESULT CEffect_Container::Pre_Setting(CGameObject* pObject, void* pArg)
m_pOwner = pObject;
//Add_Chlid_Light();
Reset_EffectParts();
Reset_Light();
m_fAccTime = 0.f;
m_fPreAccTime = 0.f;
@@ -367,7 +381,6 @@ void CEffect_Container::Update_Event(_float fTimeDelta)
}
}
//Delete_Chlid_Light();
}
@@ -161,95 +161,95 @@ HRESULT CLevel_GamePlay::Ready_Background()
/* Map Containters */
/* 테스트용 맵 */
CInfoInstance::GetInstance()->Load_MapObjects("ClientTest");
//CInfoInstance::GetInstance()->Load_MapObjects("ClientTest");
/* 전체 맵 */
CInfoInstance::GetInstance()->Load_MapObjects("Hogsmeade_MapContainer_Data");
//CInfoInstance::GetInstance()->Load_MapObjects("Hogsmeade_MapContainer_Data");
/* 조명 오브젝트 */
CInfoInstance::GetInstance()->Load_LightElements("LightElement");
//CInfoInstance::GetInstance()->Load_LightElements("LightElement");
/* 상호작용 오브젝트 */
CInfoInstance::GetInstance()->Load_InteractableElements("E_INTER_Barrel");
CInfoInstance::GetInstance()->Load_InteractableElements("E_INTER_PostPackage_B");
CInfoInstance::GetInstance()->Load_InteractableElements("E_INTER_PostPackage_F");
CInfoInstance::GetInstance()->Load_InteractableElements("E_INTER_TeaShopTable");
CInfoInstance::GetInstance()->Load_InteractableElements("E_INTER_TeaShopChair");
///* 상호작용 오브젝트 */
//CInfoInstance::GetInstance()->Load_InteractableElements("E_INTER_Barrel");
//CInfoInstance::GetInstance()->Load_InteractableElements("E_INTER_PostPackage_B");
//CInfoInstance::GetInstance()->Load_InteractableElements("E_INTER_PostPackage_F");
//CInfoInstance::GetInstance()->Load_InteractableElements("E_INTER_TeaShopTable");
//CInfoInstance::GetInstance()->Load_InteractableElements("E_INTER_TeaShopChair");
CInstancedProp::INSTANCE_PROP_DESC Desc = {};
//CInstancedProp::INSTANCE_PROP_DESC Desc = {};
/* InstanceProp Oak_Tree*/
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_OakTree_MedA";
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/OakTree_MedA.bin";
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))){
return E_FAIL;
}
///* InstanceProp Oak_Tree*/
//Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_OakTree_MedA";
//Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/OakTree_MedA.bin";
//if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))){
// return E_FAIL;
//}
/* BearBerry */
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_BearBerry_A";
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/BearBerry_A.bin";
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))){
return E_FAIL;
}
///* BearBerry */
//Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_BearBerry_A";
//Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/BearBerry_A.bin";
//if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))){
// return E_FAIL;
//}
/* SM_HM_OwlPost_Window_A */
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_OwlPost_Window_A";
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/OwlPost_Window.bin";
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
return E_FAIL;
///* SM_HM_OwlPost_Window_A */
//Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_OwlPost_Window_A";
//Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/OwlPost_Window.bin";
//if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
// return E_FAIL;
///* WA_Rectangle_Double_A */
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WA_Rectangle_Double_A";
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Rectangle_Double_A.bin";
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
return E_FAIL;
/////* WA_Rectangle_Double_A */
//Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WA_Rectangle_Double_A";
//Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Rectangle_Double_A.bin";
//if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
// return E_FAIL;
///* WC_Retangle_Double_A */
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_Retangle_Double_A";
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_Retangle_Double_A.bin";
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
return E_FAIL;
/////* WC_Retangle_Double_A */
//Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_Retangle_Double_A";
//Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_Retangle_Double_A.bin";
//if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
// return E_FAIL;
///* WA_Square_Double_C */
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WA_Square_Double_C";
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WA_Square_Double_C.bin";
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
return E_FAIL;
/////* WA_Square_Double_C */
//Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WA_Square_Double_C";
//Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WA_Square_Double_C.bin";
//if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
// return E_FAIL;
/* Quid_Window_A */
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_Quid_Window_A";
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Quid_Window_A.bin";
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
return E_FAIL;
///* Quid_Window_A */
//Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_Quid_Window_A";
//Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Quid_Window_A.bin";
//if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
// return E_FAIL;
/* Ollivanders_Box_Window */
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_Ollivanders_Box_Window";
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Ollivanders_Box.bin";
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
return E_FAIL;
///* Ollivanders_Box_Window */
//Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_Ollivanders_Box_Window";
//Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Ollivanders_Box.bin";
//if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
// return E_FAIL;
/* WC_L_DoubleS_A */
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_L_DoubleS_A";
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_L_DoubleS_A.bin";
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
return E_FAIL;
///* WC_L_DoubleS_A */
//Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_L_DoubleS_A";
//Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_L_DoubleS_A.bin";
//if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
// return E_FAIL;
/* WC_Round_Double_A */
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_Round_Double_A";
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_Round_Double_A.bin";
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
return E_FAIL;
///* WC_Round_Double_A */
//Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_Round_Double_A";
//Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_Round_Double_A.bin";
//if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
// return E_FAIL;
/* SM_HM_Door1a */
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door1a";
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Door1a.bin";
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
return E_FAIL;
///* SM_HM_Door1a */
//Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door1a";
//Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Door1a.bin";
//if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
// return E_FAIL;
/* SM_HM_Door1a */
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door2b";
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Door2b.bin";
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
return E_FAIL;
///* SM_HM_Door1a */
//Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door2b";
//Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Door2b.bin";
//if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
// return E_FAIL;
return S_OK;
}
File diff suppressed because it is too large Load Diff
+3 -2
View File
@@ -112,9 +112,10 @@ class CEffectObject abstract : public CPartObject
_float3 vPadding1 = {};
_float fPadding0 = {};
_float fPadding1 = {};
_bool isPadding0 = {};
_float isLightTime = { 0.f };
_bool isLightDissolve = {};
_bool isPadding1 = {};
}EFFECT_INFO;
@@ -25,7 +25,7 @@ class CEffect_Container abstract : public CContainerObject
virtual HRESULT Pre_Setting(CGameObject* pObject, void* pArg = nullptr);
HRESULT Load_Package(const _char* pPath);
_uint Get_SkillType() const { return m_iSkillType; }
void Reset_Light();
protected:
virtual HRESULT Initialize_Prototype() override;
@@ -48,7 +48,7 @@ HRESULT CBombardSide::Initialize(void* pArg)
SAFE_ADDREF(m_pWandTrail);
SAFE_ADDREF(m_pWandParticle);
m_fDuration = 2.5f;
m_fDuration = 2.f;
m_Events.emplace(0.6f, [&](){
m_isParticleEnd = true;
+2 -1
View File
@@ -126,7 +126,8 @@ HRESULT CDecendo::Pre_Setting(CGameObject* pObject, void* pArg)
pCircle0->Get_Component<CTransform>()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
pWandLight->Get_Component<CTransform>()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
pCircle0->Set_Visible(true);
pWandLight->Set_Visible(true);
/* 초기 위치 저장 */
_vector vStartPos = m_pOwner->Get_WorldPostion();
@@ -217,9 +217,6 @@
<Filter Include="02.Element\02.Component\07.RigidBody\00.Static">
<UniqueIdentifier>{fda41884-634b-4dd4-8bd2-f6f7ad68ab1f}</UniqueIdentifier>
</Filter>
<Filter Include="02.Element\02.Component\09.Light">
<UniqueIdentifier>{7c82051e-19af-4284-8156-16f504db30b6}</UniqueIdentifier>
</Filter>
<Filter Include="03.Management\03.Light_Manager">
<UniqueIdentifier>{8727e975-e9e2-4b59-9a52-27ad3ad79f2f}</UniqueIdentifier>
</Filter>
@@ -295,6 +292,9 @@
<Filter Include="03.Management\02.Resource_Manager">
<UniqueIdentifier>{685d2cc6-b29a-4018-b72f-d66a2807463d}</UniqueIdentifier>
</Filter>
<Filter Include="02.Element\02.Component\09.Light">
<UniqueIdentifier>{7c82051e-19af-4284-8156-16f504db30b6}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\Private\Base.cpp">
+1 -1
View File
@@ -198,7 +198,7 @@ void CLight::Describe_Entity()
GUI::DragFloat4("Diffuse", reinterpret_cast<float*>(&m_LightDesc.vDiffuse) , 0.01f , 0.f ,1.f);
GUI::ColorEdit4("Diffuse", (_float*)&m_LightDesc.vDiffuse);
GUI::DragFloat4("Ambient", reinterpret_cast<float*>(&m_LightDesc.vAmbient), 0.01f, 0.f, 1.f);
GUI::DragFloat4("Specular", reinterpret_cast<float*>(&m_LightDesc.vSpecular), 0.01f, 0.f, 1.f);
GUI::DragFloat("Range", &m_LightDesc.fRange, 1.f, 0.f);
+3 -3
View File
@@ -42,10 +42,10 @@ class ENGINE_DLL CLight final : public CComponent
m_fAccLightTime += fTimeDelta;
if (m_fAccLightTime >= fTime)
return;
m_fAmbientRatio = 1 - (m_fAccLightTime / fTime);
if (m_fAmbientRatio <= 0)
m_fAmbientRatio = 0;
}
public: