commit
This commit is contained in:
@@ -69,7 +69,7 @@ HRESULT CEffectPool::Initialize(void* pArg)
|
||||
m_isActiveMonsterEffectCreate = false;
|
||||
#endif //
|
||||
#ifdef 진우
|
||||
m_isActiveEffectCreate = true;
|
||||
m_isActiveEffectCreate = false;
|
||||
m_isActiveMonsterEffectCreate = true;
|
||||
#endif //
|
||||
#ifdef 기무리
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "EffectParts.h"
|
||||
#include "Wand.h"
|
||||
#include "Player.h"
|
||||
#include "InfoInstance.h"
|
||||
|
||||
CMage_Down_Attack::CMage_Down_Attack(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CEffect_Container{ pDevice, pContext }
|
||||
@@ -12,8 +13,10 @@ CMage_Down_Attack::CMage_Down_Attack(ID3D11Device* pDevice, ID3D11DeviceContext*
|
||||
}
|
||||
|
||||
CMage_Down_Attack::CMage_Down_Attack(const CMage_Down_Attack& rhs)
|
||||
: CEffect_Container(rhs)
|
||||
: CEffect_Container(rhs),
|
||||
m_pInfoInstance(CInfoInstance::GetInstance())
|
||||
{
|
||||
SAFE_ADDREF(m_pInfoInstance);
|
||||
}
|
||||
|
||||
HRESULT CMage_Down_Attack::Initialize_Prototype()
|
||||
@@ -100,6 +103,18 @@ HRESULT CMage_Down_Attack::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
pRound_PT->Set_Visible(true);
|
||||
|
||||
|
||||
CPlayer* pPlayer = static_cast<CPlayer*>(m_pInfoInstance->Get_NearestPlayerAlly(m_pOwner->Get_WorldPostion()).first);
|
||||
|
||||
|
||||
if (pPlayer == nullptr)
|
||||
return E_FAIL;
|
||||
|
||||
_float fDistance = XMVectorGetX(XMVector4Length(pPlayer->Get_WorldPostion() - Get_WorldPostion()));
|
||||
|
||||
_float fShakeValue = clamp(30.f / fDistance, 1.f, 5.f);
|
||||
|
||||
pPlayer->Start_CameraShake(0.6f, fShakeValue);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -152,7 +167,7 @@ void CMage_Down_Attack::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
void CMage_Down_Attack::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pInfoInstance);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
void CMage_Down_Attack::Describe_Entity()
|
||||
|
||||
@@ -204,6 +204,15 @@ void CMage_Nomal_Attack::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
m_pProj_PT1->Set_Visible(false);
|
||||
m_pProj_PT2->Set_Visible(false);
|
||||
|
||||
|
||||
CPlayer* pPlayer = static_cast<CPlayer*>(m_pInfoInstance->Get_NearestPlayerAlly(m_pOwner->Get_WorldPostion()).first);
|
||||
|
||||
|
||||
if (pPlayer == nullptr)
|
||||
return;
|
||||
|
||||
pPlayer->Start_CameraShake(0.3f, 2.f);
|
||||
|
||||
}
|
||||
|
||||
void CMage_Nomal_Attack::Free()
|
||||
|
||||
@@ -312,6 +312,14 @@ void CPlayer::OnHit(CGameObject* pOther, CGameObject* pCaller)
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CPlayer::Start_CameraShake(_float fTime, _float fIntense)
|
||||
{
|
||||
m_vCameraShakeTimer.x = 0.f;
|
||||
m_vCameraShakeTimer.y = fTime;
|
||||
m_fCameraShakeIntense = fIntense;
|
||||
m_bCameraShake = true;
|
||||
}
|
||||
|
||||
void CPlayer::Render_CameraCoordinateSystem()
|
||||
{
|
||||
m_Batch->Begin();
|
||||
@@ -627,7 +635,7 @@ void CPlayer::Describe_Entity()
|
||||
if (false == m_bCameraShake && GUI::Button("Shake")) {
|
||||
m_bCameraShake = true;
|
||||
}
|
||||
if (GUI::SliderFloat("m_fCameraShakeTime", &m_fCameraShakeTime, 0.125f, 5.f, "%.3f")) {
|
||||
if (GUI::SliderFloat("m_fCameraShakeTime", &m_fCameraShakeTime, 0.125f, 0.f, "%.3f")) {
|
||||
m_vCameraShakeTimer.y = m_fCameraShakeTime;
|
||||
}
|
||||
GUI::SliderFloat("m_fCameraShakeIntense", &m_fCameraShakeIntense, 5.f, 20.f, "%.1f");
|
||||
|
||||
@@ -882,8 +882,18 @@ HRESULT CPlayer::Behavior_CombatExitCheck()
|
||||
[this]() { m_bLookAt = true; },
|
||||
0.1f);
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() { Throwing_Interactive(); },
|
||||
[this]() {
|
||||
Throwing_Interactive();
|
||||
},
|
||||
0.2f);
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {
|
||||
m_pGameInstance->SlowMotion(0.1f, 0.35f);
|
||||
},
|
||||
0.1f);
|
||||
|
||||
|
||||
}
|
||||
else if (nullptr != m_LockOnInfo.pInteractive) {
|
||||
m_pGrapInteractive = m_LockOnInfo.pInteractive;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "EffectParts.h"
|
||||
#include "Wand.h"
|
||||
#include "Player.h"
|
||||
#include "InfoInstance.h"
|
||||
|
||||
CTrollSwing::CTrollSwing(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CEffect_Container{ pDevice, pContext }
|
||||
@@ -12,8 +13,10 @@ CTrollSwing::CTrollSwing(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
}
|
||||
|
||||
CTrollSwing::CTrollSwing(const CTrollSwing& rhs)
|
||||
: CEffect_Container(rhs)
|
||||
: CEffect_Container(rhs),
|
||||
m_pInfoInstance(CInfoInstance::GetInstance())
|
||||
{
|
||||
SAFE_ADDREF(m_pInfoInstance);
|
||||
}
|
||||
|
||||
HRESULT CTrollSwing::Initialize_Prototype()
|
||||
@@ -92,6 +95,18 @@ HRESULT CTrollSwing::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
pRockPT->Set_Visible(true);
|
||||
pSmoke->Set_Visible(true);
|
||||
|
||||
CPlayer* pPlayer = static_cast<CPlayer*>(m_pInfoInstance->Get_NearestPlayerAlly(m_pOwner->Get_WorldPostion()).first);
|
||||
|
||||
|
||||
if (pPlayer == nullptr)
|
||||
return E_FAIL;
|
||||
|
||||
_float fDistance = XMVectorGetX(XMVector4Length(pPlayer->Get_WorldPostion() - Get_WorldPostion()));
|
||||
|
||||
_float fShakeValue = clamp(50.f / fDistance, 3.f, 10.f);
|
||||
|
||||
pPlayer->Start_CameraShake(1.2f, fShakeValue);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -164,6 +179,7 @@ void CTrollSwing::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pInfoInstance);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
void CTrollSwing::Describe_Entity()
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "EffectParts.h"
|
||||
#include "Wand.h"
|
||||
#include "Player.h"
|
||||
#include "InfoInstance.h"
|
||||
|
||||
CTroll_Rush_Hit::CTroll_Rush_Hit(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CEffect_Container{ pDevice, pContext }
|
||||
@@ -12,8 +13,10 @@ CTroll_Rush_Hit::CTroll_Rush_Hit(ID3D11Device* pDevice, ID3D11DeviceContext* pCo
|
||||
}
|
||||
|
||||
CTroll_Rush_Hit::CTroll_Rush_Hit(const CTroll_Rush_Hit& rhs)
|
||||
: CEffect_Container(rhs)
|
||||
: CEffect_Container(rhs),
|
||||
m_pInfoInstance(CInfoInstance::GetInstance())
|
||||
{
|
||||
SAFE_ADDREF(m_pInfoInstance);
|
||||
}
|
||||
|
||||
HRESULT CTroll_Rush_Hit::Initialize_Prototype()
|
||||
@@ -94,6 +97,19 @@ HRESULT CTroll_Rush_Hit::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
pSmoke->Set_Visible(true);
|
||||
pRock_PT_35->Set_Visible(true);
|
||||
|
||||
|
||||
CPlayer* pPlayer = static_cast<CPlayer*>(m_pInfoInstance->Get_NearestPlayerAlly(m_pOwner->Get_WorldPostion()).first);
|
||||
|
||||
|
||||
if (pPlayer == nullptr)
|
||||
return E_FAIL;
|
||||
|
||||
_float fDistance = XMVectorGetX(XMVector4Length(pPlayer->Get_WorldPostion() - Get_WorldPostion()));
|
||||
|
||||
_float fShakeValue = clamp(40.f / fDistance, 3.f, 9.f);
|
||||
|
||||
pPlayer->Start_CameraShake(0.8f, fShakeValue);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -166,6 +182,7 @@ void CTroll_Rush_Hit::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pInfoInstance);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
void CTroll_Rush_Hit::Describe_Entity()
|
||||
|
||||
@@ -503,6 +503,7 @@ void CTroll::Behavior_SlamEnter()
|
||||
|
||||
Troll_Trail_Visible(true);
|
||||
m_pWeaponTrail->Set_Visible(true);
|
||||
m_pWeaponTrail->Get_Component<CTrail>()->Reset_Trail();
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {
|
||||
|
||||
@@ -33,6 +33,8 @@ class CMage_Down_Attack final : public CEffect_Container
|
||||
private:
|
||||
_wstring m_wstrEffectName = {};
|
||||
|
||||
private:
|
||||
class CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
|
||||
public:
|
||||
static CMage_Down_Attack* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
@@ -22,6 +22,7 @@ class CPlayer final : public CUnit
|
||||
virtual void OnHit(CGameObject* pOther, CGameObject* pCaller = nullptr)override;
|
||||
_bool Get_Aim() { return m_bAim; }
|
||||
void Set_SpellHit(_bool bHit) { m_bSpellHit = bHit; }
|
||||
void Start_CameraShake(_float fTime, _float fIntense);
|
||||
#ifdef _DEBUG
|
||||
void Render_CameraCoordinateSystem();
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -32,6 +32,8 @@ class CTrollSwing final : public CEffect_Container
|
||||
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
|
||||
private:
|
||||
_wstring m_wstrEffectName = {};
|
||||
private:
|
||||
class CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
|
||||
public:
|
||||
static CTrollSwing* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
@@ -32,7 +32,8 @@ class CTroll_Rush_Hit final : public CEffect_Container
|
||||
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
|
||||
private:
|
||||
_wstring m_wstrEffectName = {};
|
||||
|
||||
private:
|
||||
class CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
public:
|
||||
static CTroll_Rush_Hit* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual void Free() override;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
@@ -54,7 +54,7 @@ HRESULT CEffectPool::Initialize(void* pArg)
|
||||
m_isActiveMonsterEffectCreate = false;
|
||||
#endif //
|
||||
#ifdef 진우
|
||||
m_isActiveEffectCreate = false;
|
||||
m_isActiveEffectCreate = true;
|
||||
m_isActiveMonsterEffectCreate = false;
|
||||
#endif //
|
||||
#ifdef 기무리
|
||||
|
||||
@@ -133,6 +133,9 @@ HRESULT CGameInstance::Initialize_Engine(const ENGINE_DESC& EngineDesc, ID3D11De
|
||||
|
||||
void CGameInstance::Update_Engine(_float fTimeDelta)
|
||||
{
|
||||
|
||||
_float fExcuteTimeDelta = Update_SlowMotion(fTimeDelta);
|
||||
|
||||
m_pKey_Manager->Update();
|
||||
m_pMouse_Manager->Update();
|
||||
//m_pSound_Manager->Update();
|
||||
@@ -142,17 +145,17 @@ void CGameInstance::Update_Engine(_float fTimeDelta)
|
||||
#endif // _DEBUG
|
||||
m_pPicking->Update();
|
||||
|
||||
m_pObject_Manager->Priority_Update(fTimeDelta);
|
||||
m_pObject_Manager->Priority_Update(fExcuteTimeDelta);
|
||||
|
||||
m_pPipeLine->Update();
|
||||
|
||||
m_pObject_Manager->Update(fTimeDelta);
|
||||
m_pObject_Manager->Update(fExcuteTimeDelta);
|
||||
|
||||
m_pPhysX_Manager->Update(fTimeDelta);
|
||||
m_pPhysX_Manager->Update(fExcuteTimeDelta);
|
||||
|
||||
m_pObject_Manager->Late_Update(fTimeDelta);
|
||||
m_pObject_Manager->Late_Update(fExcuteTimeDelta);
|
||||
|
||||
m_pLevel_Manager->Update(fTimeDelta);
|
||||
m_pLevel_Manager->Update(fExcuteTimeDelta);
|
||||
m_pObject_Manager->Clear_DeadObj();
|
||||
|
||||
//m_pObstacle_Manager->Refresh_Region();
|
||||
@@ -238,9 +241,20 @@ void CGameInstance::BillBoard(CTransform* pTransform)
|
||||
|
||||
}
|
||||
|
||||
|
||||
#ifdef EDITOR_PROJECT
|
||||
|
||||
|
||||
void CGameInstance::SlowMotion(_float fSlowIntense, _float fTime)
|
||||
{
|
||||
if (fTime <= 0 || fSlowIntense <= 0)
|
||||
return;
|
||||
|
||||
m_isSlowMotion = true;
|
||||
m_vSlowTime = _float2(0.f, fTime);
|
||||
m_fSlowIntense = fSlowIntense;
|
||||
}
|
||||
|
||||
void CGameInstance::Save_ModelFilePath(const _char* FilePath)
|
||||
{
|
||||
m_FilePaths.push_back(FilePath);
|
||||
@@ -269,6 +283,28 @@ size_t CGameInstance::ModelFilePathCount()
|
||||
return m_FilePaths.size();
|
||||
}
|
||||
|
||||
_float CGameInstance::Update_SlowMotion(_float fTimeDelta)
|
||||
{
|
||||
_float fExcuteTimeDelta = {};
|
||||
|
||||
if (m_isSlowMotion == false)
|
||||
return fTimeDelta;
|
||||
|
||||
m_vSlowTime.x += fTimeDelta;
|
||||
|
||||
if (m_vSlowTime.x >= m_vSlowTime.y) // 시간을 넘겼다면
|
||||
{
|
||||
m_isSlowMotion = false;
|
||||
m_vSlowTime.x = 0.f;
|
||||
}
|
||||
else
|
||||
{
|
||||
fExcuteTimeDelta = m_fSlowIntense * fTimeDelta;
|
||||
}
|
||||
|
||||
return fExcuteTimeDelta;
|
||||
}
|
||||
|
||||
#endif // EDITOR_PROJECT
|
||||
void CGameInstance::Render_Begin(const _float4* pClearColor)
|
||||
{
|
||||
|
||||
@@ -26,6 +26,7 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
_float Real_Random_Float(_float fMin, _float fMax);
|
||||
_float2 Get_ViewPortSize();
|
||||
void BillBoard(CTransform* pTransform);
|
||||
void SlowMotion(_float fSlowIntense, _float fTime);
|
||||
|
||||
#pragma region GRAPHIC_DEVICE
|
||||
public:
|
||||
@@ -275,6 +276,9 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
size_t ModelFilePathCount();
|
||||
#endif
|
||||
|
||||
private:
|
||||
_float Update_SlowMotion(_float fTimeDelta);
|
||||
|
||||
private:
|
||||
class CGraphic_Device* m_pGraphic_Device = { nullptr };
|
||||
class CTimer_Manager* m_pTimer_Manager = { nullptr };
|
||||
@@ -299,6 +303,11 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
|
||||
mt19937 m_Rng{ random_device{}() };
|
||||
_float2 m_vViewPortSize = {};
|
||||
|
||||
private:
|
||||
_bool m_isSlowMotion = {};
|
||||
_float2 m_vSlowTime = {};
|
||||
_float m_fSlowIntense = {};
|
||||
#ifdef _DEBUG
|
||||
private:
|
||||
_float m_fTimer_PriorityUpdate = { 0.f };
|
||||
|
||||
Reference in New Issue
Block a user