[Modify] 플레이어가 빗자루를 타면 UI변경
This commit is contained in:
@@ -158,6 +158,7 @@ HRESULT CBroom_TargetGate::Ready_Components()
|
||||
|
||||
void CBroom_TargetGate::Set_TargetPosition(_fvector TargetPos)
|
||||
{
|
||||
XMStoreFloat4(&m_vTargetPos ,TargetPos);
|
||||
m_pTransformCom->Set_State(STATE::POSITION, TargetPos);
|
||||
m_vActive = true;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
//#include "Mouse_Cursor.h"
|
||||
#include "Broom_Panel.h"
|
||||
#include "Ride_Panel.h"
|
||||
#include "InfoInstance.h"
|
||||
|
||||
CGamePlay_Canvas::CGamePlay_Canvas(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CCanvasObject(pDevice, pContext)
|
||||
@@ -16,7 +17,8 @@ CGamePlay_Canvas::CGamePlay_Canvas(ID3D11Device* pDevice, ID3D11DeviceContext* p
|
||||
}
|
||||
|
||||
CGamePlay_Canvas::CGamePlay_Canvas(const CGamePlay_Canvas& rhs)
|
||||
:CCanvasObject(rhs)
|
||||
:CCanvasObject(rhs),
|
||||
m_pInfoInstance(CInfoInstance::GetInstance())
|
||||
{
|
||||
}
|
||||
|
||||
@@ -47,6 +49,7 @@ HRESULT CGamePlay_Canvas::Initialize(void* pArg)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pInfoInstance->Add_Event(TEXT("BroomRide"), [this](void* p) {this->Set_Ride(*reinterpret_cast<_bool*>(p)); });
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -57,10 +60,9 @@ void CGamePlay_Canvas::Priority_Update(_float fTimeDelta)
|
||||
|
||||
void CGamePlay_Canvas::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_pGameInstance->Key_Down(DIK_B))
|
||||
{
|
||||
m_bRide = !m_bRide;
|
||||
|
||||
if (m_bCurrentRide != m_bRide)
|
||||
{
|
||||
if (m_bRide == true)
|
||||
{
|
||||
static_cast<CUIObject*>(m_pRide_Panel)->Visible(true);
|
||||
@@ -73,8 +75,9 @@ void CGamePlay_Canvas::Update(_float fTimeDelta)
|
||||
static_cast<CUIObject*>(m_pAction_Panel)->Visible(true);
|
||||
static_cast<CUIObject*>(m_pAction_Panel)->Set_FadeIn();
|
||||
}
|
||||
|
||||
m_bCurrentRide = m_bRide;
|
||||
}
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
|
||||
@@ -2443,6 +2443,7 @@ void CPlayer::Behavior_Broom_DismountEnter()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
m_bOnce = false;
|
||||
m_pInfoInstance->Event_CallBack(TEXT("BroomRide"), &m_bOnce);
|
||||
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_DISMOUNT);
|
||||
m_pFSM->Enable_State(FSMSTATE::BROOM_DISMOUNT);
|
||||
m_pBroom->Set_Ride(false);
|
||||
@@ -3104,6 +3105,7 @@ void CPlayer::Add_FSM()
|
||||
_float3 vScale = { 0.3f,0.3f,0.3f };
|
||||
m_pBroomTransform->Set_Scale(vScale);
|
||||
m_bOnce = true;
|
||||
m_pInfoInstance->Event_CallBack(TEXT("BroomRide"), &m_bOnce);
|
||||
}
|
||||
m_BroomScale.x += (m_TargetScale.x - m_BroomScale.x) * fTimeDelta * m_fScaleSmoothSpeed;
|
||||
m_BroomScale.y += (m_TargetScale.y - m_BroomScale.y) * fTimeDelta * m_fScaleSmoothSpeed;
|
||||
|
||||
@@ -34,6 +34,11 @@ class CGamePlay_Canvas final : public CCanvasObject
|
||||
void Clear_Penel();
|
||||
|
||||
private:
|
||||
void Set_Ride(_bool bRide) { m_bRide = bRide; }
|
||||
|
||||
private:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
CGameObject* m_pMission_Panel = { nullptr };
|
||||
CGameObject* m_pMinimap_Panel = { nullptr };
|
||||
@@ -44,6 +49,7 @@ class CGamePlay_Canvas final : public CCanvasObject
|
||||
CGameObject* m_pRide_Panel = { nullptr };
|
||||
|
||||
_bool m_bRide = { false };
|
||||
_bool m_bCurrentRide = { false };
|
||||
|
||||
public:
|
||||
static CGamePlay_Canvas* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
Reference in New Issue
Block a user