diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj
index cb53bbb61..06ac4c4f5 100644
--- a/Jusin154_Team3D/Client/Default/Client.vcxproj
+++ b/Jusin154_Team3D/Client/Default/Client.vcxproj
@@ -170,6 +170,7 @@ call Update_Resources.bat
+
@@ -316,6 +317,7 @@ call Update_Resources.bat
+
diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
index 14bfa5ce5..fd4ebf99e 100644
--- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
+++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
@@ -428,6 +428,9 @@
02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Warrior
+
+ 02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Spector
+
@@ -903,6 +906,9 @@
{3246055a-734f-45e2-ab2f-437ec2ccf061}
+
+ {234b3dd8-4ec9-4e81-ac7f-4eacb8f53780}
+
@@ -1333,6 +1339,9 @@
+
+ 02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Spector
+
diff --git a/Jusin154_Team3D/Client/Private/Goblin_Mage_States.cpp b/Jusin154_Team3D/Client/Private/Goblin_Mage_States.cpp
index 4c6dac69a..a4c25113e 100644
--- a/Jusin154_Team3D/Client/Private/Goblin_Mage_States.cpp
+++ b/Jusin154_Team3D/Client/Private/Goblin_Mage_States.cpp
@@ -11,6 +11,7 @@
#include "State_Combat.h"
#include "State_Spell.h"
#include "State_LightAttack.h"
+#include "State_Blink.h"
#include "State_Hit.h"
#pragma endregion
@@ -93,7 +94,12 @@ HRESULT CGoblin_Mage::Behavior_CombatExitCheck(_float fTimeDelta)
return E_FAIL;
}
- if (m_fTargetDistance <= 15.f && m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::SPELL)] <= 0.f)
+
+ if (m_fTargetDistance <= 7.f && m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::TP)] <= 0.f)
+ {
+ m_pFSM->Change_State(FSMSTATE::BLINK);
+ }
+ else if (m_fTargetDistance <= 15.f && m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::SPELL)] <= 0.f)
{
m_pFSM->Change_State(FSMSTATE::SPELL);
}
@@ -177,6 +183,67 @@ void CGoblin_Mage::Behavior_LightAttackExit()
m_pFSM->Disable_State(FSMSTATE::LIGHT_ATTACK);
}
+void CGoblin_Mage::Behavior_BlinkEnter()
+{
+
+ pair<_uint, _bool> pairAnimInfo = {};
+ m_pFSM->Enable_State(FSMSTATE::BLINK);
+
+ pairAnimInfo = m_Animation[STATEANIM::BLINK_START];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
+
+ Add_Event(pairAnimInfo.first,
+ [this]() {
+ m_bVisible = false;
+ m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::TP)] = m_fMaxSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::TP)];
+ _vector vPos = Get_WorldPostion();
+ _vector vLook =m_pTransformCom->Get_State(STATE::LOOK);
+ vLook = XMVectorSetY(vLook, 0.f);
+ vLook = XMVector3Normalize(vLook);
+
+ _float randAngleDeg = m_pGameInstance->Real_Random_Float(-60.f, 60.f);
+ _float randAngleRad = XMConvertToRadians(randAngleDeg);
+
+ _matrix rot = XMMatrixRotationY(randAngleRad);
+ _vector offsetDir = XMVector3TransformNormal(vLook, rot);
+
+ _float randDist = m_pGameInstance->Real_Random_Float(-5.f, -3.f);
+
+ _vector vFinalPos = vPos + offsetDir * randDist;
+
+ m_pCharacter_Controller->Set_Position(vFinalPos); }
+ , 0.99f);
+}
+
+HRESULT CGoblin_Mage::Behavior_BlinkExitCheck(_float fTimeDelta)
+{
+ pair<_uint, _bool> pairAnimInfo = {};
+ _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
+ m_fTpTime += fTimeDelta;
+ if (m_fTpTime >= 1.5f)
+ {
+ m_bVisible = true;
+ m_fTpTime = 0.f;
+ pairAnimInfo = m_Animation[STATEANIM::BLINK];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
+ }
+
+ if (m_pModelCom->IsFinishedAnim() && iCurrAnimIndex == m_Animation[STATEANIM::BLINK].first)
+ {
+ m_bLookAt = true;
+ m_fTpTime = 0.f;
+ m_pFSM->Change_State(FSMSTATE::COMBAT);
+ return E_FAIL;
+ }
+
+ return E_FAIL;
+}
+
+void CGoblin_Mage::Behavior_BlinkExit()
+{
+ m_pFSM->Disable_State(FSMSTATE::BLINK);
+}
+
void CGoblin_Mage::Behavior_HitEnter()
{
pair<_uint, _bool> pairAnimInfo = {};
@@ -315,6 +382,17 @@ void CGoblin_Mage::Add_FSM()
m_States.emplace(FSMSTATE::LIGHT_ATTACK, CState_LightAttack::Create(&Desc));
}
+ {
+ CState_Blink::STATE_BLINK_DESC Desc{};
+ Desc.pOwner = this;
+ Desc.funcEnterEvent = [this]() { Behavior_BlinkEnter(); };
+ Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_BlinkExitCheck(fTimedelta); };
+ Desc.funcExitEvent = [this]() { Behavior_BlinkExit(); };
+ Desc.funcPriorityUpdate = nullptr;
+ Desc.funcLateUpdate = nullptr;
+ m_States.emplace(FSMSTATE::BLINK, CState_Blink::Create(&Desc));
+ }
+
#pragma endregion
#pragma region Behavior_Combat_Focus
@@ -363,6 +441,7 @@ void CGoblin_Mage::Set_Anim()
m_Animation[STATEANIM::SPRINT] = { 90, true };
m_Animation[STATEANIM::SKILL] = { 85,false }; // 나이프 던지기
+ m_Animation[STATEANIM::BLINK_START] = { 428,false };
m_Animation[STATEANIM::BLINK] = { 426,false }; // 텔레포트
m_Animation[STATEANIM::SWING_FWD] = { 100,false }; // 도끼 스윙 444
m_Animation[STATEANIM::ATTACK_END] = { 76,false };
diff --git a/Jusin154_Team3D/Client/Private/Goblin_Spector.cpp b/Jusin154_Team3D/Client/Private/Goblin_Spector.cpp
new file mode 100644
index 000000000..f74d608e3
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/Goblin_Spector.cpp
@@ -0,0 +1,368 @@
+#include "pch.h"
+#include "Goblin_Spector.h"
+
+#include "GameInstance.h"
+#include "Effect_Container.h"
+
+#pragma region STATE
+#include "State_Idle.h"
+#include "State_Dodge.h"
+#include "State_Jump.h"
+#include "State_Land.h"
+#include "State_Move.h"
+#include "State_Combat.h"
+#pragma endregion
+
+#include "EffectParts.h"
+
+
+CGoblin_Spector::CGoblin_Spector(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CMonster(pDevice, pContext)
+{
+}
+
+CGoblin_Spector::CGoblin_Spector(const CGoblin_Spector& Prototype)
+ : CMonster(Prototype)
+{
+}
+
+HRESULT CGoblin_Spector::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CGoblin_Spector::Initialize(void* pArg)
+{
+ if (FAILED(__super::Initialize(pArg)))
+ return E_FAIL;
+
+ if (FAILED(Ready_Components()))
+ return E_FAIL;
+
+ if (FAILED(Ready_Parts()))
+ return E_FAIL;
+
+
+ return S_OK;
+}
+
+void CGoblin_Spector::Priority_Update(_float fTimeDelta)
+{
+ __super::Priority_Update(fTimeDelta);
+}
+
+void CGoblin_Spector::Update(_float fTimeDelta)
+{
+ __super::Update(fTimeDelta);
+
+ m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
+
+ Play_Event();
+
+ GUI::Text("%d", m_pCharacter_Controller->IsActive());
+ GUI::Text("%f %f", m_vStunTimer.x, m_vStunTimer.y);
+ if (true == m_pCharacter_Controller->IsActive()) {
+ m_pCharacter_Controller->Move(fTimeDelta);
+ m_vStunTimer.x = 0.f;
+ }
+ else {
+ if (0.f == m_vStunTimer.x) {
+ PSX::PxExtendedVec3 pxControlllerPos = m_pCharacter_Controller->Get_Controller()->getPosition();
+ PSX::PxTransform pxTransform((_float)pxControlllerPos.x, (_float)pxControlllerPos.y + 100.f, (_float)pxControlllerPos.z);
+ m_pCharacter_Controller->Set_Position(XMLoadFloat3((_float3*)&pxTransform.p));
+ //m_pCharacter_Controller->Move(fTimeDelta);
+ }
+ m_vStunTimer.x += fTimeDelta;
+ m_pTransformCom->Set_WorldMatrix(m_pRigidBody->Get_Actor()->getGlobalPose());
+ if (m_vStunTimer.y < m_vStunTimer.x) {
+ m_pRigidBody->ConvertToCCT(*m_pCharacter_Controller);
+ }
+ }
+#ifdef _DEBUG
+ Describe_Entity();
+#endif // _DEBUG
+
+}
+
+void CGoblin_Spector::Late_Update(_float fTimeDelta)
+{
+ __super::Late_Update(fTimeDelta);
+ if (true == m_pCharacter_Controller->IsActive()) {
+ m_pTransformCom->Set_State(STATE::POSITION, m_pCharacter_Controller->Get_FootPosition());
+ }
+ else {
+ m_pTransformCom->Set_WorldMatrix(m_pRigidBody->Get_FootPositionPxTransform());
+ }
+
+
+ m_pTransformCom->LookAt_Horizontal(XMLoadFloat4(&m_vTargetPos));
+
+ m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
+}
+
+HRESULT CGoblin_Spector::Render()
+{
+ if (!m_bVisible)
+ return S_OK;
+
+ if (FAILED(Bind_ShaderResources())) {
+ return E_FAIL;
+ }
+
+ _uint iNumMeshes = m_pModelCom->Get_NumMeshes();
+ _uint iShaderPass = ENUM_CLASS(SHADER_PASS_ANIM::SPECTOR);
+
+ for (_uint i = 0; i < iNumMeshes; i++)
+ {
+ if (FAILED(m_pModelCom->Bind_BoneMatrices(i, m_pShaderCom, "g_BoneMatrices"))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Begin(iShaderPass))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pModelCom->Render(i))) {
+ return E_FAIL;
+ }
+ }
+
+
+#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;
+ }
+ }
+#endif
+ return S_OK;
+}
+
+_vector CGoblin_Spector::Get_LockOnPos()
+{
+ if (nullptr != m_pCharacter_Controller && true == m_pCharacter_Controller->IsActive()) {
+ return m_pCharacter_Controller->Get_Position();
+ }
+ else if (nullptr != m_pRigidBody) {
+ return m_pRigidBody->Get_Position();
+ }
+ return Get_WorldPostion();
+}
+
+void CGoblin_Spector::OnCollision(CGameObject* pOther, void* pDesc)
+{
+ /*if (true == m_bDead) {
+ return;
+ }
+ ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc);
+
+ _uint iSkillType = dynamic_cast(pOther)->Get_SkillType();
+ m_fHitRadius = CMyTools::Get_Direction2D(m_pTransformCom->Get_State(STATE::LOOK), XMLoadFloat4(&CollisionDesc->vHitDir));
+ switch (iSkillType)
+ {
+ case ENUM_CLASS(SKILL_TYPE::DESCENDO):
+ m_eHitSpell = STATEANIM::KNOCKDOWN_FWD;
+ break;
+ case ENUM_CLASS(SKILL_TYPE::FLIPENDO):
+ m_eHitSpell = STATEANIM::TUMBLE2;
+ break;
+ case ENUM_CLASS(SKILL_TYPE::JAP):
+ m_eHitSpell = STATEANIM::HIT_LEVIOSO;
+ if (true == Get_Damage(60.f)) {
+ m_pFSM->Change_State(FSMSTATE::DEAD);
+ return;
+ }
+ break;
+ case ENUM_CLASS(SKILL_TYPE::LEVIOSO):
+ m_eHitSpell = STATEANIM::HIT_LEVIOSO;
+ break;
+ default:
+ m_eHitSpell = STATEANIM::KNOCKDOWN_FWD;
+ break;
+ }
+ if (!m_pFSM->IsEnable(FSMSTATE::BLINK)) {
+ m_pFSM->Change_State(FSMSTATE::HIT);
+ }
+*/
+}
+
+void CGoblin_Spector::OnHit(CGameObject* pOther, CGameObject* pCaller)
+{
+}
+
+HRESULT CGoblin_Spector::Ready_Components()
+{
+ CTransform::TRANSFORM_DESC Desc = {};
+
+ Desc.fSpeedPerSec = 10.f;
+ Desc.fRotationPerSec = XMConvertToRadians(180.0f);
+ Desc.fRadius = 10.f;
+
+ __super::Ready_Components(&Desc);
+
+ m_strModelPrototypeTag = TEXT("Prototype_Component_Goblin_Spector_Model");
+
+ /* Com_Model */
+ if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_strModelPrototypeTag,
+ reinterpret_cast(&m_pModelCom)))) {
+ return E_FAIL;
+ }
+
+ { // CCT
+ CCharacter_Controller::Character_Controller_DESC Desc{};
+
+ Desc.iSubKind = ENUM_CLASS(PXOBJECT::GOBLIN_WARRIOR);
+ Desc.pTransform = m_pTransformCom;
+ Desc.eBodyType = ACTOR::CAPSULE;
+ Desc.fContactOffset = 0.001f;
+ Desc.fMaterial = { 1.2f, 1.0f, 0.0f };
+ Desc.bAutoStepping = { false };
+ Desc.fStepOffset = { 0.05f };
+ Desc.fRadius = 0.6f;
+ Desc.fHeight = 0.7f;
+ Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_Monster_HitReport::Create();
+ Desc.pCallback_Behavior = m_pCallBack_Behavior = CCallBack_Monster_Behavior::Create();
+ Desc.eClimbingMode = PSX::PxCapsuleClimbingMode::eEASY;
+ Desc.fWalkableSlope = 45.f;
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_CCT_CAPSULE"), (CComponent**)&m_pCharacter_Controller, &Desc))) {
+ return E_FAIL;
+ }
+ }
+ m_pCharacter_Controller->Set_Position(m_pTransformCom->Get_State(STATE::POSITION));
+ { // DO
+ CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
+ Desc.iSubKind = ENUM_CLASS(PXOBJECT::GOBLIN_WARRIOR);
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX"), (CComponent**)&m_pRigidBody, &Desc))) {
+ return E_FAIL;
+ }
+ m_pGameInstance->Detach_Actor(*m_pRigidBody->Get_Actor());
+ }
+
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("STAT_GOBLIN"), (CComponent**)&m_pStat))) {
+ return E_FAIL;
+ }
+ return S_OK;
+}
+
+HRESULT CGoblin_Spector::Ready_Parts()
+{
+#pragma region EFFECT
+ /* EFFECT */
+
+ CPartObject::PARTOBJECT_DESC PartsDesc{};
+
+ PartsDesc.pParentTransform = m_pTransformCom;
+
+
+
+ if (FAILED(Add_PartObject("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(NEXT_LEVEL));
+ m_pGoblin_Particle->FollowParants(m_pModelCom->Get_BoneMatrixPtr("RightShoulder"));
+
+
+
+ if (FAILED(Add_PartObject("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(NEXT_LEVEL));
+ m_pGoblin_Particle2->FollowParants(m_pModelCom->Get_BoneMatrixPtr("RightShoulder"));
+
+
+ if (FAILED(Add_PartObject("Goblin_Smoke", g_iStaticLevel, &m_pSmoke, &PartsDesc)))
+ {
+ return E_FAIL;
+ }
+
+ m_pSmoke->Load("../Bin/Resources/Data/Effect/Goblin/GoblinSide/Goblin_Smoke", static_cast(NEXT_LEVEL));
+ m_pSmoke->FollowParants(m_pModelCom->Get_BoneMatrixPtr("Spine2"));
+
+
+#pragma endregion
+ return S_OK;
+
+ return S_OK;
+}
+
+HRESULT CGoblin_Spector::Bind_ShaderResources()
+{
+ if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
+ return E_FAIL;
+ }
+ return S_OK;
+}
+
+CGoblin_Spector* CGoblin_Spector::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CGoblin_Spector* pInstance = new CGoblin_Spector(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CGoblin_Spector");
+ SAFE_RELEASE(pInstance);
+ }
+ return pInstance;
+}
+
+CGameObject* CGoblin_Spector::Clone(void* pArg, CGameObject* pOwner)
+{
+ CGoblin_Spector* pInstance = new CGoblin_Spector(*this);
+
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CGoblin_Spector");
+ SAFE_RELEASE(pInstance);
+ }
+ return pInstance;
+}
+
+void CGoblin_Spector::Free()
+{
+ __super::Free();
+
+ if (nullptr != m_pCallBack_Behavior) {
+ m_pCallBack_Behavior->Finalize();
+ }
+ if (nullptr != m_pCallBack_HitReport) {
+ m_pCallBack_HitReport->Finalize();
+ }
+
+ SAFE_RELEASE(m_pCharacter_Controller);
+ SAFE_RELEASE(m_pRigidBody);
+ SAFE_RELEASE(m_pSmoke);
+ SAFE_RELEASE(m_pGoblin_Particle);
+ SAFE_RELEASE(m_pGoblin_Particle2);
+ Safe_Delete(m_pCallBack_Behavior);
+ Safe_Delete(m_pCallBack_HitReport);
+}
+#ifdef _DEBUG
+
+void CGoblin_Spector::Describe_Entity()
+{
+}
+
+#endif // _DEBUG
diff --git a/Jusin154_Team3D/Client/Private/Goblin_States.cpp b/Jusin154_Team3D/Client/Private/Goblin_States.cpp
index c4e638f74..0fabc287b 100644
--- a/Jusin154_Team3D/Client/Private/Goblin_States.cpp
+++ b/Jusin154_Team3D/Client/Private/Goblin_States.cpp
@@ -31,7 +31,7 @@ void CGoblin::Behavior_IdleEnter()
HRESULT CGoblin::Behavior_IdleExitCheck()
{
- if (m_fTargetDistance <= 20.f && m_fTargetDistance != 0.f)
+ if (m_fTargetDistance <= 20.f && m_fTargetDistance >=1.f)
{
m_vOriginPos = m_pTransformCom->Get_State(STATE::POSITION);
m_pFSM->Change_State(FSMSTATE::MOVE);
@@ -63,7 +63,7 @@ HRESULT CGoblin::Behavior_MoveExitCheck()
pair<_uint, _bool> pairAnimInfo = {};
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
- if (m_fTargetDistance <= 15.f && m_fTargetDistance != 0.f)
+ if (m_fTargetDistance <= 15.f && m_fTargetDistance >=1.f)
m_pFSM->Change_State(FSMSTATE::COMBAT);
return E_FAIL;
@@ -96,11 +96,9 @@ HRESULT CGoblin::Behavior_CombatExitCheck(_float fTimeDelta)
return E_FAIL;
}
- if (m_fTargetDistance <= 7.f)
+ if (m_fTargetDistance <= 7.f && m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::SWING)] <= 0.f)
{
- if (m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::SWING)] <= 0.f) {
- m_pFSM->Change_State(FSMSTATE::SWING);
- }
+ m_pFSM->Change_State(FSMSTATE::SWING);
}
else if (m_fTargetDistance >= 7.f && m_fTargetDistance <= 12.f && m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::THROW)] <= 0.f)
{
@@ -387,6 +385,7 @@ void CGoblin::Behavior_HitExit()
void CGoblin::Behavior_DeadEnter()
{
+ m_bLookAt = false;
pair<_uint, _bool> pairAnimInfo = {};
m_pFSM->Enable_State(FSMSTATE::DEAD);
diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp
index 747568162..1f35ba9ec 100644
--- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp
+++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp
@@ -20,6 +20,7 @@
#include "Troll.h"
#include "Goblin.h"
#include "Goblin_Mage.h"
+#include "Goblin_Spector.h"
#pragma endregion
@@ -384,6 +385,9 @@ HRESULT CLevel_GamePlay::Ready_Layer_Monster()
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
return E_FAIL;
}
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
+ return E_FAIL;
+ }
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
return E_FAIL;
}
diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp
index 70c8167c5..04b5f360f 100644
--- a/Jusin154_Team3D/Client/Private/Loader.cpp
+++ b/Jusin154_Team3D/Client/Private/Loader.cpp
@@ -24,6 +24,7 @@
#include "Player.h"
#include "Goblin.h"
#include "Goblin_Mage.h"
+#include "Goblin_Spector.h"
#include "Troll.h"
#pragma endregion
@@ -1339,6 +1340,10 @@ HRESULT CLoader::Loading_For_GamePlay()
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/Goblin_Mage/GoblinMage.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
return E_FAIL;
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_Spector_Model"),
+ CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/GoblinSpector/GoblinSpector.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
+ return E_FAIL;
+
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Troll_Model"),
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/SubTroll/troll.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))){
return E_FAIL;
@@ -1844,6 +1849,10 @@ HRESULT CLoader::Loading_For_GamePlay()
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CGoblin_Mage::Create(m_pDevice, m_pContext))))
return E_FAIL;
+ /* For.Prototype_GameObject_Goblin_Spector */
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CGoblin_Spector::Create(m_pDevice, m_pContext))))
+ return E_FAIL;
+
/* For.Prototype_GameObject_Troll */
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CTroll::Create(m_pDevice, m_pContext))))
return E_FAIL;
diff --git a/Jusin154_Team3D/Client/Private/MonsterInfo.cpp b/Jusin154_Team3D/Client/Private/MonsterInfo.cpp
index 51100c7b8..46ff3b6c5 100644
--- a/Jusin154_Team3D/Client/Private/MonsterInfo.cpp
+++ b/Jusin154_Team3D/Client/Private/MonsterInfo.cpp
@@ -3,6 +3,8 @@
#include "GameInstance.h"
#include "InfoInstance.h"
#include "Monster.h"
+#include "Layer.h"
+#include "Player.h"
CMonsterInfo::CMonsterInfo()
{
@@ -118,7 +120,19 @@ HRESULT CMonsterInfo::Refresh_LockOnMonsters()
_vector vMonsterPos;
_vector vToMonsterDir;
- _float fFovy = max(m_pGameInstance->Get_CameraFov() - XMConvertToRadians(30.f), XMConvertToRadians(20.f));
+ _bool Aim = false;
+ _float fFovy = 0.f;
+ if (m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::GAMEPLAY), LAYER_PLAYER) != nullptr)
+ {
+ Aim = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::GAMEPLAY), LAYER_PLAYER)->Get_Object()->Get_Aim();
+ }
+ if (Aim)
+ {
+ fFovy = max(m_pGameInstance->Get_CameraFov() - XMConvertToRadians(50.f), XMConvertToRadians(5.f));
+ }
+ else {
+ fFovy = max(m_pGameInstance->Get_CameraFov() - XMConvertToRadians(30.f), XMConvertToRadians(20.f));
+ }
{ // 뷰프러스텀 순회해서 가장 중앙에 근접한 몬스터 찾기
for (list::iterator iter = m_ActiveMonsters.begin(); iter != m_ActiveMonsters.end(); ++iter) {
diff --git a/Jusin154_Team3D/Client/Private/Player.cpp b/Jusin154_Team3D/Client/Private/Player.cpp
index 3ca9bf976..0b07dca3d 100644
--- a/Jusin154_Team3D/Client/Private/Player.cpp
+++ b/Jusin154_Team3D/Client/Private/Player.cpp
@@ -140,7 +140,10 @@ __super::Update(fTimeDelta);
if (m_pGameInstance->Mouse_Down(DIM_RBUTTON))
m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::DIM_RBUTTON_DOWN));
if (m_pGameInstance->Mouse_Up(DIM_RBUTTON))
+ {
m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::DIM_RBUTTON_UP));
+ m_bAim = false;
+ }
}
diff --git a/Jusin154_Team3D/Client/Private/Player_States.cpp b/Jusin154_Team3D/Client/Private/Player_States.cpp
index 38cd6c9d1..dd913a3b7 100644
--- a/Jusin154_Team3D/Client/Private/Player_States.cpp
+++ b/Jusin154_Team3D/Client/Private/Player_States.cpp
@@ -137,6 +137,7 @@ HRESULT CPlayer::InputAim()
if (m_pGameInstance->Mouse_Pressing(DIM_RBUTTON) ||
m_pGameInstance->Mouse_Pressing(DIM_LBUTTON))
{
+ if (m_pGameInstance->Mouse_Pressing(DIM_RBUTTON)) {m_bAim = true;}
return S_OK;
}
return E_FAIL;
@@ -910,7 +911,7 @@ void CPlayer::Behavior_LightAttackEnter()
HRESULT CPlayer::Behavior_LightAttackExitCheck()
{
pair<_uint, _bool> pairAnimInfo;
-
+ _float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio();
if (m_pGameInstance->Mouse_Up(DIM_LBUTTON))
{
_uint iCurr = m_pModelCom->Get_AnimIndex();
@@ -918,13 +919,11 @@ HRESULT CPlayer::Behavior_LightAttackExitCheck()
if (iCurr >= iStart && iCurr < iStart + 3)
{
- _float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio();
-
_uint iNext = iCurr + 1;
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);
@@ -943,7 +942,7 @@ HRESULT CPlayer::Behavior_LightAttackExitCheck()
}
}
- if (SUCCEEDED(InputMove()) && IsCurrentKeyFrame("Combat")) {
+ if (SUCCEEDED(InputMove()) && fRatio >= 0.3f) {
m_pFSM->Change_State(FSMSTATE::MOVE);
return E_FAIL;
}
@@ -1068,6 +1067,7 @@ HRESULT CPlayer::Behavior_SpellExitCheck()
{
pair<_uint, _bool> pairAnimInfo;
_uint iIndex = m_pModelCom->Get_AnimIndex();
+ _float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio();
if (SUCCEEDED(InputSpell()))
{
@@ -1076,9 +1076,7 @@ HRESULT CPlayer::Behavior_SpellExitCheck()
if (iCurr >= iStart && iCurr < iStart + 3)
{
- _float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio();
-
- if (fRatio >= 0.1f)
+ if (fRatio >= 0.2f)
{
_uint iNext = iCurr + 1;
pairAnimInfo = m_Animation[STATEANIM::SPELL];
@@ -1120,7 +1118,7 @@ HRESULT CPlayer::Behavior_SpellExitCheck()
}
}
- if (m_pFSM->IsEnable(FSMSTATE::SPELL) && IsCurrentKeyFrame("Combat"))
+ if (m_pFSM->IsEnable(FSMSTATE::SPELL) && fRatio >= 0.3f)
{
if (m_eSpell != ENUM_CLASS(SKILL_TYPE::END))
{
diff --git a/Jusin154_Team3D/Client/Private/Troll_States.cpp b/Jusin154_Team3D/Client/Private/Troll_States.cpp
index 931118eed..15a7c80be 100644
--- a/Jusin154_Team3D/Client/Private/Troll_States.cpp
+++ b/Jusin154_Team3D/Client/Private/Troll_States.cpp
@@ -82,12 +82,10 @@ void CTroll::Behavior_MoveEnter()
pair<_uint, _bool> pairAnimInfo = {};
m_pFSM->Enable_State(FSMSTATE::MOVE);
- if (m_pFSM->IsEnable_Previous(FSMSTATE::IDLE))
- {
- m_pFSM->Enable_State(FSMSTATE::JOG);
- pairAnimInfo = m_Animation[STATEANIM::JOG_START];
- m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
- }
+ 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)
@@ -162,7 +160,6 @@ HRESULT CTroll::Behavior_MoveExitCheck(_float fTimeDelta)
return S_OK;
}
-
if (m_fTargetDistance <= 6.f && m_fTargetDistance != 0.f)
m_pFSM->Change_State(FSMSTATE::COMBAT);
@@ -180,20 +177,34 @@ void CTroll::Behavior_CombatEnter()
m_pFSM->Enable_State(FSMSTATE::COMBAT);
m_bLookAt = true;
-
- if (m_fTargetDistance <= 6.f)
+}
+
+HRESULT CTroll::Behavior_CombatExitCheck(_float fTimeDelta)
+{
+ m_bLookAt = true;
+
+ if (m_fTargetDistance > 30.f && m_fTargetDistance != 0.f)
{
- if (m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SLAM)] <= 0.f) {
- m_pFSM->Change_State(FSMSTATE::SLAM);
- }
+ m_pFSM->Change_State(FSMSTATE::IDLE);
+ return E_FAIL;
+ }
+ else if (m_fTargetDistance > 25.f && m_fTargetDistance != 0.f)
+ {
+ m_pFSM->Change_State(FSMSTATE::MOVE);
+ return E_FAIL;
+ }
- if (m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::BACKHAND_SWING)] <= 0.f) {
- m_pFSM->Change_State(FSMSTATE::BACKHAND_SWING);
- }
-
- if (m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SWING)] <= 0.f) {
- m_pFSM->Change_State(FSMSTATE::SWING);
- }
+ if (m_fTargetDistance <= 6.f && (m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SLAM)] <= 0.f) )
+ {
+ m_pFSM->Change_State(FSMSTATE::SLAM);
+ }
+ else if (m_fTargetDistance <= 6.f && (m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::BACKHAND_SWING)] <= 0.f))
+ {
+ m_pFSM->Change_State(FSMSTATE::BACKHAND_SWING);
+ }
+ else if (m_fTargetDistance <= 6.f && (m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SWING)] <= 0.f))
+ {
+ m_pFSM->Change_State(FSMSTATE::SWING);
}
else if (m_fTargetDistance <= 15.f && m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::THROWROCK)] <= 0.f)
{
@@ -208,16 +219,6 @@ void CTroll::Behavior_CombatEnter()
m_pFSM->Change_State(FSMSTATE::IDLEBREAK);
}
-}
-
-HRESULT CTroll::Behavior_CombatExitCheck(_float fTimeDelta)
-{
- m_bLookAt = true;
- if (m_fTargetDistance > 30.f && m_fTargetDistance != 0.f)
- m_pFSM->Change_State(FSMSTATE::IDLE);
- else if (m_fTargetDistance > 25.f && m_fTargetDistance != 0.f)
- m_pFSM->Change_State(FSMSTATE::MOVE);
-
return E_FAIL;
}
@@ -345,6 +346,7 @@ void CTroll::Behavior_SwingEnter()
m_pFSM->Enable_State(FSMSTATE::SWING);
pairAnimInfo = m_Animation[STATEANIM::SWING_FWD];
+
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SWING)] =
m_fMaxSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SWING)];
diff --git a/Jusin154_Team3D/Client/Public/Client_Enum.h b/Jusin154_Team3D/Client/Public/Client_Enum.h
index d70dd7682..50d625d3c 100644
--- a/Jusin154_Team3D/Client/Public/Client_Enum.h
+++ b/Jusin154_Team3D/Client/Public/Client_Enum.h
@@ -6,7 +6,7 @@ namespace Client
enum class MAPOBJECT_TYPE { CONTAINER, ELEMENT_STATIC, ELEMENT_INTERACT };
enum class MAPOBJECT_RENDER_TYPE { NORMAL, DECAL, GLASS };
- enum class SHADER_PASS_ANIM { DEFAULT, SHADOW, CAPTURE, BLUR, HAIR, EYELASH, OUTLINE_WRITE, OUTLINE_READ, END };
+ enum class SHADER_PASS_ANIM { DEFAULT, SHADOW, CAPTURE, BLUR, HAIR, EYELASH, OUTLINE_WRITE, OUTLINE_READ,SPECTOR, END };
enum class SHADER_PASS_MESH { DEFAULT, SHADOW, SKYBOX, ALPHABLEND, EFFECT_ALPHABLEND, EFFECT_BLEND, EFFECT_ALPHABLEND_CULL, EFFECT_BLEND_CULL, CAPTURE, BLUR, EFFECT_ALPHABLEND_UVMOVE, MAPTOOL, GLASS, OUTLINE_WRITE, OUTLINE_READ, BLOOM, END };
enum class SHADER_PASS_NORTEX { DEFAULT, TERRAIN, ENV_TERRAIN_ANISO, SHADOW, END };
enum class SHADER_PASS_PARTICLE { EXPLOSION, END };
diff --git a/Jusin154_Team3D/Client/Public/Goblin_Mage.h b/Jusin154_Team3D/Client/Public/Goblin_Mage.h
index 170a74974..312679b56 100644
--- a/Jusin154_Team3D/Client/Public/Goblin_Mage.h
+++ b/Jusin154_Team3D/Client/Public/Goblin_Mage.h
@@ -13,6 +13,7 @@ class CGoblin_Mage final : public CMonster
{
SPELL,
LIGHTATTACK,
+ TP,
END
};
private:
@@ -59,13 +60,14 @@ class CGoblin_Mage final : public CMonster
virtual void Set_Anim();
_float m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::END)] = {};
- _float m_fMaxSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::END)] = { 20.f,20.f, };
+ _float m_fMaxSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::END)] = { 20.f,20.f,20.f };
_bool m_bStep = { false };
_float m_fTpTime = {};
_float m_fAirTime = {};
_vector m_vOriginPos = {};
_float m_fLength = {};
+ _bool m_bShield = { false };
void Behavior_IdleEnter();
HRESULT Behavior_IdleExitCheck();
@@ -87,6 +89,10 @@ class CGoblin_Mage final : public CMonster
HRESULT Behavior_LightAttackExitCheck(_float fTimeDelta);
void Behavior_LightAttackExit();
+ void Behavior_BlinkEnter();
+ HRESULT Behavior_BlinkExitCheck(_float fTimeDelta);
+ void Behavior_BlinkExit();
+
void Behavior_HitEnter();
HRESULT Behavior_HitExitCheck(_float fTimeDelta);
void Behavior_HitExit();
diff --git a/Jusin154_Team3D/Client/Public/Goblin_Spector.h b/Jusin154_Team3D/Client/Public/Goblin_Spector.h
new file mode 100644
index 000000000..466323dd3
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/Goblin_Spector.h
@@ -0,0 +1,59 @@
+#pragma once
+
+#include "Client_Define.h"
+#include "Monster.h"
+#include "CallBack_Monster_Behavior.h"
+#include "CallBack_Monster_HitReport.h"
+
+NS_BEGIN(Client)
+
+class CGoblin_Spector final : public CMonster
+{
+private:
+ CGoblin_Spector(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CGoblin_Spector(const CGoblin_Spector& Prototype);
+ virtual ~CGoblin_Spector() = default;
+
+public:
+ virtual void Priority_Update(_float fTimeDelta) override;
+ virtual void Update(_float fTimeDelta) override;
+ virtual void Late_Update(_float fTimeDelta) override;
+ virtual HRESULT Render() override;
+ 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:
+ CCallBack_Monster_Behavior* m_pCallBack_Behavior = { nullptr };
+ CCallBack_Monster_HitReport* m_pCallBack_HitReport = { nullptr };
+
+ CCharacter_Controller* m_pCharacter_Controller = { nullptr };
+ CRigidBody_Dynamic* m_pRigidBody = { nullptr };
+ _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;
+ HRESULT Ready_Components();
+ HRESULT Ready_Parts();
+ HRESULT Bind_ShaderResources();
+
+public:
+ static CGoblin_Spector* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr) override;
+ virtual void Free() override;
+#ifdef _DEBUG
+ virtual void Describe_Entity() override;
+
+#endif // _DEBUG
+
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Client/Public/Player.h b/Jusin154_Team3D/Client/Public/Player.h
index 942b21e0a..dfe9334c8 100644
--- a/Jusin154_Team3D/Client/Public/Player.h
+++ b/Jusin154_Team3D/Client/Public/Player.h
@@ -20,6 +20,7 @@ class CPlayer final : public CUnit
virtual HRESULT Render_Shadow() override;
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr)override;
virtual void OnHit(CGameObject* pOther, CGameObject* pCaller = nullptr)override;
+ _bool Get_Aim() { return m_bAim; }
#ifdef _DEBUG
void Render_CameraCoordinateSystem();
#endif // _DEBUG
@@ -103,6 +104,7 @@ class CPlayer final : public CUnit
_float m_fAmount = { 1.f };
_float m_fInputTime = {};
_bool m_bRatio = { false };
+ _bool m_bAim = { false };
HRESULT InputAction();
HRESULT InputMove();
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Goblin/GoblinProtego/ProtegoBottom.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Goblin/GoblinProtego/ProtegoBottom.bin
new file mode 100644
index 000000000..af6286a93
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Goblin/GoblinProtego/ProtegoBottom.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:544382ad6f97afecabc855f8dc86814c9ea6bbaee482d0287d0322e46952c804
+size 1073
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Goblin/GoblinProtego/ProtegoCircle.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Goblin/GoblinProtego/ProtegoCircle.bin
new file mode 100644
index 000000000..009e7163d
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Goblin/GoblinProtego/ProtegoCircle.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4fe532820dc147021997dd1b5a9c395e9e7ba0d8e206b0b9e1ab80cc68172f1d
+size 1121
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Goblin/GoblinProtego/ProtegoSphere.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Goblin/GoblinProtego/ProtegoSphere.bin
new file mode 100644
index 000000000..b68fb28ba
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Goblin/GoblinProtego/ProtegoSphere.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:72db8483c996edbc3ca3f5de53be4d9ab2855eaf7984eb76d7b4ed6ce369406d
+size 1096
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/GoblinProtego.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/GoblinProtego.bin
new file mode 100644
index 000000000..85dbfaf1a
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/GoblinProtego.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:61d710662d0b5a36853d8c07a94deb5fb707601ffa2f2a4bfe17f31e9207720c
+size 232
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/TrollNomalSmoke.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/TrollNomalSmoke.bin
new file mode 100644
index 000000000..d6d8920d1
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/TrollNomalSmoke.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:406299999af5b183256e32dae361e753570530919726c8d248137ae60a30cd39
+size 152
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/TrollRush.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/TrollRush.bin
new file mode 100644
index 000000000..4cd07bb23
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/TrollRush.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:cd6069fb16443fb38c1b59472360ca064aef911b01498044011e994181dd06f4
+size 70
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/TrollSwing.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/TrollSwing.bin
new file mode 100644
index 000000000..d75706c04
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/TrollSwing.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a63cdeb3c40d3f7a719be9698dab4e1692883cbffa52f690d98bbff336fa7c57
+size 137
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Protego/ProtegoCircle.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Protego/ProtegoCircle.bin
index 1dc126b14..6e1706733 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Protego/ProtegoCircle.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Protego/ProtegoCircle.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:e51ef5ceb2e67e3f28a71ac406b7b954971793218cf087a6b21980d2645c5beb
+oid sha256:e3e7e86c3f29daa14d846f99ec1909b675486e4d9945212b2fbdd63dfaf134d9
size 1121
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Protego/ProtegoHit_Lay.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Protego/ProtegoHit_Lay.bin
index 46f1fbd37..deb461ee3 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Protego/ProtegoHit_Lay.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Protego/ProtegoHit_Lay.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:bf42c45bcf958ab7ff58983cc1e7e27cb6f7f42f181b1eb3bdcde8249ada8727
+oid sha256:3dcf0889c738365e99b0ec40c7b9fd70122e5aaab650430bd9b307621d522045
size 1068
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Protego/ProtegoSphere.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Protego/ProtegoSphere.bin
index e4911bf16..0df571232 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Protego/ProtegoSphere.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Protego/ProtegoSphere.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:4654728d937fa4bd660d9cea86dbbf3255a10d8e26c18192fe0af843c9071423
+oid sha256:59d896365c898d5aa7d774f308f01e1b8d6da47f63f4a142eeb3d3d805a88ddb
size 1096
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollNomalSmoke/NomalSmoke.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollNomalSmoke/NomalSmoke.bin
new file mode 100644
index 000000000..6d34d30df
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollNomalSmoke/NomalSmoke.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:fbb5a0c4ac4ac92472e290518a55aed3a0fcbecb82a1ed9b216048ec8ec2e6c1
+size 1081
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollNomalSmoke/Rock_PT_15.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollNomalSmoke/Rock_PT_15.bin
new file mode 100644
index 000000000..5cdad11d7
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollNomalSmoke/Rock_PT_15.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:63f6f81087a07cb00f8b487dd2820270c4794a1387b4ed13d8c937e027acd6e7
+size 1023
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollRush/HitSmoke.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollRush/HitSmoke.bin
index bea2feaa6..77a9bdde3 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollRush/HitSmoke.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollRush/HitSmoke.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:984611013def232f63103bd6208057f74170eca7e958cd3f9531bca920186992
-size 1125
+oid sha256:fc390eae893f71f844682d29d5e0957f84084e1e71fd3ccc276dc5df56fd3193
+size 1089
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollSwing/Rock_PT_25.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollSwing/Rock_PT_25.bin
index f419ec2bc..39a5eb571 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollSwing/Rock_PT_25.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Troll/TrollSwing/Rock_PT_25.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:d3e451d893a7c2979e9844c4dcf50f23b5b118d5c4ffda9f1947a1a46843997f
-size 1023
+oid sha256:86ddfc69f4752004c34ba936aac4548a6596bea57fbcf36bc1e60eac2bf95111
+size 1031
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/GoblinSpector/GoblinSpector.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/GoblinSpector/GoblinSpector.bin
new file mode 100644
index 000000000..dae868946
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/GoblinSpector/GoblinSpector.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c2ae507a8d2e877c8eee91c619519a27cd2f9c8fe216f1fd8b4a8412ab3f8b2c
+size 1268799
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/GoblinSpector/GoblinSpector_Anim.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/GoblinSpector/GoblinSpector_Anim.bin
new file mode 100644
index 000000000..d8e60b0d5
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/GoblinSpector/GoblinSpector_Anim.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b984576a89953bcb47b335afe7902e425c1bb137ffc3926e9252e7a50c580c83
+size 38425807
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/GoblinSpector/SK_GOB_M_Specter_Master_Anim.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/GoblinSpector/SK_GOB_M_Specter_Master_Anim.fbx
new file mode 100644
index 000000000..e5979a3ae
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/GoblinSpector/SK_GOB_M_Specter_Master_Anim.fbx
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4bb13c980e9ace1700522e6b04d389db881b06fe625172a9d85536ad6c446bad
+size 125990796
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/SubTroll_Weapon/SK_WPN_Troll_Club07.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/SubTroll_Weapon/SK_WPN_Troll_Club07.bin
new file mode 100644
index 000000000..d48b0e456
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/SubTroll_Weapon/SK_WPN_Troll_Club07.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d722e69450996491225d93959ac93358367de99d24046163d475ee6e69b34e49
+size 275869
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 c0ce8251b..bd75f7635 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl
+++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl
@@ -43,9 +43,12 @@ struct ParticleValue
float3 vDeltaSize;
float2 vDelay;
+
bool isCompareStop;
float fCollisionTime;
float fDropAttenuation;
+
+ float3 vVelocity;
};
@@ -108,6 +111,8 @@ void CS_MAIN(
float fGravity = particleValue.fGravity;
float fOnlyDropY = 0.f;
+ float fRatio = particle.vLifeTime.x / particle.vLifeTime.y;
+
particleValue.vDelay.x += fTimeDelta;
if (particleValue.vDelay.x < particleValue.vDelay.y)
@@ -144,8 +149,14 @@ void CS_MAIN(
if (particle.vLifeTime.x >= particle.vLifeTime.y)
{
+ particleValue.isCompareStop = false;
+ particleValue.fCollisionTime = 0.f;
+
if (isLoop == false)
{
+ g_VBInstanceOutput[iIndex] = particle;
+ g_ParticleValueOutput[iIndex] = particleValue;
+
return ;
}
//초기화
@@ -157,8 +168,7 @@ void CS_MAIN(
particle.vLifeTime.x = 0.f;
particleValue.vAniIndex.x = 0.f;
particleValue.vDelay.x = 0.f;
- particleValue.isCompareStop = false;
- particleValue.fCollisionTime = 0.f;
+
g_VBInstanceOutput[iIndex] = particle;
g_ParticleValueOutput[iIndex] = particleValue;
@@ -168,17 +178,11 @@ void CS_MAIN(
if (isDrop == true)
- {
+ {
if (particleValue.isCompareStop == true) // 지면에 부딪혔을 때
{
- // 내 현재 시간의 비례
- // 0.0 ~ 3
- // 2초에 부딧혓으면
- // 2 - 2 / 3 - 2
- // 0 ~ 1 cos(0) * - 1
-
- float fRatio = saturate((particle.vLifeTime.x - particleValue.fCollisionTime) / (particle.vLifeTime.y - particleValue.fCollisionTime));
+ fRatio = saturate((particle.vLifeTime.x - particleValue.fCollisionTime) / (particle.vLifeTime.y - particleValue.fCollisionTime));
fGravity *= (2.f * fRatio - 1.f) / particleValue.fDropAttenuation;
}
@@ -187,8 +191,7 @@ void CS_MAIN(
fOnlyDropY = particle.vTranslation.y;
}
-
-
+
if (isMoveForward)
{
float fTime = (particle.vLifeTime.x / particle.vLifeTime.y);
@@ -274,7 +277,7 @@ void CS_MAIN(
}
- if (isDetphCompareStop)
+ if (isDetphCompareStop == true)
{
float2 vTexcoord;
@@ -301,7 +304,7 @@ void CS_MAIN(
float fOldViewZ = vDepthDesc.y * fFar;
- if (vProjPos.w >= fOldViewZ)
+ if (vProjPos.w >= fOldViewZ && particle.vLifeTime.x >= 0.2f)
{
if (particleValue.isCompareStop == false)
{
@@ -319,6 +322,10 @@ void CS_MAIN(
}
+ /*가속력*/
+ if (length(particleValue.vVelocity) > FLT_EPSILON5)
+ particle.vTranslation.xyz += fRatio * particleValue.vVelocity;
+
if (isSizeMove == true)
{
float3 CurLength =
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxAnimMesh.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxAnimMesh.hlsl
index 71249a77c..49ad47556 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxAnimMesh.hlsl
+++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxAnimMesh.hlsl
@@ -466,6 +466,55 @@ PS_OUT PS_EYELASH(PS_IN In)
return Out;
}
+PS_OUT PS_SPECTOR_MAIN(PS_IN In)
+{
+ PS_OUT Out;
+
+ float4 vMtrlDiffuse = g_EmissiveTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
+ float4 vSurface = g_SurfaceParamsTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
+ //if (AlmostEqual7(g_bBinded_Texture[AI_TEXTURE_TYPE_TRANSMISSION], true))
+ //{
+ // float4 vTransmission = g_TransmissionTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
+ // vMtrlDiffuse *= vTransmission;
+ //}
+ //if (AlmostEqual7(g_bBinded_Texture[AI_TEXTURE_TYPE_EMISSIVE], true))
+ //{
+ // float4 vEmissive = g_EmissiveTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
+ // vMtrlDiffuse += vEmissive;
+ //}
+ if (vMtrlDiffuse.a < 0.2f)
+ {
+ discard;
+ }
+
+ float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, AnisoTropy_BLUR_Sampler, In.vTexcoord);
+ float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
+
+ float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix));
+
+ if (true == g_bRimLight)
+ {
+ float fRimLight = GetRimLight(g_vCamPosition.xyz, In.vWorldPos.xyz, vNormal, g_fRimPower, g_fRimStrength);
+ vMtrlDiffuse.xyz = (vMtrlDiffuse.xyz * (1 - fRimLight)) + g_vRimColor * fRimLight;
+ }
+
+ Out.vAlbedo = vMtrlDiffuse;
+ Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
+ float fSurfaceParam = g_fUsingSurfaceParams;
+ if (true == AlmostEqual7(g_fUsingSurfaceParams, 0.f))
+ {
+ fSurfaceParam = 0;
+ }
+ Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
+ (In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
+ fSurfaceParam, // 서페이스 파라미터
+ 1.f);
+ Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
+ Out.vSurface = vSurface;
+
+ return Out;
+}
+
technique11 DefaultTechnique
{
@@ -547,4 +596,14 @@ technique11 DefaultTechnique
GeometryShader = NULL;
PixelShader = compile ps_5_0 PS_MAIN_OUTLINE();
}
+
+ pass SpectorPass // 8
+ {
+ SetRasterizerState(RS_Default);
+ SetDepthStencilState(DSS_Default, 0);
+ SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
+ VertexShader = compile vs_5_0 VS_MAIN();
+ GeometryShader = NULL;
+ PixelShader = compile ps_5_0 PS_SPECTOR_MAIN();
+ }
}
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl
index 87fde2ea8..83525fbfa 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl
+++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl
@@ -35,6 +35,9 @@ struct ParticleValue
bool isCompareStop;
float fCollisionTime;
float fDropAttenuation;
+
+ float3 vVelocity;
+
};
diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj b/Jusin154_Team3D/Editor/Default/Editor.vcxproj
index be0f071a3..f1479f203 100644
--- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj
+++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj
@@ -176,6 +176,16 @@ call Update_Shaders.bat
+
+
+
+
+
+
+
+
+
+
@@ -344,6 +354,10 @@ call Update_Shaders.bat
+
+
+
+
@@ -356,6 +370,16 @@ call Update_Shaders.bat
+
+
+
+
+
+
+
+
+
+
@@ -527,6 +551,11 @@ call Update_Shaders.bat
Create
+
+
+
+
+
diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters
index 3fa63e453..7b349ef5f 100644
--- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters
+++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters
@@ -484,9 +484,6 @@
{c70a2ce4-8664-45e0-b594-4f416829dab8}
-
- {3a12f2c2-0472-41b7-99ce-2c2f17f26e92}
-
{ebad2fd8-622f-4c17-9ba3-b0c4bd366c05}
@@ -526,6 +523,30 @@
{df91c194-9910-489b-a9bb-724e1c1f4440}
+
+ {2e89850b-eb23-46a7-9c3b-9c2965aa0b76}
+
+
+ {ed83440e-f038-4fe2-b005-4ba4093e8462}
+
+
+ {d5debb7c-5bea-456a-8c70-f44b5fc9e51e}
+
+
+ {5d93fa49-8e72-4182-a4ad-c4aef00000b8}
+
+
+ {0df28480-a5ca-4895-b8f4-2bac1a7454ea}
+
+
+ {7363a82f-1bdf-4107-b824-a5326a7d2075}
+
+
+ {4556b8c9-e689-435e-8775-48d0c45a942f}
+
+
+ {3a12f2c2-0472-41b7-99ce-2c2f17f26e92}
+
@@ -984,6 +1005,9 @@
50.UI\Mouse_Cursor
+
+ 02.GameObjects\Layer_Effect\Effect\Monster_Effect\TrollSwing
+
50.UI\Loding_Canvas
@@ -1011,6 +1035,45 @@
02.GameObjects\Env\03.MapElement\Lake
+
+ 02.GameObjects\Monster\Troll
+
+
+ 02.GameObjects\Monster\Troll\Troll_State
+
+
+ 02.GameObjects\Monster\Troll\Troll_State
+
+
+ 02.GameObjects\Monster\Troll\Rock
+
+
+ 02.GameObjects\Monster\Troll\Weapon
+
+
+ 02.GameObjects\Monster\Troll\Troll_State
+
+
+ 02.GameObjects\Monster\Troll\Troll_State
+
+
+ 02.GameObjects\Monster\Troll\Troll_State
+
+
+ 02.GameObjects\Monster\Troll\Troll_State
+
+
+ 02.GameObjects\Monster\Troll\Troll_State
+
+
+ 02.GameObjects\Layer_Effect\Effect\Monster_Effect\Troll_Nomal_Smoke
+
+
+ 02.GameObjects\Layer_Effect\Effect\Monster_Effect\Troll_Rush_Hit
+
+
+ 02.GameObjects\Layer_Effect\Effect\Monster_Effect\Goblin_Protego
+
50.UI\GamePlay_Canvas\Enemy_Panel
@@ -1477,6 +1540,9 @@
50.UI\Mouse_Cursor
+
+ 02.GameObjects\Layer_Effect\Effect\Monster_Effect\TrollSwing
+
50.UI\Loding_Canvas
@@ -1513,6 +1579,48 @@
02.GameObjects\Env\03.MapElement\Lake
+
+ 02.GameObjects\Monster\Troll
+
+
+ 02.GameObjects\Monster\Troll\Troll_State
+
+
+ 02.GameObjects\Monster\Troll\Troll_State
+
+
+ 02.GameObjects\Monster\Troll\Troll_State
+
+
+ 02.GameObjects\Monster\Troll\Rock
+
+
+ 02.GameObjects\Monster\Troll\Weapon
+
+
+ 02.GameObjects\Monster\Troll\Troll_State
+
+
+ 02.GameObjects\Monster\Troll\Troll_State
+
+
+ 02.GameObjects\Monster\Troll\Troll_State
+
+
+ 02.GameObjects\Monster\Troll\Troll_State
+
+
+ 02.GameObjects\Monster\Troll\Troll_State
+
+
+ 02.GameObjects\Layer_Effect\Effect\Monster_Effect\Troll_Nomal_Smoke
+
+
+ 02.GameObjects\Layer_Effect\Effect\Monster_Effect\Troll_Rush_Hit
+
+
+ 02.GameObjects\Layer_Effect\Effect\Monster_Effect\Goblin_Protego
+
diff --git a/Jusin154_Team3D/Editor/Private/CamPosition_Shoulder.cpp b/Jusin154_Team3D/Editor/Private/CamPosition_Shoulder.cpp
index af9f8046e..031a3d922 100644
--- a/Jusin154_Team3D/Editor/Private/CamPosition_Shoulder.cpp
+++ b/Jusin154_Team3D/Editor/Private/CamPosition_Shoulder.cpp
@@ -98,7 +98,7 @@ void CCamPosition_Shoulder::Update(_float fTimeDelta)
if (m_pGameInstance->Key_Up(DIK_GRAVE)) {
m_bMovable = !m_bMovable;
}
- if (m_pGameInstance->Mouse_Down(DIM_RBUTTON)) {
+ if (m_pGameInstance->Mouse_Down(DIM_MBUTTON)) {
m_pGameInstance->Toggle_MouseCenter();
}
if (m_pGameInstance->Key_Up(DIK_P)) {
diff --git a/Jusin154_Team3D/Editor/Private/CameraLockOn.cpp b/Jusin154_Team3D/Editor/Private/CameraLockOn.cpp
index 14335c131..0ce47f2ce 100644
--- a/Jusin154_Team3D/Editor/Private/CameraLockOn.cpp
+++ b/Jusin154_Team3D/Editor/Private/CameraLockOn.cpp
@@ -47,7 +47,7 @@ void CCameraLockOn::Priority_Update(_float fTimeDelta)
void CCameraLockOn::Update(_float fTimeDelta)
{
- if (m_pGameInstance->Mouse_Pressing(DIM_RBUTTON))
+ if (m_pGameInstance->Mouse_Pressing(DIM_MBUTTON))
{
m_bHover = true;
}
diff --git a/Jusin154_Team3D/Editor/Private/Camera_Debug.cpp b/Jusin154_Team3D/Editor/Private/Camera_Debug.cpp
index d37e0cb12..66e018e39 100644
--- a/Jusin154_Team3D/Editor/Private/Camera_Debug.cpp
+++ b/Jusin154_Team3D/Editor/Private/Camera_Debug.cpp
@@ -29,7 +29,7 @@ void CCamera_Debug::Update(_float fTimeDelta)
if (m_pGameInstance->Key_Up(DIK_GRAVE)) {
m_bMovable = !m_bMovable;
}
- if (m_pGameInstance->Mouse_Down(DIM_RBUTTON)) {
+ if (m_pGameInstance->Mouse_Down(DIM_MBUTTON)) {
m_pGameInstance->Toggle_MouseCenter();
}
if (m_bMovable) {
diff --git a/Jusin154_Team3D/Editor/Private/Dummy_PhysXEffectHitBox.cpp b/Jusin154_Team3D/Editor/Private/Dummy_PhysXEffectHitBox.cpp
index 4e185c42b..b93c839fe 100644
--- a/Jusin154_Team3D/Editor/Private/Dummy_PhysXEffectHitBox.cpp
+++ b/Jusin154_Team3D/Editor/Private/Dummy_PhysXEffectHitBox.cpp
@@ -83,6 +83,7 @@ HRESULT CDummy_PhysXEffectHitBox::Ready_Components(void* pArg)
if (FAILED(__super::Ready_Components(pArg))) {
return E_FAIL;
}
+
PHYSXDUMMY_DESC* pDesc = static_cast(pArg);
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&pDesc->vPos), 1.f));
m_pTransformCom->Rotation(pDesc->vRotRPY.x, pDesc->vRotRPY.y, pDesc->vRotRPY.z);
diff --git a/Jusin154_Team3D/Editor/Private/EditEffect.cpp b/Jusin154_Team3D/Editor/Private/EditEffect.cpp
index 5656290eb..07c5b6615 100644
--- a/Jusin154_Team3D/Editor/Private/EditEffect.cpp
+++ b/Jusin154_Team3D/Editor/Private/EditEffect.cpp
@@ -421,7 +421,7 @@ 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* pRenderNames[] = { "PRIORITY" , "SHADOW", "NONBLEND", "DECAL", "BLUR" , "NONLIGHT" ,"EFFECT", "BLEND" ,"BLOOM" , "UI", "OCCLUSION" , "PRESHADOW", "UI_OVERLAY"};
const char* pEffectType[] = { "EFFECT" , "TRAIL" };
const char* pShaderPass[] = { "DEFAULT" , "NON_NOMALMAP" , "BLUR" , "WEIGHTBLEND" , "NON_WORLD" , "NON_WORLD_BLUR", "BLEND", "BLEND_NOWORLD", "BLOOM" ,"BLOOM_NOWORLD" ,"BLUR_NO_EMMISVE", "BLUR_NO_WORLD_NO_EMISSIVE","WEIGHTBLEND_FOR_BLEND" , "DEPTH_STOP" };
const char* pBloomType[] = { "NONE" , "BASIC" , "MUILTY"};
diff --git a/Jusin154_Team3D/Editor/Private/EffectPool.cpp b/Jusin154_Team3D/Editor/Private/EffectPool.cpp
index 850d18000..6db712412 100644
--- a/Jusin154_Team3D/Editor/Private/EffectPool.cpp
+++ b/Jusin154_Team3D/Editor/Private/EffectPool.cpp
@@ -16,6 +16,10 @@
#include "DecendoSide.h"
#include "NomalJapSide.h"
+#include "Troll_Rush_Hit.h"
+#include "Troll_Nomal_Smoke.h"
+#include "TrollSwing.h"
+
CEffectPool::CEffectPool(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CGameObject(pDevice, pContext)
{
@@ -40,9 +44,11 @@ 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;
return S_OK;
}
@@ -216,6 +222,40 @@ HRESULT CEffectPool::Ready_Effect()
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;
+
+ return S_OK;
+}
+
HRESULT CEffectPool::Use_Skill(SKILL_TYPE eType, CGameObject* pOwner, void* pArg)
{
if (pOwner == nullptr)
diff --git a/Jusin154_Team3D/Editor/Private/Goblin_Protego.cpp b/Jusin154_Team3D/Editor/Private/Goblin_Protego.cpp
new file mode 100644
index 000000000..23d3b8844
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/Goblin_Protego.cpp
@@ -0,0 +1,202 @@
+#include "pch.h"
+#include "Goblin_Protego.h"
+
+#include "GameInstance.h"
+#include "EditEffect.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/Editor/Private/Level_EffectViewer.cpp b/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp
index 76ad4faff..9fd2eb7b0 100644
--- a/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp
+++ b/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp
@@ -18,6 +18,7 @@
#include "InfoInstance.h"
#include "Goblin.h"
#include "Terrain.h"
+#include "Troll.h"
CLevel_EffectViewer::CLevel_EffectViewer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
: CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) }
@@ -45,7 +46,16 @@ HRESULT CLevel_EffectViewer::Initialize()
return E_FAIL;
}
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Terrain"))))
+ CTerrain::TERRAIN_DESC Desc = {};
+ /* Hogsmeade */
+
+ Desc.isEdit = false;
+ Desc.iAlphaSizeX = 2048;
+ Desc.iAlphaSizeY = 2048;
+ Desc.vPosition = _float3(-194, 18.5f, -153.f);
+ Desc.strBufferTag = TEXT("Prototype_Component_VIBuffer_Terrain_Hogsmeade");
+
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Terrain"), &Desc)))
return E_FAIL;
@@ -70,14 +80,17 @@ HRESULT CLevel_EffectViewer::Initialize()
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Monster"))))
return E_FAIL;
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Monster"))))
+ return E_FAIL;
+
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Sky")))){
return E_FAIL;
}
- ZeroMemory(&m_PlaneData, sizeof(m_PlaneData));
- m_PlaneData.eKind = PHYSX_KIND::BODY_STATIC;
- m_PlaneData.iSubKind = ENUM_CLASS(PXOBJECT::TERRAIN);
- m_pGameInstance->Add_Editor_Plane(m_PlaneData);
+ //ZeroMemory(&m_PlaneData, sizeof(m_PlaneData));
+ //m_PlaneData.eKind = PHYSX_KIND::BODY_STATIC;
+ //m_PlaneData.iSubKind = ENUM_CLASS(PXOBJECT::TERRAIN);
+ //m_pGameInstance->Add_Editor_Plane(m_PlaneData);
return S_OK;
}
diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp
index aeb555cc1..ad8da2d71 100644
--- a/Jusin154_Team3D/Editor/Private/Loader.cpp
+++ b/Jusin154_Team3D/Editor/Private/Loader.cpp
@@ -143,6 +143,13 @@
#include "DecendoSide.h"
#include "NomalJapSide.h"
+#include "TrollSwing.h"
+#include "Troll_Nomal_Smoke.h"
+#include "Troll_Rush_Hit.h"
+
+#include "Troll.h"
+#include "Troll_Rock.h"
+#include "Troll_Weapon.h"
#pragma endregion
#pragma region PHYSX_HEADER
@@ -1329,9 +1336,22 @@ HRESULT CLoader::Loading_For_Effect()
Safe_Delete(pResult);
}
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Troll_Model"),
+ CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/SubTroll/troll.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Troll_Weapon_Model"),
+ CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Object/SubTroll_Weapon/SK_WPN_Troll_Club07.fbx", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
+ return E_FAIL;
+
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Troll_Rock_Big_Model"),
+ CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Object/Troll_Rock/Troll_Rock_Big.bin", XMMatrixScaling(0.00004f, 0.00004f, 0.00004f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
+ return E_FAIL;
+
{
CVIBuffer_Terrain* pTerrain = CVIBuffer_Terrain::Create(m_pDevice, m_pContext, "Hogsmeade_HeightMap.bin", 512, 512);
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Terrain"), pTerrain))) {
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Terrain_Hogsmeade"), pTerrain))) {
return E_FAIL;
}
pTerrain->ConvertToHeightField(TEXT("Hogsmeade_HeightMap"));
@@ -1407,6 +1427,17 @@ HRESULT CLoader::Loading_For_Effect()
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CGoblin::Create(m_pDevice, m_pContext))))
return E_FAIL;
+
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CTroll::Create(m_pDevice, m_pContext))))
+ return E_FAIL;
+
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CTroll_Rock::Create(m_pDevice, m_pContext))))
+ return E_FAIL;
+
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CTroll_Weapon::Create(m_pDevice, m_pContext))))
+ return E_FAIL;
+
+
/* For.Prototype_GameObject_DummySkyBox */
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CDummySkyBox::Create(m_pDevice, m_pContext))))
return E_FAIL;
@@ -1442,6 +1473,15 @@ HRESULT CLoader::Loading_For_Effect()
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;
+ }
/* For.Prototype_GameObject_Wand */
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CWand::Create(m_pDevice, m_pContext))))
@@ -1485,7 +1525,6 @@ HRESULT CLoader::Loading_For_Effect()
-
m_strMessage = TEXT("Loading Success!");
m_isFinished = true;
@@ -1990,11 +2029,6 @@ HRESULT CLoader::Loading_For_ObjectViewer()
m_strMessage = TEXT("Model Loading..");
- /*if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_SK_GenericDarkWizard_14_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::ANIM_LOCAL, "C:/MeshTable\\Game\\RiggedObjects\\Characters\\Human\\Body\\Generic_M\\SK_GenericDarkWizard_14.fbx", XMMatrixIdentity())))) {
- return E_FAIL;
- }*/
-
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_SK_WPN_Troll_Club07_Model"),
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM_LOCAL, "C:/MeshTable\\Game\\RiggedObjects\\Props\\Weapons\\Troll\\SK_WPN_Troll_Club07.fbx", XMMatrixIdentity())))) {
@@ -2124,6 +2158,14 @@ HRESULT CLoader::Loading_For_ObjectViewer()
TEXT("Prototype_Component_GoblinMage_Model")
));
+ //futures.emplace_back(Deferred_ModelLoad(
+ // MODEL::ANIM, "../Bin/Resources/Models/Monster/GoblinSpector/SK_GOB_M_Specter_Master.bin", XMMatrixRotationY(XMConvertToRadians(180.f))* XMMatrixIdentity(),
+ // TEXT("Prototype_Component_SK_GOB_M_Specter_Master_Model")
+ //));
+
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_GoblinSpector_Anim_Model"),
+ CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/GoblinSpector/GoblinSpector_Anim.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
+ return E_FAIL;
futures.emplace_back(Deferred_ModelLoad(
MODEL::ANIM, "../Bin/Resources/Models/Monster/TombProtector/TombProtector.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixIdentity(),
@@ -2203,6 +2245,7 @@ HRESULT CLoader::Loading_For_ObjectViewer()
Safe_Delete(pResult);
}
+
m_strMessage = TEXT("Shader Loading..");
m_strMessage = TEXT("Prototype Loading..");
diff --git a/Jusin154_Team3D/Editor/Private/Monster.cpp b/Jusin154_Team3D/Editor/Private/Monster.cpp
index 298c7410b..5132f867a 100644
--- a/Jusin154_Team3D/Editor/Private/Monster.cpp
+++ b/Jusin154_Team3D/Editor/Private/Monster.cpp
@@ -2,6 +2,7 @@
#include "Monster.h"
#include "GameInstance.h"
+#include "InfoInstance.h"
#include "Player.h"
CMonster::CMonster(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
@@ -10,7 +11,8 @@ CMonster::CMonster(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
}
CMonster::CMonster(const CMonster& Prototype)
- : CUnit(Prototype)
+ : CUnit(Prototype),
+ m_pInfoInstance(CInfoInstance::GetInstance())
{
}
@@ -21,60 +23,171 @@ HRESULT CMonster::Initialize_Prototype()
HRESULT CMonster::Initialize(void* pArg)
{
- if (FAILED(__super::Initialize(pArg)))
+ if (FAILED(__super::Initialize(pArg))) {
return E_FAIL;
+ }
- //m_pPlayerTransform = static_cast(pArg)->Get_Component();
- //SAFE_ADDREF(m_pPlayerTransform);
+ m_pInfoInstance->Regist_ActiveMonster(this);
return S_OK;
}
void CMonster::Priority_Update(_float fTimeDelta)
{
+ m_pTransformCom->RewindMomentum();
__super::Priority_Update(fTimeDelta);
}
void CMonster::Update(_float fTimeDelta)
{
+ _vector vCurrentPos = Get_WorldPostion();
+ pair pairTarget = m_pInfoInstance->Get_NearestPlayerAlly(vCurrentPos);
+ if (nullptr != pairTarget.first) {
+ Set_Target(*pairTarget.first, *pairTarget.second);
+ }
+ if (nullptr != m_pTarget && m_pTarget->isDead()) {
+ SAFE_RELEASE(m_pTarget);
+ m_fTargetDistance = { FLT_MAX };
+ }
__super::Update(fTimeDelta);
}
void CMonster::Late_Update(_float fTimeDelta)
{
__super::Late_Update(fTimeDelta);
- //m_fTargetDistance = m_pTransformCom->TargetDis(m_pPlayerTransform->Get_State(STATE::POSITION));
}
-HRESULT CMonster::Render()
+HRESULT CMonster::Render_OutLine()
{
+ m_bDrawOutLine = false;
+ if (FAILED(Bind_ShaderResources())) {
+ return E_FAIL;
+ }
+
+ GUI::SetNextItemWidth(80.f);
+ static _float3 vOutLineColor = _float3(1.f, 0.960784376f, 0.933333397f);
+ static _float fOutLineThickness = { 5.f }; // 카메라로부터 거리가 멀어지면 늘어나게끔 바꾸는걸 추천함
+ static _float fOutLineScale = { 1.f };
+ static _float fOutLinePower = { 1.f };
+ GUI::ColorPicker3("vOutLineColor", (_float*)&vOutLineColor);
+ GUI::SliderFloat("Thickness", &fOutLineThickness, 0.1f, 2.f, "%.1f");
+ GUI::SliderFloat("Scale", &fOutLineScale, 0.1f, 2.f, "%.1f");
+ GUI::SliderFloat("Power", &fOutLinePower, 0.1f, 2.f, "%.1f");
+ Compute_Depth();
+ _float fRatio = (m_fCamDepth / *m_pGameInstance->Get_CurrentCameraFar());
+ fOutLineThickness = CMyTools::Lerp_f1D(2.f, 6.f, fRatio);
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_vOutLineColor", &vOutLineColor, sizeof(_float3)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fOutLineThickness", &(fOutLineThickness), sizeof(_float)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fOutLineScale", &(fOutLineScale), sizeof(_float)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fOutLinePower", &(fOutLinePower), sizeof(_float)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_vCamPosition", m_pGameInstance->Get_CamPosition(), sizeof(_float4)))) {
+ return E_FAIL;
+ }
+ _uint iNumMeshes = m_pModelCom->Get_NumMeshes();
+
+ for (_uint i = 0; i < iNumMeshes; i++)
+ {
+ if (FAILED(m_pModelCom->Bind_BoneMatrices(i, m_pShaderCom, "g_BoneMatrices"))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_ANIM::OUTLINE_READ)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pModelCom->Render(i))) {
+ return E_FAIL;
+ }
+ }
return S_OK;
}
-HRESULT CMonster::Ready_Components(void*pArg)
+void CMonster::Set_DrawOutLine()
+{
+ m_bDrawOutLine = true;
+}
+
+_bool CMonster::Get_Damage(_float fDamage)
+{
+ return m_pStat->Get_Damage(fDamage);
+}
+
+_float2 CMonster::Get_Hp()
+{
+ return { m_pStat->Get_Stat(ENUM_CLASS(STAT::HP)), m_pStat->Get_Stat(ENUM_CLASS(STAT::MAXHP)) };
+}
+
+HRESULT CMonster::Ready_Components(void* pArg)
{
__super::Ready_Components(pArg);
/* Com_Shader */
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_ANIMMESH,
- reinterpret_cast(&m_pShaderCom))))
+ reinterpret_cast(&m_pShaderCom)))) {
return E_FAIL;
+ }
return S_OK;
}
-HRESULT CMonster::Bind_ShaderResources()
+void CMonster::Set_Target(CUnit& pTarget, CTransform& pTransform)
{
- return S_OK;
+ SAFE_RELEASE(m_pTarget);
+ m_pTarget = &pTarget;
+ SAFE_ADDREF(m_pTarget);
+
+ _vector vTargetPos = pTransform.Get_State(STATE::POSITION);
+ _vector vToTargetDir = vTargetPos - Get_WorldPostion();
+ XMStoreFloat4(&m_vTargetPos, vTargetPos);
+ XMStoreFloat3(&m_vToTargetDir, XMVector3Normalize(vToTargetDir));
+ m_fTargetDistance = XMVectorGetX(XMVector3Length(vToTargetDir));
}
void CMonster::Free()
{
__super::Free();
- SAFE_RELEASE(m_pPlayerTransform);
+ SAFE_RELEASE(m_pStat);
+ SAFE_RELEASE(m_pTarget);
+ if (nullptr != m_pInfoInstance) {
+ CInfoInstance* pInfo = m_pInfoInstance;
+ m_pInfoInstance = nullptr;
+ pInfo->Deregist_ActiveMonster(this);
+ }
}
+#ifdef _DEBUG
void CMonster::Describe_Entity()
{
+ _bool isToggle = { true };
+
+ if (ImGui::TreeNode("ANIM STATE")) {
+
+ for (auto& pState : m_States)
+ {
+ if (ImGui::Button(to_string(pState.first).c_str()))
+ {
+ m_pFSM->Change_State(pState.first);
+ }
+
+ }
+
+ GUI::Text(to_string(m_pModelCom->Get_CurrentTrackProgressRatio()).c_str());
+
+ ImGui::TreePop();
+ }
}
+
+#endif // _DEBUG
diff --git a/Jusin154_Team3D/Editor/Private/Player.cpp b/Jusin154_Team3D/Editor/Private/Player.cpp
index e446ce8c8..67a100789 100644
--- a/Jusin154_Team3D/Editor/Private/Player.cpp
+++ b/Jusin154_Team3D/Editor/Private/Player.cpp
@@ -284,7 +284,6 @@ HRESULT CPlayer::Ready_Components()
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_CCT_CAPSULE"), (CComponent**)&m_pCharacter_Controller, &Desc))) {
return E_FAIL;
}
- m_pCharacter_Controller->SetGravity(false);
}
{ // DO
diff --git a/Jusin154_Team3D/Editor/Private/Protego.cpp b/Jusin154_Team3D/Editor/Private/Protego.cpp
index 5b189510c..2ab5a7648 100644
--- a/Jusin154_Team3D/Editor/Private/Protego.cpp
+++ b/Jusin154_Team3D/Editor/Private/Protego.cpp
@@ -30,7 +30,6 @@ HRESULT CProtego::Initialize(void* pArg)
if (FAILED(Ready_Components(pArg)))
return E_FAIL;
-
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Protego")))
return E_FAIL;
diff --git a/Jusin154_Team3D/Editor/Private/State_Hit.cpp b/Jusin154_Team3D/Editor/Private/State_Hit.cpp
new file mode 100644
index 000000000..fd450b69b
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/State_Hit.cpp
@@ -0,0 +1,64 @@
+#include "pch.h"
+#include "State_Hit.h"
+#include "Unit.h"
+
+
+CState_Hit::CState_Hit()
+ :CState_Root()
+{
+}
+
+void CState_Hit::Enter()
+{
+ __super::Enter();
+}
+
+HRESULT CState_Hit::Update(_float fTimeDelta)
+{
+ if (nullptr != m_funcPriorityUpdate) {
+ m_funcPriorityUpdate(fTimeDelta);
+ }
+ if (FAILED(__super::Update(fTimeDelta))) {
+ return E_FAIL;
+ }
+ if (nullptr != m_funcLateUpdate) {
+ m_funcLateUpdate(fTimeDelta);
+ }
+ return S_OK;
+}
+
+void CState_Hit::Exit()
+{
+ __super::Exit();
+}
+
+HRESULT CState_Hit::Initialize(STATE_HIT_DESC* pDesc)
+{
+ if (FAILED(__super::Initialize(pDesc))) {
+ return E_FAIL;
+ }
+ m_funcPriorityUpdate = pDesc->funcPriorityUpdate;
+ m_funcLateUpdate = pDesc->funcLateUpdate;
+ m_pModel = m_pOwner->Get_Component();
+ m_pFSM = m_pOwner->Get_Component();
+
+ return S_OK;
+}
+
+CState_Hit* CState_Hit::Create(STATE_HIT_DESC* pDesc)
+{
+ CState_Hit* pInstance = new CState_Hit;
+ if (FAILED(pInstance->Initialize(pDesc))) {
+ SAFE_RELEASE(pInstance);
+ }
+ return pInstance;
+}
+
+void CState_Hit::Free()
+{
+ __super::Free();
+}
+
+void CState_Hit::Describe_Entity()
+{
+}
diff --git a/Jusin154_Team3D/Editor/Private/State_IdleBreak.cpp b/Jusin154_Team3D/Editor/Private/State_IdleBreak.cpp
new file mode 100644
index 000000000..37935574c
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/State_IdleBreak.cpp
@@ -0,0 +1,64 @@
+#include "pch.h"
+#include "State_IdleBreak.h"
+#include "GameInstance.h"
+#include "Unit.h"
+
+CState_IdleBreak::CState_IdleBreak()
+ :CState_Root()
+{
+}
+
+void CState_IdleBreak::Enter()
+{
+ __super::Enter();
+}
+
+HRESULT CState_IdleBreak::Update(_float fTimeDelta)
+{
+ if (nullptr != m_funcPriorityUpdate) {
+ m_funcPriorityUpdate(fTimeDelta);
+ }
+ if (E_FAIL == (__super::Update(fTimeDelta))) {
+ return E_FAIL;
+ }
+ if (nullptr != m_funcLateUpdate) {
+ m_funcLateUpdate(fTimeDelta);
+ }
+ return S_OK;
+}
+
+void CState_IdleBreak::Exit()
+{
+ __super::Exit();
+}
+
+HRESULT CState_IdleBreak::Initialize(STATE_IDLEBREAK_DESC* pDesc)
+{
+ if (FAILED(__super::Initialize(pDesc))) {
+ return E_FAIL;
+ }
+ m_funcPriorityUpdate = pDesc->funcPriorityUpdate;
+ m_funcLateUpdate = pDesc->funcLateUpdate;
+ m_pModel = m_pOwner->Get_Component();
+ m_pFSM = m_pOwner->Get_Component();
+
+ return S_OK;
+}
+
+CState_IdleBreak* CState_IdleBreak::Create(STATE_IDLEBREAK_DESC* pDesc)
+{
+ CState_IdleBreak* pInstance = new CState_IdleBreak;
+ if (FAILED(pInstance->Initialize(pDesc))) {
+ SAFE_RELEASE(pInstance);
+ }
+ return pInstance;
+}
+
+void CState_IdleBreak::Free()
+{
+ __super::Free();
+}
+
+void CState_IdleBreak::Describe_Entity()
+{
+}
diff --git a/Jusin154_Team3D/Editor/Private/State_Slam.cpp b/Jusin154_Team3D/Editor/Private/State_Slam.cpp
new file mode 100644
index 000000000..76e36bbbf
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/State_Slam.cpp
@@ -0,0 +1,64 @@
+#include "pch.h"
+#include "State_Slam.h"
+#include "Unit.h"
+
+
+CState_Slam::CState_Slam()
+ :CState_Root()
+{
+}
+
+void CState_Slam::Enter()
+{
+ __super::Enter();
+}
+
+HRESULT CState_Slam::Update(_float fTimeDelta)
+{
+ if (nullptr != m_funcPriorityUpdate) {
+ m_funcPriorityUpdate(fTimeDelta);
+ }
+ if (E_FAIL == (__super::Update(fTimeDelta))) {
+ return E_FAIL;
+ }
+ if (nullptr != m_funcLateUpdate) {
+ m_funcLateUpdate(fTimeDelta);
+ }
+ return S_OK;
+}
+
+void CState_Slam::Exit()
+{
+ __super::Exit();
+}
+
+HRESULT CState_Slam::Initialize(STATE_SLAM_DESC* pDesc)
+{
+ if (FAILED(__super::Initialize(pDesc))) {
+ return E_FAIL;
+ }
+ m_funcPriorityUpdate = pDesc->funcPriorityUpdate;
+ m_funcLateUpdate = pDesc->funcLateUpdate;
+ m_pModel = m_pOwner->Get_Component();
+ m_pFSM = m_pOwner->Get_Component();
+
+ return S_OK;
+}
+
+CState_Slam* CState_Slam::Create(STATE_SLAM_DESC* pDesc)
+{
+ CState_Slam* pInstance = new CState_Slam;
+ if (FAILED(pInstance->Initialize(pDesc))) {
+ SAFE_RELEASE(pInstance);
+ }
+ return pInstance;
+}
+
+void CState_Slam::Free()
+{
+ __super::Free();
+}
+
+void CState_Slam::Describe_Entity()
+{
+}
diff --git a/Jusin154_Team3D/Editor/Private/State_Swing.cpp b/Jusin154_Team3D/Editor/Private/State_Swing.cpp
new file mode 100644
index 000000000..a3d45b12d
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/State_Swing.cpp
@@ -0,0 +1,64 @@
+#include "pch.h"
+#include "State_Swing.h"
+#include "Unit.h"
+
+
+CState_Swing::CState_Swing()
+ :CState_Root()
+{
+}
+
+void CState_Swing::Enter()
+{
+ __super::Enter();
+}
+
+HRESULT CState_Swing::Update(_float fTimeDelta)
+{
+ if (nullptr != m_funcPriorityUpdate) {
+ m_funcPriorityUpdate(fTimeDelta);
+ }
+ if (E_FAIL == (__super::Update(fTimeDelta))) {
+ return E_FAIL;
+ }
+ if (nullptr != m_funcLateUpdate) {
+ m_funcLateUpdate(fTimeDelta);
+ }
+ return S_OK;
+}
+
+void CState_Swing::Exit()
+{
+ __super::Exit();
+}
+
+HRESULT CState_Swing::Initialize(STATE_SWING_DESC* pDesc)
+{
+ if (FAILED(__super::Initialize(pDesc))) {
+ return E_FAIL;
+ }
+ m_funcPriorityUpdate = pDesc->funcPriorityUpdate;
+ m_funcLateUpdate = pDesc->funcLateUpdate;
+ m_pModel = m_pOwner->Get_Component();
+ m_pFSM = m_pOwner->Get_Component();
+
+ return S_OK;
+}
+
+CState_Swing* CState_Swing::Create(STATE_SWING_DESC* pDesc)
+{
+ CState_Swing* pInstance = new CState_Swing;
+ if (FAILED(pInstance->Initialize(pDesc))) {
+ SAFE_RELEASE(pInstance);
+ }
+ return pInstance;
+}
+
+void CState_Swing::Free()
+{
+ __super::Free();
+}
+
+void CState_Swing::Describe_Entity()
+{
+}
diff --git a/Jusin154_Team3D/Editor/Private/State_Throw.cpp b/Jusin154_Team3D/Editor/Private/State_Throw.cpp
new file mode 100644
index 000000000..91ea8a3cf
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/State_Throw.cpp
@@ -0,0 +1,64 @@
+#include "pch.h"
+#include "State_Throw.h"
+#include "Unit.h"
+
+
+CState_Throw::CState_Throw()
+ :CState_Root()
+{
+}
+
+void CState_Throw::Enter()
+{
+ __super::Enter();
+}
+
+HRESULT CState_Throw::Update(_float fTimeDelta)
+{
+ if (nullptr != m_funcPriorityUpdate) {
+ m_funcPriorityUpdate(fTimeDelta);
+ }
+ if (E_FAIL == (__super::Update(fTimeDelta))) {
+ return E_FAIL;
+ }
+ if (nullptr != m_funcLateUpdate) {
+ m_funcLateUpdate(fTimeDelta);
+ }
+ return S_OK;
+}
+
+void CState_Throw::Exit()
+{
+ __super::Exit();
+}
+
+HRESULT CState_Throw::Initialize(STATE_THROW_DESC* pDesc)
+{
+ if (FAILED(__super::Initialize(pDesc))) {
+ return E_FAIL;
+ }
+ m_funcPriorityUpdate = pDesc->funcPriorityUpdate;
+ m_funcLateUpdate = pDesc->funcLateUpdate;
+ m_pModel = m_pOwner->Get_Component();
+ m_pFSM = m_pOwner->Get_Component();
+
+ return S_OK;
+}
+
+CState_Throw* CState_Throw::Create(STATE_THROW_DESC* pDesc)
+{
+ CState_Throw* pInstance = new CState_Throw;
+ if (FAILED(pInstance->Initialize(pDesc))) {
+ SAFE_RELEASE(pInstance);
+ }
+ return pInstance;
+}
+
+void CState_Throw::Free()
+{
+ __super::Free();
+}
+
+void CState_Throw::Describe_Entity()
+{
+}
diff --git a/Jusin154_Team3D/Editor/Private/Terrain.cpp b/Jusin154_Team3D/Editor/Private/Terrain.cpp
index b7ffb105d..eb413110b 100644
--- a/Jusin154_Team3D/Editor/Private/Terrain.cpp
+++ b/Jusin154_Team3D/Editor/Private/Terrain.cpp
@@ -51,22 +51,23 @@ HRESULT CTerrain::Initialize(void* pArg)
// Psx 적용할지 안할지
m_bUsePsx = true;
+#ifdef 진우
//if(!m_bUsePsx)
//{
// if (FAILED(m_pVIBufferCom->Load_HeightMap("Hogsmeade_HeightMap.bin")))
- // return E_FAIL;
//}
//else
- //{
- // CRigidBody_Static::RIGIDBODY_STATIC_DESC Desc{};
- // Desc.pMeshName = TEXT("Hogsmeade_HeightMap");
- // Desc.iSubKind = ENUM_CLASS(PXOBJECT::TERRAIN);
- // /* Com_RigidBody */
- // if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_RigidBody_Static_Terrain_Hogsmeade"),
- // reinterpret_cast(&m_pRigidBody), &Desc))) {
- // return E_FAIL;
- // }
- //}
+ {
+ CRigidBody_Static::RIGIDBODY_STATIC_DESC Desc{};
+ Desc.pMeshName = TEXT("Hogsmeade_HeightMap");
+ Desc.iSubKind = ENUM_CLASS(PXOBJECT::TERRAIN);
+ /* Com_RigidBody */
+ if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_RigidBody_Static_Terrain_Hogsmeade"),
+ reinterpret_cast(&m_pRigidBody), &Desc))) {
+ return E_FAIL;
+ }
+ }
+#endif
return S_OK;
}
diff --git a/Jusin154_Team3D/Editor/Private/TrailObject.cpp b/Jusin154_Team3D/Editor/Private/TrailObject.cpp
index 12fbd1dcf..ece375502 100644
--- a/Jusin154_Team3D/Editor/Private/TrailObject.cpp
+++ b/Jusin154_Team3D/Editor/Private/TrailObject.cpp
@@ -484,7 +484,7 @@ void CTrailObject::Free()
void CTrailObject::Describe_Entity()
{
- const char* pRenderNames[] = { "PRIORITY" , "SHADOW", "NONBLEND", "DECAL", "BLUR" , "NONLIGHT" ,"EFFECT", "BLEND" ,"BLOOM" , "UI", "OCCLUSION" , "PRESHADOW" };
+ const char* pRenderNames[] = { "PRIORITY" , "SHADOW", "NONBLEND", "DECAL", "BLUR" , "NONLIGHT" ,"EFFECT", "BLEND" ,"BLOOM" , "UI", "OCCLUSION" , "PRESHADOW" , "UI_OVERLAY"};
const char* pEffectType[] = { "EFFECT" , "TRAIL" };
const char* pShaderPass[] = { "DEFAULT" , "SCISSOR" , "UI" , "UVMOVE" , "TRAIL" , "TRAIL_BLEND" , "TRAILWB_FOR_BLEND" , "TRAIL_BLUR", "TRAIL_BLOOM" };
const char* pBloomType[] = { "NONE" , "BASIC" , "MUILTY" };
diff --git a/Jusin154_Team3D/Editor/Private/Troll.cpp b/Jusin154_Team3D/Editor/Private/Troll.cpp
new file mode 100644
index 000000000..34ad753b6
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/Troll.cpp
@@ -0,0 +1,476 @@
+#include "pch.h"
+#include "Troll.h"
+
+#include "Troll_Weapon.h"
+#include "Troll_Rock.h"
+#include "GameInstance.h"
+#include "Effect_Container.h"
+#include "EditEffect.h"
+#include "EffectPool.h"
+#include "Layer.h"
+#include "TrailObject.h"
+
+#pragma region STATE
+#include "State_Idle.h"
+#include "State_Move.h"
+#include "State_Combat.h"
+#include "State_Hit.h"
+#include "Troll_State_Rush.h"
+#include "State_Throw.h"
+#pragma endregion
+
+CTroll::CTroll(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CMonster(pDevice, pContext)
+{
+}
+
+CTroll::CTroll(const CTroll& Prototype)
+ : CMonster(Prototype)
+{
+}
+
+HRESULT CTroll::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CTroll::Initialize(void* pArg)
+{
+ if (FAILED(__super::Initialize(pArg)))
+ return E_FAIL;
+
+ if (FAILED(Ready_Components()))
+ return E_FAIL;
+
+ if (FAILED(Ready_Parts()))
+ return E_FAIL;
+
+ Add_FSM();
+
+ Set_Anim();
+
+ {
+ CFSM::FSM_DESC FSMDesc{};
+ FSMDesc.pStates = &m_States;
+ FSMDesc.pStateMask = &m_iStateMask;
+
+ m_pFSM->Bind_States(FSMDesc);
+ m_pFSM->Change_State(FSMSTATE::IDLE);
+ }
+
+ m_pCallBack_Behavior->Initialize(m_pCharacter_Controller, m_pRigidBody);
+ m_pCallBack_HitReport->Initialize(m_pCharacter_Controller, m_pRigidBody);
+
+
+
+ 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");
+
+ return S_OK;
+}
+
+void CTroll::Priority_Update(_float fTimeDelta)
+{
+ __super::Priority_Update(fTimeDelta);
+}
+
+void CTroll::Update(_float fTimeDelta)
+{
+ __super::Update(fTimeDelta);
+
+ m_pFSM->Update_State(fTimeDelta);
+
+ m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
+
+ Play_Event();
+
+ if (true == m_pCharacter_Controller->IsActive()) {
+ m_pCharacter_Controller->Move(fTimeDelta);
+ m_vStunTimer.x = 0.f;
+ }
+ else {
+ if (0.f == m_vStunTimer.x) {
+ PSX::PxExtendedVec3 pxControlllerPos = m_pCharacter_Controller->Get_Controller()->getPosition();
+ PSX::PxTransform pxTransform((_float)pxControlllerPos.x, (_float)pxControlllerPos.y + 100.f, (_float)pxControlllerPos.z);
+ m_pCharacter_Controller->Set_Position(XMLoadFloat3((_float3*)&pxTransform.p));
+ //m_pCharacter_Controller->Move(fTimeDelta);
+ }
+ m_vStunTimer.x += fTimeDelta;
+ m_pTransformCom->Set_WorldMatrix(m_pRigidBody->Get_Actor()->getGlobalPose());
+ if (m_vStunTimer.y < m_vStunTimer.x) {
+ m_pRigidBody->ConvertToCCT(*m_pCharacter_Controller);
+ }
+ }
+
+#ifdef _DEBUG
+ Describe_Entity();
+#endif // _DEBUG
+
+
+ for (_uint i = 0; i < ENUM_CLASS(TROLL_SKILL::END); i++)
+ m_fSkillCoolTime[i] = max(0.f, m_fSkillCoolTime[i] - fTimeDelta);
+
+
+#pragma region TRAIL_UPDATE
+
+ _matrix WorldMat = m_pTransformCom->Get_XMWorldMatrix();
+
+ _matrix LeftHandMatrix = {};
+ _matrix RightHandMatrix = {};
+
+ LeftHandMatrix = XMLoadFloat4x4(m_pLeftHand_BoneMat);
+ RightHandMatrix = XMLoadFloat4x4(m_pRightHand_BoneMat);
+
+ for (int i = 0; i < 3; ++i) {
+ LeftHandMatrix.r[i] = XMVector3Normalize(LeftHandMatrix.r[i]);
+ RightHandMatrix.r[i] = XMVector3Normalize(RightHandMatrix.r[i]);
+ }
+
+
+ m_pLeftTrail->Trail_Update(LeftHandMatrix * WorldMat, fTimeDelta);
+ m_pRightTrail->Trail_Update(RightHandMatrix * WorldMat, fTimeDelta);
+
+#pragma endregion
+
+}
+
+void CTroll::Late_Update(_float fTimeDelta)
+{
+ __super::Late_Update(fTimeDelta);
+ if (true == m_pCharacter_Controller->IsActive()) {
+ m_pTransformCom->Set_State(STATE::POSITION, m_pCharacter_Controller->Get_FootPosition());
+ }
+ else {
+ m_pTransformCom->Set_WorldMatrix(m_pRigidBody->Get_Actor()->getGlobalPose());
+ }
+
+ if (m_bLookAt) {
+ 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));
+
+ float angle = acosf(dot);
+ m_fDegree = XMConvertToDegrees(angle);
+
+ m_fCross = XMVectorGetY(XMVector3Cross(vLook, vDir));
+
+ m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
+}
+
+HRESULT CTroll::Render()
+{
+ if (FAILED(Bind_ShaderResources())) {
+ return E_FAIL;
+ }
+
+ _uint iNumMeshes = m_pModelCom->Get_NumMeshes();
+ _uint iShaderPass = ENUM_CLASS(SHADER_PASS_ANIM::DEFAULT);
+ if (true == m_bDrawOutLine) {
+ iShaderPass = ENUM_CLASS(SHADER_PASS_ANIM::OUTLINE_WRITE);
+ }
+ for (_uint i = 0; i < iNumMeshes; i++)
+ {
+ if (FAILED(m_pModelCom->Bind_BoneMatrices(i, m_pShaderCom, "g_BoneMatrices"))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Begin(iShaderPass))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pModelCom->Render(i))) {
+ return E_FAIL;
+ }
+ }
+
+ if (m_bDrawOutLine) {
+ Render_OutLine();
+ }
+
+#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;
+ // }
+ //}
+#endif
+
+ return S_OK;
+}
+
+_vector CTroll::Get_LockOnPos()
+{
+ if (nullptr != m_pCharacter_Controller && true == m_pCharacter_Controller->IsActive()) {
+ return m_pCharacter_Controller->Get_Position();
+ }
+ else if (nullptr != m_pRigidBody) {
+ return m_pRigidBody->Get_Position();
+ }
+ return Get_WorldPostion();
+}
+
+void CTroll::OnCollision(CGameObject* pOther, void* pDesc)
+{
+ ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc);
+ _vector vWorldPos = {}; // 접촉지점
+ _vector vWorldNomal = {}; // 접촉노말
+ _vector vHitDir = {}; // 시도한 move 방향
+ _float fLength = {}; // 작용된 힘
+
+ _uint iSkillType = dynamic_cast(pOther)->Get_SkillType();
+ switch (iSkillType)
+ {
+ case ENUM_CLASS(SKILL_TYPE::DESCENDO):
+ m_eHitSpell = STATEANIM::KNOCKDOWN_FWD;
+ break;
+ case ENUM_CLASS(SKILL_TYPE::FLIPENDO):
+ m_eHitSpell = STATEANIM::TUMBLE2;
+ break;
+ default:
+ m_eHitSpell = STATEANIM::KNOCKDOWN_FWD;
+ break;
+ }
+ m_pFSM->Change_State(FSMSTATE::HIT);
+}
+
+void CTroll::OnHit(CGameObject* pOther, CGameObject* pCaller)
+{
+}
+
+HRESULT CTroll::Ready_Components()
+{
+ CTransform::TRANSFORM_DESC Desc = {};
+
+ Desc.fSpeedPerSec = 10.f;
+ Desc.fRotationPerSec = XMConvertToRadians(180.0f);
+ Desc.fRadius = 10.f;
+
+ __super::Ready_Components(&Desc);
+
+ m_strModelPrototypeTag = TEXT("Prototype_Component_Troll_Model");
+
+ /* Com_Model */
+ if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_strModelPrototypeTag,
+ reinterpret_cast(&m_pModelCom)))) {
+ return E_FAIL;
+ }
+
+ { // CCT
+ CCharacter_Controller::Character_Controller_DESC Desc{};
+
+ Desc.iSubKind = ENUM_CLASS(PXOBJECT::TROLL);
+ Desc.pTransform = m_pTransformCom;
+ Desc.eBodyType = ACTOR::CAPSULE;
+ Desc.fContactOffset = 0.3f;
+ Desc.fMaterial = { 1.2f, 1.0f, 0.0f };
+ Desc.bAutoStepping = { false };
+ Desc.fStepOffset = { 0.05f };
+ Desc.fRadius = 1.2f;
+ Desc.fHeight = 1.5f;
+ Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_Monster_HitReport::Create();
+ Desc.pCallback_Behavior = m_pCallBack_Behavior = CCallBack_Monster_Behavior::Create();
+ Desc.eClimbingMode = PSX::PxCapsuleClimbingMode::eEASY;
+ Desc.fWalkableSlope = 45.f;
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_CCT_CAPSULE"), (CComponent**)&m_pCharacter_Controller, &Desc))) {
+ return E_FAIL;
+ }
+ }
+ m_pCharacter_Controller->Set_Position(m_pTransformCom->Get_State(STATE::POSITION));
+ { // DO
+ CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
+ Desc.iSubKind = ENUM_CLASS(PXOBJECT::TROLL);
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX"), (CComponent**)&m_pRigidBody, &Desc))) {
+ return E_FAIL;
+ }
+ m_pGameInstance->Detach_Actor(*m_pRigidBody->Get_Actor());
+ }
+
+ //if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("STAT_TROLL"), (CComponent**)&m_pStat))) {
+ // return E_FAIL;
+ //}
+
+ return S_OK;
+}
+
+HRESULT CTroll::Ready_Parts()
+{
+ CTroll_Weapon::TROLLWEAPON_DESC Troll_WeaponDesc{};
+
+ Troll_WeaponDesc.pParentTransform = m_pTransformCom;
+ Troll_WeaponDesc.pSocketMatrices = m_pModelCom->Get_BoneMatrixPtr("SKT_RightHand");
+
+ if (FAILED(Add_PartObject("Troll_Weapon", g_iStaticLevel, nullptr, &Troll_WeaponDesc)))
+ {
+ return E_FAIL;
+ }
+
+ CTroll_Rock::TROLLROCK_DESC Troll_RockDesc{};
+
+ Troll_RockDesc.pParentTransform = m_pTransformCom;
+ Troll_RockDesc.pSocketMatrices = m_pModelCom->Get_BoneMatrixPtr("SKT_LeftHand");
+
+ if (FAILED(Add_PartObject("Troll_Rock", g_iStaticLevel, nullptr, &Troll_RockDesc)))
+ {
+ return E_FAIL;
+ }
+
+ Get_PartObject()->Set_Visible(false);
+
+
+#pragma region EFFECT
+ /* EFFECT */
+
+ CPartObject::PARTOBJECT_DESC PartsDesc{};
+
+ PartsDesc.pParentTransform = m_pTransformCom;
+
+
+
+ if (FAILED(Add_PartObject("Troll_Particle", NEXT_LEVEL, &m_pTroll_Particle, &PartsDesc)))
+ {
+ return E_FAIL;
+ }
+
+ m_pTroll_Particle->Load("../Bin/Resources/Data/Effect/Troll/TrollSide/Troll_Particle", static_cast(NEXT_LEVEL));
+ m_pTroll_Particle->FollowParants(m_pModelCom->Get_BoneMatrixPtr("HeadEnd"));
+
+
+
+ if (FAILED(Add_PartObject("Troll_Particle2", NEXT_LEVEL, &m_pTroll_Particle2, &PartsDesc)))
+ {
+ return E_FAIL;
+ }
+
+ m_pTroll_Particle2->Load("../Bin/Resources/Data/Effect/Troll/TrollSide/Troll_Particle2", static_cast(NEXT_LEVEL));
+ m_pTroll_Particle2->FollowParants(m_pModelCom->Get_BoneMatrixPtr("HeadEnd"));
+
+
+ if (FAILED(Add_PartObject("Troll_Right_Smoke", NEXT_LEVEL, &m_pRight_Smoke, &PartsDesc)))
+ {
+ return E_FAIL;
+ }
+
+ m_pRight_Smoke->Load("../Bin/Resources/Data/Effect/Troll/TrollSide/Troll_Smoke", static_cast(NEXT_LEVEL));
+ m_pRight_Smoke->FollowParants(m_pModelCom->Get_BoneMatrixPtr("RightArm"));
+
+ if (FAILED(Add_PartObject("Troll_Left_Smoke", NEXT_LEVEL, &m_pLeft_Smoke, &PartsDesc)))
+ {
+ return E_FAIL;
+ }
+
+ 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", NEXT_LEVEL, &m_pLeftTrail, &PartsDesc))) {
+ return E_FAIL;
+ }
+ ;
+
+ m_pLeftTrail->Load_Trail("../Bin/Resources/Data/Effect/Troll/TrollSide/Troll_Trail", static_cast(NEXT_LEVEL));
+
+ 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));
+
+#pragma endregion
+ return S_OK;
+}
+
+HRESULT CTroll::Bind_ShaderResources()
+{
+ if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
+ return E_FAIL;
+ }
+ return S_OK;
+}
+
+CTroll* CTroll::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CTroll* pInstance = new CTroll(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CTroll");
+ SAFE_RELEASE(pInstance);
+ }
+ return pInstance;
+}
+
+CGameObject* CTroll::Clone(void* pArg, CGameObject* pOwner)
+{
+ CTroll* pInstance = new CTroll(*this);
+
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CTroll");
+ SAFE_RELEASE(pInstance);
+ }
+ return pInstance;
+}
+
+void CTroll::Free()
+{
+ __super::Free();
+
+ if (nullptr != m_pCallBack_Behavior) {
+ m_pCallBack_Behavior->Finalize();
+ }
+ if (nullptr != m_pCallBack_HitReport) {
+ m_pCallBack_HitReport->Finalize();
+ }
+
+ SAFE_RELEASE(m_pCharacter_Controller);
+ 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);
+ SAFE_RELEASE(m_pEffectPool);
+ SAFE_RELEASE(m_pLeftTrail);
+ SAFE_RELEASE(m_pRightTrail);
+}
+#ifdef _DEBUG
+
+void CTroll::Describe_Entity()
+{
+ __super::Describe_Entity();
+}
+
+#endif // _DEBUG
diff --git a/Jusin154_Team3D/Editor/Private/TrollSwing.cpp b/Jusin154_Team3D/Editor/Private/TrollSwing.cpp
new file mode 100644
index 000000000..f669901ac
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/TrollSwing.cpp
@@ -0,0 +1,180 @@
+#include "pch.h"
+#include "TrollSwing.h"
+
+#include "GameInstance.h"
+#include "EditEffect.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;
+
+ CEditEffect* pRockPT = Get_PartObject("Rock_PT_25");
+ CEditEffect* 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/Editor/Private/Troll_Attack.cpp b/Jusin154_Team3D/Editor/Private/Troll_Attack.cpp
deleted file mode 100644
index fba00cdae..000000000
--- a/Jusin154_Team3D/Editor/Private/Troll_Attack.cpp
+++ /dev/null
@@ -1,168 +0,0 @@
-#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()->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;
-}
-
-
diff --git a/Jusin154_Team3D/Editor/Private/Troll_Nomal_Smoke.cpp b/Jusin154_Team3D/Editor/Private/Troll_Nomal_Smoke.cpp
new file mode 100644
index 000000000..317dfaee3
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/Troll_Nomal_Smoke.cpp
@@ -0,0 +1,179 @@
+#include "pch.h"
+#include "Troll_Nomal_Smoke.h"
+
+#include "GameInstance.h"
+#include "EditEffect.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); // 위치 넘기기
+
+ CEditEffect* pRockPT = Get_PartObject("Rock_PT_15");
+ CEditEffect* 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/Editor/Private/Troll_Rock.cpp b/Jusin154_Team3D/Editor/Private/Troll_Rock.cpp
new file mode 100644
index 000000000..f7d2bc363
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/Troll_Rock.cpp
@@ -0,0 +1,200 @@
+#include "pch.h"
+#include "Troll_Rock.h"
+
+#include "GameInstance.h"
+#include "Troll.h"
+
+CTroll_Rock::CTroll_Rock(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CPartObject(pDevice, pContext)
+{
+}
+
+CTroll_Rock::CTroll_Rock(const CTroll_Rock& Prototype)
+ : CPartObject(Prototype)
+{
+}
+
+HRESULT CTroll_Rock::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CTroll_Rock::Initialize(void* pArg)
+{
+ TROLLROCK_DESC* pDesc = static_cast (pArg);
+ m_pSocketMatrices = pDesc->pSocketMatrices;
+
+ if (FAILED(__super::Initialize(pArg))) {
+ return E_FAIL;
+ }
+
+
+ if (FAILED(Ready_Components())) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+void CTroll_Rock::Priority_Update(_float fTimeDelta)
+{
+ m_pModelCom->Combined_BoneMatrix();
+ if (m_bAttach)
+ {
+ _matrix socketMatrix = {};
+
+ socketMatrix = XMLoadFloat4x4(m_pSocketMatrices);
+
+ for (int i = 0; i < 3; ++i) {
+ socketMatrix.r[i] = XMVector3Normalize(socketMatrix.r[i]);
+ }
+
+ m_pTransformCom->Set_WorldMatrix(socketMatrix * XMLoadFloat4x4(m_pParentTransformCom->Get_WorldMatrixPtr()));
+ _float4 vTargetPos = static_cast(m_pOwner)->Get_TargetPos();
+ m_pTransformCom->LookAt(XMLoadFloat4(&vTargetPos));
+ }
+ else
+ {
+ _matrix world = XMLoadFloat4x4(m_pTransformCom->Get_WorldMatrixPtr());
+ m_pTransformCom->Set_WorldMatrix(world);
+
+ m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::LOOK), fTimeDelta * 20.f);
+ m_pTransformCom->Go_Straight(fTimeDelta);
+ }
+
+
+#ifdef _DEBUG
+ Describe_Entity();
+
+#endif // _DEBUG
+}
+
+void CTroll_Rock::Update(_float fTimeDelta)
+{
+}
+
+void CTroll_Rock::Late_Update(_float fTimeDelta)
+{
+ m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
+}
+
+HRESULT CTroll_Rock::Render()
+{
+ if (!m_pModelCom)
+ return S_OK;
+
+ if (!m_bVisible)
+ return S_OK;
+
+ if (FAILED(Bind_ShaderResources())) {
+ return E_FAIL;
+ }
+
+ _uint iNumMeshes = m_pModelCom->Get_NumMeshes();
+
+ for (_uint i = 0; i < iNumMeshes; i++)
+ {
+ if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_ANIM::DEFAULT)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pModelCom->Render(i))) {
+ return E_FAIL;
+ }
+ }
+
+ return S_OK;
+}
+
+HRESULT CTroll_Rock::Ready_Components()
+{
+
+ CTransform::TRANSFORM_DESC Desc = {};
+
+ Desc.fSpeedPerSec = 18.f;
+ Desc.fRotationPerSec = XMConvertToRadians(180.0f);
+ Desc.fRadius = 10.f;
+
+ __super::Ready_Components(&Desc);
+
+
+ /* Com_Model */
+ if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_Troll_Rock_Big_Model"),
+ reinterpret_cast(&m_pModelCom))))
+ return E_FAIL;
+
+ /* Com_Shader */
+ if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH,
+ reinterpret_cast(&m_pShaderCom))))
+ return E_FAIL;
+
+ return S_OK;
+}
+
+HRESULT CTroll_Rock::Bind_ShaderResources()
+{
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+
+CTroll_Rock* CTroll_Rock::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CTroll_Rock* pInstance = new CTroll_Rock(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CTroll_Rock");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CTroll_Rock::Clone(void* pArg, CGameObject* pOwner)
+{
+ CTroll_Rock* pInstance = new CTroll_Rock(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CTroll_Rock");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CTroll_Rock::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pShaderCom);
+ SAFE_RELEASE(m_pModelCom);
+
+}
+#ifdef _DEBUG
+
+void CTroll_Rock::Describe_Entity()
+{
+
+}
+
+#endif // _DEBUG
diff --git a/Jusin154_Team3D/Editor/Private/Troll_Rush_Hit.cpp b/Jusin154_Team3D/Editor/Private/Troll_Rush_Hit.cpp
new file mode 100644
index 000000000..a47019ab5
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/Troll_Rush_Hit.cpp
@@ -0,0 +1,174 @@
+#include "pch.h"
+#include "Troll_Rush_Hit.h"
+
+#include "GameInstance.h"
+#include "EditEffect.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); // 위치 넘기기
+
+ CEditEffect* 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/Editor/Private/Troll_State_BackHand_Swing.cpp b/Jusin154_Team3D/Editor/Private/Troll_State_BackHand_Swing.cpp
new file mode 100644
index 000000000..9f9f0384c
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/Troll_State_BackHand_Swing.cpp
@@ -0,0 +1,64 @@
+#include "pch.h"
+#include "Troll_State_BackHand_Swing.h"
+#include "GameInstance.h"
+#include "Unit.h"
+
+CTroll_State_BackHand_Swing::CTroll_State_BackHand_Swing()
+ :CState_Root()
+{
+}
+
+void CTroll_State_BackHand_Swing::Enter()
+{
+ __super::Enter();
+}
+
+HRESULT CTroll_State_BackHand_Swing::Update(_float fTimeDelta)
+{
+ if (nullptr != m_funcPriorityUpdate) {
+ m_funcPriorityUpdate(fTimeDelta);
+ }
+ if (E_FAIL == (__super::Update(fTimeDelta))) {
+ return E_FAIL;
+ }
+ if (nullptr != m_funcLateUpdate) {
+ m_funcLateUpdate(fTimeDelta);
+ }
+ return S_OK;
+}
+
+void CTroll_State_BackHand_Swing::Exit()
+{
+ __super::Exit();
+}
+
+HRESULT CTroll_State_BackHand_Swing::Initialize(TROLL_STATE_BACK_HAND_SWING_DESC* pDesc)
+{
+ if (FAILED(__super::Initialize(pDesc))) {
+ return E_FAIL;
+ }
+ m_funcPriorityUpdate = pDesc->funcPriorityUpdate;
+ m_funcLateUpdate = pDesc->funcLateUpdate;
+ m_pModel = m_pOwner->Get_Component();
+ m_pFSM = m_pOwner->Get_Component();
+
+ return S_OK;
+}
+
+CTroll_State_BackHand_Swing* CTroll_State_BackHand_Swing::Create(TROLL_STATE_BACK_HAND_SWING_DESC* pDesc)
+{
+ CTroll_State_BackHand_Swing* pInstance = new CTroll_State_BackHand_Swing;
+ if (FAILED(pInstance->Initialize(pDesc))) {
+ SAFE_RELEASE(pInstance);
+ }
+ return pInstance;
+}
+
+void CTroll_State_BackHand_Swing::Free()
+{
+ __super::Free();
+}
+
+void CTroll_State_BackHand_Swing::Describe_Entity()
+{
+}
diff --git a/Jusin154_Team3D/Editor/Private/Troll_State_Rush.cpp b/Jusin154_Team3D/Editor/Private/Troll_State_Rush.cpp
new file mode 100644
index 000000000..afa12b44b
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/Troll_State_Rush.cpp
@@ -0,0 +1,64 @@
+#include "pch.h"
+#include "Troll_State_Rush.h"
+#include "GameInstance.h"
+#include "Unit.h"
+
+CTroll_State_Rush::CTroll_State_Rush()
+ :CState_Root()
+{
+}
+
+void CTroll_State_Rush::Enter()
+{
+ __super::Enter();
+}
+
+HRESULT CTroll_State_Rush::Update(_float fTimeDelta)
+{
+ if (nullptr != m_funcPriorityUpdate) {
+ m_funcPriorityUpdate(fTimeDelta);
+ }
+ if (E_FAIL == (__super::Update(fTimeDelta))) {
+ return E_FAIL;
+ }
+ if (nullptr != m_funcLateUpdate) {
+ m_funcLateUpdate(fTimeDelta);
+ }
+ return S_OK;
+}
+
+void CTroll_State_Rush::Exit()
+{
+ __super::Exit();
+}
+
+HRESULT CTroll_State_Rush::Initialize(TROLL_STATE_RUSH_DESC* pDesc)
+{
+ if (FAILED(__super::Initialize(pDesc))) {
+ return E_FAIL;
+ }
+ m_funcPriorityUpdate = pDesc->funcPriorityUpdate;
+ m_funcLateUpdate = pDesc->funcLateUpdate;
+ m_pModel = m_pOwner->Get_Component();
+ m_pFSM = m_pOwner->Get_Component();
+
+ return S_OK;
+}
+
+CTroll_State_Rush* CTroll_State_Rush::Create(TROLL_STATE_RUSH_DESC* pDesc)
+{
+ CTroll_State_Rush* pInstance = new CTroll_State_Rush;
+ if (FAILED(pInstance->Initialize(pDesc))) {
+ SAFE_RELEASE(pInstance);
+ }
+ return pInstance;
+}
+
+void CTroll_State_Rush::Free()
+{
+ __super::Free();
+}
+
+void CTroll_State_Rush::Describe_Entity()
+{
+}
diff --git a/Jusin154_Team3D/Editor/Private/Troll_States.cpp b/Jusin154_Team3D/Editor/Private/Troll_States.cpp
new file mode 100644
index 000000000..da5d6af2a
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/Troll_States.cpp
@@ -0,0 +1,720 @@
+#include "pch.h"
+#include "Troll.h"
+
+#include "GameInstance.h"
+#include "Player.h"
+#include "Troll_Rock.h"
+#include "EffectPool.h"
+
+#pragma region STATE
+#include "State_Idle.h"
+#include "State_IdleBreak.h"
+#include "State_Move.h"
+#include "State_Combat.h"
+#include "Troll_State_Rush.h"
+#include "Troll_State_BackHand_Swing.h"
+#include "State_Throw.h"
+#include "State_Swing.h"
+#include "State_Slam.h"
+#include "State_Hit.h"
+#pragma endregion
+
+
+void CTroll::Behavior_IdleEnter()
+{
+ m_pFSM->Enable_State(FSMSTATE::IDLE);
+ pair<_uint, _bool> pairAnimInfo = m_Animation[STATEANIM::IDLE];
+
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+}
+
+HRESULT CTroll::Behavior_IdleExitCheck()
+{
+ if (m_fTargetDistance <= 18.f && m_fTargetDistance !=0)
+ m_pFSM->Change_State(FSMSTATE::MOVE);
+
+ return E_FAIL;
+}
+
+void CTroll::Behavior_IdleExit()
+{
+ m_pFSM->Disable_State(FSMSTATE::IDLE);
+}
+
+void CTroll::Behavior_IdleBreakEnter()
+{
+ m_pFSM->Enable_State(FSMSTATE::IDLEBREAK);
+ pair<_uint, _bool> pairAnimInfo;
+ m_bLookAt = true;
+ _int RandIndex = m_pGameInstance->Real_Random_Int(0, 3);
+ switch (RandIndex)
+ {
+ 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:// 방망이
+ pairAnimInfo = m_Animation[STATEANIM::IDLE_BREAK2];
+ break;
+ 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: //소리지르기
+ pairAnimInfo = m_Animation[STATEANIM::IDLE_BREAK4];
+ break;
+ }
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+}
+
+HRESULT CTroll::Behavior_IdleBreakExitCheck()
+{
+ if (m_pModelCom->IsFinishedAnim())
+ m_pFSM->Change_State(FSMSTATE::MOVE);
+
+ return E_FAIL;
+}
+
+void CTroll::Behavior_IdleBreakExit()
+{
+ m_pFSM->Disable_State(FSMSTATE::IDLEBREAK);
+}
+
+void CTroll::Behavior_MoveEnter()
+{
+ pair<_uint, _bool> pairAnimInfo = {};
+ m_pFSM->Enable_State(FSMSTATE::MOVE);
+
+ 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)
+{
+ pair<_uint, _bool> pairAnimInfo = {};
+ _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
+ _bool bTurnPlaying =
+ (iCurrAnimIndex == m_Animation[STATEANIM::JOG_LEFT_TURN].first) ||
+ (iCurrAnimIndex == m_Animation[STATEANIM::JOG_RIGHT_TURN].first);
+
+ if (iCurrAnimIndex == m_Animation[STATEANIM::JOG_START].first)
+ {
+ _float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio();
+ if (fRatio >= 0.9f)
+ {
+ pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ }
+ }
+
+ if (m_fTargetDistance <= 18.f && m_fTargetDistance >= 14.f) {
+ m_pFSM->Change_State(FSMSTATE::COMBAT);
+ return E_FAIL;
+ }
+
+
+ if (bTurnPlaying)
+ {
+ m_bLookAt = false;
+
+ if (m_pModelCom->IsFinishedAnim())
+ {
+ m_bLookAt = true;
+ pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ }
+
+ return S_OK;
+ }
+
+ if (m_fDegree >= 90.f)
+ {
+ m_bLookAt = true;
+
+ if (m_fCross > 0)
+ pairAnimInfo = m_Animation[STATEANIM::JOG_LEFT_TURN];
+ else
+ pairAnimInfo = m_Animation[STATEANIM::JOG_RIGHT_TURN];
+
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ return S_OK;
+ }
+
+ if (m_fTargetDistance > 8.f)
+ {
+ m_bLookAt = true;
+
+ if (iCurrAnimIndex == m_Animation[STATEANIM::JOG_START].first)
+ {
+ _float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio();
+ if (fRatio >= 0.9f){
+ pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ }
+ }
+ else if (iCurrAnimIndex != m_Animation[STATEANIM::JOG_FWD].first)
+ {
+ pairAnimInfo = m_Animation[STATEANIM::JOG_START];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ }
+
+ return S_OK;
+ }
+
+
+ if (m_fTargetDistance <= 6.f && m_fTargetDistance != 0.f)
+ m_pFSM->Change_State(FSMSTATE::COMBAT);
+
+ return E_FAIL;
+}
+
+void CTroll::Behavior_MoveExit()
+{
+ m_pFSM->Disable_State(FSMSTATE::MOVE | FSMSTATE::SPRINT | FSMSTATE::JOG | FSMSTATE::WALK);
+}
+
+void CTroll::Behavior_CombatEnter()
+{
+ pair<_uint, _bool> pairAnimInfo = {};
+ m_pFSM->Enable_State(FSMSTATE::COMBAT);
+
+ m_bLookAt = true;
+}
+
+HRESULT CTroll::Behavior_CombatExitCheck(_float fTimeDelta)
+{
+ m_bLookAt = true;
+
+ if (m_fTargetDistance > 30.f && m_fTargetDistance != 0.f)
+ {
+ m_pFSM->Change_State(FSMSTATE::IDLE);
+ return E_FAIL;
+ }
+ else if (m_fTargetDistance > 25.f && m_fTargetDistance != 0.f)
+ {
+ m_pFSM->Change_State(FSMSTATE::MOVE);
+ return E_FAIL;
+ }
+
+ if (m_fTargetDistance <= 6.f && (m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SLAM)] <= 0.f))
+ {
+ m_pFSM->Change_State(FSMSTATE::SLAM);
+ }
+ else if (m_fTargetDistance <= 6.f && (m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::BACKHAND_SWING)] <= 0.f))
+ {
+ m_pFSM->Change_State(FSMSTATE::BACKHAND_SWING);
+ }
+ else if (m_fTargetDistance <= 6.f && (m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SWING)] <= 0.f))
+ {
+ m_pFSM->Change_State(FSMSTATE::SWING);
+ }
+ else if (m_fTargetDistance <= 15.f && m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::THROWROCK)] <= 0.f)
+ {
+ m_pFSM->Change_State(FSMSTATE::THROW_ROCK);
+ }
+ else if (m_fTargetDistance <= 18.f && m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::RUSH)] <= 0.f)
+ {
+ m_pFSM->Change_State(FSMSTATE::RUSH);
+ }
+ else
+ {
+ m_pFSM->Change_State(FSMSTATE::IDLEBREAK);
+ }
+
+ return E_FAIL;
+}
+
+void CTroll::Behavior_CombatExit()
+{
+ m_pFSM->Disable_State(FSMSTATE::COMBAT);
+}
+
+void CTroll::Behavior_RushEnter()
+{
+ pair<_uint, _bool> pairAnimInfo = {};
+ m_pFSM->Enable_State(FSMSTATE::RUSH);
+ pairAnimInfo = m_Animation[STATEANIM::RUSH_START];
+
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+}
+
+HRESULT CTroll::Behavior_RushExitCheck(_float fTimeDelta)
+{
+ pair<_uint, _bool> pairAnimInfo = {};
+ _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
+ if (m_pFSM->IsEnable(FSMSTATE::RUSH))
+ {
+ if (iCurrAnimIndex == m_Animation[STATEANIM::RUSH_START].first)
+ {
+ if (m_pModelCom->IsFinishedAnim())
+ {
+ m_bLookAt = false;
+ pairAnimInfo = m_Animation[STATEANIM::RUSH_LOOP];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::RUSH)] = m_fMaxSkillCoolTime[ENUM_CLASS(TROLL_SKILL::RUSH)];
+ }
+ }
+ else {
+ m_fRushTime += fTimeDelta;
+
+ if (m_fRushTime >= 1.5f)
+ {
+ m_fRushTime = 0.f;
+ m_pFSM->Disable_State(FSMSTATE::RUSH);
+ pairAnimInfo = m_Animation[STATEANIM::RUSH_END];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ }
+ }
+ return S_OK;
+ }
+ if (iCurrAnimIndex == m_Animation[STATEANIM::RUSH_END].first)
+ {
+ if (m_fCross > 0)
+ pairAnimInfo = m_Animation[STATEANIM::IDLE_COMBAT_TURN_BWD_L];
+ else
+ pairAnimInfo = m_Animation[STATEANIM::IDLE_COMBAT_TURN_BWD_R];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+
+ Add_Event(pairAnimInfo.first,
+ [this]() {m_bLookAt = true; },
+ 0.3f);
+ }
+
+ if (m_pModelCom->IsFinishedAnim())
+ {
+ m_bLookAt = true;
+ m_pFSM->Change_State(FSMSTATE::IDLEBREAK);
+ }
+ return E_FAIL;
+}
+
+void CTroll::Behavior_RushExit()
+{
+ m_pFSM->Disable_State(FSMSTATE::RUSH);
+}
+
+void CTroll::Behavior_ThrowEnter()
+{
+ pair<_uint, _bool> pairAnimInfo = {};
+ m_pFSM->Enable_State(FSMSTATE::THROW_ROCK);
+ pairAnimInfo = m_Animation[STATEANIM::THROW_ROCK_START];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+
+ Add_Event(pairAnimInfo.first,
+ [this](){Get_PartObject()->Set_Visible(true);},
+ 0.95f);
+}
+
+HRESULT CTroll::Behavior_ThrowExitCheck(_float fTimeDelta)
+{
+ pair<_uint, _bool> pairAnimInfo = {};
+ _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
+ if (m_pFSM->IsEnable(FSMSTATE::THROW_ROCK))
+ {
+ if (iCurrAnimIndex == m_Animation[STATEANIM::THROW_ROCK_START].first)
+ {
+ if (m_pModelCom->IsFinishedAnim())
+ {
+ m_pFSM->Disable_State(FSMSTATE::THROW_ROCK);
+ pairAnimInfo = m_Animation[STATEANIM::THROW_ROCK];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::THROWROCK)] = m_fMaxSkillCoolTime[ENUM_CLASS(TROLL_SKILL::THROWROCK)];
+
+ Add_Event(pairAnimInfo.first,
+ [this]() {Get_PartObject()->Set_Attach(false); },
+ 0.25f);
+
+ Add_Event(pairAnimInfo.first, [this]() {
+
+ _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;
+ }
+ if (m_pModelCom->IsFinishedAnim())
+ {
+ m_bLookAt = true;
+ m_pFSM->Change_State(FSMSTATE::COMBAT);
+ }
+ return E_FAIL;
+}
+
+void CTroll::Behavior_ThrowExit()
+{
+ m_pFSM->Disable_State(FSMSTATE::THROW_ROCK);
+ Get_PartObject()->Set_Attach(true);
+ Get_PartObject()->Set_Visible(false);
+}
+
+void CTroll::Behavior_SwingEnter()
+{
+ pair<_uint, _bool> pairAnimInfo = {};
+ m_pFSM->Enable_State(FSMSTATE::SWING);
+
+ pairAnimInfo = m_Animation[STATEANIM::SWING_FWD];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SWING)] =
+ m_fMaxSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SWING)];
+
+ Add_Event(pairAnimInfo.first,
+ [this]() {m_bLookAt = false; },
+ 0.2f);
+}
+
+HRESULT CTroll::Behavior_SwingExitCheck(_float fTimeDelta)
+{
+ pair<_uint, _bool> pairAnimInfo = {};
+ _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
+
+ if (m_pModelCom->IsFinishedAnim())
+ {
+ m_bLookAt = true;
+ m_pFSM->Change_State(FSMSTATE::COMBAT);
+ return E_FAIL;
+ }
+
+ return E_FAIL;
+}
+
+void CTroll::Behavior_SwingExit()
+{
+ m_pFSM->Disable_State(FSMSTATE::SWING);
+}
+
+void CTroll::Behavior_SlamEnter()
+{
+ pair<_uint, _bool> pairAnimInfo = {};
+ m_pFSM->Enable_State(FSMSTATE::SLAM);
+
+ pairAnimInfo = m_Animation[STATEANIM::SLAM];
+
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SLAM)] =
+ m_fMaxSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SLAM)];
+
+ 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)
+{
+ pair<_uint, _bool> pairAnimInfo = {};
+ _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
+ if (m_pModelCom->IsFinishedAnim())
+ {
+ m_bLookAt = true;
+ m_pFSM->Change_State(FSMSTATE::COMBAT);
+ return E_FAIL;
+ }
+ return E_FAIL;
+}
+
+void CTroll::Behavior_SlamExit()
+{
+ m_pFSM->Disable_State(FSMSTATE::SLAM);
+}
+
+void CTroll::Behavior_BackHandSwingEnter()
+{
+ pair<_uint, _bool> pairAnimInfo = {};
+ m_pFSM->Enable_State(FSMSTATE::BACKHAND_SWING);
+ pairAnimInfo = m_Animation[STATEANIM::BACKHAND_SWING_JOG];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::BACKHAND_SWING)] =
+ m_fMaxSkillCoolTime[ENUM_CLASS(TROLL_SKILL::BACKHAND_SWING)];
+
+ Add_Event(m_Animation[STATEANIM::BACKHAND_SWING_JOG].first,
+ [this]() { m_bLookAt = false; },
+ 0.2f);
+}
+
+HRESULT CTroll::Behavior_BackHandSwingExitCheck(_float fTimeDelta)
+{
+ pair<_uint, _bool> pairAnimInfo = {};
+ _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
+ if (m_pModelCom->IsFinishedAnim())
+ {
+ m_bLookAt = true;
+ m_pFSM->Change_State(FSMSTATE::COMBAT);
+ return E_FAIL;
+ }
+ return E_FAIL;
+}
+
+void CTroll::Behavior_BackHandSwingExit()
+{
+ m_pFSM->Disable_State(FSMSTATE::BACKHAND_SWING);
+}
+
+void CTroll::Behavior_HitEnter()
+{
+ m_pFSM->Enable_State(FSMSTATE::HIT);
+ _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
+ pair<_uint, _bool> pairAnimInfo;
+
+ m_bLookAt = false;
+ if (iCurrAnimIndex == m_Animation[STATEANIM::SLAM].first)
+ {
+ pairAnimInfo = m_Animation[STATEANIM::HIT_FACE];
+ }
+ else {
+ _int RandIndex = m_pGameInstance->Real_Random_Int(0, 2);
+ switch (RandIndex)
+ {
+ case 0:
+ pairAnimInfo = m_Animation[STATEANIM::HIT_BWD];
+ break;
+ case 1:
+ pairAnimInfo = m_Animation[STATEANIM::HIT_BWD2];
+ break;
+ case 2:
+ pairAnimInfo = m_Animation[STATEANIM::HIT_BWD3];
+ break;
+ }
+ }
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+}
+
+HRESULT CTroll::Behavior_HitExitCheck()
+{
+ _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
+ pair<_uint, _bool> pairAnimInfo;
+
+ if (iCurrAnimIndex == m_Animation[STATEANIM::HIT_FACE].first)
+ {
+ if (m_pModelCom->IsFinishedAnim()) {
+ pairAnimInfo = m_Animation[STATEANIM::HIT_FACE_END];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ return S_OK;
+ }
+ }
+
+ if (m_pModelCom->IsFinishedAnim()) {
+ m_pFSM->Change_State(FSMSTATE::COMBAT);
+ m_bLookAt = true;
+ return E_FAIL;
+ }
+ return E_FAIL;
+}
+
+void CTroll::Behavior_HitExit()
+{
+ m_pFSM->Disable_State(FSMSTATE::HIT);
+}
+
+
+void CTroll::Add_FSM()
+{
+#pragma region Behavior_Movement_NotFocus
+ {
+ CState_Idle::STATE_IDLE_DESC Desc{};
+ Desc.pOwner = this;
+ Desc.funcEnterEvent = [this]() { Behavior_IdleEnter(); };
+ Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_IdleExitCheck(); };
+ Desc.funcExitEvent = [this]() { Behavior_IdleExit(); };
+ Desc.funcPriorityUpdate = nullptr;
+ Desc.funcLateUpdate = nullptr;
+ m_States.emplace(FSMSTATE::IDLE, CState_Idle::Create(&Desc));
+ }
+ {
+ CState_IdleBreak::STATE_IDLEBREAK_DESC Desc{};
+ Desc.pOwner = this;
+ Desc.funcEnterEvent = [this]() { Behavior_IdleBreakEnter(); };
+ Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_IdleBreakExitCheck(); };
+ Desc.funcExitEvent = [this]() { Behavior_IdleBreakExit(); };
+ Desc.funcPriorityUpdate = nullptr;
+ Desc.funcLateUpdate = nullptr;
+ m_States.emplace(FSMSTATE::IDLEBREAK, CState_IdleBreak::Create(&Desc));
+ }
+ {
+ CState_Move::STATE_MOVE_DESC Desc{};
+ Desc.pOwner = this;
+ Desc.funcEnterEvent = [this]() { Behavior_MoveEnter(); };
+ Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_MoveExitCheck(fTimedelta); };
+ Desc.funcExitEvent = [this]() { Behavior_MoveExit(); };
+ Desc.funcPriorityUpdate = nullptr;
+ Desc.funcLateUpdate = nullptr;
+ m_States.emplace(FSMSTATE::MOVE, CState_Move::Create(&Desc));
+ }
+#pragma endregion
+#pragma region Behavior_Combat_NotFocus
+ {
+ CState_Combat::STATE_COMBAT_DESC Desc{};
+ Desc.pOwner = this;
+ Desc.funcEnterEvent = [this]() { Behavior_CombatEnter(); };
+ Desc.funcExitCheck = [this](_float fTimeDelta) { return Behavior_CombatExitCheck(fTimeDelta); };
+ Desc.funcExitEvent = [this]() { Behavior_CombatExit(); };
+ Desc.funcPriorityUpdate = nullptr;
+ Desc.funcLateUpdate = nullptr;
+ m_States.emplace(FSMSTATE::COMBAT, CState_Combat::Create(&Desc));
+ }
+
+ {
+ CTroll_State_Rush::TROLL_STATE_RUSH_DESC Desc{};
+ Desc.pOwner = this;
+ Desc.funcEnterEvent = [this]() { Behavior_RushEnter(); };
+ Desc.funcExitCheck = [this](_float fTimeDelta) { return Behavior_RushExitCheck(fTimeDelta); };
+ Desc.funcExitEvent = [this]() { Behavior_RushExit(); };
+ Desc.funcPriorityUpdate = nullptr;
+ Desc.funcLateUpdate = nullptr;
+ m_States.emplace(FSMSTATE::RUSH, CTroll_State_Rush::Create(&Desc));
+ }
+
+ {
+ CState_Throw::STATE_THROW_DESC Desc{};
+ Desc.pOwner = this;
+ Desc.funcEnterEvent = [this]() { Behavior_ThrowEnter(); };
+ Desc.funcExitCheck = [this](_float fTimeDelta) { return Behavior_ThrowExitCheck(fTimeDelta); };
+ Desc.funcExitEvent = [this]() { Behavior_ThrowExit(); };
+ Desc.funcPriorityUpdate = nullptr;
+ Desc.funcLateUpdate = nullptr;
+ m_States.emplace(FSMSTATE::THROW_ROCK, CState_Throw::Create(&Desc));
+ }
+
+ {
+ CState_Swing::STATE_SWING_DESC Desc{};
+ Desc.pOwner = this;
+ Desc.funcEnterEvent = [this]() { Behavior_SwingEnter(); };
+ Desc.funcExitCheck = [this](_float fTimeDelta) { return Behavior_SwingExitCheck(fTimeDelta); };
+ Desc.funcExitEvent = [this]() { Behavior_SwingExit(); };
+ Desc.funcPriorityUpdate = nullptr;
+ Desc.funcLateUpdate = nullptr;
+ m_States.emplace(FSMSTATE::SWING, CState_Swing::Create(&Desc));
+ }
+
+ {
+ CState_Slam::STATE_SLAM_DESC Desc{};
+ Desc.pOwner = this;
+ Desc.funcEnterEvent = [this]() { Behavior_SlamEnter(); };
+ Desc.funcExitCheck = [this](_float fTimeDelta) { return Behavior_SlamExitCheck(fTimeDelta); };
+ Desc.funcExitEvent = [this]() { Behavior_SlamExit(); };
+ Desc.funcPriorityUpdate = nullptr;
+ Desc.funcLateUpdate = nullptr;
+ m_States.emplace(FSMSTATE::SLAM, CState_Slam::Create(&Desc));
+ }
+
+ {
+ CTroll_State_BackHand_Swing::TROLL_STATE_BACK_HAND_SWING_DESC Desc{};
+ Desc.pOwner = this;
+ Desc.funcEnterEvent = [this]() { Behavior_BackHandSwingEnter(); };
+ Desc.funcExitCheck = [this](_float fTimeDelta) { return Behavior_BackHandSwingExitCheck(fTimeDelta); };
+ Desc.funcExitEvent = [this]() { Behavior_BackHandSwingExit(); };
+ Desc.funcPriorityUpdate = nullptr;
+ Desc.funcLateUpdate = nullptr;
+ m_States.emplace(FSMSTATE::BACKHAND_SWING, CTroll_State_BackHand_Swing::Create(&Desc));
+ }
+#pragma endregion
+
+#pragma region Behavior_Hit
+ {
+ CState_Hit::STATE_HIT_DESC Desc{};
+ Desc.pOwner = this;
+ Desc.funcEnterEvent = [this]() { Behavior_HitEnter(); };
+ Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_HitExitCheck(); };
+ Desc.funcExitEvent = [this]() { Behavior_HitExit(); };
+ Desc.funcPriorityUpdate = nullptr;
+ Desc.funcLateUpdate = nullptr;
+ m_States.emplace(FSMSTATE::HIT, CState_Hit::Create(&Desc));
+ }
+
+#pragma endregion
+
+}
+
+void CTroll::Set_Anim()
+{
+ m_Animation[STATEANIM::IDLE] = { 16,true };
+ m_Animation[STATEANIM::IDLE_COMBAT_TURN_BWD_R] = { 7,false };
+ m_Animation[STATEANIM::IDLE_COMBAT_TURN_BWD_L] = { 8,false };
+ m_Animation[STATEANIM::IDLE_BREAK1] = { 11,false };
+ m_Animation[STATEANIM::IDLE_BREAK2] = { 141,false };
+ m_Animation[STATEANIM::IDLE_BREAK3] = { 14,false };
+ m_Animation[STATEANIM::IDLE_BREAK4] = { 143,false };
+
+ m_Animation[STATEANIM::WALK_FWD] = { 22,true };
+
+ m_Animation[STATEANIM::JOG_START] = { 104,false };
+ m_Animation[STATEANIM::JOG_LEFT_TURN] = { 112,false };
+ m_Animation[STATEANIM::JOG_RIGHT_TURN] = { 108,false };
+ m_Animation[STATEANIM::JOG_FWD] = { 103,true };
+
+ m_Animation[STATEANIM::DODGE_LEFT] = { 125, false };
+ m_Animation[STATEANIM::DODGE_RIGHT] = { 126, false };
+ m_Animation[STATEANIM::SPRINT] = { 90, true };
+
+ m_Animation[STATEANIM::SLAM] = { 66,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_LOOP] = { 54,true };
+ m_Animation[STATEANIM::RUSH_END] = { 56,false };
+
+ m_Animation[STATEANIM::BACKHAND_SWING_JOG] = { 89,false };
+
+ m_Animation[STATEANIM::SWING_FWD] = { 87,false };
+
+ m_Animation[STATEANIM::HIT_BWD] = { 167, false }; //
+ m_Animation[STATEANIM::HIT_BWD2] = { 168, false }; //
+ m_Animation[STATEANIM::HIT_BWD3] = { 169, false }; //
+
+ m_Animation[STATEANIM::HIT_FACE] = { 156, false }; //
+ m_Animation[STATEANIM::HIT_FACE_END] = { 157, false }; //
+
+ m_Animation[STATEANIM::STUN] = { 60, false }; //
+
+
+ m_Animation[STATEANIM::KNOCKDOWN_BWD] = { 165, false }; //
+
+
+ //왼턴 108
+ //오른턴 112
+ // 106 우회전
+ // 110 좌회전
+
+}
diff --git a/Jusin154_Team3D/Editor/Private/Troll_Weapon.cpp b/Jusin154_Team3D/Editor/Private/Troll_Weapon.cpp
new file mode 100644
index 000000000..3fb7c3958
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/Troll_Weapon.cpp
@@ -0,0 +1,178 @@
+#include "pch.h"
+#include "Troll_Weapon.h"
+
+#include "GameInstance.h"
+#include "TrailObject.h"
+#include "EditEffect.h"
+
+CTroll_Weapon::CTroll_Weapon(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CPartObject(pDevice, pContext)
+{
+}
+
+CTroll_Weapon::CTroll_Weapon(const CTroll_Weapon& Prototype)
+ : CPartObject(Prototype)
+{
+}
+
+HRESULT CTroll_Weapon::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CTroll_Weapon::Initialize(void* pArg)
+{
+ TROLLWEAPON_DESC* pDesc = static_cast (pArg);
+ m_pSocketMatrices = pDesc->pSocketMatrices;
+
+ if (FAILED(__super::Initialize(pArg))) {
+ return E_FAIL;
+ }
+
+
+ if (FAILED(Ready_Components())) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+void CTroll_Weapon::Priority_Update(_float fTimeDelta)
+{
+ m_pModelCom->Combined_BoneMatrix();
+ _matrix socketMatrix = {};
+
+ socketMatrix = XMLoadFloat4x4(m_pSocketMatrices);
+
+ for (int i = 0; i < 3; ++i) {
+ socketMatrix.r[i] = XMVector3Normalize(socketMatrix.r[i]);
+ }
+
+ m_pTransformCom->Set_WorldMatrix(socketMatrix * XMLoadFloat4x4(m_pParentTransformCom->Get_WorldMatrixPtr()));
+
+#ifdef _DEBUG
+ Describe_Entity();
+
+#endif // _DEBUG
+}
+
+void CTroll_Weapon::Update(_float fTimeDelta)
+{
+
+
+}
+
+void CTroll_Weapon::Late_Update(_float fTimeDelta)
+{
+ m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
+}
+
+HRESULT CTroll_Weapon::Render()
+{
+ if (!m_pModelCom)
+ return S_OK;
+
+ if (FAILED(Bind_ShaderResources())) {
+ return E_FAIL;
+ }
+
+ _uint iNumMeshes = m_pModelCom->Get_NumMeshes();
+
+ for (_uint i = 0; i < iNumMeshes; i++)
+ {
+ if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_ANIM::DEFAULT)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pModelCom->Render(i))) {
+ return E_FAIL;
+ }
+ }
+
+ return S_OK;
+}
+
+HRESULT CTroll_Weapon::Ready_Components()
+{
+ __super::Ready_Components(nullptr);
+
+
+ /* Com_Model */
+ if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_Troll_Weapon_Model"),
+ reinterpret_cast(&m_pModelCom))))
+ return E_FAIL;
+
+ /* Com_Shader */
+ if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH,
+ reinterpret_cast(&m_pShaderCom))))
+ return E_FAIL;
+
+ return S_OK;
+}
+
+HRESULT CTroll_Weapon::Bind_ShaderResources()
+{
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+
+CTroll_Weapon* CTroll_Weapon::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CTroll_Weapon* pInstance = new CTroll_Weapon(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CTroll_Weapon");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CTroll_Weapon::Clone(void* pArg, CGameObject* pOwner)
+{
+ CTroll_Weapon* pInstance = new CTroll_Weapon(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CTroll_Weapon");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CTroll_Weapon::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pShaderCom);
+ SAFE_RELEASE(m_pModelCom);
+
+}
+#ifdef _DEBUG
+
+void CTroll_Weapon::Describe_Entity()
+{
+}
+
+#endif // _DEBUG
diff --git a/Jusin154_Team3D/Editor/Public/Editor_Define.h b/Jusin154_Team3D/Editor/Public/Editor_Define.h
index ca616d00e..e21106f48 100644
--- a/Jusin154_Team3D/Editor/Public/Editor_Define.h
+++ b/Jusin154_Team3D/Editor/Public/Editor_Define.h
@@ -43,7 +43,7 @@ namespace Editor
ANCIENT_MAGIC_THROW, ANCIENT_MAGIC, ALOHOMORA, PETRIFICUS_TOTALUS,
JAP_SIDE, BOMBARDA_SIDE, DESCENDO_SIDE, LEVIOSO_SIDE,
- TROLL_ATTACK , TROLL_SIDE ,
+ TROLL_ATTACK, TROLL_RUSH_HIT, TROLL_NOMAL_SMOKE,
END
};
diff --git a/Jusin154_Team3D/Editor/Public/EffectPool.h b/Jusin154_Team3D/Editor/Public/EffectPool.h
index 1540f8bed..fc1f618a8 100644
--- a/Jusin154_Team3D/Editor/Public/EffectPool.h
+++ b/Jusin154_Team3D/Editor/Public/EffectPool.h
@@ -38,6 +38,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/Editor/Public/Effect_Container.h b/Jusin154_Team3D/Editor/Public/Effect_Container.h
index 36705eb05..b389ecd67 100644
--- a/Jusin154_Team3D/Editor/Public/Effect_Container.h
+++ b/Jusin154_Team3D/Editor/Public/Effect_Container.h
@@ -25,6 +25,7 @@ class CEffect_Container abstract : public CContainerObject
HRESULT Load_Package(const _char* pPath);
virtual HRESULT Pre_Setting(CGameObject* pObject, void* pArg = nullptr);
void Reset_Light();
+ _uint Get_SkillType() const { return m_iSkillType; }
protected:
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
@@ -37,6 +38,8 @@ class CEffect_Container abstract : public CContainerObject
_int CollisionCheck();
protected:
+
+ _uint m_iSkillType = ENUM_CLASS(SKILL_TYPE::END);
_float4 m_vStartPos = {};
_float4 m_vEndPos = {};
PSX::PxSweepBufferN<12> m_Hitbuffer = {};
diff --git a/Jusin154_Team3D/Editor/Public/Effect_Editor.h b/Jusin154_Team3D/Editor/Public/Effect_Editor.h
index aae95e2ab..f64799350 100644
--- a/Jusin154_Team3D/Editor/Public/Effect_Editor.h
+++ b/Jusin154_Team3D/Editor/Public/Effect_Editor.h
@@ -32,6 +32,7 @@ class CEffect_Editor final : public CEffect_Container
virtual HRESULT Ready_Components(void* pArg) override;
HRESULT Ready_Child();
HRESULT Bind_ShaderResources() override;
+
private:
HRESULT Packaging(const _char* pDirectoryPath);
HRESULT ReSaveFile(const _char* pDirectoryPath);
diff --git a/Jusin154_Team3D/Editor/Public/Goblin_Protego.h b/Jusin154_Team3D/Editor/Public/Goblin_Protego.h
new file mode 100644
index 000000000..4ddc6ff90
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Public/Goblin_Protego.h
@@ -0,0 +1,53 @@
+#pragma once
+
+#include "Editor_Define.h"
+#include "Effect_Container.h"
+
+NS_BEGIN(Engine)
+NS_END
+
+NS_BEGIN(Editor)
+
+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 CEditEffect* m_pSphere = { nullptr };
+ class CEditEffect* m_pBottom = { nullptr };
+ class CEditEffect* 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/Editor/Public/Monster.h b/Jusin154_Team3D/Editor/Public/Monster.h
index dadcd638d..bb03f7c3a 100644
--- a/Jusin154_Team3D/Editor/Public/Monster.h
+++ b/Jusin154_Team3D/Editor/Public/Monster.h
@@ -13,25 +13,38 @@ class CMonster abstract : public CUnit
virtual ~CMonster() = default;
public:
- virtual HRESULT Initialize_Prototype() override;
- virtual HRESULT Initialize(void* pArg) override;
virtual void Priority_Update(_float fTimeDelta) override;
virtual void Update(_float fTimeDelta) override;
virtual void Late_Update(_float fTimeDelta) override;
- virtual HRESULT Render() override;
+ virtual HRESULT Render_OutLine() override;
+ virtual void Set_DrawOutLine();
+ _float4 Get_TargetPos() { return m_vTargetPos; }
+ virtual _bool Get_Damage(_float fDamage);
+ virtual _float2 Get_Hp();
protected:
- CTransform* m_pPlayerTransform = { nullptr };
- _float m_fTargetDistance = {};
+ class CInfoInstance* m_pInfoInstance = { nullptr };
+ CUnit* m_pTarget = { nullptr };
+ CStat* m_pStat = { nullptr };
+ _float4 m_vTargetPos = { };
+ _float3 m_vToTargetDir = { };
+ _float m_fTargetDistance = { FLT_MAX };
+ _bool m_bDrawOutLine = { false };
+ _bool m_bLookAt = { true };
protected:
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
HRESULT Ready_Components(void* pArg);
- HRESULT Bind_ShaderResources();
+ void Set_Target(CUnit& pTarget, CTransform& pTransform);
public:
virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr)PURE;
virtual void Free() override;
- virtual void Describe_Entity() override;
+#ifdef _DEBUG
+ virtual void Describe_Entity();
+#endif // _DEBUG
+
};
NS_END
diff --git a/Jusin154_Team3D/Editor/Public/State_Hit.h b/Jusin154_Team3D/Editor/Public/State_Hit.h
new file mode 100644
index 000000000..901d2bb22
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Public/State_Hit.h
@@ -0,0 +1,36 @@
+#pragma once
+#include "Editor_Define.h"
+#include "State_Root.h"
+
+NS_BEGIN(Editor)
+
+class CState_Hit final : public CState_Root
+{
+public:
+ typedef struct tagHit : public CState_Root::STATE_ROOT_DESC {
+ function funcPriorityUpdate = { nullptr };
+ function funcLateUpdate = { nullptr };
+ }STATE_HIT_DESC;
+public:
+ CState_Hit();
+ virtual ~CState_Hit() = default;
+
+public:
+ virtual void Enter();
+ virtual HRESULT Update(_float fTimeDelta);
+ virtual void Exit();
+
+private:
+ function m_funcPriorityUpdate = { nullptr };
+ function m_funcLateUpdate = { nullptr };
+
+private:
+ HRESULT Initialize(STATE_HIT_DESC* pDesc);
+
+public:
+ static CState_Hit* Create(STATE_HIT_DESC* pDesc);
+ virtual void Free() override;
+ virtual void Describe_Entity();
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Editor/Public/State_IdleBreak.h b/Jusin154_Team3D/Editor/Public/State_IdleBreak.h
new file mode 100644
index 000000000..c101161db
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Public/State_IdleBreak.h
@@ -0,0 +1,36 @@
+#pragma once
+#include "Editor_Define.h"
+#include "State_Root.h"
+
+NS_BEGIN(Editor)
+
+class CState_IdleBreak final : public CState_Root
+{
+public:
+ typedef struct tagIdleBreak : public CState_Root::STATE_ROOT_DESC {
+ function funcPriorityUpdate = { nullptr };
+ function funcLateUpdate = { nullptr };
+ }STATE_IDLEBREAK_DESC;
+public:
+ CState_IdleBreak();
+ virtual ~CState_IdleBreak() = default;
+
+public:
+ virtual void Enter();
+ virtual HRESULT Update(_float fTimeDelta);
+ virtual void Exit();
+
+private:
+ function m_funcPriorityUpdate = { nullptr };
+ function m_funcLateUpdate = { nullptr };
+
+private:
+ HRESULT Initialize(STATE_IDLEBREAK_DESC* pDesc);
+
+public:
+ static CState_IdleBreak* Create(STATE_IDLEBREAK_DESC* pDesc);
+ virtual void Free() override;
+ virtual void Describe_Entity();
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Editor/Public/State_Slam.h b/Jusin154_Team3D/Editor/Public/State_Slam.h
new file mode 100644
index 000000000..ed5a0f9f5
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Public/State_Slam.h
@@ -0,0 +1,36 @@
+#pragma once
+#include "Editor_Define.h"
+#include "State_Root.h"
+
+NS_BEGIN(Editor)
+
+class CState_Slam final : public CState_Root
+{
+public:
+ typedef struct tagSlam : public CState_Root::STATE_ROOT_DESC {
+ function funcPriorityUpdate = { nullptr };
+ function funcLateUpdate = { nullptr };
+ }STATE_SLAM_DESC;
+private:
+ CState_Slam();
+ virtual ~CState_Slam() = default;
+
+public:
+ virtual void Enter();
+ virtual HRESULT Update(_float fTimeDelta);
+ virtual void Exit();
+
+private:
+ function m_funcPriorityUpdate = { nullptr };
+ function m_funcLateUpdate = { nullptr };
+
+private:
+ HRESULT Initialize(STATE_SLAM_DESC* pDesc);
+
+public:
+ static CState_Slam* Create(STATE_SLAM_DESC* pDesc);
+ virtual void Free() override;
+ virtual void Describe_Entity();
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Editor/Public/State_Swing.h b/Jusin154_Team3D/Editor/Public/State_Swing.h
new file mode 100644
index 000000000..a7eb24063
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Public/State_Swing.h
@@ -0,0 +1,36 @@
+#pragma once
+#include "Editor_Define.h"
+#include "State_Root.h"
+
+NS_BEGIN(Editor)
+
+class CState_Swing final : public CState_Root
+{
+public:
+ typedef struct tagSwing : public CState_Root::STATE_ROOT_DESC {
+ function funcPriorityUpdate = { nullptr };
+ function funcLateUpdate = { nullptr };
+ }STATE_SWING_DESC;
+private:
+ CState_Swing();
+ virtual ~CState_Swing() = default;
+
+public:
+ virtual void Enter();
+ virtual HRESULT Update(_float fTimeDelta);
+ virtual void Exit();
+
+private:
+ function m_funcPriorityUpdate = { nullptr };
+ function m_funcLateUpdate = { nullptr };
+
+private:
+ HRESULT Initialize(STATE_SWING_DESC* pDesc);
+
+public:
+ static CState_Swing* Create(STATE_SWING_DESC* pDesc);
+ virtual void Free() override;
+ virtual void Describe_Entity();
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Editor/Public/State_Throw.h b/Jusin154_Team3D/Editor/Public/State_Throw.h
new file mode 100644
index 000000000..234f216e6
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Public/State_Throw.h
@@ -0,0 +1,36 @@
+#pragma once
+#include "Editor_Macro.h"
+#include "State_Root.h"
+
+NS_BEGIN(Editor)
+
+class CState_Throw final : public CState_Root
+{
+public:
+ typedef struct tagThrow : public CState_Root::STATE_ROOT_DESC {
+ function funcPriorityUpdate = { nullptr };
+ function funcLateUpdate = { nullptr };
+ }STATE_THROW_DESC;
+private:
+ CState_Throw();
+ virtual ~CState_Throw() = default;
+
+public:
+ virtual void Enter();
+ virtual HRESULT Update(_float fTimeDelta);
+ virtual void Exit();
+
+private:
+ function m_funcPriorityUpdate = { nullptr };
+ function m_funcLateUpdate = { nullptr };
+
+private:
+ HRESULT Initialize(STATE_THROW_DESC* pDesc);
+
+public:
+ static CState_Throw* Create(STATE_THROW_DESC* pDesc);
+ virtual void Free() override;
+ virtual void Describe_Entity();
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Editor/Public/Troll.h b/Jusin154_Team3D/Editor/Public/Troll.h
new file mode 100644
index 000000000..0796a7e4b
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Public/Troll.h
@@ -0,0 +1,130 @@
+#pragma once
+
+#include "Editor_Define.h"
+#include "Monster.h"
+#include "CallBack_Monster_Behavior.h"
+#include "CallBack_Monster_HitReport.h"
+
+NS_BEGIN(Editor)
+
+class CTroll final : public CMonster
+{
+ enum class TROLL_SKILL
+ {
+ RUSH,
+ THROWROCK,
+ SLAM,
+ SWING,
+ BACKHAND_SWING,
+ END
+ };
+
+private:
+ CTroll(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CTroll(const CTroll& Prototype);
+ virtual ~CTroll() = default;
+
+public:
+ virtual void Priority_Update(_float fTimeDelta) override;
+ virtual void Update(_float fTimeDelta) override;
+ virtual void Late_Update(_float fTimeDelta) override;
+ virtual HRESULT Render() override;
+ 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:
+ CCallBack_Monster_Behavior* m_pCallBack_Behavior = { nullptr };
+ CCallBack_Monster_HitReport* m_pCallBack_HitReport = { nullptr };
+
+ CCharacter_Controller* m_pCharacter_Controller = { nullptr };
+ CRigidBody_Dynamic* m_pRigidBody = { nullptr };
+ _float2 m_vStunTimer = { 0.f, 4.f };
+ _uint iIndex;
+
+ class CEditEffect* m_pRight_Smoke = { nullptr };
+ class CEditEffect* m_pLeft_Smoke = { nullptr };
+ class CEditEffect* m_pTroll_Particle = { nullptr };
+ class CEditEffect* m_pTroll_Particle2 = { nullptr };
+
+ class CTrailObject* m_pLeftTrail = {};
+ class CTrailObject* m_pRightTrail = {};
+
+ const _float4x4* m_pLeftHand_BoneMat = { nullptr };
+ const _float4x4* m_pRightHand_BoneMat = { nullptr };
+
+private:
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+ HRESULT Ready_Components();
+ HRESULT Ready_Parts();
+ HRESULT Bind_ShaderResources();
+
+public:
+ static CTroll* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr) override;
+ virtual void Free() override;
+#ifdef _DEBUG
+ virtual void Describe_Entity() override;
+
+#endif // _DEBUG
+private:
+ class CEffectPool* m_pEffectPool = nullptr;
+private:
+ virtual void Add_FSM();
+ virtual void Set_Anim();
+
+ _float m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::END)] = {};
+ _float m_fMaxSkillCoolTime[ENUM_CLASS(TROLL_SKILL::END)] = { 20.f,20.f, 20.f, 20.f ,20.f };
+
+
+ _float m_fRushTime = {};
+ _float m_fAttackDelay = {};
+
+ _float m_fDegree = {};
+ _float m_fCross = {};
+
+ void Behavior_IdleEnter();
+ HRESULT Behavior_IdleExitCheck();
+ void Behavior_IdleExit();
+
+ void Behavior_IdleBreakEnter();
+ HRESULT Behavior_IdleBreakExitCheck();
+ void Behavior_IdleBreakExit();
+
+ void Behavior_MoveEnter();
+ HRESULT Behavior_MoveExitCheck(_float fTimeDelta);
+ void Behavior_MoveExit();
+
+ void Behavior_CombatEnter();
+ HRESULT Behavior_CombatExitCheck(_float fTimeDelta);
+ void Behavior_CombatExit();
+
+ void Behavior_RushEnter();
+ HRESULT Behavior_RushExitCheck(_float fTimeDelta);
+ void Behavior_RushExit();
+
+ void Behavior_ThrowEnter();
+ HRESULT Behavior_ThrowExitCheck(_float fTimeDelta);
+ void Behavior_ThrowExit();
+
+ void Behavior_SwingEnter();
+ HRESULT Behavior_SwingExitCheck(_float fTimeDelta);
+ void Behavior_SwingExit();
+
+ void Behavior_SlamEnter();
+ HRESULT Behavior_SlamExitCheck(_float fTimeDelta);
+ void Behavior_SlamExit();
+
+ void Behavior_BackHandSwingEnter();
+ HRESULT Behavior_BackHandSwingExitCheck(_float fTimeDelta);
+ void Behavior_BackHandSwingExit();
+
+ void Behavior_HitEnter();
+ HRESULT Behavior_HitExitCheck();
+ void Behavior_HitExit();
+
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Editor/Public/Troll_Attack.h b/Jusin154_Team3D/Editor/Public/TrollSwing.h
similarity index 76%
rename from Jusin154_Team3D/Editor/Public/Troll_Attack.h
rename to Jusin154_Team3D/Editor/Public/TrollSwing.h
index 28a6dd8a2..7abe0719d 100644
--- a/Jusin154_Team3D/Editor/Public/Troll_Attack.h
+++ b/Jusin154_Team3D/Editor/Public/TrollSwing.h
@@ -8,12 +8,12 @@ NS_END
NS_BEGIN(Editor)
-class CTroll_Attack final : public CEffect_Container
+class CTrollSwing final : public CEffect_Container
{
private:
- CTroll_Attack(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
- CTroll_Attack(const CTroll_Attack& rhs);
- virtual ~CTroll_Attack() = default;
+ CTrollSwing(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CTrollSwing(const CTrollSwing& rhs);
+ virtual ~CTrollSwing() = default;
public:
virtual void Priority_Update(_float fTimeDelta) override;
@@ -34,7 +34,7 @@ class CTroll_Attack final : public CEffect_Container
_wstring m_wstrEffectName = {};
public:
- static CTroll_Attack* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ static CTrollSwing* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual void Free() override;
CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
void Describe_Entity() override;
diff --git a/Jusin154_Team3D/Editor/Public/Troll_Nomal_Smoke.h b/Jusin154_Team3D/Editor/Public/Troll_Nomal_Smoke.h
new file mode 100644
index 000000000..68ea884af
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Public/Troll_Nomal_Smoke.h
@@ -0,0 +1,43 @@
+#pragma once
+
+#include "Editor_Define.h"
+#include "Effect_Container.h"
+
+NS_BEGIN(Engine)
+NS_END
+
+NS_BEGIN(Editor)
+
+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/Editor/Public/Troll_Rock.h b/Jusin154_Team3D/Editor/Public/Troll_Rock.h
new file mode 100644
index 000000000..d6dbd9a8d
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Public/Troll_Rock.h
@@ -0,0 +1,50 @@
+#pragma once
+
+#include "Editor_Define.h"
+#include "PartObject.h"
+
+NS_BEGIN(Editor)
+
+class CTroll_Rock final : public CPartObject
+{
+public:
+ typedef struct tagTrollRock : public CPartObject::PARTOBJECT_DESC
+ {
+ const _float4x4* pSocketMatrices = { };
+ }TROLLROCK_DESC;
+private:
+ CTroll_Rock(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CTroll_Rock(const CTroll_Rock& Prototype);
+ virtual ~CTroll_Rock() = default;
+
+public:
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+ virtual void Priority_Update(_float fTimeDelta) override;
+ virtual void Update(_float fTimeDelta) override;
+ virtual void Late_Update(_float fTimeDelta) override;
+ virtual HRESULT Render() override;
+ void Set_Attach(_bool Attach) { m_bAttach = Attach; }
+public:
+
+private:
+ const _float4x4* m_pSocketMatrices = { };
+ CShader* m_pShaderCom = { nullptr };
+ CModel* m_pModelCom = { nullptr };
+ _bool m_bAttach = { true };
+
+private:
+ HRESULT Ready_Components();
+ HRESULT Bind_ShaderResources();
+
+public:
+ static CTroll_Rock* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr)override;
+ virtual void Free() override;
+
+#ifdef _DEBUG
+ void Describe_Entity() override;
+#endif // _DEBUG
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Editor/Public/Troll_Rush_Hit.h b/Jusin154_Team3D/Editor/Public/Troll_Rush_Hit.h
new file mode 100644
index 000000000..e0ea4247d
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Public/Troll_Rush_Hit.h
@@ -0,0 +1,43 @@
+#pragma once
+
+#include "Editor_Define.h"
+#include "Effect_Container.h"
+
+NS_BEGIN(Engine)
+NS_END
+
+NS_BEGIN(Editor)
+
+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/Editor/Public/Troll_State_BackHand_Swing.h b/Jusin154_Team3D/Editor/Public/Troll_State_BackHand_Swing.h
new file mode 100644
index 000000000..bc513b3e7
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Public/Troll_State_BackHand_Swing.h
@@ -0,0 +1,36 @@
+#pragma once
+#include "Editor_Define.h"
+#include "State_Root.h"
+
+NS_BEGIN(Editor)
+
+class CTroll_State_BackHand_Swing final : public CState_Root
+{
+public:
+ typedef struct tagTrollBackHandSwing : public CState_Root::STATE_ROOT_DESC {
+ function funcPriorityUpdate = { nullptr };
+ function funcLateUpdate = { nullptr };
+ }TROLL_STATE_BACK_HAND_SWING_DESC;
+public:
+ CTroll_State_BackHand_Swing();
+ virtual ~CTroll_State_BackHand_Swing() = default;
+
+public:
+ virtual void Enter();
+ virtual HRESULT Update(_float fTimeDelta);
+ virtual void Exit();
+
+private:
+ function m_funcPriorityUpdate = { nullptr };
+ function m_funcLateUpdate = { nullptr };
+
+private:
+ HRESULT Initialize(TROLL_STATE_BACK_HAND_SWING_DESC* pDesc);
+
+public:
+ static CTroll_State_BackHand_Swing* Create(TROLL_STATE_BACK_HAND_SWING_DESC* pDesc);
+ virtual void Free() override;
+ virtual void Describe_Entity();
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Editor/Public/Troll_State_Rush.h b/Jusin154_Team3D/Editor/Public/Troll_State_Rush.h
new file mode 100644
index 000000000..b1649697e
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Public/Troll_State_Rush.h
@@ -0,0 +1,36 @@
+#pragma once
+#include "Editor_Define.h"
+#include "State_Root.h"
+
+NS_BEGIN(Editor)
+
+class CTroll_State_Rush final : public CState_Root
+{
+public:
+ typedef struct tagTrollRush : public CState_Root::STATE_ROOT_DESC {
+ function funcPriorityUpdate = { nullptr };
+ function funcLateUpdate = { nullptr };
+ }TROLL_STATE_RUSH_DESC;
+public:
+ CTroll_State_Rush();
+ virtual ~CTroll_State_Rush() = default;
+
+public:
+ virtual void Enter();
+ virtual HRESULT Update(_float fTimeDelta);
+ virtual void Exit();
+
+private:
+ function m_funcPriorityUpdate = { nullptr };
+ function m_funcLateUpdate = { nullptr };
+
+private:
+ HRESULT Initialize(TROLL_STATE_RUSH_DESC* pDesc);
+
+public:
+ static CTroll_State_Rush* Create(TROLL_STATE_RUSH_DESC* pDesc);
+ virtual void Free() override;
+ virtual void Describe_Entity();
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Editor/Public/Troll_Weapon.h b/Jusin154_Team3D/Editor/Public/Troll_Weapon.h
new file mode 100644
index 000000000..09a5f2cac
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Public/Troll_Weapon.h
@@ -0,0 +1,48 @@
+#pragma once
+
+#include "Editor_Define.h"
+#include "PartObject.h"
+
+NS_BEGIN(Editor)
+
+class CTroll_Weapon final : public CPartObject
+{
+public:
+ typedef struct tagTrollWeapon : public CPartObject::PARTOBJECT_DESC
+ {
+ const _float4x4* pSocketMatrices = { };
+ }TROLLWEAPON_DESC;
+private:
+ CTroll_Weapon(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CTroll_Weapon(const CTroll_Weapon& Prototype);
+ virtual ~CTroll_Weapon() = default;
+
+public:
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+ virtual void Priority_Update(_float fTimeDelta) override;
+ virtual void Update(_float fTimeDelta) override;
+ virtual void Late_Update(_float fTimeDelta) override;
+ virtual HRESULT Render() override;
+public:
+
+private:
+ const _float4x4* m_pSocketMatrices = { };
+ CShader* m_pShaderCom = { nullptr };
+ CModel* m_pModelCom = { nullptr };
+
+private:
+ HRESULT Ready_Components();
+ HRESULT Bind_ShaderResources();
+
+public:
+ static CTroll_Weapon* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr)override;
+ virtual void Free() override;
+
+#ifdef _DEBUG
+ void Describe_Entity() override;
+#endif // _DEBUG
+};
+
+NS_END
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 c0ce8251b..bd75f7635 100644
--- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl
+++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl
@@ -43,9 +43,12 @@ struct ParticleValue
float3 vDeltaSize;
float2 vDelay;
+
bool isCompareStop;
float fCollisionTime;
float fDropAttenuation;
+
+ float3 vVelocity;
};
@@ -108,6 +111,8 @@ void CS_MAIN(
float fGravity = particleValue.fGravity;
float fOnlyDropY = 0.f;
+ float fRatio = particle.vLifeTime.x / particle.vLifeTime.y;
+
particleValue.vDelay.x += fTimeDelta;
if (particleValue.vDelay.x < particleValue.vDelay.y)
@@ -144,8 +149,14 @@ void CS_MAIN(
if (particle.vLifeTime.x >= particle.vLifeTime.y)
{
+ particleValue.isCompareStop = false;
+ particleValue.fCollisionTime = 0.f;
+
if (isLoop == false)
{
+ g_VBInstanceOutput[iIndex] = particle;
+ g_ParticleValueOutput[iIndex] = particleValue;
+
return ;
}
//초기화
@@ -157,8 +168,7 @@ void CS_MAIN(
particle.vLifeTime.x = 0.f;
particleValue.vAniIndex.x = 0.f;
particleValue.vDelay.x = 0.f;
- particleValue.isCompareStop = false;
- particleValue.fCollisionTime = 0.f;
+
g_VBInstanceOutput[iIndex] = particle;
g_ParticleValueOutput[iIndex] = particleValue;
@@ -168,17 +178,11 @@ void CS_MAIN(
if (isDrop == true)
- {
+ {
if (particleValue.isCompareStop == true) // 지면에 부딪혔을 때
{
- // 내 현재 시간의 비례
- // 0.0 ~ 3
- // 2초에 부딧혓으면
- // 2 - 2 / 3 - 2
- // 0 ~ 1 cos(0) * - 1
-
- float fRatio = saturate((particle.vLifeTime.x - particleValue.fCollisionTime) / (particle.vLifeTime.y - particleValue.fCollisionTime));
+ fRatio = saturate((particle.vLifeTime.x - particleValue.fCollisionTime) / (particle.vLifeTime.y - particleValue.fCollisionTime));
fGravity *= (2.f * fRatio - 1.f) / particleValue.fDropAttenuation;
}
@@ -187,8 +191,7 @@ void CS_MAIN(
fOnlyDropY = particle.vTranslation.y;
}
-
-
+
if (isMoveForward)
{
float fTime = (particle.vLifeTime.x / particle.vLifeTime.y);
@@ -274,7 +277,7 @@ void CS_MAIN(
}
- if (isDetphCompareStop)
+ if (isDetphCompareStop == true)
{
float2 vTexcoord;
@@ -301,7 +304,7 @@ void CS_MAIN(
float fOldViewZ = vDepthDesc.y * fFar;
- if (vProjPos.w >= fOldViewZ)
+ if (vProjPos.w >= fOldViewZ && particle.vLifeTime.x >= 0.2f)
{
if (particleValue.isCompareStop == false)
{
@@ -319,6 +322,10 @@ void CS_MAIN(
}
+ /*가속력*/
+ if (length(particleValue.vVelocity) > FLT_EPSILON5)
+ particle.vTranslation.xyz += fRatio * particleValue.vVelocity;
+
if (isSizeMove == true)
{
float3 CurLength =
diff --git a/Jusin154_Team3D/Engine/Private/Instance_Model.cpp b/Jusin154_Team3D/Engine/Private/Instance_Model.cpp
index 593d19408..9103dc341 100644
--- a/Jusin154_Team3D/Engine/Private/Instance_Model.cpp
+++ b/Jusin154_Team3D/Engine/Private/Instance_Model.cpp
@@ -700,6 +700,14 @@ void CInstance_Model::Instane_Buffer_ReStruct()
pParticleValues[i].vPivot = vPivot;
+ _float3 vVelocity = _float3(
+ m_pGameInstance->Random_Float(m_InstanceDesc.vVelocityMin.x, m_InstanceDesc.vVelocityMax.x),
+ m_pGameInstance->Random_Float(m_InstanceDesc.vVelocityMin.y, m_InstanceDesc.vVelocityMax.y),
+ m_pGameInstance->Random_Float(m_InstanceDesc.vVelocityMin.z, m_InstanceDesc.vVelocityMax.z)
+ );
+
+ pParticleValues[i].vVelocity = vVelocity;
+
_float3 vSizeLerp = _float3(
m_InstanceDesc.vDeltaSize.x,
m_InstanceDesc.vDeltaSize.y,
@@ -725,9 +733,12 @@ void CInstance_Model::Instane_Buffer_ReStruct()
pParticleValues[i].fDrag = m_pGameInstance->Random_Float(m_InstanceDesc.vDrag.x, m_InstanceDesc.vDrag.y);
pParticleValues[i].fSizeDrag = m_pGameInstance->Random_Float(m_InstanceDesc.vSizeDrag.x, m_InstanceDesc.vSizeDrag.y);
pParticleValues[i].vDelay = _float2(0.0f, m_pGameInstance->Random_Float(m_InstanceDesc.vDelay.x, m_InstanceDesc.vDelay.y));
- pParticleValues[i].isCompareStop = false;
pParticleValues[i].fDropAttenuation = m_pGameInstance->Random_Float(m_InstanceDesc.vDropAttenuation.x, m_InstanceDesc.vDropAttenuation.y);
+ 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));
memcpy(&pParticleValues[i].vOriginLook, SRMatrix.m[2], sizeof(_float4));
@@ -969,6 +980,16 @@ void CInstance_Model::Describe_Entity()
Instane_Buffer_ReStruct();
}
+ if (ImGui::DragFloat3("VelocityMin", reinterpret_cast<_float*>(&m_InstanceDesc.vVelocityMin)))
+ {
+ Instane_Buffer_ReStruct();
+ }
+
+ if (ImGui::DragFloat3("VelocityMax", reinterpret_cast<_float*>(&m_InstanceDesc.vVelocityMax)))
+ {
+ Instane_Buffer_ReStruct();
+ }
+
if (ImGui::DragFloat3("DeltaAngleMin", reinterpret_cast<_float*>(&m_InstanceDesc.vDeltaAngleMin)))
{
Instane_Buffer_ReStruct();
diff --git a/Jusin154_Team3D/Engine/Private/Material.cpp b/Jusin154_Team3D/Engine/Private/Material.cpp
index f348bf477..8d000048b 100644
--- a/Jusin154_Team3D/Engine/Private/Material.cpp
+++ b/Jusin154_Team3D/Engine/Private/Material.cpp
@@ -322,6 +322,9 @@ HRESULT CMaterial::Add_Texture(const _char* pTextureFolderPath, string& FileType
else if (!strcmp(FileType.c_str(), "basecolor")) {
eTexture = aiTextureType::aiTextureType_DIFFUSE;
}
+ else if (!strcmp(FileType.c_str(), "DefaultDiffuse")) {
+ eTexture = aiTextureType::aiTextureType_DIFFUSE;
+ }
else if (!strcmp(FileType.c_str(), "N")){
eTexture = aiTextureType::aiTextureType_NORMALS;
}
@@ -378,6 +381,12 @@ HRESULT CMaterial::Add_Texture(const _char* pTextureFolderPath, string& FileType
else if (!strcmp(FileType.c_str(), "A")) {
eTexture = aiTextureType::aiTextureType_AMBIENT;
}
+ else if (!strcmp(FileType.c_str(), "AO")) {
+ eTexture = aiTextureType::aiTextureType_AMBIENT_OCCLUSION;
+ }
+ else if (!strcmp(FileType.c_str(), "R")) {
+ eTexture = aiTextureType::aiTextureType_DIFFUSE_ROUGHNESS;
+ }
else
{
#ifndef 기무리
diff --git a/Jusin154_Team3D/Engine/Public/Instance_Model.h b/Jusin154_Team3D/Engine/Public/Instance_Model.h
index 5063cd9d7..0e8d404c4 100644
--- a/Jusin154_Team3D/Engine/Public/Instance_Model.h
+++ b/Jusin154_Team3D/Engine/Public/Instance_Model.h
@@ -70,8 +70,10 @@ class ENGINE_DLL CInstance_Model final : public CComponent
_bool isDetphCompareStop = {};
_bool isPadding0 = {};
- _float4 vPadding2 = {};
- _float4 vPadding3 = {};
+ _float3 vVelocityMin = {};
+ _float3 vVelocityMax = {};
+
+ _float2 vPadding3 = {};
_float4 vPadding4 = {};
_float4 vPadding5 = {};
_float4 vPadding6 = {};
@@ -219,6 +221,7 @@ class ENGINE_DLL CInstance_Model final : public CComponent
_bool isCompareStop = {};
_float fCollisionTime = {};
_float fDropAttenuation = {};
+ _float3 vVelocity = {};
}CS_PARTICLE_VALUE_DESC;