Merge branch 'Develope' into Shader
This commit is contained in:
@@ -158,6 +158,46 @@ _bool CElementObject::Start_Lerp(_float fTimeDelta)
|
||||
}
|
||||
}
|
||||
|
||||
_bool CElementObject::Start_Lerp_Speed(_float fTimeDelta, _float2 MousePoint)
|
||||
{
|
||||
_vector Mouse = XMVectorSet(MousePoint.x, MousePoint.y, 1.f, 1.f);
|
||||
_vector Pos = m_fCurrent_Position;
|
||||
_vector Target = m_vLerp_Position;
|
||||
|
||||
_vector Dir = XMVectorSubtract(Target, Pos);
|
||||
_vector MouseDir = XMVectorSubtract(Mouse, Pos);
|
||||
|
||||
_vector NorDir = XMVector3Normalize(Dir);
|
||||
_vector NorMouse = XMVector3Normalize(MouseDir);
|
||||
|
||||
_float SameDir = XMVectorGetX(XMVector3Dot(NorDir, NorMouse));
|
||||
_float Weight = max(0.5f, SameDir);
|
||||
_vector LenVec = XMVector3Length(Dir);
|
||||
_float Distance = XMVectorGetX(LenVec);
|
||||
|
||||
_float move = m_fMoveSpeed * fTimeDelta * Weight;
|
||||
|
||||
if (Distance <= move)
|
||||
{
|
||||
m_fX = m_vLerp_Position.m128_f32[0];
|
||||
m_fY = m_vLerp_Position.m128_f32[1];
|
||||
return true;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
XMVECTOR DirNorm = XMVector3Normalize(Dir);
|
||||
m_fX = (Pos + DirNorm * move).m128_f32[0];
|
||||
m_fY = (Pos + DirNorm * move).m128_f32[1];
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
_bool CElementObject::Set_Trgger()
|
||||
{
|
||||
return _bool();
|
||||
}
|
||||
|
||||
void CElementObject::Reset_Pos(_float fTimeDelta)
|
||||
{
|
||||
_vector Pos = m_fCurrent_Position;
|
||||
|
||||
@@ -183,6 +183,19 @@ _bool CPanelObject::Chack_Visible()
|
||||
return m_bVisible;
|
||||
}
|
||||
|
||||
_bool CPanelObject::Chack_Element(_float2 Position, _float2 Target, _float Scale, _float TargetScale)
|
||||
{
|
||||
_vector vPos = XMVectorSet(Position.x, Position.y, 0.f, 1.f);
|
||||
_vector vTarget = XMVectorSet(Target.x, Target.y, 0.f, 1.f);
|
||||
|
||||
_float Dir = XMVectorGetX(XMVector3Length(XMVectorSubtract(vTarget, vPos)));
|
||||
|
||||
if (Dir <= (Scale * 0.5f) + (TargetScale * 0.5f))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
CGameObject* CPanelObject::Find_Element(const wstring& Name)
|
||||
{
|
||||
auto iter = m_Elements_map.find(Name);
|
||||
|
||||
@@ -377,7 +377,7 @@ _bool CUIObject::Start_Lerp(_float fTimeDelta)
|
||||
return false;
|
||||
}
|
||||
|
||||
_bool CUIObject::Start_Bezier(_float fTimeDelta)
|
||||
_bool CUIObject::Start_Lerp_Speed(_float fTimeDelta, _float2 Mouse_Point)
|
||||
{
|
||||
return _bool();
|
||||
}
|
||||
@@ -538,6 +538,11 @@ _float2 CUIObject::Get_Font()
|
||||
return _float2(m_fFontX, m_fFontY);
|
||||
}
|
||||
|
||||
_float2 CUIObject::Get_PerPosition()
|
||||
{
|
||||
return m_fPerPosition;
|
||||
}
|
||||
|
||||
void CUIObject::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
@@ -31,6 +31,8 @@ class ENGINE_DLL CElementObject abstract : public CUIObject
|
||||
virtual _float Get_Nine_Slice_Bottom() override;
|
||||
|
||||
virtual _bool Start_Lerp(_float fTimeDelta) override;
|
||||
virtual _bool Start_Lerp_Speed(_float fTimeDelta, _float2 MousePoint) override;
|
||||
virtual _bool Set_Trgger();
|
||||
virtual void Reset_Pos(_float fTimeDelta)override;
|
||||
virtual void Start_Size_Lerp(_float fTimeDelta) override;
|
||||
virtual void Reset_Size_Lerp(_float fTimeDelta) override;
|
||||
@@ -43,6 +45,9 @@ class ENGINE_DLL CElementObject abstract : public CUIObject
|
||||
|
||||
_float m_fBezierTime = 0;
|
||||
|
||||
vector<_vector> m_vector;
|
||||
|
||||
|
||||
public:
|
||||
virtual void Free() override;
|
||||
};
|
||||
|
||||
@@ -33,10 +33,12 @@ class ENGINE_DLL CPanelObject abstract : public CUIObject
|
||||
|
||||
virtual void Add_Function(wstring Name, function<void(void*)> Evnet) override;
|
||||
virtual void Function_Callback(wstring Name, void* pArg = nullptr) override;
|
||||
|
||||
protected:
|
||||
virtual void Add_Element(wstring Name, class CGameObject* pElement);
|
||||
virtual _bool Chack_Visible() override;
|
||||
|
||||
virtual _bool Chack_Element(_float2 Position, _float2 Target, _float Scale, _float TargetScale);
|
||||
protected:
|
||||
vector<class CGameObject*> m_Elements; // 패널이 엘리먼츠를 관리하기 위해 만듬
|
||||
vector<wstring> m_ElementName; // 엘리멘트들의 이름을 전해주기 위해서
|
||||
|
||||
@@ -76,10 +76,14 @@ typedef struct tagCurrentQeustSerectInfo
|
||||
|
||||
typedef struct tagSpellLearnInfo
|
||||
{
|
||||
_wstring pSpellName{};
|
||||
_wstring pImageName{};
|
||||
_float fSpellSize{};
|
||||
_float2 fStartPosition{};
|
||||
_wstring pSpellName{};
|
||||
_wstring pImageName{};
|
||||
_int iSpellID{};
|
||||
_int iSpellType{};
|
||||
_float fSpellSize{};
|
||||
_float2 fStartPosition{};
|
||||
_float2 fEndPosition{};
|
||||
vector<_vector> Booster;
|
||||
vector<_vector> Lines;
|
||||
}SPELLLEARNINFO;
|
||||
|
||||
@@ -152,7 +156,7 @@ typedef struct tagSpellLearnInfo
|
||||
virtual void Lerp_PosX(_float PosX);
|
||||
virtual void Lerp_PosY(_float PosY);
|
||||
virtual _bool Start_Lerp(_float fTimeDelta);
|
||||
virtual _bool Start_Bezier(_float fTimeDelta);
|
||||
virtual _bool Start_Lerp_Speed(_float fTimeDelta, _float2 Mouse_Point);
|
||||
virtual void Reset_Pos(_float fTimeDelta);
|
||||
virtual void Start_Size_Lerp(_float fTimeDelta);
|
||||
virtual void Reset_Size_Lerp(_float fTimeDelta);
|
||||
@@ -190,6 +194,7 @@ typedef struct tagSpellLearnInfo
|
||||
virtual void Set_FontX(_float fFontX);
|
||||
virtual void Set_FontY(_float fFontY);
|
||||
virtual _float2 Get_Font();
|
||||
virtual _float2 Get_PerPosition();
|
||||
protected:
|
||||
_vector m_fOrigin_Position_vector{};
|
||||
_float2 m_fOrigin_Position{};
|
||||
@@ -246,6 +251,8 @@ typedef struct tagSpellLearnInfo
|
||||
_float m_fFontX{};
|
||||
_float m_fFontY{};
|
||||
_float m_fFontOffSet{};
|
||||
|
||||
_float2 m_fPerPosition{};
|
||||
protected:
|
||||
virtual HRESULT Initialize_Prototype();
|
||||
virtual HRESULT Initialize(void* pArg);
|
||||
|
||||
Reference in New Issue
Block a user