Merge branch 'Develope' into Effect_Follow_1202
This commit is contained in:
@@ -49,7 +49,9 @@ HRESULT CGameInstance::Initialize_Engine(const ENGINE_DESC& EngineDesc, ID3D11De
|
||||
}
|
||||
}
|
||||
}
|
||||
m_pThreadHolder = CThreadHolder::Create( 3 );
|
||||
|
||||
m_pThreadHolder = CThreadHolder::Create( 6 );
|
||||
|
||||
if (nullptr == m_pThreadHolder) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,9 @@ HRESULT CGameObject_Manager::Add_GameObject_ToLayer(_uint iLayerLevelIndex, cons
|
||||
void CGameObject_Manager::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
#ifndef gimch
|
||||
Describe_Entity();
|
||||
#endif // !gimch
|
||||
m_pGameInstance->Compute_TimeDelta(TEXT("Timer_PriorityUpdate"));
|
||||
#endif // _DEBUG
|
||||
for (size_t i = 0; i < m_iNumLevels; i++)
|
||||
|
||||
@@ -207,14 +207,20 @@ _bool CUIObject::Chack_Visible()
|
||||
|
||||
void CUIObject::Set_FadeIn()
|
||||
{
|
||||
m_bFadeIn = true;
|
||||
m_bFadeOut = false;
|
||||
if (!m_bFadeIn && m_fAlpha < 1.f)
|
||||
{
|
||||
m_bFadeIn = true;
|
||||
m_bFadeOut = false;
|
||||
}
|
||||
}
|
||||
|
||||
void CUIObject::Set_FadeOut()
|
||||
{
|
||||
m_bFadeIn = false;
|
||||
m_bFadeOut = true;
|
||||
if (!m_bFadeOut && m_fAlpha > 0.f)
|
||||
{
|
||||
m_bFadeOut = true;
|
||||
m_bFadeIn = false;
|
||||
}
|
||||
}
|
||||
|
||||
_bool CUIObject::Get_FadeIn()
|
||||
@@ -449,6 +455,16 @@ _int CUIObject::Get_SkillType()
|
||||
return m_iSpellType;
|
||||
}
|
||||
|
||||
void CUIObject::Set_SpellType(_int eType)
|
||||
{
|
||||
m_iSkillType = eType;
|
||||
}
|
||||
|
||||
_int CUIObject::Get_SpellType()
|
||||
{
|
||||
return m_iSkillType;
|
||||
}
|
||||
|
||||
void CUIObject::Set_CoolTime(_float CoolTime)
|
||||
{
|
||||
m_fCoolTime = CoolTime;
|
||||
@@ -467,6 +483,16 @@ void CUIObject::Function_Callback(wstring Name, void* pArg)
|
||||
{
|
||||
}
|
||||
|
||||
_bool CUIObject::Get_Hover()
|
||||
{
|
||||
return m_bHover;
|
||||
}
|
||||
|
||||
const CUIObject::SPELLINFO CUIObject::Get_Info(_int Index)
|
||||
{
|
||||
return SPELLINFO();
|
||||
}
|
||||
|
||||
void CUIObject::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
@@ -274,6 +274,9 @@ _int CVIBuffer_UI_Instance::Set_Mouse_Hover(_float2 fMousePos)
|
||||
VTX_INSTANCE_UI* pVertices = static_cast<VTX_INSTANCE_UI*>(SubResource.pData);
|
||||
|
||||
_int hoveredIndex = -1;
|
||||
for (_uint i = 0; i < m_iNumInstance; i++)
|
||||
pVertices[i].bHover = 0.f;
|
||||
|
||||
for (_uint i = 0; i < m_iNumInstance; i++)
|
||||
{
|
||||
_float2 pos = pVertices[i].fPos;
|
||||
@@ -289,21 +292,42 @@ _int CVIBuffer_UI_Instance::Set_Mouse_Hover(_float2 fMousePos)
|
||||
pt.x = LONG(fMousePos.x);
|
||||
pt.y = LONG(fMousePos.y);
|
||||
|
||||
if (PtInRect(&rcInstance, pt))
|
||||
{
|
||||
pVertices[i].bHover = 1.f;
|
||||
hoveredIndex = i;
|
||||
if (PtInRect(&rcInstance, pt))
|
||||
{
|
||||
pVertices[i].bHover = 1.f;
|
||||
hoveredIndex = i;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
pVertices[i].bHover = 0.f;
|
||||
}
|
||||
else
|
||||
{
|
||||
pVertices[i].bHover = 0.f;
|
||||
hoveredIndex = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_pContext->Unmap(m_pVBInstance, 0);
|
||||
return hoveredIndex;
|
||||
m_pContext->Unmap(m_pVBInstance, 0);
|
||||
return hoveredIndex;
|
||||
}
|
||||
|
||||
void CVIBuffer_UI_Instance::Set_Hover_Index(_uint iIndex)
|
||||
{
|
||||
D3D11_MAPPED_SUBRESOURCE SubResource{};
|
||||
|
||||
m_pContext->Map(m_pVBInstance, 0, D3D11_MAP_WRITE_NO_OVERWRITE, 0, &SubResource);
|
||||
|
||||
VTX_INSTANCE_UI* pVertices = static_cast<VTX_INSTANCE_UI*>(SubResource.pData);
|
||||
|
||||
for (_uint i = 0; i < m_iNumInstance; ++i)
|
||||
{
|
||||
if (i == iIndex)
|
||||
{
|
||||
pVertices[i].bHover = 1.f;
|
||||
}
|
||||
else
|
||||
pVertices[i].bHover = 0.f;
|
||||
}
|
||||
|
||||
m_pContext->Unmap(m_pVBInstance, 0);
|
||||
}
|
||||
|
||||
CVIBuffer_UI_Instance* CVIBuffer_UI_Instance::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const INSTANCE_DESC* pInstanceDesc)
|
||||
|
||||
@@ -17,6 +17,25 @@ typedef struct tagUIObjectDesc
|
||||
_float fSizeX, fSizeY = {};
|
||||
}UIOBJECT_DESC;
|
||||
|
||||
typedef struct tagSpellInfo
|
||||
{
|
||||
_int iSpell_ID{};
|
||||
_wstring pSpell_Name;
|
||||
_wstring pImage_Name;
|
||||
_int iSpell_Type{};
|
||||
_int iSkill_Type{};
|
||||
_float fSpell_CoolTime{};
|
||||
_float fDuration{};
|
||||
_int iAnimNum{};
|
||||
_wstring pSpellInfo;
|
||||
_bool bSpell_Lock = false;
|
||||
_bool bEquip_Spell = false;
|
||||
}SPELLINFO;
|
||||
typedef struct SlotHover
|
||||
{
|
||||
_int iSlotID{};
|
||||
_int iHover_Index{};
|
||||
}HOVER_INFO;
|
||||
protected:
|
||||
CUIObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CUIObject(const CUIObject& rhs);
|
||||
@@ -102,12 +121,18 @@ typedef struct tagUIObjectDesc
|
||||
|
||||
virtual void Set_SkillType(_int eType);
|
||||
virtual _int Get_SkillType();
|
||||
virtual void Set_SpellType(_int eType);
|
||||
virtual _int Get_SpellType();
|
||||
|
||||
virtual void Set_CoolTime(_float CoolTime);
|
||||
virtual _float Get_CoolTime();
|
||||
|
||||
virtual void Add_Function(wstring Name, function<void(void*)> Evnet);
|
||||
virtual void Function_Callback(wstring Name, void* pArg = nullptr);
|
||||
|
||||
virtual _bool Get_Hover();
|
||||
|
||||
virtual const SPELLINFO Get_Info(_int Index);
|
||||
protected:
|
||||
_vector m_fOrigin_Position_vector{};
|
||||
_float2 m_fOrigin_Position{};
|
||||
@@ -152,6 +177,7 @@ typedef struct tagUIObjectDesc
|
||||
RECT m_pRect{};
|
||||
|
||||
_int m_iSpellType{};
|
||||
_int m_iSkillType{};
|
||||
_float m_fSortZ{};
|
||||
_float m_fMoveSpeed{};
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ class ENGINE_DLL CVIBuffer_UI_Instance final : public CVIBuffer_Instance
|
||||
void Set_ImageUV(UI_ATLAS_DESC* AtlasUV);
|
||||
void Set_Index_Renge_Color(_uint StartIndex, _uint EndIndex, _float4 vColor);
|
||||
_int Set_Mouse_Hover(_float2 fMousePos);
|
||||
void Set_Hover_Index(_uint iIndex);
|
||||
|
||||
private:
|
||||
VTX_INSTANCE_UI* m_pInstanceVertices = { nullptr };
|
||||
|
||||
Reference in New Issue
Block a user