[Modify] npc 폰트 수정 중
This commit is contained in:
@@ -44,9 +44,7 @@ HRESULT CDialogue_Data::Load_SpellInfo(const _char* pFilePath)
|
||||
DialogueInfo line{};
|
||||
pLine->QueryIntAttribute("ID", &line.iLineID);
|
||||
|
||||
int type = 0;
|
||||
pLine->QueryIntAttribute("Type", &type);
|
||||
line.bType = (type == 1);
|
||||
pLine->QueryIntAttribute("Type", &line.iTextType);
|
||||
|
||||
const char* text = pLine->Attribute("Text");
|
||||
if (text) line.pText = CMyTools::ToWstring(text);
|
||||
@@ -81,7 +79,7 @@ HRESULT CDialogue_Data::Load_SpellInfo(const _char* pFilePath)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
const NPCDIALOGUEINFO& CDialogue_Data::Get_Info(_wstring NpcName) const
|
||||
const CURRENTDIALOGUEINFO& CDialogue_Data::Get_Info(_wstring NpcName, _int iTextID) const
|
||||
{
|
||||
auto iter = m_DialogueInfo.find(NpcName);
|
||||
if (iter == m_DialogueInfo.end())
|
||||
@@ -89,7 +87,13 @@ const NPCDIALOGUEINFO& CDialogue_Data::Get_Info(_wstring NpcName) const
|
||||
return Dummy;
|
||||
}
|
||||
|
||||
return iter->second;
|
||||
auto Text = iter->second.Info.find(iTextID);
|
||||
if (iter == m_DialogueInfo.end())
|
||||
{
|
||||
return Dummy;
|
||||
}
|
||||
|
||||
return Text->second;
|
||||
}
|
||||
|
||||
CDialogue_Data* CDialogue_Data::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
|
||||
@@ -23,7 +23,6 @@ HRESULT CDialogue_Font::Initialize_Prototype()
|
||||
HRESULT CDialogue_Font::Initialize(void* pArg)
|
||||
{
|
||||
m_pInfoInstance->Add_Event(TEXT("Dialogue"), [this](void* p) {this->Add_Text(p); });
|
||||
|
||||
m_pInfoInstance->Add_Event(TEXT("NpcInteract"), [this](void* p) {this->NpcInteract(*reinterpret_cast<_bool*>(p)); });
|
||||
m_pInfoInstance->Add_Event(TEXT("NPCInteractionOn"), [this](void* p) {this->NpcInfo(p); });
|
||||
|
||||
@@ -46,35 +45,53 @@ void CDialogue_Font::Priority_Update(_float fTimeDelta)
|
||||
|
||||
void CDialogue_Font::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!m_pCurrentDialogue.empty())
|
||||
{
|
||||
for (auto it = m_pCurrentDialogue.begin(); it != m_pCurrentDialogue.end();)
|
||||
{
|
||||
if ((*it)->Get_Hover() == false)
|
||||
{
|
||||
(*it)->Visible(false);
|
||||
m_DialoguInfo.push_back((*it));
|
||||
it = m_pCurrentDialogue.erase(it);
|
||||
}
|
||||
else
|
||||
{
|
||||
it++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bNpcInteract != m_bCurrentInteract)
|
||||
{
|
||||
m_bCurrentInteract = m_bNpcInteract;
|
||||
m_pInfoInstance->Get_Dialogue(m_pNpcName);
|
||||
}
|
||||
|
||||
if (m_bNpcInteract == false)
|
||||
{
|
||||
if (m_bCurrentInteract == true)
|
||||
m_bCurrentInteract = false;
|
||||
}
|
||||
|
||||
if (m_bNpcInteract != m_bCurrentInteract)
|
||||
{
|
||||
m_bCurrentInteract = m_bNpcInteract;
|
||||
NpcDialogue();
|
||||
Npc_Dialogue(m_Info);
|
||||
}
|
||||
|
||||
if (m_bCurrentInteract == true)
|
||||
{
|
||||
if (m_pGameInstance->Key_Down(DIK_RETURN))
|
||||
{
|
||||
switch (m_iType)
|
||||
{
|
||||
case 0:
|
||||
NextText();
|
||||
break;
|
||||
case 1:
|
||||
CHoice();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!m_pCurrentDialogue.empty())
|
||||
{
|
||||
for (auto it = m_pCurrentDialogue.begin(); it != m_pCurrentDialogue.end();)
|
||||
{
|
||||
if ((*it)->Get_Hover() == false)
|
||||
{
|
||||
(*it)->Visible(false);
|
||||
m_DialoguInfo.push_back((*it));
|
||||
it = m_pCurrentDialogue.erase(it);
|
||||
}
|
||||
else
|
||||
{
|
||||
it++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CDialogue_Font::Late_Update(_float fTimeDelta)
|
||||
@@ -140,6 +157,26 @@ void CDialogue_Font::Add_Text(void* pArg)
|
||||
m_pCurrentDialogue.push_front(Dialogue);
|
||||
}
|
||||
|
||||
void CDialogue_Font::Npc_Dialogue(DIALOGUEINFO Info)
|
||||
{
|
||||
if (m_DialoguInfo.empty() == true)
|
||||
return;
|
||||
|
||||
CDialogue* Dialogue = m_DialoguInfo.back();
|
||||
m_DialoguInfo.pop_back();
|
||||
|
||||
for (auto& it : m_pCurrentDialogue)
|
||||
{
|
||||
it->Up();
|
||||
}
|
||||
|
||||
Dialogue->SizeUpdate(Info.pName, Info.pText);
|
||||
Dialogue->Visible(true);
|
||||
Dialogue->Set_Time(Info.fTime);
|
||||
|
||||
m_pCurrentDialogue.push_front(Dialogue);
|
||||
}
|
||||
|
||||
void CDialogue_Font::NpcInfo(void* pArg)
|
||||
{
|
||||
NPCINTERACTIONINFO* Info = reinterpret_cast<NPCINTERACTIONINFO*>(pArg);
|
||||
@@ -152,6 +189,51 @@ void CDialogue_Font::NpcInteract(_bool bInteract)
|
||||
m_bNpcInteract = bInteract;
|
||||
}
|
||||
|
||||
void CDialogue_Font::NpcDialogue()
|
||||
{
|
||||
auto Info = m_pInfoInstance->Get_Dialogue(m_pNpcName, m_iTextID);
|
||||
m_Info.pName = m_pNpcName;
|
||||
m_Info.pText = Info.pText;
|
||||
m_Info.fTime = 99999.f;
|
||||
m_iType = Info.iTextType;
|
||||
m_iNextID = Info.NextTextID;
|
||||
}
|
||||
|
||||
void CDialogue_Font::CHoice()
|
||||
{
|
||||
auto Info = m_pInfoInstance->Get_Dialogue(m_pNpcName, m_iTextID);
|
||||
// Info.ChoiceInfo.size();
|
||||
}
|
||||
|
||||
void CDialogue_Font::Shop()
|
||||
{
|
||||
}
|
||||
|
||||
void CDialogue_Font::SpellLearn()
|
||||
{
|
||||
}
|
||||
|
||||
void CDialogue_Font::NextText()
|
||||
{
|
||||
if (m_iNextID == -1)
|
||||
{
|
||||
m_pCurrentDialogue[0]->Set_Hover(false);
|
||||
_bool Interact = false;
|
||||
m_pInfoInstance->Event_CallBack(TEXT("NpcInteract"), &Interact);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pCurrentDialogue[0]->Set_Hover(false);
|
||||
m_iTextID = m_iNextID;
|
||||
NpcDialogue();
|
||||
Npc_Dialogue(m_Info);
|
||||
if (m_iNextID == -1)
|
||||
{
|
||||
m_bEndText = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CDialogue_Font* CDialogue_Font::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CDialogue_Font* pInstance = new CDialogue_Font(pDevice, pContext);
|
||||
|
||||
@@ -36,7 +36,6 @@ void CInfoInstance::Change_Level()
|
||||
m_pMapInfo->Change_Level();
|
||||
m_pSkillInfo->Change_Level();
|
||||
m_pInteractiveInfo->Change_Level();
|
||||
UI_Event.clear();
|
||||
}
|
||||
|
||||
CStat* CInfoInstance::Get_PlayerStatPtr()
|
||||
@@ -344,9 +343,9 @@ _int CInfoInstance::Get_SpellLearnIndex()
|
||||
// m_pDialogue_Font->Add_Text(pArg);
|
||||
//}
|
||||
|
||||
const NPCDIALOGUEINFO& CInfoInstance::Get_Dialogue(_wstring NpcName) const
|
||||
const CURRENTDIALOGUEINFO& CInfoInstance::Get_Dialogue(_wstring NpcName, _int iTextID) const
|
||||
{
|
||||
return m_pDialogue_Data->Get_Info(NpcName);
|
||||
return m_pDialogue_Data->Get_Info(NpcName, iTextID);
|
||||
}
|
||||
|
||||
HRESULT CInfoInstance::Regist_ActiveInteractive(CMapElement_Interactable* pInteractive)
|
||||
|
||||
@@ -85,6 +85,17 @@ void CLevel_Field::Update(_float fTimeDelta)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//m_bLevel = true;
|
||||
|
||||
//if (m_bLevel != m_bCurrentLevel)
|
||||
//{
|
||||
// m_bCurrentLevel = m_bLevel;
|
||||
// UI_STATE eState = UI_STATE::LEVELCHANGE;
|
||||
// m_pInfoInstance->Event_CallBack(TEXT("Canvas_Change"), &eState);
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
|
||||
HRESULT CLevel_Field::Render()
|
||||
|
||||
@@ -119,6 +119,13 @@ HRESULT CLevel_GamePlay::Initialize(void* pArg)
|
||||
if(FAILED(m_pInfoInstance->Late_Initialize()))
|
||||
return E_FAIL;
|
||||
|
||||
m_bLevel = true;
|
||||
if (m_bCurrentLevel != m_bLevel)
|
||||
{
|
||||
m_bCurrentLevel = m_bLevel;
|
||||
m_pInfoInstance->Event_CallBack(TEXT("UIManagerFadeIn"));
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -130,6 +137,7 @@ HRESULT CLevel_GamePlay::Initialize()
|
||||
|
||||
void CLevel_GamePlay::Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
if (m_pGameInstance->Key_Pressing(DIK_0)) {
|
||||
if (m_pGameInstance->Key_Up(DIK_1))
|
||||
{
|
||||
@@ -141,6 +149,10 @@ void CLevel_GamePlay::Update(_float fTimeDelta)
|
||||
|
||||
if (true == m_pGameInstance->Check_LevelShouldChange()) {
|
||||
m_pInfoInstance->Change_Level();
|
||||
|
||||
UI_STATE eState = UI_STATE::LEVELCHANGE;
|
||||
m_pInfoInstance->Event_CallBack(TEXT("Canvas_Change"),&eState);
|
||||
|
||||
if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::FIELD)))) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ void CRandomNpc::Priority_Update(_float fTimeDelta)
|
||||
m_iEntered = 0;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
void CRandomNpc::Update(_float fTimeDelta)
|
||||
{
|
||||
@@ -76,6 +76,21 @@ void CRandomNpc::Update(_float fTimeDelta)
|
||||
m_pRigidBody->Set_Position(m_pTransformCom->Get_State(STATE::POSITION), true);
|
||||
|
||||
m_pInfoInstance->Set_PlayerPos(m_pTransformCom->Get_State(STATE::POSITION));
|
||||
|
||||
_vector vCurrentPos = Get_WorldPostion();
|
||||
pair<CUnit*, CTransform*> pairTarget = m_pInfoInstance->Get_NearestPlayerAlly(vCurrentPos);
|
||||
if (nullptr != pairTarget.first) {
|
||||
Set_Target(*pairTarget.first, *pairTarget.second);
|
||||
}
|
||||
if (nullptr != m_pTarget && m_pTarget->isDead()) {
|
||||
SAFE_RELEASE(m_pTarget);
|
||||
m_fTargetDistance = { FLT_MAX };
|
||||
}
|
||||
|
||||
if (m_fTargetDistance <= 5.f)
|
||||
{
|
||||
_int a = 10;
|
||||
}
|
||||
}
|
||||
|
||||
void CRandomNpc::Late_Update(_float fTimeDelta)
|
||||
@@ -86,6 +101,7 @@ void CRandomNpc::Late_Update(_float fTimeDelta)
|
||||
|
||||
Set_Shadow(m_pGameInstance->IsIn_ShadowViewFrustum(m_pTransformCom->Get_State(STATE::POSITION), m_pTransformCom->Get_Radius()));
|
||||
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
@@ -183,6 +199,25 @@ _wstring CRandomNpc::Get_Name()
|
||||
return m_pNpcStat->Get_Stat().pNpc_Name;
|
||||
}
|
||||
|
||||
_wstring CRandomNpc::Get_NpcName()
|
||||
{
|
||||
return m_pNpcStat->Get_Stat().pName;
|
||||
}
|
||||
|
||||
void CRandomNpc::Set_Target(CUnit& pTarget, CTransform& pTransform)
|
||||
{
|
||||
SAFE_RELEASE(m_pTarget);
|
||||
m_pTarget = &pTarget;
|
||||
SAFE_ADDREF(m_pTarget);
|
||||
|
||||
_vector vTargetPos = pTransform.Get_State(STATE::POSITION);
|
||||
_vector vToTargetDir = vTargetPos - Get_WorldPostion();
|
||||
XMStoreFloat4(&m_vTargetPos, vTargetPos);
|
||||
XMStoreFloat3(&m_vToTargetDir, XMVector3Normalize(vToTargetDir));
|
||||
m_fTargetDistance = XMVectorGetX(XMVector3Length(vToTargetDir));
|
||||
}
|
||||
|
||||
|
||||
HRESULT CRandomNpc::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
|
||||
@@ -408,6 +443,7 @@ void CRandomNpc::Free()
|
||||
SAFE_RELEASE(m_pCharacter_Controller);
|
||||
SAFE_RELEASE(m_pNpcStat);
|
||||
SAFE_RELEASE(m_pRigidBody);
|
||||
SAFE_RELEASE(m_pTarget);
|
||||
if (nullptr != m_pInfoInstance) {
|
||||
CInfoInstance* pInfo = m_pInfoInstance;
|
||||
m_pInfoInstance = nullptr;
|
||||
|
||||
@@ -64,6 +64,7 @@ void CRide_Info::Set_Hover(_bool bVisible)
|
||||
m_bHover = true;
|
||||
m_fTime = 0.f;
|
||||
m_fAlpha = 1.f;
|
||||
m_bFadeOut = false;
|
||||
}
|
||||
|
||||
void CRide_Info::Priority_Update(_float fTimeDelta)
|
||||
|
||||
@@ -49,6 +49,7 @@ void CRide_InfoBG::Set_Hover(_bool bVisible)
|
||||
m_bHover = true;
|
||||
m_fTime = 0.f;
|
||||
m_fAlpha = 1.f;
|
||||
m_bFadeOut = false;
|
||||
}
|
||||
|
||||
void CRide_InfoBG::Priority_Update(_float fTimeDelta)
|
||||
|
||||
@@ -59,6 +59,7 @@ HRESULT CUI_Manager::Initialize(void* pArg)
|
||||
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("NpcInteract"), [this](void* p) {this->NpcInteract(*reinterpret_cast<_bool*>(p)); });
|
||||
m_pInfoInstance->Add_Event(TEXT("UIManagerFadeIn"), [this](void* p) {this->Set_Fade(); });
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -77,8 +78,6 @@ void CUI_Manager::Canvas_Change(UI_STATE eType)
|
||||
static_cast<CCanvasObject*>(m_pSpellLearn_Canvas)->Visible(false);
|
||||
static_cast<CGameObject*>(m_pInteraction_Key)->Set_Visible(true);
|
||||
static_cast<CGameObject*>(m_pNPCInteraction)->Set_Visible(true);
|
||||
static_cast<CGameObject*>(m_pBroom_TargetGate)->Set_Visible(true);
|
||||
static_cast<CGameObject*>(m_pDamage_Font)->Set_Visible(true);
|
||||
break;
|
||||
|
||||
case UI_STATE::SPELL:
|
||||
@@ -118,6 +117,19 @@ void CUI_Manager::Canvas_Change(UI_STATE eType)
|
||||
static_cast<CGameObject*>(m_pDamage_Font)->Set_Visible(false);
|
||||
break;
|
||||
|
||||
case UI_STATE::LEVELCHANGE:
|
||||
m_pMouse_Cursor->Set_Visible(false);
|
||||
m_pCamera_LockOn->Set_Visible(false);
|
||||
static_cast<CCanvasObject*>(m_pGamePlay_Canves)->Visible(false);
|
||||
static_cast<CCanvasObject*>(m_pSpell_Canvas)->Visible(false);
|
||||
static_cast<CCanvasObject*>(m_pQuest_Canvas)->Visible(false);
|
||||
static_cast<CCanvasObject*>(m_pSpellLearn_Canvas)->Visible(false);
|
||||
static_cast<CGameObject*>(m_pInteraction_Key)->Set_Visible(false);
|
||||
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);
|
||||
break;
|
||||
|
||||
default:
|
||||
return;
|
||||
}
|
||||
@@ -206,21 +218,26 @@ void CUI_Manager::Update(_float fTimeDelta)
|
||||
|
||||
if (m_eType == UI_STATE::GAMEPLAYER && m_bNPCInteract == true)
|
||||
{
|
||||
if (m_bCurrentNPCInteract != m_bNPCInteract)
|
||||
m_bCurrentNPCInteract = m_bNPCInteract;
|
||||
|
||||
if (m_eType == UI_STATE::GAMEPLAYER)
|
||||
{
|
||||
Canvas_Change(UI_STATE::NPC_INTERACT);
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
if (m_bCurrentNPCInteract == true && m_bNPCInteract == false)
|
||||
{
|
||||
m_bCurrentNPCInteract = m_bNPCInteract;
|
||||
|
||||
if (m_bActive == false)
|
||||
{
|
||||
if (m_bActive == false)
|
||||
m_bActive = true;
|
||||
m_bAlphaZero = true;
|
||||
if (m_eType == UI_STATE::NPC_INTERACT)
|
||||
{
|
||||
m_bActive = true;
|
||||
m_bAlphaZero = true;
|
||||
if (m_eType == UI_STATE::GAMEPLAYER)
|
||||
{
|
||||
m_eType = UI_STATE::NPC_INTERACT;
|
||||
}
|
||||
m_eType = UI_STATE::GAMEPLAYER;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -400,7 +417,7 @@ HRESULT CUI_Manager::Ready_Components(void* pArg)
|
||||
}
|
||||
Add_Canvas(TEXT("NPCInteraction"), m_pNPCInteraction);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroom_TargetGate>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast <CBroom_TargetGate**>(&m_pBroom_TargetGate))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroom_TargetGate>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CBroom_TargetGate**>(&m_pBroom_TargetGate))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -441,6 +458,14 @@ void CUI_Manager::NpcInteract(_bool bInteract)
|
||||
m_bNPCInteract = bInteract;
|
||||
}
|
||||
|
||||
void CUI_Manager::Set_Fade()
|
||||
{
|
||||
m_fAlpha = 1.5f;
|
||||
m_bActive = true;
|
||||
m_bHover = true;
|
||||
m_bCgangede = true;
|
||||
}
|
||||
|
||||
CUI_Manager* CUI_Manager::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CUI_Manager* pInstance = new CUI_Manager(pDevice, pContext);
|
||||
|
||||
@@ -36,10 +36,12 @@ namespace Client
|
||||
PLAYER_HAIR_DAOTHV_ToSRO, PLAYER_Suit_DSRON_ToSRO, PLAYER_EyeLash_DAOTHV_ToSRO, PLAYER_Eye_ToSRO, PLAYER_Robe_ToMRO, SHADOW, SHADOW_LEGACY
|
||||
, END
|
||||
};
|
||||
enum class UI_STATE { GAMEPLAYER, SPELL, QUEST, INVENTORY, SPELLLNEARN, NPC_INTERACT, END };
|
||||
enum class UI_STATE { GAMEPLAYER, SPELL, QUEST, INVENTORY, SPELLLNEARN,
|
||||
NPC_INTERACT, LEVELCHANGE, END };
|
||||
|
||||
enum class QUESTTYPE { MAIN, SUB, END };
|
||||
enum class QUESTSTATE {NONE, ACCEPTED, CLEARED, END };
|
||||
enum class NPCTEXTTYPE {NEXTTEXT, CHOICETEXT, SHOPTEXT, QUESTTEXT, SPELLLEAN, END};
|
||||
|
||||
enum class EFFECT_TYPE { EFFECT, TRAIL, END };
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
NS_BEGIN(Engine)
|
||||
class CModel;
|
||||
class CRigidBody_Static;
|
||||
class CUnit;
|
||||
class CModel;
|
||||
class CRigidBody_Static;
|
||||
class CUnit;
|
||||
NS_END
|
||||
|
||||
namespace Client
|
||||
@@ -39,7 +39,7 @@ namespace Client
|
||||
|
||||
typedef struct DialogueChoice
|
||||
{
|
||||
_int eType = {false};
|
||||
_int eType = { false };
|
||||
_wstring pText;
|
||||
_int NextTypeID{};
|
||||
}DIALOGUECHOICEINFO;
|
||||
@@ -47,7 +47,7 @@ namespace Client
|
||||
typedef struct DialogueInfo
|
||||
{
|
||||
_int iLineID{};
|
||||
_bool bType = {false};
|
||||
_int iTextType{};
|
||||
_wstring pText;
|
||||
_int NextTextID{};
|
||||
vector<DIALOGUECHOICEINFO> ChoiceInfo;
|
||||
@@ -68,7 +68,7 @@ namespace Client
|
||||
|
||||
typedef struct tegNPCInteractionInfo
|
||||
{
|
||||
CGameObject* pOwner = { nullptr };
|
||||
CGameObject* pOwner = { nullptr };
|
||||
_wstring pNPCName;
|
||||
_wstring pName;
|
||||
_float4 fNPCPosition{};
|
||||
@@ -285,7 +285,7 @@ namespace Client
|
||||
_float4 vPadding5 = {};
|
||||
_float4 vPadding6 = {};
|
||||
}EFFECT_INFO;
|
||||
|
||||
|
||||
typedef struct tagTrailInfo
|
||||
{
|
||||
EFFECT_TYPE eEffectType = { EFFECT_TYPE::TRAIL };
|
||||
|
||||
@@ -25,14 +25,14 @@ class CDialogue_Data final : public CBase
|
||||
HRESULT Load_SpellInfo(const _char* pFilePath);
|
||||
|
||||
public:
|
||||
const NPCDIALOGUEINFO& Get_Info(_wstring NpcName) const;
|
||||
const CURRENTDIALOGUEINFO& Get_Info(_wstring NpcName, _int iTextID) const;
|
||||
|
||||
private:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
|
||||
_int m_iDialogue_Count{};
|
||||
map<_wstring, NPCDIALOGUEINFO> m_DialogueInfo;
|
||||
NPCDIALOGUEINFO Dummy{};
|
||||
CURRENTDIALOGUEINFO Dummy{};
|
||||
private:
|
||||
HRESULT Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex);
|
||||
|
||||
|
||||
@@ -40,23 +40,38 @@ class CDialogue_Font final : public CGameObject
|
||||
|
||||
public:
|
||||
void Add_Text(void* pArg);
|
||||
|
||||
void Npc_Dialogue(DIALOGUEINFO Info);
|
||||
private:
|
||||
void NpcInfo(void* pArg);
|
||||
void NpcInteract(_bool bInteract);
|
||||
|
||||
void NpcDialogue();
|
||||
|
||||
void CHoice();
|
||||
|
||||
void Shop();
|
||||
void SpellLearn();
|
||||
void NextText();
|
||||
private:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
|
||||
class CDialogue* m_pDialogue = { nullptr };
|
||||
|
||||
DIALOGUEINFO m_Info;
|
||||
|
||||
vector<class CDialogue*> m_DialoguInfo;
|
||||
deque<class CDialogue*> m_pCurrentDialogue;
|
||||
|
||||
_bool m_bNpcInteract = { false };
|
||||
_bool m_bCurrentInteract = { false };
|
||||
_bool m_bEndText = { false };
|
||||
_bool m_bNextText = { false };
|
||||
|
||||
_wstring m_pNpcName;
|
||||
_int m_iTextID{};
|
||||
_int m_iNextID{};
|
||||
_int m_iType{};
|
||||
|
||||
|
||||
public:
|
||||
static CDialogue_Font* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
@@ -88,7 +88,7 @@ DECLARE_SINGLETON(CInfoInstance)
|
||||
#pragma endregion
|
||||
#pragma region Dialogue_Font
|
||||
//void Set_Font(void* pArg);
|
||||
const NPCDIALOGUEINFO& Get_Dialogue(_wstring NpcName) const;
|
||||
const CURRENTDIALOGUEINFO& Get_Dialogue(_wstring NpcName, _int iTextID) const;
|
||||
#pragma endregion
|
||||
HRESULT Regist_ActiveInteractive(class CMapElement_Interactable* pInteractive);
|
||||
HRESULT Deregist_ActiveInteractive(class CMapElement_Interactable* pInteractive);
|
||||
|
||||
@@ -19,6 +19,9 @@ class CLevel_Field final : public CLevel
|
||||
private:
|
||||
class CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
|
||||
_bool m_bLevel = { false };
|
||||
_bool m_bCurrentLevel = { false };
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize() override;
|
||||
HRESULT Initialize(void* pArg);
|
||||
|
||||
@@ -21,6 +21,10 @@ class CLevel_GamePlay final : public CLevel
|
||||
class CBroomRaceManager* m_pBroomRaceManager = { nullptr };
|
||||
|
||||
_bool m_isDay = { true };
|
||||
|
||||
_bool m_bLevel = { false };
|
||||
_bool m_bCurrentLevel = { false };
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize() override;
|
||||
HRESULT Initialize(void* pArg);
|
||||
|
||||
@@ -27,6 +27,9 @@ class CRandomNpc final : public CUnit
|
||||
virtual void OnRayCollision(CGameObject* pCaster, _uint iCastedOrder, _float fDistance, _float3 vCastedWorldPos)override;
|
||||
|
||||
virtual _wstring Get_Name() override;
|
||||
virtual _wstring Get_NpcName() override;
|
||||
|
||||
void Set_Target(CUnit& pTarget, CTransform& pTransform);
|
||||
protected:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
CCharacter_Controller* m_pCharacter_Controller = { nullptr };
|
||||
@@ -37,6 +40,12 @@ class CRandomNpc final : public CUnit
|
||||
CRandomNpc* m_pNPC_Ollivander = { nullptr };
|
||||
|
||||
/*class CNPCInteraction* m_pNPCInteraction = { nullptr };*/
|
||||
CUnit* m_pTarget = { nullptr };
|
||||
_float4 m_vTargetPos = { };
|
||||
_float3 m_vToTargetDir = { };
|
||||
_float m_fTargetDistance = { FLT_MAX };
|
||||
_float m_fDegree = {};
|
||||
_float m_fCross = {};
|
||||
|
||||
CNPCStat* m_pNpcStat = { nullptr };
|
||||
_int m_iEntered = { 0 };
|
||||
|
||||
@@ -47,6 +47,8 @@ class CUI_Manager final : public CUIObject
|
||||
|
||||
void NpcInteract(_bool bInteract);
|
||||
|
||||
void Set_Fade();
|
||||
|
||||
private:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
@@ -79,6 +81,7 @@ class CUI_Manager final : public CUIObject
|
||||
_bool m_bSpellLearn = { false };
|
||||
|
||||
_bool m_bNPCInteract = { false };
|
||||
_bool m_bCurrentNPCInteract = { false };
|
||||
|
||||
_bool m_bAlphaZero = { false };
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<DialogueInfo>
|
||||
<Dialogue NpcName="OLLIVENDER" NpcID="0">
|
||||
<Line ID="0" Type="0" Text="반갑네 친구 나는 올리벤더 라고 하네" NextText="0001"> </Line>
|
||||
<Line ID="1" Type="0" Text="나는 여기서 지팡이를 팔고있어" NextText="0002"> </Line>
|
||||
<Line ID="2" Type="1" Text="뭐 필요한게 있나?" NextText="-1" >
|
||||
<Line ID="0" Type="0" Text="반갑네 친구 나는 올리벤더 라고 하네" NextText="1"> </Line>
|
||||
<Line ID="1" Type="0" Text="나는 여기서 지팡이를 팔고있어" NextText="2"> </Line>
|
||||
<Line ID="2" Type="1" Text="뭐 필요한게 있나?" NextText="-1">
|
||||
<Choice Type="1" Text="상점 이용하기" NextText="-1" />
|
||||
<Choice Type="2" Text="퀘스트 확인하기" NextText="-1" />
|
||||
<Choice Type="0" Text="다른일 하러가기" NextText="-1" />
|
||||
@@ -10,19 +10,18 @@
|
||||
</Dialogue>
|
||||
|
||||
<Dialogue NpcName="SATYAVATI" NpcID="1">
|
||||
<Line ID="0" Type="0" Text="사티아비티" NextText="-1"> </Line>
|
||||
<Line ID="0" Type="0" Text="사티아바티" NextText="-1"> </Line>
|
||||
</Dialogue>
|
||||
|
||||
<Dialogue NpcName="MATILDAWEASELY" NpcID="2">
|
||||
<Line ID="0" Type="0" Text="마틸다 위즐리" NextText="0001"> </Line>
|
||||
<Line ID="1" Type="0" Text="나는 여기서 지팡이를 팔고있어" NextText="0002"> </Line>
|
||||
<Line ID="2" Type="1" Text="뭐 필요한게 있나?" NextText="-1">
|
||||
</Line>
|
||||
<Line ID="0" Type="0" Text="마틸다 위즐리" NextText="1"> </Line>
|
||||
<Line ID="1" Type="0" Text="나는 여기서 지팡이를 팔고있어" NextText="2"> </Line>
|
||||
<Line ID="2" Type="1" Text="뭐 필요한게 있나?" NextText="-1"> </Line>
|
||||
</Dialogue>
|
||||
|
||||
<Dialogue NpcName="ELEAZARFIG" NpcID="3">
|
||||
<Line ID="0" Type="0" Text="엘리아자르 피그" NextText="0001"> </Line>
|
||||
<Line ID="1" Type="0" Text="나는 여기서 지팡이를 팔고있어" NextText="0002"> </Line>
|
||||
<Line ID="0" Type="0" Text="엘리아자르 피그" NextText="1"> </Line>
|
||||
<Line ID="1" Type="0" Text="나는 여기서 지팡이를 팔고있어" NextText="2"> </Line>
|
||||
<Line ID="2" Type="1" Text="뭐 필요한게 있나?" NextText="-1">
|
||||
<Choice Type="1" Text="상점 이용하기" NextText="-1" />
|
||||
<Choice Type="2" Text="퀘스트 확인하기" NextText="-1" />
|
||||
@@ -31,13 +30,7 @@
|
||||
</Dialogue>
|
||||
|
||||
<Dialogue NpcName="ELF" NpcID="4">
|
||||
<Line ID="0" Type="0" Text="도비" NextText="0001"> </Line>
|
||||
<Line ID="1" Type="0" Text="나는 여기서 지팡이를 팔고있어" NextText="0002"> </Line>
|
||||
<Line ID="2" Type="1" Text="뭐 필요한게 있나?" NextText="-1">
|
||||
<Choice Type="1" Text="상점 이용하기" NextText="-1" />
|
||||
<Choice Type="2" Text="퀘스트 확인하기" NextText="-1" />
|
||||
<Choice Type="0" Text="다른일 하러가기" NextText="-1" />
|
||||
</Line>
|
||||
<Line ID="0" Type="0" Text="도비" NextText="-1"> </Line>
|
||||
</Dialogue>
|
||||
|
||||
<Dialogue NpcName="PEEVES" NpcID="5">
|
||||
@@ -49,11 +42,30 @@
|
||||
</Dialogue>
|
||||
|
||||
<Dialogue NpcName="F_STUDENT" NpcID="7">
|
||||
<Line ID="0" Type="0" Text="여학생" NextText="-1"> </Line>
|
||||
<Line ID="0" Type="0" Text="아우렐리아 로즈" NextText="-1"> </Line>
|
||||
</Dialogue>
|
||||
|
||||
<Dialogue NpcName="M_STUDENT" NpcID="8">
|
||||
<Line ID="0" Type="0" Text="남학생" NextText="-1"> </Line>
|
||||
<Line ID="0" Type="0" Text="테오도어 그레이브스" NextText="-1"> </Line>
|
||||
</Dialogue>
|
||||
|
||||
<Dialogue NpcName="BAIHOWIN" NpcID="9">
|
||||
<Line ID="0" Type="0" Text="바이호윈" NextText="-1"> </Line>
|
||||
</Dialogue>
|
||||
|
||||
<Dialogue NpcName="GEORGEOSRIC" NpcID="10">
|
||||
<Line ID="0" Type="0" Text="조지오스릭" NextText="-1"> </Line>
|
||||
</Dialogue>
|
||||
|
||||
<Dialogue NpcName="DINAHHECAT" NpcID="11">
|
||||
<Line ID="0" Type="0" Text="디나 헤카트" NextText="-1"> </Line>
|
||||
</Dialogue>
|
||||
|
||||
<Dialogue NpcName="MUDIWAONAI" NpcID="12">
|
||||
<Line ID="0" Type="0" Text="무디아 오나이" NextText="-1"> </Line>
|
||||
</Dialogue>
|
||||
|
||||
<Dialogue NpcName="KITCHENFEMALE" NpcID="13">
|
||||
<Line ID="0" Type="0" Text="주방 도비" NextText="-1"> </Line>
|
||||
</Dialogue>
|
||||
</DialogueInfo>
|
||||
|
||||
@@ -13,4 +13,4 @@
|
||||
<DINAHHECAT ID="11" Name="디나 헤카트" NpcName="DINAHHECAT" TAG="1" SizeX="256"/>
|
||||
<MUDIWAONAI ID="12" Name="무디아 오나이" NpcName="MUDIWAONAI" TAG="1" SizeX="256"/>
|
||||
<KITCHENFEMALE ID="13" Name="주방 도비" NpcName="KITCHENFEMALE" TAG="1" SizeX="256"/>
|
||||
</StatInfo>
|
||||
</StatInfo>
|
||||
|
||||
Reference in New Issue
Block a user