[Fix] 고블린 상태 수정
[Fix] 고블린 스펙터 수정 [Add] 고블린 도끼 추가
This commit is contained in:
@@ -168,6 +168,7 @@ call Update_Resources.bat
|
|||||||
<ClInclude Include="..\Public\Enemy_HpBar.h" />
|
<ClInclude Include="..\Public\Enemy_HpBar.h" />
|
||||||
<ClInclude Include="..\Public\Enemy_Info.h" />
|
<ClInclude Include="..\Public\Enemy_Info.h" />
|
||||||
<ClInclude Include="..\Public\Enemy_Panel.h" />
|
<ClInclude Include="..\Public\Enemy_Panel.h" />
|
||||||
|
<ClInclude Include="..\Public\Goblin_BattleAxe.h" />
|
||||||
<ClInclude Include="..\Public\Goblin_Dagger.h" />
|
<ClInclude Include="..\Public\Goblin_Dagger.h" />
|
||||||
<ClInclude Include="..\Public\Goblin_Mage.h" />
|
<ClInclude Include="..\Public\Goblin_Mage.h" />
|
||||||
<ClInclude Include="..\Public\Goblin_Spector.h" />
|
<ClInclude Include="..\Public\Goblin_Spector.h" />
|
||||||
@@ -314,6 +315,7 @@ call Update_Resources.bat
|
|||||||
<ClCompile Include="..\Private\Enemy_HpBar.cpp" />
|
<ClCompile Include="..\Private\Enemy_HpBar.cpp" />
|
||||||
<ClCompile Include="..\Private\Enemy_Info.cpp" />
|
<ClCompile Include="..\Private\Enemy_Info.cpp" />
|
||||||
<ClCompile Include="..\Private\Enemy_Panel.cpp" />
|
<ClCompile Include="..\Private\Enemy_Panel.cpp" />
|
||||||
|
<ClCompile Include="..\Private\Goblin_BattleAxe.cpp" />
|
||||||
<ClCompile Include="..\Private\Goblin_Dagger.cpp" />
|
<ClCompile Include="..\Private\Goblin_Dagger.cpp" />
|
||||||
<ClCompile Include="..\Private\Goblin_Mage.cpp" />
|
<ClCompile Include="..\Private\Goblin_Mage.cpp" />
|
||||||
<ClCompile Include="..\Private\Goblin_Mage_States.cpp" />
|
<ClCompile Include="..\Private\Goblin_Mage_States.cpp" />
|
||||||
|
|||||||
@@ -424,13 +424,16 @@
|
|||||||
<ClInclude Include="..\Public\Goblin_Mage.h">
|
<ClInclude Include="..\Public\Goblin_Mage.h">
|
||||||
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Mage</Filter>
|
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Mage</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\Public\Goblin.h">
|
|
||||||
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Warrior</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\Public\Goblin.h" />
|
<ClInclude Include="..\Public\Goblin.h" />
|
||||||
<ClInclude Include="..\Public\Goblin_Spector.h">
|
<ClInclude Include="..\Public\Goblin_Spector.h">
|
||||||
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Spector</Filter>
|
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Spector</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\Public\Goblin.h">
|
||||||
|
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Warrior</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\Public\Goblin_BattleAxe.h">
|
||||||
|
<Filter>02.GameObjects\Item\Goblin_BattleAxe</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Image Include="Client.ico">
|
<Image Include="Client.ico">
|
||||||
@@ -909,6 +912,9 @@
|
|||||||
<Filter Include="02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Spector">
|
<Filter Include="02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Spector">
|
||||||
<UniqueIdentifier>{234b3dd8-4ec9-4e81-ac7f-4eacb8f53780}</UniqueIdentifier>
|
<UniqueIdentifier>{234b3dd8-4ec9-4e81-ac7f-4eacb8f53780}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
|
<Filter Include="02.GameObjects\Item\Goblin_BattleAxe">
|
||||||
|
<UniqueIdentifier>{c770aac9-12b1-45f0-a64f-fc7819921e86}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="Client.cpp">
|
<ClCompile Include="Client.cpp">
|
||||||
@@ -1319,15 +1325,9 @@
|
|||||||
<ClCompile Include="..\Private\Goblin_Mage.cpp">
|
<ClCompile Include="..\Private\Goblin_Mage.cpp">
|
||||||
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Mage</Filter>
|
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Mage</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\Private\Goblin.cpp">
|
|
||||||
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Warrior</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\Private\Goblin_Mage_States.cpp">
|
<ClCompile Include="..\Private\Goblin_Mage_States.cpp">
|
||||||
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Mage</Filter>
|
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Mage</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\Private\Goblin_States.cpp">
|
|
||||||
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Warrior</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\Private\Enemy_HpBar.cpp">
|
<ClCompile Include="..\Private\Enemy_HpBar.cpp">
|
||||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Enemy_Penel\Enemy_HpBar</Filter>
|
<Filter>02.GameObjects\UI\GamePlay_Canvas\Enemy_Penel\Enemy_HpBar</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@@ -1342,6 +1342,15 @@
|
|||||||
<ClCompile Include="..\Private\Goblin_Spector.cpp">
|
<ClCompile Include="..\Private\Goblin_Spector.cpp">
|
||||||
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Spector</Filter>
|
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Spector</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\Private\Goblin_States.cpp">
|
||||||
|
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Warrior</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\Private\Goblin.cpp">
|
||||||
|
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Warrior</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\Private\Goblin_BattleAxe.cpp">
|
||||||
|
<Filter>02.GameObjects\Item\Goblin_BattleAxe</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="Client.rc">
|
<ResourceCompile Include="Client.rc">
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include "GameInstance.h"
|
#include "GameInstance.h"
|
||||||
#include "Goblin_Dagger.h"
|
#include "Goblin_Dagger.h"
|
||||||
|
#include "Goblin_Spector.h"
|
||||||
#include "Effect_Container.h"
|
#include "Effect_Container.h"
|
||||||
|
|
||||||
#pragma region STATE
|
#pragma region STATE
|
||||||
@@ -294,10 +295,17 @@ HRESULT CGoblin::Ready_Parts()
|
|||||||
{
|
{
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Get_PartObject<CGoblin_Dagger>()->Set_Visible(false);
|
Get_PartObject<CGoblin_Dagger>()->Set_Visible(false);
|
||||||
|
|
||||||
|
|
||||||
|
CGoblin_Spector::GOBLIN_SPECTOR_DESC Goblin_SpectorDesc{};
|
||||||
|
|
||||||
|
Goblin_SpectorDesc.pParentTransform = m_pTransformCom;
|
||||||
|
|
||||||
|
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CGoblin_Spector>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER, &Goblin_SpectorDesc,this))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
#pragma region EFFECT
|
#pragma region EFFECT
|
||||||
/* EFFECT */
|
/* EFFECT */
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,180 @@
|
|||||||
|
#include "pch.h"
|
||||||
|
#include "Goblin_BattleAxe.h"
|
||||||
|
|
||||||
|
#include "GameInstance.h"
|
||||||
|
#include "TrailObject.h"
|
||||||
|
#include "EffectParts.h"
|
||||||
|
|
||||||
|
CGoblin_BattleAxe::CGoblin_BattleAxe(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||||
|
: CPartObject(pDevice, pContext)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
CGoblin_BattleAxe::CGoblin_BattleAxe(const CGoblin_BattleAxe& Prototype)
|
||||||
|
: CPartObject(Prototype)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CGoblin_BattleAxe::Initialize_Prototype()
|
||||||
|
{
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CGoblin_BattleAxe::Initialize(void* pArg)
|
||||||
|
{
|
||||||
|
GOBLIN_BATTLEAXE_DESC* pDesc = static_cast<GOBLIN_BATTLEAXE_DESC*> (pArg);
|
||||||
|
m_pSocketMatrices = pDesc->pSocketMatrices;
|
||||||
|
|
||||||
|
if (FAILED(__super::Initialize(pArg))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (FAILED(Ready_Components())) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGoblin_BattleAxe::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 CGoblin_BattleAxe::Update(_float fTimeDelta)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGoblin_BattleAxe::Late_Update(_float fTimeDelta)
|
||||||
|
{
|
||||||
|
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CGoblin_BattleAxe::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_MESH::DEFAULT)))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (FAILED(m_pModelCom->Render(i))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CGoblin_BattleAxe::Ready_Components()
|
||||||
|
{
|
||||||
|
__super::Ready_Components(nullptr);
|
||||||
|
|
||||||
|
/* Com_Model */
|
||||||
|
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_Goblin_BattleAxe_Model"),
|
||||||
|
reinterpret_cast<CComponent**>(&m_pModelCom))))
|
||||||
|
return E_FAIL;
|
||||||
|
|
||||||
|
/* Com_Shader */
|
||||||
|
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH,
|
||||||
|
reinterpret_cast<CComponent**>(&m_pShaderCom))))
|
||||||
|
return E_FAIL;
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CGoblin_BattleAxe::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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
CGoblin_BattleAxe* CGoblin_BattleAxe::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||||
|
{
|
||||||
|
CGoblin_BattleAxe* pInstance = new CGoblin_BattleAxe(pDevice, pContext);
|
||||||
|
|
||||||
|
if (FAILED(pInstance->Initialize_Prototype()))
|
||||||
|
{
|
||||||
|
MSG_BOX("Failed to Created : CGoblin_BattleAxe");
|
||||||
|
SAFE_RELEASE(pInstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
return pInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
CGameObject* CGoblin_BattleAxe::Clone(void* pArg, CGameObject* pOwner)
|
||||||
|
{
|
||||||
|
CGoblin_BattleAxe* pInstance = new CGoblin_BattleAxe(*this);
|
||||||
|
pInstance->m_pOwner = pOwner;
|
||||||
|
if (FAILED(pInstance->Initialize(pArg)))
|
||||||
|
{
|
||||||
|
MSG_BOX("Failed to Cloned : CGoblin_BattleAxe");
|
||||||
|
SAFE_RELEASE(pInstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
return pInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGoblin_BattleAxe::Free()
|
||||||
|
{
|
||||||
|
__super::Free();
|
||||||
|
|
||||||
|
SAFE_RELEASE(m_pShaderCom);
|
||||||
|
SAFE_RELEASE(m_pModelCom);
|
||||||
|
|
||||||
|
}
|
||||||
|
#ifdef _DEBUG
|
||||||
|
|
||||||
|
void CGoblin_BattleAxe::Describe_Entity()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // _DEBUG
|
||||||
@@ -38,7 +38,7 @@ HRESULT CGoblin_Dagger::Initialize(void* pArg)
|
|||||||
|
|
||||||
void CGoblin_Dagger::Priority_Update(_float fTimeDelta)
|
void CGoblin_Dagger::Priority_Update(_float fTimeDelta)
|
||||||
{
|
{
|
||||||
m_pModelCom->Combined_BoneMatrix();
|
//m_pModelCom->Combined_BoneMatrix();
|
||||||
if (m_bAttach)
|
if (m_bAttach)
|
||||||
{
|
{
|
||||||
_matrix socketMatrix = {};
|
_matrix socketMatrix = {};
|
||||||
|
|||||||
@@ -2,16 +2,9 @@
|
|||||||
#include "Goblin_Spector.h"
|
#include "Goblin_Spector.h"
|
||||||
|
|
||||||
#include "GameInstance.h"
|
#include "GameInstance.h"
|
||||||
|
#include "Goblin.h"
|
||||||
#include "Effect_Container.h"
|
#include "Effect_Container.h"
|
||||||
|
#include "Goblin_BattleAxe.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"
|
#include "EffectParts.h"
|
||||||
|
|
||||||
@@ -33,6 +26,8 @@ HRESULT CGoblin_Spector::Initialize_Prototype()
|
|||||||
|
|
||||||
HRESULT CGoblin_Spector::Initialize(void* pArg)
|
HRESULT CGoblin_Spector::Initialize(void* pArg)
|
||||||
{
|
{
|
||||||
|
GOBLIN_SPECTOR_DESC* pDesc = static_cast<GOBLIN_SPECTOR_DESC*> (pArg);
|
||||||
|
m_pParentTransformCom = pDesc->pParentTransform;
|
||||||
if (FAILED(__super::Initialize(pArg)))
|
if (FAILED(__super::Initialize(pArg)))
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
|
||||||
@@ -42,6 +37,10 @@ HRESULT CGoblin_Spector::Initialize(void* pArg)
|
|||||||
if (FAILED(Ready_Parts()))
|
if (FAILED(Ready_Parts()))
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
|
||||||
|
m_pGoblin = dynamic_cast<CGoblin*>(m_pOwner);
|
||||||
|
SAFE_ADDREF(m_pGoblin);
|
||||||
|
|
||||||
|
m_vOriginScale = m_pTransformCom->Get_Scale();
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
@@ -55,29 +54,37 @@ void CGoblin_Spector::Update(_float fTimeDelta)
|
|||||||
{
|
{
|
||||||
__super::Update(fTimeDelta);
|
__super::Update(fTimeDelta);
|
||||||
|
|
||||||
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
|
m_Offset = _float3(0.f, 0.3f, 0.f);
|
||||||
|
|
||||||
|
_matrix Offset = XMMatrixTranslation(m_Offset.x,
|
||||||
|
m_Offset.y, m_Offset.z);
|
||||||
|
|
||||||
|
m_pTransformCom->Set_WorldMatrix(Offset * XMLoadFloat4x4(m_pParentTransformCom->Get_WorldMatrixPtr()));
|
||||||
|
|
||||||
|
if (m_pGoblin->Get_Swing())
|
||||||
|
{
|
||||||
|
if (m_vScale.x <= 2.f)
|
||||||
|
{
|
||||||
|
m_vScale.x += fTimeDelta;
|
||||||
|
m_vScale.y += fTimeDelta;
|
||||||
|
m_vScale.z += fTimeDelta;
|
||||||
|
}
|
||||||
|
m_pTransformCom->Set_Scale(m_vScale);
|
||||||
|
m_pModelCom->Set_AnimationIndex(m_pGoblin->Get_Component<CModel>()->Get_AnimIndex());
|
||||||
|
m_pModelCom->Set_CurrentTrackPosition(m_pGoblin->Get_Component<CModel>()->Get_CurrentTrackPosition());
|
||||||
|
Get_PartObject<CGoblin_BattleAxe>()->Set_Visible(true);
|
||||||
|
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Get_PartObject<CGoblin_BattleAxe>()->Set_Visible(false);
|
||||||
|
m_vScale = { 1.f,1.f,1.f };
|
||||||
|
m_pTransformCom->Set_Scale(m_vOriginScale);
|
||||||
|
m_pModelCom->Set_AnimationIndex(5);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Play_Event();
|
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
|
#ifdef _DEBUG
|
||||||
Describe_Entity();
|
Describe_Entity();
|
||||||
#endif // _DEBUG
|
#endif // _DEBUG
|
||||||
@@ -87,31 +94,20 @@ void CGoblin_Spector::Update(_float fTimeDelta)
|
|||||||
void CGoblin_Spector::Late_Update(_float fTimeDelta)
|
void CGoblin_Spector::Late_Update(_float fTimeDelta)
|
||||||
{
|
{
|
||||||
__super::Late_Update(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);
|
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT CGoblin_Spector::Render()
|
HRESULT CGoblin_Spector::Render()
|
||||||
{
|
{
|
||||||
if (!m_bVisible)
|
if (!m_bVisible || !m_pGoblin->Get_Swing())
|
||||||
return S_OK;
|
return S_OK;
|
||||||
|
|
||||||
if (FAILED(Bind_ShaderResources())) {
|
if (FAILED(Bind_ShaderResources())) {
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
|
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
|
||||||
_uint iShaderPass = ENUM_CLASS(SHADER_PASS_ANIM::SPECTOR);
|
_uint iShaderPass = ENUM_CLASS(SHADER_PASS_ANIM::SPECTOR);
|
||||||
|
|
||||||
for (_uint i = 0; i < iNumMeshes; i++)
|
for (_uint i = 0; i < iNumMeshes; i++)
|
||||||
{
|
{
|
||||||
if (FAILED(m_pModelCom->Bind_BoneMatrices(i, m_pShaderCom, "g_BoneMatrices"))) {
|
if (FAILED(m_pModelCom->Bind_BoneMatrices(i, m_pShaderCom, "g_BoneMatrices"))) {
|
||||||
@@ -131,68 +127,12 @@ HRESULT CGoblin_Spector::Render()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef _DEBUG
|
|
||||||
if (true == m_pCharacter_Controller->IsActive()) {
|
|
||||||
if (FAILED(m_pCharacter_Controller->Render())) {
|
|
||||||
return E_FAIL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (FAILED(m_pRigidBody->Render())) {
|
|
||||||
return E_FAIL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
return S_OK;
|
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)
|
void CGoblin_Spector::OnCollision(CGameObject* pOther, void* pDesc)
|
||||||
{
|
{
|
||||||
/*if (true == m_bDead) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
ON_COLLISION_INFO* CollisionDesc = static_cast<ON_COLLISION_INFO*>(pDesc);
|
|
||||||
|
|
||||||
_uint iSkillType = dynamic_cast<CEffect_Container*>(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)
|
void CGoblin_Spector::OnHit(CGameObject* pOther, CGameObject* pCaller)
|
||||||
@@ -217,36 +157,6 @@ HRESULT CGoblin_Spector::Ready_Components()
|
|||||||
return E_FAIL;
|
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))) {
|
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("STAT_GOBLIN"), (CComponent**)&m_pStat))) {
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
@@ -255,6 +165,18 @@ HRESULT CGoblin_Spector::Ready_Components()
|
|||||||
|
|
||||||
HRESULT CGoblin_Spector::Ready_Parts()
|
HRESULT CGoblin_Spector::Ready_Parts()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
CGoblin_BattleAxe::GOBLIN_BATTLEAXE_DESC Goblin_BattleAxe_Desc{};
|
||||||
|
|
||||||
|
Goblin_BattleAxe_Desc.pParentTransform = m_pTransformCom;
|
||||||
|
Goblin_BattleAxe_Desc.pSocketMatrices = m_pModelCom->Get_BoneMatrixPtr("SKT_RightHand");
|
||||||
|
|
||||||
|
if (FAILED(Add_PartObject<CGoblin_BattleAxe>("Goblin_BattleAxe", g_iStaticLevel, nullptr, &Goblin_BattleAxe_Desc)))
|
||||||
|
{
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#pragma region EFFECT
|
#pragma region EFFECT
|
||||||
/* EFFECT */
|
/* EFFECT */
|
||||||
|
|
||||||
@@ -294,8 +216,6 @@ HRESULT CGoblin_Spector::Ready_Parts()
|
|||||||
|
|
||||||
#pragma endregion
|
#pragma endregion
|
||||||
return S_OK;
|
return S_OK;
|
||||||
|
|
||||||
return S_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT CGoblin_Spector::Bind_ShaderResources()
|
HRESULT CGoblin_Spector::Bind_ShaderResources()
|
||||||
@@ -331,7 +251,7 @@ CGoblin_Spector* CGoblin_Spector::Create(ID3D11Device* pDevice, ID3D11DeviceCont
|
|||||||
CGameObject* CGoblin_Spector::Clone(void* pArg, CGameObject* pOwner)
|
CGameObject* CGoblin_Spector::Clone(void* pArg, CGameObject* pOwner)
|
||||||
{
|
{
|
||||||
CGoblin_Spector* pInstance = new CGoblin_Spector(*this);
|
CGoblin_Spector* pInstance = new CGoblin_Spector(*this);
|
||||||
|
pInstance->m_pOwner = pOwner;
|
||||||
if (FAILED(pInstance->Initialize(pArg)))
|
if (FAILED(pInstance->Initialize(pArg)))
|
||||||
{
|
{
|
||||||
MSG_BOX("Failed to Cloned : CGoblin_Spector");
|
MSG_BOX("Failed to Cloned : CGoblin_Spector");
|
||||||
@@ -344,25 +264,21 @@ void CGoblin_Spector::Free()
|
|||||||
{
|
{
|
||||||
__super::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_pSmoke);
|
||||||
SAFE_RELEASE(m_pGoblin_Particle);
|
SAFE_RELEASE(m_pGoblin_Particle);
|
||||||
SAFE_RELEASE(m_pGoblin_Particle2);
|
SAFE_RELEASE(m_pGoblin_Particle2);
|
||||||
Safe_Delete(m_pCallBack_Behavior);
|
SAFE_RELEASE(m_pGoblin);
|
||||||
Safe_Delete(m_pCallBack_HitReport);
|
|
||||||
}
|
}
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
|
|
||||||
void CGoblin_Spector::Describe_Entity()
|
void CGoblin_Spector::Describe_Entity()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
GUI::Begin("GoblinSpector");
|
||||||
|
_float3 vScale = m_pTransformCom->Get_Scale();
|
||||||
|
GUI::DragFloat3("Scale", (_float*)&vScale);
|
||||||
|
|
||||||
|
GUI::End();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // _DEBUG
|
#endif // _DEBUG
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ void CGoblin::Behavior_IdleEnter()
|
|||||||
|
|
||||||
HRESULT CGoblin::Behavior_IdleExitCheck()
|
HRESULT CGoblin::Behavior_IdleExitCheck()
|
||||||
{
|
{
|
||||||
if (m_fTargetDistance <= 20.f && m_fTargetDistance >=1.f)
|
if (m_fTargetDistance <= 20.f && m_fTargetDistance != 0.f)
|
||||||
{
|
{
|
||||||
m_vOriginPos = m_pTransformCom->Get_State(STATE::POSITION);
|
m_vOriginPos = m_pTransformCom->Get_State(STATE::POSITION);
|
||||||
m_pFSM->Change_State(FSMSTATE::MOVE);
|
m_pFSM->Change_State(FSMSTATE::MOVE);
|
||||||
@@ -49,21 +49,68 @@ void CGoblin::Behavior_MoveEnter()
|
|||||||
{
|
{
|
||||||
pair<_uint, _bool> pairAnimInfo = {};
|
pair<_uint, _bool> pairAnimInfo = {};
|
||||||
m_pFSM->Enable_State(FSMSTATE::MOVE);
|
m_pFSM->Enable_State(FSMSTATE::MOVE);
|
||||||
|
m_bLookAt = true;
|
||||||
m_pFSM->Enable_State(FSMSTATE::JOG);
|
m_pFSM->Enable_State(FSMSTATE::JOG);
|
||||||
|
|
||||||
pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
|
|
||||||
|
|
||||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT CGoblin::Behavior_MoveExitCheck()
|
HRESULT CGoblin::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||||
{
|
{
|
||||||
pair<_uint, _bool> pairAnimInfo = {};
|
pair<_uint, _bool> pairAnimInfo = {};
|
||||||
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||||
|
|
||||||
if (m_fTargetDistance <= 15.f && m_fTargetDistance >=1.f)
|
|
||||||
|
if (m_fTargetDistance >= 7.f)
|
||||||
|
{
|
||||||
|
pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
|
||||||
|
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (!m_bFirstMove)
|
||||||
|
{
|
||||||
|
_uint Rand = m_pGameInstance->Real_Random_Int(0, 3);
|
||||||
|
|
||||||
|
switch (Rand)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
pairAnimInfo = m_Animation[STATEANIM::JOG_112_L];
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
pairAnimInfo = m_Animation[STATEANIM::JOG_112_R];
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
if (iCurrAnimIndex == m_Animation[STATEANIM::JOG_90_R].first) {
|
||||||
|
pairAnimInfo = m_Animation[STATEANIM::JOG_112_L];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
pairAnimInfo = m_Animation[STATEANIM::JOG_90_L];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
if (iCurrAnimIndex == m_Animation[STATEANIM::JOG_90_L].first) {
|
||||||
|
pairAnimInfo = m_Animation[STATEANIM::JOG_112_R];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
pairAnimInfo = m_Animation[STATEANIM::JOG_90_R];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 0.5f, true);
|
||||||
|
|
||||||
|
m_bFirstMove = true;
|
||||||
|
m_fMoveTime = 0.f;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
m_fMoveTime += fTimeDelta;
|
||||||
|
|
||||||
|
if (m_fMoveTime >= 1.5f)
|
||||||
|
{
|
||||||
|
m_bFirstMove = false;
|
||||||
|
m_fMoveTime = 0.f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_fTargetDistance <= 15.f && m_fTargetDistance >= 3.f && m_fTargetDistance !=0.f)
|
||||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||||
|
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
@@ -96,7 +143,7 @@ HRESULT CGoblin::Behavior_CombatExitCheck(_float fTimeDelta)
|
|||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_fTargetDistance <= 7.f && m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::SWING)] <= 0.f)
|
if (m_fTargetDistance <= 5.f && m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::SWING)] <= 0.f)
|
||||||
{
|
{
|
||||||
m_pFSM->Change_State(FSMSTATE::SWING);
|
m_pFSM->Change_State(FSMSTATE::SWING);
|
||||||
}
|
}
|
||||||
@@ -126,6 +173,7 @@ void CGoblin::Behavior_SwingEnter()
|
|||||||
m_pFSM->Enable_State(FSMSTATE::SWING);
|
m_pFSM->Enable_State(FSMSTATE::SWING);
|
||||||
|
|
||||||
pairAnimInfo = m_Animation[STATEANIM::SWING_FWD];
|
pairAnimInfo = m_Animation[STATEANIM::SWING_FWD];
|
||||||
|
|
||||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||||
m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::SWING)] = m_fMaxSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::SWING)];
|
m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::SWING)] = m_fMaxSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::SWING)];
|
||||||
|
|
||||||
@@ -133,11 +181,16 @@ void CGoblin::Behavior_SwingEnter()
|
|||||||
[this]() {m_bStep = false; },
|
[this]() {m_bStep = false; },
|
||||||
0.2f);
|
0.2f);
|
||||||
|
|
||||||
|
Add_Event(pairAnimInfo.first,
|
||||||
|
[this]() {m_bSwing = true; },
|
||||||
|
0.05f);
|
||||||
|
|
||||||
Add_Event(pairAnimInfo.first,
|
Add_Event(pairAnimInfo.first,
|
||||||
[&]() { m_bLookAt = true;
|
[&]() { m_bLookAt = true;
|
||||||
m_bStep = true;
|
m_bStep = true;
|
||||||
|
m_bSwing = false;
|
||||||
m_pFSM->Change_State(FSMSTATE::SHUFFLE); },
|
m_pFSM->Change_State(FSMSTATE::SHUFFLE); },
|
||||||
0.4f);
|
0.45f);
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT CGoblin::Behavior_SwingExitCheck(_float fTimeDelta)
|
HRESULT CGoblin::Behavior_SwingExitCheck(_float fTimeDelta)
|
||||||
@@ -146,7 +199,7 @@ HRESULT CGoblin::Behavior_SwingExitCheck(_float fTimeDelta)
|
|||||||
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||||
if (m_pFSM->IsEnable(FSMSTATE::SWING) && m_bStep)
|
if (m_pFSM->IsEnable(FSMSTATE::SWING) && m_bStep)
|
||||||
{
|
{
|
||||||
_float fDesiredRange = 1.f;
|
_float fDesiredRange = 2.f;
|
||||||
_float dist = m_fTargetDistance;
|
_float dist = m_fTargetDistance;
|
||||||
|
|
||||||
if (dist > fDesiredRange)
|
if (dist > fDesiredRange)
|
||||||
@@ -228,7 +281,7 @@ void CGoblin::Behavior_BlinkEnter()
|
|||||||
_matrix rot = XMMatrixRotationY(randAngleRad);
|
_matrix rot = XMMatrixRotationY(randAngleRad);
|
||||||
_vector offsetDir = XMVector3TransformNormal(vPlayerLook, rot);
|
_vector offsetDir = XMVector3TransformNormal(vPlayerLook, rot);
|
||||||
|
|
||||||
_float randDist = m_pGameInstance->Real_Random_Float(1.f, 1.5f);
|
_float randDist = m_pGameInstance->Real_Random_Float(5.f, 5.5f);
|
||||||
|
|
||||||
_vector vFinalPos = vPlayerPos + offsetDir * randDist;
|
_vector vFinalPos = vPlayerPos + offsetDir * randDist;
|
||||||
|
|
||||||
@@ -290,7 +343,7 @@ void CGoblin::Behavior_ShuffleEnter()
|
|||||||
Add_Event(pairAnimInfo.first,
|
Add_Event(pairAnimInfo.first,
|
||||||
[this]() {
|
[this]() {
|
||||||
m_pFSM->Change_State(FSMSTATE::COMBAT); },
|
m_pFSM->Change_State(FSMSTATE::COMBAT); },
|
||||||
0.2f);
|
0.25f);
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT CGoblin::Behavior_ShuffleExitCheck(_float fTimeDelta)
|
HRESULT CGoblin::Behavior_ShuffleExitCheck(_float fTimeDelta)
|
||||||
@@ -456,7 +509,7 @@ void CGoblin::Add_FSM()
|
|||||||
CState_Move::STATE_MOVE_DESC Desc{};
|
CState_Move::STATE_MOVE_DESC Desc{};
|
||||||
Desc.pOwner = this;
|
Desc.pOwner = this;
|
||||||
Desc.funcEnterEvent = [this]() { Behavior_MoveEnter(); };
|
Desc.funcEnterEvent = [this]() { Behavior_MoveEnter(); };
|
||||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_MoveExitCheck(); };
|
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_MoveExitCheck(fTimedelta); };
|
||||||
Desc.funcExitEvent = [this]() { Behavior_MoveExit(); };
|
Desc.funcExitEvent = [this]() { Behavior_MoveExit(); };
|
||||||
Desc.funcPriorityUpdate = nullptr;
|
Desc.funcPriorityUpdate = nullptr;
|
||||||
Desc.funcLateUpdate = nullptr;
|
Desc.funcLateUpdate = nullptr;
|
||||||
@@ -559,6 +612,10 @@ void CGoblin::Set_Anim()
|
|||||||
m_Animation[STATEANIM::JOG_FWD] = { 147,true }; // 147
|
m_Animation[STATEANIM::JOG_FWD] = { 147,true }; // 147
|
||||||
m_Animation[STATEANIM::JOG_START] = { 157,false };
|
m_Animation[STATEANIM::JOG_START] = { 157,false };
|
||||||
m_Animation[STATEANIM::JOG_BWD] = { 146,false };
|
m_Animation[STATEANIM::JOG_BWD] = { 146,false };
|
||||||
|
m_Animation[STATEANIM::JOG_112_L] = { 148,true };
|
||||||
|
m_Animation[STATEANIM::JOG_112_R] = { 152,true };
|
||||||
|
m_Animation[STATEANIM::JOG_90_L] = { 151,true };
|
||||||
|
m_Animation[STATEANIM::JOG_90_R] = { 155,true };
|
||||||
|
|
||||||
m_Animation[STATEANIM::SHUFFLE1] = { 203,false };
|
m_Animation[STATEANIM::SHUFFLE1] = { 203,false };
|
||||||
m_Animation[STATEANIM::SHUFFLE2] = { 204,false };
|
m_Animation[STATEANIM::SHUFFLE2] = { 204,false };
|
||||||
@@ -654,5 +711,9 @@ void CGoblin::Set_Anim()
|
|||||||
|
|
||||||
//Jog 112도 L 148
|
//Jog 112도 L 148
|
||||||
//Jog 112도 R 152
|
//Jog 112도 R 152
|
||||||
|
// Jog 90 L 151
|
||||||
|
// Jog 90 R 155
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -385,9 +385,7 @@ HRESULT CLevel_GamePlay::Ready_Layer_Monster()
|
|||||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CGoblin_Mage>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
|
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CGoblin_Mage>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CGoblin_Spector>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
|
|
||||||
return E_FAIL;
|
|
||||||
}
|
|
||||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CTroll>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
|
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CTroll>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
#include "Troll_Rock.h"
|
#include "Troll_Rock.h"
|
||||||
#include "Goblin_Dagger.h"
|
#include "Goblin_Dagger.h"
|
||||||
#include "Wand.h"
|
#include "Wand.h"
|
||||||
|
#include "Goblin_BattleAxe.h"
|
||||||
|
|
||||||
#pragma region ACTOR
|
#pragma region ACTOR
|
||||||
|
|
||||||
@@ -1368,7 +1369,11 @@ HRESULT CLoader::Loading_For_GamePlay()
|
|||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
|
||||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_Dagger_Model"),
|
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_Dagger_Model"),
|
||||||
CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Object/Goblin_Dagger/Goblin_Dagger.bin", XMMatrixScaling(0.0002f, 0.0002f, 0.0002f) * XMMatrixRotationX(XMConvertToRadians(90.f)) * XMMatrixIdentity()))))
|
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Goblin_Dagger/SK_WPN_GOB_SmallSword.bin", XMMatrixIdentity()))))
|
||||||
|
return E_FAIL;
|
||||||
|
|
||||||
|
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_BattleAxe_Model"),
|
||||||
|
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Goblin_BattleAxe/SK_WPN_GOB_BattleAxe01.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
|
||||||
|
|
||||||
@@ -1905,6 +1910,10 @@ HRESULT CLoader::Loading_For_GamePlay()
|
|||||||
if (FAILED(m_pGameInstance->Add_Prototype<CGoblin_Dagger>(g_iStaticLevel, CGoblin_Dagger::Create(m_pDevice, m_pContext))))
|
if (FAILED(m_pGameInstance->Add_Prototype<CGoblin_Dagger>(g_iStaticLevel, CGoblin_Dagger::Create(m_pDevice, m_pContext))))
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
|
||||||
|
/* For.Prototype_GameObject_Goblin_BattleAxe */
|
||||||
|
if (FAILED(m_pGameInstance->Add_Prototype<CGoblin_BattleAxe>(g_iStaticLevel, CGoblin_BattleAxe::Create(m_pDevice, m_pContext))))
|
||||||
|
return E_FAIL;
|
||||||
|
|
||||||
/* For.Prototype_GameObject_Broom */
|
/* For.Prototype_GameObject_Broom */
|
||||||
if (FAILED(m_pGameInstance->Add_Prototype<CBroom>(g_iStaticLevel, CBroom::Create(m_pDevice, m_pContext))))
|
if (FAILED(m_pGameInstance->Add_Prototype<CBroom>(g_iStaticLevel, CBroom::Create(m_pDevice, m_pContext))))
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
|||||||
@@ -571,6 +571,7 @@ void CPlayer::Describe_Entity()
|
|||||||
|
|
||||||
GUI::Text("AnimTrack %.2f", m_pModelCom->Get_CurrentTrackPosition());
|
GUI::Text("AnimTrack %.2f", m_pModelCom->Get_CurrentTrackPosition());
|
||||||
GUI::Text("AnimRatio %.2f", m_pModelCom->Get_CurrentTrackProgressRatio());
|
GUI::Text("AnimRatio %.2f", m_pModelCom->Get_CurrentTrackProgressRatio());
|
||||||
|
GUI::Text("AnimSpeed %.2f", m_pModelCom->Get_AnimSpeed());
|
||||||
|
|
||||||
GUI::Checkbox("Render", &m_bVisible);
|
GUI::Checkbox("Render", &m_bVisible);
|
||||||
|
|
||||||
|
|||||||
@@ -518,6 +518,7 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
pairAnimInfo = m_Animation[STATEANIM::JOG_LEFT];
|
pairAnimInfo = m_Animation[STATEANIM::JOG_LEFT];
|
||||||
|
m_fAnimSpeed = 1.2f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -525,7 +526,7 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
|
|||||||
pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
|
pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
|
||||||
}
|
}
|
||||||
|
|
||||||
m_fAmount = 0.5f;
|
m_fAmount = 0.3f;
|
||||||
m_bRatio = true;
|
m_bRatio = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -550,6 +551,7 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
pairAnimInfo = m_Animation[STATEANIM::JOG_RIGHT];
|
pairAnimInfo = m_Animation[STATEANIM::JOG_RIGHT];
|
||||||
|
m_fAnimSpeed = 1.2f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -557,7 +559,7 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
|
|||||||
pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
|
pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
|
||||||
}
|
}
|
||||||
|
|
||||||
m_fAmount = 0.5f;
|
m_fAmount = 0.3f;
|
||||||
m_bRatio = true;
|
m_bRatio = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -575,6 +577,7 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
pairAnimInfo = m_Animation[STATEANIM::JOG_BWD];
|
pairAnimInfo = m_Animation[STATEANIM::JOG_BWD];
|
||||||
|
m_fAnimSpeed = 1.2f;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -586,12 +589,13 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
|
|||||||
pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
|
pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
|
||||||
}
|
}
|
||||||
|
|
||||||
m_fAmount = 0.5f;
|
m_fAmount = 0.3f;
|
||||||
m_bRatio = true;
|
m_bRatio = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, m_fAmount, m_bRatio);
|
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, m_fAmount, m_bRatio, m_fAnimSpeed);
|
||||||
m_fAmount = 1.f;
|
m_fAmount = 1.f;
|
||||||
|
m_fAnimSpeed = 1.f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -607,11 +611,13 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
|
|||||||
m_pFSM->Enable_State(FSMSTATE::STOP);
|
m_pFSM->Enable_State(FSMSTATE::STOP);
|
||||||
if (m_pFSM->IsEnable(FSMSTATE::WALK)) {
|
if (m_pFSM->IsEnable(FSMSTATE::WALK)) {
|
||||||
m_bWalkToggle = false;
|
m_bWalkToggle = false;
|
||||||
|
m_pFSM->Disable_State(FSMSTATE::WALK);
|
||||||
pairAnimInfo = m_Animation[STATEANIM::WALK_STOP];
|
pairAnimInfo = m_Animation[STATEANIM::WALK_STOP];
|
||||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||||
}
|
}
|
||||||
else if (m_pFSM->IsEnable(FSMSTATE::SPRINT)) {
|
else if (m_pFSM->IsEnable(FSMSTATE::SPRINT)) {
|
||||||
m_bSprintToggle = false;
|
m_bSprintToggle = false;
|
||||||
|
m_pFSM->Disable_State(FSMSTATE::SPRINT);
|
||||||
pairAnimInfo = m_Animation[STATEANIM::JOG_STOP];
|
pairAnimInfo = m_Animation[STATEANIM::JOG_STOP];
|
||||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,6 +106,8 @@ void CTroll::Update(_float fTimeDelta)
|
|||||||
for (_uint i = 0; i < ENUM_CLASS(TROLL_SKILL::END); i++)
|
for (_uint i = 0; i < ENUM_CLASS(TROLL_SKILL::END); i++)
|
||||||
m_fSkillCoolTime[i] = max(0.f, m_fSkillCoolTime[i] - fTimeDelta);
|
m_fSkillCoolTime[i] = max(0.f, m_fSkillCoolTime[i] - fTimeDelta);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -267,15 +267,18 @@ HRESULT CTroll::Behavior_RushExitCheck(_float fTimeDelta)
|
|||||||
}
|
}
|
||||||
if (iCurrAnimIndex == m_Animation[STATEANIM::RUSH_END].first)
|
if (iCurrAnimIndex == m_Animation[STATEANIM::RUSH_END].first)
|
||||||
{
|
{
|
||||||
if (m_fCross > 0)
|
if (m_fDegree >= 90.f)
|
||||||
pairAnimInfo = m_Animation[STATEANIM::IDLE_COMBAT_TURN_BWD_L];
|
{
|
||||||
else
|
if (m_fCross > 0)
|
||||||
pairAnimInfo = m_Animation[STATEANIM::IDLE_COMBAT_TURN_BWD_R];
|
pairAnimInfo = m_Animation[STATEANIM::IDLE_COMBAT_TURN_BWD_L];
|
||||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
else
|
||||||
|
pairAnimInfo = m_Animation[STATEANIM::IDLE_COMBAT_TURN_BWD_R];
|
||||||
|
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||||
|
|
||||||
Add_Event(pairAnimInfo.first,
|
Add_Event(pairAnimInfo.first,
|
||||||
[this]() {m_bLookAt = true; },
|
[this]() {m_bLookAt = true; },
|
||||||
0.3f);
|
0.3f);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_pModelCom->IsFinishedAnim())
|
if (m_pModelCom->IsFinishedAnim())
|
||||||
@@ -346,8 +349,8 @@ void CTroll::Behavior_SwingEnter()
|
|||||||
m_pFSM->Enable_State(FSMSTATE::SWING);
|
m_pFSM->Enable_State(FSMSTATE::SWING);
|
||||||
|
|
||||||
pairAnimInfo = m_Animation[STATEANIM::SWING_FWD];
|
pairAnimInfo = m_Animation[STATEANIM::SWING_FWD];
|
||||||
|
|
||||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||||
|
|
||||||
m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SWING)] =
|
m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SWING)] =
|
||||||
m_fMaxSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SWING)];
|
m_fMaxSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SWING)];
|
||||||
|
|
||||||
@@ -382,8 +385,8 @@ void CTroll::Behavior_SlamEnter()
|
|||||||
m_pFSM->Enable_State(FSMSTATE::SLAM);
|
m_pFSM->Enable_State(FSMSTATE::SLAM);
|
||||||
|
|
||||||
pairAnimInfo = m_Animation[STATEANIM::SLAM];
|
pairAnimInfo = m_Animation[STATEANIM::SLAM];
|
||||||
|
|
||||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||||
|
|
||||||
m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SLAM)] =
|
m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SLAM)] =
|
||||||
m_fMaxSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SLAM)];
|
m_fMaxSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SLAM)];
|
||||||
|
|
||||||
@@ -414,8 +417,10 @@ void CTroll::Behavior_BackHandSwingEnter()
|
|||||||
{
|
{
|
||||||
pair<_uint, _bool> pairAnimInfo = {};
|
pair<_uint, _bool> pairAnimInfo = {};
|
||||||
m_pFSM->Enable_State(FSMSTATE::BACKHAND_SWING);
|
m_pFSM->Enable_State(FSMSTATE::BACKHAND_SWING);
|
||||||
|
|
||||||
pairAnimInfo = m_Animation[STATEANIM::BACKHAND_SWING_JOG];
|
pairAnimInfo = m_Animation[STATEANIM::BACKHAND_SWING_JOG];
|
||||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||||
|
|
||||||
m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::BACKHAND_SWING)] =
|
m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::BACKHAND_SWING)] =
|
||||||
m_fMaxSkillCoolTime[ENUM_CLASS(TROLL_SKILL::BACKHAND_SWING)];
|
m_fMaxSkillCoolTime[ENUM_CLASS(TROLL_SKILL::BACKHAND_SWING)];
|
||||||
|
|
||||||
@@ -622,10 +627,10 @@ void CTroll::Set_Anim()
|
|||||||
m_Animation[STATEANIM::IDLE] = { 16,true };
|
m_Animation[STATEANIM::IDLE] = { 16,true };
|
||||||
m_Animation[STATEANIM::IDLE_COMBAT_TURN_BWD_R] = { 7,false };
|
m_Animation[STATEANIM::IDLE_COMBAT_TURN_BWD_R] = { 7,false };
|
||||||
m_Animation[STATEANIM::IDLE_COMBAT_TURN_BWD_L] = { 8,false };
|
m_Animation[STATEANIM::IDLE_COMBAT_TURN_BWD_L] = { 8,false };
|
||||||
m_Animation[STATEANIM::IDLE_BREAK1] = { 11,false };
|
m_Animation[STATEANIM::IDLE_BREAK1] = { 11,false }; // 땅2번구르기
|
||||||
m_Animation[STATEANIM::IDLE_BREAK2] = { 141,false };
|
m_Animation[STATEANIM::IDLE_BREAK2] = { 141,false }; // 방망이
|
||||||
m_Animation[STATEANIM::IDLE_BREAK3] = { 14,false };
|
m_Animation[STATEANIM::IDLE_BREAK3] = { 14,false }; // 땅구르기
|
||||||
m_Animation[STATEANIM::IDLE_BREAK4] = { 143,false };
|
m_Animation[STATEANIM::IDLE_BREAK4] = { 143,false }; // 소리지르기
|
||||||
|
|
||||||
m_Animation[STATEANIM::WALK_FWD] = { 22,true };
|
m_Animation[STATEANIM::WALK_FWD] = { 22,true };
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ class CGoblin final : public CMonster
|
|||||||
virtual _vector Get_LockOnPos() override;
|
virtual _vector Get_LockOnPos() override;
|
||||||
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr)override;
|
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr)override;
|
||||||
virtual void OnHit(CGameObject* pOther, CGameObject* pCaller = nullptr)override;
|
virtual void OnHit(CGameObject* pOther, CGameObject* pCaller = nullptr)override;
|
||||||
|
_bool Get_Swing() { return m_bSwing; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CCallBack_Monster_Behavior* m_pCallBack_Behavior = { nullptr };
|
CCallBack_Monster_Behavior* m_pCallBack_Behavior = { nullptr };
|
||||||
@@ -66,20 +66,23 @@ class CGoblin final : public CMonster
|
|||||||
virtual void Set_Anim();
|
virtual void Set_Anim();
|
||||||
|
|
||||||
_float m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::END)] = {};
|
_float m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::END)] = {};
|
||||||
_float m_fMaxSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::END)] = { 5.f,2.f,15.f };
|
_float m_fMaxSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::END)] = { 6.f,2.f,15.f };
|
||||||
|
|
||||||
_bool m_bStep = { false };
|
_bool m_bStep = { false };
|
||||||
_float m_fTpTime = {};
|
_float m_fTpTime = {};
|
||||||
_float m_fAirTime = {};
|
_float m_fAirTime = {};
|
||||||
_vector m_vOriginPos = {};
|
_vector m_vOriginPos = {};
|
||||||
_float m_fLength = {};
|
_float m_fLength = {};
|
||||||
|
_bool m_bSwing = { false };
|
||||||
|
_float m_fMoveTime = {};
|
||||||
|
_bool m_bFirstMove = {};
|
||||||
|
|
||||||
void Behavior_IdleEnter();
|
void Behavior_IdleEnter();
|
||||||
HRESULT Behavior_IdleExitCheck();
|
HRESULT Behavior_IdleExitCheck();
|
||||||
void Behavior_IdleExit();
|
void Behavior_IdleExit();
|
||||||
|
|
||||||
void Behavior_MoveEnter();
|
void Behavior_MoveEnter();
|
||||||
HRESULT Behavior_MoveExitCheck();
|
HRESULT Behavior_MoveExitCheck(_float fTimeDelta);
|
||||||
void Behavior_MoveExit();
|
void Behavior_MoveExit();
|
||||||
|
|
||||||
void Behavior_CombatEnter();
|
void Behavior_CombatEnter();
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Client_Define.h"
|
||||||
|
#include "PartObject.h"
|
||||||
|
|
||||||
|
NS_BEGIN(Client)
|
||||||
|
|
||||||
|
class CGoblin_BattleAxe final : public CPartObject
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
typedef struct tagGoblinBattleAxe : public CPartObject::PARTOBJECT_DESC
|
||||||
|
{
|
||||||
|
const _float4x4* pSocketMatrices = { };
|
||||||
|
}GOBLIN_BATTLEAXE_DESC;
|
||||||
|
private:
|
||||||
|
CGoblin_BattleAxe(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||||
|
CGoblin_BattleAxe(const CGoblin_BattleAxe& Prototype);
|
||||||
|
virtual ~CGoblin_BattleAxe() = 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 CGoblin_BattleAxe* 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
|
||||||
@@ -5,10 +5,19 @@
|
|||||||
#include "CallBack_Monster_Behavior.h"
|
#include "CallBack_Monster_Behavior.h"
|
||||||
#include "CallBack_Monster_HitReport.h"
|
#include "CallBack_Monster_HitReport.h"
|
||||||
|
|
||||||
|
NS_BEGIN(Engine)
|
||||||
|
class CTransform;
|
||||||
|
NS_END
|
||||||
|
|
||||||
NS_BEGIN(Client)
|
NS_BEGIN(Client)
|
||||||
|
|
||||||
class CGoblin_Spector final : public CMonster
|
class CGoblin_Spector final : public CMonster
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
|
typedef struct tagSpector
|
||||||
|
{
|
||||||
|
CTransform* pParentTransform = { nullptr };
|
||||||
|
}GOBLIN_SPECTOR_DESC;
|
||||||
private:
|
private:
|
||||||
CGoblin_Spector(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
CGoblin_Spector(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||||
CGoblin_Spector(const CGoblin_Spector& Prototype);
|
CGoblin_Spector(const CGoblin_Spector& Prototype);
|
||||||
@@ -19,19 +28,18 @@ class CGoblin_Spector final : public CMonster
|
|||||||
virtual void Update(_float fTimeDelta) override;
|
virtual void Update(_float fTimeDelta) override;
|
||||||
virtual void Late_Update(_float fTimeDelta) override;
|
virtual void Late_Update(_float fTimeDelta) override;
|
||||||
virtual HRESULT Render() override;
|
virtual HRESULT Render() override;
|
||||||
virtual _vector Get_LockOnPos() override;
|
|
||||||
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr)override;
|
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr)override;
|
||||||
virtual void OnHit(CGameObject* pOther, CGameObject* pCaller = nullptr)override;
|
virtual void OnHit(CGameObject* pOther, CGameObject* pCaller = nullptr)override;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CCallBack_Monster_Behavior* m_pCallBack_Behavior = { nullptr };
|
class CGoblin* m_pGoblin = { nullptr };
|
||||||
CCallBack_Monster_HitReport* m_pCallBack_HitReport = { nullptr };
|
CTransform* m_pParentTransformCom = { nullptr };
|
||||||
|
|
||||||
CCharacter_Controller* m_pCharacter_Controller = { nullptr };
|
|
||||||
CRigidBody_Dynamic* m_pRigidBody = { nullptr };
|
|
||||||
_float2 m_vStunTimer = { 0.f, 4.f };
|
|
||||||
_uint iIndex;
|
_uint iIndex;
|
||||||
|
_float3 m_Offset = {};
|
||||||
|
_float3 m_vOriginScale = {};
|
||||||
|
_float3 m_vScale = { 1.f, 1.f, 1.f };
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class CEffectParts* m_pSmoke = { nullptr };
|
class CEffectParts* m_pSmoke = { nullptr };
|
||||||
@@ -54,6 +62,13 @@ class CGoblin_Spector final : public CMonster
|
|||||||
|
|
||||||
#endif // _DEBUG
|
#endif // _DEBUG
|
||||||
|
|
||||||
|
|
||||||
|
_bool m_bStep = { false };
|
||||||
|
_float m_fTpTime = {};
|
||||||
|
_float m_fAirTime = {};
|
||||||
|
_vector m_vOriginPos = {};
|
||||||
|
_float m_fLength = {};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
NS_END
|
NS_END
|
||||||
|
|||||||
@@ -105,6 +105,7 @@ class CPlayer final : public CUnit
|
|||||||
_float m_fInputTime = {};
|
_float m_fInputTime = {};
|
||||||
_bool m_bRatio = { false };
|
_bool m_bRatio = { false };
|
||||||
_bool m_bAim = { false };
|
_bool m_bAim = { false };
|
||||||
|
_float m_fAnimSpeed = {};
|
||||||
|
|
||||||
HRESULT InputAction();
|
HRESULT InputAction();
|
||||||
HRESULT InputMove();
|
HRESULT InputMove();
|
||||||
|
|||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -472,20 +472,14 @@ PS_OUT PS_SPECTOR_MAIN(PS_IN In)
|
|||||||
|
|
||||||
float4 vMtrlDiffuse = g_EmissiveTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
|
float4 vMtrlDiffuse = g_EmissiveTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
|
||||||
float4 vSurface = g_SurfaceParamsTexture.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)
|
if (vMtrlDiffuse.a < 0.2f)
|
||||||
{
|
{
|
||||||
discard;
|
discard;
|
||||||
}
|
}
|
||||||
|
if (vMtrlDiffuse.r > 0.3f)
|
||||||
|
{
|
||||||
|
vMtrlDiffuse.rgb *= float3(2.f, 1.f, 1.f);
|
||||||
|
}
|
||||||
|
|
||||||
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, AnisoTropy_BLUR_Sampler, In.vTexcoord);
|
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, AnisoTropy_BLUR_Sampler, In.vTexcoord);
|
||||||
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
|
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
|
||||||
|
|||||||
@@ -2030,8 +2030,8 @@ HRESULT CLoader::Loading_For_ObjectViewer()
|
|||||||
m_strMessage = TEXT("Model Loading..");
|
m_strMessage = TEXT("Model Loading..");
|
||||||
|
|
||||||
|
|
||||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_SK_WPN_Troll_Club07_Model"),
|
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_SK_WPN_GOB_SmallSword_Model"),
|
||||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM_LOCAL, "C:/MeshTable\\Game\\RiggedObjects\\Props\\Weapons\\Troll\\SK_WPN_Troll_Club07.fbx", XMMatrixIdentity())))) {
|
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM_LOCAL, "C:/MeshTable\\Game\\RiggedObjects\\Props\\Weapons\\Goblins\\SK_WPN_GOB_SmallSword.fbx", XMMatrixIdentity())))) {
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -307,7 +307,7 @@ _bool CModel::Play_Dual_Anim(_float fTimeDelta, CTransform* pTransform)
|
|||||||
return m_bIsFinishedAnim;
|
return m_bIsFinishedAnim;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CModel::Set_AnimationIndex(_uint iIndex, _bool isLoop, _float fAmount, _bool bRatio)
|
void CModel::Set_AnimationIndex(_uint iIndex, _bool isLoop, _float fAmount, _bool bRatio, _float fAnimSpeed)
|
||||||
{
|
{
|
||||||
if (m_iCurrentAnimIndex == iIndex)
|
if (m_iCurrentAnimIndex == iIndex)
|
||||||
return;
|
return;
|
||||||
@@ -324,7 +324,7 @@ void CModel::Set_AnimationIndex(_uint iIndex, _bool isLoop, _float fAmount, _boo
|
|||||||
m_iPreAnimIndex = m_iCurrentAnimIndex;
|
m_iPreAnimIndex = m_iCurrentAnimIndex;
|
||||||
|
|
||||||
m_Animations[m_iCurrentAnimIndex]->Depart_Animation();
|
m_Animations[m_iCurrentAnimIndex]->Depart_Animation();
|
||||||
m_Animations[m_iCurrentAnimIndex]->ResetRootMotion();
|
m_Animations[m_iCurrentAnimIndex]->Set_AnimSpeed(1.f);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_fBlendTime = 0.f;
|
m_fBlendTime = 0.f;
|
||||||
@@ -336,7 +336,7 @@ void CModel::Set_AnimationIndex(_uint iIndex, _bool isLoop, _float fAmount, _boo
|
|||||||
m_bRatio = bRatio;
|
m_bRatio = bRatio;
|
||||||
|
|
||||||
m_Animations[m_iCurrentAnimIndex]->Depart_Animation();
|
m_Animations[m_iCurrentAnimIndex]->Depart_Animation();
|
||||||
m_Animations[m_iCurrentAnimIndex]->ResetRootMotion();
|
m_Animations[m_iCurrentAnimIndex]->Set_AnimSpeed(fAnimSpeed);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ class ENGINE_DLL CModel final : public CComponent
|
|||||||
_bool Play_Animation(_float fTimeDelta, class CTransform* pTransform = nullptr); // 애니메이션에 델타타임을 넣어줌
|
_bool Play_Animation(_float fTimeDelta, class CTransform* pTransform = nullptr); // 애니메이션에 델타타임을 넣어줌
|
||||||
_bool Play_Anim(_float fTimeDelta, CTransform* pTransform);
|
_bool Play_Anim(_float fTimeDelta, CTransform* pTransform);
|
||||||
_bool Play_Dual_Anim(_float fTimeDelta, CTransform* pTransform);
|
_bool Play_Dual_Anim(_float fTimeDelta, CTransform* pTransform);
|
||||||
void Set_AnimationIndex(_uint iIndex, _bool isLoop = true, _float fAmount = 1.f, _bool bRatio = false);
|
void Set_AnimationIndex(_uint iIndex, _bool isLoop = true, _float fAmount = 1.f, _bool bRatio = false,_float fAnimSpeed = 1.f);
|
||||||
void Set_Second_AnimationIndex(_uint iIndex, _uint BoneIndex, _bool isLoop = false);
|
void Set_Second_AnimationIndex(_uint iIndex, _uint BoneIndex, _bool isLoop = false);
|
||||||
_bool IsFinishedAnim() const { return m_bIsFinishedAnim; }
|
_bool IsFinishedAnim() const { return m_bIsFinishedAnim; }
|
||||||
_bool IsFinishedSecondAnim() const { return m_bIsSecondFinishedAnim; }
|
_bool IsFinishedSecondAnim() const { return m_bIsSecondFinishedAnim; }
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ enum ESTATE
|
|||||||
IDLE,IDLE_AIM, IDLE_TURN_L, IDLE_TURN_R, IDLE_TURN_BWD, IDLE_COMBAT_TURN_BWD_L, IDLE_COMBAT_TURN_BWD_R,IDLE_BREAK1,IDLE_BREAK2,IDLE_BREAK3,IDLE_BREAK4,
|
IDLE,IDLE_AIM, IDLE_TURN_L, IDLE_TURN_R, IDLE_TURN_BWD, IDLE_COMBAT_TURN_BWD_L, IDLE_COMBAT_TURN_BWD_R,IDLE_BREAK1,IDLE_BREAK2,IDLE_BREAK3,IDLE_BREAK4,
|
||||||
MOVE,
|
MOVE,
|
||||||
WALK, WALK_FWD,WALK_RIGHT,WALK_LEFT, WALK_BWD,WALK_START,WALK_STOP,
|
WALK, WALK_FWD,WALK_RIGHT,WALK_LEFT, WALK_BWD,WALK_START,WALK_STOP,
|
||||||
JOG,JOG_START, JOG_FWD, JOG_RIGHT, JOG_LEFT, JOG_BWD, JOG_STOP, JOG_AIM_LEFT, JOG_AIM_RIGHT, JOG_AIM_BWD, JOG_AIM_STOP_L, JOG_AIM_STOP_R, JOG_AIM_STOP_BWD,JOG_LEFT_TURN,JOG_RIGHT_TURN,
|
JOG,JOG_START, JOG_FWD, JOG_RIGHT, JOG_LEFT, JOG_BWD, JOG_STOP, JOG_AIM_LEFT, JOG_AIM_RIGHT, JOG_AIM_BWD, JOG_AIM_STOP_L, JOG_AIM_STOP_R, JOG_AIM_STOP_BWD,JOG_LEFT_TURN,JOG_RIGHT_TURN,JOG_112_L,JOG_112_R,JOG_90_L,JOG_90_R,
|
||||||
SPRINT,
|
SPRINT,
|
||||||
JUMP,JUMP_JOG,JUMP_SPRINT,
|
JUMP,JUMP_JOG,JUMP_SPRINT,
|
||||||
LAND,
|
LAND,
|
||||||
|
|||||||
Reference in New Issue
Block a user