diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj
index e9bd1f049..5624edbf0 100644
--- a/Jusin154_Team3D/Client/Default/Client.vcxproj
+++ b/Jusin154_Team3D/Client/Default/Client.vcxproj
@@ -172,6 +172,7 @@ call Update_Resources.bat
+
@@ -182,6 +183,7 @@ call Update_Resources.bat
+
@@ -296,7 +298,10 @@ call Update_Resources.bat
+
+
+
@@ -324,6 +329,7 @@ call Update_Resources.bat
+
@@ -334,6 +340,7 @@ call Update_Resources.bat
+
@@ -450,7 +457,10 @@ call Update_Resources.bat
+
+
+
diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
index ef2df21d6..d9e585b21 100644
--- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
+++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
@@ -406,6 +406,10 @@
02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Mage
+
+
+ 02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Spector
+
02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Spector
@@ -445,6 +449,25 @@
02.GameObjects\Item\Goblin_Axe
+
+ 02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Warrior
+
+
+ 02.GameObjects\Effect\MonsterEffect\Goblin_Protego
+
+
+ 02.GameObjects\Effect\MonsterEffect\Troll_Nomal_Smoke
+
+
+ 02.GameObjects\Effect\MonsterEffect\Troll_Rush_Hit
+
+
+ 02.GameObjects\Effect\MonsterEffect\TrollSwing
+
+
+
+ 02.GameObjects\Effect\Effects\WandEnd
+
@@ -923,6 +946,21 @@
{234b3dd8-4ec9-4e81-ac7f-4eacb8f53780}
+
+ {f174b2c8-8e1e-4922-9030-6b737be74117}
+
+
+ {e36cd3e4-7cd6-4a64-b343-363e83f1b2a4}
+
+
+ {60a4bad6-39d5-4c4a-8513-811ccb7ecc57}
+
+
+ {e78334fb-6e32-41fc-a856-865b91c9d8c6}
+
+
+ {7bd8bc85-e56c-40fc-b1a6-6e09da46897f}
+
{3f4bde42-c5a0-4c7a-8dde-23e0725534c9}
@@ -944,6 +982,7 @@
{e12337a6-7563-4615-a8d2-a2e2e1ba1ca8}
+
{ec267143-0bc1-4765-b8dc-6cccc50385d7}
@@ -956,6 +995,9 @@
{e666a8b4-c92e-48ee-b63b-40d852b27b06}
+
+ {14ad0431-680b-4c8b-93d7-601aee5ce435}
+
@@ -1363,6 +1405,30 @@
02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Spector
+
+ 02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Warrior
+
+
+ 02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Warrior
+
+
+ 02.GameObjects\Effect\MonsterEffect\Goblin_Protego
+
+
+ 02.GameObjects\Effect\MonsterEffect\Troll_Nomal_Smoke
+
+
+ 02.GameObjects\Effect\MonsterEffect\Troll_Rush_Hit
+
+
+ 02.GameObjects\Effect\MonsterEffect\TrollSwing
+
+
+
+ 02.GameObjects\Effect\Effects\WandEnd
+
+
+
02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Warrior
diff --git a/Jusin154_Team3D/Client/Private/Bombard.cpp b/Jusin154_Team3D/Client/Private/Bombard.cpp
index b0869da87..099f606d5 100644
--- a/Jusin154_Team3D/Client/Private/Bombard.cpp
+++ b/Jusin154_Team3D/Client/Private/Bombard.cpp
@@ -5,6 +5,7 @@
#include "EffectParts.h"
#include "Wand.h"
#include "Player.h"
+#include "InfoInstance.h"
CBombard::CBombard(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CEffect_Container{ pDevice, pContext }
@@ -12,7 +13,8 @@ CBombard::CBombard(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
}
CBombard::CBombard(const CBombard& rhs)
- : CEffect_Container(rhs)
+ : CEffect_Container(rhs),
+ m_pInfoInstance(CInfoInstance::GetInstance())
{
}
@@ -66,7 +68,7 @@ void CBombard::Update(_float fTimeDelta)
CTransform* pPJTransform = m_pLight_Projectile->Get_Component();
- pPJTransform->Translation(m_vCameraLook * 2.f);
+ pPJTransform->Translation( XMLoadFloat3(&m_vCameraLook) * m_fLinearSpeed);
}
@@ -110,8 +112,6 @@ HRESULT CBombard::Pre_Setting(CGameObject* pObject, void* pArg)
CPartObject* pShootPt = Get_PartObject("Bombard_Shoot_Pt");
CPartObject* pCircle0 = Get_PartObject("Bombard_Circle0");
- m_vCameraLook = m_pOwner->Get_Component()->Get_State(STATE::LOOK);
-
pShootPt->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
m_pLight_Projectile->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
@@ -122,7 +122,26 @@ HRESULT CBombard::Pre_Setting(CGameObject* pObject, void* pArg)
m_pLight_Projectile->Set_Visible(true);
- // 건드린 친구들 순서대로 다 가져옴 ( 정렬은 안되어있음 )
+ _vector vDirection = m_pOwner->Get_Component()->Get_State(STATE::LOOK);
+ XMStoreFloat3(&m_vCameraLook, vDirection);
+
+ _vector vStartPos = pWand->Get_WorldPostion();
+ XMStoreFloat4(&m_vStartPos, vStartPos);
+
+ { /* 대상 위치 지정 */
+
+ CUnit* pTargetUnit = m_pInfoInstance->Get_LockOnUnit();
+ if (nullptr != pTargetUnit) {
+
+ XMStoreFloat4(&m_vTargetPos, pTargetUnit->Get_LockOnPos());
+
+ XMStoreFloat3(&m_vCameraLook, XMVector3Normalize(XMLoadFloat4(&m_vTargetPos) - XMLoadFloat4(&m_vStartPos)));
+ }
+ else {
+ // 타겟이 없다면 현재위치 -> 카메라 룩벡터 * duration간 예상 이동거리 를 대상으로 지정
+ XMStoreFloat4(&m_vTargetPos, vStartPos + vDirection * m_fLinearSpeed * 0.5f);
+ }
+ }
return S_OK;
diff --git a/Jusin154_Team3D/Client/Private/Decendo.cpp b/Jusin154_Team3D/Client/Private/Decendo.cpp
index 618bc1b54..571ab662f 100644
--- a/Jusin154_Team3D/Client/Private/Decendo.cpp
+++ b/Jusin154_Team3D/Client/Private/Decendo.cpp
@@ -158,6 +158,8 @@ HRESULT CDecendo::Pre_Setting(CGameObject* pObject, void* pArg)
XMStoreFloat3(&m_vCameraLook, vDirection);
+
+
{ /* 대상 위치 지정 */
CUnit* pTargetUnit = m_pInfoInstance->Get_LockOnUnit();
diff --git a/Jusin154_Team3D/Client/Private/EffectObject.cpp b/Jusin154_Team3D/Client/Private/EffectObject.cpp
index 7d9f66942..8070bcf6b 100644
--- a/Jusin154_Team3D/Client/Private/EffectObject.cpp
+++ b/Jusin154_Team3D/Client/Private/EffectObject.cpp
@@ -509,6 +509,8 @@ HRESULT CEffectObject::Bind_ShaderResources()
socketMatrix = socketMatrix * m_pParentTransformCom->Get_XMWorldMatrix();
m_pTransformCom->Set_State(STATE::POSITION, socketMatrix.r[3]);
+
+
}
diff --git a/Jusin154_Team3D/Client/Private/EffectPool.cpp b/Jusin154_Team3D/Client/Private/EffectPool.cpp
index bfbf9fa75..af9aa87d6 100644
--- a/Jusin154_Team3D/Client/Private/EffectPool.cpp
+++ b/Jusin154_Team3D/Client/Private/EffectPool.cpp
@@ -17,6 +17,12 @@
#include "NomalJapSide.h"
#include "Lumos.h"
+#include "WandEnd.h"
+
+#include "Troll_Rush_Hit.h"
+#include "Troll_Nomal_Smoke.h"
+#include "TrollSwing.h"
+#include "Goblin_Protego.h"
CEffectPool::CEffectPool(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CGameObject(pDevice, pContext)
@@ -48,6 +54,10 @@ HRESULT CEffectPool::Initialize(void* pArg)
return E_FAIL;
}
+ if (FAILED(Ready_MonsterEffect())) {
+ return E_FAIL;
+ }
+
return S_OK;
}
@@ -239,11 +249,64 @@ HRESULT CEffectPool::Ready_Effect()
return pEffect; }
))) return E_FAIL;
+
+ if (FAILED(Create_Effect(SKILL_TYPE::WAND_END, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
+
+ CWandEnd* pEffect = nullptr;
+
+ pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr);
+
+ return pEffect; }
+ ))) return E_FAIL;
+
#endif // !기무리
return S_OK;
}
+HRESULT CEffectPool::Ready_MonsterEffect()
+{
+
+
+ if (FAILED(Create_Effect(SKILL_TYPE::TROLL_ATTACK, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
+
+ CTrollSwing* pEffect = nullptr;
+
+ pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr);
+
+ return pEffect; }
+ ))) return E_FAIL;
+
+ if (FAILED(Create_Effect(SKILL_TYPE::TROLL_NOMAL_SMOKE, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
+
+ CTroll_Nomal_Smoke* pEffect = nullptr;
+
+ pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr);
+
+ return pEffect; }
+ ))) return E_FAIL;
+
+ if (FAILED(Create_Effect(SKILL_TYPE::TROLL_RUSH_HIT, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
+
+ CTroll_Rush_Hit* pEffect = nullptr;
+
+ pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr);
+
+ return pEffect; }
+ ))) return E_FAIL;
+
+
+ if (FAILED(Create_Effect(SKILL_TYPE::GOBLIN_PROTEGO, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
+
+ CGoblin_Protego* pEffect = nullptr;
+
+ pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr);
+
+ return pEffect; }
+ ))) return E_FAIL;
+ return S_OK;
+}
+
HRESULT CEffectPool::Create_Effect(SKILL_TYPE eType, _uint iNumEffect, _uint iPrototypeLevel, _uint iCloneLevel, function AddPrototypeEvent)
{
for (_uint i = 0; i < iNumEffect; i++)
diff --git a/Jusin154_Team3D/Client/Private/Goblin_Mage_States.cpp b/Jusin154_Team3D/Client/Private/Goblin_Mage_States.cpp
index 0c3002a0c..7da4a452f 100644
--- a/Jusin154_Team3D/Client/Private/Goblin_Mage_States.cpp
+++ b/Jusin154_Team3D/Client/Private/Goblin_Mage_States.cpp
@@ -30,7 +30,7 @@ HRESULT CGoblin_Mage::Behavior_IdleExitCheck()
if (m_fTargetDistance <= 20.f && m_fTargetDistance != 0.f)
{
m_vOriginPos = m_pTransformCom->Get_State(STATE::POSITION);
- m_pEffectPool->Use_Skill(SKILL_TYPE::PROTEGO, this);
+ m_pEffectPool->Use_Skill(SKILL_TYPE::GOBLIN_PROTEGO, this);
m_pFSM->Change_State(FSMSTATE::MOVE);
}
diff --git a/Jusin154_Team3D/Client/Private/Goblin_Protego.cpp b/Jusin154_Team3D/Client/Private/Goblin_Protego.cpp
new file mode 100644
index 000000000..4bcbad546
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/Goblin_Protego.cpp
@@ -0,0 +1,202 @@
+#include "pch.h"
+#include "Goblin_Protego.h"
+
+#include "GameInstance.h"
+#include "EffectParts.h"
+
+
+CGoblin_Protego::CGoblin_Protego(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CEffect_Container{ pDevice, pContext }
+{
+}
+
+CGoblin_Protego::CGoblin_Protego(const CGoblin_Protego& rhs)
+ : CEffect_Container(rhs)
+{
+}
+
+HRESULT CGoblin_Protego::Initialize_Prototype()
+{
+
+ return S_OK;
+
+}
+
+HRESULT CGoblin_Protego::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/MonsterPackage/GoblinProtego")))
+ return E_FAIL;
+
+ m_pSphere = Get_PartObject("ProtegoSphere");
+ m_pBottom = Get_PartObject("ProtegoBottom");
+ m_pCircle = Get_PartObject("ProtegoCircle");
+
+ SAFE_ADDREF(m_pSphere);
+ SAFE_ADDREF(m_pBottom);
+ SAFE_ADDREF(m_pCircle);
+
+ m_wstrEffectName = L"Goblin_Protego";
+
+
+ m_fAmountSize = 0.1f;
+ m_fSpeed = 5.f;
+
+ m_fDuration = 3.f;
+
+ return S_OK;
+}
+
+void CGoblin_Protego::Priority_Update(_float fTimeDelta)
+{
+ __super::Priority_Update(fTimeDelta);
+
+}
+
+void CGoblin_Protego::Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ m_pSphere->Get_Component()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
+ m_pBottom->Get_Component()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
+ m_pCircle-> Get_Component()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
+
+ __super::Update(fTimeDelta);
+
+ Update_Event(fTimeDelta);
+
+
+
+ /* 시작 사이즈 러프 */
+ if (m_fSizeAccTime > XM_PIDIV2)
+ return;
+
+ m_fSizeAccTime += fTimeDelta * m_fSpeed;
+
+ _float fSize = 1 + sinf(m_fSizeAccTime) * m_fAmountSize;
+ _float3 vSize = _float3(fSize, fSize, fSize);
+
+ m_pSphere->Get_Component()->Set_Scale(vSize);
+ m_pCircle->Get_Component()->Set_Scale(vSize);
+}
+
+void CGoblin_Protego::Late_Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Late_Update(fTimeDelta);
+
+
+}
+
+HRESULT CGoblin_Protego::Pre_Setting(CGameObject* pObject, void* pArg)
+{
+ if (FAILED(__super::Pre_Setting(pObject, nullptr)))
+ return E_FAIL;
+
+ m_pSphere->Get_Component()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
+ m_pBottom->Get_Component()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
+ m_pCircle->Get_Component()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
+
+ m_pSphere->Set_Visible(true);
+ m_pCircle->Set_Visible(true);
+ m_pBottom->Set_Visible(true);
+
+
+ _float3 vSize = _float3(1.f, 1.f, 1.f);
+ m_pSphere->Get_Component()->Set_Scale(vSize);
+ m_pCircle->Get_Component()->Set_Scale(vSize);
+
+ m_fSizeAccTime = 0.f;
+
+ return S_OK;
+}
+
+HRESULT CGoblin_Protego::Ready_Components(void* pArg)
+{
+ if (FAILED(__super::Ready_Components(pArg))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CGoblin_Protego::Ready_Child()
+{
+ return S_OK;
+}
+
+CGoblin_Protego* CGoblin_Protego::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CGoblin_Protego* pInstance = new CGoblin_Protego(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CGoblin_Protego");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+
+CGameObject* CGoblin_Protego::Clone(void* pArg, CGameObject* pOwner)
+{
+ CGoblin_Protego* pInstance = new CGoblin_Protego(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CGoblin_Protego");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CGoblin_Protego::OnCollision(CGameObject* pOther, void* pDesc)
+{
+ //CTransform* pOtherTransform = p
+ ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc);
+
+}
+
+void CGoblin_Protego::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);
+
+}
+#ifdef _DEBUG
+
+void CGoblin_Protego::Describe_Entity()
+{
+ GUI::Begin("PROTEGO");
+
+ GUI::DragFloat("fAmountSize" ,&m_fAmountSize);
+ GUI::DragFloat("fSpeed" , &m_fSpeed);
+
+ GUI::End();
+}
+
+#endif // _DEBUG
+
+HRESULT CGoblin_Protego::Bind_ShaderResources()
+{
+ return S_OK;
+}
+
+
diff --git a/Jusin154_Team3D/Client/Private/Levioso.cpp b/Jusin154_Team3D/Client/Private/Levioso.cpp
index 6813d4568..a2a1a4a4a 100644
--- a/Jusin154_Team3D/Client/Private/Levioso.cpp
+++ b/Jusin154_Team3D/Client/Private/Levioso.cpp
@@ -6,6 +6,7 @@
#include "Player.h"
#include "TrailObject.h"
#include "Wand.h"
+#include "InfoInstance.h"
CLevioso::CLevioso(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
@@ -14,7 +15,8 @@ CLevioso::CLevioso(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
}
CLevioso::CLevioso(const CLevioso& rhs)
- : CEffect_Container(rhs)
+ : CEffect_Container(rhs),
+ m_pInfoInstance(CInfoInstance::GetInstance())
{
}
@@ -74,11 +76,8 @@ void CLevioso::Update(_float fTimeDelta)
Update_Event(fTimeDelta);
- m_pLeviosoPJ_0->Get_Component()->Translation(m_vOwnerLook * 0.25f);
-
-
- m_pTrail_PT_0->Get_Component()->Translation(m_vOwnerLook * 0.25f);
-
+ m_pLeviosoPJ_0->Get_Component()->Translation(XMLoadFloat3(&m_vCameraLook) * m_fLinearSpeed);
+ m_pTrail_PT_0->Get_Component()->Translation(XMLoadFloat3(&m_vCameraLook) * m_fLinearSpeed);
_matrix WorldMat = m_pTrail_PT_0->Get_Component()->Get_XMWorldMatrix();
@@ -108,8 +107,6 @@ void CLevioso::Late_Update(_float fTimeDelta)
}
__super::Late_Update(fTimeDelta);
-
-
}
HRESULT CLevioso::Pre_Setting(CGameObject* pObject, void* pArg)
@@ -129,9 +126,6 @@ HRESULT CLevioso::Pre_Setting(CGameObject* pObject, void* pArg)
CEffectParts* pWandLight = Get_PartObject("Levioso_Wand_Light");
- m_pLeviosoPJ_0->Get_Component()->Set_WorldMatrix(m_pOwner->Get_Component()->Get_XMWorldMatrix());
- m_pTrail_PT_0->Get_Component()->Set_WorldMatrix(m_pOwner->Get_Component()->Get_XMWorldMatrix());
-
m_pLeviosoPJ_0->Get_Component()->Set_State(STATE::POSITION, WandPos);
m_pTrail_PT_0->Get_Component()->Set_State(STATE::POSITION, WandPos);
@@ -146,6 +140,38 @@ HRESULT CLevioso::Pre_Setting(CGameObject* pObject, void* pArg)
m_vOwnerLook = XMVector3Normalize(m_pOwner->Get_Component()->Get_State(STATE::LOOK));
+ _vector vDirection = m_pOwner->Get_Component()->Get_State(STATE::LOOK);
+ XMStoreFloat3(&m_vCameraLook, vDirection);
+
+ _vector vStartPos = WandPos;
+ XMStoreFloat4(&m_vStartPos, vStartPos);
+
+ { /* 대상 위치 지정 */
+
+ CUnit* pTargetUnit = m_pInfoInstance->Get_LockOnUnit();
+ if (nullptr != pTargetUnit) {
+
+ XMStoreFloat4(&m_vTargetPos, pTargetUnit->Get_LockOnPos());
+
+ XMStoreFloat3(&m_vCameraLook, XMVector3Normalize(XMLoadFloat4(&m_vTargetPos) - XMLoadFloat4(&m_vStartPos)));
+ }
+ else {
+ // 타겟이 없다면 현재위치 -> 카메라 룩벡터 * duration간 예상 이동거리 를 대상으로 지정
+ XMStoreFloat4(&m_vTargetPos, vStartPos + vDirection * m_fLinearSpeed * 0.5f);
+ }
+
+ }
+
+ _vector vDir = XMVector3Normalize(XMLoadFloat3(&m_vCameraLook));
+
+ _vector vRight = XMVector3Normalize(XMVector3Cross(XMVectorSet(0.f, 1.f, 0.f, 0.f), vDir));
+
+ _vector vUp = XMVector3Normalize(XMVector3Cross(vRight, vDir));
+
+ _matrix ProjMat = _matrix(vRight, vUp, vDir, vStartPos);
+
+ m_pLeviosoPJ_0->Get_Component()->Set_WorldMatrix(ProjMat);
+
return S_OK;
}
diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp
index 631873f45..f2e55036a 100644
--- a/Jusin154_Team3D/Client/Private/Loader.cpp
+++ b/Jusin154_Team3D/Client/Private/Loader.cpp
@@ -126,6 +126,14 @@
#include "Lumos.h"
+#include "TrollSwing.h"
+#include "Troll_Nomal_Smoke.h"
+#include "Troll_Rush_Hit.h"
+
+#include "WandEnd.h"
+#include "Goblin_Protego.h"
+
+
#pragma endregion
@@ -1502,7 +1510,22 @@ HRESULT CLoader::Loading_For_GamePlay()
return E_FAIL;
}
+ if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CTrollSwing::Create(m_pDevice, m_pContext)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CTroll_Nomal_Smoke::Create(m_pDevice, m_pContext)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CTroll_Rush_Hit::Create(m_pDevice, m_pContext)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CGoblin_Protego::Create(m_pDevice, m_pContext)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CWandEnd::Create(m_pDevice, m_pContext)))) {
+ return E_FAIL;
+ }
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CEffectPool::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
diff --git a/Jusin154_Team3D/Client/Private/Player_States.cpp b/Jusin154_Team3D/Client/Private/Player_States.cpp
index ff2b474cf..a5cc803b3 100644
--- a/Jusin154_Team3D/Client/Private/Player_States.cpp
+++ b/Jusin154_Team3D/Client/Private/Player_States.cpp
@@ -323,7 +323,7 @@ void CPlayer::Behavior_MoveEnter()
m_bSprintToggle = false;
m_bWalkToggle = false;
pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
- //m_bRatio = true;
+ m_bRatio = true;
}
}
else { // While Moving
@@ -732,13 +732,12 @@ void CPlayer::Behavior_DodgeEnter()
HRESULT CPlayer::Behavior_DodgeExitCheck()
{
- _float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio();
if (m_pModelCom->IsFinishedAnim()) {
m_pFSM->Change_State(FSMSTATE::IDLE);
return E_FAIL;
}
- if (SUCCEEDED(InputMove()) && fRatio>=0.32f) {
+ if (SUCCEEDED(InputMove()) && IsCurrentKeyFrame("Throw")) {
m_pFSM->Change_State(FSMSTATE::MOVE);
return E_FAIL;
}
@@ -908,7 +907,7 @@ void CPlayer::Behavior_LightAttackEnter()
Add_Event(pairAnimInfo.first,
[this]() {_uint iIndex = 0; m_pEffectPool->Use_Skill(SKILL_TYPE::JAP, Get_PartObject(), &iIndex); },
- 0.08f);
+ 0.1f);
Add_Event(pairAnimInfo.first,
[this]() { m_pEffectPool->Use_Skill(SKILL_TYPE::JAP_SIDE, Get_PartObject()); },
@@ -930,7 +929,7 @@ HRESULT CPlayer::Behavior_LightAttackExitCheck()
pairAnimInfo = m_Animation[STATEANIM::LIGHT_ATTACK];
pairAnimInfo.first = iNext;
- if (fRatio >= 0.1f)
+ if (fRatio >= 0.2f)
{
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
@@ -1058,13 +1057,26 @@ void CPlayer::Behavior_SpellEnter()
}
break;
default:
+
pairAnimInfo = m_Animation[STATEANIM::SPELL_FAIL];
+
+ Add_Event(pairAnimInfo.first,
+ [this]() { m_pEffectPool->Use_Skill(SKILL_TYPE::WAND_END, Get_PartObject()); },
+ 0.2f);
+
+
break;
}
}
else
{
pairAnimInfo = m_Animation[STATEANIM::SPELL_FAIL];
+
+ Add_Event(pairAnimInfo.first,
+ [this]() { m_pEffectPool->Use_Skill(SKILL_TYPE::WAND_END, Get_PartObject()); },
+ 0.2f);
+
+
}
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
@@ -1453,41 +1465,8 @@ void CPlayer::Add_FSM()
Desc.funcExitCheck = [this](_float fTimeDelta) { return Behavior_DodgeExitCheck(); };
Desc.funcExitEvent = [this]() { Behavior_DodgeExit(); };
Desc.funcPriorityUpdate = [this](_float fTimeDelta) {
-
- _vector xmvInputDir = XMVectorZero();
-
- _vector xmvCamLook = XMVector4Normalize(XMVectorSet(m_vCameraLookDir.x, 0.f, m_vCameraLookDir.z, 0.f));
- _vector xmvCamRight = XMVector4Normalize(XMVectorSet(m_vCameraRightDir.x, 0.f, m_vCameraRightDir.z, 0.f));
-
- if (m_pGameInstance->Key_Pressing(DIK_W))
- xmvInputDir += xmvCamLook;
- if (m_pGameInstance->Key_Pressing(DIK_S))
- xmvInputDir -= xmvCamLook;
- if (m_pGameInstance->Key_Pressing(DIK_A))
- xmvInputDir -= xmvCamRight;
- if (m_pGameInstance->Key_Pressing(DIK_D))
- xmvInputDir += xmvCamRight;
-
- xmvInputDir = XMVector3Normalize(xmvInputDir);
-
- _float2 vInputDir = { XMVectorGetX(xmvInputDir),XMVectorGetZ(xmvInputDir) };
-
- _vector xmvCurLook = XMVector4Normalize(
- XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f));
- _float2 vCurLook = { XMVectorGetX(xmvCurLook),XMVectorGetZ(xmvCurLook) };
-
- _float vDir = CMyTools::Get_Direction2D(vCurLook, vInputDir);
- _float absDir = fabsf(vDir);
-
- _float cross = vCurLook.x * vInputDir.y - vCurLook.y * vInputDir.x;
-
- if (SUCCEEDED(InputMove()))
- {
- if(cross>0)
- m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta);
- else
- m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta);
- }
+ if (m_pGameInstance->Key_Pressing(DIK_A)) { m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta); }
+ if (m_pGameInstance->Key_Pressing(DIK_D)) { m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta); };
};
Desc.funcLateUpdate = nullptr;
m_States.emplace(FSMSTATE::DODGE, CState_Dodge::Create(&Desc));
@@ -1616,6 +1595,23 @@ void CPlayer::Add_FSM()
m_pTransformCom->Set_WorldMatrix(finalMat);
m_pCharacter_Controller->Set_Position(finalMat.r[3]);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
};
Desc.funcLateUpdate = nullptr;
m_States.emplace(FSMSTATE::BROOM_RIDE, CState_Broom_Ride::Create(&Desc));
diff --git a/Jusin154_Team3D/Client/Private/TrailObject.cpp b/Jusin154_Team3D/Client/Private/TrailObject.cpp
index 283fdc52c..4040b2ee5 100644
--- a/Jusin154_Team3D/Client/Private/TrailObject.cpp
+++ b/Jusin154_Team3D/Client/Private/TrailObject.cpp
@@ -250,6 +250,9 @@ HRESULT CTrailObject::Ready_Components(void* pArg)
void CTrailObject::Trail_Update(_fmatrix WorldMat, _float fTimeDelta)
{
+ if (m_bVisible == false)
+ return;
+
m_pTrailCom->Trail_Update(fTimeDelta, WorldMat);
}
diff --git a/Jusin154_Team3D/Client/Private/Troll.cpp b/Jusin154_Team3D/Client/Private/Troll.cpp
index 307db2b71..d7d20725d 100644
--- a/Jusin154_Team3D/Client/Private/Troll.cpp
+++ b/Jusin154_Team3D/Client/Private/Troll.cpp
@@ -7,6 +7,9 @@
#include "InfoInstance.h"
#include "Effect_Container.h"
#include "EffectParts.h"
+#include "EffectPool.h"
+#include "Layer.h"
+#include "TrailObject.h"
#pragma region STATE
#include "State_Idle.h"
@@ -63,6 +66,13 @@ HRESULT CTroll::Initialize(void* pArg)
m_pCharacter_Controller->Set_Position(XMVectorSet(3.f, 5.f, -20.f, 1.f));
+ m_pEffectPool = m_pGameInstance->Get_Layer(NEXT_LEVEL, TEXT("Layer_EffectPool"))->Get_Object();
+ SAFE_ADDREF(m_pEffectPool);
+
+ m_pLeftHand_BoneMat = m_pModelCom->Get_BoneMatrixPtr("LeftHand");
+ m_pRightHand_BoneMat = m_pModelCom->Get_BoneMatrixPtr("RightHand");
+ m_pWeapon_BoneMat = Get_PartObject()->Get_Component()->Get_BoneMatrixPtr("Bone");
+
return S_OK;
}
@@ -109,6 +119,33 @@ void CTroll::Update(_float fTimeDelta)
+#pragma region TRAIL_UPDATE
+
+ _matrix WorldMat = m_pTransformCom->Get_XMWorldMatrix();
+
+ _matrix LeftHandMatrix = {};
+ _matrix RightHandMatrix = {};
+ _matrix WeaponMatrix = {};
+
+ LeftHandMatrix = XMLoadFloat4x4(m_pLeftHand_BoneMat);
+ RightHandMatrix = XMLoadFloat4x4(m_pRightHand_BoneMat);
+ WeaponMatrix = XMLoadFloat4x4(m_pWeapon_BoneMat);
+
+
+ for (int i = 0; i < 3; ++i) {
+ LeftHandMatrix.r[i] = XMVector3Normalize(LeftHandMatrix.r[i]);
+ RightHandMatrix.r[i] = XMVector3Normalize(RightHandMatrix.r[i]);
+ WeaponMatrix.r[i] = XMVector3Normalize(WeaponMatrix.r[i]);
+ }
+
+ _matrix WeaponSoket = WeaponMatrix * Get_PartObject()->Get_Component()->Get_XMWorldMatrix();
+
+ m_pLeftTrail->Trail_Update(LeftHandMatrix * WorldMat, fTimeDelta);
+ m_pRightTrail->Trail_Update(RightHandMatrix * WorldMat, fTimeDelta);
+ m_pWeaponTrail->Trail_Update(WeaponSoket, fTimeDelta);
+
+#pragma endregion
+
}
void CTroll::Late_Update(_float fTimeDelta)
@@ -122,21 +159,21 @@ void CTroll::Late_Update(_float fTimeDelta)
}
if (m_bLookAt) {
- m_pTransformCom->LookAt_Lerp(XMLoadFloat4(&m_vTargetPos),fTimeDelta, 3.f);
+ m_pTransformCom->LookAt_Lerp(XMLoadFloat4(&m_vTargetPos), fTimeDelta, 3.f);
}
-
+
_vector vDir = XMLoadFloat4(&m_vTargetPos) - Get_WorldPostion();
vDir = XMVector4Normalize(vDir);
_vector vLook = XMVector3Normalize(
XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f));
float dot = XMVectorGetX(XMVector3Dot(vLook, vDir));
- dot = max(-1.f, min(1.f, dot));
+ dot = max(-1.f, min(1.f, dot));
- float angle = acosf(dot);
+ float angle = acosf(dot);
m_fDegree = XMConvertToDegrees(angle);
- m_fCross = XMVectorGetY(XMVector3Cross(vLook, vDir));
+ m_fCross = XMVectorGetY(XMVector3Cross(vLook, vDir));
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
m_pGameInstance->Add_RenderGroup(RENDER::SHADOW, this);
@@ -310,6 +347,7 @@ HRESULT CTroll::Ready_Components()
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("STAT_TROLL"), (CComponent**)&m_pStat))) {
return E_FAIL;
}
+
return S_OK;
}
@@ -345,7 +383,7 @@ HRESULT CTroll::Ready_Parts()
PartsDesc.pParentTransform = m_pTransformCom;
-
+
if (FAILED(Add_PartObject("Troll_Particle", g_iStaticLevel, &m_pTroll_Particle, &PartsDesc)))
{
@@ -382,6 +420,30 @@ HRESULT CTroll::Ready_Parts()
m_pLeft_Smoke->Load("../Bin/Resources/Data/Effect/Troll/TrollSide/Troll_Smoke", static_cast(NEXT_LEVEL));
m_pLeft_Smoke->FollowParants(m_pModelCom->Get_BoneMatrixPtr("LeftArm"));
+
+ if (FAILED(Add_PartObject("Left_Trail", g_iStaticLevel, &m_pLeftTrail, &PartsDesc))) {
+ return E_FAIL;
+ }
+ ;
+
+ m_pLeftTrail->Load_Trail("../Bin/Resources/Data/Effect/Troll/TrollSide/Troll_Trail", static_cast(NEXT_LEVEL));
+ m_pLeftTrail->Set_Visible(false);
+
+ if (FAILED(Add_PartObject("Right_Trail", g_iStaticLevel, &m_pRightTrail, &PartsDesc))) {
+ return E_FAIL;
+ }
+
+ m_pRightTrail->Load_Trail("../Bin/Resources/Data/Effect/Troll/TrollSide/Troll_Trail", static_cast(NEXT_LEVEL));
+ m_pRightTrail->Set_Visible(false);
+
+ if (FAILED(Add_PartObject("Weapon_Trail", g_iStaticLevel, &m_pWeaponTrail, &PartsDesc))) {
+ return E_FAIL;
+ }
+
+ m_pWeaponTrail->Load_Trail("../Bin/Resources/Data/Effect/Troll/TrollSide/Troll_Swing_Trail", static_cast(NEXT_LEVEL));
+ m_pWeaponTrail->Set_Visible(false);
+
+
#pragma endregion
return S_OK;
}
@@ -404,6 +466,15 @@ HRESULT CTroll::Bind_ShaderResources()
return S_OK;
}
+void CTroll::Troll_Trail_Visible(_bool isTrailVisible)
+{
+ m_pLeftTrail->Set_Visible(isTrailVisible);
+ m_pRightTrail->Set_Visible(isTrailVisible);
+
+ m_pLeftTrail->Get_Component()->Reset_Trail();
+ m_pRightTrail->Get_Component()->Reset_Trail();
+}
+
CTroll* CTroll::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
CTroll* pInstance = new CTroll(pDevice, pContext);
@@ -448,36 +519,17 @@ void CTroll::Free()
SAFE_RELEASE(m_pTroll_Particle2);
SAFE_RELEASE(m_pRight_Smoke);
SAFE_RELEASE(m_pLeft_Smoke);
+ SAFE_RELEASE(m_pEffectPool);
+ SAFE_RELEASE(m_pLeftTrail);
+ SAFE_RELEASE(m_pRightTrail);
+ SAFE_RELEASE(m_pWeaponTrail);
}
#ifdef _DEBUG
void CTroll::Describe_Entity()
{
- GUI::Begin("Troll");
+ __super::Describe_Entity();
- GUI::Checkbox("LookAt", &m_bLookAt);
-
- string AnimList = m_pModelCom->Get_AnimList(m_pModelCom->Get_AnimIndex());
- GUI::Text(AnimList.c_str());
-
- GUI::Text("AnimTrack %.2f", m_pModelCom->Get_CurrentTrackPosition());
- GUI::Text("AnimRatio %.2f", m_pModelCom->Get_CurrentTrackProgressRatio());
-
- _float4 vMomentum = {};
- XMStoreFloat4(&vMomentum, m_pTransformCom->Get_CurrentMomentum());
- GUI::Text("%.2f %.2f %.2f %.2f ", vMomentum.x, vMomentum.y, vMomentum.z, vMomentum.w);
-
- _float3 Pos;
- XMStoreFloat3(&Pos, Get_WorldPostion());
-
- if (GUI::DragFloat3("Pos",(_float*)&Pos))
- {
- m_pCharacter_Controller->Set_Position(XMLoadFloat3(&Pos));
- }
- GUI::TextColored(ImVec4(1.f, 0.f, 0.f, 1.f), "Degree %.2f", m_fDegree);
- GUI::TextColored(ImVec4(1.f, 0.f, 0.f, 1.f), "Distance %.2f", m_fTargetDistance);
-
- GUI::End();
}
diff --git a/Jusin154_Team3D/Client/Private/TrollSwing.cpp b/Jusin154_Team3D/Client/Private/TrollSwing.cpp
new file mode 100644
index 000000000..8b362594e
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/TrollSwing.cpp
@@ -0,0 +1,180 @@
+#include "pch.h"
+#include "TrollSwing.h"
+
+#include "GameInstance.h"
+#include "EffectParts.h"
+#include "Wand.h"
+#include "Player.h"
+
+CTrollSwing::CTrollSwing(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CEffect_Container{ pDevice, pContext }
+{
+}
+
+CTrollSwing::CTrollSwing(const CTrollSwing& rhs)
+ : CEffect_Container(rhs)
+{
+}
+
+HRESULT CTrollSwing::Initialize_Prototype()
+{
+
+ return S_OK;
+
+}
+
+HRESULT CTrollSwing::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/MonsterPackage/TrollSwing")))
+ return E_FAIL;
+
+
+ m_wstrEffectName = L"TrollSwing";
+
+
+ m_fDuration = 3.2f;
+
+ return S_OK;
+}
+
+void CTrollSwing::Priority_Update(_float fTimeDelta)
+{
+ __super::Priority_Update(fTimeDelta);
+
+}
+
+void CTrollSwing::Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Update(fTimeDelta);
+
+ Update_Event(fTimeDelta);
+
+
+
+}
+
+void CTrollSwing::Late_Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Late_Update(fTimeDelta);
+
+
+}
+
+HRESULT CTrollSwing::Pre_Setting(CGameObject* pObject, void* pArg)
+{
+ if (FAILED(__super::Pre_Setting(pObject, nullptr)))
+ return E_FAIL;
+
+ _vector vPos = m_pOwner->Get_Component()->Get_State(STATE::POSITION);
+
+ vPos += m_pOwner->Get_Component()->Get_State(STATE::LOOK) * 2.f;
+
+ CEffectParts* pRockPT = Get_PartObject("Rock_PT_25");
+ CEffectParts* pSmoke = Get_PartObject("Smoke");
+
+ pRockPT->Get_Component()->Set_State(STATE::POSITION, vPos + XMVectorSet(0.f, 0.5f, 0.f, 0.f));
+ pSmoke->Get_Component()->Set_State(STATE::POSITION, vPos + XMVectorSet(0.f, 0.2f, 0.f, 0.f));
+
+
+ pRockPT->Set_Visible(true);
+ pSmoke->Set_Visible(true);
+
+ return S_OK;
+}
+
+HRESULT CTrollSwing::Ready_Components(void* pArg)
+{
+ if (FAILED(__super::Ready_Components(pArg))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CTrollSwing::Ready_Child()
+{
+ return S_OK;
+}
+
+CTrollSwing* CTrollSwing::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CTrollSwing* pInstance = new CTrollSwing(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CTrollSwing");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+
+CGameObject* CTrollSwing::Clone(void* pArg, CGameObject* pOwner)
+{
+ CTrollSwing* pInstance = new CTrollSwing(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CTrollSwing");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CTrollSwing::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()->Set_State(STATE::POSITION, vPos);
+ }
+
+
+}
+
+void CTrollSwing::Free()
+{
+ __super::Free();
+
+}
+#ifdef _DEBUG
+void CTrollSwing::Describe_Entity()
+{
+
+}
+#endif
+
+HRESULT CTrollSwing::Bind_ShaderResources()
+{
+ return S_OK;
+}
+
+
diff --git a/Jusin154_Team3D/Client/Private/Troll_Nomal_Smoke.cpp b/Jusin154_Team3D/Client/Private/Troll_Nomal_Smoke.cpp
new file mode 100644
index 000000000..5766c713b
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/Troll_Nomal_Smoke.cpp
@@ -0,0 +1,179 @@
+#include "pch.h"
+#include "Troll_Nomal_Smoke.h"
+
+#include "GameInstance.h"
+#include "EffectParts.h"
+#include "Wand.h"
+#include "Player.h"
+
+CTroll_Nomal_Smoke::CTroll_Nomal_Smoke(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CEffect_Container{ pDevice, pContext }
+{
+}
+
+CTroll_Nomal_Smoke::CTroll_Nomal_Smoke(const CTroll_Nomal_Smoke& rhs)
+ : CEffect_Container(rhs)
+{
+}
+
+HRESULT CTroll_Nomal_Smoke::Initialize_Prototype()
+{
+
+ return S_OK;
+
+}
+
+HRESULT CTroll_Nomal_Smoke::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/MonsterPackage/TrollNomalSmoke")))
+ return E_FAIL;
+
+
+ m_wstrEffectName = L"Troll_Nomal_Smoke";
+
+
+ m_fDuration = 2.5f;
+
+ return S_OK;
+}
+
+void CTroll_Nomal_Smoke::Priority_Update(_float fTimeDelta)
+{
+ __super::Priority_Update(fTimeDelta);
+
+}
+
+void CTroll_Nomal_Smoke::Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Update(fTimeDelta);
+
+ Update_Event(fTimeDelta);
+
+
+
+}
+
+void CTroll_Nomal_Smoke::Late_Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Late_Update(fTimeDelta);
+
+
+}
+
+HRESULT CTroll_Nomal_Smoke::Pre_Setting(CGameObject* pObject, void* pArg)
+{
+ if (FAILED(__super::Pre_Setting(pObject, nullptr)))
+ return E_FAIL;
+
+
+ _float4 vPos = *static_cast<_float4*>(pArg); // 위치 넘기기
+
+ CEffectParts* pRockPT = Get_PartObject("Rock_PT_15");
+ CEffectParts* pSmoke = Get_PartObject("NomalSmoke");
+
+
+ pRockPT->Get_Component()->Set_State(STATE::POSITION, XMLoadFloat4(&vPos) + XMVectorSet(0.f , 0.2f ,0.f, 0.f) );
+ pSmoke->Get_Component()->Set_State(STATE::POSITION, XMLoadFloat4(&vPos) + XMVectorSet(0.f, 0.2f, 0.f, 0.f));
+
+ pRockPT->Set_Visible(true);
+ pSmoke->Set_Visible(true);
+
+ return S_OK;
+}
+
+HRESULT CTroll_Nomal_Smoke::Ready_Components(void* pArg)
+{
+ if (FAILED(__super::Ready_Components(pArg))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CTroll_Nomal_Smoke::Ready_Child()
+{
+ return S_OK;
+}
+
+CTroll_Nomal_Smoke* CTroll_Nomal_Smoke::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CTroll_Nomal_Smoke* pInstance = new CTroll_Nomal_Smoke(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CTroll_Nomal_Smoke");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+
+CGameObject* CTroll_Nomal_Smoke::Clone(void* pArg, CGameObject* pOwner)
+{
+ CTroll_Nomal_Smoke* pInstance = new CTroll_Nomal_Smoke(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CTroll_Nomal_Smoke");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CTroll_Nomal_Smoke::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()->Set_State(STATE::POSITION, vPos);
+ }
+
+
+}
+
+void CTroll_Nomal_Smoke::Free()
+{
+ __super::Free();
+
+}
+#ifdef _DEBUG
+void CTroll_Nomal_Smoke::Describe_Entity()
+{
+
+}
+#endif
+
+HRESULT CTroll_Nomal_Smoke::Bind_ShaderResources()
+{
+ return S_OK;
+}
+
+
diff --git a/Jusin154_Team3D/Client/Private/Troll_Rush_Hit.cpp b/Jusin154_Team3D/Client/Private/Troll_Rush_Hit.cpp
new file mode 100644
index 000000000..16a5a8d98
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/Troll_Rush_Hit.cpp
@@ -0,0 +1,174 @@
+#include "pch.h"
+#include "Troll_Rush_Hit.h"
+
+#include "GameInstance.h"
+#include "EffectParts.h"
+#include "Wand.h"
+#include "Player.h"
+
+CTroll_Rush_Hit::CTroll_Rush_Hit(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CEffect_Container{ pDevice, pContext }
+{
+}
+
+CTroll_Rush_Hit::CTroll_Rush_Hit(const CTroll_Rush_Hit& rhs)
+ : CEffect_Container(rhs)
+{
+}
+
+HRESULT CTroll_Rush_Hit::Initialize_Prototype()
+{
+
+ return S_OK;
+
+}
+
+HRESULT CTroll_Rush_Hit::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/MonsterPackage/TrollRush")))
+ return E_FAIL;
+
+
+ m_wstrEffectName = L"Troll_Nomal_Smoke";
+
+
+ m_fDuration = 2.f;
+
+ return S_OK;
+}
+
+void CTroll_Rush_Hit::Priority_Update(_float fTimeDelta)
+{
+ __super::Priority_Update(fTimeDelta);
+
+}
+
+void CTroll_Rush_Hit::Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Update(fTimeDelta);
+
+ Update_Event(fTimeDelta);
+
+
+
+}
+
+void CTroll_Rush_Hit::Late_Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Late_Update(fTimeDelta);
+
+
+}
+
+HRESULT CTroll_Rush_Hit::Pre_Setting(CGameObject* pObject, void* pArg)
+{
+ if (FAILED(__super::Pre_Setting(pObject, nullptr)))
+ return E_FAIL;
+
+
+ _float4 vPos = *static_cast<_float4*>(pArg); // 위치 넘기기
+
+ CEffectParts* pSmoke = Get_PartObject("HitSmoke");
+
+ pSmoke->Get_Component()->Set_State(STATE::POSITION, XMLoadFloat4(&vPos));
+
+ pSmoke->Set_Visible(true);
+ return S_OK;
+}
+
+HRESULT CTroll_Rush_Hit::Ready_Components(void* pArg)
+{
+ if (FAILED(__super::Ready_Components(pArg))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CTroll_Rush_Hit::Ready_Child()
+{
+ return S_OK;
+}
+
+CTroll_Rush_Hit* CTroll_Rush_Hit::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CTroll_Rush_Hit* pInstance = new CTroll_Rush_Hit(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CTroll_Rush_Hit");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+
+CGameObject* CTroll_Rush_Hit::Clone(void* pArg, CGameObject* pOwner)
+{
+ CTroll_Rush_Hit* pInstance = new CTroll_Rush_Hit(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CTroll_Rush_Hit");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CTroll_Rush_Hit::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()->Set_State(STATE::POSITION, vPos);
+ }
+
+
+}
+
+void CTroll_Rush_Hit::Free()
+{
+ __super::Free();
+
+}
+#ifdef _DEBUG
+void CTroll_Rush_Hit::Describe_Entity()
+{
+
+}
+#endif
+
+HRESULT CTroll_Rush_Hit::Bind_ShaderResources()
+{
+ return S_OK;
+}
+
+
diff --git a/Jusin154_Team3D/Client/Private/Troll_States.cpp b/Jusin154_Team3D/Client/Private/Troll_States.cpp
index 12e7b516d..003c51604 100644
--- a/Jusin154_Team3D/Client/Private/Troll_States.cpp
+++ b/Jusin154_Team3D/Client/Private/Troll_States.cpp
@@ -4,6 +4,8 @@
#include "GameInstance.h"
#include "Player.h"
#include "Troll_Rock.h"
+#include "EffectPool.h"
+#include "TrailObject.h"
#pragma region STATE
#include "State_Idle.h"
@@ -29,7 +31,7 @@ void CTroll::Behavior_IdleEnter()
HRESULT CTroll::Behavior_IdleExitCheck()
{
- if (m_fTargetDistance <= 18.f && m_fTargetDistance !=0)
+ if (m_fTargetDistance <= 18.f && m_fTargetDistance != 0)
m_pFSM->Change_State(FSMSTATE::MOVE);
return E_FAIL;
@@ -48,16 +50,48 @@ void CTroll::Behavior_IdleBreakEnter()
_int RandIndex = m_pGameInstance->Real_Random_Int(0, 3);
switch (RandIndex)
{
- case 0:
+ case 0: //땅 두번구르기 왼발 오른발
pairAnimInfo = m_Animation[STATEANIM::IDLE_BREAK1];
+
+ Add_Event(pairAnimInfo.first, [this]() {
+
+ _matrix HandMat = XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("IK_LeftFoot")) * m_pTransformCom->Get_XMWorldMatrix();
+
+ _float4 vPosition = {};
+ XMStoreFloat4(&vPosition, HandMat.r[3]);
+
+ m_pEffectPool->Use_Skill(SKILL_TYPE::TROLL_NOMAL_SMOKE, this, &vPosition);
+ }, 0.3f);
+
+ Add_Event(pairAnimInfo.first, [this]() {
+
+ _matrix HandMat = XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("IK_RightFoot")) * m_pTransformCom->Get_XMWorldMatrix();
+
+ _float4 vPosition = {};
+ XMStoreFloat4(&vPosition, HandMat.r[3]);
+
+ m_pEffectPool->Use_Skill(SKILL_TYPE::TROLL_NOMAL_SMOKE, this, &vPosition);
+ }, 0.7f);
+
break;
- case 1:
+ case 1:// 방망이
pairAnimInfo = m_Animation[STATEANIM::IDLE_BREAK2];
break;
- case 2:
+ case 2: // 발구르기
pairAnimInfo = m_Animation[STATEANIM::IDLE_BREAK3];
+
+ Add_Event(pairAnimInfo.first, [this]() {
+
+ _matrix HandMat = XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("IK_RightFoot")) * m_pTransformCom->Get_XMWorldMatrix();
+
+ _float4 vPosition = {};
+ XMStoreFloat4(&vPosition, HandMat.r[3]);
+
+ m_pEffectPool->Use_Skill(SKILL_TYPE::TROLL_NOMAL_SMOKE, this, &vPosition);
+ }, 0.2f);
+
break;
- case 3:
+ case 3: //소리지르기
pairAnimInfo = m_Animation[STATEANIM::IDLE_BREAK4];
break;
}
@@ -85,7 +119,7 @@ void CTroll::Behavior_MoveEnter()
m_pFSM->Enable_State(FSMSTATE::JOG);
pairAnimInfo = m_Animation[STATEANIM::JOG_START];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
-
+
}
HRESULT CTroll::Behavior_MoveExitCheck(_float fTimeDelta)
@@ -111,7 +145,7 @@ HRESULT CTroll::Behavior_MoveExitCheck(_float fTimeDelta)
return E_FAIL;
}
-
+
if (bTurnPlaying)
{
m_bLookAt = false;
@@ -146,7 +180,7 @@ HRESULT CTroll::Behavior_MoveExitCheck(_float fTimeDelta)
if (iCurrAnimIndex == m_Animation[STATEANIM::JOG_START].first)
{
_float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio();
- if (fRatio >= 0.9f){
+ if (fRatio >= 0.9f) {
pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
}
@@ -160,6 +194,7 @@ HRESULT CTroll::Behavior_MoveExitCheck(_float fTimeDelta)
return S_OK;
}
+
if (m_fTargetDistance <= 6.f && m_fTargetDistance != 0.f)
m_pFSM->Change_State(FSMSTATE::COMBAT);
@@ -194,7 +229,7 @@ HRESULT CTroll::Behavior_CombatExitCheck(_float fTimeDelta)
return E_FAIL;
}
- if (m_fTargetDistance <= 6.f && (m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SLAM)] <= 0.f) )
+ if (m_fTargetDistance <= 6.f && (m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SLAM)] <= 0.f))
{
m_pFSM->Change_State(FSMSTATE::SLAM);
}
@@ -301,7 +336,7 @@ void CTroll::Behavior_ThrowEnter()
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
Add_Event(pairAnimInfo.first,
- [this](){Get_PartObject()->Set_Visible(true);},
+ [this]() {Get_PartObject()->Set_Visible(true); },
0.95f);
}
@@ -323,6 +358,23 @@ HRESULT CTroll::Behavior_ThrowExitCheck(_float fTimeDelta)
Add_Event(pairAnimInfo.first,
[this]() {Get_PartObject()->Set_Attach(false); },
0.25f);
+
+ Add_Event(pairAnimInfo.first,
+ [this]() {Troll_Trail_Visible(false); },
+ 0.6f);
+
+ Add_Event(pairAnimInfo.first, [this]() {
+
+
+ Troll_Trail_Visible(true);
+
+ _matrix HandMat = XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("SKT_LeftHand")) * m_pTransformCom->Get_XMWorldMatrix();
+
+ _float4 vPosition = {};
+ XMStoreFloat4(&vPosition, HandMat.r[3]);
+
+ m_pEffectPool->Use_Skill(SKILL_TYPE::TROLL_NOMAL_SMOKE, this, &vPosition);
+ }, 0.1f);
}
}
return S_OK;
@@ -356,6 +408,18 @@ void CTroll::Behavior_SwingEnter()
Add_Event(pairAnimInfo.first,
[this]() {m_bLookAt = false; },
0.2f);
+
+
+ Troll_Trail_Visible(true);
+ m_pWeaponTrail->Set_Visible(true);
+ m_pWeaponTrail->Get_Component()->Reset_Trail();
+
+ Add_Event(pairAnimInfo.first,
+ [this]() {
+ Troll_Trail_Visible(false);
+ m_pWeaponTrail->Set_Visible(false);
+ },
+ 0.6f);
}
HRESULT CTroll::Behavior_SwingExitCheck(_float fTimeDelta)
@@ -389,9 +453,26 @@ void CTroll::Behavior_SlamEnter()
m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SLAM)] =
m_fMaxSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SLAM)];
+
+ Troll_Trail_Visible(true);
+ m_pWeaponTrail->Set_Visible(true);
+
+ Add_Event(pairAnimInfo.first,
+ [this]() {
+ Troll_Trail_Visible(false);
+ m_pWeaponTrail->Set_Visible(false);
+ },
+ 0.7f);
+
+
Add_Event(m_Animation[STATEANIM::SLAM].first,
[this]() { m_bLookAt = false; },
0.2f);
+
+ Add_Event(m_Animation[STATEANIM::SLAM].first, [this]() {
+ m_pEffectPool->Use_Skill(SKILL_TYPE::TROLL_ATTACK, this);
+ }, 0.3f);
+
}
HRESULT CTroll::Behavior_SlamExitCheck(_float fTimeDelta)
@@ -426,6 +507,17 @@ void CTroll::Behavior_BackHandSwingEnter()
Add_Event(m_Animation[STATEANIM::BACKHAND_SWING_JOG].first,
[this]() { m_bLookAt = false; },
0.2f);
+
+ Troll_Trail_Visible(true);
+ m_pWeaponTrail->Set_Visible(true);
+ m_pWeaponTrail->Get_Component()->Reset_Trail();
+
+ Add_Event(pairAnimInfo.first,
+ [this]() {
+ Troll_Trail_Visible(false);
+ m_pWeaponTrail->Set_Visible(false);
+ },
+ 0.9f);
}
HRESULT CTroll::Behavior_BackHandSwingExitCheck(_float fTimeDelta)
@@ -471,7 +563,7 @@ void CTroll::Behavior_HitEnter()
pairAnimInfo = m_Animation[STATEANIM::HIT_BWD3];
break;
}
- }
+ }
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
}
@@ -488,7 +580,7 @@ HRESULT CTroll::Behavior_HitExitCheck()
return S_OK;
}
}
-
+
if (m_pModelCom->IsFinishedAnim()) {
m_pFSM->Change_State(FSMSTATE::COMBAT);
m_bLookAt = true;
@@ -643,12 +735,12 @@ void CTroll::Set_Anim()
m_Animation[STATEANIM::SPRINT] = { 90, true };
m_Animation[STATEANIM::SLAM] = { 66,false }; // 도끼 찍기
- m_Animation[STATEANIM::SKILL2] = { 70,false };
+ m_Animation[STATEANIM::SKILL2] = { 70,false };
m_Animation[STATEANIM::THROW_ROCK_START] = { 77,false };
m_Animation[STATEANIM::THROW_ROCK] = { 74,false };
- m_Animation[STATEANIM::RUSH_START] = { 55,false };
+ m_Animation[STATEANIM::RUSH_START] = { 55,false };
m_Animation[STATEANIM::RUSH_LOOP] = { 54,true };
m_Animation[STATEANIM::RUSH_END] = { 56,false };
@@ -664,7 +756,7 @@ void CTroll::Set_Anim()
m_Animation[STATEANIM::HIT_FACE_END] = { 157, false }; //
m_Animation[STATEANIM::STUN] = { 60, false }; //
-
+
m_Animation[STATEANIM::KNOCKDOWN_BWD] = { 165, false }; //
diff --git a/Jusin154_Team3D/Client/Private/WandEnd.cpp b/Jusin154_Team3D/Client/Private/WandEnd.cpp
new file mode 100644
index 000000000..366c24ff3
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/WandEnd.cpp
@@ -0,0 +1,178 @@
+#include "pch.h"
+#include "WandEnd.h"
+
+#include "GameInstance.h"
+#include "EffectParts.h"
+#include "Wand.h"
+
+CWandEnd::CWandEnd(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CEffect_Container{ pDevice, pContext }
+{
+}
+
+CWandEnd::CWandEnd(const CWandEnd& rhs)
+ : CEffect_Container(rhs)
+{
+}
+
+HRESULT CWandEnd::Initialize_Prototype()
+{
+
+ return S_OK;
+
+}
+
+HRESULT CWandEnd::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/WandEnd")))
+ return E_FAIL;
+
+ m_wstrEffectName = L"Lumos";
+
+ m_pWandPt = Get_PartObject("WandParticle_R");
+
+ SAFE_ADDREF(m_pWandPt);
+
+ m_fDuration = 2.f;
+
+ m_Events.emplace(0.4f, [&]() {
+ m_isParticleEnd = true;
+
+ m_pWandPt->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f, -500.f, 0.f, 1.f));
+ });
+
+ return S_OK;
+}
+
+void CWandEnd::Priority_Update(_float fTimeDelta)
+{
+ __super::Priority_Update(fTimeDelta);
+
+}
+
+void CWandEnd::Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Update(fTimeDelta);
+
+ Update_Event(fTimeDelta);
+
+
+ if (m_isParticleEnd == true)
+ return;
+
+ CWand* pWand = static_cast(m_pOwner);
+
+ if (pWand == nullptr)
+ return;
+
+ m_pWandPt->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
+
+}
+
+void CWandEnd::Late_Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Late_Update(fTimeDelta);
+
+
+}
+
+HRESULT CWandEnd::Pre_Setting(CGameObject* pObject, void* pArg)
+{
+ if (FAILED(__super::Pre_Setting(pObject)))
+ return E_FAIL;
+
+ CWand* pWand = static_cast(m_pOwner);
+
+ if (pWand == nullptr)
+ return E_FAIL;
+
+ m_pWandPt->Set_Visible(true);
+ m_pWandPt->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
+ m_isParticleEnd = false;
+
+ return S_OK;
+}
+
+HRESULT CWandEnd::Ready_Components(void* pArg)
+{
+ if (FAILED(__super::Ready_Components(pArg))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CWandEnd::Ready_Child()
+{
+ return S_OK;
+}
+
+CWandEnd* CWandEnd::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CWandEnd* pInstance = new CWandEnd(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CWandEnd");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+
+CGameObject* CWandEnd::Clone(void* pArg, CGameObject* pOwner)
+{
+ CWandEnd* pInstance = new CWandEnd(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CWandEnd");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CWandEnd::OnCollision(CGameObject* pOther, void* pDesc)
+{
+ //CTransform* pOtherTransform = p
+ ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc);
+
+}
+
+void CWandEnd::Free()
+{
+ __super::Free();
+
+ Safe_Release(m_pWandPt);
+
+}
+#ifdef _DEBUG
+
+void CWandEnd::Describe_Entity()
+{
+
+}
+
+#endif // _DEBUG
+
+HRESULT CWandEnd::Bind_ShaderResources()
+{
+ return S_OK;
+}
+
+
diff --git a/Jusin154_Team3D/Client/Public/Bombard.h b/Jusin154_Team3D/Client/Public/Bombard.h
index 972a1e5ac..199da83b9 100644
--- a/Jusin154_Team3D/Client/Public/Bombard.h
+++ b/Jusin154_Team3D/Client/Public/Bombard.h
@@ -30,10 +30,17 @@ class CBombard final : public CEffect_Container
HRESULT Ready_Child();
HRESULT Bind_ShaderResources() override;
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
+
+private:
+ class CInfoInstance* m_pInfoInstance = { nullptr };
private:
_wstring m_wstrEffectName = {};
class CEffectParts* m_pLight_Projectile = {};
- _vector m_vCameraLook = {};
+
+ _float4 m_vStartPos = { 0.f, 0.f, 0.f, 1.f }; // 현재 발사 된 위치
+ _float4 m_vTargetPos = { 0.f, 0.f, 10.f, 1.f }; // 현재 타게팅 된 위치
+ _float m_fLinearSpeed = 2.f;
+ _float3 m_vCameraLook = {};
public:
static CBombard* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual void Free() override;
diff --git a/Jusin154_Team3D/Client/Public/Client_Enum.h b/Jusin154_Team3D/Client/Public/Client_Enum.h
index 3d4505fc2..20d2d3c72 100644
--- a/Jusin154_Team3D/Client/Public/Client_Enum.h
+++ b/Jusin154_Team3D/Client/Public/Client_Enum.h
@@ -29,7 +29,10 @@ namespace Client
BEAST_PETTING_BRUSH, BEAST_FEED, NAB_SACK, // 하늘색
JAP, REVELIO, PROTEGO, STUPEFY, // 검은색
ANCIENT_MAGIC_THROW, ANCIENT_MAGIC, ALOHOMORA, PETRIFICUS_TOTALUS,
- JAP_SIDE, BOMBARDA_SIDE, DESCENDO_SIDE, LEVIOSO_SIDE, END
+ JAP_SIDE, BOMBARDA_SIDE, DESCENDO_SIDE, LEVIOSO_SIDE, WAND_END,
+
+ TROLL_ATTACK, TROLL_RUSH_HIT, TROLL_NOMAL_SMOKE, GOBLIN_PROTEGO,
+ END
};
enum class BLOOM_TYPE { NONE, BASIC, MULTIPLY, END };
diff --git a/Jusin154_Team3D/Client/Public/EffectPool.h b/Jusin154_Team3D/Client/Public/EffectPool.h
index f3cc94e01..a1d0a1810 100644
--- a/Jusin154_Team3D/Client/Public/EffectPool.h
+++ b/Jusin154_Team3D/Client/Public/EffectPool.h
@@ -34,6 +34,7 @@ class CEffectPool final : public CGameObject
HRESULT Ready_Components();
HRESULT Bind_ShaderResources();
HRESULT Ready_Effect();
+ HRESULT Ready_MonsterEffect();
public:
static CEffectPool* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr) override;
diff --git a/Jusin154_Team3D/Client/Public/Goblin_Protego.h b/Jusin154_Team3D/Client/Public/Goblin_Protego.h
new file mode 100644
index 000000000..284adbc40
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/Goblin_Protego.h
@@ -0,0 +1,53 @@
+#pragma once
+
+#include "Client_Define.h"
+#include "Effect_Container.h"
+
+NS_BEGIN(Engine)
+NS_END
+
+NS_BEGIN(Client)
+
+class CGoblin_Protego final : public CEffect_Container
+{
+private:
+ CGoblin_Protego(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CGoblin_Protego(const CGoblin_Protego& rhs);
+ virtual ~CGoblin_Protego() = 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 = {};
+
+ class CEffectParts* m_pSphere = { nullptr };
+ class CEffectParts* m_pBottom = { nullptr };
+ class CEffectParts* m_pCircle = { nullptr };
+
+ _float m_fSizeAccTime = {};
+ _float m_fAmountSize = {};
+ _float m_fSpeed = {};
+
+public:
+ static CGoblin_Protego* 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
diff --git a/Jusin154_Team3D/Client/Public/Levioso.h b/Jusin154_Team3D/Client/Public/Levioso.h
index 4c365ccee..c62cd31a4 100644
--- a/Jusin154_Team3D/Client/Public/Levioso.h
+++ b/Jusin154_Team3D/Client/Public/Levioso.h
@@ -30,6 +30,9 @@ class CLevioso final : public CEffect_Container
HRESULT Ready_Child();
HRESULT Bind_ShaderResources() override;
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
+
+private:
+ class CInfoInstance* m_pInfoInstance = { nullptr };
private:
_wstring m_wstrEffectName = {};
class CPlayer* m_pPlayer = {};
@@ -42,6 +45,11 @@ class CLevioso final : public CEffect_Container
_float m_fAccRotateTime = {};
_float m_fTurnSpeed = {};
_float m_fRange = {};
+
+ _float4 m_vStartPos = { 0.f, 0.f, 0.f, 1.f }; // 현재 발사 된 위치
+ _float4 m_vTargetPos = { 0.f, 0.f, 10.f, 1.f }; // 현재 타게팅 된 위치
+ _float m_fLinearSpeed = 0.25f;
+ _float3 m_vCameraLook = {};
public:
static CLevioso* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual void Free() override;
diff --git a/Jusin154_Team3D/Client/Public/Troll.h b/Jusin154_Team3D/Client/Public/Troll.h
index a718d0f88..f1ba48127 100644
--- a/Jusin154_Team3D/Client/Public/Troll.h
+++ b/Jusin154_Team3D/Client/Public/Troll.h
@@ -33,7 +33,8 @@ class CTroll final : public CMonster
virtual _vector Get_LockOnPos() override;
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr)override;
virtual void OnHit(CGameObject* pOther, CGameObject* pCaller = nullptr)override;
-
+private:
+ void Troll_Trail_Visible(_bool isTrailVisible);
private:
CCallBack_Monster_Behavior* m_pCallBack_Behavior = { nullptr };
@@ -49,6 +50,16 @@ class CTroll final : public CMonster
class CEffectParts* m_pTroll_Particle = { nullptr };
class CEffectParts* m_pTroll_Particle2 = { nullptr };
+ class CTrailObject* m_pLeftTrail = { nullptr };
+ class CTrailObject* m_pRightTrail = { nullptr };
+ class CTrailObject* m_pWeaponTrail = { nullptr };
+
+ const _float4x4* m_pLeftHand_BoneMat = { nullptr };
+ const _float4x4* m_pRightHand_BoneMat = { nullptr };
+ const _float4x4* m_pWeapon_BoneMat = { nullptr };
+private:
+ class CEffectPool* m_pEffectPool = nullptr;
+
private:
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
diff --git a/Jusin154_Team3D/Client/Public/TrollSwing.h b/Jusin154_Team3D/Client/Public/TrollSwing.h
new file mode 100644
index 000000000..975909e94
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/TrollSwing.h
@@ -0,0 +1,43 @@
+#pragma once
+
+#include "Client_Define.h"
+#include "Effect_Container.h"
+
+NS_BEGIN(Engine)
+NS_END
+
+NS_BEGIN(Client)
+
+class CTrollSwing final : public CEffect_Container
+{
+private:
+ CTrollSwing(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CTrollSwing(const CTrollSwing& rhs);
+ virtual ~CTrollSwing() = 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 CTrollSwing* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual void Free() override;
+ CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
+ void Describe_Entity() override;
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Client/Public/Troll_Nomal_Smoke.h b/Jusin154_Team3D/Client/Public/Troll_Nomal_Smoke.h
new file mode 100644
index 000000000..57aadfb29
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/Troll_Nomal_Smoke.h
@@ -0,0 +1,43 @@
+#pragma once
+
+#include "Client_Define.h"
+#include "Effect_Container.h"
+
+NS_BEGIN(Engine)
+NS_END
+
+NS_BEGIN(Client)
+
+class CTroll_Nomal_Smoke final : public CEffect_Container
+{
+private:
+ CTroll_Nomal_Smoke(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CTroll_Nomal_Smoke(const CTroll_Nomal_Smoke& rhs);
+ virtual ~CTroll_Nomal_Smoke() = 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_Nomal_Smoke* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual void Free() override;
+ CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
+ void Describe_Entity() override;
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Client/Public/Troll_Rush_Hit.h b/Jusin154_Team3D/Client/Public/Troll_Rush_Hit.h
new file mode 100644
index 000000000..feb24d740
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/Troll_Rush_Hit.h
@@ -0,0 +1,43 @@
+#pragma once
+
+#include "Client_Define.h"
+#include "Effect_Container.h"
+
+NS_BEGIN(Engine)
+NS_END
+
+NS_BEGIN(Client)
+
+class CTroll_Rush_Hit final : public CEffect_Container
+{
+private:
+ CTroll_Rush_Hit(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CTroll_Rush_Hit(const CTroll_Rush_Hit& rhs);
+ virtual ~CTroll_Rush_Hit() = 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_Rush_Hit* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual void Free() override;
+ CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
+ void Describe_Entity() override;
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Client/Public/WandEnd.h b/Jusin154_Team3D/Client/Public/WandEnd.h
new file mode 100644
index 000000000..b73ed10ad
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/WandEnd.h
@@ -0,0 +1,49 @@
+#pragma once
+
+#include "Client_Define.h"
+#include "Effect_Container.h"
+
+NS_BEGIN(Engine)
+NS_END
+
+NS_BEGIN(Client)
+
+class CWandEnd final : public CEffect_Container
+{
+private:
+ CWandEnd(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CWandEnd(const CWandEnd& rhs);
+ virtual ~CWandEnd() = 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 = {};
+
+ class CEffectParts* m_pWandPt = { nullptr };
+
+ _bool m_isParticleEnd = {};
+
+public:
+ static CWandEnd* 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
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_PT0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_PT0.bin
index 2ef503ea1..c0cd17710 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_PT0.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_PT0.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:7b3ed267395967eb9780d0bc00421dd4b96ecbd37ab68e25761ad82834cdd2ab
-size 1082
+oid sha256:a3151cc9d02fd90132bb60936eb828a63fd008ce72eb7dd371f5b489ef43e356
+size 1054
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Ring.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Ring.bin
index 485912ad6..7787d0ccf 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Ring.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Ring.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:cd2a595005be802b075ab785fd96287b50c9d835bb64b4aecfaaedaa713676b1
+oid sha256:65f6097f511de2b0ac9549694e0286bc2228d3c3c97eb2754261ea794a3d5013
size 1036
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Smoke.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Smoke.bin
index edf67e9dc..beca0a038 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Smoke.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Smoke.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:883f62dfd809c08dd1a19af917f03186d2b9cf98985c6f24314a00a2be67c2da
+oid sha256:b1d7727ea00182fce50d00a3ba3a3f2ec36711d9193ca80084583cf0787400cb
size 1042
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/Orb_P.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/Orb_P.bin
new file mode 100644
index 000000000..6062fd404
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/Orb_P.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e7de88fb5cc122dde2cac296d273104ebefd933ffb322f1f03098ac03511d9e5
+size 1120
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Trail_PT0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Trail_PT0.bin
index 6e7e1c0f3..df2b8e890 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Trail_PT0.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Trail_PT0.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:3507cb051a6c5b703d63ed65549587fde761d0d522da15838f49111f3bc28d55
-size 1045
+oid sha256:5bde6082a76193fc49dcdf57ba026c2e6f98a39bd87cc529c21b9df453e59721
+size 1059
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/WandEnd.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/WandEnd.bin
new file mode 100644
index 000000000..a6be396b0
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/WandEnd.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ed8c71f3a2cef038462ada73b40abb17d81ffed78ac3ab65028972013e1a94e4
+size 68
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollSide/Troll_Swing_Trail.trail b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollSide/Troll_Swing_Trail.trail
new file mode 100644
index 000000000..fc6d73396
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollSide/Troll_Swing_Trail.trail differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/WandEnd/WandParticle_R.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/WandEnd/WandParticle_R.bin
new file mode 100644
index 000000000..f7cd21134
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/WandEnd/WandParticle_R.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d9419051879b9e4bfa57067d92640a42db30954b7fcf874df8f79e1856a46393
+size 1059
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Hogwart_AlphaMap.dds b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Hogwart_AlphaMap.dds
new file mode 100644
index 000000000..95887abf3
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Hogwart_AlphaMap.dds differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl
index bd75f7635..e141e7c12 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl
+++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl
@@ -105,7 +105,6 @@ void CS_MAIN(
Particle particle = g_ParticleBufferInput[iIndex];
-
ParticleValue particleValue = g_ParticleValueBufferInput[iIndex];
@@ -190,7 +189,7 @@ void CS_MAIN(
particle.vTranslation.y -= 0.5f * particle.vLifeTime.x * fGravity;
fOnlyDropY = particle.vTranslation.y;
}
-
+
if (isMoveForward)
{
@@ -304,7 +303,7 @@ void CS_MAIN(
float fOldViewZ = vDepthDesc.y * fFar;
- if (vProjPos.w >= fOldViewZ && particle.vLifeTime.x >= 0.2f)
+ if (vProjPos.w >= fOldViewZ && particle.vLifeTime.x >= 0.3f)
{
if (particleValue.isCompareStop == false)
{
diff --git a/Jusin154_Team3D/Editor/Private/EffectPool.cpp b/Jusin154_Team3D/Editor/Private/EffectPool.cpp
index 6db712412..8d4787972 100644
--- a/Jusin154_Team3D/Editor/Private/EffectPool.cpp
+++ b/Jusin154_Team3D/Editor/Private/EffectPool.cpp
@@ -44,8 +44,8 @@ HRESULT CEffectPool::Initialize(void* pArg)
if (FAILED(Ready_Components()))
return E_FAIL;
- //if (FAILED(Ready_Effect()))
- // return E_FAIL;
+ if (FAILED(Ready_Effect()))
+ return E_FAIL;
if (FAILED(Ready_MonsterEffect()))
return E_FAIL;
diff --git a/Jusin154_Team3D/Editor/Private/Levioso.cpp b/Jusin154_Team3D/Editor/Private/Levioso.cpp
index 0a7a72f9c..69b451ff5 100644
--- a/Jusin154_Team3D/Editor/Private/Levioso.cpp
+++ b/Jusin154_Team3D/Editor/Private/Levioso.cpp
@@ -6,6 +6,7 @@
#include "Player.h"
#include "TrailObject.h"
#include "Wand.h"
+#include "InfoInstance.h"
CLevioso::CLevioso(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
@@ -14,7 +15,8 @@ CLevioso::CLevioso(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
}
CLevioso::CLevioso(const CLevioso& rhs)
- : CEffect_Container(rhs)
+ : CEffect_Container(rhs),
+ m_pInfoInstance(CInfoInstance::GetInstance())
{
}
@@ -74,11 +76,10 @@ void CLevioso::Update(_float fTimeDelta)
Update_Event(fTimeDelta);
- m_pLeviosoPJ_0->Get_Component()->Translation(m_vOwnerLook * 0.25f);
+ m_pLeviosoPJ_0->Get_Component()->Translation(XMLoadFloat3(&m_vCameraLook) * m_fLinearSpeed);
+ m_pTrail_PT_0->Get_Component()->Translation(XMLoadFloat3(&m_vCameraLook) * m_fLinearSpeed);
- m_pTrail_PT_0->Get_Component()->Translation(m_vOwnerLook * 0.25f);
-
if (true == m_pGameInstance->SphereCast(0.0f, XMLoadFloat4(&m_vStartPos), m_vOwnerLook, XMVectorGetX(XMVector3Length(m_vOwnerLook * 1.f))
, PSX::PxHitFlag::ePOSITION | PSX::PxHitFlag::eNORMAL, PSX::PxQueryFlag::eSTATIC, m_Hitbuffer))
{
@@ -126,28 +127,55 @@ HRESULT CLevioso::Pre_Setting(CGameObject* pObject, void* pArg)
_vector WandPos = pPlayer->Get_WandPos().r[3];
CEditEffect* pWandSmoke = Get_PartObject("Levioso_Wand0");
- CEditEffect* pWandLight= Get_PartObject("Levioso_Wand_Light");
-
-
- m_pLeviosoPJ_0->Get_Component()->Set_WorldMatrix(m_pOwner->Get_Component()->Get_XMWorldMatrix());
- m_pTrail_PT_0->Get_Component()->Set_WorldMatrix(m_pOwner->Get_Component()->Get_XMWorldMatrix());
-
+ CEditEffect* pWandLight = Get_PartObject("Levioso_Wand_Light");
m_pLeviosoPJ_0->Get_Component()->Set_State(STATE::POSITION, WandPos);
m_pTrail_PT_0->Get_Component()->Set_State(STATE::POSITION, WandPos);
+
pWandSmoke->Get_Component()->Set_State(STATE::POSITION, pPlayer->Get_PartObject()->Get_WorldPostion());
pWandLight->Get_Component()->Set_State(STATE::POSITION, pPlayer->Get_PartObject()->Get_WorldPostion());
m_pLeviosoPJ_0->Set_Visible(true);
m_pTrail_PT_0->Set_Visible(true);
+
pWandSmoke->Set_Visible(true);
pWandLight->Set_Visible(true);
- m_pLeviosoTrail->Set_Visible(true);
- m_pLeviosoTrail->Get_Component()->Reset_Trail();
m_vOwnerLook = XMVector3Normalize(m_pOwner->Get_Component()->Get_State(STATE::LOOK));
+ _vector vDirection = m_pOwner->Get_Component()->Get_State(STATE::LOOK);
+ XMStoreFloat3(&m_vCameraLook, vDirection);
+
+ _vector vStartPos = WandPos;
+ XMStoreFloat4(&m_vStartPos, vStartPos);
+
+ { /* 대상 위치 지정 */
+
+ CUnit* pTargetUnit = m_pInfoInstance->Get_LockOnUnit();
+ if (nullptr != pTargetUnit) {
+
+ XMStoreFloat4(&m_vTargetPos, pTargetUnit->Get_LockOnPos());
+
+ XMStoreFloat3(&m_vCameraLook, XMVector3Normalize(XMLoadFloat4(&m_vTargetPos) - XMLoadFloat4(&m_vStartPos)));
+ }
+ else {
+ // 타겟이 없다면 현재위치 -> 카메라 룩벡터 * duration간 예상 이동거리 를 대상으로 지정
+ XMStoreFloat4(&m_vTargetPos, vStartPos + vDirection * m_fLinearSpeed * 0.5f);
+ }
+
+ }
+
+ _vector vDir = XMVector3Normalize(XMLoadFloat3(&m_vCameraLook));
+
+ _vector vRight = XMVector3Normalize(XMVector3Cross(XMVectorSet(0.f, 1.f, 0.f, 0.f), vDir));
+
+ _vector vUp = XMVector3Normalize(XMVector3Cross(vRight, vDir));
+
+ _matrix ProjMat = _matrix(vRight, vUp, vDir, vStartPos);
+
+ m_pLeviosoPJ_0->Get_Component()->Set_WorldMatrix(ProjMat);
+
return S_OK;
}
diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp
index b8c0eaaa2..6245df7b2 100644
--- a/Jusin154_Team3D/Editor/Private/Loader.cpp
+++ b/Jusin154_Team3D/Editor/Private/Loader.cpp
@@ -146,6 +146,7 @@
#include "TrollSwing.h"
#include "Troll_Nomal_Smoke.h"
#include "Troll_Rush_Hit.h"
+#include "Goblin_Protego.h"
#include "Troll.h"
#include "Troll_Rock.h"
@@ -1482,6 +1483,9 @@ HRESULT CLoader::Loading_For_Effect()
if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CTroll_Rush_Hit::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
}
+ if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CGoblin_Protego::Create(m_pDevice, m_pContext)))) {
+ return E_FAIL;
+ }
/* For.Prototype_GameObject_Wand */
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CWand::Create(m_pDevice, m_pContext))))
diff --git a/Jusin154_Team3D/Editor/Private/TrailObject.cpp b/Jusin154_Team3D/Editor/Private/TrailObject.cpp
index ece375502..2b8fcf7b7 100644
--- a/Jusin154_Team3D/Editor/Private/TrailObject.cpp
+++ b/Jusin154_Team3D/Editor/Private/TrailObject.cpp
@@ -109,6 +109,9 @@ void CTrailObject::Set_Target(CTransform* pTargetTransform)
void CTrailObject::Trail_Update(_fmatrix WorldMat, _float fTimeDelta)
{
+ if (m_bVisible == false)
+ return;
+
m_pTrailCom->Trail_Update(fTimeDelta, WorldMat);
}
diff --git a/Jusin154_Team3D/Editor/Private/Troll.cpp b/Jusin154_Team3D/Editor/Private/Troll.cpp
index 34ad753b6..bd86d3a2f 100644
--- a/Jusin154_Team3D/Editor/Private/Troll.cpp
+++ b/Jusin154_Team3D/Editor/Private/Troll.cpp
@@ -70,6 +70,7 @@ HRESULT CTroll::Initialize(void* pArg)
m_pLeftHand_BoneMat = m_pModelCom->Get_BoneMatrixPtr("LeftHand");
m_pRightHand_BoneMat = m_pModelCom->Get_BoneMatrixPtr("RightHand");
+ m_pWeapon_BoneMat = Get_PartObject()->Get_Component()->Get_BoneMatrixPtr("Bone");
return S_OK;
}
@@ -122,18 +123,24 @@ void CTroll::Update(_float fTimeDelta)
_matrix LeftHandMatrix = {};
_matrix RightHandMatrix = {};
+ _matrix WeaponMatrix = {};
LeftHandMatrix = XMLoadFloat4x4(m_pLeftHand_BoneMat);
RightHandMatrix = XMLoadFloat4x4(m_pRightHand_BoneMat);
+ WeaponMatrix = XMLoadFloat4x4(m_pWeapon_BoneMat);
+
for (int i = 0; i < 3; ++i) {
LeftHandMatrix.r[i] = XMVector3Normalize(LeftHandMatrix.r[i]);
RightHandMatrix.r[i] = XMVector3Normalize(RightHandMatrix.r[i]);
+ WeaponMatrix.r[i] = XMVector3Normalize(WeaponMatrix.r[i]);
}
+ _matrix WeaponSoket = WeaponMatrix * Get_PartObject()->Get_Component()->Get_XMWorldMatrix();
m_pLeftTrail->Trail_Update(LeftHandMatrix * WorldMat, fTimeDelta);
m_pRightTrail->Trail_Update(RightHandMatrix * WorldMat, fTimeDelta);
+ m_pWeaponTrail->Trail_Update(WeaponSoket, fTimeDelta);
#pragma endregion
@@ -389,13 +396,23 @@ HRESULT CTroll::Ready_Parts()
;
m_pLeftTrail->Load_Trail("../Bin/Resources/Data/Effect/Troll/TrollSide/Troll_Trail", static_cast(NEXT_LEVEL));
+ m_pLeftTrail->Set_Visible(false);
if (FAILED(Add_PartObject("Right_Trail", NEXT_LEVEL, &m_pRightTrail, &PartsDesc))) {
return E_FAIL;
}
m_pRightTrail->Load_Trail("../Bin/Resources/Data/Effect/Troll/TrollSide/Troll_Trail", static_cast(NEXT_LEVEL));
+ m_pRightTrail->Set_Visible(false);
+ if (FAILED(Add_PartObject("Weapon_Trail", NEXT_LEVEL, &m_pWeaponTrail, &PartsDesc))) {
+ return E_FAIL;
+ }
+
+ m_pWeaponTrail->Load_Trail("../Bin/Resources/Data/Effect/Troll/TrollSide/Troll_Swing_Trail", static_cast(NEXT_LEVEL));
+ m_pWeaponTrail->Set_Visible(false);
+
+
#pragma endregion
return S_OK;
}
@@ -418,6 +435,12 @@ HRESULT CTroll::Bind_ShaderResources()
return S_OK;
}
+void CTroll::Troll_Trail_Visible(_bool isTrailVisible)
+{
+ m_pLeftTrail->Set_Visible(isTrailVisible);
+ m_pRightTrail->Set_Visible(isTrailVisible);
+}
+
CTroll* CTroll::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
CTroll* pInstance = new CTroll(pDevice, pContext);
@@ -465,12 +488,22 @@ void CTroll::Free()
SAFE_RELEASE(m_pEffectPool);
SAFE_RELEASE(m_pLeftTrail);
SAFE_RELEASE(m_pRightTrail);
+ SAFE_RELEASE(m_pWeaponTrail);
}
#ifdef _DEBUG
void CTroll::Describe_Entity()
{
__super::Describe_Entity();
+
+ _float4x4 socketMat = *m_pModelCom->Get_BoneMatrixPtr("HeadEnd");
+
+ _string strSocket = "Socket " + to_string(socketMat._41) + to_string(socketMat._42) + to_string(socketMat._43);
+
+ GUI::Text(strSocket.c_str());
+
+
+ m_pTransformCom->Describe_Entity();
}
#endif // _DEBUG
diff --git a/Jusin154_Team3D/Editor/Private/Troll_States.cpp b/Jusin154_Team3D/Editor/Private/Troll_States.cpp
index da5d6af2a..44d802525 100644
--- a/Jusin154_Team3D/Editor/Private/Troll_States.cpp
+++ b/Jusin154_Team3D/Editor/Private/Troll_States.cpp
@@ -5,6 +5,7 @@
#include "Player.h"
#include "Troll_Rock.h"
#include "EffectPool.h"
+#include "TrailObject.h"
#pragma region STATE
#include "State_Idle.h"
@@ -356,8 +357,14 @@ HRESULT CTroll::Behavior_ThrowExitCheck(_float fTimeDelta)
[this]() {Get_PartObject()->Set_Attach(false); },
0.25f);
+ Add_Event(pairAnimInfo.first,
+ [this]() {Troll_Trail_Visible(false);},
+ 0.6f);
+
Add_Event(pairAnimInfo.first, [this]() {
+ Troll_Trail_Visible(true);
+
_matrix HandMat = XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("SKT_LeftHand")) * m_pTransformCom->Get_XMWorldMatrix();
_float4 vPosition = {};
@@ -397,6 +404,17 @@ void CTroll::Behavior_SwingEnter()
Add_Event(pairAnimInfo.first,
[this]() {m_bLookAt = false; },
0.2f);
+
+
+ Troll_Trail_Visible(true);
+ m_pWeaponTrail->Set_Visible(true);
+
+ Add_Event(pairAnimInfo.first,
+ [this]() {
+ Troll_Trail_Visible(false);
+ m_pWeaponTrail->Set_Visible(false);
+ },
+ 0.6f);
}
HRESULT CTroll::Behavior_SwingExitCheck(_float fTimeDelta)
@@ -430,6 +448,18 @@ void CTroll::Behavior_SlamEnter()
m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SLAM)] =
m_fMaxSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SLAM)];
+
+ Troll_Trail_Visible(true);
+ m_pWeaponTrail->Set_Visible(true);
+
+ Add_Event(pairAnimInfo.first,
+ [this]() {
+ Troll_Trail_Visible(false);
+ m_pWeaponTrail->Set_Visible(false);
+ },
+ 0.7f);
+
+
Add_Event(m_Animation[STATEANIM::SLAM].first,
[this]() { m_bLookAt = false; },
0.2f);
@@ -437,6 +467,7 @@ void CTroll::Behavior_SlamEnter()
Add_Event(m_Animation[STATEANIM::SLAM].first, [this]() {
m_pEffectPool->Use_Skill(SKILL_TYPE::TROLL_ATTACK, this);
} , 0.3f);
+
}
HRESULT CTroll::Behavior_SlamExitCheck(_float fTimeDelta)
@@ -469,6 +500,16 @@ void CTroll::Behavior_BackHandSwingEnter()
Add_Event(m_Animation[STATEANIM::BACKHAND_SWING_JOG].first,
[this]() { m_bLookAt = false; },
0.2f);
+
+ Troll_Trail_Visible(true);
+ m_pWeaponTrail->Set_Visible(true);
+
+ Add_Event(pairAnimInfo.first,
+ [this]() {
+ Troll_Trail_Visible(false);
+ m_pWeaponTrail->Set_Visible(false);
+ },
+ 0.9f);
}
HRESULT CTroll::Behavior_BackHandSwingExitCheck(_float fTimeDelta)
diff --git a/Jusin154_Team3D/Editor/Private/Troll_Weapon.cpp b/Jusin154_Team3D/Editor/Private/Troll_Weapon.cpp
index 3fb7c3958..30dc35588 100644
--- a/Jusin154_Team3D/Editor/Private/Troll_Weapon.cpp
+++ b/Jusin154_Team3D/Editor/Private/Troll_Weapon.cpp
@@ -40,6 +40,7 @@ HRESULT CTroll_Weapon::Initialize(void* pArg)
void CTroll_Weapon::Priority_Update(_float fTimeDelta)
{
m_pModelCom->Combined_BoneMatrix();
+
_matrix socketMatrix = {};
socketMatrix = XMLoadFloat4x4(m_pSocketMatrices);
diff --git a/Jusin154_Team3D/Editor/Public/Levioso.h b/Jusin154_Team3D/Editor/Public/Levioso.h
index 6577efc8b..8f841cc38 100644
--- a/Jusin154_Team3D/Editor/Public/Levioso.h
+++ b/Jusin154_Team3D/Editor/Public/Levioso.h
@@ -23,6 +23,8 @@ class CLevioso final : public CEffect_Container
public:
virtual HRESULT Pre_Setting(CGameObject* pObject, void* pArg = nullptr) override;
+private:
+ class CInfoInstance* m_pInfoInstance = { nullptr };
private:
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
@@ -42,6 +44,11 @@ class CLevioso final : public CEffect_Container
_float m_fAccRotateTime = {};
_float m_fTurnSpeed = {};
_float m_fRange = {};
+
+ _float4 m_vStartPos = { 0.f, 0.f, 0.f, 1.f }; // 현재 발사 된 위치
+ _float4 m_vTargetPos = { 0.f, 0.f, 10.f, 1.f }; // 현재 타게팅 된 위치
+ _float m_fLinearSpeed = 0.25f;
+ _float3 m_vCameraLook = {};
public:
static CLevioso* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual void Free() override;
diff --git a/Jusin154_Team3D/Editor/Public/Troll.h b/Jusin154_Team3D/Editor/Public/Troll.h
index 0796a7e4b..ceaa47aa8 100644
--- a/Jusin154_Team3D/Editor/Public/Troll.h
+++ b/Jusin154_Team3D/Editor/Public/Troll.h
@@ -48,11 +48,13 @@ class CTroll final : public CMonster
class CEditEffect* m_pTroll_Particle = { nullptr };
class CEditEffect* m_pTroll_Particle2 = { nullptr };
- class CTrailObject* m_pLeftTrail = {};
- class CTrailObject* m_pRightTrail = {};
+ class CTrailObject* m_pLeftTrail = { nullptr };
+ class CTrailObject* m_pRightTrail = { nullptr };
+ class CTrailObject* m_pWeaponTrail = { nullptr };
const _float4x4* m_pLeftHand_BoneMat = { nullptr };
const _float4x4* m_pRightHand_BoneMat = { nullptr };
+ const _float4x4* m_pWeapon_BoneMat = { nullptr };
private:
virtual HRESULT Initialize_Prototype() override;
@@ -61,6 +63,9 @@ class CTroll final : public CMonster
HRESULT Ready_Parts();
HRESULT Bind_ShaderResources();
+private:
+ void Troll_Trail_Visible(_bool isTrailVisible);
+
public:
static CTroll* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr) override;
diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl
index bd75f7635..e141e7c12 100644
--- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl
+++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl
@@ -105,7 +105,6 @@ void CS_MAIN(
Particle particle = g_ParticleBufferInput[iIndex];
-
ParticleValue particleValue = g_ParticleValueBufferInput[iIndex];
@@ -190,7 +189,7 @@ void CS_MAIN(
particle.vTranslation.y -= 0.5f * particle.vLifeTime.x * fGravity;
fOnlyDropY = particle.vTranslation.y;
}
-
+
if (isMoveForward)
{
@@ -304,7 +303,7 @@ void CS_MAIN(
float fOldViewZ = vDepthDesc.y * fFar;
- if (vProjPos.w >= fOldViewZ && particle.vLifeTime.x >= 0.2f)
+ if (vProjPos.w >= fOldViewZ && particle.vLifeTime.x >= 0.3f)
{
if (particleValue.isCompareStop == false)
{
diff --git a/Jusin154_Team3D/Engine/Private/Instance_Model.cpp b/Jusin154_Team3D/Engine/Private/Instance_Model.cpp
index 9103dc341..456258b75 100644
--- a/Jusin154_Team3D/Engine/Private/Instance_Model.cpp
+++ b/Jusin154_Team3D/Engine/Private/Instance_Model.cpp
@@ -737,7 +737,6 @@ void CInstance_Model::Instane_Buffer_ReStruct()
pParticleValues[i].fCollisionTime = 0.f;
pParticleValues[i].isCompareStop = false;
- m_InstanceDesc.isDetphCompareStop = true;
memcpy(&pParticleValues[i].vOriginRight, SRMatrix.m[0], sizeof(_float4));
memcpy(&pParticleValues[i].vOriginUp, SRMatrix.m[1], sizeof(_float4));