commit
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "Troll_Nomal_Smoke.h"
|
||||
#include "TrollSwing.h"
|
||||
#include "Goblin_Protego.h"
|
||||
#include "Goblin_Attack.h"
|
||||
|
||||
CEffectPool::CEffectPool(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CGameObject(pDevice, pContext)
|
||||
@@ -304,6 +305,16 @@ HRESULT CEffectPool::Ready_MonsterEffect()
|
||||
|
||||
return pEffect; }
|
||||
))) return E_FAIL;
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::GOBLIN_ATTACK, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CGoblin_Attack* pEffect = nullptr;
|
||||
|
||||
pEffect = m_pGameInstance->Clone_Prototype<CGoblin_Attack>(iPrototypeLevel, nullptr);
|
||||
|
||||
return pEffect; }
|
||||
|
||||
))) return E_FAIL;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "Goblin_Dagger.h"
|
||||
#include "Goblin_Spector.h"
|
||||
#include "Effect_Container.h"
|
||||
#include "EffectPool.h"
|
||||
|
||||
#pragma region STATE
|
||||
#include "State_Idle.h"
|
||||
@@ -65,6 +66,9 @@ m_pCallBack_HitReport->Initialize(m_pCharacter_Controller, m_pRigidBody);
|
||||
|
||||
m_pCharacter_Controller->Set_Position(XMVectorSet(-40.f, 5.f, -20.f, 1.f));
|
||||
|
||||
m_pEffectPool = m_pGameInstance->Get_Layer(NEXT_LEVEL, TEXT("Layer_EffectPool"))->Get_Object<CEffectPool>();
|
||||
SAFE_ADDREF(m_pEffectPool);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -459,6 +463,7 @@ void CGoblin::Free()
|
||||
SAFE_RELEASE(m_pSmoke);
|
||||
SAFE_RELEASE(m_pGoblin_Particle);
|
||||
SAFE_RELEASE(m_pGoblin_Particle2);
|
||||
SAFE_RELEASE(m_pEffectPool);
|
||||
Safe_Delete(m_pCallBack_Behavior);
|
||||
Safe_Delete(m_pCallBack_HitReport);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "EffectParts.h"
|
||||
#include "Wand.h"
|
||||
#include "Player.h"
|
||||
#include "Goblin_BattleAxe.h"
|
||||
|
||||
CGoblin_Attack::CGoblin_Attack(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CEffect_Container{ pDevice, pContext }
|
||||
@@ -38,6 +39,8 @@ HRESULT CGoblin_Attack::Initialize(void* pArg)
|
||||
|
||||
m_wstrEffectName = L"TrollSwing";
|
||||
|
||||
m_pPT1 = Get_PartObject<CEffectParts>("Goblin_Particle");
|
||||
m_pPT2 = Get_PartObject<CEffectParts>("Goblin_Particle2");
|
||||
|
||||
m_fDuration = 2.f;
|
||||
|
||||
@@ -60,6 +63,13 @@ void CGoblin_Attack::Update(_float fTimeDelta)
|
||||
Update_Event(fTimeDelta);
|
||||
|
||||
|
||||
CGoblin_BattleAxe* pAxe = static_cast<CGoblin_BattleAxe*>(m_pOwner);
|
||||
|
||||
_float4x4 AxeMat = pAxe->Get_AxeMatrix();
|
||||
|
||||
m_pPT1->Get_Component<CTransform>()->Set_WorldMatrix(XMLoadFloat4x4(&AxeMat));
|
||||
m_pPT2->Get_Component<CTransform>()->Set_WorldMatrix(XMLoadFloat4x4(&AxeMat));
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -77,10 +87,13 @@ HRESULT CGoblin_Attack::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Pre_Setting(pObject, nullptr)))
|
||||
return E_FAIL;
|
||||
|
||||
CGoblin_BattleAxe* pAxe = static_cast<CGoblin_BattleAxe*>(m_pOwner);
|
||||
|
||||
_float4x4 AxeMat = pAxe->Get_AxeMatrix();
|
||||
|
||||
m_pPT1 = Get_PartObject<CEffectParts>("Goblin_Particle");
|
||||
m_pPT2 = Get_PartObject<CEffectParts>("Goblin_Particle2");
|
||||
|
||||
m_pPT1->Get_Component<CTransform>()->Set_WorldMatrix(XMLoadFloat4x4(&AxeMat));
|
||||
m_pPT2->Get_Component<CTransform>()->Set_WorldMatrix(XMLoadFloat4x4(&AxeMat));
|
||||
|
||||
m_pPT1->Set_Visible(true);
|
||||
m_pPT2->Set_Visible(true);
|
||||
|
||||
@@ -67,6 +67,16 @@ void CGoblin_BattleAxe::Update(_float fTimeDelta)
|
||||
m_bVisible = false;
|
||||
}
|
||||
}
|
||||
|
||||
_matrix AxeMat = XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("Bone"));
|
||||
|
||||
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
AxeMat.r[i] = XMVector3Normalize(AxeMat.r[i]);
|
||||
}
|
||||
|
||||
XMStoreFloat4x4(&m_vAxeMat, AxeMat * m_pTransformCom->Get_XMWorldMatrix());
|
||||
|
||||
}
|
||||
|
||||
void CGoblin_BattleAxe::Late_Update(_float fTimeDelta)
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
#include "Goblin_Spector.h"
|
||||
#include "EffectParts.h"
|
||||
|
||||
#include "EffectPool.h"
|
||||
#include "Goblin_BattleAxe.h"
|
||||
|
||||
#pragma region STATE
|
||||
#include "State_Idle.h"
|
||||
#include "State_IdleBreak.h"
|
||||
@@ -239,6 +242,8 @@ void CGoblin::Behavior_SwingEnter()
|
||||
[this]() {
|
||||
m_pGoblinSpector->Set_Visible(true);
|
||||
m_pGoblinSpector->Spector_Trail_Visible(true);
|
||||
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::GOBLIN_ATTACK, m_pGoblinSpector->Get_PartObject<CGoblin_BattleAxe>());
|
||||
},
|
||||
0.05f);
|
||||
|
||||
|
||||
@@ -131,6 +131,7 @@
|
||||
|
||||
#include "WandEnd.h"
|
||||
#include "Goblin_Protego.h"
|
||||
#include "Goblin_Attack.h"
|
||||
|
||||
|
||||
|
||||
@@ -1522,6 +1523,10 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CGoblin_Attack>(NEXT_LEVEL, CGoblin_Attack::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CWandEnd>(NEXT_LEVEL, CWandEnd::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,8 @@ class CGoblin final : public CMonster
|
||||
CRigidBody_Dynamic* m_pRigidBody = { nullptr };
|
||||
_float2 m_vStunTimer = { 0.f, 4.f };
|
||||
_uint iIndex;
|
||||
|
||||
private:
|
||||
class CEffectPool* m_pEffectPool = nullptr;
|
||||
|
||||
class CEffectParts* m_pSmoke = { nullptr };
|
||||
class CEffectParts* m_pGoblin_Particle = { nullptr };
|
||||
|
||||
@@ -26,6 +26,7 @@ class CGoblin_BattleAxe final : public CPartObject
|
||||
virtual HRESULT Render() override;
|
||||
HRESULT Render_Disolve();
|
||||
void Set_Disolve(_bool bDisolve) { m_bDisolve = bDisolve; }
|
||||
const _float4x4 Get_AxeMatrix() { return m_vAxeMat; };
|
||||
public:
|
||||
|
||||
private:
|
||||
@@ -35,6 +36,7 @@ class CGoblin_BattleAxe final : public CPartObject
|
||||
_bool m_bDisolve = { false };
|
||||
_float m_fDisolveTime = { 0.f };
|
||||
|
||||
_float4x4 m_vAxeMat= {};
|
||||
|
||||
private:
|
||||
HRESULT Ready_Components();
|
||||
|
||||
Reference in New Issue
Block a user