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 df1fd0698..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);
@@ -185,10 +182,42 @@ void CTroll::Behavior_CombatEnter()
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;
}
@@ -317,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/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/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/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp
index 04c9f454b..ad8da2d71 100644
--- a/Jusin154_Team3D/Editor/Private/Loader.cpp
+++ b/Jusin154_Team3D/Editor/Private/Loader.cpp
@@ -2029,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())))) {
@@ -2163,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(),
diff --git a/Jusin154_Team3D/Editor/Private/Troll_States.cpp b/Jusin154_Team3D/Editor/Private/Troll_States.cpp
index a7c7f795f..2231cfa56 100644
--- a/Jusin154_Team3D/Editor/Private/Troll_States.cpp
+++ b/Jusin154_Team3D/Editor/Private/Troll_States.cpp
@@ -83,12 +83,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)
@@ -181,34 +179,6 @@ void CTroll::Behavior_CombatEnter()
m_pFSM->Enable_State(FSMSTATE::COMBAT);
m_bLookAt = true;
-
- if (m_fTargetDistance <= 6.f)
- {
- if (m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SLAM)] <= 0.f) {
- m_pFSM->Change_State(FSMSTATE::SLAM);
- }
-
- 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);
- }
- }
- 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);
- }
-
}
HRESULT CTroll::Behavior_CombatExitCheck(_float fTimeDelta)
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 기무리