Merge branch 'UI' into Develope
This commit is contained in:
@@ -164,7 +164,8 @@ void CBroomRaceManager::Update(_float fTimeDelta)
|
||||
m_bCurrentRace = false;
|
||||
m_pGameInstance->Sound_Stop(SOUND::SD_KIND::BROOM_BOOST, SD_CHANNEL_GROUP::EFFECT);
|
||||
m_pGameInstance->Sound_Stop(SOUND::SD_KIND::BROOM_NORMAL, SD_CHANNEL_GROUP::EFFECT);
|
||||
m_pRaceRings[m_pRaceRings.size() - 1]->Set_Target(false);
|
||||
m_pInfoInstance->Event_CallBack(TEXT("BroomRide"), &m_bCurrentRace);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,15 +127,15 @@ void CCamPosition_Shoulder::Update(_float fTimeDelta)
|
||||
Describe_Entity();
|
||||
#endif // _DEBUG
|
||||
|
||||
#ifndef _DEBUG
|
||||
if (dynamic_cast<CPlayer*>(m_pOwner)->Get_UIState() == ENUM_CLASS(UI_STATE::GAMEPLAYER))
|
||||
if (dynamic_cast<CPlayer*>(m_pOwner)->Get_UIState() == UI_STATE::GAMEPLAYER)
|
||||
{
|
||||
m_bMovable = true;
|
||||
}
|
||||
else {
|
||||
m_bMovable = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
if (m_pGameInstance->Key_Up(DIK_PGDN)) {
|
||||
m_bDampingParentPos = !m_bDampingParentPos;
|
||||
}
|
||||
|
||||
@@ -91,13 +91,13 @@ void CDialogue_Font::Update(_float fTimeDelta)
|
||||
case ENUM_CLASS(NPCTEXTTYPE::BROOM):
|
||||
m_bRace = true;
|
||||
m_pInfoInstance->Event_CallBack(TEXT("RACEREADY"), &m_bRace);
|
||||
ENDText();
|
||||
ReSet();
|
||||
break;
|
||||
|
||||
case ENUM_CLASS(NPCTEXTTYPE::BATTLE):
|
||||
m_bBattle = true;
|
||||
m_pInfoInstance->Event_CallBack(TEXT("BATTLE"), &m_bBattle);
|
||||
ENDText();
|
||||
ReSet();
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -343,7 +343,6 @@ void CDialogue_Font::Quest()
|
||||
switch (Index)
|
||||
{
|
||||
case 0:
|
||||
m_pInfoInstance->Event_CallBack(TEXT("NpcInteract"), &Interact);
|
||||
m_pCurrentDialogue[0]->Set_Hover(Interact.bInteract);
|
||||
m_pCurrentDialogue[0]->Visible(Interact.bInteract);
|
||||
m_DialoguInfo.push_back(m_pCurrentDialogue[0]);
|
||||
@@ -351,7 +350,18 @@ void CDialogue_Font::Quest()
|
||||
if (m_bChoiceText == true)
|
||||
{
|
||||
m_pInfoInstance->Event_CallBack(TEXT("CHOICERESET"));
|
||||
ReSet();
|
||||
if (m_pNpc->Get_NpcID() == 4)
|
||||
{
|
||||
m_pInfoInstance->Event_CallBack(TEXT("Change"));
|
||||
m_bCurrentInteract = false;
|
||||
m_bNpcInteract = false;
|
||||
ENDText();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pInfoInstance->Event_CallBack(TEXT("NpcInteract"), &Interact);
|
||||
ReSet();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -371,16 +381,13 @@ void CDialogue_Font::Quest()
|
||||
|
||||
void CDialogue_Font::ENDText()
|
||||
{
|
||||
NPCINTERACT Interact{};
|
||||
Interact.bInteract = false;
|
||||
Interact.fAlpha = 0.5f;
|
||||
_bool bInteract = false;
|
||||
m_pNpc->Set_NextID(m_iNextID);
|
||||
m_pCurrentDialogue[0]->Set_Hover(Interact.bInteract);
|
||||
m_pCurrentDialogue[0]->Visible(Interact.bInteract);
|
||||
m_pCurrentDialogue[0]->Set_Hover(bInteract);
|
||||
m_pCurrentDialogue[0]->Visible(bInteract);
|
||||
m_DialoguInfo.push_back(m_pCurrentDialogue[0]);
|
||||
m_pCurrentDialogue.erase(m_pCurrentDialogue.begin());
|
||||
m_pInfoInstance->Event_CallBack(TEXT("NpcInteract"), &Interact);
|
||||
m_pInfoInstance->Event_CallBack(TEXT("NpcInteraction"), &Interact.bInteract);
|
||||
m_pInfoInstance->Event_CallBack(TEXT("NpcInteraction"), &bInteract);
|
||||
m_pInfoInstance->Event_CallBack(TEXT("CHOICERESET"));
|
||||
m_bChoiceText = false;
|
||||
m_bCurrentChoiceText = false;
|
||||
@@ -395,23 +402,27 @@ void CDialogue_Font::ENDText()
|
||||
m_DialoguInfo.push_back((*it));
|
||||
it = m_pCurrentDialogue.erase(it);
|
||||
}
|
||||
//if (m_iTextID < m_iNextID)
|
||||
if (m_pNpc->Get_NpcID() == 4)
|
||||
{
|
||||
m_pInfoInstance->Event_CallBack(TEXT("Change"));
|
||||
m_pNpc->Set_Flow(m_pNpc->Get_Flow() + 1, 0.f);
|
||||
m_bCurrentInteract = false;
|
||||
m_bNpcInteract = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
NPCINTERACT Interact{};
|
||||
Interact.bInteract = bInteract;
|
||||
Interact.fAlpha = 1.f;
|
||||
m_pInfoInstance->Event_CallBack(TEXT("NpcInteract"), &Interact);
|
||||
m_pNpc->Set_Flow(m_pNpc->Get_Flow() + 1, Interact.fAlpha);
|
||||
}
|
||||
}
|
||||
|
||||
void CDialogue_Font::ReSet()
|
||||
{
|
||||
NPCINTERACT Interact{};
|
||||
Interact.bInteract = false;
|
||||
Interact.fAlpha = 0.5f;
|
||||
m_pNpc->Set_NextID(m_iTextID);
|
||||
m_pInfoInstance->Event_CallBack(TEXT("CHOICERESET"));
|
||||
m_pCurrentDialogue[0]->Set_Hover(Interact.bInteract);
|
||||
m_pCurrentDialogue[0]->Visible(Interact.bInteract);
|
||||
m_pInfoInstance->Event_CallBack(TEXT("NpcInteraction"), &Interact.bInteract);
|
||||
m_pInfoInstance->Event_CallBack(TEXT("NpcInteract"), &Interact);
|
||||
m_DialoguInfo.push_back(m_pCurrentDialogue[0]);
|
||||
m_pCurrentDialogue.erase(m_pCurrentDialogue.begin());
|
||||
m_bChoiceText = false;
|
||||
m_bCurrentChoiceText = false;
|
||||
m_bRace = false;
|
||||
@@ -425,12 +436,12 @@ void CDialogue_Font::ReSet()
|
||||
m_DialoguInfo.push_back((*it));
|
||||
it = m_pCurrentDialogue.erase(it);
|
||||
}
|
||||
m_pInfoInstance->Event_CallBack(TEXT("NpcInteract"), &m_bChoiceText);
|
||||
}
|
||||
|
||||
void CDialogue_Font::Quest_Complete()
|
||||
{
|
||||
NpcNextText();
|
||||
ENDText();
|
||||
NextText();
|
||||
}
|
||||
|
||||
void CDialogue_Font::NextText()
|
||||
@@ -438,6 +449,11 @@ void CDialogue_Font::NextText()
|
||||
m_pCurrentDialogue[0]->Visible(false);
|
||||
m_DialoguInfo.push_back(m_pCurrentDialogue[0]);
|
||||
m_pCurrentDialogue.erase(m_pCurrentDialogue.begin());
|
||||
if (m_bChoiceText == true)
|
||||
{
|
||||
ReSet();
|
||||
}
|
||||
|
||||
NpcDialogue();
|
||||
}
|
||||
|
||||
@@ -448,11 +464,6 @@ void CDialogue_Font::NextLevel(CHOICEINFO Choice)
|
||||
m_iQuestID = Choice.QuestID;
|
||||
m_bChoiceText = true;
|
||||
NpcNextText();
|
||||
|
||||
if (m_iType == ENUM_CLASS(NPCTEXTTYPE::QUESTTEXT))
|
||||
ReSet();
|
||||
else
|
||||
ENDText();
|
||||
}
|
||||
|
||||
void CDialogue_Font::NextText(_int Index)
|
||||
|
||||
@@ -239,6 +239,11 @@ void CElf::Set_Target(CUnit& pTarget, CTransform& pTransform)
|
||||
m_fTargetDistance = XMVectorGetX(XMVector3Length(vToTargetDir));
|
||||
}
|
||||
|
||||
_int CElf::Get_NpcID()
|
||||
{
|
||||
return m_pNpcStat->Get_Stat().iID;
|
||||
}
|
||||
|
||||
void CElf::Set_Flow(_int Index, _float fTime)
|
||||
{
|
||||
m_iFlowIndex = Index;
|
||||
|
||||
@@ -40,10 +40,11 @@ HRESULT CNPC_EleazarFig::Initialize(void* pArg)
|
||||
|
||||
_int iRandom = m_pGameInstance->Real_Random_Int(0, 12);
|
||||
m_pModelCom->Set_AnimationIndex(iRandom, false, 1.f, false, 1.f, false);
|
||||
|
||||
m_pCallBack_Behavior->Initialize(m_pCharacter_Controller);
|
||||
m_pCallBack_HitReport->Initialize(m_pCharacter_Controller);
|
||||
m_bNpc = true;
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -248,6 +249,15 @@ void CNPC_EleazarFig::Set_Pos(_vector vPos)
|
||||
m_pCharacter_Controller->Set_Position(vPos);
|
||||
}
|
||||
|
||||
_wstring CNPC_EleazarFig::Get_Name()
|
||||
{
|
||||
return m_pNpcStat->Get_Stat().pNpc_Name;
|
||||
}
|
||||
|
||||
_wstring CNPC_EleazarFig::Get_NpcName()
|
||||
{
|
||||
return m_pNpcStat->Get_Stat().pName;
|
||||
}
|
||||
|
||||
HRESULT CNPC_EleazarFig::Ready_Components(void* pArg)
|
||||
{
|
||||
|
||||
@@ -121,7 +121,7 @@ HRESULT CPlayer::Initialize(void* pArg)
|
||||
|
||||
// UI 연동 추가
|
||||
m_pInfoInstance->Add_Event(TEXT("UseSpell"), [this](void* p) {this->Get_Spell(*reinterpret_cast<_int*>(p)); });
|
||||
m_pInfoInstance->Add_Event(TEXT("Player_CanvasChange"), [this](void* p) {this->Get_UIState(*reinterpret_cast<_int*>(p)); });
|
||||
m_pInfoInstance->Add_Event(TEXT("Player_CanvasChange"), [this](void* p) {this->Get_UIState(*reinterpret_cast<UI_STATE*>(p)); });
|
||||
m_pInfoInstance->Add_Event(TEXT("NpcInteraction"), [this](void* p) {this->Set_Interaction(*reinterpret_cast<_bool*>(p)); });
|
||||
m_pInfoInstance->Add_Event(TEXT("SpellLearningSuccess"), [this](void* p) {this->Set_Spell_Learning_Success(); });
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ void CPlayer::Get_Spell(_int SkillIndex)
|
||||
m_eSpell = SkillIndex;
|
||||
}
|
||||
|
||||
void CPlayer::Get_UIState(_int UIState)
|
||||
void CPlayer::Get_UIState(UI_STATE UIState)
|
||||
{
|
||||
m_eUIState = UIState;
|
||||
}
|
||||
@@ -3294,10 +3294,10 @@ void CPlayer::Hit_Levioso(_float fTimeDelta)
|
||||
|
||||
_bool CPlayer::IsInputLocked()
|
||||
{
|
||||
if (m_eUIState != ENUM_CLASS(UI_STATE::SPELL) &&
|
||||
m_eUIState != ENUM_CLASS(UI_STATE::QUEST) &&
|
||||
m_eUIState != ENUM_CLASS(UI_STATE::SPELLLNEARN) &&
|
||||
m_eUIState != ENUM_CLASS(UI_STATE::NPC_INTERACT))
|
||||
if (m_eUIState != UI_STATE::SPELL &&
|
||||
m_eUIState != UI_STATE::QUEST &&
|
||||
m_eUIState != UI_STATE::SPELLLNEARN &&
|
||||
m_eUIState != UI_STATE::NPC_INTERACT)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -3342,7 +3342,7 @@ void CPlayer::Add_FSM()
|
||||
Desc.funcExitEvent = [this]() { Behavior_MoveExit(); };
|
||||
Desc.funcPriorityUpdate = [this](_float fTimeDelta) {
|
||||
{
|
||||
if ((m_eUIState != ENUM_CLASS(UI_STATE::SPELL))) {
|
||||
if ((m_eUIState != UI_STATE::SPELL)) {
|
||||
if (!m_pFSM->IsEnable(FSMSTATE::STOP))
|
||||
{
|
||||
_float3 fMove = m_pGameInstance->Get_MouseMove();
|
||||
|
||||
@@ -56,7 +56,7 @@ HRESULT CQuest_Panel::Initialize(void* pArg)
|
||||
Set_Status();
|
||||
//m_pInfoInstance->Set_AcceptQuest(0);
|
||||
//m_pInfoInstance->Set_AcceptQuest(1);
|
||||
m_pInfoInstance->Set_AcceptQuest(6);
|
||||
//m_pInfoInstance->Set_AcceptQuest(6);
|
||||
Add_Function(TEXT("Click"), [this](void* p) {this->Slot_Hover(*reinterpret_cast<_int*>(p)); });
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("QuestPanelClose"), [this](void* p) {this->Slot_Hover(*reinterpret_cast<_int*>(p)); });
|
||||
return S_OK;
|
||||
|
||||
@@ -64,6 +64,7 @@ HRESULT CUI_Manager::Initialize(void* pArg)
|
||||
m_bActive = false;
|
||||
m_pInfoInstance->Set_UISTATE(m_eType);
|
||||
m_pInfoInstance->Add_Event(TEXT("Canvas_Change"), [this](void* p) {this->Canvas_Change(*reinterpret_cast<UI_STATE*>(p)); });
|
||||
m_pInfoInstance->Add_Event(TEXT("Change"), [this](void* p) {this->Chage(); });
|
||||
m_pInfoInstance->Add_Event(TEXT("NpcInteract"), [this](void* p) {this->NpcInteract(p); });
|
||||
m_pInfoInstance->Add_Event(TEXT("UIManagerFadeIn"), [this](void* p) {this->Set_Fade(); });
|
||||
m_pInfoInstance->Add_Event(TEXT("UIFadeIn"), [this](void* p) {this->FadeIn(*reinterpret_cast<_float*>(p)); });
|
||||
@@ -96,6 +97,7 @@ void CUI_Manager::Canvas_Change(UI_STATE eType)
|
||||
{
|
||||
static_cast<CGameObject*>(m_pNPCInteraction)->Set_Visible(false);
|
||||
}
|
||||
m_pGameInstance->Toggle_MouseCenter(true);
|
||||
break;
|
||||
|
||||
case UI_STATE::SPELL:
|
||||
@@ -103,6 +105,7 @@ void CUI_Manager::Canvas_Change(UI_STATE eType)
|
||||
m_pCamera_LockOn->Set_Visible(false);
|
||||
static_cast<CCanvasObject*>(m_pSpell_Canvas)->Visible(true);
|
||||
static_cast<CCanvasObject*>(m_pGamePlay_Canves)->Visible(false);
|
||||
m_pGameInstance->Toggle_MouseCenter(false);
|
||||
break;
|
||||
|
||||
case UI_STATE::QUEST:
|
||||
@@ -110,6 +113,7 @@ void CUI_Manager::Canvas_Change(UI_STATE eType)
|
||||
m_pCamera_LockOn->Set_Visible(false);
|
||||
static_cast<CCanvasObject*>(m_pQuest_Canvas)->Visible(true);
|
||||
static_cast<CCanvasObject*>(m_pGamePlay_Canves)->Visible(false);
|
||||
m_pGameInstance->Toggle_MouseCenter(false);
|
||||
break;
|
||||
|
||||
case UI_STATE::INVENTORY:
|
||||
@@ -120,6 +124,7 @@ void CUI_Manager::Canvas_Change(UI_STATE eType)
|
||||
m_pCamera_LockOn->Set_Visible(false);
|
||||
static_cast<CCanvasObject*>(m_pSpellLearn_Canvas)->Visible(true);
|
||||
static_cast<CCanvasObject*>(m_pGamePlay_Canves)->Visible(false);
|
||||
m_pGameInstance->Toggle_MouseCenter(false);
|
||||
break;
|
||||
|
||||
case UI_STATE::NPC_INTERACT:
|
||||
@@ -134,6 +139,7 @@ void CUI_Manager::Canvas_Change(UI_STATE eType)
|
||||
static_cast<CGameObject*>(m_pNPCInteraction)->Set_Visible(false);
|
||||
static_cast<CGameObject*>(m_pBroom_TargetGate)->Set_Visible(false);
|
||||
static_cast<CGameObject*>(m_pDamage_Font)->Set_Visible(false);
|
||||
m_pGameInstance->Toggle_MouseCenter(false);
|
||||
break;
|
||||
|
||||
case UI_STATE::LEVELCHANGE:
|
||||
@@ -149,12 +155,13 @@ void CUI_Manager::Canvas_Change(UI_STATE eType)
|
||||
static_cast<CGameObject*>(m_pDamage_Font)->Set_Visible(false);
|
||||
m_pInfoInstance->Event_CallBack(TEXT("NPCInteractionOff"));
|
||||
m_pInfoInstance->Event_CallBack(TEXT("BOXInteractionOff"));
|
||||
m_pGameInstance->Toggle_MouseCenter(false);
|
||||
break;
|
||||
|
||||
default:
|
||||
return;
|
||||
}
|
||||
m_pGameInstance->Toggle_MouseCenter();
|
||||
m_pInfoInstance->Event_CallBack(TEXT("Player_CanvasChange"), &m_eType);
|
||||
}
|
||||
|
||||
void CUI_Manager::Clear_Canvas()
|
||||
@@ -262,7 +269,6 @@ void CUI_Manager::Update(_float fTimeDelta)
|
||||
|
||||
if (m_bCurrentNPCInteract == true && m_bNPCInteract == false)
|
||||
{
|
||||
m_fAlphaVelue = 1.f;
|
||||
m_bCurrentNPCInteract = m_bNPCInteract;
|
||||
|
||||
if (m_bActive == false)
|
||||
@@ -579,6 +585,17 @@ void CUI_Manager::NpcInteract(void* pArg)
|
||||
m_bActive = Interact.bInteract;
|
||||
m_fAlpha= Interact.fAlpha;
|
||||
m_bAlphaZero = true;
|
||||
m_fAlphaVelue = 1.f;
|
||||
}
|
||||
|
||||
void CUI_Manager::Chage()
|
||||
{
|
||||
m_bHover = false;
|
||||
m_bActive = false;
|
||||
m_bCurrentNPCInteract = false;
|
||||
m_bNPCInteract = false;
|
||||
m_eType = UI_STATE::GAMEPLAYER;
|
||||
Canvas_Change(m_eType);
|
||||
}
|
||||
|
||||
void CUI_Manager::Set_Fade()
|
||||
|
||||
@@ -56,6 +56,7 @@ class CElf final : public CUnit
|
||||
virtual _wstring Get_NpcName() override;
|
||||
void Set_NpcState(_int iState) { m_eNpcState = iState; }
|
||||
void Set_Target(CUnit& pTarget, CTransform& pTransform);
|
||||
virtual _int Get_NpcID() override;
|
||||
virtual void Set_Flow(_int Index, _float fTime) override;
|
||||
virtual _int Get_Flow() override;
|
||||
protected:
|
||||
|
||||
@@ -25,6 +25,8 @@ class CNPC_EleazarFig final : public CUnit
|
||||
virtual HRESULT Render_Shadow(SHADOW eType) override;
|
||||
virtual void OnRayCollision(CGameObject* pCaster, _uint iCastedOrder, _float fDistance, _float3 vCastedWorldPos)override;
|
||||
void Set_Pos(_vector vPos);
|
||||
virtual _wstring Get_Name() override;
|
||||
virtual _wstring Get_NpcName() override;
|
||||
protected:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
CCharacter_Controller* m_pCharacter_Controller = { nullptr };
|
||||
|
||||
@@ -44,7 +44,7 @@ class CPlayer final : public CUnit
|
||||
void Set_SpellHit(_bool bHit) { m_bSpellHit = bHit; }
|
||||
void Set_Shield(_bool bShield) { m_bShield = bShield; }
|
||||
void Start_CameraShake(_float fTime, _float fIntense);
|
||||
_int Get_UIState() { return m_eUIState; }
|
||||
UI_STATE Get_UIState() { return m_eUIState; }
|
||||
void Set_RaceRing(class CRaceRing* pRaceRing);
|
||||
class CBroom* Get_Broom() { return m_pBroom; }
|
||||
void Set_RaceInfo();
|
||||
@@ -156,12 +156,12 @@ class CPlayer final : public CUnit
|
||||
private:
|
||||
// UI 연동 추가
|
||||
void Get_Spell(_int SkillIndex);
|
||||
void Get_UIState(_int UIState);
|
||||
void Get_UIState(UI_STATE UIState);
|
||||
|
||||
virtual void Add_FSM();
|
||||
|
||||
function<void()> m_InputAction = nullptr;
|
||||
_int m_eUIState = { };
|
||||
UI_STATE m_eUIState = { };
|
||||
|
||||
const _float4x4* m_pCinematicSocketMatrix = { nullptr };
|
||||
_float3 m_OffsetPos = {};
|
||||
|
||||
@@ -51,7 +51,7 @@ class CUI_Manager final : public CUIObject
|
||||
CGameObject* Find_Canvas(const _wstring& Name);
|
||||
|
||||
void NpcInteract(void* pArg);
|
||||
|
||||
void Chage();
|
||||
void Set_Fade();
|
||||
void Change_Map();
|
||||
void Set_Race(_bool bRace);
|
||||
|
||||
Reference in New Issue
Block a user