@@ -163,6 +163,7 @@ call Update_Resources.bat
|
||||
<ClInclude Include="..\Public\Barral_Splesh.h" />
|
||||
<ClInclude Include="..\Public\LightningSide.h" />
|
||||
<ClInclude Include="..\Public\Lightning.h" />
|
||||
<ClInclude Include="..\Public\Blink.h" />
|
||||
<ClInclude Include="..\Public\SpellLearn.h" />
|
||||
<ClInclude Include="..\Public\SpellLearn_Canvas.h" />
|
||||
<ClInclude Include="..\Public\SpellLearn_Data.h" />
|
||||
@@ -382,6 +383,7 @@ call Update_Resources.bat
|
||||
<ClCompile Include="..\Private\Action_Panel.cpp" />
|
||||
<ClCompile Include="..\Private\LightningSide.cpp" />
|
||||
<ClCompile Include="..\Private\Lightning.cpp" />
|
||||
<ClCompile Include="..\Private\Blink.cpp" />
|
||||
<ClCompile Include="..\Private\SpellLearn.cpp" />
|
||||
<ClCompile Include="..\Private\SpellLearn_Canvas.cpp" />
|
||||
<ClCompile Include="..\Private\SpellLearn_Data.cpp" />
|
||||
|
||||
@@ -674,6 +674,9 @@
|
||||
<ClInclude Include="..\Public\SpellLearn_Canvas.h">
|
||||
<Filter>02.GameObjects\UI\SpellLearn_Canvas</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Blink.h">
|
||||
<Filter>02.GameObjects\Effect\Effects\Blink</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\State_Skill2.h">
|
||||
<Filter>04.Mechanic\State\State_Combat\State_Skill2</Filter>
|
||||
</ClInclude>
|
||||
@@ -1410,6 +1413,9 @@
|
||||
<Filter Include="04.Mechanic\Skill\SpellLearn_Data">
|
||||
<UniqueIdentifier>{69f95207-1e94-42f2-9690-d3e34e4ff5a9}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Effect\Effects\Blink">
|
||||
<UniqueIdentifier>{262cc240-d062-406a-9d47-36702fe6b9f3}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\State\State_Combat\State_Skill2">
|
||||
<UniqueIdentifier>{785b1fd0-ef6f-43ab-96fc-e233cd93b29d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@@ -2034,6 +2040,9 @@
|
||||
<ClCompile Include="..\Private\SpellLearn_Canvas.cpp">
|
||||
<Filter>02.GameObjects\UI\SpellLearn_Canvas</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Blink.cpp">
|
||||
<Filter>02.GameObjects\Effect\Effects\Blink</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\State_Skill2.cpp">
|
||||
<Filter>04.Mechanic\State\State_Combat\State_Skill2</Filter>
|
||||
</ClCompile>
|
||||
|
||||
@@ -0,0 +1,295 @@
|
||||
#include "pch.h"
|
||||
#include "Blink.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "EffectParts.h"
|
||||
#include "Player.h"
|
||||
#include "Wand.h"
|
||||
#include "TrailObject.h"
|
||||
|
||||
|
||||
CBlink::CBlink(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CEffect_Container{ pDevice, pContext }
|
||||
{
|
||||
}
|
||||
|
||||
CBlink::CBlink(const CBlink& rhs)
|
||||
: CEffect_Container(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CBlink::Initialize_Prototype()
|
||||
{
|
||||
|
||||
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Blink")))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CBlink::Initialize(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Create_Effect()))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
m_wstrEffectName = L"Blink";
|
||||
|
||||
|
||||
m_pBlink_Swirl = Get_PartObject<CEffectParts>("BlinkSwirl");
|
||||
m_pBlink_Circle = Get_PartObject<CEffectParts>("Blink_Circle");
|
||||
m_pBlink_Circle2 = Get_PartObject<CEffectParts>("Blink_Circle2");
|
||||
m_pBlink_Distortion = Get_PartObject<CEffectParts>("Blink_Distortion");
|
||||
|
||||
for (size_t i = 0; i < 10; i++)
|
||||
{
|
||||
_string strPartsName = "Blink_Trail" + to_string(i);
|
||||
CTrailObject* pTrail = Get_PartObject<CTrailObject>(strPartsName);
|
||||
|
||||
m_Blink_Trails.push_back(pTrail);
|
||||
SAFE_ADDREF(pTrail);
|
||||
}
|
||||
|
||||
m_BoneNames[0] = "SKT_Back";
|
||||
m_BoneNames[1] = "Neck";
|
||||
m_BoneNames[2] = "Spine2";
|
||||
m_BoneNames[3] = "LeftForeArm";
|
||||
m_BoneNames[4] = "Spine";
|
||||
m_BoneNames[5] = "RightArm";
|
||||
m_BoneNames[6] = "LeftArm";
|
||||
m_BoneNames[7] = "RightUpLegTwist1";
|
||||
m_BoneNames[8] = "LeftUpLegTwist1";
|
||||
m_BoneNames[9] = "RightForeArm";
|
||||
|
||||
|
||||
SAFE_ADDREF(m_pBlink_Swirl);
|
||||
SAFE_ADDREF(m_pBlink_Circle);
|
||||
SAFE_ADDREF(m_pBlink_Distortion);
|
||||
SAFE_ADDREF(m_pBlink_Circle2);
|
||||
|
||||
|
||||
m_Events.emplace(1.f, [&]() {
|
||||
for (auto& pTrail : m_Blink_Trails)
|
||||
{
|
||||
pTrail->SetDissolve(true);
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
m_Events.emplace(1.5f, [&]() {
|
||||
|
||||
m_isParticleEnd = true;
|
||||
m_pBlink_Swirl->Get_Component<CTransform>()->Set_State(STATE::POSITION, XMVectorSet(0.f, -500.f, 0.f, 1.f));
|
||||
});
|
||||
|
||||
m_fAmountSize = 1.f;
|
||||
m_fSpeed = 1.6f;
|
||||
|
||||
|
||||
m_fDuration = 2.f;
|
||||
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CBlink::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
|
||||
}
|
||||
|
||||
void CBlink::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
|
||||
Update_Event(fTimeDelta);
|
||||
|
||||
_uint iIndex = {};
|
||||
|
||||
|
||||
for (auto& pTrail : m_Blink_Trails)
|
||||
{
|
||||
_matrix BoneMatrix = XMLoadFloat4x4(m_pOwner->Get_Component<CModel>()->Get_BoneMatrixPtr(m_BoneNames[iIndex++].c_str()));
|
||||
_matrix PlayerWorld = m_pOwner->Get_Component<CTransform>()->Get_XMWorldMatrix();
|
||||
_matrix CombinedMat = BoneMatrix * PlayerWorld;
|
||||
|
||||
|
||||
|
||||
if (m_fMoveAccTime > XM_2PI)
|
||||
m_fMoveAccTime = 0.f;
|
||||
|
||||
m_fMoveAccTime += fTimeDelta * m_fMoveSpeed;
|
||||
|
||||
_float fAmount = sinf(m_fMoveAccTime) * m_fAmountMove;
|
||||
|
||||
CombinedMat.r[3] += XMVectorSet(0.f, fAmount, 0.f, 0.f);
|
||||
|
||||
pTrail->Oneside_Rope_Trail_Update(CombinedMat, fTimeDelta);
|
||||
}
|
||||
|
||||
|
||||
if (m_isParticleEnd == false)
|
||||
{
|
||||
m_pBlink_Swirl->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
}
|
||||
|
||||
|
||||
m_pBlink_Circle->Get_Component<CTransform>()->Set_WorldMatrix(m_pOwner->Get_Component<CTransform>()->Get_XMWorldMatrix());
|
||||
m_pBlink_Circle2->Get_Component<CTransform>()->Set_WorldMatrix(m_pOwner->Get_Component<CTransform>()->Get_XMWorldMatrix());
|
||||
|
||||
m_pBlink_Distortion->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pGameInstance->Get_CamXMPosition() + m_pGameInstance->Get_CameraLook() * m_fLength);
|
||||
|
||||
|
||||
if (m_fSizeAccTime > XM_PIDIV2)
|
||||
return;
|
||||
|
||||
m_fSizeAccTime += fTimeDelta * m_fSpeed;
|
||||
|
||||
_float fSize = sinf(m_fSizeAccTime) * m_fAmountSize;
|
||||
_float3 vSize = _float3(fSize, fSize, fSize);
|
||||
|
||||
m_pBlink_Circle->Get_Component<CTransform>()->Set_Scale(vSize);
|
||||
m_pBlink_Circle2->Get_Component<CTransform>()->Set_Scale(vSize);
|
||||
}
|
||||
|
||||
void CBlink::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
|
||||
|
||||
}
|
||||
|
||||
HRESULT CBlink::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Pre_Setting(pObject, nullptr)))
|
||||
return E_FAIL;
|
||||
|
||||
m_pBlink_Swirl->Set_Visible(true);
|
||||
m_pBlink_Circle->Set_Visible(true);
|
||||
m_pBlink_Circle2->Set_Visible(true);
|
||||
/*트레일 초기화 */
|
||||
|
||||
m_isTrailEnd = false;
|
||||
m_isParticleEnd = false;
|
||||
|
||||
for (auto& pTrail : m_Blink_Trails)
|
||||
{
|
||||
pTrail->SetDissolve(false);
|
||||
pTrail->Set_Visible(true);
|
||||
pTrail->Get_Component<CTrail>()->Reset_Trail();
|
||||
pTrail->Get_TrailInfo()->vDissolveTime.y = 0.5f;
|
||||
}
|
||||
|
||||
|
||||
m_pBlink_Swirl->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
|
||||
|
||||
|
||||
m_pBlink_Distortion->Set_Visible(true);
|
||||
|
||||
|
||||
m_fSizeAccTime = 0.f;
|
||||
m_fMoveAccTime = 0.f;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CBlink::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CBlink::Ready_Child()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CBlink* CBlink::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CBlink* pInstance = new CBlink(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CBlink");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
|
||||
CGameObject* CBlink::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CBlink* pInstance = new CBlink(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CBlink");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CBlink::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
{
|
||||
ON_COLLISION_INFO* CollisionDesc = static_cast<ON_COLLISION_INFO*>(pDesc);
|
||||
|
||||
}
|
||||
|
||||
void CBlink::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
|
||||
SAFE_RELEASE(m_pBlink_Swirl);
|
||||
SAFE_RELEASE(m_pBlink_Circle);
|
||||
SAFE_RELEASE(m_pBlink_Distortion);
|
||||
SAFE_RELEASE(m_pBlink_Circle2);
|
||||
|
||||
for (auto& pTrail : m_Blink_Trails)
|
||||
{
|
||||
SAFE_RELEASE(pTrail);
|
||||
}
|
||||
|
||||
m_Blink_Trails.clear();
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CBlink::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("Blink");
|
||||
|
||||
GUI::DragFloat("Length", &m_fLength);
|
||||
GUI::DragFloat("MoveAmount", &m_fAmountMove);
|
||||
GUI::DragFloat("m_fMoveSpeed", &m_fMoveSpeed);
|
||||
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
HRESULT CBlink::Bind_ShaderResources()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -146,16 +146,6 @@ void CBroom::Late_Update(_float fTimeDelta)
|
||||
_vector vCameraLook = XMVector3Normalize(m_pGameInstance->Get_CameraLook());
|
||||
WindTransform->Set_State(STATE::POSITION, m_pGameInstance->Get_CamXMPosition() + vCameraLook * m_fCameraOffset);
|
||||
|
||||
#if _DEBUG
|
||||
#if 진우
|
||||
GUI::Begin("Wind");
|
||||
|
||||
m_pWindEffect->Get_Component<CInstance_Model>()->Describe_Entity();
|
||||
GUI::Checkbox("BillBoard", &m_pWindEffect->Get_Effect_Info()->isBillboard);
|
||||
GUI::DragFloat("Offset", &m_fCameraOffset);
|
||||
GUI::End();
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
|
||||
@@ -101,6 +101,9 @@ HRESULT CEffectObject::Render_Blur()
|
||||
|
||||
}
|
||||
|
||||
if (m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::NONPOS)
|
||||
BlurPass = SHADER_PASS_INSTANCE_MODEL::NONPOS_BLUR;
|
||||
|
||||
for (_uint i = 0; i < m_pInstance_ModelCom->Get_NumMeshes(); i++)
|
||||
{
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "Stupefy.h"
|
||||
#include "Lightning.h"
|
||||
#include "LightningSide.h"
|
||||
#include "Blink.h"
|
||||
|
||||
CEffectPool::CEffectPool(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CGameObject(pDevice, pContext)
|
||||
@@ -147,7 +148,7 @@ void CEffectPool::Priority_Update(_float fTimeDelta)
|
||||
#if 진우
|
||||
|
||||
|
||||
(*m_EffectList[ENUM_CLASS(SKILL_TYPE::ACCIO)].begin())->Describe_Entity();
|
||||
(*m_EffectList[ENUM_CLASS(SKILL_TYPE::BLINK)].begin())->Describe_Entity();
|
||||
|
||||
Describe_Entity();
|
||||
|
||||
@@ -400,6 +401,16 @@ HRESULT CEffectPool::Ready_Effect()
|
||||
|
||||
return pEffect; }
|
||||
))) return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::BLINK, 3, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CBlink* pEffect = nullptr;
|
||||
|
||||
pEffect = m_pGameInstance->Clone_Prototype<CBlink>(iPrototypeLevel, nullptr);
|
||||
|
||||
return pEffect; }
|
||||
))) return E_FAIL;
|
||||
|
||||
|
||||
return S_OK;
|
||||
|
||||
@@ -427,6 +427,7 @@ void CInfoInstance::Release_Information()
|
||||
SAFE_RELEASE(m_pSkillInfo);
|
||||
SAFE_RELEASE(m_pQuestInfo);
|
||||
SAFE_RELEASE(m_pInteractiveInfo);
|
||||
SAFE_RELEASE(m_pSpellLearn_Data);
|
||||
SAFE_RELEASE(m_pDevice);
|
||||
SAFE_RELEASE(m_pContext);
|
||||
SAFE_RELEASE(m_pGameInstance);
|
||||
|
||||
@@ -640,9 +640,14 @@ HRESULT CLevel_GamePlay::Ready_Layer_Monster()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRanrok>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
|
||||
#if 진우
|
||||
#else
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRanrak>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -109,7 +109,8 @@ HRESULT CLightning::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
CPartObject* pLightning_Tornado_PT = Get_PartObject<CEffectParts>("Lightning_Tornado_PT");
|
||||
CPartObject* pLightning0 = Get_PartObject<CEffectParts>("Lightning0");
|
||||
CPartObject* pStart_Line = Get_PartObject<CEffectParts>("Start_Line");
|
||||
CPartObject* pStraight_Lightning = Get_PartObject<CEffectParts>("Straight_Lightning");
|
||||
CPartObject* pLightning_Smoke = Get_PartObject<CEffectParts>("Lightning_Smoke");
|
||||
CPartObject* pLightning_Rock_PT = Get_PartObject<CEffectParts>("Lightning_Rock_PT");
|
||||
|
||||
_vector vDirection = m_pOwner->Get_Component<CTransform>()->Get_State(STATE::LOOK);
|
||||
XMStoreFloat3(&m_vCameraLook, vDirection);
|
||||
@@ -138,7 +139,8 @@ HRESULT CLightning::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
pLightning_Tornado_PT->Set_Visible(true);
|
||||
pLightning0->Set_Visible(true);
|
||||
pStart_Line->Set_Visible(true);
|
||||
pStraight_Lightning->Set_Visible(true);
|
||||
pLightning_Smoke->Set_Visible(true);
|
||||
//pLightning_Rock_PT->Set_Visible(true);
|
||||
|
||||
pBottomLightning->Get_Component<CTransform>()->Set_State(STATE::POSITION, XMLoadFloat4(&m_vTargetPos));
|
||||
pFlare->Get_Component<CTransform>()->Set_State(STATE::POSITION, XMLoadFloat4(&m_vTargetPos));
|
||||
@@ -146,8 +148,8 @@ HRESULT CLightning::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
pLightning_Tornado_PT->Get_Component<CTransform>()->Set_State(STATE::POSITION, XMLoadFloat4(&m_vTargetPos));
|
||||
pLightning0->Get_Component<CTransform>()->Set_State(STATE::POSITION, XMLoadFloat4(&m_vTargetPos));
|
||||
pStart_Line->Get_Component<CTransform>()->Set_State(STATE::POSITION, XMLoadFloat4(&m_vTargetPos));
|
||||
pStraight_Lightning->Get_Component<CTransform>()->Set_State(STATE::POSITION, XMLoadFloat4(&m_vTargetPos));
|
||||
|
||||
pLightning_Smoke->Get_Component<CTransform>()->Set_State(STATE::POSITION, XMLoadFloat4(&m_vTargetPos));
|
||||
//pLightning_Rock_PT->Get_Component<CTransform>()->Set_State(STATE::POSITION, XMLoadFloat4(&m_vTargetPos));
|
||||
|
||||
m_fDistance = XMVectorGetX(XMVector3Length(XMLoadFloat4(&m_vTargetPos) - XMLoadFloat4(&m_vStartPos)));
|
||||
|
||||
|
||||
@@ -151,6 +151,7 @@
|
||||
#include "Levioso.h"
|
||||
#include "Lumos.h"
|
||||
#include "Accio.h"
|
||||
#include "Blink.h"
|
||||
#include "Goblin_Teleport.h"
|
||||
|
||||
|
||||
@@ -158,6 +159,7 @@
|
||||
#include "Troll_Nomal_Smoke.h"
|
||||
#include "Troll_Rush_Hit.h"
|
||||
|
||||
|
||||
#include "WandEnd.h"
|
||||
#include "Goblin_Protego.h"
|
||||
#include "Goblin_Attack.h"
|
||||
@@ -1782,6 +1784,10 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CBlink>(NEXT_LEVEL, CBlink::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CGoblin_Teleport>(NEXT_LEVEL, CGoblin_Teleport::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
|
||||
@@ -894,6 +894,13 @@ void CPlayer::Behavior_BlinkEnter()
|
||||
{
|
||||
m_pFSM->Enable_State(FSMSTATE::BLINK);
|
||||
|
||||
|
||||
Add_Event(m_Animation[STATEANIM::DODGE].first,
|
||||
[&]() {
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::BLINK, this);
|
||||
m_bVisible = false;
|
||||
},
|
||||
0.1f);
|
||||
}
|
||||
|
||||
HRESULT CPlayer::Behavior_BlinkExitCheck(_float fTimeDelta)
|
||||
@@ -903,13 +910,16 @@ HRESULT CPlayer::Behavior_BlinkExitCheck(_float fTimeDelta)
|
||||
_float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio();
|
||||
m_fBlinkTime += fTimeDelta;
|
||||
|
||||
if (m_fBlinkTime >= 0.6f && iCurrAnimIndex != m_Animation[STATEANIM::DODGE_BLINK].first)
|
||||
|
||||
if (m_fBlinkTime >= 1.f && iCurrAnimIndex != m_Animation[STATEANIM::DODGE_BLINK].first)
|
||||
{
|
||||
m_bVisible = true;
|
||||
pairAnimInfo = m_Animation[STATEANIM::DODGE_BLINK];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 0.8f,false,1.5f);
|
||||
}
|
||||
else if(iCurrAnimIndex != m_Animation[STATEANIM::DODGE_BLINK].first) {
|
||||
|
||||
|
||||
_vector vLook = m_pTransformCom->Get_State(STATE::LOOK);
|
||||
vLook = XMVectorSetY(vLook, 0.f);
|
||||
vLook = XMVector3Normalize(vLook);
|
||||
@@ -2638,6 +2648,7 @@ void CPlayer::Add_FSM()
|
||||
Desc.funcExitCheck = [this](_float fTimeDelta) { return Behavior_BlinkExitCheck(fTimeDelta); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_BlinkExit(); };
|
||||
Desc.funcPriorityUpdate = [this](_float fTimeDelta) {
|
||||
|
||||
if (SUCCEEDED(InputMove()))
|
||||
{
|
||||
_vector xmvInputDir = XMVectorZero();
|
||||
|
||||
@@ -337,6 +337,14 @@ void CTrailObject::Rope_Trail_Update(_fmatrix WorldMat, _fmatrix EndWorldMat, _f
|
||||
m_pTrailCom->Rope_Trail_Update(WorldMat, fTimeDelta, m_TrailInfo.fDamping, m_TrailInfo.fRopeLength, m_TrailInfo.fMass, EndWorldMat);
|
||||
}
|
||||
|
||||
void CTrailObject::Oneside_Rope_Trail_Update(_fmatrix WorldMat, _float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
m_pTrailCom->Rope_Trail_Update(WorldMat, fTimeDelta, m_TrailInfo.fDamping, m_TrailInfo.fRopeLength, m_TrailInfo.fMass);
|
||||
}
|
||||
|
||||
|
||||
HRESULT CTrailObject::Render()
|
||||
{
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "Effect_Container.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CBlink final : public CEffect_Container
|
||||
{
|
||||
private:
|
||||
CBlink(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CBlink(const CBlink& rhs);
|
||||
virtual ~CBlink() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
|
||||
public:
|
||||
virtual HRESULT Pre_Setting(CGameObject* pObject, void* pArg = nullptr) override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
HRESULT Ready_Child();
|
||||
HRESULT Bind_ShaderResources() override;
|
||||
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
|
||||
private:
|
||||
_wstring m_wstrEffectName = {};
|
||||
|
||||
_bool m_isParticleEnd = {};
|
||||
_bool m_isTrailEnd = {};
|
||||
_float4x4 m_TrailStopMat = {};
|
||||
|
||||
_float m_fMoveAccTime = {};
|
||||
_float m_fAmountMove = { 0.3f };
|
||||
_float m_fMoveSpeed = { 5.f };
|
||||
|
||||
_float m_fSizeAccTime = {};
|
||||
_float m_fAmountSize = {};
|
||||
_float m_fSpeed = {};
|
||||
|
||||
class CEffectParts* m_pBlink_Swirl = { nullptr };
|
||||
class CEffectParts* m_pBlink_Circle = { nullptr };
|
||||
class CEffectParts* m_pBlink_Circle2 = { nullptr };
|
||||
class CEffectParts* m_pBlink_Distortion = { nullptr };
|
||||
|
||||
vector<class CTrailObject*> m_Blink_Trails = {};
|
||||
|
||||
_float m_fLength = { 5.f };
|
||||
_string m_BoneNames[10] = {};
|
||||
|
||||
|
||||
public:
|
||||
static CBlink* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual void Free() override;
|
||||
CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -11,7 +11,7 @@ namespace Client
|
||||
enum class SHADER_PASS_NORTEX { DEFAULT, TERRAIN, ENV_TERRAIN_ANISO, SHADOW, END };
|
||||
enum class SHADER_PASS_PARTICLE { EXPLOSION, END };
|
||||
enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, TRAIL_BLEND, TRAILWB_FOR_BLEND, TRAIL_BLUR, TRAIL_BLOOM, END };
|
||||
enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, BLEND, BLEND_NOWORLD, BLOOM, BLOOM_NOWORLD, BLUR_NO_EMMISVE, BLUR_NO_WORLD_NO_EMISSIVE, WEIGHTBLEND_FOR_BLEND, DEPTH_STOP, WB_CULLING, SCREEN_FX, DISTORTION,END };
|
||||
enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, BLEND, BLEND_NOWORLD, BLOOM, BLOOM_NOWORLD, BLUR_NO_EMMISVE, BLUR_NO_WORLD_NO_EMISSIVE, WEIGHTBLEND_FOR_BLEND, DEPTH_STOP, WB_CULLING, SCREEN_FX, DISTORTION, NONPOS, NONPOS_BLUR , END};
|
||||
enum class SHADER_PASS_UIEDITOR {
|
||||
DEFAULT, COLOR, LOGO, LOGO_TEXT, LOGO_GLOW, ALPHABLEND, CLAMP, CURSOR,
|
||||
LODING, HOLD_ROTATION, MISSION, QUESTTYPE, UVMULT, NINECLICE,
|
||||
@@ -51,7 +51,7 @@ namespace Client
|
||||
BOX_SPLESH, CHAIL_SPLESH , BARRAL_SPLASH,
|
||||
|
||||
/*상태 이펙트*/
|
||||
STUN,
|
||||
STUN, BLINK,
|
||||
|
||||
/*스크린 이펙트*/
|
||||
SCREEN_WIND,
|
||||
|
||||
@@ -29,11 +29,12 @@ class CTrailObject final : public CPartObject
|
||||
public:
|
||||
void Trail_Update(_fmatrix WorldMat, _float fTimeDelta);
|
||||
void Rope_Trail_Update(_fmatrix WorldMat, _fmatrix EndWorldMat, _float fTimeDelta);
|
||||
void Oneside_Rope_Trail_Update(_fmatrix WorldMat, _float fTimeDelta);
|
||||
|
||||
HRESULT Load_Trail(CEffect_Container::TRAIL_SAVE_INFO Trail_Save_Info, LEVEL eLevel);
|
||||
HRESULT Load_Trail(const _char* pPath, LEVEL eLevel);
|
||||
|
||||
void SetDissolve(_bool isDissolve) { m_TrailInfo.isDissolve = true; }
|
||||
void SetDissolve(_bool isDissolve) { m_TrailInfo.isDissolve = isDissolve; }
|
||||
TRAIL_INFO* Get_TrailInfo() { return &m_TrailInfo; }
|
||||
|
||||
private:
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -88,7 +88,7 @@ cbuffer g_ConstantBuffer : register(b0) // b0 << 이 숫자와 컨스턴트 쉐
|
||||
bool isMoveUp;
|
||||
bool isExcludePos;
|
||||
bool isStopMove_For_Depth_Compare;
|
||||
bool isPadding2;
|
||||
bool isNoPos;
|
||||
|
||||
float fTimeDelta;
|
||||
float fSizeLerpOption; // 반드시 상수버퍼는 16바이트 배수로 만들어져야 한다.
|
||||
@@ -146,6 +146,11 @@ void CS_MAIN(
|
||||
particle.vTranslation = CurMat[3].xyzw;
|
||||
}
|
||||
|
||||
if (isNoPos)
|
||||
{
|
||||
particle.vTranslation.xyz += WorldMatrix[3].xyz;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 라이프타임 움직임
|
||||
|
||||
@@ -273,6 +273,42 @@ VS_OUT VS_NOWORLD(VS_IN In, uint iGPUIndex : SV_InstanceID)
|
||||
return Out;
|
||||
}
|
||||
|
||||
VS_OUT VS_NONPOS(VS_IN In, uint iGPUIndex : SV_InstanceID)
|
||||
{
|
||||
VS_OUT Out = (VS_OUT) 0;
|
||||
|
||||
matrix matW, matWV, matWVP;
|
||||
|
||||
row_major matrix TransformMatrix = float4x4(In.vRight, In.vUp, In.vLook, In.vTranslation);
|
||||
|
||||
row_major matrix Wolrd_NonPosMatrix = g_WorldMatrix;
|
||||
|
||||
Wolrd_NonPosMatrix[3] = vector(0.f, 0.f, 0.f, 1.f);
|
||||
|
||||
matW = mul(TransformMatrix, Wolrd_NonPosMatrix);
|
||||
|
||||
matW[3] = In.vTranslation;
|
||||
|
||||
matWV = mul(matW, g_ViewMatrix);
|
||||
matWVP = mul(matWV, g_ProjMatrix);
|
||||
|
||||
vector vPosition = mul(vector(In.vPosition, 1.f), matWVP);
|
||||
|
||||
Out.vPosition = vPosition;
|
||||
Out.vNormal = normalize(mul(vector(In.vNormal, 0.f), matW));
|
||||
Out.vTangent = normalize(mul(vector(In.vTangent, 0.f), matW)).xyz;
|
||||
Out.vBinormal = normalize(mul(vector(In.vBinormal, 0.f), matW)).xyz;
|
||||
Out.vTexcoord = In.vTexcoord;
|
||||
Out.vLifeTime = In.vLifeTime;
|
||||
Out.vWorldPos = mul(vector(In.vPosition, 1.f), matW);
|
||||
Out.iGPUIndex = iGPUIndex;
|
||||
Out.vProjPos = vPosition;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
|
||||
|
||||
struct PS_IN
|
||||
{
|
||||
float4 vPosition : SV_POSITION;
|
||||
@@ -792,6 +828,36 @@ VS_OUT VS_BLUR_NOWORLD(VS_IN In, uint iGPUIndex : SV_InstanceID)
|
||||
return Out;
|
||||
}
|
||||
|
||||
VS_OUT VS_BLUR_NOPOS(VS_IN In, uint iGPUIndex : SV_InstanceID)
|
||||
{
|
||||
VS_OUT Out = (VS_OUT) 0;
|
||||
|
||||
matrix matW, matWV, matWVP;
|
||||
|
||||
row_major matrix TransformMatrix = float4x4(In.vRight, In.vUp, In.vLook, In.vTranslation);
|
||||
|
||||
row_major matrix Wolrd_NonPosMatrix = g_WorldMatrix;
|
||||
|
||||
Wolrd_NonPosMatrix[3] = vector(0.f, 0.f, 0.f, 1.f);
|
||||
|
||||
matW = mul(TransformMatrix, Wolrd_NonPosMatrix);
|
||||
|
||||
matW[3] = In.vTranslation;
|
||||
|
||||
matWV = mul(matW, g_ViewMatrix);
|
||||
matWVP = mul(matWV, g_ProjMatrix);
|
||||
|
||||
vector vPosition = mul(vector(In.vPosition, 1.f), matWVP);
|
||||
|
||||
Out.vPosition = vPosition;
|
||||
Out.vTexcoord = In.vTexcoord;
|
||||
Out.vLifeTime = In.vLifeTime;
|
||||
Out.iGPUIndex = iGPUIndex;
|
||||
Out.vProjPos = vPosition;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
struct PS_BLUR_OUT
|
||||
{
|
||||
float4 vDiffuse : SV_TARGET0;
|
||||
@@ -1155,6 +1221,29 @@ technique11 DefaultTechnique
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_DISTORTION();
|
||||
}
|
||||
|
||||
//17
|
||||
pass NONPOS
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_WB_Acc, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_NONPOS();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_NON_NORMALMAP();
|
||||
}
|
||||
|
||||
//18
|
||||
pass NONPOS_BLUR
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_BLUR_NOPOS();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_BLUR();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -175,6 +175,7 @@ call Update_Shaders.bat
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\Public\Action_Panel.h" />
|
||||
<ClInclude Include="..\public\AlphaMap.h" />
|
||||
<ClInclude Include="..\Public\Blink.h" />
|
||||
<ClInclude Include="..\Public\Body.h" />
|
||||
<ClInclude Include="..\public\Boss_HpBer.h" />
|
||||
<ClInclude Include="..\public\Enemy_Detection.h" />
|
||||
@@ -400,6 +401,7 @@ call Update_Shaders.bat
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\Private\Action_Panel.cpp" />
|
||||
<ClCompile Include="..\private\AlphaMap.cpp" />
|
||||
<ClCompile Include="..\Private\Blink.cpp" />
|
||||
<ClCompile Include="..\Private\Body.cpp" />
|
||||
<ClCompile Include="..\private\Boss_HpBer.cpp" />
|
||||
<ClCompile Include="..\Private\Enemy_Detection.cpp" />
|
||||
|
||||
@@ -627,13 +627,16 @@
|
||||
</Filter>
|
||||
<Filter Include="80.State\Focus\Slide">
|
||||
<UniqueIdentifier>{eef1db06-8a9f-42b4-93e2-cc29de2b275d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter Include="50.UI\SpellLearn_Data">
|
||||
<UniqueIdentifier>{6e769435-83c4-4f64-b306-1b8c5f2d228d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="50.UI\SpellLearn_Canvas\SpellLearn_Panel\SPellLeam_SpeedPointer">
|
||||
<UniqueIdentifier>{54a92f0d-26f1-49bf-a13b-ab11995968c7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Layer_Effect\Effect\Magic\Blink">
|
||||
<UniqueIdentifier>{3b207257-c396-473b-9906-df04b28fb0cd}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Editor.h">
|
||||
@@ -1263,6 +1266,9 @@
|
||||
<ClInclude Include="..\public\SPellLeam_SpeedPointer.h">
|
||||
<Filter>50.UI\SpellLearn_Canvas\SpellLearn_Panel\SPellLeam_SpeedPointer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Blink.h">
|
||||
<Filter>02.GameObjects\Layer_Effect\Effect\Magic\Blink</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Editor.ico">
|
||||
@@ -1894,6 +1900,9 @@
|
||||
<ClCompile Include="..\private\SPellLeam_SpeedPointer.cpp">
|
||||
<Filter>50.UI\SpellLearn_Canvas\SpellLearn_Panel\SPellLeam_SpeedPointer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Blink.cpp">
|
||||
<Filter>02.GameObjects\Layer_Effect\Effect\Magic\Blink</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Editor.rc">
|
||||
|
||||
@@ -0,0 +1,293 @@
|
||||
#include "pch.h"
|
||||
#include "Blink.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "EditEffect.h"
|
||||
#include "Player.h"
|
||||
#include "Wand.h"
|
||||
#include "TrailObject.h"
|
||||
|
||||
|
||||
CBlink::CBlink(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CEffect_Container{ pDevice, pContext }
|
||||
{
|
||||
}
|
||||
|
||||
CBlink::CBlink(const CBlink& rhs)
|
||||
: CEffect_Container(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CBlink::Initialize_Prototype()
|
||||
{
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CBlink::Initialize(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Blink")))
|
||||
return E_FAIL;
|
||||
|
||||
m_wstrEffectName = L"Blink";
|
||||
|
||||
|
||||
m_pBlink_Swirl = Get_PartObject<CEditEffect>("BlinkSwirl");
|
||||
m_pBlink_Circle = Get_PartObject<CEditEffect>("Blink_Circle");
|
||||
m_pBlink_Circle2 = Get_PartObject<CEditEffect>("Blink_Circle2");
|
||||
m_pBlink_Distortion = Get_PartObject<CEditEffect>("Blink_Distortion");
|
||||
|
||||
for (size_t i = 0; i < 10; i++)
|
||||
{
|
||||
_string strPartsName = "Blink_Trail" + to_string(i);
|
||||
CTrailObject* pTrail = Get_PartObject<CTrailObject>(strPartsName);
|
||||
|
||||
m_Blink_Trails.push_back(pTrail);
|
||||
SAFE_ADDREF(pTrail);
|
||||
}
|
||||
|
||||
m_BoneNames[0] = "SKT_Back";
|
||||
m_BoneNames[1] = "Neck";
|
||||
m_BoneNames[2] = "Spine2";
|
||||
m_BoneNames[3] = "LeftForeArm";
|
||||
m_BoneNames[4] = "Spine";
|
||||
m_BoneNames[5] = "RightArm";
|
||||
m_BoneNames[6] = "LeftArm";
|
||||
m_BoneNames[7] = "RightUpLegTwist1";
|
||||
m_BoneNames[8] = "LeftUpLegTwist1";
|
||||
m_BoneNames[9] = "RightForeArm";
|
||||
|
||||
|
||||
SAFE_ADDREF(m_pBlink_Swirl);
|
||||
SAFE_ADDREF(m_pBlink_Circle);
|
||||
SAFE_ADDREF(m_pBlink_Distortion);
|
||||
SAFE_ADDREF(m_pBlink_Circle2);
|
||||
|
||||
|
||||
m_Events.emplace(1.f, [&]() {
|
||||
for (auto& pTrail : m_Blink_Trails)
|
||||
{
|
||||
pTrail->SetDissolve(true);
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
m_Events.emplace(1.5f, [&]() {
|
||||
|
||||
m_isParticleEnd = true;
|
||||
m_pBlink_Swirl->Get_Component<CTransform>()->Set_State(STATE::POSITION, XMVectorSet(0.f, -500.f, 0.f, 1.f));
|
||||
});
|
||||
|
||||
m_fAmountSize = 1.f;
|
||||
m_fSpeed = 1.6f;
|
||||
|
||||
|
||||
m_fDuration = 2.f;
|
||||
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CBlink::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
|
||||
}
|
||||
|
||||
void CBlink::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
|
||||
Update_Event(fTimeDelta);
|
||||
|
||||
_uint iIndex = {};
|
||||
|
||||
|
||||
for (auto& pTrail : m_Blink_Trails)
|
||||
{
|
||||
_matrix BoneMatrix = XMLoadFloat4x4(m_pOwner->Get_Component<CModel>()->Get_BoneMatrixPtr(m_BoneNames[iIndex++].c_str()));
|
||||
_matrix PlayerWorld = m_pOwner->Get_Component<CTransform>()->Get_XMWorldMatrix();
|
||||
_matrix CombinedMat = BoneMatrix * PlayerWorld;
|
||||
|
||||
|
||||
|
||||
if (m_fMoveAccTime > XM_2PI)
|
||||
m_fMoveAccTime = 0.f;
|
||||
|
||||
m_fMoveAccTime += fTimeDelta * m_fMoveSpeed;
|
||||
|
||||
_float fAmount = sinf(m_fMoveAccTime) * m_fAmountMove;
|
||||
|
||||
CombinedMat.r[3] += XMVectorSet(0.f, fAmount, 0.f, 0.f);
|
||||
|
||||
pTrail->Oneside_Rope_Trail_Update(CombinedMat, fTimeDelta);
|
||||
}
|
||||
|
||||
|
||||
if (m_isParticleEnd == false)
|
||||
{
|
||||
m_pBlink_Swirl->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
}
|
||||
|
||||
|
||||
m_pBlink_Circle->Get_Component<CTransform>()->Set_WorldMatrix(m_pOwner->Get_Component<CTransform>()->Get_XMWorldMatrix());
|
||||
m_pBlink_Circle2->Get_Component<CTransform>()->Set_WorldMatrix(m_pOwner->Get_Component<CTransform>()->Get_XMWorldMatrix());
|
||||
|
||||
m_pBlink_Distortion->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pGameInstance->Get_CamXMPosition() + m_pGameInstance->Get_CameraLook() * m_fLength);
|
||||
|
||||
|
||||
if (m_fSizeAccTime > XM_PIDIV2)
|
||||
return;
|
||||
|
||||
m_fSizeAccTime += fTimeDelta * m_fSpeed;
|
||||
|
||||
_float fSize = sinf(m_fSizeAccTime) * m_fAmountSize;
|
||||
_float3 vSize = _float3(fSize, fSize, fSize);
|
||||
|
||||
m_pBlink_Circle->Get_Component<CTransform>()->Set_Scale(vSize);
|
||||
m_pBlink_Circle2->Get_Component<CTransform>()->Set_Scale(vSize);
|
||||
}
|
||||
|
||||
void CBlink::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
|
||||
|
||||
}
|
||||
|
||||
HRESULT CBlink::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Pre_Setting(pObject, nullptr)))
|
||||
return E_FAIL;
|
||||
|
||||
m_pBlink_Swirl->Set_Visible(true);
|
||||
m_pBlink_Circle->Set_Visible(true);
|
||||
m_pBlink_Circle2->Set_Visible(true);
|
||||
/*트레일 초기화 */
|
||||
|
||||
m_isTrailEnd = false;
|
||||
m_isParticleEnd = false;
|
||||
|
||||
for (auto& pTrail : m_Blink_Trails)
|
||||
{
|
||||
pTrail->SetDissolve(false);
|
||||
pTrail->Set_Visible(true);
|
||||
pTrail->Get_Component<CTrail>()->Reset_Trail();
|
||||
pTrail->Get_TrailInfo()->vDissolveTime.y = 0.5f;
|
||||
}
|
||||
|
||||
|
||||
m_pBlink_Swirl->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
|
||||
|
||||
|
||||
m_pBlink_Distortion->Set_Visible(true);
|
||||
|
||||
|
||||
m_fSizeAccTime = 0.f;
|
||||
m_fMoveAccTime = 0.f;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CBlink::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CBlink::Ready_Child()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CBlink* CBlink::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CBlink* pInstance = new CBlink(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CBlink");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
|
||||
CGameObject* CBlink::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CBlink* pInstance = new CBlink(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CBlink");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CBlink::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
{
|
||||
ON_COLLISION_INFO* CollisionDesc = static_cast<ON_COLLISION_INFO*>(pDesc);
|
||||
|
||||
}
|
||||
|
||||
void CBlink::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
|
||||
SAFE_RELEASE(m_pBlink_Swirl);
|
||||
SAFE_RELEASE(m_pBlink_Circle);
|
||||
SAFE_RELEASE(m_pBlink_Distortion);
|
||||
SAFE_RELEASE(m_pBlink_Circle2);
|
||||
|
||||
for (auto& pTrail : m_Blink_Trails)
|
||||
{
|
||||
SAFE_RELEASE(pTrail);
|
||||
}
|
||||
|
||||
m_Blink_Trails.clear();
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CBlink::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("Blink");
|
||||
|
||||
GUI::DragFloat("Length", &m_fLength);
|
||||
GUI::DragFloat("MoveAmount", &m_fAmountMove);
|
||||
GUI::DragFloat("m_fMoveSpeed", &m_fMoveSpeed);
|
||||
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
HRESULT CBlink::Bind_ShaderResources()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -433,7 +433,9 @@ void CEditEffect::Describe_Entity()
|
||||
const char* pRenderNames[] = { "PRIORITY" , "SHADOW_NEAR", "NONBLEND", "DECAL", "BLUR" , "NONLIGHT" ,"EFFECT", "BLEND" ,"BLOOM", "DISTORTION" , "UI", "OCCLUSION" , "SHADOW_MIDDLE", "SHADOW_FAR" , "PRESHADOW" , "UI_OVERLAY" };
|
||||
|
||||
const char* pEffectType[] = { "EFFECT" , "TRAIL" };
|
||||
const char* pShaderPass[] = { "DEFAULT" , "NON_NOMALMAP" , "BLUR" , "WEIGHTBLEND" , "NON_WORLD" , "NON_WORLD_BLUR", "BLEND", "BLEND_NOWORLD", "BLOOM" ,"BLOOM_NOWORLD" ,"BLUR_NO_EMMISVE", "BLUR_NO_WORLD_NO_EMISSIVE","WEIGHTBLEND_FOR_BLEND" , "DEPTH_STOP" , "WB_CULLING", "SCREEN_FX" , "DISTORTION"};
|
||||
const char* pShaderPass[] = { "DEFAULT" , "NON_NOMALMAP" , "BLUR" , "WEIGHTBLEND" , "NON_WORLD" , "NON_WORLD_BLUR", "BLEND", "BLEND_NOWORLD", "BLOOM" ,"BLOOM_NOWORLD" ,"BLUR_NO_EMMISVE",
|
||||
"BLUR_NO_WORLD_NO_EMISSIVE","WEIGHTBLEND_FOR_BLEND" , "DEPTH_STOP" , "WB_CULLING", "SCREEN_FX" , "DISTORTION" ,"NONPOS" , "NONPOS_BLUR" };
|
||||
|
||||
const char* pBloomType[] = { "NONE" , "BASIC" , "MUILTY"};
|
||||
_int iCurrentItem = static_cast<_int>(m_EffectInfo.eRenderOrder);
|
||||
_int iCurrentType = static_cast<_int>(m_EffectInfo.eEffectType);
|
||||
|
||||
@@ -96,10 +96,11 @@ HRESULT CEffectObject::Render_Blur()
|
||||
{
|
||||
BlurPass = SHADER_PASS_INSTANCE_MODEL::BLUR_NO_EMMISVE;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::NONPOS)
|
||||
BlurPass = SHADER_PASS_INSTANCE_MODEL::NONPOS_BLUR;
|
||||
|
||||
for (_uint i = 0; i < m_pInstance_ModelCom->Get_NumMeshes(); i++)
|
||||
{
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "Troll_Nomal_Smoke.h"
|
||||
#include "TrollSwing.h"
|
||||
#include "StunEffect.h"
|
||||
#include "Blink.h"
|
||||
|
||||
CEffectPool::CEffectPool(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CGameObject(pDevice, pContext)
|
||||
@@ -96,6 +97,17 @@ void CEffectPool::Priority_Update(_float fTimeDelta)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
#if 진우
|
||||
|
||||
|
||||
(*m_EffectList[ENUM_CLASS(SKILL_TYPE::BLINK)].begin())->Describe_Entity();
|
||||
|
||||
Describe_Entity();
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -246,6 +258,14 @@ HRESULT CEffectPool::Ready_Effect()
|
||||
return pEffect; }
|
||||
))) return E_FAIL;
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::BLINK, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CBlink* pEffect = nullptr;
|
||||
|
||||
pEffect = m_pGameInstance->Clone_Prototype<CBlink>(iPrototypeLevel, nullptr);
|
||||
|
||||
return pEffect; }
|
||||
))) return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ void CEffect_Editor::Update(_float fTimeDelta)
|
||||
{
|
||||
_matrix vWandPos = m_pGameInstance->Get_Layer(CURRENT_LEVEL, LAYER_PLAYER)->Get_Object<CPlayer>()->Get_PartObject<CWand>()->Get_WorldMatrix();
|
||||
|
||||
m_pTrailObject->Rope_Trail_Update(vWandPos, m_pTransformCom->Get_XMWorldMatrix(), fTimeDelta);
|
||||
m_pTrailObject->Oneside_Rope_Trail_Update(vWandPos, fTimeDelta);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -266,9 +266,9 @@ void CLevioso::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
|
||||
|
||||
|
||||
//Get_PartObject<CEffectParts>("Levioso_Tornado")
|
||||
//CEffectParts* pLevioso_Hit = Get_PartObject<CEffectParts>("Levioso_Hit");
|
||||
//CEffectParts* pLevioso_Bottom_Wind = Get_PartObject<CEffectParts>("Levioso_Bottom_Wind");
|
||||
//Get_PartObject<CEditEffect>("Levioso_Tornado")
|
||||
//CEditEffect* pLevioso_Hit = Get_PartObject<CEditEffect>("Levioso_Hit");
|
||||
//CEditEffect* pLevioso_Bottom_Wind = Get_PartObject<CEditEffect>("Levioso_Bottom_Wind");
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -180,6 +180,7 @@
|
||||
#include "Goblin_BattleAxe.h"
|
||||
#include "Goblin_Spector.h"
|
||||
#include "StunEffect.h"
|
||||
#include "Blink.h"
|
||||
#pragma endregion
|
||||
|
||||
#pragma region PHYSX_HEADER
|
||||
@@ -1698,6 +1699,11 @@ HRESULT CLoader::Loading_For_Effect()
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CBlink>(NEXT_LEVEL, CBlink::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
/* For.Prototype_GameObject_Wand */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CWand>(g_iStaticLevel, CWand::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
@@ -136,6 +136,9 @@ void CPlayer::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pCharacter_Controller->Get_FootPosition());
|
||||
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "State_Land.h"
|
||||
#include "State_Move.h"
|
||||
#include "State_Combat.h"
|
||||
#include "State_Blink.h"
|
||||
#pragma endregion
|
||||
|
||||
#include "EffectPool.h"
|
||||
@@ -285,6 +286,67 @@ HRESULT CPlayer::Behavior_IdleExitCheck(_float fTimeDelta)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
void CPlayer::Behavior_BlinkEnter()
|
||||
{
|
||||
m_pFSM->Enable_State(FSMSTATE::BLINK);
|
||||
|
||||
|
||||
Add_Event(m_Animation[STATEANIM::DODGE].first,
|
||||
[&]() {
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::BLINK, this);
|
||||
m_bVisible = false;
|
||||
},
|
||||
0.1f);
|
||||
}
|
||||
|
||||
HRESULT CPlayer::Behavior_BlinkExitCheck(_float fTimeDelta)
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
_int iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||
_float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio();
|
||||
m_fBlinkTime += fTimeDelta;
|
||||
|
||||
if (m_fBlinkTime >= 1.f && iCurrAnimIndex != m_Animation[STATEANIM::DODGE_BLINK].first)
|
||||
{
|
||||
m_bVisible = true;
|
||||
pairAnimInfo = m_Animation[STATEANIM::DODGE_BLINK];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 0.8f, false, 1.5f);
|
||||
m_BroomScale = { 1.f,1.f,1.f };
|
||||
}
|
||||
else if (iCurrAnimIndex != m_Animation[STATEANIM::DODGE_BLINK].first) {
|
||||
|
||||
|
||||
_vector vLook = m_pTransformCom->Get_State(STATE::LOOK);
|
||||
vLook = XMVectorSetY(vLook, 0.f);
|
||||
vLook = XMVector3Normalize(vLook);
|
||||
_vector vPos = m_pCharacter_Controller->Get_Position();
|
||||
_vector vNextPos = vPos + vLook * 7.f * fTimeDelta;
|
||||
m_pCharacter_Controller->Set_Position(vNextPos);
|
||||
}
|
||||
|
||||
if (iCurrAnimIndex == m_Animation[STATEANIM::DODGE_BLINK].first)
|
||||
{
|
||||
if (SUCCEEDED(InputMove()) && fRatio >= 0.2f) {
|
||||
m_pFSM->Change_State(FSMSTATE::MOVE);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (fRatio >= 0.2f) {
|
||||
m_pFSM->Change_State(FSMSTATE::IDLE);
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CPlayer::Behavior_BlinkExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::BLINK);
|
||||
m_fBlinkTime = 0.f;
|
||||
}
|
||||
|
||||
void CPlayer::Behavior_IdleExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::IDLE | FSMSTATE::IDLE_TURN);
|
||||
@@ -298,7 +360,7 @@ void CPlayer::Behavior_MoveEnter()
|
||||
_bool bRight = m_pGameInstance->Key_Pressing(DIK_D);
|
||||
_bool bBackward = m_pGameInstance->Key_Pressing(DIK_S);
|
||||
m_pFSM->Enable_State(FSMSTATE::MOVE);
|
||||
if (m_pFSM->IsEnable_Previous(FSMSTATE::IDLE | FSMSTATE::DODGE)) {
|
||||
if (m_pFSM->IsEnable_Previous(FSMSTATE::IDLE | FSMSTATE::DODGE | FSMSTATE::BLINK)) {
|
||||
if (true == m_bSprintToggle) {
|
||||
m_pFSM->Enable_State(FSMSTATE::SPRINT);
|
||||
m_bWalkToggle = false;
|
||||
@@ -699,17 +761,28 @@ void CPlayer::Behavior_DodgeEnter()
|
||||
// 혹시 @@ to Dodge 있으면 여기에
|
||||
m_pFSM->Enable_State(FSMSTATE::DODGE);
|
||||
pair<_uint, _bool> pairAnimInfo = m_Animation[STATEANIM::DODGE];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, false, 1.3f);
|
||||
}
|
||||
|
||||
HRESULT CPlayer::Behavior_DodgeExitCheck()
|
||||
HRESULT CPlayer::Behavior_DodgeExitCheck(_float fTimeDelta)
|
||||
{
|
||||
_float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio();
|
||||
|
||||
if (fRatio >= 0.08f)
|
||||
{
|
||||
if (m_pGameInstance->Key_Pressing(DIK_LCONTROL))
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::BLINK);
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_pModelCom->IsFinishedAnim()) {
|
||||
m_pFSM->Change_State(FSMSTATE::IDLE);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (SUCCEEDED(InputMove()) && IsCurrentKeyFrame("Throw")) {
|
||||
if (SUCCEEDED(InputMove()) && fRatio >= 0.3f) {
|
||||
m_pFSM->Change_State(FSMSTATE::MOVE);
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -1147,6 +1220,55 @@ void CPlayer::Add_FSM()
|
||||
m_States.emplace(FSMSTATE::MOVE, CState_Move::Create(&Desc));
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
|
||||
{
|
||||
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 = [this](_float fTimeDelta) {
|
||||
|
||||
if (SUCCEEDED(InputMove()))
|
||||
{
|
||||
_vector xmvInputDir = XMVectorZero();
|
||||
|
||||
_vector xmvCamLook = XMVector4Normalize(XMVectorSet(m_vCameraLookDir.x, 0.f, m_vCameraLookDir.z, 0.f));
|
||||
_vector xmvCamRight = XMVector4Normalize(XMVectorSet(m_vCameraRightDir.x, 0.f, m_vCameraRightDir.z, 0.f));
|
||||
|
||||
if (m_pGameInstance->Key_Pressing(DIK_W))
|
||||
xmvInputDir += xmvCamLook;
|
||||
if (m_pGameInstance->Key_Pressing(DIK_S))
|
||||
xmvInputDir -= xmvCamLook;
|
||||
if (m_pGameInstance->Key_Pressing(DIK_A))
|
||||
xmvInputDir -= xmvCamRight;
|
||||
if (m_pGameInstance->Key_Pressing(DIK_D))
|
||||
xmvInputDir += xmvCamRight;
|
||||
|
||||
xmvInputDir = XMVector3Normalize(xmvInputDir);
|
||||
|
||||
_float2 vInputDir = { XMVectorGetX(xmvInputDir),XMVectorGetZ(xmvInputDir) };
|
||||
_vector xmvCurLook = XMVector4Normalize(
|
||||
XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f));
|
||||
_float2 vCurLook = { XMVectorGetX(xmvCurLook),XMVectorGetZ(xmvCurLook) };
|
||||
|
||||
_float vDir = CMyTools::Get_Direction2D(vCurLook, vInputDir);
|
||||
_float absDir = fabsf(vDir);
|
||||
_float cross = vCurLook.x * vInputDir.y - vCurLook.y * vInputDir.x;
|
||||
if (cross > 0.f)
|
||||
{
|
||||
m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta);
|
||||
}
|
||||
else {
|
||||
m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta);
|
||||
}
|
||||
}
|
||||
};
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::BLINK, CState_Blink::Create(&Desc));
|
||||
}
|
||||
|
||||
#pragma region Behavior_Movement_Focus
|
||||
{
|
||||
CState_Jump::STATE_JUMP_DESC Desc{};
|
||||
@@ -1168,7 +1290,7 @@ void CPlayer::Add_FSM()
|
||||
CState_Dodge::STATE_DODGE_DESC Desc{};
|
||||
Desc.pOwner = this;
|
||||
Desc.funcEnterEvent = [this]() { Behavior_DodgeEnter(); };
|
||||
Desc.funcExitCheck = [this](_float fTimeDelta) { return Behavior_DodgeExitCheck(); };
|
||||
Desc.funcExitCheck = [this](_float fTimeDelta) { return Behavior_DodgeExitCheck(fTimeDelta); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_DodgeExit(); };
|
||||
Desc.funcPriorityUpdate = [this](_float fTimeDelta) {
|
||||
if (m_pGameInstance->Key_Pressing(DIK_A)) { m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta); }
|
||||
@@ -1239,7 +1361,7 @@ void CPlayer::Set_Anim()
|
||||
m_Animation[STATEANIM::LAND] = { 259,false };
|
||||
|
||||
m_Animation[STATEANIM::DODGE] = { 878,false };
|
||||
m_Animation[STATEANIM::DODGE_BLINK] = { 876,true };
|
||||
m_Animation[STATEANIM::DODGE_BLINK] = { 874,false };
|
||||
|
||||
m_Animation[STATEANIM::SKILL] = { 593,false };
|
||||
m_Animation[STATEANIM::SKILL2] = { 991,false };
|
||||
|
||||
@@ -68,7 +68,9 @@ void CTrailObject::Update(_float fTimeDelta)
|
||||
|
||||
if (m_TrailInfo.vDissolveTime.x > m_TrailInfo.vDissolveTime.y)
|
||||
{
|
||||
m_bVisible = false;
|
||||
m_TrailInfo.vDissolveTime.x = 0.f;
|
||||
m_TrailInfo.isDissolve = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -137,6 +139,14 @@ void CTrailObject::Rope_Trail_Update(_fmatrix WorldMat, _fmatrix EndWorldMat, _f
|
||||
m_pTrailCom->Rope_Trail_Update(WorldMat, fTimeDelta, m_TrailInfo.fDamping, m_TrailInfo.fRopeLength, m_TrailInfo.fMass, EndWorldMat);
|
||||
}
|
||||
|
||||
void CTrailObject::Oneside_Rope_Trail_Update(_fmatrix WorldMat, _float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
m_pTrailCom->Rope_Trail_Update(WorldMat, fTimeDelta, m_TrailInfo.fDamping, m_TrailInfo.fRopeLength, m_TrailInfo.fMass);
|
||||
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
@@ -357,6 +367,7 @@ HRESULT CTrailObject::Load_Trail(const _char* pPath, LEVEL eLevel)
|
||||
|
||||
m_pTrailCom->ReStructVB(m_TrailInfo.iNumVertex);
|
||||
|
||||
|
||||
CloseHandle(hFile);
|
||||
|
||||
return S_OK;
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "Effect_Container.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CBlink final : public CEffect_Container
|
||||
{
|
||||
private:
|
||||
CBlink(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CBlink(const CBlink& rhs);
|
||||
virtual ~CBlink() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
|
||||
public:
|
||||
virtual HRESULT Pre_Setting(CGameObject* pObject, void* pArg = nullptr) override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
HRESULT Ready_Child();
|
||||
HRESULT Bind_ShaderResources() override;
|
||||
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
|
||||
private:
|
||||
_wstring m_wstrEffectName = {};
|
||||
|
||||
_bool m_isParticleEnd = {};
|
||||
_bool m_isTrailEnd = {};
|
||||
_float4x4 m_TrailStopMat = {};
|
||||
|
||||
_float m_fMoveAccTime = {};
|
||||
_float m_fAmountMove = {0.3f};
|
||||
_float m_fMoveSpeed = {5.f};
|
||||
|
||||
_float m_fSizeAccTime = {};
|
||||
_float m_fAmountSize = {};
|
||||
_float m_fSpeed = {};
|
||||
|
||||
class CEditEffect* m_pBlink_Swirl = { nullptr };
|
||||
class CEditEffect* m_pBlink_Circle = { nullptr };
|
||||
class CEditEffect* m_pBlink_Circle2 = { nullptr };
|
||||
class CEditEffect* m_pBlink_Distortion = { nullptr };
|
||||
|
||||
vector<class CTrailObject*> m_Blink_Trails = {};
|
||||
|
||||
_float m_fLength = { 5.f };
|
||||
_string m_BoneNames[10] = {};
|
||||
|
||||
|
||||
public:
|
||||
static CBlink* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual void Free() override;
|
||||
CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -36,7 +36,7 @@ namespace Editor
|
||||
ENEMY_HPBAR, BOSS_HPBAR, QUEST_BORDER, QUEST_INFO, QUEST_STATUS, BROOMSTICK,
|
||||
SPELL_LEARN, SPELLLEARNCOLOR,
|
||||
ENEMY_DETECTION, INTERACTION_OBJECT, END };
|
||||
enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, BLEND, BLEND_NOWORLD, BLOOM, BLOOM_NOWORLD, BLUR_NO_EMMISVE, BLUR_NO_WORLD_NO_EMISSIVE, WEIGHTBLEND_FOR_BLEND, DEPTH_STOP, WB_CULLING, SCREEN_FX , DISTORTION ,END };
|
||||
enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, BLEND, BLEND_NOWORLD, BLOOM, BLOOM_NOWORLD, BLUR_NO_EMMISVE, BLUR_NO_WORLD_NO_EMISSIVE, WEIGHTBLEND_FOR_BLEND, DEPTH_STOP, WB_CULLING, SCREEN_FX , DISTORTION , NONPOS , NONPOS_BLUR, END };
|
||||
enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, UVALPHABLEND, MAGIC_METER, SPELL_LIST, EESSENTIAL_SPELL_SOLT, EESSENTIAL_SPELL, COLOR, SPELL_HOVER, SPELL_SLOT_EFFECT, SPELL_SLOT, SPELL_LOCK, QUEST_SLOT, END };
|
||||
|
||||
enum class QUESTTYPE { MAIN, SUB, END };
|
||||
@@ -55,7 +55,7 @@ namespace Editor
|
||||
JAP_SIDE, BOMBARDA_SIDE, DESCENDO_SIDE, LEVIOSO_SIDE,
|
||||
|
||||
STUN,
|
||||
TROLL_ATTACK, TROLL_RUSH_HIT, TROLL_NOMAL_SMOKE,
|
||||
TROLL_ATTACK, TROLL_RUSH_HIT, TROLL_NOMAL_SMOKE, BLINK,
|
||||
END
|
||||
};
|
||||
|
||||
|
||||
@@ -102,10 +102,30 @@ class CPlayer final : public CUnit
|
||||
function<void()> m_InputAction = nullptr;
|
||||
|
||||
|
||||
_float3 m_OffsetPos = {};
|
||||
_float m_fAmount = { 1.f };
|
||||
_float m_fInputTime = {};
|
||||
_bool m_bRatio = { false };
|
||||
_int m_eUIState = { };
|
||||
_uint m_iLightCombo = { 0 };
|
||||
|
||||
_float3 m_OffsetPos = {};
|
||||
_float m_fAmount = { 1.f };
|
||||
_float m_fInputTime = {};
|
||||
_bool m_bRatio = { false };
|
||||
_bool m_bAim = { false };
|
||||
_float m_fAnimSpeed = {};
|
||||
_bool m_bOnce = { };
|
||||
_bool m_bLookAt = { false };
|
||||
_bool m_bSpellHit = {};
|
||||
_float3 m_BroomScale = { 0.f, 0.f, 0.f };
|
||||
_float3 m_vScale = { 0.f, 0.f, 0.f };
|
||||
_float3 m_TargetScale = { 1.f, 1.f, 1.f };
|
||||
_float m_fScaleSmoothSpeed = 2.5f;
|
||||
_bool m_bLumos = {};
|
||||
_bool m_bShield = { false };
|
||||
_float m_fAnimTime = {};
|
||||
_bool m_bTurbo = {};
|
||||
_float m_fBlinkTime = { };
|
||||
_float m_fAccel = { 1.f };
|
||||
_float m_fSlideSpeed = {};
|
||||
_float m_fTargetSpeed = { 7.f };
|
||||
|
||||
HRESULT InputAction();
|
||||
HRESULT InputMove();
|
||||
@@ -117,6 +137,10 @@ class CPlayer final : public CUnit
|
||||
HRESULT Behavior_IdleExitCheck(_float fTimeDelta);
|
||||
void Behavior_IdleExit();
|
||||
|
||||
void Behavior_BlinkEnter();
|
||||
HRESULT Behavior_BlinkExitCheck(_float fTimeDelta);
|
||||
void Behavior_BlinkExit();
|
||||
|
||||
void Behavior_MoveEnter();
|
||||
HRESULT Behavior_MoveExitCheck(_float fTimeDelta);
|
||||
void Behavior_MoveExit();
|
||||
@@ -130,7 +154,7 @@ class CPlayer final : public CUnit
|
||||
void Behavior_LandExit();
|
||||
|
||||
void Behavior_DodgeEnter();
|
||||
HRESULT Behavior_DodgeExitCheck();
|
||||
HRESULT Behavior_DodgeExitCheck(_float fTimeDelta);
|
||||
void Behavior_DodgeExit();
|
||||
|
||||
void Behavior_CombatEnter();
|
||||
|
||||
@@ -106,6 +106,9 @@ class CTrailObject final : public CPartObject
|
||||
void Set_Target(class CTransform* pTargetTransform);
|
||||
void Trail_Update(_fmatrix WorldMat, _float fTimeDelta);
|
||||
void Rope_Trail_Update(_fmatrix WorldMat, _fmatrix EndWorldMat, _float fTimeDelta);
|
||||
void Oneside_Rope_Trail_Update(_fmatrix WorldMat, _float fTimeDelta);
|
||||
void SetDissolve(_bool isDissolve) { m_TrailInfo.isDissolve = isDissolve; }
|
||||
TRAIL_INFO* Get_TrailInfo() { return &m_TrailInfo; }
|
||||
public:
|
||||
#ifdef _DEBUG
|
||||
HRESULT Save_Trail(const _char* pPath);
|
||||
|
||||
@@ -88,7 +88,7 @@ cbuffer g_ConstantBuffer : register(b0) // b0 << 이 숫자와 컨스턴트 쉐
|
||||
bool isMoveUp;
|
||||
bool isExcludePos;
|
||||
bool isStopMove_For_Depth_Compare;
|
||||
bool isPadding2;
|
||||
bool isNoPos;
|
||||
|
||||
float fTimeDelta;
|
||||
float fSizeLerpOption; // 반드시 상수버퍼는 16바이트 배수로 만들어져야 한다.
|
||||
@@ -146,6 +146,11 @@ void CS_MAIN(
|
||||
particle.vTranslation = CurMat[3].xyzw;
|
||||
}
|
||||
|
||||
if (isNoPos)
|
||||
{
|
||||
particle.vTranslation.xyz += WorldMatrix[3].xyz;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 라이프타임 움직임
|
||||
|
||||
@@ -888,6 +888,7 @@ HRESULT CGameInstance::Bind_CS_RenderTarget(_uint iIndex, const _wstring& strTar
|
||||
{
|
||||
return m_pRenderTarget_Manager->Bind_CS_RenderTarget(iIndex, strTargetTag);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CGameInstance::RenderTarget_Debuger()
|
||||
{
|
||||
|
||||
@@ -569,6 +569,8 @@ void CInstance_Model::Compute_CS(_float fTimeDelta)
|
||||
pDesc->isRandomAniIndex = m_InstanceDesc.isRandomAniIndex;
|
||||
pDesc->isExcludePos = m_InstanceDesc.isExcludePos;
|
||||
pDesc->isStop_Move_For_Depth_Compare = m_InstanceDesc.isStop_Move_For_Depth_Compare;
|
||||
pDesc->isNoPos = m_InstanceDesc.isNoPos;
|
||||
|
||||
|
||||
pDesc->WorldMatrix = *m_pOwner->Get_Component<CTransform>()->Get_WorldMatrixPtr();
|
||||
pDesc->fSizeLerpOption = m_InstanceDesc.fSizeLerpOption;
|
||||
@@ -857,6 +859,13 @@ void CInstance_Model::Describe_Entity()
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
if (GUI::Checkbox("NoPos", &m_InstanceDesc.isNoPos))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (GUI::Checkbox("RandomIndex", &m_InstanceDesc.isRandomAniIndex))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
|
||||
@@ -180,6 +180,7 @@ void CTrail::Trail_Update(_float fDeltaTime, _fmatrix WorldMatrix)
|
||||
XMStoreFloat3(&m_pVertices[m_iNumCount++].vPosition, vLerpLow);
|
||||
XMStoreFloat3(&m_pVertices[m_iNumCount++].vPosition, vLerpHigh);
|
||||
|
||||
|
||||
if (m_iNumCount >= m_iNumVertices)
|
||||
{
|
||||
memmove(m_pVertices, m_pVertices + 2, sizeof(VTXPOSTEX) * (m_iNumCount - 2));
|
||||
@@ -189,7 +190,7 @@ void CTrail::Trail_Update(_float fDeltaTime, _fmatrix WorldMatrix)
|
||||
|
||||
}
|
||||
|
||||
for (_uint i = 0; i < m_iNumCount; i += 2)
|
||||
for (_uint i = 0; i + 1 < m_iNumCount; i += 2)
|
||||
{
|
||||
|
||||
_float u = ((_float)i / (m_iNumCount - 2));
|
||||
@@ -201,7 +202,6 @@ void CTrail::Trail_Update(_float fDeltaTime, _fmatrix WorldMatrix)
|
||||
|
||||
m_pVertices[i + 1].vTexcoord = _float2(u, 1); // High
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -248,7 +248,7 @@ void CTrail::Rope_Trail_Update(_fmatrix WorldMatrix, _float fTimeDelta, _float f
|
||||
_vector vLow = XMVector3TransformCoord(XMLoadFloat3(&m_TrailDesc.vLow), WorldMat);
|
||||
_vector vHigh = XMVector3TransformCoord(XMLoadFloat3(&m_TrailDesc.vHigh), WorldMat);
|
||||
|
||||
/* 시작시 고정점 업데이트 */
|
||||
/* 시작 시 고정점 업데이트 */
|
||||
XMStoreFloat3(&m_pVertices[0].vPosition, vLow);
|
||||
XMStoreFloat3(&m_pVertices[1].vPosition, vHigh);
|
||||
|
||||
@@ -323,12 +323,12 @@ void CTrail::Rope_Trail_Update(_fmatrix WorldMatrix, _float fTimeDelta, _float f
|
||||
_float fHighDiff = (fLength - fHighDist) / fHighDist;
|
||||
|
||||
// 각 점을 절반씩 밀거나 당겨서 거리 맞춤
|
||||
// 손잡이(Pinned)는 움직이지 않도록 질량 비율 조절 가능 (여기선 0.5씩)
|
||||
|
||||
_vector vLowOffset = vDeltaLow * (fMass * fLowDiff);
|
||||
_vector vHighOffset = vDeltaHigh * (fMass * fHighDiff);
|
||||
|
||||
// k!=0 (즉, 움직이는 마디)일 때만 vFirst를 움직임
|
||||
// k!=0일 때만 vFirst를 움직임
|
||||
|
||||
if (k != 0)
|
||||
{
|
||||
vFirst[0] -= vLowOffset;
|
||||
@@ -340,12 +340,11 @@ void CTrail::Rope_Trail_Update(_fmatrix WorldMatrix, _float fTimeDelta, _float f
|
||||
vNext[1] += vHighOffset;
|
||||
|
||||
|
||||
// --- 2. 고정점 몫 몰아주기 (k=0 일 때만) ---
|
||||
// k=0일 때 vFirst (손잡이)가 움직이지 않은 몫을 vNext에게 전부 몰아줌
|
||||
|
||||
// k=0일 때 vFirst (손잡이)가 움직이지 않은 몫을 vNext (첫 마디)에게 전부 몰아줌
|
||||
if (k == 0)
|
||||
{
|
||||
// vFirst가 움직여야 할 양(-Offset)만큼 vNext에 추가 보정 (+Offset)
|
||||
// vFirst가 움직여야 할 만큼 vNext에 추가 보정
|
||||
vNext[0] += vLowOffset;
|
||||
vNext[1] += vHighOffset;
|
||||
}
|
||||
@@ -357,10 +356,7 @@ void CTrail::Rope_Trail_Update(_fmatrix WorldMatrix, _float fTimeDelta, _float f
|
||||
vFirst[1] -= vHighOffset;
|
||||
}
|
||||
|
||||
// --- 3. 결과 저장 ---
|
||||
|
||||
// vFirst 저장 (k=0 일 때는 vFirst가 vLow/vHigh의 값을 가지지만,
|
||||
// 움직이지 않았으므로 저장해도 무방. 하지만 명확성을 위해 조건부 저장 가능)
|
||||
|
||||
if (k != 0)
|
||||
{
|
||||
@@ -406,6 +402,176 @@ void CTrail::Rope_Trail_Update(_fmatrix WorldMatrix, _float fTimeDelta, _float f
|
||||
}
|
||||
}
|
||||
|
||||
void CTrail::Rope_Trail_Update(_fmatrix WorldMatrix, _float fTimeDelta, _float fDamping, _float fLength, _float fMass)
|
||||
{
|
||||
_matrix WorldMat = {};
|
||||
|
||||
WorldMat.r[0] = XMVector3Normalize(WorldMatrix.r[0]);
|
||||
WorldMat.r[1] = XMVector3Normalize(WorldMatrix.r[1]);
|
||||
WorldMat.r[2] = XMVector3Normalize(WorldMatrix.r[2]);
|
||||
WorldMat.r[3] = WorldMatrix.r[3];
|
||||
|
||||
_vector vLow = XMVector3TransformCoord(XMLoadFloat3(&m_TrailDesc.vLow), WorldMat);
|
||||
_vector vHigh = XMVector3TransformCoord(XMLoadFloat3(&m_TrailDesc.vHigh), WorldMat);
|
||||
|
||||
|
||||
if (m_iNumCount == 0)
|
||||
{
|
||||
for (_uint i = 0; i < m_iNumVertices; i += 2)
|
||||
{
|
||||
XMStoreFloat3(&m_pVertices[i].vPosition, vLow);
|
||||
XMStoreFloat3(&m_pVertices[i + 1].vPosition, vHigh);
|
||||
|
||||
m_pOldPosition[i] = m_pVertices[i].vPosition;
|
||||
m_pOldPosition[i + 1] = m_pVertices[i + 1].vPosition;
|
||||
}
|
||||
|
||||
// 처음엔 마디 1개(정점 2개)만 보여주며 시작
|
||||
m_iNumCount = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_iNumCount > 2)
|
||||
{
|
||||
memmove(m_pVertices + 2, m_pVertices, sizeof(VTXPOSTEX) * (m_iNumCount - 2));
|
||||
memmove(m_pOldPosition + 2, m_pOldPosition, sizeof(_float3) * (m_iNumCount - 2));
|
||||
}
|
||||
|
||||
if (m_iNumCount >= m_iNumVertices)
|
||||
m_iNumCount -= 2;
|
||||
|
||||
/* 시작 시 고정점 업데이트 */
|
||||
XMStoreFloat3(&m_pVertices[0].vPosition, vLow);
|
||||
XMStoreFloat3(&m_pVertices[1].vPosition, vHigh);
|
||||
|
||||
|
||||
m_pOldPosition[0] = m_pVertices[0].vPosition;
|
||||
m_pOldPosition[1] = m_pVertices[1].vPosition;
|
||||
|
||||
m_iNumCount += 2;
|
||||
}
|
||||
|
||||
|
||||
for (_uint i = 2; i < m_iNumCount; i++) /* 고정점은 연산에서 제외 0 , 1*/
|
||||
{
|
||||
|
||||
_vector vCurrentPos = XMLoadFloat3(&m_pVertices[i].vPosition);
|
||||
vCurrentPos = XMVectorSetW(vCurrentPos, 1.f);
|
||||
|
||||
|
||||
_vector vOldPos = XMLoadFloat3(&m_pOldPosition[i]);
|
||||
vOldPos = XMVectorSetW(vOldPos, 1.f);
|
||||
|
||||
//if (XMVectorGetX(XMVector3Length(vOldPos)) <= 0)
|
||||
// continue;
|
||||
|
||||
_vector vVelocity = (vCurrentPos - vOldPos) * fDamping;
|
||||
|
||||
_vector vGravity = XMVectorSet(0.0f, m_fGravity, 0.0f, 0.0f);
|
||||
|
||||
// Verlet 공식: Next = Curr + Vel + Acc * dt * dt
|
||||
_vector vNextPos = vCurrentPos + vVelocity + vGravity * (fTimeDelta * fTimeDelta);
|
||||
|
||||
// 과거 위치 갱신
|
||||
XMStoreFloat3(&m_pOldPosition[i], XMLoadFloat3(&m_pVertices[i].vPosition));
|
||||
|
||||
// 현재 위치 갱신
|
||||
XMStoreFloat3(&m_pVertices[i].vPosition, vNextPos);
|
||||
|
||||
}
|
||||
|
||||
for (int i = 0; i < 10; ++i) {
|
||||
for (_uint k = 0; k < m_iNumCount - 2; k += 2) {
|
||||
|
||||
/* Low , High */
|
||||
_vector vFirst[2] = { XMLoadFloat3(&m_pVertices[k].vPosition) , XMLoadFloat3(&m_pVertices[k + 1].vPosition) };
|
||||
_vector vNext[2] = { XMLoadFloat3(&m_pVertices[k + 2].vPosition) , XMLoadFloat3(&m_pVertices[k + 3].vPosition) };
|
||||
|
||||
|
||||
_vector vDeltaLow = vNext[0] - vFirst[0];
|
||||
_vector vDeltaHigh = vNext[1] - vFirst[1];
|
||||
|
||||
|
||||
_float fLowDist = XMVectorGetX(XMVector3Length(vDeltaLow));
|
||||
_float fHighDist = XMVectorGetX(XMVector3Length(vDeltaHigh));
|
||||
|
||||
// 거리가 0이면 오류 방지
|
||||
if (fLowDist < FLT_EPSILON5) continue;
|
||||
if (fHighDist < FLT_EPSILON5) continue;
|
||||
|
||||
// 늘어나거나 줄어든 비율 계산 (Difference)
|
||||
_float fLowDiff = (fLength - fLowDist) / fLowDist;
|
||||
_float fHighDiff = (fLength - fHighDist) / fHighDist;
|
||||
|
||||
// 각 점을 절반씩 밀거나 당겨서 거리 맞춤
|
||||
|
||||
_vector vLowOffset = vDeltaLow * (fMass * fLowDiff);
|
||||
_vector vHighOffset = vDeltaHigh * (fMass * fHighDiff);
|
||||
|
||||
// k!=0일 때만 vFirst를 움직임
|
||||
|
||||
if (k != 0)
|
||||
{
|
||||
vFirst[0] -= vLowOffset;
|
||||
vFirst[1] -= vHighOffset;
|
||||
}
|
||||
|
||||
// vNext는 모든 경우에 움직임
|
||||
vNext[0] += vLowOffset;
|
||||
vNext[1] += vHighOffset;
|
||||
|
||||
|
||||
// k=0일 때 vFirst (손잡이)가 움직이지 않은 몫을 vNext에게 전부 몰아줌
|
||||
|
||||
if (k == 0)
|
||||
{
|
||||
// vFirst가 움직여야 할 만큼 vNext에 추가 보정
|
||||
vNext[0] += vLowOffset;
|
||||
vNext[1] += vHighOffset;
|
||||
}
|
||||
|
||||
if (k != 0)
|
||||
{
|
||||
XMStoreFloat3(&m_pVertices[k].vPosition, vFirst[0]);
|
||||
XMStoreFloat3(&m_pVertices[k + 1].vPosition, vFirst[1]);
|
||||
}
|
||||
|
||||
// vNext 저장
|
||||
XMStoreFloat3(&m_pVertices[k + 2].vPosition, vNext[0]);
|
||||
XMStoreFloat3(&m_pVertices[k + 3].vPosition, vNext[1]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (_uint i = 0; i < m_iNumCount; i += 2)
|
||||
{
|
||||
|
||||
_float u = ((_float)i / (m_iNumCount - 2));
|
||||
|
||||
if (m_iNumCount - 2 <= 0)
|
||||
u = 0;
|
||||
|
||||
m_pVertices[i].vTexcoord = _float2(u, 0); // Low
|
||||
|
||||
m_pVertices[i + 1].vTexcoord = _float2(u, 1); // High
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
D3D11_MAPPED_SUBRESOURCE VBResource{};
|
||||
|
||||
if (SUCCEEDED(m_pContext->Map(m_pVB, 0, D3D11_MAP_WRITE_DISCARD, 0, &VBResource)))
|
||||
{
|
||||
|
||||
memcpy(VBResource.pData, m_pVertices, sizeof(VTXPOSTEX) * m_iNumVertices);
|
||||
|
||||
VTXPOSTEX* pDebug = static_cast<VTXPOSTEX*>(VBResource.pData);
|
||||
|
||||
m_pContext->Unmap(m_pVB, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void CTrail::Reset_Trail()
|
||||
{
|
||||
ZeroMemory(m_pVertices, sizeof(VTXPOSTEX) * m_iNumVertices);
|
||||
@@ -422,17 +588,24 @@ HRESULT CTrail::ReStructVB(_uint iNumVertices)
|
||||
{
|
||||
m_iNumVertices = iNumVertices;
|
||||
|
||||
|
||||
Safe_Delete_Array(m_pVertices);
|
||||
Safe_Delete_Array(m_pOldPosition);
|
||||
|
||||
if (FAILED(Create_VB()))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Create_IB()))
|
||||
return E_FAIL;
|
||||
|
||||
Safe_Delete_Array(m_pVertices);
|
||||
Safe_Delete_Array(m_pOldPosition);
|
||||
|
||||
m_pOldPosition = new _float3[m_iNumVertices];
|
||||
m_pVertices = new VTXPOSTEX[m_iNumVertices]{};
|
||||
m_pVertices = new VTXPOSTEX[m_iNumVertices];
|
||||
|
||||
ZeroMemory(m_pVertices, sizeof(VTXPOSTEX) * m_iNumVertices);
|
||||
ZeroMemory(m_pOldPosition, sizeof(_float3) * m_iNumVertices);
|
||||
|
||||
|
||||
Reset_Trail();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -453,6 +626,7 @@ HRESULT CTrail::Save_Trail(HANDLE hFile)
|
||||
HRESULT CTrail::Load_Trail(TRAIL_DESC TrailDesc)
|
||||
{
|
||||
m_TrailDesc = TrailDesc;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ class ENGINE_DLL CInstance_Model final : public CComponent
|
||||
_float fMoveLerpOption = {};
|
||||
|
||||
_bool isDetphCompareStop = {};
|
||||
_bool isPadding0 = {};
|
||||
_bool isNoPos = {};
|
||||
|
||||
_float3 vVelocityMin = {};
|
||||
_float3 vVelocityMax = {};
|
||||
@@ -176,7 +176,7 @@ class ENGINE_DLL CInstance_Model final : public CComponent
|
||||
_int isMoveUp = {};
|
||||
_int isExcludePos = {};
|
||||
_int isStop_Move_For_Depth_Compare = {};
|
||||
_int isPadding2 = {};
|
||||
_int isNoPos = {};
|
||||
|
||||
_float fTimeDelta = {};
|
||||
_float fSizeLerpOption = {};
|
||||
|
||||
@@ -30,6 +30,7 @@ class ENGINE_DLL CTrail final :
|
||||
|
||||
public:
|
||||
void Rope_Trail_Update(_fmatrix WorldMatrix, _float fTimeDelta , _float fDamping, _float fLength, _float fMass, _fmatrix EndWorldMatrix);
|
||||
void Rope_Trail_Update(_fmatrix WorldMatrix, _float fTimeDelta, _float fDamping, _float fLength, _float fMass);
|
||||
void Rope_Fix(_bool isFix) { m_isFix = isFix; }
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
|
||||
Reference in New Issue
Block a user