Merge pull request #357 from SpicyGangjeong/Effect_Follow_1208
Effect follow 1208
This commit is contained in:
@@ -47,6 +47,8 @@ HRESULT CEffectPool::Initialize(void* pArg)
|
||||
if (FAILED(Ready_Effect())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
#include "State_Combat.h"
|
||||
#pragma endregion
|
||||
|
||||
#include "EffectParts.h"
|
||||
|
||||
|
||||
CGoblin::CGoblin(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CMonster(pDevice, pContext)
|
||||
@@ -296,6 +298,46 @@ HRESULT CGoblin::Ready_Parts()
|
||||
|
||||
Get_PartObject<CGoblin_Dagger>()->Set_Visible(false);
|
||||
|
||||
#pragma region EFFECT
|
||||
/* EFFECT */
|
||||
|
||||
CPartObject::PARTOBJECT_DESC PartsDesc{};
|
||||
|
||||
PartsDesc.pParentTransform = m_pTransformCom;
|
||||
|
||||
|
||||
|
||||
if (FAILED(Add_PartObject<CEffectParts>("Goblin_Particle",g_iStaticLevel, &m_pGoblin_Particle, &PartsDesc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pGoblin_Particle->Load("../Bin/Resources/Data/Effect/Goblin/GoblinSide/Goblin_Particle", static_cast<LEVEL>(NEXT_LEVEL));
|
||||
m_pGoblin_Particle->FollowParants(m_pModelCom->Get_BoneMatrixPtr("RightShoulder"));
|
||||
|
||||
|
||||
|
||||
if (FAILED(Add_PartObject<CEffectParts>("Goblin_Particle2", g_iStaticLevel, &m_pGoblin_Particle2, &PartsDesc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pGoblin_Particle2->Load("../Bin/Resources/Data/Effect/Goblin/GoblinSide/Goblin_Particle2", static_cast<LEVEL>(NEXT_LEVEL));
|
||||
m_pGoblin_Particle2->FollowParants(m_pModelCom->Get_BoneMatrixPtr("RightShoulder"));
|
||||
|
||||
|
||||
if (FAILED(Add_PartObject<CEffectParts>("Goblin_Smoke", g_iStaticLevel, &m_pSmoke, &PartsDesc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pSmoke->Load("../Bin/Resources/Data/Effect/Goblin/GoblinSide/Goblin_Smoke", static_cast<LEVEL>(NEXT_LEVEL));
|
||||
m_pSmoke->FollowParants(m_pModelCom->Get_BoneMatrixPtr("Spine2"));
|
||||
|
||||
|
||||
#pragma endregion
|
||||
return S_OK;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -813,6 +813,8 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
//#pragma region UI_ANI
|
||||
// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Altering_Spell"),
|
||||
// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Altering_Spell\\Altering_Spell%d.png"), 349))))
|
||||
@@ -1689,83 +1691,83 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#pragma region MAP_INSTANCE
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_SM_OakTree_MedA */
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_SM_OakTree_MedA"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_OakTree_MedA.bin",
|
||||
"../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_SM_BearBerry_A */
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_SM_BearBerry_A"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_BearBerry_A.bin",
|
||||
"../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_SM_HM_OwlPost_Window_A*/
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_SM_HM_OwlPost_Window_A"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_HM_OwlPost_Window_A.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_WA_Rectangle_Double_A*/
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_WA_Rectangle_Double_A"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_HM_WindowsStyleA_L_Rectangle_Double_A.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_WC_Retangle_Double_A*/
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_WC_Retangle_Double_A"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_HM_WindowsStyleC_Retangle_Double_A.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_WA_Square_Double_C*/
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_WA_Square_Double_C"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_HM_WindowsStyleA_L_Square_Double_C.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_Quid_Window_A*/
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_Quid_Window_A"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_HM_Quid_Window_A.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_Ollivanders_Box_Window*/
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_Ollivanders_Box_Window"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_HM_Ollivanders_Box_Window.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_WC_L_DoubleS_A*/
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_WC_L_DoubleS_A"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_HM_WindowsStyleC_L_Double_Single_A.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_WC_Round_Double_A*/
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_WC_Round_Double_A"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_HM_WindowsStyleC_Round_Double_A.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door1a*/
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door1a"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_HM_Door1a.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door2b*/
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door2b"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_HM_Door2b.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
#pragma endregion
|
||||
|
||||
//
|
||||
//#pragma region MAP_INSTANCE
|
||||
// /* For.Prototype_Component_VIBuffer_Model_Instancel_SM_OakTree_MedA */
|
||||
// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_SM_OakTree_MedA"),
|
||||
// CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
// "../Bin/Resources/Models/InstanceProp/SM_OakTree_MedA.bin",
|
||||
// "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
// return E_FAIL;
|
||||
//
|
||||
// /* For.Prototype_Component_VIBuffer_Model_Instancel_SM_BearBerry_A */
|
||||
// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_SM_BearBerry_A"),
|
||||
// CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
// "../Bin/Resources/Models/InstanceProp/SM_BearBerry_A.bin",
|
||||
// "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
// return E_FAIL;
|
||||
//
|
||||
// /* For.Prototype_Component_VIBuffer_Model_Instancel_SM_HM_OwlPost_Window_A*/
|
||||
// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_SM_HM_OwlPost_Window_A"),
|
||||
// CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
// "../Bin/Resources/Models/InstanceProp/SM_HM_OwlPost_Window_A.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
// return E_FAIL;
|
||||
//
|
||||
// /* For.Prototype_Component_VIBuffer_Model_Instancel_WA_Rectangle_Double_A*/
|
||||
// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_WA_Rectangle_Double_A"),
|
||||
// CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
// "../Bin/Resources/Models/InstanceProp/SM_HM_WindowsStyleA_L_Rectangle_Double_A.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
// return E_FAIL;
|
||||
//
|
||||
// /* For.Prototype_Component_VIBuffer_Model_Instancel_WC_Retangle_Double_A*/
|
||||
// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_WC_Retangle_Double_A"),
|
||||
// CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
// "../Bin/Resources/Models/InstanceProp/SM_HM_WindowsStyleC_Retangle_Double_A.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
// return E_FAIL;
|
||||
//
|
||||
// /* For.Prototype_Component_VIBuffer_Model_Instancel_WA_Square_Double_C*/
|
||||
// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_WA_Square_Double_C"),
|
||||
// CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
// "../Bin/Resources/Models/InstanceProp/SM_HM_WindowsStyleA_L_Square_Double_C.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
// return E_FAIL;
|
||||
//
|
||||
// /* For.Prototype_Component_VIBuffer_Model_Instancel_Quid_Window_A*/
|
||||
// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_Quid_Window_A"),
|
||||
// CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
// "../Bin/Resources/Models/InstanceProp/SM_HM_Quid_Window_A.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
// return E_FAIL;
|
||||
//
|
||||
// /* For.Prototype_Component_VIBuffer_Model_Instancel_Ollivanders_Box_Window*/
|
||||
// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_Ollivanders_Box_Window"),
|
||||
// CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
// "../Bin/Resources/Models/InstanceProp/SM_HM_Ollivanders_Box_Window.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
// return E_FAIL;
|
||||
//
|
||||
// /* For.Prototype_Component_VIBuffer_Model_Instancel_WC_L_DoubleS_A*/
|
||||
// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_WC_L_DoubleS_A"),
|
||||
// CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
// "../Bin/Resources/Models/InstanceProp/SM_HM_WindowsStyleC_L_Double_Single_A.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
// return E_FAIL;
|
||||
//
|
||||
// /* For.Prototype_Component_VIBuffer_Model_Instancel_WC_Round_Double_A*/
|
||||
// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_WC_Round_Double_A"),
|
||||
// CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
// "../Bin/Resources/Models/InstanceProp/SM_HM_WindowsStyleC_Round_Double_A.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
// return E_FAIL;
|
||||
//
|
||||
// /* For.Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door1a*/
|
||||
// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door1a"),
|
||||
// CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
// "../Bin/Resources/Models/InstanceProp/SM_HM_Door1a.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
// return E_FAIL;
|
||||
//
|
||||
// /* For.Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door2b*/
|
||||
// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door2b"),
|
||||
// CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
// "../Bin/Resources/Models/InstanceProp/SM_HM_Door2b.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
// return E_FAIL;
|
||||
//#pragma endregion
|
||||
//
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Box */
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Box"),
|
||||
|
||||
@@ -174,16 +174,16 @@ HRESULT CTroll::Render()
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
if (true == m_pCharacter_Controller->IsActive()) {
|
||||
if (FAILED(m_pCharacter_Controller->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (FAILED(m_pRigidBody->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
//if (true == m_pCharacter_Controller->IsActive()) {
|
||||
// if (FAILED(m_pCharacter_Controller->Render())) {
|
||||
// return E_FAIL;
|
||||
// }
|
||||
//}
|
||||
//else {
|
||||
// if (FAILED(m_pRigidBody->Render())) {
|
||||
// return E_FAIL;
|
||||
// }
|
||||
//}
|
||||
#endif
|
||||
|
||||
return S_OK;
|
||||
@@ -316,7 +316,7 @@ HRESULT CTroll::Ready_Parts()
|
||||
|
||||
|
||||
|
||||
/*if (FAILED(Add_PartObject<CEffectParts>("Troll_Particle", g_iStaticLevel, &m_pTroll_Particle, &PartsDesc)))
|
||||
if (FAILED(Add_PartObject<CEffectParts>("Troll_Particle", g_iStaticLevel, &m_pTroll_Particle, &PartsDesc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -350,7 +350,7 @@ HRESULT CTroll::Ready_Parts()
|
||||
|
||||
m_pLeft_Smoke->Load("../Bin/Resources/Data/Effect/Troll/TrollSide/Troll_Smoke", static_cast<LEVEL>(NEXT_LEVEL));
|
||||
m_pLeft_Smoke->FollowParants(m_pModelCom->Get_BoneMatrixPtr("LeftArm"));
|
||||
*/
|
||||
|
||||
#pragma endregion
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -40,6 +40,11 @@ class CGoblin final : public CMonster
|
||||
_float2 m_vStunTimer = { 0.f, 4.f };
|
||||
_uint iIndex;
|
||||
|
||||
|
||||
class CEffectParts* m_pSmoke = { nullptr };
|
||||
class CEffectParts* m_pGoblin_Particle = { nullptr };
|
||||
class CEffectParts* m_pGoblin_Particle2 = { nullptr };
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
@@ -420,7 +420,6 @@ void CEditEffect::Describe_Entity()
|
||||
{
|
||||
//여기서 모델, 텍스쳐, 선택할 수 있도록 함
|
||||
|
||||
|
||||
const char* pLerp[] = { "Linear" , "EaseInQuad", "EaseOutQuad", "EaseInCubic" , "EaseOutCubic" , "EaseInOutSin" , "EaseInBack" , "Expo" , "Circle" };
|
||||
const char* pRenderNames[] = { "PRIORITY" , "SHADOW", "NONBLEND", "DECAL", "BLUR" , "NONLIGHT" ,"EFFECT", "BLEND" ,"BLOOM" , "UI", "OCCLUSION" , "PRESHADOW"};
|
||||
const char* pEffectType[] = { "EFFECT" , "TRAIL" };
|
||||
@@ -432,6 +431,22 @@ void CEditEffect::Describe_Entity()
|
||||
_int iCurrentBloomType = static_cast<_int>(m_EffectInfo.eBloomType);
|
||||
_int iCurrentPass = static_cast<_int>(m_EffectInfo.eShaderPass);
|
||||
|
||||
|
||||
GUI::InputTextMultiline("BONE NAME", m_szBuffer, sizeof(m_szBuffer), ImVec2(250, 25));
|
||||
|
||||
m_strBoneName = m_szBuffer;
|
||||
|
||||
if(GUI::Button("Stick Bone"))
|
||||
{
|
||||
CModel* pModel = m_pOwner->Get_Component<CModel>();
|
||||
|
||||
if (pModel != nullptr)
|
||||
{
|
||||
FollowParants(pModel->Get_BoneMatrixPtr(m_strBoneName.c_str()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (ImGui::Combo("Render Order", &iCurrentItem, pRenderNames, ENUM_CLASS(RENDER::END)))
|
||||
{
|
||||
m_EffectInfo.eRenderOrder = static_cast<RENDER>(iCurrentItem);
|
||||
|
||||
@@ -715,9 +715,34 @@ HRESULT CEffectObject::LoadPre(const _char* pFilePath, LEVEL eLevel)
|
||||
}
|
||||
#endif // _DEBUG
|
||||
|
||||
void CEffectObject::FollowParants(const _float4x4* pParantsMat)
|
||||
{
|
||||
if (pParantsMat == nullptr)
|
||||
return;
|
||||
|
||||
|
||||
m_pPerentMatrix = pParantsMat;
|
||||
m_bVisible = true;
|
||||
}
|
||||
|
||||
|
||||
HRESULT CEffectObject::Bind_ShaderResources()
|
||||
{
|
||||
|
||||
if (m_pPerentMatrix != nullptr)
|
||||
{
|
||||
|
||||
_matrix socketMatrix = XMLoadFloat4x4(m_pPerentMatrix);
|
||||
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
socketMatrix.r[i] = XMVector3Normalize(socketMatrix.r[i]);
|
||||
}
|
||||
socketMatrix = socketMatrix * m_pParentTransformCom->Get_XMWorldMatrix();
|
||||
|
||||
m_pTransformCom->Set_State(STATE::POSITION, socketMatrix.r[3]);
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "Goblin.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "EditEffect.h"
|
||||
|
||||
#pragma region STATE
|
||||
#include "State_Idle.h"
|
||||
@@ -36,6 +37,9 @@ HRESULT CGoblin::Initialize(void* pArg)
|
||||
if (FAILED(Ready_Components()))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_Parts()))
|
||||
return E_FAIL;
|
||||
|
||||
Add_FSM();
|
||||
|
||||
Set_Anim();
|
||||
@@ -61,11 +65,15 @@ HRESULT CGoblin::Initialize(void* pArg)
|
||||
|
||||
void CGoblin::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
|
||||
m_pTransformCom->RewindMomentum();
|
||||
}
|
||||
|
||||
void CGoblin::Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Update(fTimeDelta);
|
||||
|
||||
m_pFSM->Update_State(fTimeDelta);
|
||||
|
||||
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
|
||||
@@ -169,6 +177,50 @@ HRESULT CGoblin::Ready_Components()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CGoblin::Ready_Parts()
|
||||
{
|
||||
#pragma region EFFECT
|
||||
/* EFFECT */
|
||||
|
||||
CPartObject::PARTOBJECT_DESC PartsDesc{};
|
||||
|
||||
PartsDesc.pParentTransform = m_pTransformCom;
|
||||
|
||||
|
||||
|
||||
if (FAILED(Add_PartObject<CEditEffect>("Goblin_Particle", ENUM_CLASS(LEVEL::EFFECT), &m_pTroll_Particle, &PartsDesc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pTroll_Particle->Load("../Bin/Resources/Data/Effect/Goblin/GoblinSide/Goblin_Particle", static_cast<LEVEL>(NEXT_LEVEL));
|
||||
m_pTroll_Particle->FollowParants(m_pModelCom->Get_BoneMatrixPtr("RightShoulder"));
|
||||
|
||||
|
||||
|
||||
if (FAILED(Add_PartObject<CEditEffect>("Goblin_Particle2", ENUM_CLASS(LEVEL::EFFECT), &m_pTroll_Particle2, &PartsDesc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pTroll_Particle2->Load("../Bin/Resources/Data/Effect/Goblin/GoblinSide/Goblin_Particle2", static_cast<LEVEL>(NEXT_LEVEL));
|
||||
m_pTroll_Particle2->FollowParants(m_pModelCom->Get_BoneMatrixPtr("RightShoulder"));
|
||||
|
||||
|
||||
if (FAILED(Add_PartObject<CEditEffect>("Goblin_Smoke", ENUM_CLASS(LEVEL::EFFECT), &m_pRight_Smoke, &PartsDesc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pRight_Smoke->Load("../Bin/Resources/Data/Effect/Goblin/GoblinSide/Goblin_Smoke", static_cast<LEVEL>(NEXT_LEVEL));
|
||||
m_pRight_Smoke->FollowParants(m_pModelCom->Get_BoneMatrixPtr("Spine2"));
|
||||
|
||||
|
||||
#pragma endregion
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
HRESULT CGoblin::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
|
||||
@@ -226,8 +278,37 @@ void CGoblin::Free()
|
||||
SAFE_RELEASE(m_pRigidBody);
|
||||
Safe_Delete(m_pCallBack_Behavior);
|
||||
Safe_Delete(m_pCallBack_HitReport);
|
||||
|
||||
SAFE_RELEASE(m_pTroll_Particle);
|
||||
SAFE_RELEASE(m_pTroll_Particle2);
|
||||
SAFE_RELEASE(m_pRight_Smoke);
|
||||
SAFE_RELEASE(m_pLeft_Smoke);
|
||||
}
|
||||
|
||||
void CGoblin::Describe_Entity()
|
||||
{
|
||||
for (auto& pComponent : m_Components)
|
||||
{
|
||||
if (GUI::TreeNode(typeid(*pComponent).name()))
|
||||
{
|
||||
pComponent->Describe_Entity();
|
||||
|
||||
GUI::TreePop();
|
||||
}
|
||||
}
|
||||
|
||||
_uint iIndex = {};
|
||||
|
||||
for (auto& pParts : m_PartObjects)
|
||||
{
|
||||
_string strName = to_string(iIndex++) + " : " + typeid(*pParts.second).name();
|
||||
|
||||
if (GUI::TreeNode(strName.c_str()))
|
||||
{
|
||||
pParts.second->Describe_Entity();
|
||||
|
||||
GUI::TreePop();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -32,16 +32,17 @@ HRESULT CMonster::Initialize(void* pArg)
|
||||
|
||||
void CMonster::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CMonster::Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CMonster::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Late_Update(fTimeDelta);
|
||||
//m_fTargetDistance = m_pTransformCom->TargetDis(m_pPlayerTransform->Get_State(STATE::POSITION));
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,168 @@
|
||||
#include "pch.h"
|
||||
#include "Troll_Attack.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "EditEffect.h"
|
||||
#include "Wand.h"
|
||||
#include "Player.h"
|
||||
|
||||
CTroll_Attack::CTroll_Attack(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CEffect_Container{ pDevice, pContext }
|
||||
{
|
||||
}
|
||||
|
||||
CTroll_Attack::CTroll_Attack(const CTroll_Attack& rhs)
|
||||
: CEffect_Container(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CTroll_Attack::Initialize_Prototype()
|
||||
{
|
||||
|
||||
return S_OK;
|
||||
|
||||
}
|
||||
|
||||
HRESULT CTroll_Attack::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/Troll_Attack")))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
m_wstrEffectName = L"Troll_Attack";
|
||||
|
||||
|
||||
m_fDuration = 1.5f;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CTroll_Attack::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
|
||||
}
|
||||
|
||||
void CTroll_Attack::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
|
||||
Update_Event(fTimeDelta);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void CTroll_Attack::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
|
||||
|
||||
}
|
||||
|
||||
HRESULT CTroll_Attack::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Pre_Setting(pObject, nullptr)))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CTroll_Attack::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CTroll_Attack::Ready_Child()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CTroll_Attack* CTroll_Attack::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CTroll_Attack* pInstance = new CTroll_Attack(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CTroll_Attack");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
|
||||
CGameObject* CTroll_Attack::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CTroll_Attack* pInstance = new CTroll_Attack(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CTroll_Attack");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CTroll_Attack::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
{
|
||||
_int iIndex = CollisionCheck();
|
||||
|
||||
if (iIndex < 0)
|
||||
return;
|
||||
|
||||
if (m_isCollisionEnter == true)
|
||||
return;
|
||||
|
||||
m_isCollisionEnter = true;
|
||||
|
||||
_vector vPos = XMVectorSet(m_Hitbuffer.touches[iIndex].position.x, m_Hitbuffer.touches[iIndex].position.y, m_Hitbuffer.touches[iIndex].position.z, 1.f);
|
||||
|
||||
|
||||
for (auto& pPair : m_PartObjects)
|
||||
{
|
||||
pPair.second->Set_Visible(true);
|
||||
pPair.second->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void CTroll_Attack::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
void CTroll_Attack::Describe_Entity()
|
||||
{
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
HRESULT CTroll_Attack::Bind_ShaderResources()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,6 +34,8 @@ class CEditEffect final : public CEffectObject
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
|
||||
private:
|
||||
_char m_szBuffer[MAX_PATH] = {};
|
||||
_string m_strBoneName = {};
|
||||
_int m_iSelectTextureNum = {};
|
||||
vector<_float> m_ValueVector = {};
|
||||
_float m_fInputValue = {};
|
||||
|
||||
@@ -249,6 +249,7 @@ class CEffectObject abstract : public CPartObject
|
||||
public:
|
||||
HRESULT Load(const _char* pFilePath, LEVEL eLevel);
|
||||
HRESULT Load();
|
||||
void FollowParants(const _float4x4* pParantsMat);
|
||||
public:
|
||||
#ifdef _DEBUG
|
||||
HRESULT LoadPre(const _char* pFilePath, LEVEL eLevel);
|
||||
@@ -274,7 +275,7 @@ class CEffectObject abstract : public CPartObject
|
||||
|
||||
CInstance_Model* m_pInstance_ModelCom = { nullptr };
|
||||
|
||||
|
||||
const _float4x4* m_pPerentMatrix = { nullptr };
|
||||
protected:
|
||||
EFFECT_INFO m_EffectInfo = {};
|
||||
_string m_strDiffuseName = {};
|
||||
|
||||
@@ -29,10 +29,15 @@ class CGoblin final : public CMonster
|
||||
CCharacter_Controller* m_pCharacter_Controller = { nullptr };
|
||||
CRigidBody_Dynamic* m_pRigidBody = { nullptr };
|
||||
|
||||
class CEditEffect* m_pRight_Smoke = { nullptr };
|
||||
class CEditEffect* m_pLeft_Smoke = { nullptr };
|
||||
class CEditEffect* m_pTroll_Particle = { nullptr };
|
||||
class CEditEffect* m_pTroll_Particle2 = { nullptr };
|
||||
|
||||
private:
|
||||
HRESULT Ready_Components();
|
||||
HRESULT Bind_ShaderResources();
|
||||
|
||||
HRESULT Ready_Parts();
|
||||
public:
|
||||
static CGoblin* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr) override;
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "Effect_Container.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CTroll_Attack final : public CEffect_Container
|
||||
{
|
||||
private:
|
||||
CTroll_Attack(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CTroll_Attack(const CTroll_Attack& rhs);
|
||||
virtual ~CTroll_Attack() = 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, void* pArg = nullptr) 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 = {};
|
||||
|
||||
public:
|
||||
static CTroll_Attack* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual void Free() override;
|
||||
CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
|
||||
void Describe_Entity() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -118,9 +118,24 @@ void CLayer::Describe_Entity()
|
||||
GUI::PushID(iter);
|
||||
if (GUI::SmallButton((to_string(iIndex) + " : " + typeid(*iter).name()).c_str())) {
|
||||
m_pGameInstance->Force_CamPosition(iter->Get_WorldPostion() - XMVectorSet(0.f, -1.f, 1.f, 0.f) * 10.f);
|
||||
|
||||
/* 클릭시 타겟으로 설정함 */
|
||||
m_pTargetObject = iter;
|
||||
|
||||
} iIndex++;
|
||||
GUI::PopID();
|
||||
}
|
||||
|
||||
/* 클릭한 객체의 컴포넌트 디스크립션을 부른다.*/
|
||||
if (m_pTargetObject != nullptr)
|
||||
{
|
||||
if(GUI::TreeNode(typeid(*m_pTargetObject).name()))
|
||||
{
|
||||
m_pTargetObject->Describe_Entity();
|
||||
|
||||
GUI::TreePop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -36,6 +36,11 @@ class ENGINE_DLL CLayer final : public CBase
|
||||
private:
|
||||
class CGameInstance* m_pGameInstance = { nullptr };
|
||||
list<class CGameObject*> m_ObjectList;
|
||||
|
||||
#ifdef _DEBUG
|
||||
private:
|
||||
class CGameObject* m_pTargetObject = { nullptr };
|
||||
#endif
|
||||
private:
|
||||
HRESULT Initialize();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user