Merge branch 'Develope' into Bloom
This commit is contained in:
@@ -159,6 +159,7 @@ call Update_Shaders.bat
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\Public\Protego.h" />
|
||||
<ClInclude Include="..\Public\Bombard.h" />
|
||||
<ClInclude Include="..\Public\Broom.h" />
|
||||
<ClInclude Include="..\public\BuildingContainer.h" />
|
||||
@@ -179,6 +180,8 @@ call Update_Shaders.bat
|
||||
<ClInclude Include="..\Public\Client_Enum.h" />
|
||||
<ClInclude Include="..\Public\Client_Macro.h" />
|
||||
<ClInclude Include="..\Public\Client_Struct.h" />
|
||||
<ClInclude Include="..\Public\Decendo.h" />
|
||||
<ClInclude Include="..\Public\EffectPool.h" />
|
||||
<ClInclude Include="..\Public\Goblin.h" />
|
||||
<ClInclude Include="..\public\InstancedProp.h" />
|
||||
<ClInclude Include="..\public\MapContainer.h" />
|
||||
@@ -223,6 +226,7 @@ call Update_Shaders.bat
|
||||
<ClInclude Include="targetver.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\Private\Protego.cpp" />
|
||||
<ClCompile Include="..\Private\Bombard.cpp" />
|
||||
<ClCompile Include="..\Private\Broom.cpp" />
|
||||
<ClCompile Include="..\private\BuildingContainer.cpp" />
|
||||
@@ -236,6 +240,8 @@ call Update_Shaders.bat
|
||||
<ClCompile Include="..\Private\Camera_Gaze.cpp" />
|
||||
<ClCompile Include="..\Private\CamPosition.cpp" />
|
||||
<ClCompile Include="..\Private\CamPosition_Arm.cpp" />
|
||||
<ClCompile Include="..\Private\Decendo.cpp" />
|
||||
<ClCompile Include="..\Private\EffectPool.cpp" />
|
||||
<ClCompile Include="..\Private\Goblin.cpp" />
|
||||
<ClCompile Include="..\Private\Goblin_States.cpp" />
|
||||
<ClCompile Include="..\private\InstancedProp.cpp" />
|
||||
|
||||
@@ -184,9 +184,18 @@
|
||||
<ClInclude Include="..\public\Terrain.h">
|
||||
<Filter>02.GameObjects\Environment\Terrain</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\EffectPool.h">
|
||||
<Filter>02.GameObjects\Effect\EffectPool</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Decendo.h">
|
||||
<Filter>02.GameObjects\Effect\Effects\Decendo</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\InstancedProp.h">
|
||||
<Filter>02.GameObjects\Environment\02.InstancedProp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Protego.h">
|
||||
<Filter>02.GameObjects\Effect\Effects\Protego</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Client.ico">
|
||||
@@ -443,9 +452,15 @@
|
||||
<Filter Include="02.GameObjects\Environment\Terrain">
|
||||
<UniqueIdentifier>{7db61780-d774-4a91-a429-2fb7634e43b3}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Effect\EffectPool">
|
||||
<UniqueIdentifier>{bdd4863e-8ab9-4ce8-a88d-9a0c558a67fb}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Environment\02.InstancedProp">
|
||||
<UniqueIdentifier>{4ef15d06-4520-4d55-ab49-1ae7179f145b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Effect\Effects\Protego">
|
||||
<UniqueIdentifier>{37b6e4b9-42fb-4fda-9112-e62ab434bee0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Client.cpp">
|
||||
@@ -619,9 +634,18 @@
|
||||
<ClCompile Include="..\private\Terrain.cpp">
|
||||
<Filter>02.GameObjects\Environment\Terrain</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\EffectPool.cpp">
|
||||
<Filter>02.GameObjects\Effect\EffectPool</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Decendo.cpp">
|
||||
<Filter>02.GameObjects\Effect\Effects\Decendo</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\InstancedProp.cpp">
|
||||
<Filter>02.GameObjects\Environment\02.InstancedProp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Protego.cpp">
|
||||
<Filter>02.GameObjects\Effect\Effects\Protego</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Client.rc">
|
||||
|
||||
@@ -31,28 +31,16 @@ HRESULT CBombard::Initialize(void* pArg)
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_Child()))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Load_Directory("../Bin/Resources/Data/Effect/Bombard/")))
|
||||
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Bombard")))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
m_wstrEffectName = L"Bombard";
|
||||
|
||||
CPartObject* pShootPt = Get_PartObject<CEffectParts>("Bombard_Shoot_Pt");
|
||||
m_pLight_Projectile = Get_PartObject<CEffectParts>("Bombard_Projectile");
|
||||
CPartObject* pCircle0 = Get_PartObject<CEffectParts>("Bombard_Circle0");
|
||||
|
||||
pShootPt->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
m_pLight_Projectile->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
pCircle0->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
|
||||
pCircle0->Set_Visible(true);
|
||||
pShootPt->Set_Visible(true);
|
||||
m_pLight_Projectile->Set_Visible(true);
|
||||
|
||||
SAFE_ADDREF(m_pLight_Projectile);
|
||||
|
||||
m_fDuration = 2.5f;
|
||||
|
||||
return S_OK;
|
||||
@@ -73,7 +61,7 @@ void CBombard::Update(_float fTimeDelta)
|
||||
|
||||
Update_Event(fTimeDelta);
|
||||
|
||||
_vector vOwnerLook = m_pOwner->Get_Component<CTransform>()->Get_State(STATE::LOOK);
|
||||
_vector vOwnerLook = m_pOwner->Get_Component<CTransform>()->Get_State(STATE::LOOK);
|
||||
|
||||
m_pLight_Projectile->Get_Component<CTransform>()->Translation(vOwnerLook * 2.f);
|
||||
}
|
||||
@@ -88,6 +76,44 @@ void CBombard::Late_Update(_float fTimeDelta)
|
||||
|
||||
}
|
||||
|
||||
HRESULT CBombard::Pre_Setting(CGameObject* pObject)
|
||||
{
|
||||
if (pObject == nullptr)
|
||||
return E_FAIL;
|
||||
|
||||
m_pOwner = pObject;
|
||||
|
||||
if (FAILED(Ready_Child()))
|
||||
return E_FAIL;
|
||||
|
||||
Reset_EffectParts();
|
||||
|
||||
m_fAccTime = 0.f;
|
||||
__super::m_fAccTime = 0.f;
|
||||
m_fPreAccTime = 0.f;
|
||||
|
||||
|
||||
|
||||
CPartObject* pShootPt = Get_PartObject<CEffectParts>("Bombard_Shoot_Pt");
|
||||
|
||||
CPartObject* pCircle0 = Get_PartObject<CEffectParts>("Bombard_Circle0");
|
||||
|
||||
pShootPt->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
m_pLight_Projectile->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
pCircle0->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
|
||||
pCircle0->Set_Visible(true);
|
||||
pShootPt->Set_Visible(true);
|
||||
|
||||
m_pLight_Projectile->Set_Visible(true);
|
||||
|
||||
|
||||
m_bVisible = true;
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CBombard::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
@@ -102,6 +128,10 @@ HRESULT CBombard::Ready_Child()
|
||||
CPhysXEffectHitBox::PHYSXDUMMY_DESC Desc{};
|
||||
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
|
||||
XMStoreFloat3(&Desc.vPos, m_pOwner->Get_WorldPostion() + XMVectorSet(0.f, 0.f, 1.f, 0.f));
|
||||
|
||||
|
||||
_vector vOwnerLook = m_pOwner->Get_Component<CTransform>()->Get_State(STATE::LOOK);
|
||||
|
||||
_float3 vDir = {};
|
||||
@@ -109,14 +139,13 @@ HRESULT CBombard::Ready_Child()
|
||||
XMStoreFloat3(&Desc.vPos, m_pOwner->Get_WorldPostion() + XMVectorSet(0.f, 0.f, 1.f, 0.f));
|
||||
|
||||
XMStoreFloat3(&vDir, vOwnerLook * 2.f);
|
||||
|
||||
|
||||
Desc.vRotRPY = { 0.f, 0.f, 0.f };
|
||||
Desc.iSubKind = 70;
|
||||
Desc.vDeltaPos = vDir;
|
||||
Desc.vLifeTime = { 0.f, 2.f };
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CPhysXEffectHitBox>(g_iStaticLevel, CURRENT_LEVEL, LAYER_HITBOX, &Desc, this , &m_pPhysHitBox))) {
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CPhysXEffectHitBox>(g_iStaticLevel, CURRENT_LEVEL, LAYER_HITBOX, &Desc, this, &m_pPhysHitBox))) {
|
||||
assert(false);
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -151,10 +180,10 @@ CGameObject* CBombard::Clone(void* pArg, CGameObject* pOwner)
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CBombard::OnCollision(CGameObject* pOther , void* pDesc)
|
||||
void CBombard::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
{
|
||||
//CTransform* pOtherTransform = p
|
||||
ON_COLLISION_INFO* CollisionDesc = static_cast<ON_COLLISION_INFO*>(pDesc);
|
||||
ON_COLLISION_INFO* CollisionDesc = static_cast<ON_COLLISION_INFO*>(pDesc);
|
||||
|
||||
for (auto& pPair : m_PartObjects)
|
||||
{
|
||||
@@ -164,7 +193,7 @@ void CBombard::OnCollision(CGameObject* pOther , void* pDesc)
|
||||
|
||||
|
||||
m_pLight_Projectile->Set_Visible(false);
|
||||
Get_PartObject<CEffectParts>("Bombard_Shoot_Pt")->Set_Visible(false);
|
||||
Get_PartObject<CEffectParts>("Bombard_Shoot_Pt")->Set_Visible(false);
|
||||
|
||||
_vector vOwnerLook = m_pOwner->Get_Component<CTransform>()->Get_State(STATE::LOOK);
|
||||
Get_PartObject<CEffectParts>("Bombard_Smoke")->Get_Component<CTransform>()->Translation(vOwnerLook);
|
||||
@@ -185,13 +214,11 @@ void CBombard::Free()
|
||||
SAFE_RELEASE(m_pLight_Projectile);
|
||||
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CBombard::Describe_Entity()
|
||||
{
|
||||
|
||||
}
|
||||
#endif // _DEBUG
|
||||
|
||||
HRESULT CBombard::Bind_ShaderResources()
|
||||
{
|
||||
|
||||
@@ -0,0 +1,271 @@
|
||||
#include "pch.h"
|
||||
#include "Decendo.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "EffectParts.h"
|
||||
#include "PhysXEffectHitBox.h"
|
||||
#include "TrailObject.h"
|
||||
|
||||
|
||||
CDecendo::CDecendo(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CEffect_Container{ pDevice, pContext }
|
||||
{
|
||||
}
|
||||
|
||||
CDecendo::CDecendo(const CDecendo& rhs)
|
||||
: CEffect_Container(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CDecendo::Initialize_Prototype()
|
||||
{
|
||||
|
||||
return S_OK;
|
||||
|
||||
}
|
||||
|
||||
HRESULT CDecendo::Initialize(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Decendo")))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
m_wstrEffectName = L"Decendo";
|
||||
|
||||
m_pProjectile_Blur = Get_PartObject<CEffectParts>("Decendo_Proj_Blur");
|
||||
m_pProjectile = Get_PartObject<CEffectParts>("Decendo_Proj");
|
||||
|
||||
SAFE_ADDREF(m_pProjectile_Blur);
|
||||
SAFE_ADDREF(m_pProjectile);
|
||||
|
||||
m_fDuration = 2.5f;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CDecendo::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
|
||||
}
|
||||
|
||||
void CDecendo::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
|
||||
Update_Event(fTimeDelta);
|
||||
|
||||
m_pProjectile_Blur->Get_Component<CTransform>()->Translation(m_vOwnerLook * 0.5f);
|
||||
m_pProjectile->Get_Component<CTransform>()->Translation(m_vOwnerLook * 0.5f);
|
||||
|
||||
|
||||
|
||||
if (m_fAccTime > XM_2PI)
|
||||
return;
|
||||
|
||||
m_fAccTime += fTimeDelta * 7.5f;
|
||||
|
||||
m_pProjectile_Blur->Get_Component<CTransform>()->Translation(m_vRotateUp * 0.2f * sinf(m_fAccTime));
|
||||
m_pProjectile->Get_Component<CTransform>()->Translation(m_vRotateUp * 0.2f * sinf(m_fAccTime));
|
||||
}
|
||||
|
||||
void CDecendo::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
Get_PartObject<CTrailObject>()->Trail_Update(m_pProjectile->Get_Component<CTransform>()->Get_XMWorldMatrix(), fTimeDelta);
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
HRESULT CDecendo::Pre_Setting(CGameObject* pObject)
|
||||
{
|
||||
if (pObject == nullptr)
|
||||
return E_FAIL;
|
||||
|
||||
/* 부모 할당 */
|
||||
m_pOwner = pObject;
|
||||
|
||||
/* 피직스 생성*/
|
||||
if (FAILED(Ready_Child()))
|
||||
return E_FAIL;
|
||||
|
||||
/* 초기 셋팅 초기화 */
|
||||
Reset_EffectParts();
|
||||
m_fAccTime = 0.f;
|
||||
__super::m_fAccTime = 0.f;
|
||||
m_fPreAccTime = 0.f;
|
||||
|
||||
|
||||
CPartObject* pCircle0 = m_PartObjects.begin()->second;
|
||||
|
||||
/* 초기 객체 위치 초기화 */
|
||||
pCircle0->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
m_pProjectile->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
m_pProjectile_Blur->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
|
||||
/* 초기 객체 비지블 */
|
||||
pCircle0->Set_Visible(true);
|
||||
m_pProjectile->Set_Visible(true);
|
||||
m_pProjectile_Blur->Set_Visible(true);
|
||||
|
||||
/*트레일 초기화 */
|
||||
Get_PartObject<CTrailObject>()->Set_Visible(true);
|
||||
Get_PartObject<CTrailObject>()->Get_Component<CTrail>()->Reset_Trail();
|
||||
|
||||
|
||||
//나아가는 벡터와 한점을 가져와 수직인 평면상에 하나의 점으로 DIR 을 만듬
|
||||
m_vOwnerLook = XMVector3Normalize(m_pOwner->Get_Component<CTransform>()->Get_State(STATE::LOOK));
|
||||
_vector vUp = XMVectorSet(0.f, 1.f, 0.f, 0.f);
|
||||
|
||||
|
||||
_vector vQuaternion = XMQuaternionRotationAxis(m_vOwnerLook, m_pGameInstance->Random_Float(0.f, XM_PIDIV2));
|
||||
|
||||
m_vRotateUp = XMVector3Rotate(vUp, vQuaternion);
|
||||
|
||||
m_vRotateUp = XMVector3Normalize(m_vRotateUp);
|
||||
|
||||
m_bVisible = true;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDecendo::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDecendo::Ready_Child()
|
||||
{
|
||||
CPhysXEffectHitBox::PHYSXDUMMY_DESC Desc{};
|
||||
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
|
||||
XMStoreFloat3(&Desc.vPos, m_pOwner->Get_WorldPostion() + XMVectorSet(0.f, 0.f, 1.f, 0.f));
|
||||
|
||||
_vector vOwnerLook = m_pOwner->Get_Component<CTransform>()->Get_State(STATE::LOOK);
|
||||
|
||||
_float3 vDir = {};
|
||||
|
||||
XMStoreFloat3(&Desc.vPos, m_pOwner->Get_WorldPostion() + XMVectorSet(0.f, 0.f, 1.f, 0.f));
|
||||
|
||||
XMStoreFloat3(&vDir , vOwnerLook * 0.5f);
|
||||
|
||||
Desc.vRotRPY = { 0.f, 0.f, 0.f };
|
||||
Desc.iSubKind = 70;
|
||||
Desc.vDeltaPos = vDir ;
|
||||
Desc.vLifeTime = { 0.f, 1.f };
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CPhysXEffectHitBox>(g_iStaticLevel, CURRENT_LEVEL, LAYER_HITBOX, &Desc, this , &m_pPhysHitBox))) {
|
||||
assert(false);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CDecendo* CDecendo::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CDecendo* pInstance = new CDecendo(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CDecendo");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
|
||||
CGameObject* CDecendo::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CDecendo* pInstance = new CDecendo(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CDecendo");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CDecendo::OnCollision(CGameObject* pOther , void* pDesc)
|
||||
{
|
||||
//CTransform* pOtherTransform = p
|
||||
ON_COLLISION_INFO* CollisionDesc = static_cast<ON_COLLISION_INFO*>(pDesc);
|
||||
|
||||
|
||||
for (auto& pPair : m_PartObjects)
|
||||
{
|
||||
pPair.second->Set_Visible(true);
|
||||
pPair.second->Get_Component<CTransform>()->Set_State(STATE::POSITION, CollisionDesc->vWorldPos);
|
||||
}
|
||||
|
||||
|
||||
|
||||
m_pProjectile_Blur->Set_Visible(false);
|
||||
m_pProjectile->Set_Visible(false);
|
||||
|
||||
|
||||
|
||||
_vector vPlayerPos = m_pOwner->Get_Component<CTransform>()->Get_State(STATE::POSITION);
|
||||
|
||||
Get_PartObject<CEffectParts>("Decendo_Down")->Get_Component<CTransform>()->LookAt(vPlayerPos);
|
||||
Get_PartObject<CEffectParts>("Decendo_Smoke")->Get_Component<CTransform>()->LookAt(vPlayerPos);
|
||||
|
||||
m_PartObjects.begin()->second->Set_Visible(false);
|
||||
|
||||
Get_PartObject<CTrailObject>()->Get_Component<CTransform>()->Set_State(STATE::POSITION, XMVectorSet(0.f, 0.f, 0.f, 1.f));
|
||||
Get_PartObject<CTrailObject>()->Set_Visible(false);
|
||||
|
||||
m_pPhysHitBox->Set_Dead();
|
||||
}
|
||||
|
||||
void CDecendo::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
//if(m_pPhysHitBox != nullptr)
|
||||
// if (m_pPhysHitBox->Get_Depth() == false)
|
||||
// SAFE_RELEASE(m_pPhysHitBox);
|
||||
|
||||
SAFE_RELEASE(m_pProjectile_Blur);
|
||||
SAFE_RELEASE(m_pProjectile);
|
||||
|
||||
}
|
||||
|
||||
void CDecendo::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("VALUE");
|
||||
|
||||
_float4 vValue = {};
|
||||
|
||||
if (GUI::InputFloat("TurnValue", (_float*)&m_fTurnValue))
|
||||
{
|
||||
}
|
||||
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
HRESULT CDecendo::Bind_ShaderResources()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,11 +47,6 @@ HRESULT CEffectObject::Render()
|
||||
if (FAILED(m_pInstance_ModelCom->Bind_CS_Output(5, 1)))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (FAILED(m_pInstance_ModelCom->Render(i)))
|
||||
{
|
||||
return E_FAIL;
|
||||
@@ -77,9 +72,6 @@ HRESULT CEffectObject::Render_Blur()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
SHADER_PASS_INSTANCE_MODEL BlurPass = {};
|
||||
|
||||
if (m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::NON_WORLD)
|
||||
@@ -110,7 +102,6 @@ HRESULT CEffectObject::Render_Blur()
|
||||
|
||||
}
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -400,6 +391,7 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
|
||||
|
||||
|
||||
|
||||
|
||||
HRESULT CEffectObject::Bind_ShaderResources()
|
||||
{
|
||||
|
||||
@@ -479,6 +471,21 @@ HRESULT CEffectObject::Bind_ShaderResources()
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_isDiffuseBlur", &m_EffectInfo.isDiffuseBlur, sizeof(_bool)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_isMaskBlur", &m_EffectInfo.isMaskBlur, sizeof(_bool)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_isBlurDissolve", &m_EffectInfo.isBlurDissolve, sizeof(_bool)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_isBlurReverseDissolve", &m_EffectInfo.isBlurReverseDissolve, sizeof(_bool)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vColor", &m_EffectInfo.vColor, sizeof(_float4)))) {
|
||||
return E_FAIL;
|
||||
@@ -574,6 +581,11 @@ HRESULT CEffectObject::Bind_ShaderResources()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fBluringStrength", &m_EffectInfo.fBluringStrength, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (m_pDiffuse_TextureCom != nullptr)
|
||||
{
|
||||
@@ -625,6 +637,7 @@ HRESULT CEffectObject::Bind_ShaderResources()
|
||||
|
||||
|
||||
return S_OK;
|
||||
|
||||
}
|
||||
|
||||
HRESULT CEffectObject::Ready_Components(void* pArg)
|
||||
|
||||
@@ -64,17 +64,24 @@ void CEffectParts::Late_Update(_float fTimeDelta)
|
||||
if (m_pInstance_ModelCom == nullptr)
|
||||
return;
|
||||
|
||||
if (m_EffectInfo.isBillboard)
|
||||
m_pGameInstance->BillBoard(m_pTransformCom);
|
||||
|
||||
|
||||
if (m_EffectInfo.isBlur == true)
|
||||
{
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::BLUR, this);
|
||||
}
|
||||
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::EFFECT, this);
|
||||
if (m_EffectInfo.isOnlyBlur == true)
|
||||
return;
|
||||
|
||||
m_pGameInstance->Add_RenderGroup(m_EffectInfo.eRenderOrder, this);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
HRESULT CEffectParts::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg)))
|
||||
|
||||
@@ -0,0 +1,242 @@
|
||||
#include "pch.h"
|
||||
#include "EffectPool.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "Camera_Debug.h"
|
||||
#include "Effect_Container.h"
|
||||
#include "Bombard.h"
|
||||
#include "NomalJap.h"
|
||||
#include "Decendo.h"
|
||||
#include "Protego.h"
|
||||
|
||||
CEffectPool::CEffectPool(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CGameObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CEffectPool::CEffectPool(const CEffectPool& Prototype)
|
||||
: CGameObject(Prototype)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CEffectPool::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CEffectPool::Initialize(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(Ready_Components()))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_Effect()))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CEffectPool::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
for (auto iter = m_ActiveEffectList.begin(); iter != m_ActiveEffectList.end(); )
|
||||
{
|
||||
if (false == (*iter)->Get_Visible())
|
||||
{
|
||||
//SAFE_RELEASE(*iter);
|
||||
//iter = m_ActiveEffectList.erase(iter);
|
||||
}
|
||||
else
|
||||
{
|
||||
(*iter)->Priority_Update(fTimeDelta);
|
||||
++iter;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CEffectPool::Update(_float fTimeDelta)
|
||||
{
|
||||
for (auto iter = m_ActiveEffectList.begin() ; iter != m_ActiveEffectList.end(); )
|
||||
{
|
||||
if (false == (*iter)->Get_Visible())
|
||||
{
|
||||
//SAFE_RELEASE(*iter);
|
||||
//iter = m_ActiveEffectList.erase(iter);
|
||||
}
|
||||
else
|
||||
{
|
||||
(*iter)->Update(fTimeDelta);
|
||||
++iter;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CEffectPool::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
for (auto iter = m_ActiveEffectList.begin(); iter != m_ActiveEffectList.end(); )
|
||||
{
|
||||
if (false == (*iter)->Get_Visible())
|
||||
{
|
||||
SAFE_RELEASE(*iter);
|
||||
iter = m_ActiveEffectList.erase(iter);
|
||||
}
|
||||
else
|
||||
{
|
||||
(*iter)->Late_Update(fTimeDelta);
|
||||
++iter;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CEffectPool::Render()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
HRESULT CEffectPool::Ready_Components()
|
||||
{
|
||||
__super::Ready_Components(nullptr);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CEffectPool::Bind_ShaderResources()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CEffectPool::Ready_Effect()
|
||||
{
|
||||
|
||||
if(FAILED(Create_Effect(SKILL_TYPE::JAP, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CNomalJap* pEffect = nullptr;
|
||||
|
||||
pEffect = m_pGameInstance->Clone_Prototype<CNomalJap>(iPrototypeLevel, nullptr);
|
||||
|
||||
return pEffect;}
|
||||
))) return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::BOMBARD, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* {
|
||||
|
||||
CBombard* pEffect = nullptr;
|
||||
|
||||
pEffect = m_pGameInstance->Clone_Prototype<CBombard>(iPrototypeLevel, nullptr);
|
||||
|
||||
return pEffect;}
|
||||
))) return E_FAIL;
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::DESCENDO, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* {
|
||||
|
||||
CDecendo* pEffect = nullptr;
|
||||
|
||||
pEffect = m_pGameInstance->Clone_Prototype<CDecendo>(iPrototypeLevel, nullptr);
|
||||
|
||||
return pEffect;}
|
||||
))) return E_FAIL;
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::PROTEGO, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* {
|
||||
|
||||
CProtego* pEffect = nullptr;
|
||||
|
||||
pEffect = m_pGameInstance->Clone_Prototype<CProtego>(iPrototypeLevel, nullptr);
|
||||
|
||||
return pEffect; }
|
||||
))) return E_FAIL;
|
||||
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CEffectPool::Create_Effect(SKILL_TYPE eType, _uint iNumEffect, _uint iPrototypeLevel, _uint iCloneLevel, function<CEffect_Container* (_uint, _uint)> AddPrototypeEvent)
|
||||
{
|
||||
for (_uint i = 0; i < iNumEffect; i++)
|
||||
{
|
||||
CEffect_Container* pEffect_Container = AddPrototypeEvent(iPrototypeLevel, iCloneLevel);
|
||||
|
||||
if (pEffect_Container == nullptr)
|
||||
return E_FAIL;
|
||||
|
||||
m_EffectList[ENUM_CLASS(eType)].push_back(pEffect_Container);
|
||||
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CEffectPool::Use_Skill(SKILL_TYPE eType, CGameObject* pOwner)
|
||||
{
|
||||
if (pOwner == nullptr)
|
||||
return S_OK;
|
||||
|
||||
for (auto& pSkill : m_EffectList[ENUM_CLASS(eType)])
|
||||
{
|
||||
if (pSkill->Get_Visible() == true)
|
||||
continue;
|
||||
|
||||
pSkill->Pre_Setting(pOwner);
|
||||
|
||||
m_ActiveEffectList.push_back(pSkill);
|
||||
Safe_AddRef(pSkill);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
CEffectPool* CEffectPool::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CEffectPool* pInstance = new CEffectPool(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CEffectPool");
|
||||
Safe_Release(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CEffectPool::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CEffectPool* pInstance = new CEffectPool(*this);
|
||||
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CEffectPool");
|
||||
Safe_Release(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void CEffectPool::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
for (size_t i = 0; i < ENUM_CLASS(SKILL_TYPE::END); i++)
|
||||
{
|
||||
for (auto& pEffect : m_EffectList[i])
|
||||
{
|
||||
SAFE_RELEASE(pEffect);
|
||||
}
|
||||
}
|
||||
|
||||
for (auto& pEffect : m_ActiveEffectList)
|
||||
{
|
||||
SAFE_RELEASE(pEffect);
|
||||
}
|
||||
}
|
||||
|
||||
void CEffectPool::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -34,6 +34,8 @@ HRESULT CEffect_Container::Initialize(void* pArg)
|
||||
if (FAILED(Ready_Child()))
|
||||
return E_FAIL;
|
||||
|
||||
Set_Visible(false);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -132,6 +134,27 @@ HRESULT CEffect_Container::Ready_Components(void* pArg)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CEffect_Container::Pre_Setting(CGameObject* pObject)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CEffect_Container::Reset_EffectParts()
|
||||
{
|
||||
for (auto& iter : m_PartObjects)
|
||||
{
|
||||
CInstance_Model* pInstanceModel = iter.second->Get_Component<CInstance_Model>();
|
||||
|
||||
if (pInstanceModel == nullptr)
|
||||
continue;
|
||||
|
||||
pInstanceModel->Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
HRESULT CEffect_Container::Ready_Child()
|
||||
{
|
||||
|
||||
@@ -175,6 +198,11 @@ void CEffect_Container::Update_Event(_float fTimeDelta)
|
||||
}
|
||||
else
|
||||
{
|
||||
for (auto& pPart : m_PartObjects)
|
||||
{
|
||||
pPart.second->Set_Visible(false);
|
||||
}
|
||||
|
||||
m_bVisible = false;
|
||||
}
|
||||
}
|
||||
@@ -190,3 +218,146 @@ void CEffect_Container::Update_Event(_float fTimeDelta)
|
||||
|
||||
|
||||
}
|
||||
HRESULT CEffect_Container::Load_Package(const _char* pPath)
|
||||
{
|
||||
|
||||
_string strPerfectFilePath = pPath;
|
||||
|
||||
strPerfectFilePath += ".bin";
|
||||
|
||||
HANDLE hFile = CreateFileW(
|
||||
CMyTools::ToWstring(strPerfectFilePath).c_str(), // 파일 이름
|
||||
GENERIC_READ, // 읽기 모드
|
||||
FILE_SHARE_READ, // 다른 프로세스도 읽기 가능
|
||||
NULL,
|
||||
OPEN_EXISTING, // 기존 파일 열기
|
||||
FILE_ATTRIBUTE_NORMAL,
|
||||
NULL
|
||||
);
|
||||
|
||||
|
||||
if (hFile == INVALID_HANDLE_VALUE) {
|
||||
MessageBox(NULL, L"오브젝트 읽기 실패", L"System Message", MB_OK);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
// 나중에 패키징할때 패스를 저장할거임
|
||||
|
||||
|
||||
DWORD dwByte(0);
|
||||
|
||||
_int iEffectCount = {};
|
||||
|
||||
if (!ReadFile(hFile, &iEffectCount, sizeof(_int), &dwByte, nullptr)) {
|
||||
CloseHandle(hFile);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
for (_int i = 0; i < iEffectCount; i++)
|
||||
{
|
||||
size_t iComponentLength = {};
|
||||
_char szName[MAX_PATH] = {};
|
||||
|
||||
if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) {
|
||||
CloseHandle(hFile);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (iComponentLength != 0)
|
||||
{
|
||||
if (!ReadFile(hFile, szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) {
|
||||
CloseHandle(hFile);
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
_string strEffectPath = szName;
|
||||
_string strExt = {};
|
||||
_string strEffectName = {};
|
||||
|
||||
size_t iPos = strEffectPath.rfind('.'); // 뒤에서부터 '/' 검색
|
||||
|
||||
if (iPos != std::string::npos)
|
||||
{
|
||||
strExt += strEffectPath.substr(iPos + 1);
|
||||
strEffectName = strEffectPath.substr(0, iPos);
|
||||
}
|
||||
|
||||
size_t pos = strEffectName.rfind('\\'); // 뒤에서부터 '/' 검색
|
||||
|
||||
if (pos != std::string::npos)
|
||||
strEffectName = strEffectName.substr(pos + 1);
|
||||
|
||||
if (!strcmp(strExt.c_str(), "trail"))
|
||||
{
|
||||
CTrailObject* pTrail = nullptr;
|
||||
|
||||
CPartObject::PARTOBJECT_DESC PartsDesc{};
|
||||
|
||||
PartsDesc.pParentTransform = m_pTransformCom;
|
||||
|
||||
if (FAILED(Add_PartObject<CTrailObject>(strEffectName, g_iStaticLevel, &pTrail, &PartsDesc))) {
|
||||
assert(false);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
/*이펙트 로드 로드*/
|
||||
size_t iPos = {};
|
||||
|
||||
while ((iPos = strEffectPath.find(".trail")) != std::string::npos) {
|
||||
strEffectPath.erase(iPos, 6);
|
||||
};
|
||||
|
||||
|
||||
if (FAILED(pTrail->Load_Trail(strEffectPath.c_str(), static_cast<LEVEL>(NEXT_LEVEL))))
|
||||
{
|
||||
Safe_Release(pTrail);
|
||||
continue;
|
||||
}
|
||||
|
||||
Safe_Release(pTrail);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////
|
||||
|
||||
CEffectParts* pEffectPart = nullptr;
|
||||
|
||||
CPartObject::PARTOBJECT_DESC PartsDesc{};
|
||||
|
||||
PartsDesc.pParentTransform = m_pTransformCom;
|
||||
|
||||
/*이펙트 껍데기 생성*/
|
||||
|
||||
if (FAILED(Add_PartObject<CEffectParts>(strEffectName, g_iStaticLevel, &pEffectPart, &PartsDesc))) {
|
||||
assert(false);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/*이펙트 로드 로드*/
|
||||
size_t iPosition = {};
|
||||
_string strFilePath = strEffectPath;
|
||||
|
||||
while ((iPosition = strFilePath.find(".bin")) != std::string::npos) {
|
||||
strFilePath.erase(iPosition, 4);
|
||||
};
|
||||
|
||||
|
||||
if (FAILED(pEffectPart->Load(strFilePath.c_str(), static_cast<LEVEL>(NEXT_LEVEL))))
|
||||
{
|
||||
Safe_Release(pEffectPart);
|
||||
continue;
|
||||
}
|
||||
|
||||
Safe_Release(pEffectPart);
|
||||
|
||||
}
|
||||
|
||||
CloseHandle(hFile);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "Dummy_PhysXPlayable.h"
|
||||
#include "Goblin.h"
|
||||
#include "Terrain.h"
|
||||
#include "EffectPool.h"
|
||||
#include "InstancedProp.h"
|
||||
|
||||
CLevel_GamePlay::CLevel_GamePlay(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
|
||||
@@ -37,6 +38,9 @@ HRESULT CLevel_GamePlay::Initialize(void* pArg)
|
||||
if (FAILED(Ready_Layer_UI(LAYER_UI))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Reday_Layer_EffectPool())) { //플레이어보다 먼저 생성해야함!
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Layer_Player(LAYER_PLAYER))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -47,6 +51,7 @@ HRESULT CLevel_GamePlay::Initialize(void* pArg)
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -216,6 +221,15 @@ HRESULT CLevel_GamePlay::Ready_Layer_Monster()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLevel_GamePlay::Reday_Layer_EffectPool()
|
||||
{
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CEffectPool>(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_EffectPool")))) //플레이어보다 먼저 생성해야함!
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
pair<CLevel*, function<void()>> CLevel_GamePlay::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID, void* pArg)
|
||||
{
|
||||
CLevel_GamePlay* pInstance = new CLevel_GamePlay(pDevice, pContext, eLevelID);
|
||||
|
||||
@@ -33,9 +33,14 @@
|
||||
|
||||
#include "EffectParts.h"
|
||||
#include "Bombard.h"
|
||||
#include "Decendo.h"
|
||||
#include "NomalJap.h"
|
||||
#include "Protego.h"
|
||||
|
||||
#include "TrailObject.h"
|
||||
#include "Instance_Model.h"
|
||||
#include "Trail.h"
|
||||
#include "EffectPool.h"
|
||||
|
||||
#pragma endregion
|
||||
|
||||
@@ -366,6 +371,21 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CDecendo>(NEXT_LEVEL, CDecendo::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CNomalJap>(NEXT_LEVEL, CNomalJap::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CProtego>(NEXT_LEVEL, CProtego::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CEffectPool>(g_iStaticLevel, CEffectPool::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
m_strMessage = TEXT("Model Loading..");
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "GameInstance.h"
|
||||
#include "EffectParts.h"
|
||||
#include "PhysXEffectHitBox.h"
|
||||
#include "TrailObject.h"
|
||||
|
||||
|
||||
CNomalJap::CNomalJap(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
@@ -32,13 +33,18 @@ HRESULT CNomalJap::Initialize(void* pArg)
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_Child()))
|
||||
return E_FAIL;
|
||||
|
||||
m_wstrEffectName = L"Nomal_Jap";
|
||||
|
||||
m_PartObjects.begin()->second->Set_Visible(true);
|
||||
m_PartObjects.begin()->second->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Jap")))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
m_pProjectile_Side = Get_PartObject<CEffectParts>("JapProjSide");
|
||||
m_pProjectile = Get_PartObject<CEffectParts>("JapProjCircle");
|
||||
|
||||
SAFE_ADDREF(m_pProjectile);
|
||||
SAFE_ADDREF(m_pProjectile_Side);
|
||||
|
||||
m_fDuration = 5.f;
|
||||
|
||||
@@ -52,12 +58,26 @@ void CNomalJap::Priority_Update(_float fTimeDelta)
|
||||
|
||||
void CNomalJap::Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
|
||||
Update_Event(fTimeDelta);
|
||||
|
||||
m_pProjectile_Side->Get_Component<CTransform>()->Translation(m_vOwnerLook * 1.2f);
|
||||
m_pProjectile->Get_Component<CTransform>()->Translation(m_vOwnerLook * 1.2f);
|
||||
|
||||
|
||||
|
||||
if (m_fAccTime > XM_2PI)
|
||||
return;
|
||||
|
||||
m_fAccTime += fTimeDelta * 15.f;
|
||||
|
||||
m_pProjectile_Side->Get_Component<CTransform>()->Translation(m_vRotateUp * 0.6f * sinf(m_fAccTime));
|
||||
m_pProjectile->Get_Component<CTransform>()->Translation(m_vRotateUp * 0.6f * sinf(m_fAccTime));
|
||||
}
|
||||
|
||||
void CNomalJap::Late_Update(_float fTimeDelta)
|
||||
@@ -65,9 +85,60 @@ void CNomalJap::Late_Update(_float fTimeDelta)
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
Get_PartObject<CTrailObject>()->Trail_Update(m_pProjectile->Get_Component<CTransform>()->Get_XMWorldMatrix(), fTimeDelta);
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
HRESULT CNomalJap::Pre_Setting(CGameObject* pObject)
|
||||
{
|
||||
if (pObject == nullptr)
|
||||
return E_FAIL;
|
||||
|
||||
/* 부모 할당 */
|
||||
m_pOwner = pObject;
|
||||
|
||||
/* 피직스 생성*/
|
||||
if (FAILED(Ready_Child()))
|
||||
return E_FAIL;
|
||||
|
||||
/* 초기 셋팅 초기화 */
|
||||
Reset_EffectParts();
|
||||
m_fAccTime = 0.f;
|
||||
__super::m_fAccTime = 0.f;
|
||||
m_fPreAccTime = 0.f;
|
||||
|
||||
|
||||
/* 초기 객체 위치 초기화 */
|
||||
m_pProjectile->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
m_pProjectile_Side->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
|
||||
/* 초기 객체 비지블 */
|
||||
m_pProjectile->Set_Visible(true);
|
||||
m_pProjectile_Side->Set_Visible(true);
|
||||
|
||||
/*트레일 초기화 */
|
||||
Get_PartObject<CTrailObject>()->Set_Visible(true);
|
||||
|
||||
Get_PartObject<CTrailObject>()->Get_Component<CTrail>()->Reset_Trail();
|
||||
|
||||
|
||||
//나아가는 벡터와 한점을 가져와 수직인 평면상에 하나의 점으로 DIR 을 만듬
|
||||
m_vOwnerLook = XMVector3Normalize(m_pOwner->Get_Component<CTransform>()->Get_State(STATE::LOOK));
|
||||
_vector vUp = XMVectorSet(0.f, 1.f, 0.f, 0.f);
|
||||
|
||||
|
||||
_vector vQuaternion = XMQuaternionRotationAxis(m_vOwnerLook, m_pGameInstance->Random_Float(0.f, XM_PIDIV2));
|
||||
|
||||
m_vRotateUp = XMVector3Rotate(vUp, vQuaternion);
|
||||
|
||||
m_vRotateUp = XMVector3Normalize(m_vRotateUp);
|
||||
|
||||
m_bVisible = true;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CNomalJap::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
@@ -85,12 +156,22 @@ HRESULT CNomalJap::Ready_Child()
|
||||
|
||||
XMStoreFloat3(&Desc.vPos, m_pOwner->Get_WorldPostion() + XMVectorSet(0.f, 0.f, 1.f, 0.f));
|
||||
|
||||
|
||||
_vector vOwnerLook = m_pOwner->Get_Component<CTransform>()->Get_State(STATE::LOOK);
|
||||
|
||||
_float3 vDir = {};
|
||||
|
||||
XMStoreFloat3(&Desc.vPos, m_pOwner->Get_WorldPostion() + XMVectorSet(0.f, 0.f, 1.f, 0.f));
|
||||
|
||||
XMStoreFloat3(&vDir, vOwnerLook * 0.6f);
|
||||
|
||||
|
||||
Desc.vRotRPY = { 0.f, 0.f, 0.f };
|
||||
Desc.iSubKind = 70;
|
||||
Desc.vDeltaPos = { 0.f, 0.f, 2.f };
|
||||
Desc.vLifeTime = { 0.f, 2.f };
|
||||
Desc.vDeltaPos = vDir;
|
||||
Desc.vLifeTime = { 0.f, 1.f };
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CPhysXEffectHitBox>(g_iStaticLevel, CURRENT_LEVEL, LAYER_HITBOX, &Desc, this , &m_pPhysHitBox))) {
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CPhysXEffectHitBox>(g_iStaticLevel, CURRENT_LEVEL, LAYER_HITBOX, &Desc, this, &m_pPhysHitBox))) {
|
||||
assert(false);
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -125,18 +206,25 @@ CGameObject* CNomalJap::Clone(void* pArg, CGameObject* pOwner)
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CNomalJap::OnCollision(CGameObject* pOther , void* pDesc)
|
||||
void CNomalJap::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
{
|
||||
//CTransform* pOtherTransform = p
|
||||
ON_COLLISION_INFO* CollisionDesc = static_cast<ON_COLLISION_INFO*>(pDesc);
|
||||
ON_COLLISION_INFO* CollisionDesc = static_cast<ON_COLLISION_INFO*>(pDesc);
|
||||
|
||||
for (auto& pPair : m_PartObjects)
|
||||
{
|
||||
|
||||
pPair.second->Set_Visible(true);
|
||||
pPair.second->Get_Component<CTransform>()->Set_State(STATE::POSITION, CollisionDesc->vWorldPos);
|
||||
}
|
||||
|
||||
m_PartObjects.begin()->second->Set_Visible(false);
|
||||
Get_PartObject<CEffectParts>("JapPT0")->Get_Component<CTransform>()->LookAt(m_pOwner->Get_WorldPostion());
|
||||
|
||||
m_pProjectile_Side->Set_Visible(false);
|
||||
m_pProjectile->Set_Visible(false);
|
||||
|
||||
Get_PartObject<CTrailObject>()->Set_Visible(false);
|
||||
Get_PartObject<CTrailObject>()->Get_Component<CTransform>()->Set_State(STATE::POSITION, XMVectorSet(0.f, 0.f, 0.f, 1.f));
|
||||
|
||||
m_pPhysHitBox->Set_Dead();
|
||||
}
|
||||
@@ -149,16 +237,16 @@ void CNomalJap::Free()
|
||||
// if (m_pPhysHitBox->Get_Depth() == false)
|
||||
// SAFE_RELEASE(m_pPhysHitBox);
|
||||
|
||||
Safe_Release(m_pProjectile);
|
||||
Safe_Release(m_pProjectile_Side);
|
||||
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CNomalJap::Describe_Entity()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
HRESULT CNomalJap::Bind_ShaderResources()
|
||||
{
|
||||
return S_OK;
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
#include "State_Combat.h"
|
||||
#pragma endregion
|
||||
|
||||
#include "Bombard.h"
|
||||
#include "Layer.h"
|
||||
#include "EffectPool.h"
|
||||
|
||||
CPlayer::CPlayer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CUnit(pDevice, pContext)
|
||||
@@ -77,8 +78,12 @@ HRESULT CPlayer::Initialize(void* pArg)
|
||||
m_pCallBack_Behavior->Initialize(m_pCharacter_Controller, m_pRigidBody);
|
||||
m_pCallBack_HitReport->Initialize(m_pCharacter_Controller, m_pRigidBody);
|
||||
|
||||
m_pEffectPool = m_pGameInstance->Get_Layer(NEXT_LEVEL, TEXT("Layer_EffectPool"))->Get_Object<CEffectPool>();
|
||||
SAFE_ADDREF(m_pEffectPool);
|
||||
|
||||
m_pInfoInstance->Regist_PlayerAlly(this);
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
m_BasicEffect = make_unique<BasicEffect>(m_pDevice);
|
||||
m_BasicEffect->SetVertexColorEnabled(true);
|
||||
@@ -391,6 +396,7 @@ void CPlayer::Free()
|
||||
SAFE_RELEASE(m_pCamPosition_TopDown_FollowPart);
|
||||
SAFE_RELEASE(m_pCamPosition_TopDown_LookPart);
|
||||
SAFE_RELEASE(m_pCamPosition_ShoulderPart);
|
||||
SAFE_RELEASE(m_pEffectPool);
|
||||
SAFE_RELEASE(m_pInfoInstance);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include "State_Combat.h"
|
||||
#pragma endregion
|
||||
|
||||
#include "Bombard.h"
|
||||
#include "EffectPool.h"
|
||||
|
||||
template<typename T>
|
||||
void CPlayer::Spawn_Effect()
|
||||
@@ -598,10 +598,18 @@ void CPlayer::Behavior_CombatEnter()
|
||||
else if (m_pGameInstance->Key_Down(DIK_Q)) {
|
||||
m_pFSM->Enable_State(FSMSTATE::SKILL2);
|
||||
pairAnimInfo = m_Animation[STATEANIM::SKILL2];
|
||||
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::PROTEGO, this);
|
||||
}
|
||||
else if (m_pGameInstance->Mouse_Up(DIM_LBUTTON)) {
|
||||
m_pFSM->Enable_State(FSMSTATE::LIGHT_ATTACK);
|
||||
pairAnimInfo = m_Animation[STATEANIM::LIGHT_ATTACK];
|
||||
|
||||
m_pModelCom->Anim_Event(0.1f, m_Animation[STATEANIM::LIGHT_ATTACK].first, [this]() {
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::JAP, this);
|
||||
|
||||
return E_FAIL;
|
||||
});
|
||||
}
|
||||
else if (SUCCEEDED(InputSpell())) {
|
||||
m_pFSM->Enable_State(FSMSTATE::SPELL);
|
||||
@@ -669,6 +677,9 @@ HRESULT CPlayer::Behavior_CombatExitCheck()
|
||||
pairAnimInfo = m_Animation[STATEANIM::LIGHT_ATTACK];
|
||||
pairAnimInfo.first = iIndex + 1;
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::JAP, this);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -706,23 +717,38 @@ HRESULT CPlayer::Behavior_CombatExitCheck()
|
||||
{
|
||||
case STATEANIM::ACCIO:
|
||||
{
|
||||
/* TODO 임시 방편 */
|
||||
pairAnimInfo = m_Animation[STATEANIM::ACCIO];
|
||||
|
||||
|
||||
|
||||
}
|
||||
break;
|
||||
case STATEANIM::DESCENDO:
|
||||
pairAnimInfo = m_Animation[STATEANIM::DESCENDO];
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
|
||||
|
||||
|
||||
m_pModelCom->Anim_Event(0.1f, m_Animation[STATEANIM::ACCIO].first, [this]() {
|
||||
Spawn_Effect<CBombard>();
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::BOMBARD, this);
|
||||
|
||||
m_eSpell = STATEANIM::END;
|
||||
return E_FAIL;
|
||||
});
|
||||
|
||||
m_pModelCom->Anim_Event(0.1f, m_Animation[STATEANIM::DESCENDO].first, [this]() {
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::DESCENDO, this);
|
||||
|
||||
m_eSpell = STATEANIM::END;
|
||||
return E_FAIL;
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,178 @@
|
||||
#include "pch.h"
|
||||
#include "Protego.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "EffectParts.h"
|
||||
#include "PhysXEffectHitBox.h"
|
||||
|
||||
|
||||
CProtego::CProtego(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CEffect_Container{ pDevice, pContext }
|
||||
{
|
||||
}
|
||||
|
||||
CProtego::CProtego(const CProtego& rhs)
|
||||
: CEffect_Container(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CProtego::Initialize_Prototype()
|
||||
{
|
||||
|
||||
return S_OK;
|
||||
|
||||
}
|
||||
|
||||
HRESULT CProtego::Initialize(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Protego")))
|
||||
return E_FAIL;
|
||||
|
||||
m_pSphere = Get_PartObject<CEffectParts>("ProtegoSphere");
|
||||
m_pBottom = Get_PartObject<CEffectParts>("ProtegoBottom");
|
||||
m_pCircle = Get_PartObject<CEffectParts>("ProtegoCircle");
|
||||
|
||||
SAFE_ADDREF(m_pSphere);
|
||||
SAFE_ADDREF(m_pBottom);
|
||||
SAFE_ADDREF(m_pCircle);
|
||||
|
||||
m_wstrEffectName = L"Protego";
|
||||
|
||||
|
||||
m_fDuration = 2.5f;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CProtego::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
|
||||
}
|
||||
|
||||
void CProtego::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
m_pSphere->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
m_pBottom->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
m_pCircle-> Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
|
||||
Update_Event(fTimeDelta);
|
||||
}
|
||||
|
||||
void CProtego::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
|
||||
|
||||
}
|
||||
|
||||
HRESULT CProtego::Pre_Setting(CGameObject* pObject)
|
||||
{
|
||||
if (pObject == nullptr)
|
||||
return E_FAIL;
|
||||
|
||||
m_pOwner = pObject;
|
||||
|
||||
Reset_EffectParts();
|
||||
|
||||
m_fAccTime = 0.f;
|
||||
__super::m_fAccTime = 0.f;
|
||||
m_fPreAccTime = 0.f;
|
||||
|
||||
m_pSphere->Set_Visible(true);
|
||||
m_pCircle->Set_Visible(true);
|
||||
m_pBottom->Set_Visible(true);
|
||||
|
||||
m_bVisible = true;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CProtego::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CProtego::Ready_Child()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CProtego* CProtego::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CProtego* pInstance = new CProtego(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CProtego");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
|
||||
CGameObject* CProtego::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CProtego* pInstance = new CProtego(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CProtego");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CProtego::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
{
|
||||
//CTransform* pOtherTransform = p
|
||||
ON_COLLISION_INFO* CollisionDesc = static_cast<ON_COLLISION_INFO*>(pDesc);
|
||||
|
||||
}
|
||||
|
||||
void CProtego::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
//if(m_pPhysHitBox != nullptr)
|
||||
// if (m_pPhysHitBox->Get_Depth() == false)
|
||||
// SAFE_RELEASE(m_pPhysHitBox);
|
||||
|
||||
SAFE_RELEASE(m_pSphere);
|
||||
SAFE_RELEASE(m_pBottom);
|
||||
SAFE_RELEASE(m_pCircle);
|
||||
|
||||
}
|
||||
|
||||
void CProtego::Describe_Entity()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
HRESULT CProtego::Bind_ShaderResources()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -228,15 +228,16 @@ HRESULT CTrailObject::Load_Trail(const _char* pPath, LEVEL eLevel)
|
||||
|
||||
HRESULT CTrailObject::Render()
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_POSTEX::TRAIL))))
|
||||
if (FAILED(Bind_ShaderResources()))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Bind_ShaderResources()))
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_POSTEX::TRAIL))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pTrailCom->Render()))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@ class CBombard final : public CEffect_Container
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
|
||||
public:
|
||||
virtual HRESULT Pre_Setting(CGameObject* pObject) override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
|
||||
@@ -17,4 +17,5 @@ namespace Client
|
||||
enum class SHADER_PASS_UIEDITOR { DEFAULT, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, END };
|
||||
|
||||
enum class EFFECT_TYPE { EFFECT, TRAIL, END };
|
||||
enum class SKILL_TYPE { JAP, BOMBARD, DESCENDO, PROTEGO, END };
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "Effect_Container.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CDecendo final : public CEffect_Container
|
||||
{
|
||||
private:
|
||||
CDecendo(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CDecendo(const CDecendo& rhs);
|
||||
virtual ~CDecendo() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
|
||||
public:
|
||||
virtual HRESULT Pre_Setting(CGameObject* pObject) override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
HRESULT Ready_Child();
|
||||
HRESULT Bind_ShaderResources() override;
|
||||
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
|
||||
private:
|
||||
_wstring m_wstrEffectName = {};
|
||||
class CPhysXEffectHitBox* m_pPhysHitBox = {};
|
||||
|
||||
class CPartObject* m_pProjectile = {};
|
||||
class CPartObject* m_pProjectile_Blur = {};
|
||||
|
||||
_vector m_vRotateUp = {};
|
||||
_float m_fAccTime = {};
|
||||
_float m_fLerpAmount = {};
|
||||
_float m_fTurnValue = {};
|
||||
_vector m_vOwnerLook = {};
|
||||
public:
|
||||
static CDecendo* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual void Free() override;
|
||||
CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
|
||||
void Describe_Entity() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -86,6 +86,13 @@ class CEffectObject abstract : public CPartObject
|
||||
|
||||
SHADER_PASS_INSTANCE_MODEL eShaderPass = { SHADER_PASS_INSTANCE_MODEL::NON_NOMALMAP };
|
||||
|
||||
_bool isDiffuseBlur = {};
|
||||
_bool isMaskBlur = {};
|
||||
_bool isBlurDissolve = {};
|
||||
_bool isBlurReverseDissolve = {};
|
||||
|
||||
_float fBluringStrength = { 0.01f };
|
||||
|
||||
}EFFECT_INFO;
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "GameObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CLight;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CEffectPool final : public CGameObject
|
||||
{
|
||||
|
||||
private:
|
||||
CEffectPool(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CEffectPool(const CEffectPool& Prototype);
|
||||
virtual ~CEffectPool() = default;
|
||||
|
||||
public:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
public:
|
||||
HRESULT Create_Effect(SKILL_TYPE eType, _uint iNumEffect, _uint iPrototypeLevel, _uint iCloneLevel , function<class CEffect_Container*(_uint , _uint)> AddPrototypeEvent);
|
||||
HRESULT Use_Skill(SKILL_TYPE eType , CGameObject* pOwner);
|
||||
private:
|
||||
list<class CEffect_Container*> m_EffectList[ENUM_CLASS(SKILL_TYPE::END)] = {};
|
||||
list<class CEffect_Container*> m_ActiveEffectList = {};
|
||||
private:
|
||||
HRESULT Ready_Components();
|
||||
HRESULT Bind_ShaderResources();
|
||||
HRESULT Ready_Effect();
|
||||
public:
|
||||
static CEffectPool* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr) override;
|
||||
virtual void Free() override;
|
||||
virtual void Describe_Entity() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
|
||||
@@ -21,7 +21,10 @@ class CEffect_Container abstract : public CContainerObject
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
|
||||
public:
|
||||
HRESULT Load_Directory(const _char* pPath);
|
||||
HRESULT Load_Directory(const _char* pPath);
|
||||
virtual HRESULT Pre_Setting(CGameObject* pObject);
|
||||
HRESULT Load_Package(const _char* pPath);
|
||||
|
||||
protected:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
@@ -30,7 +33,7 @@ class CEffect_Container abstract : public CContainerObject
|
||||
HRESULT Bind_ShaderResources() override;
|
||||
|
||||
void Update_Event(_float fTimeDelta);
|
||||
|
||||
HRESULT Reset_EffectParts();
|
||||
protected:
|
||||
_wstring m_wstrEffectName = {};
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ class CLevel_GamePlay final : public CLevel
|
||||
HRESULT Ready_Layer_Player(const _wstring& strLayerTag);
|
||||
HRESULT Ready_Layer_SkyBox(const _wstring& strLayerTag);
|
||||
HRESULT Ready_Layer_Monster();
|
||||
HRESULT Reday_Layer_EffectPool();
|
||||
|
||||
public:
|
||||
static pair<CLevel*, function<void()>> Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID, void* pArg);
|
||||
|
||||
@@ -21,6 +21,9 @@ class CNomalJap final : public CEffect_Container
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
|
||||
|
||||
public:
|
||||
virtual HRESULT Pre_Setting(CGameObject* pObject) override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
@@ -30,7 +33,16 @@ class CNomalJap final : public CEffect_Container
|
||||
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
|
||||
private:
|
||||
_wstring m_wstrEffectName = {};
|
||||
class CPhysXEffectHitBox* m_pPhysHitBox = {};
|
||||
class CPhysXEffectHitBox* m_pPhysHitBox = {};
|
||||
|
||||
class CPartObject* m_pProjectile = {};
|
||||
class CPartObject* m_pProjectile_Side = {};
|
||||
|
||||
_vector m_vRotateUp = {};
|
||||
_float m_fAccTime = {};
|
||||
_float m_fLerpAmount = {};
|
||||
_float m_fTurnValue = {};
|
||||
_vector m_vOwnerLook = {};
|
||||
public:
|
||||
static CNomalJap* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual void Free() override;
|
||||
|
||||
@@ -115,6 +115,9 @@ class CPlayer final : public CUnit
|
||||
void Behavior_CombatExit();
|
||||
|
||||
#pragma endregion
|
||||
|
||||
private:
|
||||
class CEffectPool* m_pEffectPool = nullptr;
|
||||
};
|
||||
|
||||
NS_END
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "Effect_Container.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CProtego final : public CEffect_Container
|
||||
{
|
||||
private:
|
||||
CProtego(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CProtego(const CProtego& rhs);
|
||||
virtual ~CProtego() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
|
||||
public:
|
||||
virtual HRESULT Pre_Setting(CGameObject* pObject) override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
HRESULT Ready_Child();
|
||||
HRESULT Bind_ShaderResources() override;
|
||||
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
|
||||
private:
|
||||
_wstring m_wstrEffectName = {};
|
||||
|
||||
CPartObject* m_pSphere = { nullptr };
|
||||
CPartObject* m_pBottom = { nullptr };
|
||||
CPartObject* m_pCircle = { nullptr };
|
||||
public:
|
||||
static CProtego* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual void Free() override;
|
||||
CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -91,13 +91,13 @@ class CTrailObject final : public CPartObject
|
||||
#endif // _DEBUG
|
||||
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CTexture* m_pNoise_TextureCom = { nullptr };
|
||||
CTexture* m_pMasking_TextureCom = { nullptr };
|
||||
CTexture* m_pDistortion_TextureCom = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CTexture* m_pNoise_TextureCom = { nullptr };
|
||||
CTexture* m_pMasking_TextureCom = { nullptr };
|
||||
CTexture* m_pDistortion_TextureCom = { nullptr };
|
||||
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CTrail* m_pTrailCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CTrail* m_pTrailCom = { nullptr };
|
||||
|
||||
_string m_strTrailDiffuseName = {};
|
||||
_string m_strTrailNoiseName = {};
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -351,11 +351,43 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* 최종 색깔 */
|
||||
vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, UV);
|
||||
|
||||
|
||||
if (g_isDiffuseBlur)
|
||||
{
|
||||
float4 fAccDiffuse;
|
||||
|
||||
|
||||
float fTexel = g_fBluringStrength;
|
||||
|
||||
if (g_isBlurDissolve)
|
||||
{
|
||||
fTexel = saturate(g_fBluringStrength * (In.vLifeTime.x / In.vLifeTime.y));
|
||||
}
|
||||
|
||||
if (g_isBlurReverseDissolve)
|
||||
{
|
||||
fTexel = saturate(g_fBluringStrength * (1 - (In.vLifeTime.x / In.vLifeTime.y)));
|
||||
}
|
||||
|
||||
for (int x = -2; x <= 2; x++)
|
||||
{
|
||||
for (int y = -2; y <= 2; y++)
|
||||
{
|
||||
fAccDiffuse += g_DiffuseTexture.Sample(DefaultSampler, UV + float2(x * fTexel, y * fTexel));
|
||||
}
|
||||
}
|
||||
|
||||
fAccDiffuse = fAccDiffuse / 9.0;
|
||||
|
||||
/* 연산 마스크 대입*/
|
||||
vMtrlDiffuse = fAccDiffuse;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 최종 색깔 */
|
||||
vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, UV);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (g_vColor.a > 0)
|
||||
vMtrlDiffuse = saturate(g_vColor + vMtrlDiffuse);
|
||||
@@ -508,52 +540,55 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
||||
if (fDepthStencilValue <= In.vProjPos.z / In.vProjPos.w + fbias)
|
||||
discard;
|
||||
|
||||
Out = BlendedWeight(vMtrlDiffuse, In.vProjPos.w);
|
||||
|
||||
|
||||
//// 색깔 추가할 처리 (이미시브)
|
||||
|
||||
float4 vEmissiveMtrl = vector(0.f, 0.f, 0.f, 0.f);
|
||||
|
||||
|
||||
float4 vEmissiveMtrl = vector(0.f, 0.f, 0.f, 0.f);
|
||||
float2 CenteredUV = In.vTexcoord - 0.5f;
|
||||
|
||||
Out = BlendedWeight(vMtrlDiffuse, In.vProjPos.w);
|
||||
|
||||
float fDistance = saturate(length(CenteredUV) / g_fRadius); // 마스크의 크기를 어느정도할지
|
||||
if (g_fRadius >= FLT_EPSILON5)
|
||||
{
|
||||
float fDistance = saturate(length(CenteredUV) / g_fRadius); // 마스크의 크기를 어느정도할지
|
||||
|
||||
float fSoftEdge = pow(saturate(1.0f - fDistance), g_fSoftenExp) * g_fSoftStrength; //SoftenExp 엣지감쇠지수 , Strength
|
||||
float fSoftEdge = pow(saturate(1.0f - fDistance), g_fSoftenExp) * g_fSoftStrength; //SoftenExp 엣지감쇠지수 , Strength
|
||||
|
||||
float fCore = pow(saturate(1.0 - fDistance * 2.f), max(0.001, g_fCoreBoost)) * g_fCoreBoost; // CoreBust 중심강조
|
||||
float fCore = pow(saturate(1.0 - fDistance * 2.f), max(0.001, g_fCoreBoost)) * g_fCoreBoost; // CoreBust 중심강조
|
||||
|
||||
float fEmissive = fSoftEdge + fCore;
|
||||
float fEmissive = fSoftEdge + fCore;
|
||||
|
||||
if (g_isEmissive == true)
|
||||
{
|
||||
vEmissiveMtrl = g_EmissiveTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
}
|
||||
else
|
||||
{
|
||||
vEmissiveMtrl = g_vEmissive;
|
||||
}
|
||||
if (g_isEmissive == true)
|
||||
{
|
||||
vEmissiveMtrl = g_EmissiveTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
}
|
||||
else
|
||||
{
|
||||
vEmissiveMtrl = g_vEmissive;
|
||||
}
|
||||
|
||||
float fEmissiveStrength = g_fEmissiveStrength;
|
||||
float fEmissiveStrength = g_fEmissiveStrength;
|
||||
|
||||
if (g_isEmissiveDissolve == true)
|
||||
{
|
||||
fEmissiveStrength *= (1.f - In.vLifeTime.x / In.vLifeTime.y);
|
||||
if (g_isEmissiveDissolve == true)
|
||||
{
|
||||
fEmissiveStrength *= (1.f - In.vLifeTime.x / In.vLifeTime.y);
|
||||
|
||||
if (fEmissiveStrength <= 0.05f)
|
||||
fEmissiveStrength = 0;
|
||||
if (fEmissiveStrength <= 0.05f)
|
||||
fEmissiveStrength = 0;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (g_isEmissiveDissolveReverse == true)
|
||||
{
|
||||
fEmissiveStrength *= (In.vLifeTime.x / In.vLifeTime.y);
|
||||
if (g_isEmissiveDissolveReverse == true)
|
||||
{
|
||||
fEmissiveStrength *= (In.vLifeTime.x / In.vLifeTime.y);
|
||||
|
||||
}
|
||||
|
||||
Out.vDiffuse += vEmissiveMtrl * fEmissive * fEmissiveStrength; // 이미시브 스트랭스
|
||||
}
|
||||
|
||||
|
||||
Out.vDiffuse += vEmissiveMtrl * fEmissive * fEmissiveStrength; // 이미시브 스트랭스
|
||||
|
||||
Out.vColorTarget = vector(0.f, 0.f, 0.f, 0.f);
|
||||
return Out;
|
||||
}
|
||||
|
||||
@@ -630,8 +665,8 @@ struct PS_BLUR_OUT
|
||||
|
||||
PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
|
||||
{
|
||||
|
||||
PS_BLUR_OUT Out;
|
||||
|
||||
vector vMtrlDiffuse;
|
||||
vector vMtrlMask;
|
||||
vector vMtrlNoise;
|
||||
@@ -680,15 +715,12 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
|
||||
UV = UV + (vMtrlDistortion).rg * g_fNoiseDistortionIntensity;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* 최종 색깔 */
|
||||
vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, UV);
|
||||
|
||||
|
||||
|
||||
if (g_vColor.a > 0)
|
||||
vMtrlDiffuse += g_vColor;
|
||||
vMtrlDiffuse = saturate(g_vColor + vMtrlDiffuse);
|
||||
|
||||
}
|
||||
else
|
||||
@@ -712,7 +744,8 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
|
||||
vMtrlDiffuse.a = saturate(vMtrlDiffuse.a * vMtrlNoise.r);
|
||||
|
||||
if (g_isNoiseColor)
|
||||
vMtrlDiffuse *= vMtrlNoise;
|
||||
vMtrlDiffuse.rgb *= vMtrlNoise.rgb;
|
||||
|
||||
}
|
||||
|
||||
/* 마스크 */
|
||||
@@ -725,15 +758,14 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
|
||||
// 마스크 디스토션
|
||||
if (g_isDistortion == true)
|
||||
{
|
||||
float2 UV; // 이미지의 UV값
|
||||
|
||||
|
||||
float2 vDistortionUV = In.vTexcoord + SelectLerpUV(g_vMaskDistortionUVGainAmount, (vDistortionUVMoveTime.x / vDistortionUVMoveTime.y), g_iMaskDistortionMoveLerpOption);
|
||||
|
||||
vMtrlDistortion = g_DistortionTexture.Sample(DefaultSampler, vDistortionUV);
|
||||
|
||||
//디스토션(노이즈) 텍스쳐로 uv를 왜곡함
|
||||
vMaskTexcoord = vMaskTexcoord + (vMtrlDistortion - 0.5f).r * g_fNoiseDistortionIntensity;
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (g_isMaskUVMove)
|
||||
@@ -748,25 +780,61 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
|
||||
vMtrlMask = g_MaskingTexture.Sample(DefaultSampler, vMaskTexcoord);
|
||||
|
||||
|
||||
if (g_isMaskBlur)
|
||||
{
|
||||
float4 fAccMask;
|
||||
|
||||
|
||||
float fTexel = g_fBluringStrength;
|
||||
|
||||
if (g_isBlurDissolve)
|
||||
{
|
||||
fTexel = saturate(g_fBluringStrength * (In.vLifeTime.x / In.vLifeTime.y));
|
||||
}
|
||||
|
||||
if (g_isBlurReverseDissolve)
|
||||
{
|
||||
fTexel = saturate(g_fBluringStrength * (1 - (In.vLifeTime.x / In.vLifeTime.y)));
|
||||
}
|
||||
|
||||
for (int x = -2; x <= 2; x++)
|
||||
{
|
||||
for (int y = -2; y <= 2; y++)
|
||||
{
|
||||
fAccMask += g_MaskingTexture.Sample(DefaultSampler, vMaskTexcoord + float2(x * fTexel, y * fTexel));
|
||||
}
|
||||
}
|
||||
|
||||
fAccMask = fAccMask / 9.0;
|
||||
|
||||
/* 연산 마스크 대입*/
|
||||
vMtrlMask.r = fAccMask;
|
||||
}
|
||||
|
||||
|
||||
float fSoftMask;
|
||||
|
||||
if (g_fSoftMask > FLT_EPSILON5)
|
||||
fSoftMask = saturate((vMtrlMask.r - g_fSoftMaskEdge) * g_fSoftMask);
|
||||
|
||||
else
|
||||
fSoftMask = vMtrlMask.r;
|
||||
|
||||
vMtrlDiffuse.a = saturate(vMtrlDiffuse.a * fSoftMask);
|
||||
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
vMtrlMask.r = 1.f;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (vMtrlDiffuse.a <= 0.f)
|
||||
discard;
|
||||
|
||||
vMtrlDiffuse.a *= g_fDiffuseAlpha;
|
||||
|
||||
if (vMtrlDiffuse.a <= FLT_EPSILON5)
|
||||
discard;
|
||||
|
||||
|
||||
|
||||
if (g_isDissolve == true)
|
||||
{
|
||||
@@ -791,17 +859,7 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 색깔 추가할 처리 (이미시브)
|
||||
|
||||
//int2 iTexel = int2(In.vPosition.xy);
|
||||
|
||||
//float fDepthStencilValue = g_DepthStencilTexture.Load(int3(iTexel, 0)).r;
|
||||
|
||||
//float fbias = 0.000005f;
|
||||
|
||||
//if (fDepthStencilValue <= In.vProjPos.z / In.vProjPos.w + fbias)
|
||||
// discard;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -214,6 +214,7 @@
|
||||
<ClInclude Include="..\public\Magic_Icon.h" />
|
||||
<ClInclude Include="..\public\Magic_Item.h" />
|
||||
<ClInclude Include="..\public\Magic_Meter.h" />
|
||||
<ClInclude Include="..\Public\EffectPool.h" />
|
||||
<ClInclude Include="..\Public\NomalJap.h" />
|
||||
<ClInclude Include="..\Public\Effect_Container.h" />
|
||||
<ClInclude Include="..\public\GamePlay_Canvas.h" />
|
||||
@@ -352,6 +353,7 @@
|
||||
<ClCompile Include="..\private\Magic_Icon.cpp" />
|
||||
<ClCompile Include="..\private\Magic_Item.cpp" />
|
||||
<ClCompile Include="..\private\Magic_Meter.cpp" />
|
||||
<ClCompile Include="..\Private\EffectPool.cpp" />
|
||||
<ClCompile Include="..\Private\NomalJap.cpp" />
|
||||
<ClCompile Include="..\Private\Effect_Container.cpp" />
|
||||
<ClCompile Include="..\private\GamePlay_Canvas.cpp" />
|
||||
|
||||
@@ -385,6 +385,9 @@
|
||||
<Filter Include="50.UI\GamePlay_Canvas\Action_Panel\Magic_Item">
|
||||
<UniqueIdentifier>{5b287b4f-4f71-4458-85a1-c753fd121c53}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Layer_Effect\EffectPool">
|
||||
<UniqueIdentifier>{c0589f6e-ed9c-4e76-8df2-4f95ce3c7b9a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Editor.h">
|
||||
@@ -750,6 +753,9 @@
|
||||
<ClInclude Include="..\public\Magic_Item.h">
|
||||
<Filter>50.UI\GamePlay_Canvas\Action_Panel\Magic_Item</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\EffectPool.h">
|
||||
<Filter>02.GameObjects\Layer_Effect\EffectPool</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Editor.ico">
|
||||
@@ -1114,6 +1120,9 @@
|
||||
<ClCompile Include="..\private\Magic_Item.cpp">
|
||||
<Filter>50.UI\GamePlay_Canvas\Action_Panel\Magic_Item</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\EffectPool.cpp">
|
||||
<Filter>02.GameObjects\Layer_Effect\EffectPool</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Editor.rc">
|
||||
|
||||
@@ -31,28 +31,16 @@ HRESULT CBombard::Initialize(void* pArg)
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_Child()))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Load_Directory("../Bin/Resources/Data/Effect/Bombard/")))
|
||||
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Bombard")))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
m_wstrEffectName = L"Bombard";
|
||||
|
||||
CPartObject* pShootPt = Get_PartObject<CEditEffect>("Bombard_Shoot_Pt");
|
||||
m_pLight_Projectile = Get_PartObject<CEditEffect>("Bombard_Projectile");
|
||||
CPartObject* pCircle0 = Get_PartObject<CEditEffect>("Bombard_Circle0");
|
||||
|
||||
pShootPt->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
m_pLight_Projectile->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
pCircle0->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
|
||||
pCircle0->Set_Visible(true);
|
||||
pShootPt->Set_Visible(true);
|
||||
m_pLight_Projectile->Set_Visible(true);
|
||||
|
||||
SAFE_ADDREF(m_pLight_Projectile);
|
||||
|
||||
m_fDuration = 2.5f;
|
||||
|
||||
return S_OK;
|
||||
@@ -88,6 +76,44 @@ void CBombard::Late_Update(_float fTimeDelta)
|
||||
|
||||
}
|
||||
|
||||
HRESULT CBombard::Pre_Setting(CGameObject* pObject)
|
||||
{
|
||||
if (pObject == nullptr)
|
||||
return E_FAIL;
|
||||
|
||||
m_pOwner = pObject;
|
||||
|
||||
if (FAILED(Ready_Child()))
|
||||
return E_FAIL;
|
||||
|
||||
Reset_EffectParts();
|
||||
|
||||
m_fAccTime = 0.f;
|
||||
__super::m_fAccTime = 0.f;
|
||||
m_fPreAccTime = 0.f;
|
||||
|
||||
|
||||
|
||||
CPartObject* pShootPt = Get_PartObject<CEditEffect>("Bombard_Shoot_Pt");
|
||||
|
||||
CPartObject* pCircle0 = Get_PartObject<CEditEffect>("Bombard_Circle0");
|
||||
|
||||
pShootPt->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
m_pLight_Projectile->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
pCircle0->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
|
||||
pCircle0->Set_Visible(true);
|
||||
pShootPt->Set_Visible(true);
|
||||
|
||||
m_pLight_Projectile->Set_Visible(true);
|
||||
|
||||
|
||||
m_bVisible = true;
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CBombard::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
|
||||
@@ -32,10 +32,7 @@ HRESULT CDecendo::Initialize(void* pArg)
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_Child()))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Load_Directory("../Bin/Resources/Data/Effect/Decendo/")))
|
||||
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Decendo")))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
@@ -44,30 +41,9 @@ HRESULT CDecendo::Initialize(void* pArg)
|
||||
m_pProjectile_Blur = Get_PartObject<CEditEffect>("Decendo_Proj_Blur");
|
||||
m_pProjectile = Get_PartObject<CEditEffect>("Decendo_Proj");
|
||||
|
||||
CPartObject* pCircle0 = Get_PartObject<CEditEffect>("Decendo_Cricle_S");
|
||||
|
||||
pCircle0->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
m_pProjectile->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
m_pProjectile_Blur->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
|
||||
pCircle0->Set_Visible(true);
|
||||
m_pProjectile->Set_Visible(true);
|
||||
m_pProjectile_Blur->Set_Visible(true);
|
||||
|
||||
SAFE_ADDREF(m_pProjectile_Blur);
|
||||
SAFE_ADDREF(m_pProjectile);
|
||||
|
||||
//나아가는 벡터와 한점을 가져와 수직인 평면상에 하나의 점으로 DIR 을 만듬
|
||||
m_vOwnerLook = XMVector3Normalize(m_pOwner->Get_Component<CTransform>()->Get_State(STATE::LOOK));
|
||||
_vector vUp = XMVectorSet(0.f, 1.f, 0.f, 0.f);
|
||||
|
||||
|
||||
_vector vQuaternion = XMQuaternionRotationAxis(m_vOwnerLook, m_pGameInstance->Random_Float(0.f, XM_PIDIV2));
|
||||
|
||||
m_vRotateUp = XMVector3Rotate(vUp, vQuaternion);
|
||||
|
||||
m_vRotateUp = XMVector3Normalize(m_vRotateUp);
|
||||
|
||||
m_fDuration = 2.5f;
|
||||
|
||||
return S_OK;
|
||||
@@ -88,11 +64,10 @@ void CDecendo::Update(_float fTimeDelta)
|
||||
|
||||
Update_Event(fTimeDelta);
|
||||
|
||||
|
||||
m_pProjectile_Blur->Get_Component<CTransform>()->Translation(m_vOwnerLook * 0.5f);
|
||||
m_pProjectile->Get_Component<CTransform>()->Translation(m_vOwnerLook * 0.5f);
|
||||
|
||||
Get_PartObject<CTrailObject>()->Trail_Update(m_pProjectile->Get_Component<CTransform>()->Get_XMWorldMatrix(), fTimeDelta);
|
||||
|
||||
|
||||
if (m_fAccTime > XM_2PI)
|
||||
return;
|
||||
@@ -101,7 +76,6 @@ void CDecendo::Update(_float fTimeDelta)
|
||||
|
||||
m_pProjectile_Blur->Get_Component<CTransform>()->Translation(m_vRotateUp * 0.2f * sinf(m_fAccTime));
|
||||
m_pProjectile->Get_Component<CTransform>()->Translation(m_vRotateUp * 0.2f * sinf(m_fAccTime));
|
||||
|
||||
}
|
||||
|
||||
void CDecendo::Late_Update(_float fTimeDelta)
|
||||
@@ -109,10 +83,63 @@ void CDecendo::Late_Update(_float fTimeDelta)
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
Get_PartObject<CTrailObject>()->Trail_Update(m_pProjectile->Get_Component<CTransform>()->Get_XMWorldMatrix(), fTimeDelta);
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
HRESULT CDecendo::Pre_Setting(CGameObject* pObject)
|
||||
{
|
||||
if (pObject == nullptr)
|
||||
return E_FAIL;
|
||||
|
||||
/* 부모 할당 */
|
||||
m_pOwner = pObject;
|
||||
|
||||
/* 피직스 생성*/
|
||||
if (FAILED(Ready_Child()))
|
||||
return E_FAIL;
|
||||
|
||||
/* 초기 셋팅 초기화 */
|
||||
Reset_EffectParts();
|
||||
m_fAccTime = 0.f;
|
||||
__super::m_fAccTime = 0.f;
|
||||
m_fPreAccTime = 0.f;
|
||||
|
||||
|
||||
CPartObject* pCircle0 = Get_PartObject<CEditEffect>("Decendo_Cricle_S");
|
||||
|
||||
/* 초기 객체 위치 초기화 */
|
||||
pCircle0->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
m_pProjectile->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
m_pProjectile_Blur->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
|
||||
/* 초기 객체 비지블 */
|
||||
pCircle0->Set_Visible(true);
|
||||
m_pProjectile->Set_Visible(true);
|
||||
m_pProjectile_Blur->Set_Visible(true);
|
||||
|
||||
/*트레일 초기화 */
|
||||
Get_PartObject<CTrailObject>()->Set_Visible(true);
|
||||
Get_PartObject<CTrailObject>()->Get_Component<CTrail>()->Reset_Trail();
|
||||
|
||||
|
||||
//나아가는 벡터와 한점을 가져와 수직인 평면상에 하나의 점으로 DIR 을 만듬
|
||||
m_vOwnerLook = XMVector3Normalize(m_pOwner->Get_Component<CTransform>()->Get_State(STATE::LOOK));
|
||||
_vector vUp = XMVectorSet(0.f, 1.f, 0.f, 0.f);
|
||||
|
||||
|
||||
_vector vQuaternion = XMQuaternionRotationAxis(m_vOwnerLook, m_pGameInstance->Random_Float(0.f, XM_PIDIV2));
|
||||
|
||||
m_vRotateUp = XMVector3Rotate(vUp, vQuaternion);
|
||||
|
||||
m_vRotateUp = XMVector3Normalize(m_vRotateUp);
|
||||
|
||||
m_bVisible = true;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDecendo::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
@@ -190,6 +217,8 @@ void CDecendo::OnCollision(CGameObject* pOther , void* pDesc)
|
||||
pPair.second->Get_Component<CTransform>()->Set_State(STATE::POSITION, CollisionDesc->vWorldPos);
|
||||
}
|
||||
|
||||
|
||||
|
||||
m_pProjectile_Blur->Set_Visible(false);
|
||||
m_pProjectile->Set_Visible(false);
|
||||
|
||||
@@ -198,9 +227,11 @@ void CDecendo::OnCollision(CGameObject* pOther , void* pDesc)
|
||||
_vector vPlayerPos = m_pOwner->Get_Component<CTransform>()->Get_State(STATE::POSITION);
|
||||
|
||||
Get_PartObject<CEditEffect>("Decendo_Down")->Get_Component<CTransform>()->LookAt(vPlayerPos);
|
||||
|
||||
Get_PartObject<CEditEffect>("Decendo_Smoke")->Get_Component<CTransform>()->LookAt(vPlayerPos);
|
||||
|
||||
Get_PartObject<CEditEffect>("Decendo_Cricle_S")->Set_Visible(false);
|
||||
|
||||
Get_PartObject<CTrailObject>()->Get_Component<CTransform>()->Set_State(STATE::POSITION, XMVectorSet(0.f, 0.f, 0.f, 1.f));
|
||||
Get_PartObject<CTrailObject>()->Set_Visible(false);
|
||||
|
||||
m_pPhysHitBox->Set_Dead();
|
||||
|
||||
@@ -27,8 +27,7 @@ HRESULT CEditEffect::Initialize(void* pArg)
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
Set_Visible(false);
|
||||
m_bVisible = false;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -403,7 +402,6 @@ void CEditEffect::Describe_Entity()
|
||||
const char* pRenderNames[] = { "PRIORITY" , "SHADOW", "NONBLEND", "DECAL", "BLUR" , "NONLIGHT" ,"EFFECT", "BLEND" , "UI" };
|
||||
const char* pEffectType[] = { "EFFECT" , "TRAIL" };
|
||||
const char* pShaderPass[] = { "DEFAULT" , "NON_NOMALMAP" , "BLUR" , "WEIGHTBLEND" , "NON_WORLD" , "NON_WORLD_BLUR", "ALPHA_BLEND"};
|
||||
|
||||
_int iCurrentItem = static_cast<_int>(m_EffectInfo.eRenderOrder);
|
||||
_int iCurrentType = static_cast<_int>(m_EffectInfo.eEffectType);
|
||||
_int iCurrentPass = static_cast<_int>(m_EffectInfo.eShaderPass);
|
||||
|
||||
@@ -0,0 +1,232 @@
|
||||
#include "pch.h"
|
||||
#include "EffectPool.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "Camera_Debug.h"
|
||||
#include "Effect_Container.h"
|
||||
#include "Bombard.h"
|
||||
#include "NomalJap.h"
|
||||
#include "Decendo.h"
|
||||
|
||||
|
||||
CEffectPool::CEffectPool(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CGameObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CEffectPool::CEffectPool(const CEffectPool& Prototype)
|
||||
: CGameObject(Prototype)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CEffectPool::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CEffectPool::Initialize(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(Ready_Components()))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_Effect()))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CEffectPool::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
for (auto iter = m_ActiveEffectList.begin(); iter != m_ActiveEffectList.end(); )
|
||||
{
|
||||
if (false == (*iter)->Get_Visible())
|
||||
{
|
||||
//SAFE_RELEASE(*iter);
|
||||
//iter = m_ActiveEffectList.erase(iter);
|
||||
}
|
||||
else
|
||||
{
|
||||
(*iter)->Priority_Update(fTimeDelta);
|
||||
++iter;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CEffectPool::Update(_float fTimeDelta)
|
||||
{
|
||||
for (auto iter = m_ActiveEffectList.begin() ; iter != m_ActiveEffectList.end(); )
|
||||
{
|
||||
if (false == (*iter)->Get_Visible())
|
||||
{
|
||||
//SAFE_RELEASE(*iter);
|
||||
//iter = m_ActiveEffectList.erase(iter);
|
||||
}
|
||||
else
|
||||
{
|
||||
(*iter)->Update(fTimeDelta);
|
||||
++iter;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CEffectPool::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
for (auto iter = m_ActiveEffectList.begin(); iter != m_ActiveEffectList.end(); )
|
||||
{
|
||||
if (false == (*iter)->Get_Visible())
|
||||
{
|
||||
SAFE_RELEASE(*iter);
|
||||
iter = m_ActiveEffectList.erase(iter);
|
||||
}
|
||||
else
|
||||
{
|
||||
(*iter)->Late_Update(fTimeDelta);
|
||||
++iter;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CEffectPool::Render()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
HRESULT CEffectPool::Ready_Components()
|
||||
{
|
||||
__super::Ready_Components(nullptr);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CEffectPool::Bind_ShaderResources()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CEffectPool::Ready_Effect()
|
||||
{
|
||||
|
||||
if(FAILED(Create_Effect(SKILL_TYPE::JAP, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CNomalJap* pEffect = nullptr;
|
||||
|
||||
pEffect = m_pGameInstance->Clone_Prototype<CNomalJap>(iPrototypeLevel, nullptr);
|
||||
|
||||
return pEffect;}
|
||||
))) return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::BOMBARD, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* {
|
||||
|
||||
CBombard* pEffect = nullptr;
|
||||
|
||||
pEffect = m_pGameInstance->Clone_Prototype<CBombard>(iPrototypeLevel, nullptr);
|
||||
|
||||
return pEffect;}
|
||||
))) return E_FAIL;
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::DECENDO, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* {
|
||||
|
||||
CDecendo* pEffect = nullptr;
|
||||
|
||||
pEffect = m_pGameInstance->Clone_Prototype<CDecendo>(iPrototypeLevel, nullptr);
|
||||
|
||||
return pEffect;}
|
||||
))) return E_FAIL;
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CEffectPool::Create_Effect(SKILL_TYPE eType, _uint iNumEffect, _uint iPrototypeLevel, _uint iCloneLevel, function<CEffect_Container* (_uint, _uint)> AddPrototypeEvent)
|
||||
{
|
||||
for (_uint i = 0; i < iNumEffect; i++)
|
||||
{
|
||||
CEffect_Container* pEffect_Container = AddPrototypeEvent(iPrototypeLevel, iCloneLevel);
|
||||
|
||||
if (pEffect_Container == nullptr)
|
||||
return E_FAIL;
|
||||
|
||||
m_EffectList[ENUM_CLASS(eType)].push_back(pEffect_Container);
|
||||
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CEffectPool::Use_Skill(SKILL_TYPE eType, CGameObject* pOwner)
|
||||
{
|
||||
if (pOwner == nullptr)
|
||||
return S_OK;
|
||||
|
||||
for (auto& pSkill : m_EffectList[ENUM_CLASS(eType)])
|
||||
{
|
||||
if (pSkill->Get_Visible() == true)
|
||||
continue;
|
||||
|
||||
pSkill->Pre_Setting(pOwner);
|
||||
|
||||
m_ActiveEffectList.push_back(pSkill);
|
||||
Safe_AddRef(pSkill);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
CEffectPool* CEffectPool::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CEffectPool* pInstance = new CEffectPool(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CEffectPool");
|
||||
Safe_Release(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CEffectPool::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CEffectPool* pInstance = new CEffectPool(*this);
|
||||
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CEffectPool");
|
||||
Safe_Release(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void CEffectPool::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
for (size_t i = 0; i < ENUM_CLASS(SKILL_TYPE::END); i++)
|
||||
{
|
||||
for (auto& pEffect : m_EffectList[i])
|
||||
{
|
||||
SAFE_RELEASE(pEffect);
|
||||
}
|
||||
}
|
||||
|
||||
for (auto& pEffect : m_ActiveEffectList)
|
||||
{
|
||||
SAFE_RELEASE(pEffect);
|
||||
}
|
||||
}
|
||||
|
||||
void CEffectPool::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -23,6 +23,8 @@ CEffect_Container::CEffect_Container(const CEffect_Container& rhs)
|
||||
HRESULT CEffect_Container::Initialize_Prototype()
|
||||
{
|
||||
|
||||
|
||||
|
||||
return S_OK;
|
||||
|
||||
}
|
||||
@@ -35,6 +37,9 @@ HRESULT CEffect_Container::Initialize(void* pArg)
|
||||
if (FAILED(Ready_Child()))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
m_bVisible = false;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -157,6 +162,155 @@ HRESULT CEffect_Container::Load_Directory(const _char* pPath)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CEffect_Container::Load_Package(const _char* pPath)
|
||||
{
|
||||
|
||||
_string strPerfectFilePath = pPath;
|
||||
|
||||
strPerfectFilePath += ".bin";
|
||||
|
||||
HANDLE hFile = CreateFileW(
|
||||
CMyTools::ToWstring(strPerfectFilePath).c_str(), // 파일 이름
|
||||
GENERIC_READ, // 읽기 모드
|
||||
FILE_SHARE_READ, // 다른 프로세스도 읽기 가능
|
||||
NULL,
|
||||
OPEN_EXISTING, // 기존 파일 열기
|
||||
FILE_ATTRIBUTE_NORMAL,
|
||||
NULL
|
||||
);
|
||||
|
||||
|
||||
if (hFile == INVALID_HANDLE_VALUE) {
|
||||
MessageBox(NULL, L"오브젝트 읽기 실패", L"System Message", MB_OK);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
// 나중에 패키징할때 패스를 저장할거임
|
||||
|
||||
|
||||
DWORD dwByte(0);
|
||||
|
||||
_int iEffectCount = {};
|
||||
|
||||
if (!ReadFile(hFile, &iEffectCount, sizeof(_int), &dwByte, nullptr)) {
|
||||
CloseHandle(hFile);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
for (_int i = 0; i < iEffectCount; i++)
|
||||
{
|
||||
size_t iComponentLength = {};
|
||||
_char szName[MAX_PATH] = {};
|
||||
|
||||
if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) {
|
||||
CloseHandle(hFile);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (iComponentLength != 0)
|
||||
{
|
||||
if (!ReadFile(hFile, szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) {
|
||||
CloseHandle(hFile);
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
_string strEffectPath = szName;
|
||||
_string strExt = {};
|
||||
_string strEffectName = {};
|
||||
|
||||
size_t iPos = strEffectPath.rfind('.'); // 뒤에서부터 '/' 검색
|
||||
|
||||
if (iPos != std::string::npos)
|
||||
{
|
||||
strExt += strEffectPath.substr(iPos + 1);
|
||||
strEffectName = strEffectPath.substr(0, iPos);
|
||||
}
|
||||
|
||||
size_t pos = strEffectName.rfind('\\'); // 뒤에서부터 '/' 검색
|
||||
|
||||
if (pos != std::string::npos)
|
||||
strEffectName = strEffectName.substr(pos + 1);
|
||||
|
||||
if (!strcmp(strExt.c_str(), "trail"))
|
||||
{
|
||||
CTrailObject* pTrail = nullptr;
|
||||
|
||||
CPartObject::PARTOBJECT_DESC PartsDesc{};
|
||||
|
||||
PartsDesc.pParentTransform = m_pTransformCom;
|
||||
|
||||
if (FAILED(Add_PartObject<CTrailObject>(strEffectName, NEXT_LEVEL, &pTrail, &PartsDesc))) {
|
||||
assert(false);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
/*이펙트 로드 로드*/
|
||||
size_t iPos = {};
|
||||
|
||||
while ((iPos = strEffectPath.find(".trail")) != std::string::npos) {
|
||||
strEffectPath.erase(iPos, 6);
|
||||
};
|
||||
|
||||
|
||||
if (FAILED(pTrail->Load_Trail(strEffectPath.c_str(), LEVEL::EFFECT)))
|
||||
{
|
||||
Safe_Release(pTrail);
|
||||
continue;
|
||||
}
|
||||
|
||||
Safe_Release(pTrail);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////
|
||||
|
||||
CEditEffect* pEditEffect = nullptr;
|
||||
|
||||
CPartObject::PARTOBJECT_DESC PartsDesc{};
|
||||
|
||||
PartsDesc.pParentTransform = m_pTransformCom;
|
||||
|
||||
/*이펙트 껍데기 생성*/
|
||||
|
||||
if (FAILED(Add_PartObject<CEditEffect>(strEffectName, NEXT_LEVEL, &pEditEffect, &PartsDesc))) {
|
||||
assert(false);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/*이펙트 로드 로드*/
|
||||
size_t iPosition = {};
|
||||
_string strFilePath = strEffectPath;
|
||||
|
||||
while ((iPosition = strFilePath.find(".bin")) != std::string::npos) {
|
||||
strFilePath.erase(iPosition, 4);
|
||||
};
|
||||
|
||||
|
||||
if (FAILED(pEditEffect->Load(strFilePath.c_str(), LEVEL::EFFECT)))
|
||||
{
|
||||
Safe_Release(pEditEffect);
|
||||
continue;
|
||||
}
|
||||
|
||||
Safe_Release(pEditEffect);
|
||||
|
||||
}
|
||||
|
||||
CloseHandle(hFile);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CEffect_Container::Pre_Setting(CGameObject* pObject)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CEffect_Container::Ready_Components(void* pArg)
|
||||
{
|
||||
CTransform::TRANSFORM_DESC TransformDesc = {};
|
||||
@@ -189,6 +343,21 @@ HRESULT CEffect_Container::Bind_ShaderResources()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CEffect_Container::Reset_EffectParts()
|
||||
{
|
||||
for (auto& iter : m_PartObjects)
|
||||
{
|
||||
CInstance_Model* pInstanceModel = iter.second->Get_Component<CInstance_Model>();
|
||||
|
||||
if (pInstanceModel == nullptr)
|
||||
continue;
|
||||
|
||||
pInstanceModel->Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CEffect_Container::Update_Event(_float fTimeDelta)
|
||||
{
|
||||
|
||||
|
||||
@@ -126,6 +126,88 @@ HRESULT CEffect_Editor::Ready_Child()
|
||||
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CEffect_Editor::Packaging(const _char* pDirectoryPath)
|
||||
{
|
||||
_uint iIndex = {};
|
||||
|
||||
_string strPerfectFilePath = "../Bin/Resources/Data/Effect/Package/";
|
||||
_string strDirectoryPath = pDirectoryPath;
|
||||
|
||||
size_t pos = strDirectoryPath.rfind('/'); // 뒤에서부터 '/' 검색
|
||||
|
||||
if (pos != std::string::npos)
|
||||
strPerfectFilePath += strDirectoryPath.substr(pos + 1);
|
||||
|
||||
strPerfectFilePath += ".bin";
|
||||
|
||||
|
||||
HANDLE hFile = CreateFile(CMyTools::ToWstring(strPerfectFilePath).c_str(),
|
||||
GENERIC_WRITE,
|
||||
FILE_SHARE_READ | FILE_SHARE_WRITE,
|
||||
NULL, CREATE_ALWAYS,
|
||||
FILE_ATTRIBUTE_NORMAL, NULL
|
||||
);
|
||||
|
||||
|
||||
if (hFile == INVALID_HANDLE_VALUE) {
|
||||
MessageBox(NULL, L"패키징 실패", L"System Message", MB_OK);
|
||||
return E_FAIL;
|
||||
}
|
||||
DWORD dwByte;
|
||||
_int iFileCount = {};
|
||||
|
||||
for (auto& file : filesystem::directory_iterator(pDirectoryPath)) {
|
||||
++iFileCount;
|
||||
}
|
||||
|
||||
if (!WriteFile(hFile, &iFileCount, sizeof(_int), &dwByte, nullptr)) {
|
||||
CloseHandle(hFile);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
for (const auto& file : filesystem::directory_iterator(pDirectoryPath))
|
||||
{
|
||||
if (file.is_directory())
|
||||
continue;
|
||||
|
||||
string ext = file.path().extension().string();
|
||||
|
||||
if (!(strcmp(ext.c_str(), ".bin") ^ strcmp(ext.c_str(), ".trail")))
|
||||
continue;
|
||||
|
||||
_char szFilePath[MAX_PATH] = {};
|
||||
|
||||
strcpy_s(szFilePath, MAX_PATH, file.path().string().c_str());
|
||||
|
||||
/////////////////////////////
|
||||
|
||||
_string strPath = szFilePath;
|
||||
|
||||
|
||||
|
||||
size_t iComponentLength = strPath.length();
|
||||
const _char* pFileComponentPath = strPath.c_str();
|
||||
|
||||
if (!WriteFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) {
|
||||
CloseHandle(hFile);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (iComponentLength != 0)
|
||||
{
|
||||
if (!WriteFile(hFile, pFileComponentPath, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) {
|
||||
CloseHandle(hFile);
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
CloseHandle(hFile);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -637,6 +719,35 @@ void CEffect_Editor::Describe_Entity()
|
||||
}
|
||||
}
|
||||
|
||||
GUI::SameLine();
|
||||
|
||||
if (GUI::Button("PACKAGE DIRECTORY"))
|
||||
{
|
||||
if (SUCCEEDED(Packaging(m_strPackageSavePath.c_str())))
|
||||
{
|
||||
MessageBox(NULL, L"패키징 성공", L"System Message", MB_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox(NULL, L"패키징 실패", L"System Message", MB_OK);
|
||||
}
|
||||
}
|
||||
|
||||
GUI::SameLine();
|
||||
|
||||
if (GUI::Button("LOAD PACKAHE"))
|
||||
{
|
||||
if(SUCCEEDED(Load_Package(m_strPackageSavePath.c_str())))
|
||||
{
|
||||
MessageBox(NULL, L"로드 성공", L"System Message", MB_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox(NULL, L"로드 실패", L"System Message", MB_OK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
GUI::InputTextMultiline("TRAIL FILE PATH", m_szTrailBuffer, sizeof(m_szTrailBuffer), ImVec2(250, 25));
|
||||
|
||||
m_strTrailSavePath = m_szTrailBuffer;
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "Dummy_PhysXMonster.h"
|
||||
#include "Dummy_PhysXWall.h"
|
||||
#include "Player.h"
|
||||
#include "EffectPool.h"
|
||||
|
||||
CLevel_EffectViewer::CLevel_EffectViewer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
|
||||
: CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) }
|
||||
@@ -47,6 +48,9 @@ HRESULT CLevel_EffectViewer::Initialize()
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CDummy_Plane>(ENUM_CLASS(LEVEL::EFFECT), NEXT_LEVEL, LAYER_CUBE)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CEffectPool>(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_EffectPool")))) //플레이어보다 먼저 생성해야함!
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CPlayer>(g_iStaticLevel, NEXT_LEVEL, LAYER_PLAYER)))
|
||||
return E_FAIL;
|
||||
|
||||
@@ -54,6 +58,8 @@ HRESULT CLevel_EffectViewer::Initialize()
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -97,6 +97,7 @@
|
||||
#include "NomalJap.h"
|
||||
#include "Bombard.h"
|
||||
#include "Decendo.h"
|
||||
#include "EffectPool.h"
|
||||
|
||||
#pragma endregion
|
||||
|
||||
@@ -373,6 +374,7 @@ HRESULT CLoader::Loading_For_UI()
|
||||
return S_OK;
|
||||
|
||||
});
|
||||
|
||||
Asset_FileLoad("../Bin/Resources/Textures/HUD", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath)
|
||||
{
|
||||
|
||||
@@ -930,6 +932,9 @@ HRESULT CLoader::Loading_For_Effect()
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CCamPosition_Target>(g_iStaticLevel, CCamPosition_Target::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CEffectPool>(g_iStaticLevel, CEffectPool::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_Player */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CPlayer>(g_iStaticLevel, CPlayer::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
@@ -938,6 +943,8 @@ HRESULT CLoader::Loading_For_Effect()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
m_strMessage = TEXT("Loading Success!");
|
||||
|
||||
m_isFinished = true;
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "GameInstance.h"
|
||||
#include "EditEffect.h"
|
||||
#include "Dummy_PhysXEffectHitBox.h"
|
||||
#include "TrailObject.h"
|
||||
|
||||
|
||||
CNomalJap::CNomalJap(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
@@ -32,13 +33,18 @@ HRESULT CNomalJap::Initialize(void* pArg)
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_Child()))
|
||||
return E_FAIL;
|
||||
|
||||
m_wstrEffectName = L"Nomal_Jap";
|
||||
|
||||
m_PartObjects.begin()->second->Set_Visible(true);
|
||||
m_PartObjects.begin()->second->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Jap")))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
m_pProjectile_Side = Get_PartObject<CEditEffect>("JapProjSide");
|
||||
m_pProjectile = Get_PartObject<CEditEffect>("JapProjCircle");
|
||||
|
||||
SAFE_ADDREF(m_pProjectile);
|
||||
SAFE_ADDREF(m_pProjectile_Side);
|
||||
|
||||
m_fDuration = 5.f;
|
||||
|
||||
@@ -52,12 +58,26 @@ void CNomalJap::Priority_Update(_float fTimeDelta)
|
||||
|
||||
void CNomalJap::Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
|
||||
Update_Event(fTimeDelta);
|
||||
|
||||
m_pProjectile_Side->Get_Component<CTransform>()->Translation(m_vOwnerLook * 1.2f);
|
||||
m_pProjectile->Get_Component<CTransform>()->Translation(m_vOwnerLook * 1.2f);
|
||||
|
||||
|
||||
|
||||
if (m_fAccTime > XM_2PI)
|
||||
return;
|
||||
|
||||
m_fAccTime += fTimeDelta * 15.f;
|
||||
|
||||
m_pProjectile_Side->Get_Component<CTransform>()->Translation(m_vRotateUp * 0.6f * sinf(m_fAccTime));
|
||||
m_pProjectile->Get_Component<CTransform>()->Translation(m_vRotateUp * 0.6f * sinf(m_fAccTime));
|
||||
}
|
||||
|
||||
void CNomalJap::Late_Update(_float fTimeDelta)
|
||||
@@ -65,9 +85,60 @@ void CNomalJap::Late_Update(_float fTimeDelta)
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
Get_PartObject<CTrailObject>()->Trail_Update(m_pProjectile->Get_Component<CTransform>()->Get_XMWorldMatrix(), fTimeDelta);
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
HRESULT CNomalJap::Pre_Setting(CGameObject* pObject)
|
||||
{
|
||||
if (pObject == nullptr)
|
||||
return E_FAIL;
|
||||
|
||||
/* 부모 할당 */
|
||||
m_pOwner = pObject;
|
||||
|
||||
/* 피직스 생성*/
|
||||
if (FAILED(Ready_Child()))
|
||||
return E_FAIL;
|
||||
|
||||
/* 초기 셋팅 초기화 */
|
||||
Reset_EffectParts();
|
||||
m_fAccTime = 0.f;
|
||||
__super::m_fAccTime = 0.f;
|
||||
m_fPreAccTime = 0.f;
|
||||
|
||||
|
||||
/* 초기 객체 위치 초기화 */
|
||||
m_pProjectile->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
m_pProjectile_Side->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
|
||||
/* 초기 객체 비지블 */
|
||||
m_pProjectile->Set_Visible(true);
|
||||
m_pProjectile_Side->Set_Visible(true);
|
||||
|
||||
/*트레일 초기화 */
|
||||
Get_PartObject<CTrailObject>()->Set_Visible(true);
|
||||
|
||||
Get_PartObject<CTrailObject>()->Get_Component<CTrail>()->Reset_Trail();
|
||||
|
||||
|
||||
//나아가는 벡터와 한점을 가져와 수직인 평면상에 하나의 점으로 DIR 을 만듬
|
||||
m_vOwnerLook = XMVector3Normalize(m_pOwner->Get_Component<CTransform>()->Get_State(STATE::LOOK));
|
||||
_vector vUp = XMVectorSet(0.f, 1.f, 0.f, 0.f);
|
||||
|
||||
|
||||
_vector vQuaternion = XMQuaternionRotationAxis(m_vOwnerLook, m_pGameInstance->Random_Float(0.f, XM_PIDIV2));
|
||||
|
||||
m_vRotateUp = XMVector3Rotate(vUp, vQuaternion);
|
||||
|
||||
m_vRotateUp = XMVector3Normalize(m_vRotateUp);
|
||||
|
||||
m_bVisible = true;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CNomalJap::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
@@ -85,10 +156,20 @@ HRESULT CNomalJap::Ready_Child()
|
||||
|
||||
XMStoreFloat3(&Desc.vPos, m_pOwner->Get_WorldPostion() + XMVectorSet(0.f, 0.f, 1.f, 0.f));
|
||||
|
||||
|
||||
_vector vOwnerLook = m_pOwner->Get_Component<CTransform>()->Get_State(STATE::LOOK);
|
||||
|
||||
_float3 vDir = {};
|
||||
|
||||
XMStoreFloat3(&Desc.vPos, m_pOwner->Get_WorldPostion() + XMVectorSet(0.f, 0.f, 1.f, 0.f));
|
||||
|
||||
XMStoreFloat3(&vDir, vOwnerLook * 0.6f);
|
||||
|
||||
|
||||
Desc.vRotRPY = { 0.f, 0.f, 0.f };
|
||||
Desc.iSubKind = 70;
|
||||
Desc.vDeltaPos = { 0.f, 0.f, 2.f };
|
||||
Desc.vLifeTime = { 0.f, 2.f };
|
||||
Desc.vDeltaPos = vDir;
|
||||
Desc.vLifeTime = { 0.f, 1.f };
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CDummy_PhysXEffectHitBox>(g_iStaticLevel, CURRENT_LEVEL, LAYER_HITBOX, &Desc, this , &m_pPhysHitBox))) {
|
||||
assert(false);
|
||||
@@ -132,11 +213,18 @@ void CNomalJap::OnCollision(CGameObject* pOther , void* pDesc)
|
||||
|
||||
for (auto& pPair : m_PartObjects)
|
||||
{
|
||||
|
||||
pPair.second->Set_Visible(true);
|
||||
pPair.second->Get_Component<CTransform>()->Set_State(STATE::POSITION, CollisionDesc->vWorldPos);
|
||||
}
|
||||
|
||||
m_PartObjects.begin()->second->Set_Visible(false);
|
||||
Get_PartObject<CEditEffect>("JapPT0")->Get_Component<CTransform>()->LookAt(m_pOwner->Get_WorldPostion());
|
||||
|
||||
m_pProjectile_Side->Set_Visible(false);
|
||||
m_pProjectile->Set_Visible(false);
|
||||
|
||||
Get_PartObject<CTrailObject>()->Set_Visible(false);
|
||||
Get_PartObject<CTrailObject>()->Get_Component<CTransform>()->Set_State(STATE::POSITION, XMVectorSet(0.f, 0.f, 0.f, 1.f));
|
||||
|
||||
m_pPhysHitBox->Set_Dead();
|
||||
}
|
||||
@@ -149,6 +237,9 @@ void CNomalJap::Free()
|
||||
// if (m_pPhysHitBox->Get_Depth() == false)
|
||||
// SAFE_RELEASE(m_pPhysHitBox);
|
||||
|
||||
Safe_Release(m_pProjectile);
|
||||
Safe_Release(m_pProjectile_Side);
|
||||
|
||||
}
|
||||
|
||||
void CNomalJap::Describe_Entity()
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#pragma endregion
|
||||
|
||||
#include "Bombard.h"
|
||||
#include "Layer.h"
|
||||
#include "EffectPool.h"
|
||||
|
||||
CPlayer::CPlayer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CUnit(pDevice, pContext)
|
||||
@@ -70,6 +72,10 @@ HRESULT CPlayer::Initialize(void* pArg)
|
||||
|
||||
m_pCallBack_Behavior->Initialize(m_pCharacter_Controller, m_pRigidBody);
|
||||
m_pCallBack_HitReport->Initialize(m_pCharacter_Controller, m_pRigidBody);
|
||||
|
||||
m_pEffectPool = m_pGameInstance->Get_Layer(NEXT_LEVEL, TEXT("Layer_EffectPool"))->Get_Object<CEffectPool>();
|
||||
SAFE_ADDREF(m_pEffectPool);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -284,6 +290,8 @@ void CPlayer::Free()
|
||||
SAFE_RELEASE(m_pCamPosition_TopDown_FollowPart);
|
||||
SAFE_RELEASE(m_pCamPosition_TopDown_LookPart);
|
||||
SAFE_RELEASE(m_pCamPosition_ShoulderPart);
|
||||
|
||||
SAFE_RELEASE(m_pEffectPool);
|
||||
}
|
||||
|
||||
void CPlayer::Describe_Entity()
|
||||
|
||||
@@ -20,8 +20,7 @@
|
||||
#include "State_Combat.h"
|
||||
#pragma endregion
|
||||
|
||||
#include "Bombard.h"
|
||||
#include "Decendo.h"
|
||||
#include "EffectPool.h"
|
||||
|
||||
#pragma region States
|
||||
void CPlayer::TestKeyInput(_float fTimeDelta)
|
||||
@@ -143,6 +142,7 @@ HRESULT CPlayer::Behavior_IdleExitCheck()
|
||||
}
|
||||
else if (m_pGameInstance->Mouse_Up(DIM_LBUTTON)) {
|
||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||
|
||||
}
|
||||
else if (m_pGameInstance->Key_Down(DIK_V)) {
|
||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||
@@ -431,6 +431,9 @@ void CPlayer::Behavior_CombatEnter()
|
||||
else if (m_pGameInstance->Mouse_Up(DIM_LBUTTON)) {
|
||||
m_pFSM->Enable_State(FSMSTATE::LIGHT_ATTACK);
|
||||
pairAnimInfo = m_Animation[STATEANIM::LIGHT_ATTACK];
|
||||
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::JAP, this);
|
||||
|
||||
}
|
||||
else if (SUCCEEDED(InputSpell())) {
|
||||
m_pFSM->Enable_State(FSMSTATE::SPELL);
|
||||
@@ -528,10 +531,7 @@ HRESULT CPlayer::Behavior_CombatExitCheck()
|
||||
case STATEANIM::ACCIO:
|
||||
pairAnimInfo = m_Animation[STATEANIM::ACCIO];
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBombard>(ENUM_CLASS(LEVEL::EFFECT), CURRENT_LEVEL, LAYER_HITBOX, nullptr, this))) {
|
||||
assert(false);
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::BOMBARD, this);
|
||||
|
||||
|
||||
break;
|
||||
@@ -539,10 +539,7 @@ HRESULT CPlayer::Behavior_CombatExitCheck()
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::DESCENDO];
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CDecendo>(ENUM_CLASS(LEVEL::EFFECT), CURRENT_LEVEL, LAYER_HITBOX, nullptr, this))) {
|
||||
assert(false);
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::DECENDO, this);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -20,6 +20,8 @@ class CBombard final : public CEffect_Container
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
|
||||
public:
|
||||
virtual HRESULT Pre_Setting(CGameObject* pObject) override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
|
||||
@@ -20,6 +20,8 @@ class CDecendo final : public CEffect_Container
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
|
||||
public:
|
||||
virtual HRESULT Pre_Setting(CGameObject* pObject) override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
|
||||
@@ -23,12 +23,14 @@ namespace Editor
|
||||
enum class SHADER_PASS_MESH { DEFAULT, SHADOW, SKYBOX, ALPHABLEND, EFFECT_ALPHABLEND, EFFECT_BLEND, EFFECT_ALPHABLEND_CULL, EFFECT_BLEND_CULL, CAPTURE, BLUR, EFFECT_ALPHABLEND_UVMOVE, MAPTOOL, GLASS, OUTLINE, END };
|
||||
enum class SHADER_PASS_NORTEX { DEFAULT, TERRAIN, END };
|
||||
enum class SHADER_PASS_PARTICLE { EXPLOSION, END };
|
||||
|
||||
enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, TRAIL_BLUR ,END };
|
||||
enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, ALPHA_BLEND, END };
|
||||
enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, ALPHA_BLEND, END };
|
||||
enum class SHADER_PASS_UIEDITOR { DEFAULT, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, SPELLTYPE, HPBAR, MAGIC_METER, MAGIC_ICON, REMOVEUV, REVELIO, POTION, MAGIC_ITEM, END };
|
||||
enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, MAGIC_METER, END };
|
||||
|
||||
enum class EFFECT_TYPE { EFFECT, TRAIL, END };
|
||||
enum class SKILL_TYPE{ JAP , BOMBARD , DECENDO , PROTEGO , END };
|
||||
}
|
||||
|
||||
using namespace Editor;
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "GameObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CLight;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CEffectPool final : public CGameObject
|
||||
{
|
||||
|
||||
private:
|
||||
CEffectPool(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CEffectPool(const CEffectPool& Prototype);
|
||||
virtual ~CEffectPool() = default;
|
||||
|
||||
public:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
public:
|
||||
HRESULT Create_Effect(SKILL_TYPE eType, _uint iNumEffect, _uint iPrototypeLevel, _uint iCloneLevel , function<class CEffect_Container*(_uint , _uint)> AddPrototypeEvent);
|
||||
HRESULT Use_Skill(SKILL_TYPE eType , CGameObject* pOwner);
|
||||
private:
|
||||
list<class CEffect_Container*> m_EffectList[ENUM_CLASS(SKILL_TYPE::END)] = {};
|
||||
list<class CEffect_Container*> m_ActiveEffectList = {};
|
||||
private:
|
||||
HRESULT Ready_Components();
|
||||
HRESULT Bind_ShaderResources();
|
||||
HRESULT Ready_Effect();
|
||||
public:
|
||||
static CEffectPool* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr) override;
|
||||
virtual void Free() override;
|
||||
virtual void Describe_Entity() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
|
||||
@@ -22,12 +22,15 @@ class CEffect_Container abstract : public CContainerObject
|
||||
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
|
||||
public:
|
||||
HRESULT Load_Directory(const _char* pPath);
|
||||
HRESULT Load_Package(const _char* pPath);
|
||||
virtual HRESULT Pre_Setting(CGameObject* pObject);
|
||||
protected:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
HRESULT Ready_Child();
|
||||
HRESULT Bind_ShaderResources() override;
|
||||
HRESULT Reset_EffectParts();
|
||||
|
||||
void Update_Event(_float fTimeDelta);
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ class CEffect_Editor final : public CEffect_Container
|
||||
HRESULT Ready_Child();
|
||||
HRESULT Bind_ShaderResources() override;
|
||||
private:
|
||||
HRESULT Packaging(const _char* pDirectoryPath);
|
||||
HRESULT ReSaveFile(const _char* pDirectoryPath);
|
||||
void ReadMaterials(const char* pDirectoryName);
|
||||
void ReadMaterial(_wstring wstrFileName, const char* pFilePath);
|
||||
|
||||
@@ -19,7 +19,8 @@ class CNomalJap final : public CEffect_Container
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
|
||||
public:
|
||||
virtual HRESULT Pre_Setting(CGameObject* pObject) override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
@@ -31,6 +32,15 @@ class CNomalJap final : public CEffect_Container
|
||||
private:
|
||||
_wstring m_wstrEffectName = {};
|
||||
class CDummy_PhysXEffectHitBox* m_pPhysHitBox = {};
|
||||
|
||||
class CPartObject* m_pProjectile = {};
|
||||
class CPartObject* m_pProjectile_Side = {};
|
||||
|
||||
_vector m_vRotateUp = {};
|
||||
_float m_fAccTime = {};
|
||||
_float m_fLerpAmount = {};
|
||||
_float m_fTurnValue = {};
|
||||
_vector m_vOwnerLook = {};
|
||||
public:
|
||||
static CNomalJap* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual void Free() override;
|
||||
|
||||
@@ -87,7 +87,8 @@ class CPlayer final : public CUnit
|
||||
void Behavior_CombatEnter();
|
||||
HRESULT Behavior_CombatExitCheck();
|
||||
void Behavior_CombatExit();
|
||||
|
||||
private:
|
||||
class CEffectPool* m_pEffectPool = nullptr;
|
||||
#pragma endregion
|
||||
};
|
||||
|
||||
|
||||
@@ -178,6 +178,15 @@ void CTrail::Trail_Update(_float fDeltaTime, _fmatrix WorldMatrix)
|
||||
|
||||
}
|
||||
|
||||
void CTrail::Reset_Trail()
|
||||
{
|
||||
ZeroMemory(m_pVertices, sizeof(VTXPOSTEX) * m_iNumVertices);
|
||||
ZeroMemory(&m_PreHigh, sizeof(_vector) * 2);
|
||||
ZeroMemory(&m_PreLow, sizeof(_vector) * 2);
|
||||
m_iNumCount = 0;
|
||||
m_fAccTime = 0.f;
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
HRESULT CTrail::Save_Trail(HANDLE hFile)
|
||||
{
|
||||
|
||||
@@ -19,6 +19,7 @@ class ENGINE_DLL CTrail final :
|
||||
|
||||
public:
|
||||
void Trail_Update(_float fDeltaTime, _fmatrix WorldMatrix);
|
||||
void Reset_Trail();
|
||||
|
||||
#ifdef _DEBUG
|
||||
HRESULT Save_Trail(HANDLE hFile);
|
||||
|
||||
Reference in New Issue
Block a user