commit
This commit is contained in:
@@ -161,6 +161,8 @@ call Update_Resources.bat
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\Public\Action_Panel.h" />
|
||||
<ClInclude Include="..\Public\Barral_Splesh.h" />
|
||||
<ClInclude Include="..\Public\LightningSide.h" />
|
||||
<ClInclude Include="..\Public\Lightning.h" />
|
||||
<ClInclude Include="..\Public\Stupefy.h" />
|
||||
<ClInclude Include="..\Public\BroomRaceManager.h" />
|
||||
<ClInclude Include="..\Public\BroomRacerAI.h" />
|
||||
@@ -366,6 +368,8 @@ call Update_Resources.bat
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\Private\Action_Panel.cpp" />
|
||||
<ClCompile Include="..\Private\LightningSide.cpp" />
|
||||
<ClCompile Include="..\Private\Lightning.cpp" />
|
||||
<ClCompile Include="..\Private\Stupefy.cpp" />
|
||||
<ClCompile Include="..\Private\Boss_HpBar.cpp" />
|
||||
<ClCompile Include="..\Private\Barral_Splesh.cpp" />
|
||||
|
||||
@@ -636,6 +636,12 @@
|
||||
<ClInclude Include="..\public\MapElement_Static.h">
|
||||
<Filter>02.GameObjects\Environment\03.MapElement\Static</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Lightning.h">
|
||||
<Filter>02.GameObjects\Effect\Effects\Lightning</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\LightningSide.h">
|
||||
<Filter>02.GameObjects\Effect\Effects\Lightning\LightningSide</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Client.ico">
|
||||
@@ -1330,6 +1336,12 @@
|
||||
<Filter Include="02.GameObjects\Environment\03.MapElement\Static">
|
||||
<UniqueIdentifier>{c3b86f00-da19-47ad-a26e-7ff641e2c4d4}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Effect\Effects\Lightning">
|
||||
<UniqueIdentifier>{8abf6703-8c12-4dd5-9a10-a6747a1c6037}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Effect\Effects\Lightning\LightningSide">
|
||||
<UniqueIdentifier>{b494a051-9dcc-4739-9048-13fb963c441f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Client.cpp">
|
||||
@@ -1913,6 +1925,12 @@
|
||||
<ClCompile Include="..\private\MapElement_Static.cpp">
|
||||
<Filter>02.GameObjects\Environment\03.MapElement\Static</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Lightning.cpp">
|
||||
<Filter>02.GameObjects\Effect\Effects\Lightning</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\LightningSide.cpp">
|
||||
<Filter>02.GameObjects\Effect\Effects\Lightning\LightningSide</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\Private\Goblin_States.cpp">
|
||||
|
||||
@@ -35,6 +35,8 @@
|
||||
#include "Accio.h"
|
||||
#include "Screen_Wind.h"
|
||||
#include "Stupefy.h"
|
||||
#include "Lightning.h"
|
||||
#include "LightningSide.h"
|
||||
|
||||
CEffectPool::CEffectPool(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CGameObject(pDevice, pContext)
|
||||
@@ -381,6 +383,23 @@ HRESULT CEffectPool::Ready_Effect()
|
||||
return pEffect; }
|
||||
))) return E_FAIL;
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::LIGHTNING, 3, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CLightning* pEffect = nullptr;
|
||||
|
||||
pEffect = m_pGameInstance->Clone_Prototype<CLightning>(iPrototypeLevel, nullptr);
|
||||
|
||||
return pEffect; }
|
||||
))) return E_FAIL;
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::LIGHTNING_SIDE, 3, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CLightningSide* pEffect = nullptr;
|
||||
|
||||
pEffect = m_pGameInstance->Clone_Prototype<CLightningSide>(iPrototypeLevel, nullptr);
|
||||
|
||||
return pEffect; }
|
||||
))) return E_FAIL;
|
||||
|
||||
|
||||
return S_OK;
|
||||
|
||||
@@ -0,0 +1,229 @@
|
||||
#include "pch.h"
|
||||
#include "Lightning.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "EffectParts.h"
|
||||
#include "Wand.h"
|
||||
#include "Player.h"
|
||||
#include "InfoInstance.h"
|
||||
|
||||
CLightning::CLightning(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CEffect_Container{ pDevice, pContext }
|
||||
{
|
||||
}
|
||||
|
||||
CLightning::CLightning(const CLightning& rhs)
|
||||
: CEffect_Container(rhs),
|
||||
m_pInfoInstance(CInfoInstance::GetInstance())
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CLightning::Initialize_Prototype()
|
||||
{
|
||||
|
||||
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Lightning")))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
|
||||
}
|
||||
|
||||
HRESULT CLightning::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_iSkillType = ENUM_CLASS(SKILL_TYPE::LIGHTNING);
|
||||
|
||||
m_wstrEffectName = L"Lightning";
|
||||
|
||||
|
||||
|
||||
m_fDuration = 5.5f;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CLightning::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
|
||||
|
||||
}
|
||||
|
||||
void CLightning::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
|
||||
Update_Event(fTimeDelta);
|
||||
|
||||
}
|
||||
|
||||
void CLightning::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
|
||||
//if (false == m_bHit) {
|
||||
// _vector vStartPos = XMLoadFloat4(&m_vStartPos);
|
||||
// _vector vEndPos = XMLoadFloat4(&m_vEndPos);
|
||||
// ON_COLLISION_INFO CollisionInfo = SweepTarget(vStartPos, vEndPos, 0.002f , true);
|
||||
|
||||
// OnCollision(this, &CollisionInfo);
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
HRESULT CLightning::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Pre_Setting(pObject, nullptr)))
|
||||
return E_FAIL;
|
||||
|
||||
CWand* pWand = static_cast<CWand*>(m_pOwner);
|
||||
|
||||
if (pWand == nullptr)
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
CPartObject* pBottomLightning = Get_PartObject<CEffectParts>("BottomLightning");
|
||||
CPartObject* pFlare = Get_PartObject<CEffectParts>("Flare");
|
||||
CPartObject* pHitPT0 = Get_PartObject<CEffectParts>("HitPT0");
|
||||
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");
|
||||
|
||||
_vector vDirection = m_pOwner->Get_Component<CTransform>()->Get_State(STATE::LOOK);
|
||||
XMStoreFloat3(&m_vCameraLook, vDirection);
|
||||
|
||||
_vector vStartPos = pWand->Get_Owner()->Get_Component<CCharacter_Controller>()->Get_FootPosition();
|
||||
XMStoreFloat4(&m_vStartPos, vStartPos);
|
||||
|
||||
{ /* 대상 위치 지정 */
|
||||
|
||||
m_pInfoInstance->Get_LockOnInfo(m_Info);
|
||||
if (nullptr != m_Info.pUnit) {
|
||||
|
||||
XMStoreFloat4(&m_vTargetPos, m_Info.pUnit->Get_Component<CCharacter_Controller>()->Get_FootPosition());
|
||||
|
||||
XMStoreFloat3(&m_vCameraLook, XMVector3Normalize(XMLoadFloat4(&m_vTargetPos) - XMLoadFloat4(&m_vStartPos)));
|
||||
}
|
||||
else {
|
||||
// 타겟이 없다면 현재위치 -> 카메라 룩벡터 * duration간 예상 이동거리 를 대상으로 지정
|
||||
XMStoreFloat4(&m_vTargetPos, vStartPos + vDirection * m_fLinearSpeed * 0.5f);
|
||||
}
|
||||
}
|
||||
|
||||
pBottomLightning->Set_Visible(true);
|
||||
pFlare->Set_Visible(true);
|
||||
pHitPT0->Set_Visible(true);
|
||||
pLightning_Tornado_PT->Set_Visible(true);
|
||||
pLightning0->Set_Visible(true);
|
||||
pStart_Line->Set_Visible(true);
|
||||
pStraight_Lightning->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));
|
||||
pHitPT0->Get_Component<CTransform>()->Set_State(STATE::POSITION, XMLoadFloat4(&m_vTargetPos));
|
||||
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));
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLightning::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLightning::Ready_Child()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CLightning* CLightning::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CLightning* pInstance = new CLightning(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CLightning");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
|
||||
CGameObject* CLightning::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CLightning* pInstance = new CLightning(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CLightning");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CLightning::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
{
|
||||
if (m_bHit == false)
|
||||
return;
|
||||
|
||||
ON_COLLISION_INFO CollisionDesc = *static_cast<ON_COLLISION_INFO*>(pDesc);
|
||||
|
||||
_vector vPos = XMLoadFloat4(&CollisionDesc.vWorldPos);
|
||||
|
||||
|
||||
for (auto& pPair : m_PartObjects)
|
||||
{
|
||||
pPair.second->Set_Visible(true);
|
||||
pPair.second->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos);
|
||||
}
|
||||
|
||||
CWand* pWand = static_cast<CPlayer*>(m_pOwner)->Get_PartObject<CWand>();
|
||||
|
||||
if (pWand == nullptr)
|
||||
return;
|
||||
|
||||
|
||||
}
|
||||
|
||||
void CLightning::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
void CLightning::Describe_Entity()
|
||||
{
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
HRESULT CLightning::Bind_ShaderResources()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,204 @@
|
||||
#include "pch.h"
|
||||
#include "LightningSide.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "EffectParts.h"
|
||||
#include "Player.h"
|
||||
#include "Wand.h"
|
||||
#include "TrailObject.h"
|
||||
|
||||
|
||||
CLightningSide::CLightningSide(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CEffect_Container{ pDevice, pContext }
|
||||
|
||||
{
|
||||
}
|
||||
|
||||
CLightningSide::CLightningSide(const CLightningSide& rhs)
|
||||
: CEffect_Container(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CLightningSide::Initialize_Prototype()
|
||||
{
|
||||
|
||||
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/LightningSide")))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
|
||||
}
|
||||
|
||||
HRESULT CLightningSide::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"LightningSide";
|
||||
|
||||
m_pWandLight = Get_PartObject<CEffectParts>("Wand_Light_B");
|
||||
m_pWandTrail = Get_PartObject<CTrailObject>();
|
||||
|
||||
SAFE_ADDREF(m_pWandLight);
|
||||
SAFE_ADDREF(m_pWandTrail);
|
||||
|
||||
m_fDuration = 3.f;
|
||||
|
||||
m_Events.emplace(0.5f, [&]() {
|
||||
CWand* pWand = static_cast<CWand*>(m_pOwner);
|
||||
|
||||
if (pWand == nullptr)
|
||||
return;
|
||||
|
||||
m_isTrailEnd = true;
|
||||
|
||||
XMStoreFloat4x4(&m_TrailStopMat, pWand->Get_WorldMatrix());
|
||||
});
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CLightningSide::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
|
||||
}
|
||||
|
||||
void CLightningSide::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
|
||||
Update_Event(fTimeDelta);
|
||||
|
||||
|
||||
CWand* pWand = static_cast<CWand*>(m_pOwner);
|
||||
|
||||
if (pWand == nullptr)
|
||||
return;
|
||||
|
||||
m_pWandLight->Get_Component<CTransform>()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
|
||||
|
||||
_matrix TrailMat = m_isTrailEnd ? XMLoadFloat4x4(&m_TrailStopMat) : pWand->Get_WorldMatrix();
|
||||
m_pWandTrail->Trail_Update(TrailMat, fTimeDelta);
|
||||
|
||||
}
|
||||
|
||||
void CLightningSide::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
|
||||
|
||||
}
|
||||
|
||||
HRESULT CLightningSide::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Pre_Setting(pObject, nullptr)))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
CWand* pWand = static_cast<CWand*>(m_pOwner);
|
||||
|
||||
if (pWand == nullptr)
|
||||
return E_FAIL;
|
||||
|
||||
m_isTrailEnd = false;
|
||||
|
||||
CEffectParts* pWand_Lightning = Get_PartObject<CEffectParts>("Wand_Lightning");
|
||||
|
||||
m_pWandLight->Set_Visible(true);
|
||||
pWand_Lightning->Set_Visible(true);
|
||||
|
||||
/*트레일 초기화 */
|
||||
m_pWandTrail->Set_Visible(true);
|
||||
m_pWandTrail->Get_Component<CTrail>()->Reset_Trail();
|
||||
|
||||
/*_vector pPos = pPlayer->Get_WandPos().r[3];*/
|
||||
|
||||
m_pWandLight->Get_Component<CTransform>()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
|
||||
pWand_Lightning->Get_Component<CTransform>()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLightningSide::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLightningSide::Ready_Child()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CLightningSide* CLightningSide::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CLightningSide* pInstance = new CLightningSide(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CLightningSide");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
|
||||
CGameObject* CLightningSide::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CLightningSide* pInstance = new CLightningSide(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CLightningSide");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CLightningSide::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
{
|
||||
ON_COLLISION_INFO* CollisionDesc = static_cast<ON_COLLISION_INFO*>(pDesc);
|
||||
|
||||
}
|
||||
|
||||
void CLightningSide::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
|
||||
Safe_Release(m_pWandLight);
|
||||
Safe_Release(m_pWandTrail);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CLightningSide::Describe_Entity()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
HRESULT CLightningSide::Bind_ShaderResources()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -166,6 +166,8 @@
|
||||
#include "Barral_Splesh.h"
|
||||
#include "Screen_Wind.h"
|
||||
#include "Stupefy.h"
|
||||
#include "Lightning.h"
|
||||
#include "LightningSide.h"
|
||||
|
||||
#pragma endregion
|
||||
|
||||
@@ -1730,8 +1732,14 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CLightning>(NEXT_LEVEL, CLightning::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CLightningSide>(NEXT_LEVEL, CLightningSide::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;
|
||||
|
||||
@@ -1206,7 +1206,7 @@ void CPlayer::Behavior_SpellEnter()
|
||||
{
|
||||
case ENUM_CLASS(SKILL_TYPE::BOMBARDA):
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::STUPEFY, this); }, /* 임시로 바꿔놓음 */
|
||||
[this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::BOMBARDA, this); }, /* 임시로 바꿔놓음 */
|
||||
fRatio);
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::BOMBARDA_SIDE, Get_PartObject<CWand>()); },
|
||||
@@ -1495,6 +1495,18 @@ void CPlayer::Behavior_AncientSpellEnter()
|
||||
[&]() { pairAnimInfo = m_Animation[STATEANIM::ANCIENT_LIGHTNING];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); },
|
||||
0.5f);
|
||||
|
||||
Add_Event(m_Animation[STATEANIM::ANCIENT_LIGHTNING].first,
|
||||
[this]() {
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::LIGHTNING, Get_PartObject<CWand>());
|
||||
},
|
||||
0.15f);
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::LIGHTNING_SIDE, Get_PartObject<CWand>());
|
||||
},
|
||||
0.35f);
|
||||
}
|
||||
|
||||
HRESULT CPlayer::Behavior_AncientSpellExitCheck()
|
||||
@@ -1597,6 +1609,10 @@ HRESULT CPlayer::Behavior_ShieldExitCheck()
|
||||
[this]() {m_bLookAt = true;
|
||||
},
|
||||
0.01f);
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::BOMBARDA_SIDE, Get_PartObject<CWand>()); },
|
||||
0.01f);
|
||||
}
|
||||
|
||||
Start_CameraShake(0.3f, 2.f);
|
||||
|
||||
@@ -140,13 +140,14 @@ HRESULT CStupefy::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
pStupefy_PJ1->Get_Component<CTransform>()->Set_State(STATE::POSITION, vWandPos);
|
||||
|
||||
m_pStupefy_PJ_PT->Get_Component<CTransform>()->Set_State(STATE::POSITION, vWandPos);
|
||||
|
||||
pStupefy_Light_Long->Get_Component<CTransform>()->Set_State(STATE::POSITION, vWandPos);
|
||||
pBodyFlare->Get_Component<CTransform>()->Set_State(STATE::POSITION, vWandPos);
|
||||
//
|
||||
/*몸통 포지션*/
|
||||
|
||||
_vector vPlayerPos = m_pOwner->Get_Component<CCharacter_Controller>()->Get_Position() + vDirection * -0.1f;
|
||||
|
||||
pStupefy_Light_Long->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPlayerPos);
|
||||
pBodyFlare->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPlayerPos);
|
||||
pWand_Distortion->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPlayerPos);
|
||||
/*발 포지션*/
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace Client
|
||||
AVADA_KEDAVRA, CRUCIO, IMPERIO, // 진녹색
|
||||
BEAST_PETTING_BRUSH, BEAST_FEED, NAB_SACK, // 하늘색
|
||||
JAP, REVELIO, PROTEGO, STUPEFY, // 검은색
|
||||
ANCIENT_MAGIC_THROW, ANCIENT_MAGIC, ALOHOMORA, PETRIFICUS_TOTALUS,
|
||||
ANCIENT_MAGIC_THROW, ANCIENT_MAGIC, ALOHOMORA, PETRIFICUS_TOTALUS, LIGHTNING,
|
||||
|
||||
/* PROPS */
|
||||
BOX_SPLESH, CHAIL_SPLESH , BARRAL_SPLASH,
|
||||
@@ -56,7 +56,7 @@ namespace Client
|
||||
SCREEN_WIND,
|
||||
|
||||
/*사이드*/
|
||||
JAP_SIDE, BOMBARDA_SIDE, DESCENDO_SIDE, LEVIOSO_SIDE, WAND_END,
|
||||
JAP_SIDE, BOMBARDA_SIDE, DESCENDO_SIDE, LEVIOSO_SIDE, WAND_END, LIGHTNING_SIDE,
|
||||
|
||||
/*트롤*/
|
||||
TROLL_ATTACK, TROLL_RUSH_HIT, TROLL_NOMAL_SMOKE, GOBLIN_PROTEGO,
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "Effect_Container.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CLightning final : public CEffect_Container
|
||||
{
|
||||
private:
|
||||
CLightning(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CLightning(const CLightning& rhs);
|
||||
virtual ~CLightning() = 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:
|
||||
class CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
private:
|
||||
_wstring m_wstrEffectName = {};
|
||||
|
||||
_float4 m_vStartPos = { 0.f, 0.f, 0.f, 1.f }; // 현재 발사 된 위치
|
||||
_float4 m_vTargetPos = { 0.f, 0.f, 10.f, 1.f }; // 현재 타게팅 된 위치
|
||||
_float m_fLinearSpeed = 5.f;
|
||||
_float3 m_vCameraLook = {};
|
||||
|
||||
public:
|
||||
static CLightning* 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
|
||||
@@ -0,0 +1,51 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "Effect_Container.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CLightningSide final : public CEffect_Container
|
||||
{
|
||||
private:
|
||||
CLightningSide(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CLightningSide(const CLightningSide& rhs);
|
||||
virtual ~CLightningSide() = 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_isTrailEnd = {};
|
||||
_float4x4 m_TrailStopMat = {};
|
||||
|
||||
class CEffectParts* m_pWandLight = { nullptr };
|
||||
class CTrailObject* m_pWandTrail = { nullptr };
|
||||
|
||||
public:
|
||||
static CLightningSide* 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
|
||||
@@ -41,7 +41,7 @@ class CStupefy final : public CEffect_Container
|
||||
|
||||
_float4 m_vStartPos = { 0.f, 0.f, 0.f, 1.f }; // 현재 발사 된 위치
|
||||
_float4 m_vTargetPos = { 0.f, 0.f, 10.f, 1.f }; // 현재 타게팅 된 위치
|
||||
_float m_fLinearSpeed = 0.65f;
|
||||
_float m_fLinearSpeed = 0.7f;
|
||||
_float3 m_vCameraLook = {};
|
||||
public:
|
||||
static CStupefy* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
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.
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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -52,6 +52,9 @@ struct ParticleValue
|
||||
float fAcceleration;
|
||||
|
||||
bool isStop;
|
||||
|
||||
float fRotateAttenuation;
|
||||
float fRotateAttDelay;
|
||||
};
|
||||
|
||||
|
||||
@@ -175,7 +178,13 @@ void CS_MAIN(
|
||||
particle.vLifeTime.x = 0.f;
|
||||
particleValue.vDelay.x = 0.f;
|
||||
particleValue.isStop = false;
|
||||
|
||||
|
||||
particleValue.vMaskingUVMoveTime.x = 0.f;
|
||||
particleValue.vDiffuseUVMoveTime.x = 0.f;
|
||||
particleValue.vNoiseUVMoveTime.x = 0.f;
|
||||
particleValue.vDistortionUVMoveTime.x = 0.f;
|
||||
particleValue.vDissolveUVMoveTime.x = 0.f;
|
||||
|
||||
if (isRandomAniIndex == false)
|
||||
particleValue.vAniIndex.x = 0.f;
|
||||
|
||||
@@ -316,6 +325,21 @@ void CS_MAIN(
|
||||
particle.vTranslation += vector( sin(particle.vLifeTime.x * 3.141592 * 2.f) * particleValue.vSinAmount, 0.f);
|
||||
}
|
||||
|
||||
|
||||
/* Rotate Time */
|
||||
float fTimeX = (particle.vLifeTime.x - particleValue.fRotateAttDelay);
|
||||
float fTimeY = (particle.vLifeTime.y - particleValue.fRotateAttDelay);
|
||||
float fRotateTimeRatio = 0;
|
||||
|
||||
if (particleValue.fRotateAttDelay <= FLT_EPSILON5)
|
||||
{
|
||||
fRotateTimeRatio = particle.vLifeTime.x / particle.vLifeTime.y;
|
||||
}
|
||||
else if (fTimeX > 0 && fTimeY != 0)
|
||||
{
|
||||
fRotateTimeRatio = saturate(fTimeX / fTimeY);
|
||||
}
|
||||
|
||||
if (isTurn == true)
|
||||
{
|
||||
float fRotationSpeed = 1.f;
|
||||
@@ -323,6 +347,11 @@ void CS_MAIN(
|
||||
if (particleValue.fRotaionSpeed > FLT_EPSILON5)
|
||||
fRotationSpeed = particleValue.fRotaionSpeed;
|
||||
|
||||
fRotationSpeed = fRotationSpeed - fRotateTimeRatio * particleValue.fRotateAttenuation;
|
||||
|
||||
if (fRotationSpeed < FLT_EPSILON5)
|
||||
fRotationSpeed = 0.f;
|
||||
|
||||
/* ROTATE */
|
||||
float4x4 RotateXMat = RotateX(particleValue.vDeltaAngle.x * fTimeDelta * fRotationSpeed);
|
||||
float4x4 RotateYMat = RotateY(particleValue.vDeltaAngle.y * fTimeDelta * fRotationSpeed);
|
||||
@@ -350,6 +379,11 @@ void CS_MAIN(
|
||||
if (particleValue.fRotaionSpeed > FLT_EPSILON5)
|
||||
fRotationSpeed = particleValue.fRotaionSpeed;
|
||||
|
||||
fRotationSpeed = fRotationSpeed - fRotateTimeRatio * particleValue.fRotateAttenuation;
|
||||
|
||||
if (fRotationSpeed < FLT_EPSILON5)
|
||||
fRotationSpeed = 0.f;
|
||||
|
||||
float4x4 RotateAxisRightMat = RotateAxis(particle.vRight, particleValue.vDeltaAxisAngle.x * fRotationSpeed * fTimeDelta);
|
||||
float4x4 RotateAxisUpMat = RotateAxis(particle.vUp, particleValue.vDeltaAxisAngle.y * fRotationSpeed * fTimeDelta);
|
||||
float4x4 RotateAxisLookMat = RotateAxis(particle.vLook, particleValue.vDeltaAxisAngle.z * fRotationSpeed * fTimeDelta);
|
||||
|
||||
@@ -42,6 +42,9 @@ struct ParticleValue
|
||||
float fAcceleration;
|
||||
|
||||
bool isStop;
|
||||
|
||||
float fRotateAttenuation;
|
||||
float fRotateAttDelay;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -52,6 +52,9 @@ struct ParticleValue
|
||||
float fAcceleration;
|
||||
|
||||
bool isStop;
|
||||
|
||||
float fRotateAttenuation;
|
||||
float fRotateAttDelay;
|
||||
};
|
||||
|
||||
|
||||
@@ -175,7 +178,13 @@ void CS_MAIN(
|
||||
particle.vLifeTime.x = 0.f;
|
||||
particleValue.vDelay.x = 0.f;
|
||||
particleValue.isStop = false;
|
||||
|
||||
|
||||
particleValue.vMaskingUVMoveTime.x = 0.f;
|
||||
particleValue.vDiffuseUVMoveTime.x = 0.f;
|
||||
particleValue.vNoiseUVMoveTime.x = 0.f;
|
||||
particleValue.vDistortionUVMoveTime.x = 0.f;
|
||||
particleValue.vDissolveUVMoveTime.x = 0.f;
|
||||
|
||||
if (isRandomAniIndex == false)
|
||||
particleValue.vAniIndex.x = 0.f;
|
||||
|
||||
@@ -316,6 +325,21 @@ void CS_MAIN(
|
||||
particle.vTranslation += vector( sin(particle.vLifeTime.x * 3.141592 * 2.f) * particleValue.vSinAmount, 0.f);
|
||||
}
|
||||
|
||||
|
||||
/* Rotate Time */
|
||||
float fTimeX = (particle.vLifeTime.x - particleValue.fRotateAttDelay);
|
||||
float fTimeY = (particle.vLifeTime.y - particleValue.fRotateAttDelay);
|
||||
float fRotateTimeRatio = 0;
|
||||
|
||||
if (particleValue.fRotateAttDelay <= FLT_EPSILON5)
|
||||
{
|
||||
fRotateTimeRatio = particle.vLifeTime.x / particle.vLifeTime.y;
|
||||
}
|
||||
else if (fTimeX > 0 && fTimeY != 0)
|
||||
{
|
||||
fRotateTimeRatio = saturate(fTimeX / fTimeY);
|
||||
}
|
||||
|
||||
if (isTurn == true)
|
||||
{
|
||||
float fRotationSpeed = 1.f;
|
||||
@@ -323,6 +347,11 @@ void CS_MAIN(
|
||||
if (particleValue.fRotaionSpeed > FLT_EPSILON5)
|
||||
fRotationSpeed = particleValue.fRotaionSpeed;
|
||||
|
||||
fRotationSpeed = fRotationSpeed - fRotateTimeRatio * particleValue.fRotateAttenuation;
|
||||
|
||||
if (fRotationSpeed < FLT_EPSILON5)
|
||||
fRotationSpeed = 0.f;
|
||||
|
||||
/* ROTATE */
|
||||
float4x4 RotateXMat = RotateX(particleValue.vDeltaAngle.x * fTimeDelta * fRotationSpeed);
|
||||
float4x4 RotateYMat = RotateY(particleValue.vDeltaAngle.y * fTimeDelta * fRotationSpeed);
|
||||
@@ -350,6 +379,11 @@ void CS_MAIN(
|
||||
if (particleValue.fRotaionSpeed > FLT_EPSILON5)
|
||||
fRotationSpeed = particleValue.fRotaionSpeed;
|
||||
|
||||
fRotationSpeed = fRotationSpeed - fRotateTimeRatio * particleValue.fRotateAttenuation;
|
||||
|
||||
if (fRotationSpeed < FLT_EPSILON5)
|
||||
fRotationSpeed = 0.f;
|
||||
|
||||
float4x4 RotateAxisRightMat = RotateAxis(particle.vRight, particleValue.vDeltaAxisAngle.x * fRotationSpeed * fTimeDelta);
|
||||
float4x4 RotateAxisUpMat = RotateAxis(particle.vUp, particleValue.vDeltaAxisAngle.y * fRotationSpeed * fTimeDelta);
|
||||
float4x4 RotateAxisLookMat = RotateAxis(particle.vLook, particleValue.vDeltaAxisAngle.z * fRotationSpeed * fTimeDelta);
|
||||
|
||||
@@ -741,7 +741,9 @@ void CInstance_Model::Instane_Buffer_ReStruct()
|
||||
pParticleValues[i].vDelay = _float2(0.0f, m_pGameInstance->Random_Float(m_InstanceDesc.vDelay.x, m_InstanceDesc.vDelay.y));
|
||||
pParticleValues[i].fDropAttenuation = m_pGameInstance->Random_Float(m_InstanceDesc.vDropAttenuation.x, m_InstanceDesc.vDropAttenuation.y);
|
||||
pParticleValues[i].fAcceleration = _float(m_pGameInstance->Random_Float(m_InstanceDesc.vAcceleration.x, m_InstanceDesc.vAcceleration.y));
|
||||
|
||||
pParticleValues[i].fRotateAttenuation = _float(m_pGameInstance->Random_Float(m_InstanceDesc.vRotateAttenuation.x, m_InstanceDesc.vRotateAttenuation.y));
|
||||
pParticleValues[i].fRotateAttDelay = _float(m_pGameInstance->Random_Float(m_InstanceDesc.vRotateAttDelay.x, m_InstanceDesc.vRotateAttDelay.y));
|
||||
|
||||
pParticleValues[i].fCollisionTime = 0.f;
|
||||
pParticleValues[i].isCompareStop = false;
|
||||
pParticleValues[i].isStop = false;
|
||||
@@ -1011,6 +1013,18 @@ void CInstance_Model::Describe_Entity()
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat2("RotateAttenuation", reinterpret_cast<_float*>(&m_InstanceDesc.vRotateAttenuation)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat2("RotateAttDelay", reinterpret_cast<_float*>(&m_InstanceDesc.vRotateAttDelay)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (GUI::TreeNode("Nomal Turn"))
|
||||
{
|
||||
if (GUI::Checkbox("Turn", &m_InstanceDesc.isTurn))
|
||||
|
||||
@@ -61,8 +61,8 @@ class ENGINE_DLL CInstance_Model final : public CComponent
|
||||
|
||||
_float2 vDropAttenuation = { 1.f , 1.f };
|
||||
|
||||
_float fPadding0 = {};
|
||||
_float3 vPadding1 = {};
|
||||
_float2 vRotateAttenuation = {};
|
||||
_float2 vRotateAttDelay = {};
|
||||
|
||||
_float fSizeLerpOption = {};
|
||||
_float fMoveLerpOption = {};
|
||||
@@ -231,6 +231,8 @@ class ENGINE_DLL CInstance_Model final : public CComponent
|
||||
_float fAcceleration = {};
|
||||
|
||||
_bool isStop = {};
|
||||
_float fRotateAttenuation = {};
|
||||
_float fRotateAttDelay = {};
|
||||
|
||||
}CS_PARTICLE_VALUE_DESC;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user